Skip to content

Commit

Permalink
ARM: 8770/1: kprobes: Prohibit probing on optimized_callback
Browse files Browse the repository at this point in the history
Prohibit probing on optimized_callback() because
it is called from kprobes itself. If we put a kprobes
on it, that will cause a recursive call loop.
Mark it NOKPROBE_SYMBOL.

Fixes: 0dc016d ("ARM: kprobes: enable OPTPROBES for ARM 32")
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
  • Loading branch information
Masami Hiramatsu authored and Russell King committed May 19, 2018
1 parent 69af7e2 commit 70948c0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/probes/kprobes/opt-arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ optimized_callback(struct optimized_kprobe *op, struct pt_regs *regs)

local_irq_restore(flags);
}
NOKPROBE_SYMBOL(optimized_callback)

int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *orig)
{
Expand Down

0 comments on commit 70948c0

Please sign in to comment.