All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: arm64: Move __hyp_set_vectors out of .hyp.text
@ 2021-01-28 17:38 ` Quentin Perret
  0 siblings, 0 replies; 8+ messages in thread
From: Quentin Perret @ 2021-01-28 17:38 UTC (permalink / raw)
  To: catalin.marinas, will, maz; +Cc: kernel-team, kvmarm, linux-arm-kernel

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 <qperret@google.com>
---
 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
-- 
2.30.0.280.ga3ce27912f-goog

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-01-28 21:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-28 17:38 [PATCH] KVM: arm64: Move __hyp_set_vectors out of .hyp.text Quentin Perret
2021-01-28 17:38 ` Quentin Perret
2021-01-28 18:11 ` Marc Zyngier
2021-01-28 18:11   ` Marc Zyngier
2021-01-28 20:11   ` Will Deacon
2021-01-28 20:11     ` Will Deacon
2021-01-28 21:07 ` Will Deacon
2021-01-28 21:07   ` Will Deacon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.