linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	Jens Axboe <axboe@kernel.dk>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: Memory keys and io_uring.
Date: Thu, 11 Feb 2021 23:30:41 -0800	[thread overview]
Message-ID: <1cbf2f0b-7833-8a6c-e371-f648ebcb94a6@intel.com> (raw)
In-Reply-To: <877dndzs8c.fsf@linux.ibm.com>

On 2/11/21 10:59 PM, Aneesh Kumar K.V wrote:
> A read syscall do fail with EFAULT. But we allow read via io_uring
> syscalls. Is that ok? 

In short, yes.

As much as I'd like to apply pkey permissions to all accesses, when we
don't have the CPU registers around, we don't have a choice: we have to
let the access through.

The same basic thing is done for accesses via the IOMMU and for things
like ptrace() where the ptracer's registers don't have anything to do
with the ptracee's address space.

We could *probably* be a bit pickier at io_uring_submit() time.  But,
I'm not sure it's worth it.


  reply	other threads:[~2021-02-12  7:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12  6:59 Aneesh Kumar K.V
2021-02-12  7:30 ` Dave Hansen [this message]
2021-02-12 15:15 ` Jens Axboe
2021-02-12 15:33   ` Aneesh Kumar K.V
2021-02-12 15:37     ` Jens Axboe

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=1cbf2f0b-7833-8a6c-e371-f648ebcb94a6@intel.com \
    --to=dave.hansen@intel.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mpe@ellerman.id.au \
    /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