linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Anton Blanchard <anton@samba.org>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v4 7/7] powerpc/64s: Blacklist rtas entry/exit from kprobes
Date: Thu, 29 Jun 2017 22:13:11 +1000	[thread overview]
Message-ID: <20170629221311.1c1c1dd6@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <20170629115414.7avzpd57ficdq3me@naverao1-tp.localdomain>

On Thu, 29 Jun 2017 17:24:14 +0530
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:

> On 2017/06/29 09:01PM, Nicholas Piggin wrote:
> > On Thu, 29 Jun 2017 16:11:10 +0530
> > "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:
> >   
> > > We can't take traps with relocation off, so blacklist enter_rtas() and
> > > rtas_return_loc(). However, instead of blacklisting all of enter_rtas(),
> > > introduce a new symbol __enter_rtas from where on we can't take a trap
> > > and blacklist that.
> > > 
> > > Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> > > ---
> > >  arch/powerpc/kernel/entry_64.S | 3 +++
> > >  1 file changed, 3 insertions(+)
> > > 
> > > diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
> > > index 0c27084800b6..16f4c4a1a294 100644
> > > --- a/arch/powerpc/kernel/entry_64.S
> > > +++ b/arch/powerpc/kernel/entry_64.S
> > > @@ -1082,6 +1082,7 @@ _GLOBAL(enter_rtas)
> > >  	sync				/* disable interrupts so SRR0/1 */
> > >  	mtmsrd	r0			/* don't get trashed */
> > >  
> > > +__enter_rtas:  
> > 
> > Hmm, am I missing something, or is there a reason to put these labels
> > after the mtmsr? Even if kprobes does the right thing, I think it's
> > easier to read the code if you cover the mtmsr as well.  
> 
> I thought you asked for this, per your previous review comment:
> https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg119667.html
> 
> Or, did I get that wrong?

No you're right, I'm contradicting myself. Let me start again.

I think we'd like to put the label before the mtmsrd if possible. So
in that case, should we adjust the system call code instead (then you
wouldn't have to add a comment for it).

And then you could move this label back above the mtmsrd. Sorry for
the confusion.

Thanks,
Nick

  reply	other threads:[~2017-06-29 12:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-29 10:41 [PATCH v4 0/7] powerpc: build out kprobes blacklist -- series 3 Naveen N. Rao
2017-06-29 10:41 ` [PATCH v4 1/7] powerpc64/elfv1: Only dereference function descriptor for non-text symbols Naveen N. Rao
2017-06-29 10:49   ` Nicholas Piggin
2017-06-29 11:48     ` Naveen N. Rao
2017-06-29 10:41 ` [PATCH v4 2/7] powerpc/64s: Convert .L__replay_interrupt_return to a local label Naveen N. Rao
2017-06-29 10:41 ` [PATCH v4 3/7] powerpc/64s: Blacklist system_call() and system_call_common() from kprobes Naveen N. Rao
2017-06-29 10:41 ` [PATCH v4 4/7] powerpc/64s: Move system_call() symbol to just after setting MSR_EE Naveen N. Rao
2017-06-29 11:44   ` Nicholas Piggin
2017-06-29 10:41 ` [PATCH v4 5/7] powerpc/64s: Un-blacklist system_call() from kprobes Naveen N. Rao
2017-06-29 10:55   ` Nicholas Piggin
2017-06-29 11:51     ` Naveen N. Rao
2017-06-29 10:41 ` [PATCH v4 6/7] powerpc/64s: Blacklist functions invoked on a trap Naveen N. Rao
2017-06-29 10:41 ` [PATCH v4 7/7] powerpc/64s: Blacklist rtas entry/exit from kprobes Naveen N. Rao
2017-06-29 11:01   ` Nicholas Piggin
2017-06-29 11:54     ` Naveen N. Rao
2017-06-29 12:13       ` Nicholas Piggin [this message]
2017-06-29 16:51         ` Naveen N. Rao

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=20170629221311.1c1c1dd6@roar.ozlabs.ibm.com \
    --to=npiggin@gmail.com \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=anton@samba.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mhiramat@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).