ARM: 8770/1: kprobes: Prohibit probing on optimized_callback
authorMasami Hiramatsu <mhiramat@kernel.org>
Sun, 13 May 2018 04:04:10 +0000 (05:04 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Sat, 19 May 2018 10:35:56 +0000 (11:35 +0100)
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: 0dc016dbd820 ("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>
arch/arm/probes/kprobes/opt-arm.c

index ddc5a82eb10d993f859ec215d6e7a2e2be9d3d8a..b2aa9b32bff2b5e9d2e6d102a4cd58f6cf8c5676 100644 (file)
@@ -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)
 {