Thread (4 messages) 4 messages, 3 authors, 2021-01-28

Re: [PATCH] KVM: arm64: Move __hyp_set_vectors out of .hyp.text

From: Marc Zyngier <maz@kernel.org>
Date: 2021-01-28 18:13:07
Also in: kvmarm

On 2021-01-28 17:38, Quentin Perret wrote:
quoted hunk ↗ jump to hunk
The .hyp.text section is supposed to be reserved for the nVHE EL2 code.
However, there is currently one occurrence of EL1 executing code 
located
in .hyp.text when calling __hyp_{re}set_vectors(), which happen to sit
next to the EL2 stub vectors. While not a problem yet, such patterns
will cause issues when removing the host kernel from the TCB, so a
cleaner split would be preferable.

Fix this by delimiting the end of the .hyp.text section in hyp-stub.S.

Signed-off-by: Quentin Perret <redacted>
---
 arch/arm64/kernel/hyp-stub.S | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/arch/arm64/kernel/hyp-stub.S 
b/arch/arm64/kernel/hyp-stub.S
index 160f5881a0b7..8a60f9c586bb 100644
--- a/arch/arm64/kernel/hyp-stub.S
+++ b/arch/arm64/kernel/hyp-stub.S
@@ -85,6 +85,8 @@ SYM_CODE_END(\label)
 	invalid_vector	el1_fiq_invalid
 	invalid_vector	el1_error_invalid

+	.popsection
+
 /*
  * __hyp_set_vectors: Call this after boot to set the initial 
hypervisor
  * vectors as part of hypervisor installation.  On an SMP system, this 
should
Thanks for tracking this one down, Quentin.

Catalin, Will: should you want to take this one via the arm64 tree,
please add my

Acked-by: Marc Zyngier <maz:kernel.org>

Thanks,

         M.
-- 
Jazz is not dead. It just smells funny...

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help