[PATCH v4 0/2] pidfds: add coredump_code field to pidfd_info

Emanuele Rocca posted 2 patches 1 week, 4 days ago
fs/pidfs.c                                    | 12 ++++---
include/uapi/linux/pidfd.h                    |  4 +++
.../coredump/coredump_socket_protocol_test.c  | 26 +++++++++++++++
.../selftests/coredump/coredump_socket_test.c | 32 +++++++++++++++++++
.../coredump/coredump_test_helpers.c          |  4 +--
tools/testing/selftests/pidfd/pidfd.h         |  5 +++
.../testing/selftests/pidfd/pidfd_info_test.c |  1 +
7 files changed, 78 insertions(+), 6 deletions(-)
[PATCH v4 0/2] pidfds: add coredump_code field to pidfd_info
Posted by Emanuele Rocca 1 week, 4 days ago
This patchs series adds a new field called coredump_code to struct pidfd_info,
as well as the relevant selftests. Note that the coredump selftests are
currently not passing, and the following patch is needed to fix them:
https://lore.kernel.org/lkml/ab2kI0PI_Vk6bU88@NH27D9T0LF/
I have not included it in this series as it is not directly related to the
coredump_code changes.

v1: https://lore.kernel.org/lkml/ab29J6KsQm8Xg3LR@NH27D9T0LF/

v2: Add coredump_pad to struct pidfd_info to ensure the struct has the same
size on both 64 bit and 32 bit systems. The issue was spotted by the kernel
test robot.
https://lore.kernel.org/lkml/202603211842.JCwUVYTI-lkp@intel.com/
https://lore.kernel.org/lkml/ab68fUmCK4An1UH-@NH27D9T0LF/

v3: Sending as a new thread, same as v2 otherwise.
https://lore.kernel.org/lkml/acBRj-DSCpqlKt6t@NH27D9T0LF/

v4: Split kernel code from selftest code as suggested by Christian Brauner. Add
Acked-by: Oleg Nesterov to the commit adding the coredump_code field. Thanks!
https://lore.kernel.org/lkml/20260323-hochsehen-kurort-862912a1d7b5@brauner/
https://lore.kernel.org/lkml/acEoVeBaP7bQRHLT@redhat.com/

Emanuele Rocca (2):
  pidfds: add coredump_code field to pidfd_info
  selftests: check pidfd_info->coredump_code correctness

 fs/pidfs.c                                    | 12 ++++---
 include/uapi/linux/pidfd.h                    |  4 +++
 .../coredump/coredump_socket_protocol_test.c  | 26 +++++++++++++++
 .../selftests/coredump/coredump_socket_test.c | 32 +++++++++++++++++++
 .../coredump/coredump_test_helpers.c          |  4 +--
 tools/testing/selftests/pidfd/pidfd.h         |  5 +++
 .../testing/selftests/pidfd/pidfd_info_test.c |  1 +
 7 files changed, 78 insertions(+), 6 deletions(-)

-- 
2.47.3
Re: [PATCH v4 0/2] pidfds: add coredump_code field to pidfd_info
Posted by Christian Brauner 1 week, 1 day ago
On Mon, 23 Mar 2026 14:00:45 +0100, Emanuele Rocca wrote:
> This patchs series adds a new field called coredump_code to struct pidfd_info,
> as well as the relevant selftests. Note that the coredump selftests are
> currently not passing, and the following patch is needed to fix them:
> https://lore.kernel.org/lkml/ab2kI0PI_Vk6bU88@NH27D9T0LF/
> I have not included it in this series as it is not directly related to the
> coredump_code changes.
> 
> [...]

Applied to the vfs-7.1.pidfs branch of the vfs/vfs.git tree.
Patches in the vfs-7.1.pidfs branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-7.1.pidfs

[1/2] pidfds: add coredump_code field to pidfd_info
      https://git.kernel.org/vfs/vfs/c/701f7f4fbabb
[2/2] selftests: check pidfd_info->coredump_code correctness
      https://git.kernel.org/vfs/vfs/c/7aaa4915cb69