MSYSCALL(2)

NAME
msyscall - permit syscalls from a region of pages

SYNOPSIS
#include <sys/mman.h>
int
msyscall(void *addr, size_t len);

DESCRIPTION
The msyscall() 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.

msyscall() 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.

RETURN VALUES

ERRORS
msyscall() will fail if:

[EINVAL]
    The specified address range would wrap around.

[EPERM]
    Attempt to call msyscall() after ld.so(1) has called it.

SEE ALSO
mmap(2)

HISTORY
The msyscall() function first appeared in OpenBSD 6.7.