fchroot on x64
sys_fchroot(int fd, unsigned int flags)
| number | 472 (0x1d8) |
|---|---|
| abi | common |
| entry point | sys_fchroot |
| since | Linux 7.3 |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 472, the syscall number |
rdi | int fd |
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 472
- arm64 472
- arm 472
- riscv64 472
- ia32 472
- x32 1073742296
- loongarch64 472
- ppc64 472
- ppc 472
- s390x 472
- mips64 5472
- mipsn32 6472
- mipso32 4472
- alpha 582
- arc 472
- csky 472
- hexagon 472
- m68k 472
- microblaze 472
- nios2 472
- openrisc 472
- parisc 472
- sh 472
- sparc 472
- sparc64 472
- xtensa 472
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/fchroot