linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: David Hildenbrand <david@redhat.com>,
	Lorenzo Stoakes <lstoakes@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>,
	Pavel Begunkov <asml.silence@gmail.com>,
	io-uring@vger.kernel.org, Jason Gunthorpe <jgg@ziepe.ca>,
	John Hubbard <jhubbard@nvidia.com>
Subject: Re: [PATCH v5 4/6] io_uring: rsrc: delegate VMA file-backed check to GUP
Date: Tue, 16 May 2023 07:19:52 -0600	[thread overview]
Message-ID: <a0e99a59-d304-d26e-c5f8-d8ef1bef64ff@kernel.dk> (raw)
In-Reply-To: <40ed22bb-53e3-ddc2-45ca-f0e763f26242@redhat.com>

On 5/16/23 2:25?AM, David Hildenbrand wrote:
> On 15.05.23 21:55, Jens Axboe wrote:
>> On 5/14/23 3:26?PM, Lorenzo Stoakes wrote:
>>> Now that the GUP explicitly checks FOLL_LONGTERM pin_user_pages() for
>>> broken file-backed mappings in "mm/gup: disallow FOLL_LONGTERM GUP-nonfast
>>> writing to file-backed mappings", there is no need to explicitly check VMAs
>>> for this condition, so simply remove this logic from io_uring altogether.
>>
>> Don't have the prerequisite patch handy (not in mainline yet), but if it
>> just moves the check, then:
>>
>> Reviewed-by: Jens Axboe <axboe@kernel.dk>
>>
> 
> Jens, please see my note regarding iouring:
> 
> https://lore.kernel.org/bpf/6e96358e-bcb5-cc36-18c3-ec5153867b9a@redhat.com/
> 
> With this patch, MAP_PRIVATE will work as expected (2), but there will
> be a change in return code handling (1) that we might have to document
> in the man page.

I think documenting that newer kernels will return -EFAULT rather than
-EOPNOTSUPP should be fine. It's not a new failure case, just a
different error value for an already failing case. Should be fine with
just a doc update. Will do that now.

-- 
Jens Axboe



  reply	other threads:[~2023-05-16 13:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-14 21:26 [PATCH v5 0/6] remove the vmas parameter from GUP APIs Lorenzo Stoakes
2023-05-14 21:26 ` [PATCH v5 1/6] mm/gup: remove unused vmas parameter from get_user_pages() Lorenzo Stoakes
2023-05-15 11:48   ` Christoph Hellwig
2023-05-15 19:07   ` Sean Christopherson
2023-05-16 10:21     ` David Hildenbrand
2023-05-16 14:30       ` Sean Christopherson
2023-05-16 14:35         ` David Hildenbrand
2023-05-16 17:03           ` John Hubbard
2023-05-14 21:26 ` [PATCH v5 2/6] mm/gup: remove unused vmas parameter from pin_user_pages_remote() Lorenzo Stoakes
2023-05-15 11:48   ` Christoph Hellwig
2023-05-14 21:26 ` [PATCH v5 3/6] mm/gup: remove vmas parameter from get_user_pages_remote() Lorenzo Stoakes
2023-05-15 11:49   ` Christoph Hellwig
2023-05-16  9:49   ` Anders Roxell
2023-05-16 18:37     ` Lorenzo Stoakes
2023-05-16 22:02     ` Andrew Morton
2023-05-14 21:26 ` [PATCH v5 4/6] io_uring: rsrc: delegate VMA file-backed check to GUP Lorenzo Stoakes
2023-05-15 11:50   ` Christoph Hellwig
2023-05-15 19:55   ` Jens Axboe
2023-05-16  8:25     ` David Hildenbrand
2023-05-16 13:19       ` Jens Axboe [this message]
2023-05-16  8:28   ` David Hildenbrand
2023-05-14 21:26 ` [PATCH v5 5/6] mm/gup: remove vmas parameter from pin_user_pages() Lorenzo Stoakes
2023-05-15 11:50   ` Christoph Hellwig
2023-05-17 13:04   ` Sakari Ailus
2023-05-14 21:27 ` [PATCH v5 6/6] mm/gup: remove vmas array from internal GUP functions Lorenzo Stoakes
2023-05-15 11:50   ` Christoph Hellwig
2023-05-15 19:56   ` John Hubbard

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=a0e99a59-d304-d26e-c5f8-d8ef1bef64ff@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=akpm@linux-foundation.org \
    --cc=asml.silence@gmail.com \
    --cc=david@redhat.com \
    --cc=io-uring@vger.kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lstoakes@gmail.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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