2008-12-19 01:18:35 +08:00
|
|
|
#ifndef _ASM_X86_SIGFRAME_H
|
|
|
|
#define _ASM_X86_SIGFRAME_H
|
|
|
|
|
2008-12-19 06:43:34 +08:00
|
|
|
#include <asm/sigcontext.h>
|
|
|
|
#include <asm/siginfo.h>
|
|
|
|
#include <asm/ucontext.h>
|
|
|
|
|
2008-02-09 04:10:00 +08:00
|
|
|
#ifdef CONFIG_X86_32
|
2008-12-18 10:49:55 +08: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 10:51:08 +08:00
|
|
|
#else /* !CONFIG_X86_32 */
|
|
|
|
|
|
|
|
#ifdef CONFIG_IA32_EMULATION
|
|
|
|
#include <asm/ia32.h>
|
|
|
|
#endif /* CONFIG_IA32_EMULATION */
|
|
|
|
|
|
|
|
#endif /* CONFIG_X86_32 */
|
2008-12-18 10:49:55 +08:00
|
|
|
|
2008-12-18 10:51:08 +08:00
|
|
|
#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
|
2008-12-18 10:49:55 +08:00
|
|
|
struct sigframe_ia32 {
|
|
|
|
u32 pretcode;
|
2005-04-17 06:20:36 +08:00
|
|
|
int sig;
|
2008-12-18 10:49:55 +08:00
|
|
|
struct sigcontext_ia32 sc;
|
2008-07-30 01:29:21 +08: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 10:49:55 +08:00
|
|
|
struct _fpstate_ia32 fpstate_unused;
|
2008-12-18 10:51:08 +08:00
|
|
|
#ifdef CONFIG_IA32_EMULATION
|
|
|
|
unsigned int extramask[_COMPAT_NSIG_WORDS-1];
|
|
|
|
#else /* !CONFIG_IA32_EMULATION */
|
2005-04-17 06:20:36 +08:00
|
|
|
unsigned long extramask[_NSIG_WORDS-1];
|
2008-12-18 10:51:08 +08:00
|
|
|
#endif /* CONFIG_IA32_EMULATION */
|
2005-04-17 06:20:36 +08:00
|
|
|
char retcode[8];
|
2008-07-30 01:29:21 +08:00
|
|
|
/* fp state follows here */
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
2008-12-18 10:49:55 +08:00
|
|
|
struct rt_sigframe_ia32 {
|
|
|
|
u32 pretcode;
|
2005-04-17 06:20:36 +08:00
|
|
|
int sig;
|
2008-12-18 10:49:55 +08:00
|
|
|
u32 pinfo;
|
|
|
|
u32 puc;
|
2008-12-18 10:51:08 +08:00
|
|
|
#ifdef CONFIG_IA32_EMULATION
|
|
|
|
compat_siginfo_t info;
|
|
|
|
#else /* !CONFIG_IA32_EMULATION */
|
2005-04-17 06:20:36 +08:00
|
|
|
struct siginfo info;
|
2008-12-18 10:51:08 +08:00
|
|
|
#endif /* CONFIG_IA32_EMULATION */
|
2008-12-18 10:49:55 +08:00
|
|
|
struct ucontext_ia32 uc;
|
2005-04-17 06:20:36 +08:00
|
|
|
char retcode[8];
|
2008-07-30 01:29:21 +08:00
|
|
|
/* fp state follows here */
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
2008-12-18 10:51:08 +08:00
|
|
|
#endif /* defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION) */
|
|
|
|
|
|
|
|
#ifdef CONFIG_X86_64
|
2008-02-09 04:10:00 +08:00
|
|
|
struct rt_sigframe {
|
|
|
|
char __user *pretcode;
|
|
|
|
struct ucontext uc;
|
|
|
|
struct siginfo info;
|
2008-07-30 01:29:21 +08:00
|
|
|
/* fp state follows here */
|
2008-02-09 04:10:00 +08:00
|
|
|
};
|
2008-12-18 10:51:08 +08:00
|
|
|
#endif /* CONFIG_X86_64 */
|
2008-12-19 01:18:35 +08:00
|
|
|
|
|
|
|
#endif /* _ASM_X86_SIGFRAME_H */
|