![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 0002 /* 0003 * ldt.h 0004 * 0005 * Definitions of structures used with the modify_ldt system call. 0006 */ 0007 #ifndef _ASM_X86_LDT_H 0008 #define _ASM_X86_LDT_H 0009 0010 /* Maximum number of LDT entries supported. */ 0011 #define LDT_ENTRIES 8192 0012 /* The size of each LDT entry. */ 0013 #define LDT_ENTRY_SIZE 8 0014 0015 #ifndef __ASSEMBLY__ 0016 /* 0017 * Note on 64bit base and limit is ignored and you cannot set DS/ES/CS 0018 * not to the default values if you still want to do syscalls. This 0019 * call is more for 32bit mode therefore. 0020 */ 0021 struct user_desc { 0022 unsigned int entry_number; 0023 unsigned int base_addr; 0024 unsigned int limit; 0025 unsigned int seg_32bit:1; 0026 unsigned int contents:2; 0027 unsigned int read_exec_only:1; 0028 unsigned int limit_in_pages:1; 0029 unsigned int seg_not_present:1; 0030 unsigned int useable:1; 0031 #ifdef __x86_64__ 0032 /* 0033 * Because this bit is not present in 32-bit user code, user 0034 * programs can pass uninitialized values here. Therefore, in 0035 * any context in which a user_desc comes from a 32-bit program, 0036 * the kernel must act as though lm == 0, regardless of the 0037 * actual value. 0038 */ 0039 unsigned int lm:1; 0040 #endif 0041 }; 0042 0043 #define MODIFY_LDT_CONTENTS_DATA 0 0044 #define MODIFY_LDT_CONTENTS_STACK 1 0045 #define MODIFY_LDT_CONTENTS_CODE 2 0046 0047 #endif /* !__ASSEMBLY__ */ 0048 #endif /* _ASM_X86_LDT_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |