mbox series

[0/2] Create io_uring fd with ephemeral inode

Message ID 20210519113058.1979817-1-memxor@gmail.com (mailing list archive)
Headers show
Series Create io_uring fd with ephemeral inode | expand

Message

Kumar Kartikeya Dwivedi May 19, 2021, 11:30 a.m. UTC
This set converts io_uring to use secure anon_inodes (with a newly allocated
non-S_PRIVATE inode) for each individual instance. In addition to allowing LSM
modules to enforce policy using the inode context, it also enables
checkpoint/restore usecases by allowing mapping the VMA to the open fd in a
task. Offset is already available to determine rings mapped per region, so this
was the only missing piece in establishing region <-> io_uring instance mapping.

LSM tie up has been left out of this set for now.

Kumar Kartikeya Dwivedi (2):
  fs: anon_inodes: export anon_inode_getfile_secure helper
  fs: io_uring: convert to use anon_inode_getfile_secure

 fs/anon_inodes.c            | 9 +++++++++
 fs/io_uring.c               | 4 ++--
 include/linux/anon_inodes.h | 4 ++++
 3 files changed, 15 insertions(+), 2 deletions(-)

Comments

Paul Moore May 19, 2021, 3:18 p.m. UTC | #1
On Wed, May 19, 2021 at 7:37 AM Kumar Kartikeya Dwivedi
<memxor@gmail.com> wrote:
>
> This set converts io_uring to use secure anon_inodes (with a newly allocated
> non-S_PRIVATE inode) for each individual instance. In addition to allowing LSM
> modules to enforce policy using the inode context, it also enables
> checkpoint/restore usecases by allowing mapping the VMA to the open fd in a
> task. Offset is already available to determine rings mapped per region, so this
> was the only missing piece in establishing region <-> io_uring instance mapping.
>
> LSM tie up has been left out of this set for now.

This brings to light something I have been trying to resolve for a
little while now, but I have been finding it difficult to find the
necessary time due to competing priorities at work and in my personal
time.  While the patches in this patchset are a necessary dependency,
there are other issues which remain unresolved but which are now
public (although the problems were not buried very far in the first
place).  Further complicating things on my end is that the system with
my current work-in-progress patchset was taken offline two days ago
and my office is under renovations :/

Give me a day or two to get the patches off that system and I'll post
them here and we can start the process of kicking around solutions
that work for everyone.