sigframe.h 2.0 KB

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