From: Nikolai Dokutovich <ndokutovich@gmail.com>
To: Christian Brauner <brauner@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>,
linux-api@vger.kernel.org, linux-kernel@vger.kernel.org,
Nikolai Dokutovich <ndokutovich@gmail.com>
Subject: [PATCH] uapi/pidfd: correct the coredump signal and code comments
Date: Sun, 29 Nov 2026 04:41:15 +0300 [thread overview]
Message-ID: <20261129014115.57332-1-ndokutovich@gmail.com> (raw)
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
reply other threads:[~2026-11-29 1:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261129014115.57332-1-ndokutovich@gmail.com \
--to=ndokutovich@gmail.com \
--cc=brauner@kernel.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox