arm64: hyp-stub: Forbid kprobing of the hyp-stub
authorJames Morse <james.morse@arm.com>
Thu, 24 Jan 2019 16:32:56 +0000 (16:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Feb 2019 16:33:28 +0000 (17:33 +0100)
commitc5edde98996581443f7f5735b545f65ec050e4ec
treef85b83e1e9ed2ddb7a057784697c78b11b7eddf6
parent62d1d2b720db405c94d85191083bb2eb218a55c0
arm64: hyp-stub: Forbid kprobing of the hyp-stub

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@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/hyp-stub.S