Re: xattr names for unprivileged stacking?

Al Viro
2020-08-29T18:04:58Z

On Sat, Aug 29, 2020 at 07:51:47PM +0200, Miklos Szeredi wrote:
> On Sat, Aug 29, 2020 at 6:14 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > On Sat, Aug 29, 2020 at 05:07:17PM +0100, Matthew Wilcox wrote:
> >
>
> > > > The fact that ADS inodes would not be in the dentry cache and hence
> > > > not visible to pathwalks at all then means that all of the issues
> > > > such as mounting over them, chroot, etc don't exist in the first
> > > > place...
> > >
> > > Wait, you've now switched from "this is dentry cache infrastructure"
> > > to "it should not be in the dentry cache". So I don't understand what
> > > you're arguing for.
> >
> > Bloody wonderful, that. So now we have struct file instances with no dentry
> > associated with them? Which would have to be taken into account all over
> > the place...
>
> It could have a temporary dentry allocated for the lifetime of the
> file and dropped on last dput. I.e. there's a dentry, but no cache.
> Yeah, yeah, d_path() issues, however that one will have to be special
> cased anyway.

d_path() is the least of the problems, actually. Directory tree structure on
those, OTOH, is a serious problem. If you want to have getdents(2) on that
shite, you want an opened descriptor that looks like a directory. And _that_
opens a large can of worms. Because now you have fchdir(2) to cope with,
lookups going through /proc/self/fd/<n>/..., etc., etc.

Al, fully expecting "we'll special-case our way out of everything - how hard
could that be?" in response...