[0/2] tweak kmemleak report format

Message ID 20231116224318.124209-1-jim.cromie@gmail.com
Headers
Series tweak kmemleak report format |

Message

Jim Cromie Nov. 16, 2023, 10:43 p.m. UTC
  These 2 patches make minor changes to the report:

1st strips "age <increasing>" from output.  This makes the output
idempotent; unchanging until a new leak is reported.

2nd adds the backtrace.checksum to the "backtrace:" line.  This lets a
user see repeats without actually reading the whole backtrace.  So now
the backtrace line looks like this:

  backtrace (ck 603070071):

I surveyed for un-wanted effects upon users:

Syzkaller parses kmemleak in executor/common_linux.h:
static void check_leaks(char** frames, int nframes)

It just counts occurrences of "unreferenced object", specifically it
does not look for "age", nor would it choke on "crc" being added.

github has 3 repos with "kmemleak" mentioned, all are moribund.
gitlab has 0 hits on "kmemleak".


Jim Cromie (2):
  kmemleak: drop (age <increasing>) from leak record
  kmemleak: add checksum to backtrace report

 mm/kmemleak.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
  

Comments

Jim Cromie Nov. 16, 2023, 11:22 p.m. UTC | #1
On Thu, Nov 16, 2023 at 3:43 PM Jim Cromie <jim.cromie@gmail.com> wrote:
>
> These 2 patches make minor changes to the report:
>
> 1st strips "age <increasing>" from output.  This makes the output
> idempotent; unchanging until a new leak is reported.
>
> 2nd adds the backtrace.checksum to the "backtrace:" line.  This lets a
> user see repeats without actually reading the whole backtrace.  So now
> the backtrace line looks like this:
>
>   backtrace (ck 603070071):

meh, in the actual patch, thats

backtrace (crc <%x format>)