kcmp on score
compare two processes to determine if they share a kernel resource
sys_kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2)
| number | 272 (0x110) |
|---|---|
| abi | common |
| kconfig | CONFIG_KCMP |
| entry point | sys_kcmp |
| since | Linux 3.7 or earlier (3.7 is the first release scanned for score) |
| man page | kcmp(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
r27 | 272, the syscall number |
r4 | pid_t pid1 |
r5 | pid_t pid2 |
r6 | int type |
r7 | unsigned long idx1 |
r8 | unsigned long idx2 |
r4 | the return value |
Then run syscall to enter the kernel.
r7 is the error flag and r4 then holds the positive error number.
This architecture was removed from the Linux kernel in Linux 4.17. The newest release with a syscall table here is Linux 4.16. The other removed architectures live on the historical architectures page.
Same syscall on other architectures
- x64 312
- x86 349
- arm64 272
- arm 378
- riscv64 272
- ia32 349
- x32 1073742136
- loongarch64 272
- ppc64 354
- ppc 354
- s390x 343
- mips64 5306
- mipsn32 6311
- mipso32 4347
- alpha 506
- arc 272
- blackfin 383, removed in 4.17
- cris 350, removed in 4.17
- csky 272
- hexagon 272
- ia64 1345, removed in 6.7
- m68k 347
- metag 272, removed in 4.17
- microblaze 379
- nds32 272, removed in 5.18
- nios2 272
- openrisc 272
- parisc 332
- sh 367
- sparc 341
- sparc64 341
- tilegx 272, removed in 4.17
- tilepro 272, removed in 4.17
- xtensa 331
Get this as JSON: https://api.syscall.sh/v2/syscalls/score/kcmp?kernel=all