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