personality.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef _PERSONALITY_H
  2. #define _PERSONALITY_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define UNAME26 0x0020000
  7. #define ADDR_NO_RANDOMIZE 0x0040000
  8. #define FDPIC_FUNCPTRS 0x0080000
  9. #define MMAP_PAGE_ZERO 0x0100000
  10. #define ADDR_COMPAT_LAYOUT 0x0200000
  11. #define READ_IMPLIES_EXEC 0x0400000
  12. #define ADDR_LIMIT_32BIT 0x0800000
  13. #define SHORT_INODE 0x1000000
  14. #define WHOLE_SECONDS 0x2000000
  15. #define STICKY_TIMEOUTS 0x4000000
  16. #define ADDR_LIMIT_3GB 0x8000000
  17. #define PER_LINUX 0
  18. #define PER_LINUX_32BIT ADDR_LIMIT_32BIT
  19. #define PER_LINUX_FDPIC FDPIC_FUNCPTRS
  20. #define PER_SVR4 (1 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO)
  21. #define PER_SVR3 (2 | STICKY_TIMEOUTS | SHORT_INODE)
  22. #define PER_SCOSVR3 (3 | STICKY_TIMEOUTS | WHOLE_SECONDS | SHORT_INODE)
  23. #define PER_OSR5 (3 | STICKY_TIMEOUTS | WHOLE_SECONDS)
  24. #define PER_WYSEV386 (4 | STICKY_TIMEOUTS | SHORT_INODE)
  25. #define PER_ISCR4 (5 | STICKY_TIMEOUTS)
  26. #define PER_BSD 6
  27. #define PER_SUNOS (6 | STICKY_TIMEOUTS)
  28. #define PER_XENIX (7 | STICKY_TIMEOUTS | SHORT_INODE)
  29. #define PER_LINUX32 8
  30. #define PER_LINUX32_3GB (8 | ADDR_LIMIT_3GB)
  31. #define PER_IRIX32 (9 | STICKY_TIMEOUTS)
  32. #define PER_IRIXN32 (0xa | STICKY_TIMEOUTS)
  33. #define PER_IRIX64 (0x0b | STICKY_TIMEOUTS)
  34. #define PER_RISCOS 0xc
  35. #define PER_SOLARIS (0xd | STICKY_TIMEOUTS)
  36. #define PER_UW7 (0xe | STICKY_TIMEOUTS | MMAP_PAGE_ZERO)
  37. #define PER_OSF4 0xf
  38. #define PER_HPUX 0x10
  39. #define PER_MASK 0xff
  40. int personality(unsigned long);
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif