sigframe.h 1.7 KB

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