Re: [GIT PULL] vfs pidfd

From: Christian Brauner
Date: Tue Mar 12 2024 - 10:16:11 EST


On Mon, Mar 11, 2024 at 01:05:06PM -0700, Linus Torvalds wrote:
> On Fri, 8 Mar 2024 at 02:14, Christian Brauner <brauner@xxxxxxxxxx> wrote:
> >
> > * Move pidfds from the anonymous inode infrastructure to a tiny
> > pseudo filesystem. This will unblock further work that we weren't able
> > to do simply because of the very justified limitations of anonymous
> > inodes. Moving pidfds to a tiny pseudo filesystem allows for statx on
> > pidfds to become useful for the first time. They can now be compared
> > by inode number which are unique for the system lifetime.
>
> So I obviously pulled this already, but I did have one question - we
> don't make nsfs conditional, and I'm not convinced we should make
> pidfs conditional either.
>
> I think (and *hope*) all the semantic annoyances got sorted out, and I
> don't think there are any realistic size advantages to not enabling
> CONFIG_FS_PID.
>
> Is there some fundamental reason for that config entry to exist?

No, the size of struct pid was the main reason but I don't think it
matters. A side-effect was that we could easily enforce 64bit inode
numbers. But realistically it's trivial enough to workaround. Here's a
patch for what I think is pretty simple appended. Does that work?