syscall.sh / sh / mmap2

mmap2

map files or devices into memory

sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long pgoff)
number192 (0xc0)
abicommon
entry pointsys_mmap2
sinceLinux 5.0
man pagemmap2(2)
sourceelixir.bootlin.com

Registers

registervalue
r3192, the syscall number
r4unsigned long addr
r5unsigned long len
r6unsigned long prot
r7unsigned long flags
r0unsigned long fd
r1unsigned long pgoff
r0the return value

Then run trapa #31 to enter the kernel.

Same syscall on other architectures

Get this as JSON: https://api.syscall.sh/v2/syscalls/sh/mmap2