Skip to content

Commit 8fac5cb

Browse files
James Morsewildea01
authored andcommitted
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>
1 parent f2b3d85 commit 8fac5cb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/arm64/kernel/hyp-stub.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
#include <asm/virt.h>
2929

3030
.text
31+
.pushsection .hyp.text, "ax"
32+
3133
.align 11
3234

3335
ENTRY(__hyp_stub_vectors)

0 commit comments

Comments
 (0)