diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/alpha/alpha/trap.c | 7 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/trap.c | 3 | ||||
-rw-r--r-- | sys/arch/arm/arm/syscall.c | 8 | ||||
-rw-r--r-- | sys/arch/arm64/arm64/syscall.c | 3 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/trap.c | 15 | ||||
-rw-r--r-- | sys/arch/i386/i386/trap.c | 11 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/trap.c | 21 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/trap.c | 6 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/trap.c | 12 | ||||
-rw-r--r-- | sys/arch/powerpc64/powerpc64/syscall.c | 3 | ||||
-rw-r--r-- | sys/arch/riscv64/riscv64/syscall.c | 3 | ||||
-rw-r--r-- | sys/arch/sh/sh/trap.c | 15 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/trap.c | 9 | ||||
-rw-r--r-- | sys/kern/syscalls.master | 4 | ||||
-rw-r--r-- | sys/sys/syscall_mi.h | 5 |
15 files changed, 18 insertions, 107 deletions
diff --git a/sys/arch/alpha/alpha/trap.c b/sys/arch/alpha/alpha/trap.c index 6a0c1c481ed..635f2a7d6d3 100644 --- a/sys/arch/alpha/alpha/trap.c +++ b/sys/arch/alpha/alpha/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.106 2023/01/31 15:18:51 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.107 2023/02/11 23:07:26 deraadt Exp $ */ /* $NetBSD: trap.c,v 1.52 2000/05/24 16:48:33 thorpej Exp $ */ /*- @@ -518,11 +518,6 @@ syscall(code, framep) switch(code) { case SYS_syscall: - case SYS___syscall: - /* - * syscall() and __syscall() are handled the same on - * the alpha, as everything is 64-bit aligned, anyway. - */ indirect = code; code = framep->tf_regs[FRAME_A0]; hidden = 1; diff --git a/sys/arch/amd64/amd64/trap.c b/sys/arch/amd64/amd64/trap.c index 33f73911ff8..272d84b27d0 100644 --- a/sys/arch/amd64/amd64/trap.c +++ b/sys/arch/amd64/amd64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.96 2023/01/20 16:01:04 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.97 2023/02/11 23:07:26 deraadt Exp $ */ /* $NetBSD: trap.c,v 1.2 2003/05/04 23:51:56 fvdl Exp $ */ /*- @@ -574,7 +574,6 @@ syscall(struct trapframe *frame) switch (code) { case SYS_syscall: - case SYS___syscall: /* * Code is first argument, followed by actual args. */ diff --git a/sys/arch/arm/arm/syscall.c b/sys/arch/arm/arm/syscall.c index eabf879dead..c23dcc32f2a 100644 --- a/sys/arch/arm/arm/syscall.c +++ b/sys/arch/arm/arm/syscall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.c,v 1.25 2023/01/16 05:32:04 deraadt Exp $ */ +/* $OpenBSD: syscall.c,v 1.26 2023/02/11 23:07:26 deraadt Exp $ */ /* $NetBSD: syscall.c,v 1.24 2003/11/14 19:03:17 scw Exp $ */ /*- @@ -122,12 +122,6 @@ swi_handler(trapframe_t *frame) code = *ap++; nap--; break; - case SYS___syscall: - indirect = code; - code = ap[_QUAD_LOWWORD]; - ap += 2; - nap -= 2; - break; } callp = sysent; diff --git a/sys/arch/arm64/arm64/syscall.c b/sys/arch/arm64/arm64/syscall.c index 343231259df..fab269d49d6 100644 --- a/sys/arch/arm64/arm64/syscall.c +++ b/sys/arch/arm64/arm64/syscall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.c,v 1.12 2023/01/16 05:32:05 deraadt Exp $ */ +/* $OpenBSD: syscall.c,v 1.13 2023/02/11 23:07:26 deraadt Exp $ */ /* * Copyright (c) 2015 Dale Rahn <drahn@dalerahn.com> * @@ -54,7 +54,6 @@ svc_handler(trapframe_t *frame) switch (code) { case SYS_syscall: - case SYS___syscall: indirect = code; code = *ap++; nap--; diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c index d8600482f1a..bebd3c072ba 100644 --- a/sys/arch/hppa/hppa/trap.c +++ b/sys/arch/hppa/hppa/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.160 2023/01/16 05:32:05 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.161 2023/02/11 23:07:26 deraadt Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -788,19 +788,6 @@ syscall(struct trapframe *frame) args[2] = frame->tf_arg3; argoff = 3; break; - case SYS___syscall: - /* - * this works, because quads get magically swapped - * due to the args being laid backwards on the stack - * and then copied in words - */ - indirect = code; - code = frame->tf_arg0; - args[0] = frame->tf_arg2; - args[1] = frame->tf_arg3; - argoff = 2; - retq = 1; - break; default: args[0] = frame->tf_arg0; args[1] = frame->tf_arg1; diff --git a/sys/arch/i386/i386/trap.c b/sys/arch/i386/i386/trap.c index 9751eb9e8ef..c936dc35070 100644 --- a/sys/arch/i386/i386/trap.c +++ b/sys/arch/i386/i386/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.159 2023/01/30 10:49:05 jsg Exp $ */ +/* $OpenBSD: trap.c,v 1.160 2023/02/11 23:07:27 deraadt Exp $ */ /* $NetBSD: trap.c,v 1.95 1996/05/05 06:50:02 mycroft Exp $ */ /*- @@ -556,15 +556,6 @@ syscall(struct trapframe *frame) copyin(params, &code, sizeof(int)); params += sizeof(int); break; - case SYS___syscall: - /* - * Like syscall, but code is a quad, so as to maintain - * quad alignment for the rest of the arguments. - */ - indirect = code; - copyin(params + _QUAD_LOWWORD * sizeof(int), &code, sizeof(int)); - params += sizeof(quad_t); - break; default: break; } diff --git a/sys/arch/m88k/m88k/trap.c b/sys/arch/m88k/m88k/trap.c index 0af00c0a7c8..7f4d31149e4 100644 --- a/sys/arch/m88k/m88k/trap.c +++ b/sys/arch/m88k/m88k/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.126 2023/01/31 15:18:54 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.127 2023/02/11 23:07:27 deraadt Exp $ */ /* * Copyright (c) 2004, Miodrag Vallat. * Copyright (c) 1998 Steve Murphree, Jr. @@ -1167,9 +1167,7 @@ m88100_syscall(register_t code, struct trapframe *tf) /* * For 88k, all the arguments are passed in the registers (r2-r9), * and further arguments (if any) on stack. - * For syscall (and __syscall), r2 (and r3) has the actual code. - * __syscall takes a quad syscall number, so that other - * arguments are at their natural alignments. + * For syscall, r2 has the actual code. */ ap = &tf->tf_r[2]; nap = 8; /* r2-r9 */ @@ -1180,12 +1178,6 @@ m88100_syscall(register_t code, struct trapframe *tf) code = *ap++; nap--; break; - case SYS___syscall: - indirect = code; - code = ap[_QUAD_LOWWORD]; - ap += 2; - nap -= 2; - break; } callp = sysent; @@ -1288,9 +1280,7 @@ m88110_syscall(register_t code, struct trapframe *tf) /* * For 88k, all the arguments are passed in the registers (r2-r9), * and further arguments (if any) on stack. - * For syscall (and __syscall), r2 (and r3) has the actual code. - * __syscall takes a quad syscall number, so that other - * arguments are at their natural alignments. + * For syscall, r2 has the actual code. */ ap = &tf->tf_r[2]; nap = 8; /* r2-r9 */ @@ -1300,11 +1290,6 @@ m88110_syscall(register_t code, struct trapframe *tf) code = *ap++; nap--; break; - case SYS___syscall: - code = ap[_QUAD_LOWWORD]; - ap += 2; - nap -= 2; - break; } callp = sysent; diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c index 79f3558dcb1..ba018dd9f48 100644 --- a/sys/arch/mips64/mips64/trap.c +++ b/sys/arch/mips64/mips64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.165 2023/01/16 05:32:05 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.166 2023/02/11 23:07:27 deraadt Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -426,12 +426,8 @@ fault_common_no_miss: code = locr0->v0; switch (code) { case SYS_syscall: - case SYS___syscall: /* * Code is first argument, followed by actual args. - * __syscall provides the code as a quad to maintain - * proper alignment of 64-bit arguments on 32-bit - * platforms, which doesn't change anything here. */ indirect = code; code = locr0->a0; diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c index 5002becf570..94ec7ccf281 100644 --- a/sys/arch/powerpc/powerpc/trap.c +++ b/sys/arch/powerpc/powerpc/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.130 2023/01/31 01:27:58 gkoehler Exp $ */ +/* $OpenBSD: trap.c,v 1.131 2023/02/11 23:07:27 deraadt Exp $ */ /* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */ /* @@ -372,16 +372,6 @@ trap(struct trapframe *frame) indirect = code; code = *params++; break; - case SYS___syscall: - /* - * Like syscall, but code is a quad, - * so as to maintain quad alignment - * for the rest of the args. - */ - params++; - indirect = code; - code = *params++; - break; default: break; } diff --git a/sys/arch/powerpc64/powerpc64/syscall.c b/sys/arch/powerpc64/powerpc64/syscall.c index 87b2da61fd8..04fcc332728 100644 --- a/sys/arch/powerpc64/powerpc64/syscall.c +++ b/sys/arch/powerpc64/powerpc64/syscall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.c,v 1.10 2023/01/16 05:32:05 deraadt Exp $ */ +/* $OpenBSD: syscall.c,v 1.11 2023/02/11 23:07:27 deraadt Exp $ */ /* * Copyright (c) 2015 Dale Rahn <drahn@dalerahn.com> @@ -40,7 +40,6 @@ syscall(struct trapframe *frame) switch (code) { case SYS_syscall: - case SYS___syscall: indirect = code; code = *ap++; nap--; diff --git a/sys/arch/riscv64/riscv64/syscall.c b/sys/arch/riscv64/riscv64/syscall.c index 77944c44d19..a918bb02601 100644 --- a/sys/arch/riscv64/riscv64/syscall.c +++ b/sys/arch/riscv64/riscv64/syscall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.c,v 1.14 2023/01/16 05:32:05 deraadt Exp $ */ +/* $OpenBSD: syscall.c,v 1.15 2023/02/11 23:07:27 deraadt Exp $ */ /* * Copyright (c) 2020 Brian Bamsch <bbamsch@google.com> @@ -57,7 +57,6 @@ svc_handler(trapframe_t *frame) switch (code) { case SYS_syscall: - case SYS___syscall: indirect = code; code = *ap++; nap--; diff --git a/sys/arch/sh/sh/trap.c b/sys/arch/sh/sh/trap.c index 491a239bd21..72421959d63 100644 --- a/sys/arch/sh/sh/trap.c +++ b/sys/arch/sh/sh/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.53 2023/01/16 05:32:05 deraadt Exp $ */ +/* $OpenBSD: trap.c,v 1.54 2023/02/11 23:07:27 deraadt Exp $ */ /* $NetBSD: exception.c,v 1.32 2006/09/04 23:57:52 uwe Exp $ */ /* $NetBSD: syscall.c,v 1.6 2006/03/07 07:21:50 thorpej Exp $ */ @@ -536,19 +536,6 @@ syscall(struct proc *p, struct trapframe *tf) code = tf->tf_r4; argoff = 1; break; - case SYS___syscall: - /* - * Like syscall, but code is a quad, so as to maintain - * quad alignment for the rest of the arguments. - */ - indirect = code; -#if _BYTE_ORDER == BIG_ENDIAN - code = tf->tf_r5; -#else - code = tf->tf_r4; -#endif - argoff = 2; - break; default: argoff = 0; break; diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c index 7321a66f9d1..09723a695ee 100644 --- a/sys/arch/sparc64/sparc64/trap.c +++ b/sys/arch/sparc64/sparc64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.114 2023/01/24 07:26:34 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.115 2023/02/11 23:07:28 deraadt Exp $ */ /* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */ /* @@ -1133,19 +1133,12 @@ syscall(struct trapframe *tf, register_t code, register_t pc) * The first six system call arguments are in the six %o registers. * Any arguments beyond that are in the `argument extension' area * of the user's stack frame (see <machine/frame.h>). - * - * Check for ``special'' codes that alter this, namely syscall and - * __syscall. These both pass a syscall number in the first argument - * register, so the other arguments are just shifted down, possibly - * pushing one off the end into the extension area. This happens - * with mmap() and mquery() used via __syscall(). */ ap = &tf->tf_out[0]; nap = 6; switch (code) { case SYS_syscall: - case SYS___syscall: indirect = code; code = *ap++; nap--; diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 029d06a2b3b..4bb0a8c905b 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.239 2023/01/07 05:24:58 guenther Exp $ +; $OpenBSD: syscalls.master,v 1.240 2023/02/11 23:07:25 deraadt Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -360,7 +360,7 @@ 196 OBSOL ogetdirentries48 197 STD { void *sys_pad_mmap(void *addr, size_t len, int prot, \ int flags, int fd, long pad, off_t pos); } -198 INDIR { quad_t sys___syscall(quad_t num, ...); } +198 OBSOL __syscall 199 STD NOLOCK { off_t sys_pad_lseek(int fd, int pad, off_t offset, \ int whence); } 200 STD { int sys_pad_truncate(const char *path, int pad, \ diff --git a/sys/sys/syscall_mi.h b/sys/sys/syscall_mi.h index 07c2c9bab9f..7f88ce78ef9 100644 --- a/sys/sys/syscall_mi.h +++ b/sys/sys/syscall_mi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall_mi.h,v 1.27 2023/01/16 05:32:05 deraadt Exp $ */ +/* $OpenBSD: syscall_mi.h,v 1.28 2023/02/11 23:07:23 deraadt Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -77,9 +77,6 @@ mi_syscall(struct proc *p, register_t code, int indirect, case SYS_syscall: indirect = KTRC_CODE_SYSCALL; break; - case SYS___syscall: - indirect = KTRC_CODE__SYSCALL; - break; default: indirect = 0; } |