* [PATCH] uapi/pidfd: correct the coredump signal and code comments
@ 2026-11-29 1:41 Nikolai Dokutovich
0 siblings, 0 replies; only message in thread
From: Nikolai Dokutovich @ 2026-11-29 1:41 UTC (permalink / raw)
To: Christian Brauner
Cc: Oleg Nesterov, linux-api, linux-kernel, Nikolai Dokutovich
PIDFD_INFO_COREDUMP_SIGNAL and PIDFD_INFO_COREDUMP_CODE are documented
as "always returned if PIDFD_INFO_COREDUMP is requested", but pidfs
only raises them when a coredump has actually been recorded for the
task. Requesting PIDFD_INFO_COREDUMP for a live task returns
PIDFD_INFO_COREDUMP and coredump_mask without the signal and code bits,
because nothing was dumped:
mask=0x17 COREDUMP=1 SIGNAL=0 CODE=0 coredump_mask=0x4
Describe what the kernel does.
Signed-off-by: Nikolai Dokutovich <ndokutovich@gmail.com>
---
include/uapi/linux/pidfd.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/pidfd.h b/include/uapi/linux/pidfd.h
index 0919246a1611..17df4711656e 100644
--- a/include/uapi/linux/pidfd.h
+++ b/include/uapi/linux/pidfd.h
@@ -28,8 +28,8 @@
#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_COREDUMP_CODE (1UL << 7) /* Always returned if PIDFD_INFO_COREDUMP is requested. */
+#define PIDFD_INFO_COREDUMP_SIGNAL (1UL << 6) /* If requested and a coredump was recorded. */
+#define PIDFD_INFO_COREDUMP_CODE (1UL << 7) /* If requested and a coredump was recorded. */
#define PIDFD_INFO_SIZE_VER0 64 /* sizeof first published struct */
#define PIDFD_INFO_SIZE_VER1 72 /* sizeof second published struct */
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-29 1:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-29 1:41 [PATCH] uapi/pidfd: correct the coredump signal and code comments Nikolai Dokutovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox