From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
linuxppc-dev@lists.ozlabs.org, Anton Blanchard <anton@samba.org>,
Nicholas Piggin <npiggin@gmail.com>,
Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: [RFC PATCH 2/4] powerpc: kprobe: add arch specific blacklist
Date: Fri, 18 Nov 2016 16:52:16 +0530 [thread overview]
Message-ID: <20161118112216.GE4019@naverao1-tp.localdomain> (raw)
In-Reply-To: <87y40hgwz2.fsf@concordia.ellerman.id.au>
On 2016/11/18 04:48PM, Michael Ellerman wrote:
> "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> writes:
>
> > Add symbol to mark end of entry_*.S and use the same to blacklist all
> > addresses from kernel start (_stext) to entry code from kprobes. Much of
> > this code is early exception handling where we can't really take a trap.
>
> I'm not sure about this. entry_*.S is actually a bit of jumble,
> especially the 64bit version. I've been wanting to split it up for a
> long time.
Ok. Let me take a stab at that.
>
> It doesn't actually contain any early exception handling. It does
> contain the common syscall handler, and the exception return paths, some
> of which should be black listed. And lots of other junk.
>
> Also I'm not sure if it's guaranteed that there won't be other code
> between _stext and the end of entry, it's not handled explicitly in the
> linker script, it just tends to get linked early because it's in head-y.
I actually considered that. One of the issues in trying to get entry_*
linked in early has to do with the exception common handlers - they
start at 0x7000 or 0x8000 and are placed in .text *and* I think they
need to be within 64k from the exception vectors. As such, placing
entry_* in a separate section and linking it after HEAD_TEXT resulted in
moving down the common exception handlers.
Regardless of the kprobe blacklist, does it make sense to put the common
exception handlers into a separate section so as to separate them out
from the rest of the code?
>
> So I think it would be better if we had a clearer picture of exactly
> what in this file we want to blacklist.
Agreed. As a first step, I wanted to get a coarser blacklist in place
and fine tune it later. But, I can see why entry_* needs a smaller
blacklist. I'll get back on this.
- Naveen
next prev parent reply other threads:[~2016-11-18 11:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-17 15:08 [RFC PATCH 0/4] Blacklist powerpc exception vectors from kprobes Naveen N. Rao
2016-11-17 15:08 ` [RFC PATCH 1/4] powerpc: asm: introduce new macros for assembly globals Naveen N. Rao
2016-11-18 9:41 ` Michael Ellerman
2016-11-18 11:36 ` Naveen N. Rao
2016-11-17 15:08 ` [RFC PATCH 2/4] powerpc: kprobe: add arch specific blacklist Naveen N. Rao
2016-11-18 5:48 ` Michael Ellerman
2016-11-18 7:04 ` Masami Hiramatsu
2016-11-18 11:24 ` Naveen N. Rao
2016-11-18 11:22 ` Naveen N. Rao [this message]
2016-11-17 15:08 ` [RFC PATCH 3/4] powerpc: mm/slb: convert slb_low.S to use the new macros Naveen N. Rao
2016-11-17 15:08 ` [RFC PATCH 4/4] powerpc: mm/slb: blacklist symbols from kprobe Naveen N. Rao
2016-11-18 9:36 ` Michael Ellerman
2016-11-18 11:26 ` 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=20161118112216.GE4019@naverao1-tp.localdomain \
--to=naveen.n.rao@linux.vnet.ibm.com \
--cc=ananth@in.ibm.com \
--cc=anton@samba.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mhiramat@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.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).