arm64: entry: Apply BP hardening for suspicious interrupts from EL0
authorWill Deacon <will.deacon@arm.com>
Fri, 2 Feb 2018 17:31:40 +0000 (17:31 +0000)
committerHaibo Chen <haibo.chen@nxp.com>
Thu, 12 Apr 2018 10:46:28 +0000 (18:46 +0800)
commit1a49deab3121b3cd86addfdf5f8e1fd20812b94b
treee36037d102c6ed04473b1cbece90eb2a266befc4
parent617fde87812e2335a88ab10606772a0485e5481f
arm64: entry: Apply BP hardening for suspicious interrupts from EL0

commit 30d88c0e3ace upstream.

It is possible to take an IRQ from EL0 following a branch to a kernel
address in such a way that the IRQ is prioritised over the instruction
abort. Whilst an attacker would need to get the stars to align here,
it might be sufficient with enough calibration so perform BP hardening
in the rare case that we see a kernel address in the ELR when handling
an IRQ from EL0.

Reported-by: Dan Hettena <dhettena@nvidia.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm64/kernel/entry.S
arch/arm64/mm/fault.c