public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] pidfs: implement file handle support
@ 2024-11-01 13:54 Erin Shepherd
  2024-11-01 13:54 ` [PATCH 1/4] pseudofs: add support for export_ops Erin Shepherd
                   ` (4 more replies)
  0 siblings, 5 replies; 57+ messages in thread
From: Erin Shepherd @ 2024-11-01 13:54 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel; +Cc: christian, paul, bluca, erin.shepherd

Since the introduction of pidfs, we have had 64-bit process identifiers 
that will not be reused for the entire uptime of the system. This greatly 
facilitates process tracking in userspace.

There are two limitations at present:

 * These identifiers are currently only exposed to processes on 64-bit 
   systems. On 32-bit systems, inode space is also limited to 32 bits and 
   therefore is subject to the same reuse issues.
 * There is no way to go from one of these unique identifiers to a pid or 
   pidfd.

Patch 1 & 2 in this stack implements fh_export for pidfs. This means 
userspace  can retrieve a unique process identifier even on 32-bit systems 
via name_to_handle_at.

Patch 3 & 4 in this stack implement fh_to_dentry for pidfs. This means 
userspace can convert back from a file handle to the corresponding pidfd. 
To support us going from a file handle to a pidfd, we have to store a pid 
inside the file handle. To ensure file handles are invariant and can move 
between pid namespaces, we stash a pid from the initial namespace inside 
the file handle.

I'm not quite sure if stashing an initial-namespace pid inside the file 
handle is the right approach here; if not, I think that patch 1 & 2 are 
useful on their own.

Erin Shepherd (4):
  pseudofs: add support for export_ops
  pidfs: implement file handle export support
  pid: introduce find_get_pid_ns
  pidfs: implement fh_to_dentry

 fs/libfs.c                |  1 +
 fs/pidfs.c                | 57 +++++++++++++++++++++++++++++++++++++++
 include/linux/pid.h       |  1 +
 include/linux/pseudo_fs.h |  1 +
 kernel/pid.c              | 10 +++++--
 5 files changed, 68 insertions(+), 2 deletions(-)

-- 
2.46.1


^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2024-11-28 17:19 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-01 13:54 [PATCH 0/4] pidfs: implement file handle support Erin Shepherd
2024-11-01 13:54 ` [PATCH 1/4] pseudofs: add support for export_ops Erin Shepherd
2024-11-12 15:56   ` Amir Goldstein
2024-11-01 13:54 ` [PATCH 2/4] pidfs: implement file handle export support Erin Shepherd
2024-11-12 15:55   ` Amir Goldstein
2024-11-01 13:54 ` [PATCH 3/4] pid: introduce find_get_pid_ns Erin Shepherd
2024-11-12 15:59   ` Amir Goldstein
2024-11-01 13:54 ` [PATCH 4/4] pidfs: implement fh_to_dentry Erin Shepherd
2024-11-12 16:33   ` Amir Goldstein
2024-11-12 23:51   ` Jeff Layton
2024-11-13  8:01     ` Amir Goldstein
2024-11-13 10:11       ` Erin Shepherd
2024-11-13 12:21         ` Christian Brauner
2024-11-13 12:09   ` Christian Brauner
2024-11-13 13:06     ` Erin Shepherd
2024-11-13 13:26       ` Christian Brauner
2024-11-13 13:48         ` Erin Shepherd
2024-11-14 10:29           ` Christian Brauner
2024-11-14 12:21             ` Erin Shepherd
2024-11-12 13:10 ` [PATCH 0/4] pidfs: implement file handle support Christian Brauner
2024-11-12 13:57   ` Jeff Layton
2024-11-12 22:43     ` Erin Shepherd
2024-11-13  0:37       ` Darrick J. Wong
2024-11-13 11:35       ` Christian Brauner
2024-11-13 17:55       ` [PATCH v2 0/3] " Erin Shepherd
2024-11-13 17:55         ` [PATCH v2 1/3] pseudofs: add support for export_ops Erin Shepherd
2024-11-13 17:55         ` [PATCH v2 2/3] exportfs: allow fs to disable CAP_DAC_READ_SEARCH check Erin Shepherd
2024-11-13 22:50           ` kernel test robot
2024-11-14  1:29           ` kernel test robot
2024-11-14  4:37           ` Christoph Hellwig
2024-11-14 12:56             ` Erin Shepherd
2024-11-14  6:37           ` Amir Goldstein
2024-11-14 14:16             ` Christian Brauner
2024-11-13 17:55         ` [PATCH v2 3/3] pidfs: implement file handle support Erin Shepherd
2024-11-14  7:07           ` Amir Goldstein
2024-11-14 12:42             ` Erin Shepherd
2024-11-14 12:52           ` Christian Brauner
2024-11-14 13:13             ` Erin Shepherd
2024-11-14 14:13               ` Christian Brauner
2024-11-14 21:52                 ` Erin Shepherd
2024-11-15  7:50                   ` Amir Goldstein
2024-11-14  7:02         ` [PATCH v2 0/3] " Amir Goldstein
2024-11-14 12:48           ` Erin Shepherd
2024-11-14 14:27             ` Christian Brauner
2024-11-28 12:33               ` [PATCH RFC 0/2] pidfs: file handle preliminaries Christian Brauner
2024-11-28 12:33                 ` [PATCH RFC 1/2] pidfs: rework inode number allocation Christian Brauner
2024-11-28 17:19                   ` Amir Goldstein
2024-11-28 12:33                 ` [PATCH RFC 2/2] pidfs: remove 32bit inode number handling Christian Brauner
2024-11-28 17:06                 ` [PATCH RFC 0/2] pidfs: file handle preliminaries Amir Goldstein
2024-11-14 16:10             ` [PATCH v2 0/3] pidfs: implement file handle support Amir Goldstein
2024-11-12 23:03   ` [PATCH 0/4] " Erin Shepherd
2024-11-13  0:40     ` Darrick J. Wong
2024-11-13 10:17       ` Erin Shepherd
2024-11-13 13:29         ` Jeff Layton
2024-11-13 14:41           ` Chuck Lever III
2024-11-14 10:39             ` Christian Brauner
2024-11-14  6:55           ` Amir Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox