linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Query: How to blacklist asm symbols for kprobe
@ 2015-06-29  9:16 Pratyush Anand
  2015-07-03 10:07 ` Pratyush Anand
  2015-07-06 10:22 ` Masami Hiramatsu
  0 siblings, 2 replies; 3+ messages in thread
From: Pratyush Anand @ 2015-06-29  9:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: masami.hiramatsu.pt, dave.long, will.deacon

Hi,

There might be some symbols defined in asm file, which need to be
prevented for kprobe-ing.

For example, el0_sync, el1_sync, el0_dbg, el1_dbg etc (in
arch/arm64/kernel/entry.S) should be added to the kprobe blacklist
table. How can we do that?

~Pratyush

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Query: How to blacklist asm symbols for kprobe
  2015-06-29  9:16 Query: How to blacklist asm symbols for kprobe Pratyush Anand
@ 2015-07-03 10:07 ` Pratyush Anand
  2015-07-06 10:22 ` Masami Hiramatsu
  1 sibling, 0 replies; 3+ messages in thread
From: Pratyush Anand @ 2015-07-03 10:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: masami.hiramatsu.pt, dave.long, will.deacon

On 29/06/2015:02:46:13 PM, Pratyush Anand wrote:
> Hi,
> 
> There might be some symbols defined in asm file, which need to be
> prevented for kprobe-ing.
> 
> For example, el0_sync, el1_sync, el0_dbg, el1_dbg etc (in
> arch/arm64/kernel/entry.S) should be added to the kprobe blacklist
> table. How can we do that?

I think, we need to define them under "section .entry.text" and then
to use arch_within_kprobe_blacklist to prevent such symbols from kprobing.

~Pratyush

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Query: How to blacklist asm symbols for kprobe
  2015-06-29  9:16 Query: How to blacklist asm symbols for kprobe Pratyush Anand
  2015-07-03 10:07 ` Pratyush Anand
@ 2015-07-06 10:22 ` Masami Hiramatsu
  1 sibling, 0 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2015-07-06 10:22 UTC (permalink / raw)
  To: Pratyush Anand, linux-kernel; +Cc: dave.long, will.deacon

On 2015/06/29 18:16, Pratyush Anand wrote:
> Hi,
> 
> There might be some symbols defined in asm file, which need to be
> prevented for kprobe-ing.
> 
> For example, el0_sync, el1_sync, el0_dbg, el1_dbg etc (in
> arch/arm64/kernel/entry.S) should be added to the kprobe blacklist
> table. How can we do that?
> 

You can port and use _ASM_NOKPROBE(symbol) macro in .S file.

In arch/x86/include/asm/asm.h, it is defined as below.

# define _ASM_NOKPROBE(entry)                                   \
        .pushsection "_kprobe_blacklist","aw" ;                 \
        _ASM_ALIGN ;                                            \
        _ASM_PTR (entry);                                       \
        .popsection

Thank you,


-- 
Masami HIRAMATSU
Linux Technology Research Center, System Productivity Research Dept.
Center for Technology Innovation - Systems Engineering
Hitachi, Ltd., Research & Development Group
E-mail: masami.hiramatsu.pt@hitachi.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-06 10:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-29  9:16 Query: How to blacklist asm symbols for kprobe Pratyush Anand
2015-07-03 10:07 ` Pratyush Anand
2015-07-06 10:22 ` Masami Hiramatsu

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