[PATCH] arm64: prevent instrumentation of bp hardening callbacks

Marc Zyngier maz at kernel.org
Fri Feb 25 05:52:35 PST 2022


On Thu, 24 Feb 2022 18:10:28 +0000,
Mark Rutland <mark.rutland at arm.com> wrote:
> 
> We may call arm64_apply_bp_hardening() early during entry (e.g. in
> el0_ia()) before it is safe to run instrumented code. Unfortunately this
> may result in running instrumented code in two cases:

[...]

> Fixes: ec82b567a74fbdff ("arm64: Implement branch predictor hardening for Falkor")
> Fixes: b092201e00206141 ("arm64: Add ARM_SMCCC_ARCH_WORKAROUND_1 BP hardening support")
> Fixes: d4647f0a2ad71110 ("arm64: Rewrite Spectre-v2 mitigation code")
> Fixes: 0f15adbb2861ce6f ("arm64: Add skeleton to harden the branch predictor against aliasing attacks")
> Fixes: 6279017e807708a0 ("KVM: arm64: Move BP hardening helpers into spectre.h")
> Signed-off-by: Mark Rutland <mark.rutland at arm.com>
> Cc: Ard Biesheuvel <ardb at kernel.org>
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: James Morse <james.morse at arm.com>
> Cc: Marc Zyngier <maz at kernel.org>
> Cc: Mark Brown <broonie at kernel.org>
> Cc: Will Deacon <will at kernel.org>

Acked-by: Marc Zyngier <maz at kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list