Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4540381pxu; Mon, 21 Dec 2020 15:37:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmfhhjIoaBo6de0SOpmkmNUfiqhqSf/va5/zQXnIlcJvMlGZwRj1zv+iulzFQ35xdlapZH X-Received: by 2002:a17:907:3fa3:: with SMTP id hr35mr17535196ejc.71.1608593860003; Mon, 21 Dec 2020 15:37:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608593859; cv=none; d=google.com; s=arc-20160816; b=mcoo/VuV5D6LQRhcxplNp9ZPhBENvjlDYYreQ5TT3cPesFL+AUprAxFx/PAHSltnM8 FbaMfBjqdhuiosR3zXc//HP8LV/Rts4PwmCOB0t5MMRNORNYEir1BlxoPQtnHI+Xx2GV tv7N+G8+TDxAUkNHcd4rf27+0fV6EaQgfuCTIoDPw8JxfSaKD+kgZtUjhJHZCpfvv9ix u2QOzLktmujEXbbg2p7/8KNlV/45IG2MdKM/uPiEmQgesd+hlBSrR1Vmt0uy0qWpyXDk G4Bb7xXHWBn4lAg9XnsvxSmS5c3L6iI8xJu77nHbzWCYYf76x/X4Pc9+2sXV9mk0V4sO +IxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=QEI1Wo/KRErTAX0ERZgOzFeJks692fMFAi0JITm2e5Q=; b=tdDq7NrFxWceJV81yWKwvRA+JY+hLaYSgpFpC5zinHe6GympAnNVw6MZHfLbyPzJ1d UWw+83YzzINf/czlVSUtBD/xch49IcVUi5KrTMbNmfZ3w+JSl0op3lxqB2dm/Y23bPLH P2zoI9XseYgaaYtoBTZXuSOv4Rmwj+GHNkqv6yWde/+o96bLvljjD1UGuYPrR0iOt4Ye 4jbxNSGnQ51v/4O0gIFAXlU+TUuG/YO2sY2qz/fzOdIpCG1qQWzxgxRp3PX2TRQlYEAZ eq3AQfANHtydMObupMaD90UwDGp3gn4sVfk67uj+Y/yZi0Y8NcLdax3i3jT1m8PlBBvx y1Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=GC5WA9gd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t12si14258372edc.228.2020.12.21.15.37.17; Mon, 21 Dec 2020 15:37:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=GC5WA9gd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726128AbgLUXeb (ORCPT + 99 others); Mon, 21 Dec 2020 18:34:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbgLUXea (ORCPT ); Mon, 21 Dec 2020 18:34:30 -0500 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43DFCC0613D6 for ; Mon, 21 Dec 2020 15:33:50 -0800 (PST) Received: by mail-lf1-x133.google.com with SMTP id x20so27637434lfe.12 for ; Mon, 21 Dec 2020 15:33:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QEI1Wo/KRErTAX0ERZgOzFeJks692fMFAi0JITm2e5Q=; b=GC5WA9gdSwcyncqpAe4Pgve/+6CIEcQ2X9/TyvwifrhZz13pA7erQ8ry7LaJHWRbYX ujbb52eNeZOdzzRXgtcSiXBN7bIpIlqUo5bA6wXKFSwNB+dI1C8olVMwudvXutMxjHPj qsGm07mg/0wlThOxI9rhIrdWA058+/rAApYwo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QEI1Wo/KRErTAX0ERZgOzFeJks692fMFAi0JITm2e5Q=; b=Kas3J4kDdf+MNm846VdmrkpQwAF4VzwWhzyT4TFDwTIvVqU9juEEFTnr6FddWO35sn Na1bvxglGGJZ3ubLSH+YY2sq3WX90LKZT31Y+Zh0CoOwpbjdklF3GjW+FY6eZoC4qyuZ LoLagYC14GREV35djsgHeHxOzeq6lrKX5sMPpDKqiHgKqb21DFTk5xrkXotBD6f1moOz xgj9Lh96WRVh0v1p6lKvcvo9+uJsQOjkrKlVYDuDwgYt9pyFLKZBIhVa5k8+TakHnC0F qtzRstNqWMK9eexq/Cb8rQUVtWRPiPyrATVkVP2nBSb6L3PuuZ2oCgPdSyuULGBgYL5e C1hQ== X-Gm-Message-State: AOAM531mdw7GGjs51GBfkJ9bcM1A+ufh6IelnwRD8FrhL2nGwTzMjkNy aOQmf3U8aa1mZisz8ZxX8nZ0jLeoaOqbMw== X-Received: by 2002:a19:cc10:: with SMTP id c16mr7439636lfg.43.1608593628220; Mon, 21 Dec 2020 15:33:48 -0800 (PST) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com. [209.85.167.51]) by smtp.gmail.com with ESMTPSA id l21sm2484892lja.35.2020.12.21.15.33.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Dec 2020 15:33:47 -0800 (PST) Received: by mail-lf1-f51.google.com with SMTP id a12so27719004lfl.6 for ; Mon, 21 Dec 2020 15:33:46 -0800 (PST) X-Received: by 2002:a05:6512:338f:: with SMTP id h15mr7192658lfg.40.1608593626453; Mon, 21 Dec 2020 15:33:46 -0800 (PST) MIME-Version: 1.0 References: <20201221172711.GE6640@xz-x1> <76B4F49B-ED61-47EA-9BE4-7F17A26B610D@gmail.com> <9E301C7C-882A-4E0F-8D6D-1170E792065A@gmail.com> <1FCC8F93-FF29-44D3-A73A-DF943D056680@gmail.com> <20201221223041.GL6640@xz-x1> In-Reply-To: From: Linus Torvalds Date: Mon, 21 Dec 2020 15:33:30 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm/userfaultfd: fix memory corruption due to writeprotect To: Yu Zhao Cc: Peter Xu , Nadav Amit , Andrea Arcangeli , linux-mm , lkml , Pavel Emelyanov , Mike Kravetz , Mike Rapoport , stable , Minchan Kim , Andy Lutomirski , Will Deacon , Peter Zijlstra Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 21, 2020 at 3:12 PM Yu Zhao wrote: > > I can't say I disagree with you but the man has made the call and I > think we should just move on. "The man" can always be convinced by numbers. So if somebody comes up with an alternate patch, and explains it, and shows that it is better - go for it. I just think that if mprotect() can take the mmap lock for writing, then userfaultfd sure as hell can. What odd load does people have where userfaultfd is more important than mprotect? So as far as the man is concerned, I think "just fix userfaultfd" is simply the default obvious operation. Not necessarily a final endpoint. Linus