summaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-10-30 16:25:22 +0300
committerChristian Brauner <brauner@kernel.org>2025-11-05 00:05:03 +0300
commita45ff1c7c9e9447ffca83a9d219c50e9eb8bdaeb (patch)
treef1273dfd9db1f6f58bd63ec7fa898fcf1887a858 /include/uapi/linux
parent3a8660878839faadb4f1a6dd72c3179c1df56787 (diff)
parentcbb842548a9dd6ffcb87934eb5e32e5408460767 (diff)
downloadlinux-a45ff1c7c9e9447ffca83a9d219c50e9eb8bdaeb.tar.xz
Merge patch series "coredump: cleanups & pidfd extension"
Christian Brauner <brauner@kernel.org> says: The recent changes to rework coredump handling to rely on unix sockets are in the process of being used in systemd. Yu reported on shortcoming nameling that the signal causing the coredump was available before the crashing process was reaped. The previous systemd coredump container interface requires the coredump file descriptor, and basic information including the signal number to be sent to the container. This means we need to have the signal number available before sending the coredump to the container. In general, the extension makes sense and fits with the rest of the coredump information. In addition to this extension this fixes a bunch of the tests that were failing and reworks the publication mechanism for exit and coredump info retrievable via the pidfd ioctl. * patches from https://patch.msgid.link/20251028-work-coredump-signal-v1-0-ca449b7b7aa0@kernel.org: (22 commits) selftests/coredump: add second PIDFD_INFO_COREDUMP_SIGNAL test selftests/coredump: add first PIDFD_INFO_COREDUMP_SIGNAL test selftests/coredump: ignore ENOSPC errors selftests/coredump: add debug logging to coredump socket protocol tests selftests/coredump: add debug logging to coredump socket tests selftests/coredump: add debug logging to test helpers selftests/coredump: handle edge-triggered epoll correctly selftests/coredump: fix userspace coredump client detection selftests/coredump: fix userspace client detection selftests/coredump: split out coredump socket tests selftests/coredump: split out common helpers selftests/pidfd: add second supported_mask test selftests/pidfd: add first supported_mask test selftests/pidfd: update pidfd header pidfs: expose coredump signal pidfs: drop struct pidfs_exit_info pidfs: prepare to drop exit_info pointer pidfd: add a new supported_mask field pidfs: add missing BUILD_BUG_ON() assert on struct pidfd_info pidfs: add missing PIDFD_INFO_SIZE_VER1 ... Link: https://patch.msgid.link/20251028-work-coredump-signal-v1-0-ca449b7b7aa0@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/pidfd.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/uapi/linux/pidfd.h b/include/uapi/linux/pidfd.h
index 957db425d459..ea9a6811fc76 100644
--- a/include/uapi/linux/pidfd.h
+++ b/include/uapi/linux/pidfd.h
@@ -26,8 +26,12 @@
#define PIDFD_INFO_CGROUPID (1UL << 2) /* Always returned if available, even if not requested */
#define PIDFD_INFO_EXIT (1UL << 3) /* Only returned if requested. */
#define PIDFD_INFO_COREDUMP (1UL << 4) /* Only returned if requested. */
+#define PIDFD_INFO_SUPPORTED_MASK (1UL << 5) /* Want/got supported mask flags */
+#define PIDFD_INFO_COREDUMP_SIGNAL (1UL << 6) /* Always returned if PIDFD_INFO_COREDUMP is requested. */
#define PIDFD_INFO_SIZE_VER0 64 /* sizeof first published struct */
+#define PIDFD_INFO_SIZE_VER1 72 /* sizeof second published struct */
+#define PIDFD_INFO_SIZE_VER2 80 /* sizeof third published struct */
/*
* Values for @coredump_mask in pidfd_info.
@@ -91,8 +95,11 @@ struct pidfd_info {
__u32 fsuid;
__u32 fsgid;
__s32 exit_code;
- __u32 coredump_mask;
- __u32 __spare1;
+ struct /* coredump info */ {
+ __u32 coredump_mask;
+ __u32 coredump_signal;
+ };
+ __u64 supported_mask; /* Mask flags that this kernel supports */
};
#define PIDFS_IOCTL_MAGIC 0xFF