public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium•org>
To: Linus Torvalds <torvalds@linux-foundation•org>
Cc: Mark Rutland <mark.rutland@arm•com>,
	linux-ia64@vger•kernel.org, David Hildenbrand <david@redhat•com>,
	Peter Zijlstra <peterz@infradead•org>,
	Catalin Marinas <catalin.marinas@arm•com>,
	Tetsuo Handa <penguin-kernel@i-love•sakura.ne.jp>,
	Dave Hansen <dave.hansen@linux•intel.com>,
	dri-devel@lists•freedesktop.org, linux-mips@vger•kernel.org,
	linux-mm@kvack•org, Will Deacon <will@kernel•org>,
	Nadav Amit <namit@vmware•com>,
	linux-kselftest@vger•kernel.org, "H. Peter Anvin" <hpa@zytor•com>,
	sparclinux@vger•kernel.org, Shuah Khan <shuah@kernel•org>,
	Anton Ivanov <anton.ivanov@cambridgegreys•com>,
	Andrea Arcangeli <aarcange@redhat•com>,
	linux-samsung-soc@vger•kernel.org,
	Paul Moore <paul@paul-moore•com>,
	linux-rdma@vger•kernel.org, David Airlie <airlied@gmail•com>,
	x86@kernel•org, Hugh Dickins <hughd@google•com>,
	James Morris <jmorris@namei•org>,
	Matthew Wilcox <willy@infradead•org>,
	Christoph Hellwig <hch@infradead•org>,
	Jason Gunthorpe <jgg@ziepe•ca>, Ingo Molnar <mingo@redhat•com>,
	Vla stimil Babka <vbabka@suse•cz>,
	Matt Turner <mattst88@gmail•com>,
	Kentaro Takeda <takedakn@nttdata•co.jp>,
	linux-media@vger•kernel.org, Arnd Bergmann <arnd@arndb•de>,
	John Hubbard <jhubbard@nvidia•com>,
	linux-um@lists•infradead.org, etnaviv@lists•freedesktop.org,
	Nicholas Piggin <npiggin@gmail•com>,
	Richard Weinberger <richard@nod•at>,
	Alex Williamson <alex.williamson@redhat•com>,
	Ivan Kokshaysky <ink@jurassic•park.msu.ru>,
	Peter Xu <peterx@redhat•com>,
	Muchun Song <songmuchun@bytedance•com>,
	Namhyung Kim <namhyung@kernel•org>,
	Thomas Gleixner <tglx@linutronix•de>,
	Richard Henderson <richard.henderson@linaro•org>,
	Arnaldo Carvalho de Melo <acme@kernel•org>,
	Oleg Nesterov <oleg@redhat•com>,
	linux-arm-kernel@lists•infradead.org,
	"Serge E. Hallyn" <serge@hallyn•com>,
	Thomas Bogendoerfer <tsbogend@alpha•franken.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
	Oded Gabbay <ogabbay@kernel•org>,
	linux-kernel@vger•kernel.org,
	Alexander Shishkin <alexander.shishkin@linux•intel.com>,
	Alex ander Viro <viro@zeniv•linux.org.uk>,
	linux-perf-users@vger•kernel.org,
	Johannes Berg <johannes@sipsolutions•net>,
	linux-security-module@vger•kernel.org,
	Eric Biederman <ebiederm@xmission•com>,
	Jiri Olsa <jolsa@kernel•org>,
	linux-alpha@vger•kernel.org, linux-fsdevel@vger•kernel.org,
	Borislav Petkov <bp@alien8•de>,
	Andrew Morton <akpm@linux-foundation•org>,
	Lucas Stach <l.stach@pengutronix•de>,
	linuxppc-dev@lists•ozlabs.org,
	"David S. Miller" <davem@davemloft•net>,
	Mike Kravetz <mike.kravetz@oracle•com>
Subject: Re: [PATCH mm-unstable v1 20/20] mm: rename FOLL_FORCE to FOLL_PTRACE
Date: Thu, 17 Nov 2022 16:31:24 -0800	[thread overview]
Message-ID: <202211171630.8EABF5EDD@keescook> (raw)
In-Reply-To: <CAHk-=wjykbz-4xVTWF7vkvGJnFoTSXNVeMzfsXaLnGm3CRd8rQ@mail.gmail.com>

On Thu, Nov 17, 2022 at 03:20:01PM -0800, Linus Torvalds wrote:
> On Thu, Nov 17, 2022 at 2:58 PM Kees Cook <keescook@chromium•org> 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

  reply	other threads:[~2022-11-18  3:28 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 10:26 [PATCH mm-unstable v1 00/20] mm/gup: remove FOLL_FORCE usage from drivers (reliable R/O long-term pinning) David Hildenbrand
2022-11-16 10:26 ` [PATCH mm-unstable v1 01/20] selftests/vm: anon_cow: prepare for non-anonymous COW tests David Hildenbrand
2022-11-18 16:20   ` Vlastimil Babka
2022-11-16 10:26 ` [PATCH mm-unstable v1 02/20] selftests/vm: cow: basic COW tests for non-anonymous pages David Hildenbrand
2022-11-16 10:26 ` [PATCH mm-unstable v1 03/20] selftests/vm: cow: R/O long-term pinning reliability tests for non-anon pages David Hildenbrand
2022-11-16 10:26 ` [PATCH mm-unstable v1 04/20] mm: add early FAULT_FLAG_UNSHARE consistency checks David Hildenbrand
2022-11-18 16:45   ` Vlastimil Babka
2022-11-16 10:26 ` [PATCH mm-unstable v1 05/20] mm: add early FAULT_FLAG_WRITE " David Hildenbrand
2022-11-18 17:03   ` Vlastimil Babka
2022-11-16 10:26 ` [PATCH mm-unstable v1 06/20] mm: rework handling in do_wp_page() based on private vs. shared mappings David Hildenbrand
2022-11-22 14:20   ` Vlastimil Babka
2022-11-16 10:26 ` [PATCH mm-unstable v1 07/20] mm: don't call vm_ops->huge_fault() in wp_huge_pmd()/wp_huge_pud() for private mappings David Hildenbrand
2022-11-22 14:50   ` Vlastimil Babka
2022-11-16 10:26 ` [PATCH mm-unstable v1 08/20] mm: extend FAULT_FLAG_UNSHARE support to anything in a COW mapping David Hildenbrand
2022-11-22 15:35   ` Vlastimil Babka
2022-11-16 10:26 ` [PATCH mm-unstable v1 09/20] mm/gup: reliable R/O long-term pinning in COW mappings David Hildenbrand
2022-11-16 10:42   ` Daniel Vetter
2022-11-22 16:29   ` Vlastimil Babka
2022-11-24  1:29   ` John Hubbard
2022-11-16 10:26 ` [PATCH mm-unstable v1 10/20] RDMA/umem: remove FOLL_FORCE usage David Hildenbrand
2022-11-17  0:45   ` Jason Gunthorpe
2022-11-16 10:26 ` [PATCH mm-unstable v1 11/20] RDMA/usnic: " David Hildenbrand
2022-11-17  0:45   ` Jason Gunthorpe
2022-11-16 10:26 ` [PATCH mm-unstable v1 12/20] RDMA/siw: " David Hildenbrand
2022-11-17  0:46   ` Jason Gunthorpe
2022-11-16 10:26 ` [PATCH mm-unstable v1 13/20] media: videobuf-dma-sg: " David Hildenbrand
2022-11-16 10:48   ` Daniel Vetter
2022-11-23 13:17   ` Hans Verkuil
2022-11-16 10:26 ` [PATCH mm-unstable v1 14/20] drm/etnaviv: " David Hildenbrand
2022-11-16 10:49   ` Daniel Vetter
2022-11-16 10:26 ` [PATCH mm-unstable v1 15/20] media: pci/ivtv: " David Hildenbrand
2022-11-23 13:18   ` Hans Verkuil
2022-11-16 10:26 ` [PATCH mm-unstable v1 16/20] mm/frame-vector: " David Hildenbrand
2022-11-16 10:50   ` Daniel Vetter
2022-11-23 13:26   ` Hans Verkuil
2022-11-23 14:28     ` Hans Verkuil
2022-11-27 10:35   ` David Hildenbrand
2022-11-28  8:17     ` Hans Verkuil
2022-11-28  8:18       ` David Hildenbrand
2022-11-28  8:26         ` Hans Verkuil
2022-11-28  8:57         ` Tomasz Figa
2022-11-28 22:59         ` Andrew Morton
2022-11-29  8:48           ` David Hildenbrand
2022-11-29  9:08             ` Hans Verkuil
2022-11-29  9:15               ` David Hildenbrand
2022-11-16 10:26 ` [PATCH mm-unstable v1 17/20] drm/exynos: " David Hildenbrand
2022-11-16 10:50   ` Daniel Vetter
2022-11-16 10:26 ` [PATCH mm-unstable v1 18/20] RDMA/hw/qib/qib_user_pages: " David Hildenbrand
2022-11-16 10:26 ` [PATCH mm-unstable v1 19/20] habanalabs: " David Hildenbrand
2022-11-16 10:26 ` [PATCH mm-unstable v1 20/20] mm: rename FOLL_FORCE to FOLL_PTRACE David Hildenbrand
2022-11-16 18:16   ` Linus Torvalds
2022-11-16 18:53     ` David Hildenbrand
2022-11-17 22:58     ` Kees Cook
2022-11-17 23:20       ` Linus Torvalds
2022-11-18  0:31         ` Kees Cook [this message]
2022-11-18 11:09     ` Peter Zijlstra
2022-11-18 22:29       ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202211171630.8EABF5EDD@keescook \
    --to=keescook@chromium$(echo .)org \
    --cc=aarcange@redhat$(echo .)com \
    --cc=acme@kernel$(echo .)org \
    --cc=airlied@gmail$(echo .)com \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=alex.williamson@redhat$(echo .)com \
    --cc=alexander.shishkin@linux$(echo .)intel.com \
    --cc=anton.ivanov@cambridgegreys$(echo .)com \
    --cc=arnd@arndb$(echo .)de \
    --cc=bp@alien8$(echo .)de \
    --cc=catalin.marinas@arm$(echo .)com \
    --cc=dave.hansen@linux$(echo .)intel.com \
    --cc=davem@davemloft$(echo .)net \
    --cc=david@redhat$(echo .)com \
    --cc=dri-devel@lists$(echo .)freedesktop.org \
    --cc=ebiederm@xmission$(echo .)com \
    --cc=etnaviv@lists$(echo .)freedesktop.org \
    --cc=gregkh@linuxfoundation$(echo .)org \
    --cc=hch@infradead$(echo .)org \
    --cc=hpa@zytor$(echo .)com \
    --cc=hughd@google$(echo .)com \
    --cc=ink@jurassic$(echo .)park.msu.ru \
    --cc=jgg@ziepe$(echo .)ca \
    --cc=jhubbard@nvidia$(echo .)com \
    --cc=jmorris@namei$(echo .)org \
    --cc=johannes@sipsolutions$(echo .)net \
    --cc=jolsa@kernel$(echo .)org \
    --cc=l.stach@pengutronix$(echo .)de \
    --cc=linux-alpha@vger$(echo .)kernel.org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-fsdevel@vger$(echo .)kernel.org \
    --cc=linux-ia64@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-kselftest@vger$(echo .)kernel.org \
    --cc=linux-media@vger$(echo .)kernel.org \
    --cc=linux-mips@vger$(echo .)kernel.org \
    --cc=linux-mm@kvack$(echo .)org \
    --cc=linux-perf-users@vger$(echo .)kernel.org \
    --cc=linux-rdma@vger$(echo .)kernel.org \
    --cc=linux-samsung-soc@vger$(echo .)kernel.org \
    --cc=linux-security-module@vger$(echo .)kernel.org \
    --cc=linux-um@lists$(echo .)infradead.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mark.rutland@arm$(echo .)com \
    --cc=mattst88@gmail$(echo .)com \
    --cc=mike.kravetz@oracle$(echo .)com \
    --cc=mingo@redhat$(echo .)com \
    --cc=namhyung@kernel$(echo .)org \
    --cc=namit@vmware$(echo .)com \
    --cc=npiggin@gmail$(echo .)com \
    --cc=ogabbay@kernel$(echo .)org \
    --cc=oleg@redhat$(echo .)com \
    --cc=paul@paul-moore$(echo .)com \
    --cc=penguin-kernel@i-love$(echo .)sakura.ne.jp \
    --cc=peterx@redhat$(echo .)com \
    --cc=peterz@infradead$(echo .)org \
    --cc=richard.henderson@linaro$(echo .)org \
    --cc=richard@nod$(echo .)at \
    --cc=serge@hallyn$(echo .)com \
    --cc=shuah@kernel$(echo .)org \
    --cc=songmuchun@bytedance$(echo .)com \
    --cc=sparclinux@vger$(echo .)kernel.org \
    --cc=takedakn@nttdata$(echo .)co.jp \
    --cc=tglx@linutronix$(echo .)de \
    --cc=torvalds@linux-foundation$(echo .)org \
    --cc=tsbogend@alpha$(echo .)franken.de \
    --cc=vbabka@suse$(echo .)cz \
    --cc=viro@zeniv$(echo .)linux.org.uk \
    --cc=will@kernel$(echo .)org \
    --cc=willy@infradead$(echo .)org \
    --cc=x86@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox