diff options
author | Amit Daniel Kachhap <amit.kachhap@arm.com> | 2020-03-13 14:34:57 +0530 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2020-03-18 09:50:20 +0000 |
commit | 28321582334c261c13b20d7efe634e610b4c100b (patch) | |
tree | 1a345f68e800b30309c0b710048d97dea3aecf16 /include/linux/stackprotector.h | |
parent | 33e45234987ea3ed4b05fc512f4441696478f12d (diff) | |
download | lwn-28321582334c261c13b20d7efe634e610b4c100b.tar.gz lwn-28321582334c261c13b20d7efe634e610b4c100b.zip |
arm64: initialize ptrauth keys for kernel booting task
This patch uses the existing boot_init_stack_canary arch function
to initialize the ptrauth keys for the booting task in the primary
core. The requirement here is that it should be always inline and
the caller must never return.
As pointer authentication too detects a subset of stack corruption
so it makes sense to place this code here.
Both pointer authentication and stack canary codes are protected
by their respective config option.
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Reviewed-by: Vincenzo Frascino <Vincenzo.Frascino@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'include/linux/stackprotector.h')
-rw-r--r-- | include/linux/stackprotector.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/stackprotector.h b/include/linux/stackprotector.h index 6b792d080eee..4c678c4fec58 100644 --- a/include/linux/stackprotector.h +++ b/include/linux/stackprotector.h @@ -6,7 +6,7 @@ #include <linux/sched.h> #include <linux/random.h> -#ifdef CONFIG_STACKPROTECTOR +#if defined(CONFIG_STACKPROTECTOR) || defined(CONFIG_ARM64_PTR_AUTH) # include <asm/stackprotector.h> #else static inline void boot_init_stack_canary(void) |