Re: [PATCH v15 3/9] fuse: implement ioctls to manage backing files

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

 



On 2/28/24 4:28 AM, Amir Goldstein wrote:
> On Wed, Feb 28, 2024 at 1:14?PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>>
>> On Wed, 28 Feb 2024 at 12:08, Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>>
>>> I don't think so, because it will allow unprivileged user to exceed its
>>> nested rlimits and hide open files that are invisble to lsof.
>>
>> How does io_uring deal with the similar problem of "fixed files"?
>>
> 
> Good question.
> 
> Jens, Chritian,
> Are fixed files visible to lsof?

lsof won't show them, but you can read the fdinfo of the io_uring fd to
see them. Would probably be possible to make lsof find and show them
too, but haven't looked into that.

> Do they have to remain open in the files table of process that set them
> in addition to being registered as fixed files?

No, in fact they never have to be there in the first place. You can open
a normal file and then register it, now it's in both. Then you can close
the normal fd, and now it's not in the normal process file table
anymore, just in the direct list.

Or you can instantiate it as a direct descriptor to begin with, and then
it'll never have been in the normal file table.

> Do they get accounted in rlimit? of which user?

The fixed file table is limited in size by RLIMIT_NOFILE by the user
that registers it.

-- 
Jens Axboe





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

  Powered by Linux