sigframe.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifdef CONFIG_X86_32
  2. #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
  7. #else /* !CONFIG_X86_32 */
  8. #ifdef CONFIG_IA32_EMULATION
  9. #include <asm/ia32.h>
  10. #endif /* CONFIG_IA32_EMULATION */
  11. #endif /* CONFIG_X86_32 */
  12. #if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
  13. struct sigframe_ia32 {
  14. u32 pretcode;
  15. int sig;
  16. struct sigcontext_ia32 sc;
  17. /*
  18. * fpstate is unused. fpstate is moved/allocated after
  19. * retcode[] below. This movement allows to have the FP state and the
  20. * future state extensions (xsave) stay together.
  21. * And at the same time retaining the unused fpstate, prevents changing
  22. * the offset of extramask[] in the sigframe and thus prevent any
  23. * legacy application accessing/modifying it.
  24. */
  25. struct _fpstate_ia32 fpstate_unused;
  26. #ifdef CONFIG_IA32_EMULATION
  27. unsigned int extramask[_COMPAT_NSIG_WORDS-1];
  28. #else /* !CONFIG_IA32_EMULATION */
  29. unsigned long extramask[_NSIG_WORDS-1];
  30. #endif /* CONFIG_IA32_EMULATION */
  31. char retcode[8];
  32. /* fp state follows here */
  33. };
  34. struct rt_sigframe_ia32 {
  35. u32 pretcode;
  36. int sig;
  37. u32 pinfo;
  38. u32 puc;
  39. #ifdef CONFIG_IA32_EMULATION
  40. compat_siginfo_t info;
  41. #else /* !CONFIG_IA32_EMULATION */
  42. struct siginfo info;
  43. #endif /* CONFIG_IA32_EMULATION */
  44. struct ucontext_ia32 uc;
  45. char retcode[8];
  46. /* fp state follows here */
  47. };
  48. #endif /* defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION) */
  49. #ifdef CONFIG_X86_64
  50. struct rt_sigframe {
  51. char __user *pretcode;
  52. struct ucontext uc;
  53. struct siginfo info;
  54. /* fp state follows here */
  55. };
  56. #endif /* CONFIG_X86_64 */