linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Nicholas Piggin <npiggin@gmail.com>,
	Anton Blanchard <anton@samba.org>
Subject: Re: [v5, 1/7] powerpc64/elfv1: Only dereference function descriptor for non-text symbols
Date: Tue,  4 Jul 2017 20:48:36 +1000 (AEST)	[thread overview]
Message-ID: <3x212D24Vhz9s71@ozlabs.org> (raw)
In-Reply-To: <4bd8ff1d8855711d3bf8a11eecc8068e3aabac03.1498755960.git.naveen.n.rao@linux.vnet.ibm.com>

On Thu, 2017-06-29 at 17:49:14 UTC, "Naveen N. Rao" wrote:
> Currently, we assume that the function pointer we receive in
> ppc_function_entry() points to a function descriptor. However, this is
> not always the case. In particular, assembly symbols without the right
> annotation do not have an associated function descriptor. Some of these
> symbols are added to the kprobe blacklist using _ASM_NOKPROBE_SYMBOL().
> 
> When such addresses are subsequently processed through
> arch_deref_entry_point() in populate_kprobe_blacklist(), we see the
> below errors during bootup:
>     [    0.663963] Failed to find blacklist at 7d9b02a648029b6c
>     [    0.663970] Failed to find blacklist at a14d03d0394a0001
>     [    0.663972] Failed to find blacklist at 7d5302a6f94d0388
>     [    0.663973] Failed to find blacklist at 48027d11e8610178
>     [    0.663974] Failed to find blacklist at f8010070f8410080
>     [    0.663976] Failed to find blacklist at 386100704801f89d
>     [    0.663977] Failed to find blacklist at 7d5302a6f94d00b0
> 
> Fix this by checking if the function pointer we receive in
> ppc_function_entry() already points to kernel text. If so, we just
> return it as is. If not, we assume that this is a function descriptor
> and proceed to dereference it.
> 
> Suggested-by: Nicholas Piggin <npiggin@gmail.com>
> Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>

Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/83e840c770f2c578bbbff478d62a44

cheers

  reply	other threads:[~2017-07-04 10:48 UTC|newest]

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

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=3x212D24Vhz9s71@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=anton@samba.org \
    --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 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).