[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfpeguTQvA6cq-3JCEZx6wP+nvZX8E6_77pNRJUU2_S7cyAiA@mail.gmail.com>
Date: Thu, 5 Oct 2023 17:52:15 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: Miklos Szeredi <mszeredi@...hat.com>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-api@...r.kernel.org, linux-man@...r.kernel.org,
linux-security-module@...r.kernel.org, Karel Zak <kzak@...hat.com>,
Ian Kent <raven@...maw.net>,
David Howells <dhowells@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Al Viro <viro@...iv.linux.org.uk>,
Christian Brauner <christian@...uner.io>,
Amir Goldstein <amir73il@...il.com>,
Matthew House <mattlloydhouse@...il.com>,
Florian Weimer <fweimer@...hat.com>,
Arnd Bergmann <arnd@...db.de>, Paul Moore <paul@...l-moore.com>
Subject: Re: [PATCH v3 1/4] add unique mount ID
On Thu, 28 Sept 2023 at 15:03, Miklos Szeredi <mszeredi@...hat.com> wrote:
>
> If a mount is released then its mnt_id can immediately be reused. This is
> bad news for user interfaces that want to uniquely identify a mount.
>
> Implementing a unique mount ID is trivial (use a 64bit counter).
> Unfortunately userspace assumes 32bit size and would overflow after the
> counter reaches 2^32.
>
> Introduce a new 64bit ID alongside the old one. Initialize the counter to
> 2^32, this guarantees that the old and new IDs are never mixed up.
It occurred to me that it might make sense to make this counter
per-namespace. That would allow more separation between namespaces,
like preventing the observation of mount creations in other
namespaces.
Does a global number make any sense?
Thanks,
Miklos
Powered by blists - more mailing lists