arm64: Add percpu vectors for EL1
stable inclusion from stable-v4.19.236 commit 5b5ca2608fbd6f250281b6a1d0d73613f250e6f1 category: bugfix bugzilla: 186460, https://gitee.com/src-openeuler/kernel/issues/I53MHA CVE: CVE-2022-23960 -------------------------------- commit bd09128d16fac3c34b80bd6a29088ac632e8ce09 upstream. The Spectre-BHB workaround adds a firmware call to the vectors. This is needed on some CPUs, but not others. To avoid the unaffected CPU in a big/little pair from making the firmware call, create per cpu vectors. The per-cpu vectors only apply when returning from EL0. Systems using KPTI can use the canonical 'full-fat' vectors directly at EL1, the trampoline exit code will switch to this_cpu_vector on exit to EL0. Systems not using KPTI should always use this_cpu_vector. this_cpu_vector will point at a vector in tramp_vecs or __bp_harden_el1_vectors, depending on whether KPTI is in use. Reviewed-by:Catalin Marinas <catalin.marinas@arm.com> Signed-off-by:
James Morse <james.morse@arm.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Conflicts: arch/arm64/kernel/cpufeature.c arch/arm64/kvm/hyp/switch.c Signed-off-by:
Chen Jiahao <chenjiahao16@huawei.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Reviewed-by:
Liao Chang <liaochang1@huawei.com> Signed-off-by:
Yongqiang Liu <liuyongqiang13@huawei.com>
Showing
- arch/arm64/include/asm/mmu.h 1 addition, 1 deletionarch/arm64/include/asm/mmu.h
- arch/arm64/include/asm/vectors.h 27 additions, 0 deletionsarch/arm64/include/asm/vectors.h
- arch/arm64/kernel/cpufeature.c 11 additions, 0 deletionsarch/arm64/kernel/cpufeature.c
- arch/arm64/kernel/entry.S 10 additions, 6 deletionsarch/arm64/kernel/entry.S
- arch/arm64/kvm/hyp/switch.c 6 additions, 2 deletionsarch/arm64/kvm/hyp/switch.c
Please register or sign in to comment