Re: [PATCH v3 0/6] implement KASLR for powerpc/fsl_booke/64

From: Kees Cook
Date: Wed Mar 04 2020 - 17:37:03 EST


On Wed, Mar 04, 2020 at 03:11:39PM -0600, Scott Wood wrote:
> In any case, this came up now due to a question about what to use when
> printing crash dumps. PowerPC currently prints stack and return addresses
> with %lx (in addition to %pS in the latter case) and someone proposed

Right -- I think other archs moved entirely to %pS and just removed %lx
and %p uses.

> converting them to %p and/or removing them altogether. Is there a consensus
> on whether crash dumps need to be sanitized of this stuff as well? It seems
> like you'd have the addresses in the register dump as well (please don't take
> that away too...). Maybe crash dumps would be a less problematic place to
> make the hashing conditional (i.e. less likely to break something in userspace
> that wasn't expecting a hash)?

Actual _crash_ dumps print all kinds of stuff, even the KASLR offset,
but for generic stack traces, it's been mainly %pS, with things like
registers using %lx.

I defer to Linus, obviously. I just wanted to repeat what he'd said
before.

--
Kees Cook