Re: [GIT PULL 05/12 for v7.1] vfs fs_struct
From: Christian Brauner
Date: Tue Apr 14 2026 - 05:52:33 EST
On Mon, Apr 13, 2026 at 12:18:16PM -0700, Linus Torvalds wrote:
> On Fri, 10 Apr 2026 at 08:18, Christian Brauner <brauner@xxxxxxxxxx> wrote:
> >
> > Avoid excessive dput/dget in audit_context setup and reset paths
>
> I really don't like this one, and I'm going to at least delay pulling it.
I don't like it either.
> Because this really feels wrong to me. It feels like a hack. Just
It is. I commented on that explicitly when the series was proposed.
> looking at some of the paths that get modified, we have that
> copy_fs_struct, which does
>
> path_get(&fs->root);
>
> to increment the root, and then the very next line ends up being
>
> get_fs_pwd_pool_locked(old, &fs->pwd);
>
> that copies the pwd very differently.
>
> And the only reason 'pwd' is different is because the audit code
> treats pwd and root differently.
>
> And that, in turn, is because the audit code is just historical and
> broken, and can't deal with chroot environments.
>
> The pwd and root paths are two sides of the same coin, and any code
> that treats them this differently is *wrong*.
>
> So this basically takes a audit mistake, and makes that mistake
> visible to non-audit users.
>
> I absolutely hate it.
>
> I'm going to think about this more, and maybe I'll end up saying "it's
> still ugly, but whatever, I'll pull it anyway".
>
> But right now I'm going "there HAS to be a better way".
>
> And maybe you can convince me this hackery is the right thing, but it
It isn't and I'm not going to try.
> really is rubbing me the wrong way entirely.
I'm sorry I can't offer more than agreement with you right now. The only
reason I considered it was that my appetetite for audit internals is
very very low but tbh that shouldn't have led me to accept the
hackishness. So again, no long-winded argument from me here... I droped
this from the other pr. The CI is still running then I'll resend.