arm64: suspend: restore the kernel ptrauth keys
authorAmit Daniel Kachhap <amit.kachhap@arm.com>
Fri, 13 Mar 2020 09:05:01 +0000 (14:35 +0530)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 18 Mar 2020 09:50:21 +0000 (09:50 +0000)
commite51f5f56dd69e009e22af8a4354dce0817a7addb
tree182804e98137612faba8658ff92a128e37ac5c2b
parentcdcb61ae4c56f9edcd1eca4c2df444f3f5e96e1d
arm64: suspend: restore the kernel ptrauth keys

This patch restores the kernel keys from current task during cpu resume
after the mmu is turned on and ptrauth is enabled.

A flag is added in macro ptrauth_keys_install_kernel to check if isb
instruction needs to be executed.

Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Reviewed-by: Vincenzo Frascino <Vincenzo.Frascino@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/asm_pointer_auth.h
arch/arm64/kernel/entry.S
arch/arm64/mm/proc.S