arm64: entry: Apply BP hardening for high-priority synchronous exceptions
authorWill Deacon <will.deacon@arm.com>
Fri, 2 Feb 2018 17:31:39 +0000 (17:31 +0000)
committerHaibo Chen <haibo.chen@nxp.com>
Thu, 12 Apr 2018 10:46:27 +0000 (18:46 +0800)
commit617fde87812e2335a88ab10606772a0485e5481f
tree0033bdb7f890b8419a7142e1eaaa799a70596dfe
parent20e609547b156485c67dc910362494d09da59457
arm64: entry: Apply BP hardening for high-priority synchronous exceptions

commit 5dfc6ed27710 upstream.

Software-step and PC alignment fault exceptions have higher priority than
instruction abort exceptions, so apply the BP hardening hooks there too
if the user PC appears to reside in kernel space.

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>
Conflicts:
expand enable_da_f to 'msr daifclr, #(8 | 4 | 1)'
in arch/arm64/kernel/entry.S
arch/arm64/kernel/entry.S
arch/arm64/mm/fault.c