io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] io_uring: fix mm use with IORING_OP_{READ,WRITE}
Date: Wed, 5 Feb 2020 09:05:08 -0700	[thread overview]
Message-ID: <c6cc1e97-f306-e3f0-3f7b-9463fdbbc5a5@kernel.dk> (raw)
In-Reply-To: <d9a15d32-a20b-a20f-9ea4-3ac355c15bb2@gmail.com>

On 2/5/20 9:02 AM, Pavel Begunkov wrote:
> On 05/02/2020 18:54, Jens Axboe wrote:
>> On 2/5/20 8:46 AM, Pavel Begunkov wrote:
>>> IORING_OP_{READ,WRITE} need mm to access user buffers, hence
>>> req->has_user check should go for them as well. Move the corresponding
>>> imports past the check.
>>
>> I'd need to double check, but I think the has_user check should just go.
>> The import checks for access anyway, so we'll -EFAULT there if we
>> somehow messed up and didn't acquire the right mm.
>>
> It'd be even better. I have plans to remove it, but I was thinking from a
> different angle.

Let me just confirm it in practice, but it should be fine. Then we can just
kill it.

-- 
Jens Axboe


  reply	other threads:[~2020-02-05 16:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 15:46 [PATCH] io_uring: fix mm use with IORING_OP_{READ,WRITE} Pavel Begunkov
2020-02-05 15:54 ` Jens Axboe
2020-02-05 16:02   ` Pavel Begunkov
2020-02-05 16:05     ` Jens Axboe [this message]
2020-02-05 16:16       ` Jens Axboe
2020-02-05 16:50         ` Pavel Begunkov
2020-02-05 16:52           ` Jens Axboe
2020-02-05 16:59             ` Pavel Begunkov

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=c6cc1e97-f306-e3f0-3f7b-9463fdbbc5a5@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).