summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2019-01-24 17:32:56 +0100
committerWill Deacon <will.deacon@arm.com>2019-02-01 15:10:01 +0100
commit8fac5cbdfe0f01254d9d265c6aa1a95f94f58595 (patch)
tree0dbe05cf87c553864d3632457cb5dce8867e23d4 /arch
parentarm64: kprobe: Always blacklist the KVM world-switch code (diff)
downloadlinux-8fac5cbdfe0f01254d9d265c6aa1a95f94f58595.tar.xz
linux-8fac5cbdfe0f01254d9d265c6aa1a95f94f58595.zip
arm64: hyp-stub: Forbid kprobing of the hyp-stub
The hyp-stub is loaded by the kernel's early startup code at EL2 during boot, before KVM takes ownership later. The hyp-stub's text is part of the regular kernel text, meaning it can be kprobed. A breakpoint in the hyp-stub causes the CPU to spin in el2_sync_invalid. Add it to the __hyp_text. Signed-off-by: James Morse <james.morse@arm.com> Cc: stable@vger.kernel.org Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/kernel/hyp-stub.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/kernel/hyp-stub.S b/arch/arm64/kernel/hyp-stub.S
index e1261fbaa374..17f325ba831e 100644
--- a/arch/arm64/kernel/hyp-stub.S
+++ b/arch/arm64/kernel/hyp-stub.S
@@ -28,6 +28,8 @@
#include <asm/virt.h>
.text
+ .pushsection .hyp.text, "ax"
+
.align 11
ENTRY(__hyp_stub_vectors)