Re: [PATCH 0/6] Memory Mapping (VMA) protection using PKU - set 1

From: Jeff Xu
Date: Wed May 24 2023 - 16:16:13 EST


Thanks for bringing this to my attention. Regarding io_uring:
>
> io_uring fundamentally doesn't have the same checks. The kernel side
> work can be done from an asynchronous kernel thread. That kernel thread
> doesn't have a meaningful PKRU value. The register has a value, but
> it's not really related to the userspace threads that are sending it
> requests.
>

I asked the question to the io_uring list [1]. io_uring thread will
respect PKRU of the user thread, async or not, the behavior is the
same as regular syscall. There will be no issue for io_uring, i.e if
it decides to add more memory mapping syscalls to supported cmd in
future.

[1] https://lore.kernel.org/io-uring/CABi2SkUp45HEt7eQ6a47Z7b3LzW=4m3xAakG35os7puCO2dkng@xxxxxxxxxxxxxx/

Thanks.
-Jeff