specify the call stub for a specific
system call specifies the start to
start + len range in the address space where the call
stub for the specified syscall resides. This range is
typically under 80 bytes long, and varies by architecture.
Only the SYS_execve system call is currently supported. The shared library linker ld.so automatically tells the kernel about SYS_execve at startup. For static binaries, libc initialization performs the same action.
Once the kernel knows the specific location in the address space
where that system call must be entered from, any attempt to use a
system-call entry instruction to perform the specified
syscall from a different address range will deliver
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.
pinsyscall() will fail if:
- Unsupported syscall.
- The range between start and start + len is not in the address space.
- The range for the specified syscall has been previously set.
pinsyscall() system call first
appeared in OpenBSD 7.3.