diff options
author | Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> | 2017-09-22 11:10:45 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-10-04 14:42:17 +0200 |
commit | bf3a91251735863fcb230c96e984ebcacee820d9 (patch) | |
tree | a54610879baee8bc1b545f6e958e97aae080eec4 /arch/powerpc/kernel/kprobes.c | |
parent | powerpc/kprobes: Do not suppress instruction emulation if a single run failed (diff) | |
download | linux-bf3a91251735863fcb230c96e984ebcacee820d9.tar.xz linux-bf3a91251735863fcb230c96e984ebcacee820d9.zip |
powerpc/kprobes: Clean up jprobe detection in livepatch handler
In commit c05b8c4474c03 ("powerpc/kprobes: Skip livepatch_handler() for
jprobes"), we added a helper is_current_kprobe_addr() to help detect if
the modified regs->nip was due to a jprobe or livepatch. Masami felt
that the function name was not quite clear. To that end, this patch
renames is_current_kprobe_addr() to __is_active_jprobe() and adds a
comment to (hopefully) better clarify the purpose of this helper. The
helper has also now been moved to kprobes-ftrace.c so that it is only
available for KPROBES_ON_FTRACE.
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/kprobes.c')
-rw-r--r-- | arch/powerpc/kernel/kprobes.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 4c1702423676..48a81614f629 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c @@ -43,12 +43,6 @@ DEFINE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); struct kretprobe_blackpoint kretprobe_blacklist[] = {{NULL, NULL}}; -int is_current_kprobe_addr(unsigned long addr) -{ - struct kprobe *p = kprobe_running(); - return (p && (unsigned long)p->addr == addr) ? 1 : 0; -} - bool arch_within_kprobe_blacklist(unsigned long addr) { return (addr >= (unsigned long)__kprobes_text_start && |