linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/22] coredump: cleanups & pidfd extension
@ 2025-10-28  8:45 Christian Brauner
  2025-10-28  8:45 ` [PATCH 01/22] pidfs: use guard() for task_lock Christian Brauner
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: Christian Brauner @ 2025-10-28  8:45 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: Oleg Nesterov, Amir Goldstein, Aleksa Sarai, Yu Watanabe,
	Josef Bacik, Jeff Layton, Jann Horn, Luca Boccassi,
	Alexander Mikhalitsyn, linux-kernel, Alexander Viro, Jan Kara,
	Lennart Poettering, Mike Yuan, Zbigniew Jędrzejewski-Szmek,
	Christian Brauner

Hey,

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.

Signed-off-by: Christian Brauner <brauner@kernel.org>
---
Christian Brauner (22):
      pidfs: use guard() for task_lock
      pidfs: fix PIDFD_INFO_COREDUMP handling
      pidfs: add missing PIDFD_INFO_SIZE_VER1
      pidfs: add missing BUILD_BUG_ON() assert on struct pidfd_info
      pidfd: add a new supported_mask field
      pidfs: prepare to drop exit_info pointer
      pidfs: drop struct pidfs_exit_info
      pidfs: expose coredump signal
      selftests/pidfd: update pidfd header
      selftests/pidfd: add first supported_mask test
      selftests/pidfd: add second supported_mask test
      selftests/coredump: split out common helpers
      selftests/coredump: split out coredump socket tests
      selftests/coredump: fix userspace client detection
      selftests/coredump: fix userspace coredump client detection
      selftests/coredump: handle edge-triggered epoll correctly
      selftests/coredump: add debug logging to test helpers
      selftests/coredump: add debug logging to coredump socket tests
      selftests/coredump: add debug logging to coredump socket protocol tests
      selftests/coredump: ignore ENOSPC errors
      selftests/coredump: add first PIDFD_INFO_COREDUMP_SIGNAL test
      selftests/coredump: add second PIDFD_INFO_COREDUMP_SIGNAL test

 fs/pidfs.c                                         |   89 +-
 include/uapi/linux/pidfd.h                         |   11 +-
 tools/testing/selftests/coredump/.gitignore        |    4 +
 tools/testing/selftests/coredump/Makefile          |    8 +-
 .../coredump/coredump_socket_protocol_test.c       | 1568 ++++++++++++++++++
 .../selftests/coredump/coredump_socket_test.c      |  742 +++++++++
 tools/testing/selftests/coredump/coredump_test.h   |   59 +
 .../selftests/coredump/coredump_test_helpers.c     |  383 +++++
 tools/testing/selftests/coredump/stackdump_test.c  | 1662 +-------------------
 tools/testing/selftests/pidfd/pidfd.h              |   15 +-
 tools/testing/selftests/pidfd/pidfd_info_test.c    |   73 +
 11 files changed, 2914 insertions(+), 1700 deletions(-)
---
base-commit: a779e27f24aeb679969ddd1fdd7f636e22ddbc1e
change-id: 20251026-work-coredump-signal-a72203cdf6eb


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2025-10-28  8:47 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-28  8:45 [PATCH 00/22] coredump: cleanups & pidfd extension Christian Brauner
2025-10-28  8:45 ` [PATCH 01/22] pidfs: use guard() for task_lock Christian Brauner
2025-10-28  8:45 ` [PATCH 02/22] pidfs: fix PIDFD_INFO_COREDUMP handling Christian Brauner
2025-10-28  8:45 ` [PATCH 03/22] pidfs: add missing PIDFD_INFO_SIZE_VER1 Christian Brauner
2025-10-28  8:45 ` [PATCH 04/22] pidfs: add missing BUILD_BUG_ON() assert on struct pidfd_info Christian Brauner
2025-10-28  8:45 ` [PATCH 05/22] pidfd: add a new supported_mask field Christian Brauner
2025-10-28  8:45 ` [PATCH 06/22] pidfs: prepare to drop exit_info pointer Christian Brauner
2025-10-28  8:45 ` [PATCH 07/22] pidfs: drop struct pidfs_exit_info Christian Brauner
2025-10-28  8:45 ` [PATCH 08/22] pidfs: expose coredump signal Christian Brauner
2025-10-28  8:45 ` [PATCH 09/22] selftests/pidfd: update pidfd header Christian Brauner
2025-10-28  8:45 ` [PATCH 10/22] selftests/pidfd: add first supported_mask test Christian Brauner
2025-10-28  8:45 ` [PATCH 11/22] selftests/pidfd: add second " Christian Brauner
2025-10-28  8:45 ` [PATCH 12/22] selftests/coredump: split out common helpers Christian Brauner
2025-10-28  8:45 ` [PATCH 13/22] selftests/coredump: split out coredump socket tests Christian Brauner
2025-10-28  8:45 ` [PATCH 14/22] selftests/coredump: fix userspace client detection Christian Brauner
2025-10-28  8:46 ` [PATCH 15/22] selftests/coredump: fix userspace coredump " Christian Brauner
2025-10-28  8:46 ` [PATCH 16/22] selftests/coredump: handle edge-triggered epoll correctly Christian Brauner
2025-10-28  8:46 ` [PATCH 17/22] selftests/coredump: add debug logging to test helpers Christian Brauner
2025-10-28  8:46 ` [PATCH 18/22] selftests/coredump: add debug logging to coredump socket tests Christian Brauner
2025-10-28  8:46 ` [PATCH 19/22] selftests/coredump: add debug logging to coredump socket protocol tests Christian Brauner
2025-10-28  8:46 ` [PATCH 20/22] selftests/coredump: ignore ENOSPC errors Christian Brauner
2025-10-28  8:46 ` [PATCH 21/22] selftests/coredump: add first PIDFD_INFO_COREDUMP_SIGNAL test Christian Brauner
2025-10-28  8:46 ` [PATCH 22/22] selftests/coredump: add second " Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).