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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2018 19:22:53 +0000 (20:22 +0100)
commit6b47a8256a56c261ab008863a548f245fdcc8b11
treeb1d0adcc0a7e74473ec1ba09f5f98b926d485cc3
parentaab3306701f10c5dc35d8da74431cde6249baf0b
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: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/entry.S
arch/arm64/mm/fault.c