ARM: probes: avoid adding kprobes to sensitive kernel-entry/exit code
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 24 Nov 2017 23:54:22 +0000 (23:54 +0000)
committerRussell King <rmk+kernel@armlinux.org.uk>
Sun, 17 Dec 2017 22:14:21 +0000 (22:14 +0000)
commitc608906165355089a4de3c9133c72e81e011096c
treecc1a76bc86bdcc8f0e69e4e3cb7874dcfccd26d2
parent75fea300d73ae5b18957949a53ec770daaeb6fc2
ARM: probes: avoid adding kprobes to sensitive kernel-entry/exit code

Avoid adding kprobes to any of the kernel entry/exit or startup
assembly code, or code in the identity-mapped region.  This code does
not conform to the standard C conventions, which means that the
expectations of the kprobes code is not forfilled.

Placing kprobes at some of these locations results in the kernel trying
to return to userspace addresses while retaining the CPU in kernel mode.

Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/include/asm/exception.h
arch/arm/include/asm/sections.h
arch/arm/include/asm/traps.h
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-common.S
arch/arm/kernel/stacktrace.c
arch/arm/kernel/traps.c
arch/arm/kernel/vmlinux-xip.lds.S
arch/arm/kernel/vmlinux.lds.S
arch/arm/mm/fault.c
arch/arm/probes/kprobes/core.c