xref: /openbmc/linux/arch/x86/include/asm/shstk.h (revision 98cfa4630912a80a575277d1bf193376ba66116a)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_SHSTK_H
3 #define _ASM_X86_SHSTK_H
4 
5 #ifndef __ASSEMBLY__
6 #include <linux/types.h>
7 
8 struct task_struct;
9 
10 #ifdef CONFIG_X86_USER_SHADOW_STACK
11 long shstk_prctl(struct task_struct *task, int option, unsigned long features);
12 void reset_thread_features(void);
13 #else
14 static inline long shstk_prctl(struct task_struct *task, int option,
15 			       unsigned long arg2) { return -EINVAL; }
16 static inline void reset_thread_features(void) {}
17 #endif /* CONFIG_X86_USER_SHADOW_STACK */
18 
19 #endif /* __ASSEMBLY__ */
20 
21 #endif /* _ASM_X86_SHSTK_H */
22