diff options
author | Sami Tolvanen <samitolvanen@google.com> | 2020-04-27 09:00:15 -0700 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-05-15 16:35:50 +0100 |
commit | 9654736891c3ac6a60b52ce70d33cf57cf95bff7 (patch) | |
tree | 19d185903f3721fc76a47f31ad6a1379184a111f | |
parent | cde5dec89e5dee5a6de12cd99fdb24651ee03146 (diff) | |
download | lwn-9654736891c3ac6a60b52ce70d33cf57cf95bff7.tar.gz lwn-9654736891c3ac6a60b52ce70d33cf57cf95bff7.zip |
arm64: Disable SCS for hypervisor code
Disable SCS for code that runs at a different exception level by
adding __noscs to __hyp_text.
Suggested-by: James Morse <james.morse@arm.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r-- | arch/arm64/include/asm/kvm_hyp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/kvm_hyp.h b/arch/arm64/include/asm/kvm_hyp.h index fe57f60f06a8..875b106c5d98 100644 --- a/arch/arm64/include/asm/kvm_hyp.h +++ b/arch/arm64/include/asm/kvm_hyp.h @@ -13,7 +13,7 @@ #include <asm/kvm_mmu.h> #include <asm/sysreg.h> -#define __hyp_text __section(.hyp.text) notrace +#define __hyp_text __section(.hyp.text) notrace __noscs #define read_sysreg_elx(r,nvh,vh) \ ({ \ |