blob: 491a0878c3aa0e1713e366498c2c906d693077d1 [file] [log] [blame]
Harvey Harrison123a6342008-02-08 12:10:00 -08001#ifdef CONFIG_X86_32
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -08002#define sigframe_ia32 sigframe
3#define rt_sigframe_ia32 rt_sigframe
4#define sigcontext_ia32 sigcontext
5#define _fpstate_ia32 _fpstate
6#define ucontext_ia32 ucontext
Hiroshi Shimamotoc85c2ff2008-12-17 18:51:08 -08007#else /* !CONFIG_X86_32 */
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -08008
Hiroshi Shimamotoc85c2ff2008-12-17 18:51:08 -08009#ifdef CONFIG_IA32_EMULATION
10#include <asm/ia32.h>
11#endif /* CONFIG_IA32_EMULATION */
12
13#endif /* CONFIG_X86_32 */
14
15#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -080016struct sigframe_ia32 {
17 u32 pretcode;
Linus Torvalds1da177e2005-04-16 15:20:36 -070018 int sig;
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -080019 struct sigcontext_ia32 sc;
Suresh Siddha3c1c7f12008-07-29 10:29:21 -070020 /*
21 * fpstate is unused. fpstate is moved/allocated after
22 * retcode[] below. This movement allows to have the FP state and the
23 * future state extensions (xsave) stay together.
24 * And at the same time retaining the unused fpstate, prevents changing
25 * the offset of extramask[] in the sigframe and thus prevent any
26 * legacy application accessing/modifying it.
27 */
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -080028 struct _fpstate_ia32 fpstate_unused;
Hiroshi Shimamotoc85c2ff2008-12-17 18:51:08 -080029#ifdef CONFIG_IA32_EMULATION
30 unsigned int extramask[_COMPAT_NSIG_WORDS-1];
31#else /* !CONFIG_IA32_EMULATION */
Linus Torvalds1da177e2005-04-16 15:20:36 -070032 unsigned long extramask[_NSIG_WORDS-1];
Hiroshi Shimamotoc85c2ff2008-12-17 18:51:08 -080033#endif /* CONFIG_IA32_EMULATION */
Linus Torvalds1da177e2005-04-16 15:20:36 -070034 char retcode[8];
Suresh Siddha3c1c7f12008-07-29 10:29:21 -070035 /* fp state follows here */
Linus Torvalds1da177e2005-04-16 15:20:36 -070036};
37
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -080038struct rt_sigframe_ia32 {
39 u32 pretcode;
Linus Torvalds1da177e2005-04-16 15:20:36 -070040 int sig;
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -080041 u32 pinfo;
42 u32 puc;
Hiroshi Shimamotoc85c2ff2008-12-17 18:51:08 -080043#ifdef CONFIG_IA32_EMULATION
44 compat_siginfo_t info;
45#else /* !CONFIG_IA32_EMULATION */
Linus Torvalds1da177e2005-04-16 15:20:36 -070046 struct siginfo info;
Hiroshi Shimamotoc85c2ff2008-12-17 18:51:08 -080047#endif /* CONFIG_IA32_EMULATION */
Hiroshi Shimamotoa5c56eb2008-12-17 18:49:55 -080048 struct ucontext_ia32 uc;
Linus Torvalds1da177e2005-04-16 15:20:36 -070049 char retcode[8];
Suresh Siddha3c1c7f12008-07-29 10:29:21 -070050 /* fp state follows here */
Linus Torvalds1da177e2005-04-16 15:20:36 -070051};
Hiroshi Shimamotoc85c2ff2008-12-17 18:51:08 -080052#endif /* defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION) */
53
54#ifdef CONFIG_X86_64
Harvey Harrison123a6342008-02-08 12:10:00 -080055struct rt_sigframe {
56 char __user *pretcode;
57 struct ucontext uc;
58 struct siginfo info;
Suresh Siddha3c1c7f12008-07-29 10:29:21 -070059 /* fp state follows here */
Harvey Harrison123a6342008-02-08 12:10:00 -080060};
Hiroshi Shimamotoc85c2ff2008-12-17 18:51:08 -080061#endif /* CONFIG_X86_64 */