https://github.com/torvalds/linux
Revision f2b3d8566d81deaca31f4e3163def0bea7746e11 authored by James Morse on 24 January 2019, 16:32:55 UTC, committed by Will Deacon on 01 February 2019, 14:09:50 UTC
On systems with VHE the kernel and KVM's world-switch code run at the
same exception level. Code that is only used on a VHE system does not
need to be annotated as __hyp_text as it can reside anywhere in the
 kernel text.

__hyp_text was also used to prevent kprobes from patching breakpoint
instructions into this region, as this code runs at a different
exception level. While this is no longer true with VHE, KVM still
switches VBAR_EL1, meaning a kprobe's breakpoint executed in the
world-switch code will cause a hyp-panic.

Move the __hyp_text check in the kprobes blacklist so it applies on
VHE systems too, to cover the common code and guest enter/exit
assembly.

Fixes: 888b3c8720e0 ("arm64: Treat all entry code as non-kprobe-able")
Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent 8ea2359
History
Tip revision: f2b3d8566d81deaca31f4e3163def0bea7746e11 authored by James Morse on 24 January 2019, 16:32:55 UTC
arm64: kprobe: Always blacklist the KVM world-switch code
Tip revision: f2b3d85
File Mode Size
Makefile -rw-r--r-- 1.2 KB
lockdep.c -rw-r--r-- 108.9 KB
lockdep_internals.h -rw-r--r-- 5.7 KB
lockdep_proc.c -rw-r--r-- 16.7 KB
lockdep_states.h -rw-r--r-- 207 bytes
locktorture.c -rw-r--r-- 28.3 KB
mcs_spinlock.h -rw-r--r-- 3.7 KB
mutex-debug.c -rw-r--r-- 2.7 KB
mutex-debug.h -rw-r--r-- 1.1 KB
mutex.c -rw-r--r-- 36.6 KB
mutex.h -rw-r--r-- 841 bytes
osq_lock.c -rw-r--r-- 5.6 KB
percpu-rwsem.c -rw-r--r-- 5.1 KB
qrwlock.c -rw-r--r-- 2.8 KB
qspinlock.c -rw-r--r-- 16.3 KB
qspinlock_paravirt.h -rw-r--r-- 16.1 KB
qspinlock_stat.h -rw-r--r-- 7.9 KB
rtmutex-debug.c -rw-r--r-- 4.6 KB
rtmutex-debug.h -rw-r--r-- 1.4 KB
rtmutex.c -rw-r--r-- 50.1 KB
rtmutex.h -rw-r--r-- 1.2 KB
rtmutex_common.h -rw-r--r-- 4.2 KB
rwsem-spinlock.c -rw-r--r-- 7.7 KB
rwsem-xadd.c -rw-r--r-- 20.1 KB
rwsem.c -rw-r--r-- 4.5 KB
rwsem.h -rw-r--r-- 4.3 KB
semaphore.c -rw-r--r-- 7.3 KB
spinlock.c -rw-r--r-- 9.5 KB
spinlock_debug.c -rw-r--r-- 5.5 KB
test-ww_mutex.c -rw-r--r-- 12.9 KB

back to top