munlockall on x64
lock and unlock memory
sys_munlockall(void)
| number | 152 (0x98) |
|---|---|
| abi | common |
| entry point | sys_munlockall |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | munlockall(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 152, the syscall number |
rax | the return value |
Then run syscall to enter the kernel.
The syscall instruction clobbers rcx (the return address lands in rcx) and r11 (the flags land in r11).
Since Linux 5.14 the kernel reads the syscall number from eax and ignores the upper 32 bits of rax. Older kernels fail with ENOSYS when those bits are not zero, and mov eax, N clears them, so it works on both.
Same syscall on other architectures
- x86 153
- arm64 231
- arm 153
- riscv64 231
- ia32 153
- x32 1073741976
- loongarch64 231
- ppc64 153
- ppc 153
- s390x 153
- mips64 5149
- mipsn32 6149
- mipso32 4157
- alpha 317
- arc 231
- cris 153, removed in 4.17
- csky 231
- frv 153, removed in 4.17
- hexagon 231
- ia64 1159, removed in 6.7
- m32r 153, removed in 4.17
- m68k 153
- metag 231, removed in 4.17
- microblaze 153
- mn10300 153, removed in 4.17
- nds32 231, removed in 5.18
- nios2 231
- openrisc 231
- parisc 153
- score 231, removed in 4.17
- sh 153
- sparc 240
- sparc64 240
- tilegx 231, removed in 4.17
- tilepro 231, removed in 4.17
- xtensa 87
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/munlockall