OpenBSD manual page server

Manual Page Search Parameters

MSYSCALL(2) System Calls Manual MSYSCALL(2)

msyscallpermit syscalls from a region of pages

#include <sys/mman.h>

int
msyscall(void *addr, size_t len);

The () system call permits system call entry from the pages that contain the address range addr through addr + len - 1 (inclusive). If len is 0, no action is taken on the page that contains addr.

() is currently intended for use by ld.so(1) only, and may be called only once to indicate the location of the loaded libc.so library.

Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

msyscall() will fail if:

[]
The specified address range would wrap around.
[]
Attempt to call msyscall() after ld.so(1) has called it.

mmap(2)

The msyscall() function first appeared in OpenBSD 6.7.

September 14, 2023 OpenBSD-current