| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 1 | /**************************************************************************** | 
|  | 2 | **************************************************************************** | 
|  | 3 | *** | 
|  | 4 | ***   This header was automatically generated from a Linux kernel header | 
|  | 5 | ***   of the same name, to make information necessary for userspace to | 
|  | 6 | ***   call into the kernel available to libc.  It contains only constants, | 
|  | 7 | ***   structures, and macros generated from the original header, and thus, | 
|  | 8 | ***   contains no copyrightable information. | 
|  | 9 | *** | 
|  | 10 | ***   To edit the content of this header, modify the corresponding | 
|  | 11 | ***   source file (e.g. under external/kernel-headers/original/) then | 
|  | 12 | ***   run bionic/libc/kernel/tools/update_all.py | 
|  | 13 | *** | 
|  | 14 | ***   Any manual change here will be lost the next time this script will | 
|  | 15 | ***   be run. You've been warned! | 
|  | 16 | *** | 
|  | 17 | **************************************************************************** | 
|  | 18 | ****************************************************************************/ | 
|  | 19 | #ifndef _ASM_X86_LDT_H | 
|  | 20 | #define _ASM_X86_LDT_H | 
|  | 21 | #define LDT_ENTRIES 8192 | 
|  | 22 | #define LDT_ENTRY_SIZE 8 | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 23 | #ifndef __ASSEMBLY__ | 
|  | 24 | struct user_desc { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 25 | unsigned int entry_number; | 
|  | 26 | unsigned int base_addr; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | unsigned int limit; | 
|  | 28 | unsigned int seg_32bit : 1; | 
|  | 29 | unsigned int contents : 2; | 
|  | 30 | unsigned int read_exec_only : 1; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | unsigned int limit_in_pages : 1; | 
|  | 32 | unsigned int seg_not_present : 1; | 
|  | 33 | unsigned int useable : 1; | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 34 | #ifdef __x86_64__ | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | unsigned int lm : 1; | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 36 | #endif | 
|  | 37 | }; | 
|  | 38 | #define MODIFY_LDT_CONTENTS_DATA 0 | 
| Elliott Hughes | abd6261 | 2013-11-08 11:45:48 -0800 | [diff] [blame] | 39 | #define MODIFY_LDT_CONTENTS_STACK 1 | 
|  | 40 | #define MODIFY_LDT_CONTENTS_CODE 2 | 
|  | 41 | #endif | 
|  | 42 | #endif |