syscall.sh / riscv64 / pkey_mprotect
pkey_mprotect
set protection on a region of memory
sys_pkey_mprotect(unsigned long start, size_t len, unsigned long prot, int pkey)
| number | 288 (0x120) |
|---|---|
| abi | common |
| entry point | sys_pkey_mprotect |
| since | Linux 4.15 |
| man page | pkey_mprotect(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
a7 | 288, the syscall number |
a0 | unsigned long start |
a1 | size_t len |
a2 | unsigned long prot |
a3 | int pkey |
a0 | the return value |
Then run ecall to enter the kernel.
Same syscall on other architectures
- x64 329
- x86 380
- arm64 288
- arm 394
- x32 1073742153
- loongarch64 288
- ppc64 386
- ppc 386
- s390x 384
- mips64 5323
- mipsn32 6327
- mipso32 4363
- alpha 524
- arc 288
- csky 288
- hexagon 288
- m68k 381
- microblaze 395
- nios2 288
- openrisc 288
- parisc 351
- sh 384
- sparc 362
- sparc64 362
- xtensa 348
Get this as JSON: https://api.syscall.sh/v2/syscalls/riscv64/pkey_mprotect