aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/assembler.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <[email protected]>2018-05-13 04:04:29 +0000
committerRussell King <[email protected]>2018-05-19 10:35:56 +0000
commit0d73c3f8e7f6ee2aab1bb350f60c180f5ae21a2c (patch)
tree1157529f1984e2f576326efb9fcc5dda67a9da86 /arch/arm/include/asm/assembler.h
parentARM: 8771/1: kprobes: Prohibit kprobes on do_undefinstr (diff)
downloadkernel-0d73c3f8e7f6ee2aab1bb350f60c180f5ae21a2c.tar.gz
kernel-0d73c3f8e7f6ee2aab1bb350f60c180f5ae21a2c.zip
ARM: 8772/1: kprobes: Prohibit kprobes on get_user functions
Since do_undefinstr() uses get_user to get the undefined instruction, it can be called before kprobes processes recursive check. This can cause an infinit recursive exception. Prohibit probing on get_user functions. Fixes: 24ba613c9d6c ("ARM kprobes: core code") Signed-off-by: Masami Hiramatsu <[email protected]> Cc: [email protected] Signed-off-by: Russell King <[email protected]>
Diffstat (limited to 'arch/arm/include/asm/assembler.h')
-rw-r--r--arch/arm/include/asm/assembler.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h
index bc8d4bbd82e2..9342904cccca 100644
--- a/arch/arm/include/asm/assembler.h
+++ b/arch/arm/include/asm/assembler.h
@@ -536,4 +536,14 @@ THUMB( orr \reg , \reg , #PSR_T_BIT )
#endif
.endm
+#ifdef CONFIG_KPROBES
+#define _ASM_NOKPROBE(entry) \
+ .pushsection "_kprobe_blacklist", "aw" ; \
+ .balign 4 ; \
+ .long entry; \
+ .popsection
+#else
+#define _ASM_NOKPROBE(entry)
+#endif
+
#endif /* __ASM_ASSEMBLER_H__ */