Re: [PATCH] lib/hexdump: introduce DUMP_PREFIX_UNHASHED for unhashed addresses
From: Andrew Morton
Date: Mon Jan 11 2021 - 20:31:18 EST
On Mon, 11 Jan 2021 11:10:56 +0100 Petr Mladek <pmladek@xxxxxxxx> wrote:
> Adding Kees into CC because it is security related.
> Adding Andrew into CC because he usually takes patches for hexdump.
>
> On Wed 2021-01-06 15:35:47, Timur Tabi wrote:
> > Hashed addresses are useless in hexdumps unless you're comparing
> > with other hashed addresses, which is unlikely. However, there's
> > no need to break existing code, so introduce a new prefix type
> > that prints unhashed addresses.
> >
> > Signed-off-by: Timur Tabi <timur@xxxxxxxx>
> > Cc: Roman Fietze <roman.fietze@xxxxxxxxx>
>
> I agree that there should be way to print the real address.
>
> And it is sane to add a new mode so that the current
> users stay hashed.
>
I doubt if Kees (or I or anyone else) can review this change because
there are no callers which actually use the new DUMP_PREFIX_UNHASHED.
Is it intended that some other places in the kernel be changed to use
this? If so, please describe where and why, so that others can better
understand both the requirement and the security implications.
If it is intended that this be used mainly for developer debug and not
to be shipped in the mainline kernel then let's get this info into the
changelog as well.