diff options
author | Shanker Donthineni <shankerd@codeaurora.org> | 2018-01-05 14:28:59 -0600 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2018-01-08 18:47:07 +0000 |
commit | ec82b567a74fbdffdf418d4bb381d55f6a9096af (patch) | |
tree | 2f2320743f4d3c73044dba107850bde53644f907 /arch/arm64/kernel/bpi.S | |
parent | aa6acde65e03186b5add8151e1ffe36c3c62639b (diff) | |
download | linux-ec82b567a74fbdffdf418d4bb381d55f6a9096af.tar.gz linux-ec82b567a74fbdffdf418d4bb381d55f6a9096af.tar.bz2 linux-ec82b567a74fbdffdf418d4bb381d55f6a9096af.zip |
arm64: Implement branch predictor hardening for Falkor
Falkor is susceptible to branch predictor aliasing and can
theoretically be attacked by malicious code. This patch
implements a mitigation for these attacks, preventing any
malicious entries from affecting other victim contexts.
Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org>
[will: fix label name when !CONFIG_KVM and remove references to MIDR_FALKOR]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/bpi.S')
-rw-r--r-- | arch/arm64/kernel/bpi.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm64/kernel/bpi.S b/arch/arm64/kernel/bpi.S index dec95bd82e31..76225c2611ea 100644 --- a/arch/arm64/kernel/bpi.S +++ b/arch/arm64/kernel/bpi.S @@ -77,3 +77,11 @@ ENTRY(__psci_hyp_bp_inval_start) ldp x0, x1, [sp, #(16 * 8)] add sp, sp, #(8 * 18) ENTRY(__psci_hyp_bp_inval_end) + +ENTRY(__qcom_hyp_sanitize_link_stack_start) + stp x29, x30, [sp, #-16]! + .rept 16 + bl . + 4 + .endr + ldp x29, x30, [sp], #16 +ENTRY(__qcom_hyp_sanitize_link_stack_end) |