]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: install user ptrauth keys at kernel exit time
authorKristina Martsenko <kristina.martsenko@arm.com>
Fri, 13 Mar 2020 09:04:51 +0000 (14:34 +0530)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 18 Mar 2020 09:50:19 +0000 (09:50 +0000)
commite300fcf0b15db82c7fdac752ab84e211d907649a
tree99ba6277bb813d8d239e52bfebad736d707a4080
parentf98e0d1e0f075726b44d9b722c340a8338c72f60
arm64: install user ptrauth keys at kernel exit time

As we're going to enable pointer auth within the kernel and use a
different APIAKey for the kernel itself, so move the user APIAKey
switch to EL0 exception return.

The other 4 keys could remain switched during task switch, but are also
moved to keep things consistent.

Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: James Morse <james.morse@arm.com>
Reviewed-by: Vincenzo Frascino <Vincenzo.Frascino@arm.com>
Signed-off-by: Kristina Martsenko <kristina.martsenko@arm.com>
[Amit: commit msg, re-positioned the patch, comments]
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/asm_pointer_auth.h [new file with mode: 0644]
arch/arm64/include/asm/pointer_auth.h
arch/arm64/kernel/asm-offsets.c
arch/arm64/kernel/entry.S
arch/arm64/kernel/pointer_auth.c
arch/arm64/kernel/process.c