linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] binfmt_elf, coredump: Log the reason of the failed core dumps
@ 2024-07-18 18:27 Roman Kisel
  2024-07-18 18:27 ` [PATCH v3 1/2] coredump: Standartize and fix logging Roman Kisel
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Roman Kisel @ 2024-07-18 18:27 UTC (permalink / raw)
  To: akpm, apais, ardb, bigeasy, brauner, ebiederm, jack, keescook,
	linux-fsdevel, linux-kernel, linux-mm, nagvijay, oleg, tandersen,
	vincent.whitchurch, viro
  Cc: apais, benhill, ssengar, sunilmut, vdso

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/20240712215223.605363-1-romank@linux.microsoft.com/
  - 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/20240617234133.1167523-1-romank@linux.microsoft.com/

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
-- 
2.45.2


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

end of thread, other threads:[~2024-08-06  4:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-18 18:27 [PATCH v3 0/2] binfmt_elf, coredump: Log the reason of the failed core dumps Roman Kisel
2024-07-18 18:27 ` [PATCH v3 1/2] coredump: Standartize and fix logging Roman Kisel
     [not found]   ` <1AEC6E18-313E-495F-AEE7-9C6C9DB3BAEA@linux.microsoft.com>
2024-07-22 19:34     ` Roman Kisel
2024-07-18 18:27 ` [PATCH v3 2/2] binfmt_elf, coredump: Log the reason of the failed core dumps Roman Kisel
2024-07-19 17:26 ` [PATCH v3 0/2] " Kees Cook
2024-07-22 19:33   ` Roman Kisel
2024-08-06  4:33 ` Kees Cook

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).