summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2023-12-12 15:30:57 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2023-12-12 15:30:57 +0000
commit8c7460c9897521d5f816ac3fda78a94555c9b9b8 (patch)
treea76554430df0c1549d7f9a58111ca1376d678b61 /sys/kern
parentd88a737e6a2d8df255f5eb84d88fdb69f559a924 (diff)
remove support for syscall(2) -- the "indirection system call" because
it is a dangerous alternative entry point for all system calls, and thus incompatible with the precision system call entry point scheme we are heading towards. This has been a 3-year mission: First perl needed a code-generated wrapper to fake syscall(2) as a giant switch table, then all the ports were cleaned with relatively minor fixes, except for "go". "go" required two fixes -- 1) a framework issue with old library versions, and 2) like perl, a fake syscall(2) wrapper to handle ioctl(2) and sysctl(2) because "syscall(SYS_ioctl" occurs all over the place in the "go" ecosystem because the "go developers" are plan9-loving unix-hating folk who tried to build an ecosystem without allowing "ioctl". ok kettenis, jsing, afresh1, sthen
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_ktrace.c4
-rw-r--r--sys/kern/syscalls.master4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c
index 528547a8ab3..9d88075f44a 100644
--- a/sys/kern/kern_ktrace.c
+++ b/sys/kern/kern_ktrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_ktrace.c,v 1.112 2023/05/11 09:51:33 bluhm Exp $ */
+/* $OpenBSD: kern_ktrace.c,v 1.113 2023/12/12 15:30:55 deraadt Exp $ */
/* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */
/*
@@ -160,7 +160,7 @@ ktrsyscall(struct proc *p, register_t code, size_t argsize, register_t args[])
u_int nargs = 0;
int i;
- if ((code & KTRC_CODE_MASK) == SYS_sysctl) {
+ if (code == SYS_sysctl) {
/*
* The sysctl encoding stores the mib[]
* array because it is interesting.
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index ac0b924b8ae..31c051c94ac 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -1,4 +1,4 @@
-; $OpenBSD: syscalls.master,v 1.253 2023/12/10 16:59:09 deraadt Exp $
+; $OpenBSD: syscalls.master,v 1.254 2023/12/12 15:30:55 deraadt Exp $
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -48,7 +48,7 @@
; redistributions should be placed in the reserved range at the end
; of the current calls.
-0 INDIR { int sys_syscall(int number, ...); }
+0 UNIMPL syscall
1 STD { void sys_exit(int rval); }
2 STD { int sys_fork(void); }
3 STD NOLOCK { ssize_t sys_read(int fd, void *buf, size_t nbyte); }