lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260206081518.GZ3183987@ZenIV>
Date: Fri, 6 Feb 2026 08:15:18 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: Waiman Long <llong@...hat.com>
Cc: Paul Moore <paul@...l-moore.com>, Eric Paris <eparis@...hat.com>,
	Christian Brauner <brauner@...nel.org>,
	linux-kernel@...r.kernel.org, audit@...r.kernel.org,
	Richard Guy Briggs <rgb@...hat.com>,
	Ricardo Robaina <rrobaina@...hat.com>
Subject: Re: [PATCH v2] audit: Avoid excessive dput/dget in audit_context
 setup and reset paths

On Thu, Feb 05, 2026 at 11:53:51PM +0000, Al Viro wrote:
> On Wed, Feb 04, 2026 at 11:45:17PM -0500, Waiman Long wrote:
> 
> > @@ -70,6 +74,8 @@ void chroot_fs_refs(const struct path *old_root, const
> > struct>
> >                                 count++;
> >                                 path_get(new_root);
> >                         }
> > +                       count += fs->pwd_xrefs;
> > +                       fs->pwd_xrefs = 0;
> >                         write_sequnlock(&fs->seq);
> 
> Nope - you only need that for threads that have ->pwd equal to old_root.
> Incidentally, I'd forgotten about that sucker - it kills the idea of
> fdget-like tricks dead, more's the pity.  Third-party modification of
> task->fs->pwd (under task->lock and task->fs->seq), possible even with
> task->fs->users == 1.
> 
> FWIW, I'm going through the fs_struct uses at the moment; will post
> whatever I get when I go down (or earlier, in the unlikely case it doesn't
> spill to tomorrow morning), will keep posting incremental followups
> until the documentation is done.  I'm sick and tired of half-finished
> docs - let's see if I can push through that one this way ;-/
> 

All right, I'm going down - it's 3am here; the current notes are at
http://ftp.linux.org.uk/people/viro/fs_struct, will update when I get
up tomorrow^Wtoday.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ