getegid on x64
get group identity
sys_getegid(void)
| number | 108 (0x6c) |
|---|---|
| abi | common |
| entry point | sys_getegid |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | getegid(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 108, 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 50
- arm64 177
- arm 50
- riscv64 177
- ia32 50
- x32 1073741932
- loongarch64 177
- ppc64 50
- ppc 50
- s390x 202
- mips64 5106
- mipsn32 6106
- mipso32 4050
- alpha 530
- arc 177
- blackfin 50, removed in 4.17
- cris 50, removed in 4.17
- csky 177
- frv 50, removed in 4.17
- hexagon 177
- ia64 1063, removed in 6.7
- m68k 50
- metag 177, removed in 4.17
- microblaze 50
- mn10300 50, removed in 4.17
- nds32 177, removed in 5.18
- nios2 177
- openrisc 177
- parisc 50
- score 177, removed in 4.17
- sh 50
- sparc 50
- sparc64 50
- tilegx 177, removed in 4.17
- tilepro 177, removed in 4.17
- xtensa 141
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/getegid