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-next>] [day] [month] [year] [list]
Message-ID: <20241115-vfs-pidfs-841631f030e8@brauner>
Date: Fri, 15 Nov 2024 15:04:33 +0100
From: Christian Brauner <brauner@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Christian Brauner <brauner@...nel.org>,
	linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [GIT PULL] vfs pidfs

Hey Linus,

/* Summary */

This adds a new ioctl to retrieve information about a pidfd.

A common pattern when using pidfds 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.: it has been reimplemented 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 some creds unconditionally, and cgroupid optionally.

/* Testing */

gcc version 14.2.0 (Debian 14.2.0-6)
Debian clang version 16.0.6 (27+b1)

All patches are based on v6.12-rc3 and have been sitting in linux-next.
No build failures or warnings were observed.

/* Conflicts */

Merge conflicts with mainline
=============================

No known conflicts.

Merge conflicts with other trees
================================

No known conflicts.

The following changes since commit 8e929cb546ee42c9a61d24fae60605e9e3192354:

  Linux 6.12-rc3 (2024-10-13 14:33:32 -0700)

are available in the Git repository at:

  git@...olite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.13.pidfs

for you to fetch changes up to cdda1f26e74bac732eca537a69f19f6a37b641be:

  pidfd: add ioctl to retrieve pid info (2024-10-24 13:54:51 +0200)

Please consider pulling these changes from the signed vfs-6.13.pidfs tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.13.pidfs

----------------------------------------------------------------
Luca Boccassi (1):
      pidfd: add ioctl to retrieve pid info

 fs/pidfs.c                                      | 86 ++++++++++++++++++++++++-
 include/uapi/linux/pidfd.h                      | 50 ++++++++++++++
 tools/testing/selftests/pidfd/pidfd_open_test.c | 82 ++++++++++++++++++++++-
 3 files changed, 214 insertions(+), 4 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ