modify_ldt on ia32

get or set a per-process LDT entry

sys_modify_ldt(int func, void *ptr, unsigned long bytecount)
number123 (0x7b)
abii386
kconfigCONFIG_MODIFY_LDT_SYSCALL
entry pointsys_modify_ldt
sinceLinux 3.3 or earlier (3.3 is the first release scanned for ia32)
man pagemodify_ldt(2)
sourceelixir.bootlin.com

Registers

registervalue
eax123, the syscall number
ebxint func
ecxvoid *ptr
edxunsigned long bytecount
eaxthe return value

Then run int 0x80 to enter the kernel.

This compat ABI is only available when the kernel is built with CONFIG_IA32_EMULATION.

Same syscall on other architectures

Get this as JSON: https://api.syscall.sh/v2/syscalls/ia32/modify_ldt