]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Move __hyp_set_vectors out of .hyp.text
authorQuentin Perret <qperret@google.com>
Thu, 28 Jan 2021 17:38:50 +0000 (17:38 +0000)
committerWill Deacon <will@kernel.org>
Thu, 28 Jan 2021 20:08:43 +0000 (20:08 +0000)
commit9c3b8686ae7e22d24f796b46cf0d694f35220848
tree9217786f14c8e45199138a75a3cbf66004a28c7b
parentbb5e04f6d9172684a93c72c02bb9e9db79f84d93
KVM: arm64: Move __hyp_set_vectors out of .hyp.text

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.

Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Quentin Perret <qperret@google.com>
Link: https://lore.kernel.org/r/20210128173850.2478161-1-qperret@google.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/hyp-stub.S