1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
5 * Definitions of structures used with the modify_ldt system call.
10 /* Maximum number of LDT entries supported. */
11 #define LDT_ENTRIES 8192
12 /* The size of each LDT entry. */
13 #define LDT_ENTRY_SIZE 8
17 * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS
18 * not to the default values if you still want to do syscalls. This
19 * call is more for 32bit mode therefore.
22 unsigned int entry_number
;
23 unsigned int base_addr
;
25 unsigned int seg_32bit
:1;
26 unsigned int contents
:2;
27 unsigned int read_exec_only
:1;
28 unsigned int limit_in_pages
:1;
29 unsigned int seg_not_present
:1;
30 unsigned int useable
:1;
33 * Because this bit is not present in 32-bit user code, user
34 * programs can pass uninitialized values here. Therefore, in
35 * any context in which a user_desc comes from a 32-bit program,
36 * the kernel must act as though lm == 0, regardless of the
43 #define MODIFY_LDT_CONTENTS_DATA 0
44 #define MODIFY_LDT_CONTENTS_STACK 1
45 #define MODIFY_LDT_CONTENTS_CODE 2
47 #endif /* !__ASSEMBLY__ */
48 #endif /* _ASM_X86_LDT_H */