Re: [PATCH 3/6] io_uring: add support for IORING_OP_OPENAT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 08.01.20 um 17:20 schrieb Jens Axboe:
> On 1/8/20 6:05 AM, Stefan Metzmacher wrote:
>> Hi Jens,
>>
>>> This works just like openat(2), except it can be performed async. For
>>> the normal case of a non-blocking path lookup this will complete
>>> inline. If we have to do IO to perform the open, it'll be done from
>>> async context.
>>
>> Did you already thought about the credentials being used for the async
>> open? The application could call setuid() and similar calls to change
>> the credentials of the userspace process/threads. In order for
>> applications like samba to use this async openat, it would be required
>> to specify the credentials for each open, as we have to multiplex
>> requests from multiple user sessions in one process.
>>
>> This applies to non-fd based syscall. Also for an async connect
>> to a unix domain socket.
>>
>> Do you have comments on this?
> 
> The open works like any of the other commands, it inherits the
> credentials that the ring was setup with. Same with the memory context,
> file table, etc. There's currently no way to have multiple personalities
> within a single ring.

Ah, it's user = get_uid(current_user()); and ctx->user = user in
io_uring_create(), right?

> Sounds like you'd like an option for having multiple personalities
> within a single ring?

I'm not sure anymore, I wasn't aware of the above.

> I think it would be better to have a ring per personality instead.

We could do that. I guess we could use per user rings for path based
operations and a single ring for fd based operations.

> One thing we could do to make this more lightweight
> is to have rings that are associated, so that we can share a lot of the
> backend processing between them.

My current idea is to use the ring fd and pass it to our main epoll loop.

Can you be more specific about how an api for associated rings could
look like?

Thanks!
metze


Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux