2008-12-19 00:18:35 +07:00
|
|
|
#ifndef _ASM_X86_SIGFRAME_H
|
|
|
|
#define _ASM_X86_SIGFRAME_H
|
|
|
|
|
2008-12-19 05:43:34 +07:00
|
|
|
#include <asm/sigcontext.h>
|
|
|
|
#include <asm/siginfo.h>
|
|
|
|
#include <asm/ucontext.h>
|
|
|
|
|
2008-02-09 03:10:00 +07:00
|
|
|
#ifdef CONFIG_X86_32
|
2008-12-18 09:49:55 +07:00
|
|
|
#define sigframe_ia32 sigframe
|
|
|
|
#define rt_sigframe_ia32 rt_sigframe
|
|
|
|
#define sigcontext_ia32 sigcontext
|
|
|
|
#define _fpstate_ia32 _fpstate
|
|
|
|
#define ucontext_ia32 ucontext
|
2008-12-18 09:51:08 +07:00
|
|
|
#else /* !CONFIG_X86_32 */
|
|
|
|
|
|
|
|
#ifdef CONFIG_IA32_EMULATION
|
|
|
|
#include <asm/ia32.h>
|
|
|
|
#endif /* CONFIG_IA32_EMULATION */
|
|
|
|
|
|
|
|
#endif /* CONFIG_X86_32 */
|
2008-12-18 09:49:55 +07:00
|
|
|
|
2008-12-18 09:51:08 +07:00
|
|
|
#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
|
2008-12-18 09:49:55 +07:00
|
|
|
struct sigframe_ia32 {
|
|
|
|
u32 pretcode;
|
2005-04-17 05:20:36 +07:00
|
|
|
int sig;
|
2008-12-18 09:49:55 +07:00
|
|
|
struct sigcontext_ia32 sc;
|
2008-07-30 00:29:21 +07:00
|
|
|
/*
|
|
|
|
* fpstate is unused. fpstate is moved/allocated after
|
|
|
|
* retcode[] below. This movement allows to have the FP state and the
|
|
|
|
* future state extensions (xsave) stay together.
|
|
|
|
* And at the same time retaining the unused fpstate, prevents changing
|
|
|
|
* the offset of extramask[] in the sigframe and thus prevent any
|
|
|
|
* legacy application accessing/modifying it.
|
|
|
|
*/
|
2008-12-18 09:49:55 +07:00
|
|
|
struct _fpstate_ia32 fpstate_unused;
|
2008-12-18 09:51:08 +07:00
|
|
|
#ifdef CONFIG_IA32_EMULATION
|
|
|
|
unsigned int extramask[_COMPAT_NSIG_WORDS-1];
|
|
|
|
#else /* !CONFIG_IA32_EMULATION */
|
2005-04-17 05:20:36 +07:00
|
|
|
unsigned long extramask[_NSIG_WORDS-1];
|
2008-12-18 09:51:08 +07:00
|
|
|
#endif /* CONFIG_IA32_EMULATION */
|
2005-04-17 05:20:36 +07:00
|
|
|
char retcode[8];
|
2008-07-30 00:29:21 +07:00
|
|
|
/* fp state follows here */
|
2005-04-17 05:20:36 +07:00
|
|
|
};
|
|
|
|
|
2008-12-18 09:49:55 +07:00
|
|
|
struct rt_sigframe_ia32 {
|
|
|
|
u32 pretcode;
|
2005-04-17 05:20:36 +07:00
|
|
|
int sig;
|
2008-12-18 09:49:55 +07:00
|
|
|
u32 pinfo;
|
|
|
|
u32 puc;
|
2008-12-18 09:51:08 +07:00
|
|
|
#ifdef CONFIG_IA32_EMULATION
|
|
|
|
compat_siginfo_t info;
|
|
|
|
#else /* !CONFIG_IA32_EMULATION */
|
2005-04-17 05:20:36 +07:00
|
|
|
struct siginfo info;
|
2008-12-18 09:51:08 +07:00
|
|
|
#endif /* CONFIG_IA32_EMULATION */
|
2008-12-18 09:49:55 +07:00
|
|
|
struct ucontext_ia32 uc;
|
2005-04-17 05:20:36 +07:00
|
|
|
char retcode[8];
|
2008-07-30 00:29:21 +07:00
|
|
|
/* fp state follows here */
|
2005-04-17 05:20:36 +07:00
|
|
|
};
|
2008-12-18 09:51:08 +07:00
|
|
|
#endif /* defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION) */
|
|
|
|
|
|
|
|
#ifdef CONFIG_X86_64
|
2008-02-09 03:10:00 +07:00
|
|
|
struct rt_sigframe {
|
|
|
|
char __user *pretcode;
|
|
|
|
struct ucontext uc;
|
|
|
|
struct siginfo info;
|
2008-07-30 00:29:21 +07:00
|
|
|
/* fp state follows here */
|
2008-02-09 03:10:00 +07:00
|
|
|
};
|
2008-12-18 09:51:08 +07:00
|
|
|
#endif /* CONFIG_X86_64 */
|
2008-12-19 00:18:35 +07:00
|
|
|
|
|
|
|
#endif /* _ASM_X86_SIGFRAME_H */
|