delete_module on x64
unload a kernel module
sys_delete_module(const char *name_user, unsigned int flags)
| number | 176 (0xb0) |
|---|---|
| abi | common |
| entry point | sys_delete_module |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | delete_module(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 176, the syscall number |
rdi | const char *name_user |
rsi | unsigned int flags |
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 129
- arm64 106
- arm 129
- riscv64 106
- ia32 129
- x32 1073742000
- loongarch64 106
- ppc64 129
- ppc 129
- s390x 129
- mips64 5169
- mipsn32 6169
- mipso32 4129
- alpha 308
- arc 106
- blackfin 129, removed in 4.17
- cris 129, removed in 4.17
- csky 106
- frv 129, removed in 4.17
- hexagon 106
- ia64 1134, removed in 6.7
- m32r 129, removed in 4.17
- m68k 129
- metag 106, removed in 4.17
- microblaze 129
- mn10300 129, removed in 4.17
- nds32 106, removed in 5.18
- nios2 106
- openrisc 106
- parisc 129
- score 106, removed in 4.17
- sh 129
- sparc 222
- sparc64 222
- tilegx 106, removed in 4.17
- tilepro 106, removed in 4.17
- xtensa 211
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/delete_module