From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58A51C4167D for ; Fri, 18 Nov 2022 00:31:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F82910E6C9; Fri, 18 Nov 2022 00:31:30 +0000 (UTC) Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1B7A610E6C9 for ; Fri, 18 Nov 2022 00:31:26 +0000 (UTC) Received: by mail-pj1-x1029.google.com with SMTP id w4-20020a17090ac98400b002186f5d7a4cso3341290pjt.0 for ; Thu, 17 Nov 2022 16:31:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=SdXW0qNT9EJ55g7ZecMibSPRKy2hZHqw3Yh8nMlwERE=; b=aU25zccRjTs3wP43k0MIJn4DgVbsnZCNuzNnI2CpXWYIZxXulCGxIQevzOUHHZBnNX P9dqjL6CLaVk8Gd/8VV9yHkQnYw6wZLIF25d9n4/Hz+qw11dfo4C3uVe8ugX4akyWpVq 2j/LOKCC5xRDK3aE2eqqxuB+wZP/Rdy2IY2yY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SdXW0qNT9EJ55g7ZecMibSPRKy2hZHqw3Yh8nMlwERE=; b=n1e7kHc26vojIt5r6Sxu6ZlB4NiNAU+8HcfXtEHLoHKS/tz0C41W+Dp9INMiLg3wuf vEgkxeTemlhU/BR5jC+DiqA9zBiVpSpINlB6NGPNNG0voLCwQy7v9DI5DAO2F7mBIGs5 oo1CxOrK/xwdl/ry+FQzZcc3WkxAF+3Yock2sO799Y17XQgYty2dA3UDLuC+06u+25dq cwqB88ffOaM4bo21wA4W3w16IVSl2cwZ/RDlZHrUcV0dRniF5etEHmr2T54nLf8ev8g3 3dkehCHoOWfFnTrqzzvptpls9pu2nwMxDivru3VvrhT7N1EA/xeFsfgkYS62rNd6Ov55 Is+w== X-Gm-Message-State: ANoB5pl+YN8dw0GV1kM2HDXJXjAalmxbPLU9fTrfJjoTnDqGRkHTDLVL g7Oq17jzEEVavawAKcZ4QaJziw== X-Google-Smtp-Source: AA0mqf5v9a25yS9udq+0hjAH7K4QJBzDVw1q+3i4WQlXa259MMuJPBokO+S42xwRehI9PQV15PiKuw== X-Received: by 2002:a17:902:a508:b0:17c:7aaa:c67d with SMTP id s8-20020a170902a50800b0017c7aaac67dmr4961099plq.171.1668731485478; Thu, 17 Nov 2022 16:31:25 -0800 (PST) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id u11-20020a17090a1d4b00b0020aacde1964sm4046602pju.32.2022.11.17.16.31.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 16:31:25 -0800 (PST) Date: Thu, 17 Nov 2022 16:31:24 -0800 From: Kees Cook To: Linus Torvalds Subject: Re: [PATCH mm-unstable v1 20/20] mm: rename FOLL_FORCE to FOLL_PTRACE Message-ID: <202211171630.8EABF5EDD@keescook> References: <20221116102659.70287-1-david@redhat.com> <20221116102659.70287-21-david@redhat.com> <202211171439.CDE720EAD@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-ia64@vger.kernel.org, David Hildenbrand , Peter Zijlstra , Catalin Marinas , Tetsuo Handa , Dave Hansen , dri-devel@lists.freedesktop.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, Will Deacon , Nadav Amit , Michael Ellerman , linux-kselftest@vger.kernel.org, "H. Peter Anvin" , sparclinux@vger.kernel.org, Shuah Khan , Anton Ivanov , Andrea Arcangeli , linux-samsung-soc@vger.kernel.org, Paul Moore , linux-rdma@vger.kernel.org, x86@kernel.org, Hugh Dickins , James Morris , Matthew Wilcox , Christoph Hellwig , Jason Gunthorpe , Ingo Molnar , Vlastimil Babka , Matt Turner , Kentaro Takeda , linux-media@vger.kernel.org, Arnd Bergmann , John Hubbard , linux-um@lists.infradead.org, etnaviv@lists.freedesktop.org, Nicholas Piggin , Richard Weinberger , Alex Williamson , Ivan Kokshaysky , Peter Xu , Muchun Song , Namhyung Kim , Thomas Gleixner , Richard Henderson , Arnaldo Carvalho de Melo , Oleg Nesterov , linux-arm-kernel@lists.infradead.org, "Serge E. Hallyn" , Thomas Bogendoerfer , Christophe Leroy , Greg Kroah-Hartman , Oded Gabbay , linux-kernel@vger.kernel.org, Alexander Shishkin , Alexander Viro , linux-perf-users@vger.kernel.org, Johannes Berg , linux-security-module@vger.kernel.org, Eric Biederman , Jiri Olsa , linux-alpha@vger.kernel.org, linux-fsdevel@vger.kernel.org, Borislav Petkov , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" , Mike Kravetz Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Nov 17, 2022 at 03:20:01PM -0800, Linus Torvalds wrote: > On Thu, Nov 17, 2022 at 2:58 PM Kees Cook wrote: > > > > Oh, er, why does get_arg_page() even need FOLL_FORCE? This is writing the > > new stack contents to the nascent brpm->vma, which was newly allocated > > with VM_STACK_FLAGS, which an arch can override, but they all appear to include > > VM_WRITE | VM_MAYWRITE. > > Yeah, it does seem entirely superfluous. > > It's been there since the very beginning (although in that original > commit b6a2fea39318 it was there as a '1' to the 'force' argument to > get_user_pages()). > > I *think* it can be just removed. But as long as it exists, it should > most definitely not be renamed to FOLL_PTRACE. > > There's a slight worry that it currently hides some other setup issue > that makes it matter, since it's been that way so long, but I can't > see what it is. My test system boots happily with it removed. I'll throw it into -next and see if anything melts... -- Kees Cook