Skip to content

binfmt_elf, coredump: Log the reason of the failed core dumps

Roman Kisel linux-fsdevel linux-mm lkml 3 versions – Applied

Status from this message: Applied to for-next/execve, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 5 repliesApplied
  2. v21 patch 2 repliesSuperseded
  3. v11 patch 6 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2coredump: Standartize and fix loggingfs/coredump.c include/linux/coredump.h+38 -272 replies
2/2binfmt_elf, coredump: Log the reason of the failed core dumpsfs/binfmt_elf.c fs/coredump.c include/linux/coredump.h +1 more+150 -340 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchAllen Pais
1/2T-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] binfmt_elf, coredump: Log the reason of the failed core dumps

A powerful way to diagnose crashes is to analyze the core dump produced upon the failure. Missing or malformed core dump files hinder these investigations. I'd like to propose changes that add logging as to why the kernel would not finish writing out the core dump file.

To help in diagnosing the user mode helper not writing out the entire coredump contents, the changes also log short statistics on the dump collection. I'd advocate for keeping this at the info level on these grounds.

For validation, I built the kernel and a simple user space to exercize the new code.

[V3]
- Standartized the existing logging to report TGID and comm consistently
- Fixed compiler warnings for the 32-bit systems (used %zd in the format strings)

[V2]
https://lore.kernel.org/all/[email protected]/
- Used _ratelimited to avoid spamming the system log
- Added comm and PID to the log messages
- Added logging to the failure paths in dump_interrupted, dump_skip, and dump_emit
- Fixed compiler warnings produced when CONFIG_COREDUMP is disabled

[V1]
https://lore.kernel.org/all/[email protected]/

Roman Kisel (2):
coredump: Standartize and fix logging
binfmt_elf, coredump: Log the reason of the failed core dumps

 fs/binfmt_elf.c          |  48 +++++++++----
 fs/coredump.c            | 150 +++++++++++++++++++++++++++------------
 include/linux/coredump.h |  30 +++++++-
 kernel/signal.c          |  21 +++++-
 4 files changed, 188 insertions(+), 61 deletions(-)

base-commit: 831bcbcead6668ebf20b64fdb27518f1362ace3a

Signature · 1 line
2.45.2