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] [day] [month] [year] [list]
Message-ID: <204e011a-582f-474a-980c-27c30620b8d7@redhat.com>
Date: Wed, 21 Jan 2026 10:09:29 -0500
From: Waiman Long <llong@...hat.com>
To: Al Viro <viro@...iv.linux.org.uk>, 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 1/2] audit: Quit audit_free_names() early if name list
 empty

On 1/21/26 12:26 AM, Al Viro wrote:
> On Tue, Jan 20, 2026 at 11:08:45PM -0500, Waiman Long wrote:
>> On 1/20/26 10:11 PM, Al Viro wrote:
>>> On Tue, Jan 20, 2026 at 09:35:08PM -0500, Waiman Long wrote:
>>>> Optimize audit_free_names() by quitting early if the name list is empty.
>>>> This eliminates the need to acquire and release the fs_struct spinlock
>>>> in path_put().
>>> Why would path_put() go anywhere need fs_struct spinlock???
>>>
>> path_put() is defined in include/linux/fs_struct.h. It calls
>> read_seq{un}lock_excl(&fs->seq) which, in turn, acquires the releases the
>> spinlock underneath the seqlock_t.
> Really?  Which kernel would that be?  On mainline we have
>
> ; git grep -n -w path_put include/linux/fs_struct.h
> ; $ git grep -C 6 'void path_put\>' fs/namei.c
> fs/namei.c-/**
> fs/namei.c- * path_put - put a reference to a path
> fs/namei.c- * @path: path to put the reference to
> fs/namei.c- *
> fs/namei.c- * Given a path decrement the reference count to the dentry and the vfsmount.
> fs/namei.c- */
> fs/namei.c:void path_put(const struct path *path)
> fs/namei.c-{
> fs/namei.c-     dput(path->dentry);
> fs/namei.c-     mntput(path->mnt);
> fs/namei.c-}
> fs/namei.c-EXPORT_SYMBOL(path_put);
> fs/namei.c-
> ;
>
Sorry, my mistake. I mixed it up with get_fs_pwd(). Will fix the patch.

Cheers,
Longman


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ