All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Nicholas Piggin <npiggin@gmail.com>,
	"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v3 4/6] powerpc/64s: Un-blacklist system_call() from kprobes
Date: Thu, 22 Jun 2017 21:14:21 +1000	[thread overview]
Message-ID: <8737ass29e.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20170622134112.4bd32543@roar.ozlabs.ibm.com>

Nicholas Piggin <npiggin@gmail.com> writes:

> On Thu, 22 Jun 2017 00:08:40 +0530
> "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:
>
>> It is actually safe to probe system_call() in entry_64.S, but only till
>> we unset MSR_RI. To allow this, add a new symbol system_call_exit()
>> after the mtmsrd and blacklist that. Though the mtmsrd instruction
>> itself is now whitelisted, we won't be allowed to probe on it as we
>> don't allow probing on rfi and mtmsr instructions (checked for in
>> arch_prepare_kprobe()).
>
> Can you add a little comment to say probes aren't allowed, and it's
> located after the mtmsr in order to avoid contaminating traces?
>
> Also I wonder if a slightly different name would be more instructive?
> I don't normally care, but the system_call_common code isn't trivial
> to follow. system_call_exit might give the impression that it is the
> entire exit path (which would pair with system_call for entry).

It is the entire path in the happy case isn't it? I'm not sure I know
what you mean.

> Perhaps system_call_exit_notrace? No that sucks too :(

A bit :D

If you're tracing etc. then you'll be in syscall_exit_work, isn't that
sufficient to differentiate the two?

cheers

  reply	other threads:[~2017-06-22 11:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21 18:38 [PATCH v3 0/6] powerpc: build out kprobes blacklist -- series 3 Naveen N. Rao
2017-06-21 18:38 ` [PATCH v3 1/6] powerpc64/elfv1: Validate function pointer address in the function descriptor Naveen N. Rao
2017-06-22  3:22   ` Nicholas Piggin
2017-06-22 10:59     ` Michael Ellerman
2017-06-22 13:06       ` Nicholas Piggin
2017-06-22 14:01         ` Naveen N. Rao
2017-06-21 18:38 ` [PATCH v3 2/6] powerpc/64s: Convert .L__replay_interrupt_return to a local label Naveen N. Rao
2017-06-22  3:23   ` Nicholas Piggin
2017-06-21 18:38 ` [PATCH v3 3/6] powerpc/64s: Blacklist system_call() and system_call_common() from kprobes Naveen N. Rao
2017-06-22  3:36   ` Nicholas Piggin
2017-06-22 11:07     ` Michael Ellerman
2017-06-22 13:08       ` Nicholas Piggin
2017-06-22 14:34         ` Naveen N. Rao
2017-06-21 18:38 ` [PATCH v3 4/6] powerpc/64s: Un-blacklist system_call() " Naveen N. Rao
2017-06-22  3:41   ` Nicholas Piggin
2017-06-22 11:14     ` Michael Ellerman [this message]
2017-06-22 13:14       ` Nicholas Piggin
2017-06-22 15:43         ` Naveen N. Rao
2017-06-21 18:38 ` [PATCH v3 5/6] powerpc/64s: Blacklist functions invoked on a trap Naveen N. Rao
2017-06-22  3:44   ` Nicholas Piggin
2017-06-22 11:12     ` Michael Ellerman
2017-06-21 18:38 ` [PATCH v3 6/6] powerpc/64s: Blacklist rtas entry/exit from kprobes Naveen N. Rao
2017-06-22  3:48   ` Nicholas Piggin
2017-06-22 16:52     ` 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=8737ass29e.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mhiramat@kernel.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.