printf: Remove unused 'bprintf'
[drm/drm-misc.git] / arch / powerpc / include / asm / stackprotector.h
blob283c346478565c22a6f49c7d3ca2af36cdf10841
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * GCC stack protector support.
5 */
7 #ifndef _ASM_STACKPROTECTOR_H
8 #define _ASM_STACKPROTECTOR_H
10 #include <asm/reg.h>
11 #include <asm/current.h>
12 #include <asm/paca.h>
15 * Initialize the stackprotector canary value.
17 * NOTE: this must only be called from functions that never return,
18 * and it must always be inlined.
20 static __always_inline void boot_init_stack_canary(void)
22 unsigned long canary = get_random_canary();
24 current->stack_canary = canary;
25 #ifdef CONFIG_PPC64
26 get_paca()->canary = canary;
27 #endif
30 #endif /* _ASM_STACKPROTECTOR_H */