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: <20240528-restbetrag-zocken-df1f009dee04@brauner>
Date: Tue, 28 May 2024 09:05:17 +0200
From: Christian Brauner <brauner@...nel.org>
To: Trond Myklebust <trondmy@...merspace.com>
Cc: "hch@...radead.org" <hch@...radead.org>, "jack@...e.cz" <jack@...e.cz>, 
	"chuck.lever@...cle.com" <chuck.lever@...cle.com>, "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>, 
	"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>, "alex.aring@...il.com" <alex.aring@...il.com>, 
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "cyphar@...har.com" <cyphar@...har.com>, 
	"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>, "jlayton@...nel.org" <jlayton@...nel.org>, 
	"amir73il@...il.com" <amir73il@...il.com>, "linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>
Subject: Re: [PATCH RFC v2] fhandle: expose u64 mount id to
 name_to_handle_at(2)

On Mon, May 27, 2024 at 03:47:33PM +0000, Trond Myklebust wrote:
> On Mon, 2024-05-27 at 15:17 +0200, Christian Brauner wrote:
> > 
> > Returning the 64bit mount id makes this race-free because we now have
> > statmount():
> > 
> > u64 mnt_id = 0;
> > name_to_handle_at(AT_FDCWD, "/path/to/file", &handle, &mnt_id, 0);
> > statmount(mnt_id);
> > 
> > Which gets you the device number which one can use to figure out the
> > uuid without ever having to open a single file (We could even expose
> > the
> > UUID of the filesystem through statmount() if we wanted to.).
> > 
> 
> It is not race free. statmount() depends on the filesystem still being
> mounted somewhere in your namespace, which is not guaranteed above.

The unsigned 64bit mount is not recyclable. It is a unique identifier
for a mount for the lifetime of the system. Even if bumped on every
cycle it will still take hundreds of years to overflow.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ