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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 17 Sep 2020 01:54:41 +0100
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Eric Biggers <ebiggers@...nel.org>
Cc:     linux-fsdevel@...r.kernel.org, Daeho Jeong <daeho43@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] vfs: don't unnecessarily clone write access for
 writable fds

On Tue, Sep 15, 2020 at 08:59:14PM -0700, Eric Biggers wrote:
> On Mon, Jun 29, 2020 at 09:50:14AM -0700, Eric Biggers wrote:
> > On Thu, Jun 11, 2020 at 09:05:34AM -0700, Eric Biggers wrote:
> > > From: Eric Biggers <ebiggers@...gle.com>
> > > 
> > > There's no need for mnt_want_write_file() to increment mnt_writers when
> > > the file is already open for writing, provided that
> > > mnt_drop_write_file() is changed to conditionally decrement it.
> > > 
> > > We seem to have ended up in the current situation because
> > > mnt_want_write_file() used to be paired with mnt_drop_write(), due to
> > > mnt_drop_write_file() not having been added yet.  So originally
> > > mnt_want_write_file() had to always increment mnt_writers.
> > > 
> > > But later mnt_drop_write_file() was added, and all callers of
> > > mnt_want_write_file() were paired with it.  This makes the compatibility
> > > between mnt_want_write_file() and mnt_drop_write() no longer necessary.

Umm...  That really needs to be put into D/f/porting; this kind of rule changes
(from "it used to work both ways" to "things quietly break if you use the
old variant") should come with explicit statement in there.

I'm certainly fine with unexporting mnt_clone_write() and making the damn
thing static, but as for the rest I would put an explicit "don't pair
mnt_drop_write() with mnt_want_write_file()" and wait for a cycle.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ