* + kmemleak-add-checksum-to-backtrace-report.patch added to mm-unstable branch
@ 2023-11-17 17:38 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-11-17 17:38 UTC (permalink / raw)
To: mm-commits, catalin.marinas, jim.cromie, akpm
The patch titled
Subject: kmemleak: add checksum to backtrace report
has been added to the -mm mm-unstable branch. Its filename is
kmemleak-add-checksum-to-backtrace-report.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/kmemleak-add-checksum-to-backtrace-report.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Jim Cromie <jim.cromie@gmail.com>
Subject: kmemleak: add checksum to backtrace report
Date: Thu, 16 Nov 2023 15:43:18 -0700
Change /sys/kernel/debug/kmemleak report format slightly, adding
"(extra info)" to the backtrace header:
from: " backtrace:"
to: " backtrace (crc <cksum>):"
The <cksum> allows a user to see recurring backtraces without
detailed/careful reading of multiline stacks. So after cycling
kmemleak-test a few times, I know some leaks are repeating.
bash-5.2# grep backtrace /sys/kernel/debug/kmemleak | wc
62 186 1792
bash-5.2# grep backtrace /sys/kernel/debug/kmemleak | sort -u | wc
37 111 1067
syzkaller parses kmemleak for "unreferenced object" only, so is
unaffected by this change. Other github repos are moribund.
Link: https://lkml.kernel.org/r/20231116224318.124209-3-jim.cromie@gmail.com
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/kmemleak.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/kmemleak.c~kmemleak-add-checksum-to-backtrace-report
+++ a/mm/kmemleak.c
@@ -362,7 +362,7 @@ static void print_unreferenced(struct se
warn_or_seq_printf(seq, " comm \"%s\", pid %d, jiffies %lu\n",
object->comm, object->pid, object->jiffies);
hex_dump_object(seq, object);
- warn_or_seq_printf(seq, " backtrace:\n");
+ warn_or_seq_printf(seq, " backtrace (crc %x):\n", object->checksum);
for (i = 0; i < nr_entries; i++) {
void *ptr = (void *)entries[i];
_
Patches currently in -mm which might be from jim.cromie@gmail.com are
kmemleak-drop-age-increasing-from-leak-record.patch
kmemleak-add-checksum-to-backtrace-report.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-17 17:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-17 17:38 + kmemleak-add-checksum-to-backtrace-report.patch added to mm-unstable branch Andrew Morton
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).