RE: [PATCH] powerpc:Don't print raw EIP/LR hex values in dump_stack() and show_regs()
From: David Laight <hidden>
Date: 2020-12-21 16:44:22
Also in:
lkml
From: David Laight <hidden>
Date: 2020-12-21 16:44:22
Also in:
lkml
From: Segher Boessenkool
Sent: 21 December 2020 16:32 On Mon, Dec 21, 2020 at 04:17:21PM +0100, Christophe Leroy wrote:quoted
Le 21/12/2020 à 04:27, Xiaoming Ni a écrit :quoted
Since the commit 2b0e86cc5de6 ("powerpc/fsl_booke/32: implement KASLR infrastructure"), the powerpc system is ready to support KASLR. To reduces the risk of invalidating address randomization, don't print the EIP/LR hex values in dump_stack() and show_regs().quoted
I think your change is not enough to hide EIP address, see below a dump with you patch, you get "Faulting instruction address: 0xc03a0c14"As far as I can see the patch does nothing to the GPR printout. Often GPRs contain code addresses. As one example, the LR is moved via a GPR (often GPR0, but not always) for storing on the stack. So this needs more work.
If the dump_stack() is from an oops you need the real EIP value on order to stand any chance of making headway. Otherwise you might just as well just print 'borked - tough luck'. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)