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: <20250224025330.GW1977892@ZenIV>
Date: Mon, 24 Feb 2025 02:53:30 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: NeilBrown <neilb@...e.de>
Cc: Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
	Miklos Szeredi <miklos@...redi.hu>, Xiubo Li <xiubli@...hat.com>,
	Ilya Dryomov <idryomov@...il.com>,
	Richard Weinberger <richard@....at>,
	Anton Ivanov <anton.ivanov@...bridgegreys.com>,
	Johannes Berg <johannes@...solutions.net>,
	Trond Myklebust <trondmy@...nel.org>,
	Anna Schumaker <anna@...nel.org>,
	Chuck Lever <chuck.lever@...cle.com>,
	Jeff Layton <jlayton@...nel.org>,
	Olga Kornievskaia <okorniev@...hat.com>,
	Dai Ngo <Dai.Ngo@...cle.com>, Tom Talpey <tom@...pey.com>,
	Sergey Senozhatsky <senozhatsky@...omium.org>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-cifs@...r.kernel.org, linux-nfs@...r.kernel.org,
	linux-um@...ts.infradead.org, ceph-devel@...r.kernel.org,
	netfs@...ts.linux.dev
Subject: Re: [PATCH 4/6] fuse: return correct dentry for ->mkdir

On Mon, Feb 24, 2025 at 01:26:18PM +1100, NeilBrown wrote:

> Probably now.  It would require S_IFDIR to be passed in the mode to
> vfs_mknod().  I don't think any current callers do that, but I don't see
> any code in vfs_mknod() to prevent it.

Not allowed (and that's caller's responsibility to enforce).  Local filesystems
would break horribly if that ever happened.

->mknod() instance _may_ be a convenient helper for ->mkdir() et.al. to call,
but even for ramfs it won't coincide with ->mkdir() (wrong i_nlink, for one
thing).

If that's not documented, it really should be.

vfs_mknod() may be called for block devices, character devices, FIFOs and
sockets.  Nothing else is allowed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ