aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/fast_commit.c
diff options
context:
space:
mode:
authorLuca Boccassi <[email protected]>2024-10-10 15:52:32 +0000
committerChristian Brauner <[email protected]>2024-10-24 11:54:51 +0000
commitcdda1f26e74bac732eca537a69f19f6a37b641be (patch)
tree07fcfc8122c1a1ef147f40f70d58fa68232f5200 /fs/ext4/fast_commit.c
parentLinux 6.12-rc3 (diff)
downloadkernel-cdda1f26e74bac732eca537a69f19f6a37b641be.tar.gz
kernel-cdda1f26e74bac732eca537a69f19f6a37b641be.zip
pidfd: add ioctl to retrieve pid info
A common pattern when using pid fds is having to get information about the process, which currently requires /proc being mounted, resolving the fd to a pid, and then do manual string parsing of /proc/N/status and friends. This needs to be reimplemented over and over in all userspace projects (e.g.: I have reimplemented resolving in systemd, dbus, dbus-daemon, polkit so far), and requires additional care in checking that the fd is still valid after having parsed the data, to avoid races. Having a programmatic API that can be used directly removes all these requirements, including having /proc mounted. As discussed at LPC24, add an ioctl with an extensible struct so that more parameters can be added later if needed. Start with returning pid/tgid/ppid and creds unconditionally, and cgroupid optionally. Signed-off-by: Luca Boccassi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'fs/ext4/fast_commit.c')
0 files changed, 0 insertions, 0 deletions