__semctl
__set_tcb
__stack_smash_handler
-__syscall
__tfork_thread
__threxit
__thrsigdivert
_thread_sys___realpath
_thread_sys___semctl
_thread_sys___set_tcb
-_thread_sys___syscall
_thread_sys___threxit
_thread_sys___thrsigdivert
_thread_sys___thrsleep
-# $OpenBSD: Makefile.inc,v 1.169 2023/01/08 04:54:50 guenther Exp $
+# $OpenBSD: Makefile.inc,v 1.170 2023/02/11 23:07:28 deraadt Exp $
# $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $
# @(#)Makefile.inc 8.1 (Berkeley) 6/17/93
# modules with default implementations on all architectures, unless overridden
# below:
-ASM= __semctl.o __syscall.o __thrsigdivert.o \
+ASM= __semctl.o __thrsigdivert.o \
access.o acct.o adjfreq.o adjtime.o \
bind.o chdir.o chflags.o chflagsat.o chmod.o chown.o chroot.o \
clock_getres.o clock_settime.o \
-.\" $OpenBSD: syscall.2,v 1.14 2022/08/02 17:37:18 deraadt Exp $
+.\" $OpenBSD: syscall.2,v 1.15 2023/02/11 23:07:28 deraadt Exp $
.\" $NetBSD: syscall.2,v 1.4 1995/02/27 12:38:53 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\"
.\" @(#)syscall.2 8.1 (Berkeley) 6/16/93
.\"
-.Dd $Mdocdate: August 2 2022 $
+.Dd $Mdocdate: February 11 2023 $
.Dt SYSCALL 2
.Os
.Sh NAME
-.Nm syscall ,
-.Nm __syscall
+.Nm syscall
.Nd indirect system call
.Sh SYNOPSIS
.In sys/syscall.h
.In unistd.h
.Ft int
.Fn syscall "int number" "..."
-.Fn __syscall "quad_t number" "..."
.Sh DESCRIPTION
.Fn syscall
performs the system call whose assembly language
Symbolic constants for system calls can be found in the header file
.In sys/syscall.h .
.Pp
-Since different system calls have different return types, a
-prototype of
-.Nm __syscall
-specifying the correct return type should be declared locally.
-This is especially important for system calls returning
-larger-than-int results.
-.Pp
-The
-.Nm __syscall
-form should be used when one or more of the parameters is a
-64-bit argument to ensure that argument alignment is correct.
-This system call is useful for testing new system calls that
-do not have entries in the C library.
.Sh RETURN VALUES
The return values are defined by the system call being invoked.
In general, for system calls returning
-/* $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 $ */
/*-
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;
-/* $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 $ */
/*-
switch (code) {
case SYS_syscall:
- case SYS___syscall:
/*
* Code is first argument, followed by actual args.
*/
-/* $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 $ */
/*-
code = *ap++;
nap--;
break;
- case SYS___syscall:
- indirect = code;
- code = ap[_QUAD_LOWWORD];
- ap += 2;
- nap -= 2;
- break;
}
callp = sysent;
-/* $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>
*
switch (code) {
case SYS_syscall:
- case SYS___syscall:
indirect = code;
code = *ap++;
nap--;
-/* $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
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;
-/* $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 $ */
/*-
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;
}
-/* $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.
/*
* 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 */
code = *ap++;
nap--;
break;
- case SYS___syscall:
- indirect = code;
- code = ap[_QUAD_LOWWORD];
- ap += 2;
- nap -= 2;
- break;
}
callp = sysent;
/*
* 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 */
code = *ap++;
nap--;
break;
- case SYS___syscall:
- code = ap[_QUAD_LOWWORD];
- ap += 2;
- nap -= 2;
- break;
}
callp = sysent;
-/* $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.
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;
-/* $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 $ */
/*
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;
}
-/* $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>
switch (code) {
case SYS_syscall:
- case SYS___syscall:
indirect = code;
code = *ap++;
nap--;
-/* $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>
switch (code) {
case SYS_syscall:
- case SYS___syscall:
indirect = code;
code = *ap++;
nap--;
-/* $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 $ */
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;
-/* $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 $ */
/*
* 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--;
-; $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
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, \
-/* $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
case SYS_syscall:
indirect = KTRC_CODE_SYSCALL;
break;
- case SYS___syscall:
- indirect = KTRC_CODE__SYSCALL;
- break;
default:
indirect = 0;
}