ldt_32.h 704 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * ldt.h
  3. *
  4. * Definitions of structures used with the modify_ldt system call.
  5. */
  6. #ifndef _LINUX_LDT_H
  7. #define _LINUX_LDT_H
  8. /* Maximum number of LDT entries supported. */
  9. #define LDT_ENTRIES 8192
  10. /* The size of each LDT entry. */
  11. #define LDT_ENTRY_SIZE 8
  12. #ifndef __ASSEMBLY__
  13. struct user_desc {
  14. unsigned int entry_number;
  15. unsigned long base_addr;
  16. unsigned int limit;
  17. unsigned int seg_32bit:1;
  18. unsigned int contents:2;
  19. unsigned int read_exec_only:1;
  20. unsigned int limit_in_pages:1;
  21. unsigned int seg_not_present:1;
  22. unsigned int useable:1;
  23. };
  24. #define MODIFY_LDT_CONTENTS_DATA 0
  25. #define MODIFY_LDT_CONTENTS_STACK 1
  26. #define MODIFY_LDT_CONTENTS_CODE 2
  27. #endif /* !__ASSEMBLY__ */
  28. #endif