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]
Date: Wed, 12 Jun 2024 04:14:04 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: NeilBrown <neilb@...e.de>
Cc: Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
	Amir Goldstein <amir73il@...il.com>,
	James Clark <james.clark@....com>, ltp@...ts.linux.it,
	linux-nfs@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] VFS: generate FS_CREATE before FS_OPEN when
 ->atomic_open used.

On Wed, Jun 12, 2024 at 12:55:40PM +1000, NeilBrown wrote:
> > 	IF we don't care about that, we might as well take fsnotify_open()
> > out of vfs_open() and, for do_open()/do_tmpfile()/do_o_path(), into
> > path_openat() itself.  I mean, having
> >         if (likely(!error)) {
> >                 if (likely(file->f_mode & FMODE_OPENED)) {
> > 			fsnotify_open(file);
> >                         return file;
> > 		}
> > in there would be a lot easier to follow...  It would lose fsnotify_open()
> > in a few more failure exits, but if we don't give a damn about having it
> > paired with fsnotify_close()...
> > 
> 
> Should we have fsnotify_open() set a new ->f_mode flag, and
> fsnotify_close() abort if it isn't set (and clear it if it is)?
> Then we would be guaranteed a balance - which does seem like a good
> idea.

Umm...  In that case, I would rather have FMODE_NONOTIFY set just before
the fput() in path_openat() - no need to grab another flag from ->f_mode
(not a lot of unused ones there) and no need to add any overhead on
the fast path.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ