vhangup on x64
virtually hangup the current terminal
sys_vhangup(void)
| number | 153 (0x99) |
|---|---|
| abi | common |
| entry point | sys_vhangup |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | vhangup(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 153, 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 111
- arm64 58
- arm 111
- riscv64 58
- ia32 111
- x32 1073741977
- loongarch64 58
- ppc64 111
- ppc 111
- s390x 111
- mips64 5150
- mipsn32 6150
- mipso32 4111
- alpha 76
- arc 58
- blackfin 111, removed in 4.17
- cris 111, removed in 4.17
- csky 58
- frv 111, removed in 4.17
- hexagon 58
- ia64 1123, removed in 6.7
- m32r 111, removed in 4.17
- m68k 111
- metag 58, removed in 4.17
- microblaze 111
- mn10300 111, removed in 4.17
- nds32 58, removed in 5.18
- nios2 58
- openrisc 58
- parisc 111
- score 58, removed in 4.17
- sh 111
- sparc 76
- sparc64 76
- tilegx 58, removed in 4.17
- tilepro 58, removed in 4.17
- xtensa 201
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/vhangup