lkml.org 
[lkml]   [2019]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 0/5] pid: add pidfd_open()
On Sun, Mar 31, 2019 at 05:18:10PM -0700, Linus Torvalds wrote:
> On Sun, Mar 31, 2019 at 5:09 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > Ugh... Which vfsmount would you have to go with it?
>
> I'd literally just do a lookup of "/proc" in the current root
> directory in the lookup() function for that special pseudo-dentry.
>
> If it's not mounted, or not a /proc filesystem, screw it.
>
> > Except that we never let unattached _directory_ dentries out - if
> > we can't reattach them to the tree, open-by-handle will tell you to
> > take a hike.
>
> Absolutely. Which is why I said it's _conceptually_ similar to the alias lookup.
>
> And I suspect we can even use some of the same practical logic, but
> it's definitely not _exactly_ the same. This thing very much involves
> magic hooking into the lookup() function (but we then have to look up
> the alias not for the path we're looking up, but for the _parent_
> we're looking that path up in, which is very different from the normal
> case).
>
> > It's more than a tiny bit too clever for mine...
>
> Fair enough. The whole "just do the whole lookup at pidfd creation
> time" is certainly a whole lot simpler.

Even just from a pure maintenance perspective this sounds a better to me.

\
 
 \ /
  Last update: 2019-04-01 02:23    [W:0.078 / U:14.124 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site