/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_X86_UCONTEXT_H #define _ASM_X86_UCONTEXT_H /* * Indicates the presence of extended state information in the memory * layout pointed by the fpstate pointer in the ucontext's sigcontext * struct (uc_mcontext). */ #define UC_FP_XSTATE 0x1 #ifdef __x86_64__ /* * UC_SIGCONTEXT_SS will be set when delivering 64-bit or x32 signals on * kernels that save SS in the sigcontext. All kernels that set * UC_SIGCONTEXT_SS will correctly restore at least the low 32 bits of esp * regardless of SS (i.e. they implement espfix). * * Kernels that set UC_SIGCONTEXT_SS will also set UC_STRICT_RESTORE_SS * when delivering a signal that came from 64-bit code. * * Sigreturn restores SS as follows: * * if (saved SS is valid || UC_STRICT_RESTORE_SS is set || * saved CS is not 64-bit) * new SS = saved SS (will fail IRET and signal if invalid) * else * new SS = a flat 32-bit data segment * * This behavior serves three purposes: * * - Legacy programs that construct a 64-bit sigcontext from scratch * with zero or garbage in the SS slot (e.g. old CRIU) and call * sigreturn will still work. * * - Old DOSEMU versions sometimes catch a signal from a segmented * context, delete the old SS segment (with modify_ldt), and change * the saved CS to a 64-bit segment. These DOSEMU versions expect * sigreturn to send them back to 64-bit mode without killing them, * despite the fact that the SS selector when the signal was raised is * no longer valid. UC_STRICT_RESTORE_SS will be clear, so the kernel * will fix up SS for these DOSEMU versions. * * - Old and new programs that catch a signal and return without * modifying the saved context will end up in exactly the state they * started in, even if they were running in a segmented context when * the signal was raised.. Old kernels would lose track of the * previous SS value. */ #define UC_SIGCONTEXT_SS 0x2 #define UC_STRICT_RESTORE_SS 0x4 #endif #include <asm-generic/ucontext.h> #endif /* _ASM_X86_UCONTEXT_H */
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
a.out.h | File | 756 B | 0644 |
|
auxvec.h | File | 546 B | 0644 |
|
bitsperlong.h | File | 321 B | 0644 |
|
boot.h | File | 323 B | 0644 |
|
bootparam.h | File | 6.97 KB | 0644 |
|
bpf_perf_event.h | File | 40 B | 0644 |
|
byteorder.h | File | 176 B | 0644 |
|
debugreg.h | File | 3.21 KB | 0644 |
|
e820.h | File | 2.52 KB | 0644 |
|
errno.h | File | 31 B | 0644 |
|
fcntl.h | File | 31 B | 0644 |
|
hw_breakpoint.h | File | 69 B | 0644 |
|
hwcap2.h | File | 174 B | 0644 |
|
hyperv.h | File | 12.73 KB | 0644 |
|
ioctl.h | File | 31 B | 0644 |
|
ioctls.h | File | 32 B | 0644 |
|
ipcbuf.h | File | 32 B | 0644 |
|
ist.h | File | 854 B | 0644 |
|
kvm.h | File | 6.98 KB | 0644 |
|
kvm_para.h | File | 2.91 KB | 0644 |
|
kvm_perf.h | File | 388 B | 0644 |
|
ldt.h | File | 1.28 KB | 0644 |
|
mce.h | File | 1.28 KB | 0644 |
|
mman.h | File | 1002 B | 0644 |
|
msgbuf.h | File | 1.03 KB | 0644 |
|
msr.h | File | 346 B | 0644 |
|
mtrr.h | File | 4.13 KB | 0644 |
|
param.h | File | 31 B | 0644 |
|
perf_regs.h | File | 717 B | 0644 |
|
poll.h | File | 30 B | 0644 |
|
posix_types.h | File | 224 B | 0644 |
|
posix_types_32.h | File | 765 B | 0644 |
|
posix_types_64.h | File | 609 B | 0644 |
|
posix_types_x32.h | File | 581 B | 0644 |
|
prctl.h | File | 418 B | 0644 |
|
processor-flags.h | File | 6.47 KB | 0644 |
|
ptrace-abi.h | File | 1.99 KB | 0644 |
|
ptrace.h | File | 1.46 KB | 0644 |
|
resource.h | File | 34 B | 0644 |
|
sembuf.h | File | 777 B | 0644 |
|
setup.h | File | 6 B | 0644 |
|
shmbuf.h | File | 1.23 KB | 0644 |
|
sigcontext.h | File | 9.5 KB | 0644 |
|
sigcontext32.h | File | 247 B | 0644 |
|
siginfo.h | File | 494 B | 0644 |
|
signal.h | File | 2.83 KB | 0644 |
|
socket.h | File | 32 B | 0644 |
|
sockios.h | File | 33 B | 0644 |
|
stat.h | File | 3.06 KB | 0644 |
|
statfs.h | File | 416 B | 0644 |
|
svm.h | File | 6.9 KB | 0644 |
|
swab.h | File | 724 B | 0644 |
|
termbits.h | File | 34 B | 0644 |
|
termios.h | File | 33 B | 0644 |
|
types.h | File | 152 B | 0644 |
|
ucontext.h | File | 2.07 KB | 0644 |
|
unistd.h | File | 359 B | 0644 |
|
unistd_32.h | File | 9.9 KB | 0644 |
|
unistd_64.h | File | 8.68 KB | 0644 |
|
unistd_x32.h | File | 15.3 KB | 0644 |
|
vm86.h | File | 3.04 KB | 0644 |
|
vmx.h | File | 6.59 KB | 0644 |
|
vsyscall.h | File | 263 B | 0644 |
|