[PATCH v8 5/9] pidfs, coredump: add PIDFD_INFO_COREDUMP

Jann Horn jannh at google.com
Fri May 16 14:37:49 UTC 2025


On Fri, May 16, 2025 at 1:26 PM Christian Brauner <brauner at kernel.org> wrote:
> Extend the PIDFD_INFO_COREDUMP ioctl() with the new PIDFD_INFO_COREDUMP
> mask flag. This adds the @coredump_mask field to struct pidfd_info.
>
> When a task coredumps the kernel will provide the following information
> to userspace in @coredump_mask:
>
> * PIDFD_COREDUMPED is raised if the task did actually coredump.
> * PIDFD_COREDUMP_SKIP is raised if the task skipped coredumping (e.g.,
>   undumpable).
> * PIDFD_COREDUMP_USER is raised if this is a regular coredump and
>   doesn't need special care by the coredump server.
> * PIDFD_COREDUMP_ROOT is raised if the generated coredump should be
>   treated as sensitive and the coredump server should restrict to the
>   generated coredump to sufficiently privileged users.
>
> The kernel guarantees that by the time the connection is made the all
> PIDFD_INFO_COREDUMP info is available.
>
> Acked-by: Luca Boccassi <luca.boccassi at gmail.com>
> Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn at canonical.com>
> Signed-off-by: Christian Brauner <brauner at kernel.org>

Reviewed-by: Jann Horn <jannh at google.com>

Thanks for clarifying the comments!



More information about the Linux-security-module-archive mailing list