Skip to content

Commit

Permalink
arm64: hyp-stub: Forbid kprobing of the hyp-stub
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
James Morse authored and Will Deacon committed Feb 1, 2019
1 parent f2b3d85 commit 8fac5cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm64/kernel/hyp-stub.S
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include <asm/virt.h>

.text
.pushsection .hyp.text, "ax"

.align 11

ENTRY(__hyp_stub_vectors)
Expand Down

0 comments on commit 8fac5cb

Please sign in to comment.