[PATCH 4.14 27/46] arm64: hyp-stub: Forbid kprobing of the hyp-stub
From: Greg Kroah-Hartman
Date: Mon Feb 04 2019 - 05:46:18 EST
4.14-stable review patch. If anyone has any objections, please let me know.
From: James Morse <james.morse@xxxxxxx>
commit 8fac5cbdfe0f01254d9d265c6aa1a95f94f58595 upstream.
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@xxxxxxx>
Signed-off-by: Will Deacon <will.deacon@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
arch/arm64/kernel/hyp-stub.S | 2 ++
1 file changed, 2 insertions(+)
@@ -28,6 +28,8 @@
+ .pushsection .hyp.text, "ax"