Re: Memory keys and io_uring.

2021-02-12 Thread Jens Axboe
On 2/12/21 8:33 AM, Aneesh Kumar K.V wrote: > On 2/12/21 8:45 PM, Jens Axboe wrote: >> On 2/11/21 11:59 PM, Aneesh Kumar K.V wrote: >>> >>> Hi, >>> >>> I am trying to estabilish the behaviour we should expect when passing a >>> buffer with memory keys attached to io_uring syscalls. As show in the

Re: Memory keys and io_uring.

2021-02-12 Thread Aneesh Kumar K.V
On 2/12/21 8:45 PM, Jens Axboe wrote: On 2/11/21 11:59 PM, Aneesh Kumar K.V wrote: Hi, I am trying to estabilish the behaviour we should expect when passing a buffer with memory keys attached to io_uring syscalls. As show in the blow test /* * gcc -Wall -O2 -D_GNU_SOURCE -o pkey_uring pkey

Re: Memory keys and io_uring.

2021-02-12 Thread Jens Axboe
On 2/11/21 11:59 PM, Aneesh Kumar K.V wrote: > > Hi, > > I am trying to estabilish the behaviour we should expect when passing a > buffer with memory keys attached to io_uring syscalls. As show in the > blow test > > /* > * gcc -Wall -O2 -D_GNU_SOURCE -o pkey_uring pkey_uring.c -luring > */ >

Re: Memory keys and io_uring.

2021-02-11 Thread Dave Hansen
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