xref: /linux/arch/s390/include/asm/stackprotector.h (revision 7fc2cd2e4b398c57c9cf961cfea05eadbf34c05c)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 
3 #ifndef _ASM_S390_STACKPROTECTOR_H
4 #define _ASM_S390_STACKPROTECTOR_H
5 
6 #include <linux/sched.h>
7 #include <asm/current.h>
8 #include <asm/lowcore.h>
9 
10 static __always_inline void boot_init_stack_canary(void)
11 {
12 	current->stack_canary = get_random_canary();
13 	get_lowcore()->stack_canary = current->stack_canary;
14 }
15 
16 #endif /* _ASM_S390_STACKPROTECTOR_H */
17