1 #ifndef _ASM_X86_SIGFRAME_H
2 #define _ASM_X86_SIGFRAME_H
4 #include <asm/sigcontext.h>
5 #include <asm/siginfo.h>
6 #include <asm/ucontext.h>
7 #include <linux/compat.h>
10 #define sigframe_ia32 sigframe
11 #define rt_sigframe_ia32 rt_sigframe
12 #define sigcontext_ia32 sigcontext
13 #define _fpstate_ia32 _fpstate
14 #define ucontext_ia32 ucontext
15 #else /* !CONFIG_X86_32 */
17 #ifdef CONFIG_IA32_EMULATION
19 #endif /* CONFIG_IA32_EMULATION */
21 #endif /* CONFIG_X86_32 */
23 #if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
24 struct sigframe_ia32 {
27 struct sigcontext_ia32 sc;
29 * fpstate is unused. fpstate is moved/allocated after
30 * retcode[] below. This movement allows to have the FP state and the
31 * future state extensions (xsave) stay together.
32 * And at the same time retaining the unused fpstate, prevents changing
33 * the offset of extramask[] in the sigframe and thus prevent any
34 * legacy application accessing/modifying it.
36 struct _fpstate_ia32 fpstate_unused;
37 #ifdef CONFIG_IA32_EMULATION
38 unsigned int extramask[_COMPAT_NSIG_WORDS-1];
39 #else /* !CONFIG_IA32_EMULATION */
40 unsigned long extramask[_NSIG_WORDS-1];
41 #endif /* CONFIG_IA32_EMULATION */
43 /* fp state follows here */
46 struct rt_sigframe_ia32 {
51 #ifdef CONFIG_IA32_EMULATION
52 compat_siginfo_t info;
53 #else /* !CONFIG_IA32_EMULATION */
55 #endif /* CONFIG_IA32_EMULATION */
56 struct ucontext_ia32 uc;
58 /* fp state follows here */
60 #endif /* defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION) */
65 char __user *pretcode;
68 /* fp state follows here */
71 #ifdef CONFIG_X86_X32_ABI
74 unsigned int uc_flags;
76 compat_stack_t uc_stack;
77 unsigned int uc__pad0; /* needed for alignment */
78 struct sigcontext uc_mcontext; /* the 64-bit sigcontext type */
79 compat_sigset_t uc_sigmask; /* mask last for extensibility */
82 struct rt_sigframe_x32 {
84 struct ucontext_x32 uc;
85 compat_siginfo_t info;
86 /* fp state follows here */
89 #endif /* CONFIG_X86_X32_ABI */
91 #endif /* CONFIG_X86_64 */
93 #endif /* _ASM_X86_SIGFRAME_H */