2008-12-18 17:18:35 +00:00
|
|
|
#ifndef _ASM_X86_SIGFRAME_H
|
|
|
|
#define _ASM_X86_SIGFRAME_H
|
|
|
|
|
2008-12-18 22:43:34 +00:00
|
|
|
#include <asm/sigcontext.h>
|
|
|
|
#include <asm/siginfo.h>
|
|
|
|
#include <asm/ucontext.h>
|
2015-06-22 11:55:12 +00:00
|
|
|
#include <linux/compat.h>
|
2008-12-18 22:43:34 +00:00
|
|
|
|
2008-02-08 20:10:00 +00:00
|
|
|
#ifdef CONFIG_X86_32
|
2008-12-18 02:49:55 +00:00
|
|
|
#define sigframe_ia32 sigframe
|
|
|
|
#define rt_sigframe_ia32 rt_sigframe
|
|
|
|
#define ucontext_ia32 ucontext
|
2008-12-18 02:51:08 +00:00
|
|
|
#else /* !CONFIG_X86_32 */
|
|
|
|
|
|
|
|
#ifdef CONFIG_IA32_EMULATION
|
|
|
|
#include <asm/ia32.h>
|
|
|
|
#endif /* CONFIG_IA32_EMULATION */
|
|
|
|
|
|
|
|
#endif /* CONFIG_X86_32 */
|
2008-12-18 02:49:55 +00:00
|
|
|
|
2008-12-18 02:51:08 +00:00
|
|
|
#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
|
2008-12-18 02:49:55 +00:00
|
|
|
struct sigframe_ia32 {
|
|
|
|
u32 pretcode;
|
2005-04-16 22:20:36 +00:00
|
|
|
int sig;
|
2015-09-05 07:32:41 +00:00
|
|
|
struct sigcontext_32 sc;
|
2008-07-29 17:29:21 +00: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.
|
|
|
|
*/
|
2015-09-05 07:32:36 +00:00
|
|
|
struct _fpstate_32 fpstate_unused;
|
2008-12-18 02:51:08 +00:00
|
|
|
#ifdef CONFIG_IA32_EMULATION
|
|
|
|
unsigned int extramask[_COMPAT_NSIG_WORDS-1];
|
|
|
|
#else /* !CONFIG_IA32_EMULATION */
|
2005-04-16 22:20:36 +00:00
|
|
|
unsigned long extramask[_NSIG_WORDS-1];
|
2008-12-18 02:51:08 +00:00
|
|
|
#endif /* CONFIG_IA32_EMULATION */
|
2005-04-16 22:20:36 +00:00
|
|
|
char retcode[8];
|
2008-07-29 17:29:21 +00:00
|
|
|
/* fp state follows here */
|
2005-04-16 22:20:36 +00:00
|
|
|
};
|
|
|
|
|
2008-12-18 02:49:55 +00:00
|
|
|
struct rt_sigframe_ia32 {
|
|
|
|
u32 pretcode;
|
2005-04-16 22:20:36 +00:00
|
|
|
int sig;
|
2008-12-18 02:49:55 +00:00
|
|
|
u32 pinfo;
|
|
|
|
u32 puc;
|
2008-12-18 02:51:08 +00:00
|
|
|
#ifdef CONFIG_IA32_EMULATION
|
|
|
|
compat_siginfo_t info;
|
|
|
|
#else /* !CONFIG_IA32_EMULATION */
|
2005-04-16 22:20:36 +00:00
|
|
|
struct siginfo info;
|
2008-12-18 02:51:08 +00:00
|
|
|
#endif /* CONFIG_IA32_EMULATION */
|
2008-12-18 02:49:55 +00:00
|
|
|
struct ucontext_ia32 uc;
|
2005-04-16 22:20:36 +00:00
|
|
|
char retcode[8];
|
2008-07-29 17:29:21 +00:00
|
|
|
/* fp state follows here */
|
2005-04-16 22:20:36 +00:00
|
|
|
};
|
2008-12-18 02:51:08 +00:00
|
|
|
#endif /* defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION) */
|
|
|
|
|
|
|
|
#ifdef CONFIG_X86_64
|
2012-02-19 15:50:12 +00:00
|
|
|
|
2008-02-08 20:10:00 +00:00
|
|
|
struct rt_sigframe {
|
|
|
|
char __user *pretcode;
|
|
|
|
struct ucontext uc;
|
|
|
|
struct siginfo info;
|
2008-07-29 17:29:21 +00:00
|
|
|
/* fp state follows here */
|
2008-02-08 20:10:00 +00:00
|
|
|
};
|
2012-02-19 15:50:12 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_X86_X32_ABI
|
|
|
|
|
2015-06-22 11:55:12 +00:00
|
|
|
struct ucontext_x32 {
|
|
|
|
unsigned int uc_flags;
|
|
|
|
unsigned int uc_link;
|
|
|
|
compat_stack_t uc_stack;
|
|
|
|
unsigned int uc__pad0; /* needed for alignment */
|
|
|
|
struct sigcontext uc_mcontext; /* the 64-bit sigcontext type */
|
|
|
|
compat_sigset_t uc_sigmask; /* mask last for extensibility */
|
|
|
|
};
|
|
|
|
|
2012-02-19 15:50:12 +00:00
|
|
|
struct rt_sigframe_x32 {
|
|
|
|
u64 pretcode;
|
|
|
|
struct ucontext_x32 uc;
|
|
|
|
compat_siginfo_t info;
|
|
|
|
/* fp state follows here */
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* CONFIG_X86_X32_ABI */
|
|
|
|
|
2008-12-18 02:51:08 +00:00
|
|
|
#endif /* CONFIG_X86_64 */
|
2008-12-18 17:18:35 +00:00
|
|
|
|
|
|
|
#endif /* _ASM_X86_SIGFRAME_H */
|