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: <YwmUC7UNvNFdLTlc@ZenIV>
Date:   Sat, 27 Aug 2022 04:48:27 +0100
From:   Al Viro <viro@...iv.linux.org.uk>
To:     NeilBrown <neilb@...e.de>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Daire Byrne <daire@...g.com>,
        Trond Myklebust <trond.myklebust@...merspace.com>,
        Chuck Lever <chuck.lever@...cle.com>,
        Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
        linux-fsdevel@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 03/10] VFS: move want_write checks into
 lookup_hash_update()

On Fri, Aug 26, 2022 at 12:10:43PM +1000, NeilBrown wrote:
> mnt_want_write() is always called before lookup_hash_update(), so
> we can simplify the code by moving the call into that function.
> 
> If lookup_hash_update() succeeds, it now will have claimed the
> want_write lock.  If it fails, the want_write lock isn't held.
> 
> To allow this, lookup_hash_update() now receives a 'struct path *'
> instead of 'struct dentry *'
> 
> Note that when creating a name, any error from mnt_want_write() does not
> get reported unless there is no other error.  For unlink/rmdir though,
> an error from mnt_want_write() is immediately fatal - overriding ENOENT
> for example.  This behaviour seems strange, but this patch is careful to
> preserve it.

Would be a nice idea, if not for the mess with LOOKUP_SILLY_RENAME later
in the series...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ