Re: [PATCH v3] scripts: add leaking_addresses.pl

From: Linus Torvalds
Date: Mon Nov 06 2017 - 12:41:16 EST


On Mon, Nov 6, 2017 at 9:27 AM, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Lovely. This is great. It shows just how much totally pointless stuff
> we leak, and to normal users that really shouldn't need it.

Side note: it would be good to have some summary view, and perhaps
some way to limit duplicates.

I ended up running this command line from hell to summarize the
different sources:

perl leaking_addresses.pl |
cut -d: -f1 |
sed 's:/[0-9]*/:/X/:g' |
sed 's:/module/[^/]*/:/module/X/:g' |
sort | uniq | less -S

and maybe that kind of duplicate culling could be part of the script
itself if you pass it some summary line.

In particular, if would be nice to have a summary report that

- only shows the first address for a particular source

- have some logic to collapse repeated entries of "same file, just
different instance"

my sed-invocations there are obviously very ad-hoc, I'm not actually
advocating that crap, it's only meant as hacky example of what I'm
talking about. Something smarter would be much better.

Because right now if some developer runs it, they might miss some case
that they should care about, simply because it's hidden among all the
thousands of essentially duplicate cases.

Linus