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: <20240612023748.GG1629371@ZenIV>
Date: Wed, 12 Jun 2024 03:37:48 +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:05:11PM +1000, NeilBrown wrote:

> For finish_open() there are three cases:
>  - finish_open is used in ->atomic_open handlers.  For these we add a
>    call to fsnotify_open() in do_open() if FMODE_OPENED is set - which
>    means do_dentry_open() has been called. This happens after fsnotify_create().

	Hummm....  There's a bit of behaviour change; in case we fail in
may_open(), we used to get fsnotify_open()+fsnotify_close() and with that
patch we's get fsnotify_close() alone.

	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()...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ