[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240712215223.605363-1-romank@linux.microsoft.com>
Date: Fri, 12 Jul 2024 14:50:55 -0700
From: Roman Kisel <romank@...ux.microsoft.com>
To: akpm@...ux-foundation.org,
apais@...ux.microsoft.com,
ardb@...nel.org,
bigeasy@...utronix.de,
brauner@...nel.org,
ebiederm@...ssion.com,
jack@...e.cz,
keescook@...omium.org,
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
nagvijay@...rosoft.com,
oleg@...hat.com,
tandersen@...flix.com,
vincent.whitchurch@...s.com,
viro@...iv.linux.org.uk
Cc: apais@...rosoft.com,
benhill@...rosoft.com,
ssengar@...rosoft.com,
sunilmut@...rosoft.com,
vdso@...bites.dev
Subject: [PATCH v2 0/1] 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.
[V2]
- 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/
Signed-off-by: Roman Kisel <romank@...ux.microsoft.com>
Roman Kisel (1):
binfmt_elf, coredump: Log the reason of the failed core dumps
fs/binfmt_elf.c | 60 ++++++++++++++++-----
fs/coredump.c | 109 ++++++++++++++++++++++++++++++++-------
include/linux/coredump.h | 8 ++-
kernel/signal.c | 22 +++++++-
4 files changed, 165 insertions(+), 34 deletions(-)
base-commit: 831bcbcead6668ebf20b64fdb27518f1362ace3a
--
2.45.2
Powered by blists - more mailing lists