Lines Matching +full:two +full:- +full:user
1 /* SPDX-License-Identifier: GPL-2.0 */
13 ((((base) & _AC(0xff000000,ULL)) << (56-24)) | \
15 (((limit) & _AC(0x000f0000,ULL)) << (48-16)) | \
29 * Bottom two bits of selector give the ring
37 * determine whether the context is user mode or kernel mode with
46 /* User mode is privilege level 3: */
60 * The layout of the per-CPU GDT under Linux:
62 * 0 - null <=== cacheline #1
63 * 1 - reserved
64 * 2 - reserved
65 * 3 - reserved
67 * 4 - unused <=== cacheline #2
68 * 5 - unused
70 * ------- start of TLS (Thread-Local Storage) segments:
72 * 6 - TLS segment #1 [ glibc's TLS segment ]
73 * 7 - TLS segment #2 [ Wine's %fs Win32 segment ]
74 * 8 - TLS segment #3 <=== cacheline #3
75 * 9 - reserved
76 * 10 - reserved
77 * 11 - reserved
79 * ------- start of kernel segments:
81 * 12 - kernel code segment <=== cacheline #4
82 * 13 - kernel data segment
83 * 14 - default user CS
84 * 15 - default user DS
85 * 16 - TSS <=== cacheline #5
86 * 17 - LDT
87 * 18 - PNPBIOS support (16->32 gate)
88 * 19 - PNPBIOS support
89 * 20 - PNPBIOS support <=== cacheline #6
90 * 21 - PNPBIOS support
91 * 22 - PNPBIOS support
92 * 23 - APM BIOS support
93 * 24 - APM BIOS support <=== cacheline #7
94 * 25 - APM BIOS support
96 * 26 - ESPFIX small SS
97 * 27 - per-cpu [ offset to per-cpu data area ]
98 * 28 - stack_canary-20 [ for stack protector ] <=== cacheline #8
99 * 29 - unused
100 * 30 - unused
101 * 31 - TSS for double fault handler
104 #define GDT_ENTRY_TLS_MAX (GDT_ENTRY_TLS_MIN + GDT_ENTRY_TLS_ENTRIES - 1)
167 #else /* 64-bit: */
176 * We cannot use the same code segment descriptor for user and kernel mode,
179 * GDT layout to get 64-bit SYSCALL/SYSRET support right. SYSRET hardcodes
182 * if returning to 32-bit userspace: cs = STAR.SYSRET_CS,
183 * if returning to 64-bit userspace: cs = STAR.SYSRET_CS+16,
187 * thus USER_DS should be between 32-bit and 64-bit code selectors:
193 /* Needs two entries */
195 /* Needs two entries */
212 * expressed with the +3 value for user-space selectors:
282 * vector has no error code (two bytes), a 'push $vector_number' (two
307 * This is always the case on Intel CPUs and, even on 64-bit AMD CPUs, any
335 * On 32-bit systems, the hidden parts of FS and GS are unobservable if
367 * x86-32 user GS accessors:
373 # define task_user_gs(tsk) ((tsk)->thread.gs)
377 # define get_user_gs(regs) (u16)((regs)->gs)
378 # define set_user_gs(regs, v) do { (regs)->gs = (v); } while (0)
379 # define task_user_gs(tsk) (task_pt_regs(tsk)->gs)