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
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.
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
HISTORY
The msyscall
() function first appeared in
OpenBSD 6.7.