clone3 on x64
create a child process
sys_clone3(struct clone_args *uargs, size_t size)
| number | 435 (0x1b3) |
|---|---|
| abi | common |
| entry point | sys_clone3 |
| since | Linux 5.3 |
| man page | clone3(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 435, the syscall number |
rdi | struct clone_args *uargs |
rsi | size_t size |
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 435
- arm64 435
- arm 435
- riscv64 435
- ia32 435
- x32 1073742259
- loongarch64 435
- ppc64 435
- ppc 435
- s390x 435
- mips64 5435
- mipsn32 6435
- mipso32 4435
- alpha 545
- arc 435
- csky 435
- hexagon 435
- m68k 435
- microblaze 435
- nios2 435
- openrisc 435
- parisc 435
- sparc 435
- sparc64 435
- xtensa 435
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/clone3