personality on x64
set the process execution domain
sys_personality(unsigned int personality)
| number | 135 (0x87) |
|---|---|
| abi | common |
| entry point | sys_personality |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | personality(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 135, the syscall number |
rdi | unsigned int personality |
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 136
- arm64 92
- arm 136
- riscv64 92
- ia32 136
- x32 1073741959
- loongarch64 92
- ppc64 136
- ppc 136
- s390x 136
- mips64 5132
- mipsn32 6132
- mipso32 4136
- alpha 324
- arc 92
- blackfin 136, removed in 4.17
- cris 136, removed in 4.17
- csky 92
- frv 136, removed in 4.17
- hexagon 92
- ia64 1140, removed in 6.7
- m32r 136, removed in 4.17
- m68k 136
- metag 92, removed in 4.17
- microblaze 136
- mn10300 136, removed in 4.17
- nds32 92, removed in 5.18
- nios2 92
- openrisc 92
- parisc 136
- score 92, removed in 4.17
- sh 136
- sparc 191
- sparc64 191
- tilegx 92, removed in 4.17
- tilepro 92, removed in 4.17
- xtensa 131
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/personality