+++ /dev/null
-.\" $OpenBSD: pinsyscall.2,v 1.5 2023/02/21 19:49:50 jmc Exp $
-.\"
-.\" Copyright (c) 2023 Theo de Raadt <deraadt@openbsd.org>
-.\"
-.\" Permission to use, copy, modify, and distribute this software for any
-.\" purpose with or without fee is hereby granted, provided that the above
-.\" copyright notice and this permission notice appear in all copies.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-.\"
-.Dd $Mdocdate: February 21 2023 $
-.Dt PINSYSCALL 2
-.Os
-.Sh NAME
-.Nm pinsyscall
-.Nd specify the call stub for a specific system call
-.Sh SYNOPSIS
-.In sys/types.h
-.In sys/syscall.h
-.Ft int
-.Fn pinsyscall "int syscall" "void *start" "size_t len"
-.Sh DESCRIPTION
-The
-.Fn pinsyscall
-system call specifies the
-.Va start
-to
-.Va start + len
-range in the address space where the call stub for the specified
-.Va syscall
-resides.
-This range is typically under 80 bytes long, and varies by architecture.
-.Pp
-Only the
-.Va SYS_execve
-system call is currently supported.
-The shared library linker
-.Pa ld.so
-automatically tells the kernel about
-.Va SYS_execve
-at startup.
-For static binaries, libc initialization performs the same action.
-.Pp
-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
-.Va syscall
-from a different address range will deliver
-.Dv SIGABRT .
-.Sh RETURN VALUES
-.Rv -std
-.Sh ERRORS
-.Fn pinsyscall
-will fail if:
-.Bl -tag -width Er
-.It Bq Er EINVAL
-Unsupported syscall.
-.It Bq Er EFAULT
-The range between
-.Va start
-and
-.Va start + len
-is not in the address space.
-.It Bq Er EPERM
-The range for the specified syscall has been previously set.
-.El
-.Sh HISTORY
-The
-.Fn pinsyscall
-system call first appeared in
-.Ox 7.3 .
-/* $OpenBSD: kern_pledge.c,v 1.311 2024/03/22 05:54:25 ratchov Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.312 2024/03/28 02:19:57 deraadt Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
[SYS_sendsyslog] = PLEDGE_ALWAYS, /* stack protector reporting */
[SYS_thrkill] = PLEDGE_ALWAYS, /* raise, abort, stack pro */
[SYS_utrace] = PLEDGE_ALWAYS, /* ltrace(1) from ld.so */
- [SYS_pinsyscall] = PLEDGE_ALWAYS,
[SYS_pinsyscalls] = PLEDGE_ALWAYS,
/* "getting" information about self is considered safe */
-; $OpenBSD: syscalls.master,v 1.258 2024/03/25 17:42:34 mvs Exp $
+; $OpenBSD: syscalls.master,v 1.259 2024/03/28 02:19:57 deraadt Exp $
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
143 STD { int sys_setthrname(pid_t tid, const char *name); }
144 OBSOL ogetrlimit
145 OBSOL osetrlimit
-146 STD NOLOCK { int sys_pinsyscall(int syscall, void *addr, size_t len); }
+146 OBSOL pinsyscall
147 STD { int sys_setsid(void); }
148 STD { int sys_quotactl(const char *path, int cmd, \
int uid, char *arg); }
-/* $OpenBSD: uvm_mmap.c,v 1.185 2024/01/19 21:20:35 deraadt Exp $ */
+/* $OpenBSD: uvm_mmap.c,v 1.186 2024/03/28 02:19:57 deraadt Exp $ */
/* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */
/*
return uvm_map_syscall(&p->p_vmspace->vm_map, addr, addr+size);
}
-/*
- * sys_pinsyscall
- */
-int
-sys_pinsyscall(struct proc *p, void *v, register_t *retval)
-{
- return (0);
-}
-
/*
* sys_pinsyscalls. The caller is required to normalize base,len
* to the minimum .text region, and adjust pintable offsets relative