public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel•crashing.org>
To: Christophe Leroy <christophe.leroy@csgroup•eu>
Cc: Xiaoming Ni <nixiaoming@huawei•com>,
	ravi.bangoria@linux•ibm.com, mikey@neuling•org,
	yanaijie@huawei•com, haren@linux•ibm.com,
	linux-kernel@vger•kernel.org, npiggin@gmail•com,
	wangle6@huawei•com, paulus@samba•org, aneesh.kumar@linux•ibm.com,
	linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH] powerpc:Don't print raw EIP/LR hex values in dump_stack() and show_regs()
Date: Mon, 21 Dec 2020 10:31:30 -0600	[thread overview]
Message-ID: <20201221163130.GZ2672@gate.crashing.org> (raw)
In-Reply-To: <2279fc96-1f10-0c3f-64d9-734f18758620@csgroup.eu>

On Mon, Dec 21, 2020 at 04:17:21PM +0100, Christophe Leroy wrote:
> Le 21/12/2020 à 04:27, Xiaoming Ni a écrit :
> >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().

> 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.


Segher

  reply	other threads:[~2020-12-21 16:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21  3:27 [PATCH] powerpc:Don't print raw EIP/LR hex values in dump_stack() and show_regs() Xiaoming Ni
2020-12-21 15:17 ` Christophe Leroy
2020-12-21 16:31   ` Segher Boessenkool [this message]
2020-12-21 16:42     ` David Laight
2020-12-21 17:12       ` Segher Boessenkool
2020-12-22 13:45         ` Xiaoming Ni
2020-12-22 17:29           ` Segher Boessenkool
2020-12-22 17:45             ` Christophe Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201221163130.GZ2672@gate.crashing.org \
    --to=segher@kernel$(echo .)crashing.org \
    --cc=aneesh.kumar@linux$(echo .)ibm.com \
    --cc=christophe.leroy@csgroup$(echo .)eu \
    --cc=haren@linux$(echo .)ibm.com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mikey@neuling$(echo .)org \
    --cc=nixiaoming@huawei$(echo .)com \
    --cc=npiggin@gmail$(echo .)com \
    --cc=paulus@samba$(echo .)org \
    --cc=ravi.bangoria@linux$(echo .)ibm.com \
    --cc=wangle6@huawei$(echo .)com \
    --cc=yanaijie@huawei$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox