summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2015-09-13 17:08:03 +0000
committerguenther <guenther@openbsd.org>2015-09-13 17:08:03 +0000
commitfd0d94125fc39ac46246dabf4783aa3ff259e0aa (patch)
tree8c365b1b9bbde6d78ad107779fc638e2b917dcda
parentSince a major bump of libcrypto is coming, remove OPENSSL_ia32cap and (diff)
downloadwireguard-openbsd-fd0d94125fc39ac46246dabf4783aa3ff259e0aa.tar.xz
wireguard-openbsd-fd0d94125fc39ac46246dabf4783aa3ff259e0aa.zip
Rename __sysctl syscall to just sysctl, as the userland wrapper is no longer
necessary ok deraadt@ jsing@
-rw-r--r--etc/systrace/usr_sbin_lpd5
-rw-r--r--lib/libc/Symbols.list2
-rw-r--r--lib/libc/gen/Makefile.inc4
-rw-r--r--lib/libc/sys/Makefile.inc8
-rw-r--r--libexec/ld.so/alpha/ldasm.S4
-rw-r--r--libexec/ld.so/amd64/ldasm.S4
-rw-r--r--libexec/ld.so/arm/ldasm.S4
-rw-r--r--libexec/ld.so/hppa/ldasm.S4
-rw-r--r--libexec/ld.so/i386/ldasm.S4
-rw-r--r--libexec/ld.so/m88k/ldasm.S4
-rw-r--r--libexec/ld.so/mips64/ldasm.S4
-rw-r--r--libexec/ld.so/powerpc/ldasm.S4
-rw-r--r--libexec/ld.so/sh/ldasm.S4
-rw-r--r--libexec/ld.so/sparc/ldasm.S4
-rw-r--r--libexec/ld.so/sparc64/ldasm.S4
-rw-r--r--regress/bin/systrace/id/id.policy6
-rw-r--r--regress/bin/systrace/symlink/ln.policy5
-rw-r--r--regress/usr.bin/sdiff/Iflag12.out2
-rw-r--r--regress/usr.bin/sdiff/Iflag21.out2
-rw-r--r--regress/usr.bin/sdiff/Ilflag12.out2
-rw-r--r--regress/usr.bin/sdiff/Ilflag21.out2
-rw-r--r--regress/usr.bin/sdiff/file12
-rw-r--r--regress/usr.bin/sdiff/file22
-rw-r--r--regress/usr.bin/sdiff/lflag.out2
-rw-r--r--regress/usr.bin/sdiff/same.out2
-rw-r--r--regress/usr.bin/sdiff/short.out2
-rw-r--r--regress/usr.bin/sdiff/tabs.out2
-rw-r--r--regress/usr.bin/sdiff/tabs12
-rw-r--r--regress/usr.bin/sdiff/tabs22
-rw-r--r--regress/usr.bin/sdiff/wflag.out2
-rw-r--r--sys/compat/linux/linux_misc.c6
-rw-r--r--sys/kern/kern_ktrace.c4
-rw-r--r--sys/kern/kern_sysctl.c6
-rw-r--r--sys/kern/kern_tame.c4
-rw-r--r--sys/kern/syscalls.master4
-rw-r--r--sys/uvm/uvm_glue.c6
-rw-r--r--usr.bin/kdump/kdump.c6
37 files changed, 69 insertions, 67 deletions
diff --git a/etc/systrace/usr_sbin_lpd b/etc/systrace/usr_sbin_lpd
index 93501b92610..1ec24198b54 100644
--- a/etc/systrace/usr_sbin_lpd
+++ b/etc/systrace/usr_sbin_lpd
@@ -1,10 +1,9 @@
-# $OpenBSD: usr_sbin_lpd,v 1.8 2014/11/22 18:15:41 deraadt Exp $
+# $OpenBSD: usr_sbin_lpd,v 1.9 2015/09/13 17:08:04 guenther Exp $
#
# Policy for lpd.
# This policy works for the default configuration of lpd.
#
Policy: /usr/sbin/lpd, Emulation: native
- native-__sysctl: permit
native-accept: permit
native-bind: sockaddr eq "/var/run/printer" then permit
native-bind: sockaddr eq "inet-[0.0.0.0]:0" then permit
@@ -56,6 +55,7 @@ Policy: /usr/sbin/lpd, Emulation: native
native-getsockopt: permit
native-gettimeofday: permit
native-issetugid: permit
+ native-kbind: permit
native-kill: permit
native-listen: permit
native-lseek: permit
@@ -82,6 +82,7 @@ Policy: /usr/sbin/lpd, Emulation: native
native-sigprocmask: permit
native-sigreturn: permit
native-socket: permit
+ native-sysctl: permit
native-umask: permit
native-wait4: permit
native-write: permit
diff --git a/lib/libc/Symbols.list b/lib/libc/Symbols.list
index de0ca20999f..900cdd2b347 100644
--- a/lib/libc/Symbols.list
+++ b/lib/libc/Symbols.list
@@ -43,7 +43,6 @@ _thread_sys___getcwd
_thread_sys___semctl
_thread_sys___set_tcb
_thread_sys___syscall
-_thread_sys___sysctl
_thread_sys___threxit
_thread_sys___thrsigdivert
_thread_sys___thrsleep
@@ -229,6 +228,7 @@ _thread_sys_symlink
_thread_sys_symlinkat
_thread_sys_sync
_thread_sys_sysarch
+_thread_sys_sysctl
_thread_sys_tame
_thread_sys_truncate
_thread_sys_umask
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
index 981850d70b6..b41f08ab8c7 100644
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.69 2015/09/06 20:26:20 guenther Exp $
+# $OpenBSD: Makefile.inc,v 1.70 2015/09/13 17:08:03 guenther Exp $
# gen sources
.PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/gen ${LIBCSRCDIR}/gen
@@ -20,7 +20,7 @@ SRCS+= alarm.c assert.c auth_subr.c authenticate.c \
rewinddir.c scandir.c seekdir.c setdomainname.c sethostname.c \
setprogname.c setjmperr.c setmode.c setproctitle.c shm_open.c \
siginterrupt.c siglist.c signal.c signame.c \
- sigsetops.c sleep.c statvfs.c strtofflags.c sysconf.c sysctl.c \
+ sigsetops.c sleep.c statvfs.c strtofflags.c sysconf.c \
syslog.c syslog_r.c telldir.c time.c times.c \
tolower_.c ttyname.c \
ttyslot.c toupper_.c ualarm.c uname.c unvis.c usleep.c \
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc
index 0b72e7fb80c..b3d83a013c3 100644
--- a/lib/libc/sys/Makefile.inc
+++ b/lib/libc/sys/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.129 2015/09/09 09:16:39 guenther Exp $
+# $OpenBSD: Makefile.inc,v 1.130 2015/09/13 17:08:03 guenther Exp $
# $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $
# @(#)Makefile.inc 8.1 (Berkeley) 6/17/93
@@ -25,7 +25,7 @@ SRCS+= stack_protector.c
# modules with default implementations on all architectures, unless overridden
# below:
ASM= __get_tcb.o __getcwd.o __semctl.o __set_tcb.o __syscall.o \
- __sysctl.o __threxit.o __thrsigdivert.o __thrsleep.o \
+ __threxit.o __thrsigdivert.o __thrsleep.o \
__thrwakeup.o accept.o accept4.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_gettime.o clock_settime.o close.o \
@@ -55,8 +55,8 @@ ASM= __get_tcb.o __getcwd.o __semctl.o __set_tcb.o __syscall.o \
setreuid.o setrlimit.o setrtable.o setsid.o setsockopt.o \
settimeofday.o setuid.o shmat.o shmctl.o shmdt.o \
shmget.o shutdown.o sigaction.o sigaltstack.o socket.o \
- socketpair.o stat.o statfs.o swapctl.o symlink.o \
- symlinkat.o sync.o sysarch.o tame.o umask.o unlink.o unlinkat.o \
+ socketpair.o stat.o statfs.o swapctl.o symlink.o symlinkat.o \
+ sync.o sysarch.o sysctl.o tame.o umask.o unlink.o unlinkat.o \
unmount.o utimensat.o utimes.o utrace.o wait4.o write.o writev.o
SRCS+= ${SRCS_${MACHINE_CPU}}
diff --git a/libexec/ld.so/alpha/ldasm.S b/libexec/ld.so/alpha/ldasm.S
index 42c93dd9a2e..7a5da956502 100644
--- a/libexec/ld.so/alpha/ldasm.S
+++ b/libexec/ld.so/alpha/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.29 2015/05/29 19:12:26 miod Exp $ */
+/* $OpenBSD: ldasm.S,v 1.30 2015/09/13 17:08:03 guenther Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -343,6 +343,6 @@ DL_SYSCALL(open)
DL_SYSCALL(read)
DL_SYSCALL(readlink)
DL_SYSCALL2(_syscall,__syscall)
-DL_SYSCALL2(sysctl,__sysctl)
+DL_SYSCALL(sysctl)
DL_SYSCALL(utrace)
DL_SYSCALL(write)
diff --git a/libexec/ld.so/amd64/ldasm.S b/libexec/ld.so/amd64/ldasm.S
index 969e1a094ac..11dc75af512 100644
--- a/libexec/ld.so/amd64/ldasm.S
+++ b/libexec/ld.so/amd64/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.18 2014/07/14 03:54:50 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.19 2015/09/13 17:08:03 guenther Exp $ */
/*
* Copyright (c) 2002,2004 Dale Rahn
@@ -100,7 +100,7 @@ DL_SYSCALL(sendsyslog)
DL_SYSCALL2(getcwd,__getcwd)
DL_SYSCALL2(set_tcb,__set_tcb)
DL_SYSCALL2(_syscall,__syscall)
-DL_SYSCALL2(sysctl,__sysctl)
+DL_SYSCALL(sysctl)
1:
/* error: result = -errno; - handled here. */
diff --git a/libexec/ld.so/arm/ldasm.S b/libexec/ld.so/arm/ldasm.S
index 8ec28ce2a8d..56dd07b811e 100644
--- a/libexec/ld.so/arm/ldasm.S
+++ b/libexec/ld.so/arm/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.16 2014/07/14 03:54:51 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.17 2015/09/13 17:08:03 guenther Exp $ */
/*
* Copyright (c) 2004 Dale Rahn
@@ -127,7 +127,7 @@ DL_SYSCALL(utrace)
DL_SYSCALL(getentropy)
DL_SYSCALL(sendsyslog)
DL_SYSCALL2(getcwd,__getcwd)
-DL_SYSCALL2(sysctl,__sysctl)
+DL_SYSCALL(sysctl)
DL_SYSCALL(getdents)
diff --git a/libexec/ld.so/hppa/ldasm.S b/libexec/ld.so/hppa/ldasm.S
index 868ab87a1f0..062eec956a8 100644
--- a/libexec/ld.so/hppa/ldasm.S
+++ b/libexec/ld.so/hppa/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.15 2014/07/14 03:54:51 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.16 2015/09/13 17:08:03 guenther Exp $ */
/*
* Copyright (c) 2004 Michael Shalayeff
@@ -225,7 +225,7 @@ ENTRY(_dl_fstat,0)
EXIT(_dl_fstat)
ENTRY(_dl_sysctl,0)
- SYSCALL(__sysctl)
+ SYSCALL(sysctl)
bv r0(rp)
nop
EXIT(_dl_issetugid)
diff --git a/libexec/ld.so/i386/ldasm.S b/libexec/ld.so/i386/ldasm.S
index 9a7f0b85a31..acba98b397b 100644
--- a/libexec/ld.so/i386/ldasm.S
+++ b/libexec/ld.so/i386/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.20 2014/09/22 16:13:02 brad Exp $ */
+/* $OpenBSD: ldasm.S,v 1.21 2015/09/13 17:08:03 guenther Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -123,7 +123,7 @@ DL_SYSCALL(utrace)
DL_SYSCALL(getentropy)
DL_SYSCALL(sendsyslog)
DL_SYSCALL2(getcwd,__getcwd)
-DL_SYSCALL2(sysctl,__sysctl)
+DL_SYSCALL(sysctl)
DL_SYSCALL(getdents)
.L_cerr:
diff --git a/libexec/ld.so/m88k/ldasm.S b/libexec/ld.so/m88k/ldasm.S
index e392d40882f..368aa7cb1fc 100644
--- a/libexec/ld.so/m88k/ldasm.S
+++ b/libexec/ld.so/m88k/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.13 2014/07/14 03:54:51 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.14 2015/09/13 17:08:04 guenther Exp $ */
/*
* Copyright (c) 2013 Miodrag Vallat.
@@ -215,7 +215,7 @@ DL_SYSCALL(sendsyslog)
DL_SYSCALL2(getcwd,__getcwd)
jmp %r1
-DL_SYSCALL2(sysctl,__sysctl)
+DL_SYSCALL(sysctl)
jmp %r1
DL_SYSCALL(getdents)
diff --git a/libexec/ld.so/mips64/ldasm.S b/libexec/ld.so/mips64/ldasm.S
index 5b5bb8fa52a..519c1eaf530 100644
--- a/libexec/ld.so/mips64/ldasm.S
+++ b/libexec/ld.so/mips64/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.13 2014/07/14 03:54:51 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.14 2015/09/13 17:08:04 guenther Exp $ */
/*
* Copyright (c) 1998-2002 Opsycon AB, Sweden.
@@ -180,6 +180,6 @@ DL_SYSCALL(open)
DL_SYSCALL(read)
DL_SYSCALL(readlink)
DL_SYSCALL2(_syscall,__syscall)
-DL_SYSCALL2(sysctl,__sysctl)
+DL_SYSCALL(sysctl)
DL_SYSCALL(utrace)
DL_SYSCALL(write)
diff --git a/libexec/ld.so/powerpc/ldasm.S b/libexec/ld.so/powerpc/ldasm.S
index e8515cf94c0..cc82a6634f8 100644
--- a/libexec/ld.so/powerpc/ldasm.S
+++ b/libexec/ld.so/powerpc/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.22 2015/06/01 19:55:20 miod Exp $ */
+/* $OpenBSD: ldasm.S,v 1.23 2015/09/13 17:08:04 guenther Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -220,6 +220,6 @@ DL_SYSCALL(open)
DL_SYSCALL(read)
DL_SYSCALL(readlink)
DL_SYSCALL2(_syscall,__syscall)
-DL_SYSCALL2(sysctl,__sysctl)
+DL_SYSCALL(sysctl)
DL_SYSCALL(utrace)
DL_SYSCALL(write)
diff --git a/libexec/ld.so/sh/ldasm.S b/libexec/ld.so/sh/ldasm.S
index c258229a14a..f76489628aa 100644
--- a/libexec/ld.so/sh/ldasm.S
+++ b/libexec/ld.so/sh/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.18 2014/12/30 18:31:21 miod Exp $ */
+/* $OpenBSD: ldasm.S,v 1.19 2015/09/13 17:08:04 guenther Exp $ */
/*
* Copyright (c) 2006 Dale Rahn
@@ -192,7 +192,7 @@ DL_SYSCALL(utrace)
DL_SYSCALL(getentropy)
DL_SYSCALL(sendsyslog)
DL_SYSCALL2(getcwd,__getcwd)
-DL_SYSCALL2(sysctl,__sysctl)
+DL_SYSCALL(sysctl)
DL_SYSCALL(getdents)
diff --git a/libexec/ld.so/sparc/ldasm.S b/libexec/ld.so/sparc/ldasm.S
index c989d078aa2..808930b8c74 100644
--- a/libexec/ld.so/sparc/ldasm.S
+++ b/libexec/ld.so/sparc/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.25 2014/07/14 03:54:51 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.26 2015/09/13 17:08:04 guenther Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -275,7 +275,7 @@ _dl_getdents:
.globl _dl_sysctl
.type _dl_sysctl,@function
_dl_sysctl:
- mov SYS___sysctl | SYSCALL_G2RFLAG, %g1 ! call sys___sysctl
+ mov SYS_sysctl | SYSCALL_G2RFLAG, %g1 ! call sys_sysctl
add %o7, 8, %g2 ! just return on success
t ST_SYSCALL ! off to wonderland
retl
diff --git a/libexec/ld.so/sparc64/ldasm.S b/libexec/ld.so/sparc64/ldasm.S
index a49bd755a54..de3790e543b 100644
--- a/libexec/ld.so/sparc64/ldasm.S
+++ b/libexec/ld.so/sparc64/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.37 2014/07/14 03:54:51 deraadt Exp $ */
+/* $OpenBSD: ldasm.S,v 1.38 2015/09/13 17:08:04 guenther Exp $ */
/* $NetBSD: rtld_start.S,v 1.5 2001/08/14 22:17:48 eeh Exp $ */
/*
@@ -300,7 +300,7 @@ _ENTRY(_dl_sigprocmask)
clr %o0
_ENTRY(_dl_sysctl)
- mov SYS___sysctl | SYSCALL_G2RFLAG, %g1 ! call sys___sysctl
+ mov SYS_sysctl | SYSCALL_G2RFLAG, %g1 ! call sys_sysctl
add %o7, 8, %g2 ! just return on success
t ST_SYSCALL ! off to wonderland
retl
diff --git a/regress/bin/systrace/id/id.policy b/regress/bin/systrace/id/id.policy
index 65e405df7c7..b92082346e3 100644
--- a/regress/bin/systrace/id/id.policy
+++ b/regress/bin/systrace/id/id.policy
@@ -1,8 +1,6 @@
-# $OpenBSD: id.policy,v 1.4 2014/07/14 05:49:14 guenther Exp $
+# $OpenBSD: id.policy,v 1.5 2015/09/13 17:08:04 guenther Exp $
Policy: /usr/bin/id, Emulation: native
- native-__kbind: permit
native-__set_tcb: permit
- native-__sysctl: permit
native-break: permit
native-close: permit
native-exit: permit
@@ -24,6 +22,7 @@ Policy: /usr/bin/id, Emulation: native
native-getuid: permit
native-ioctl: permit
native-issetugid: permit
+ native-kbind: permit
native-minherit: permit
native-mmap: permit
native-mprotect: permit
@@ -33,4 +32,5 @@ Policy: /usr/bin/id, Emulation: native
native-read: permit
native-sendsyslog: permit
native-sigprocmask: permit
+ native-sysctl: permit
native-write: permit
diff --git a/regress/bin/systrace/symlink/ln.policy b/regress/bin/systrace/symlink/ln.policy
index 58220416dfc..5e2706eb019 100644
--- a/regress/bin/systrace/symlink/ln.policy
+++ b/regress/bin/systrace/symlink/ln.policy
@@ -1,17 +1,18 @@
-# $OpenBSD: ln.policy,v 1.3 2014/07/14 05:49:14 guenther Exp $
+# $OpenBSD: ln.policy,v 1.4 2015/09/13 17:08:04 guenther Exp $
Policy: /bin/ln, Emulation: native
- native-__sysctl: permit
native-close: permit
native-exit: permit
native-fsread: permit
native-fstat: permit
native-getentropy: permit
native-issetugid: permit
+ native-kbind: permit
native-minherit: permit
native-mmap: permit
native-mprotect: permit
native-munmap: permit
native-sendsyslog: permit
native-symlink: filename match "/*" then permit
+ native-sysctl: permit
native-write: permit
diff --git a/regress/usr.bin/sdiff/Iflag12.out b/regress/usr.bin/sdiff/Iflag12.out
index 2a0f5328aeb..71a16351aaf 100644
--- a/regress/usr.bin/sdiff/Iflag12.out
+++ b/regress/usr.bin/sdiff/Iflag12.out
@@ -2,7 +2,7 @@ Policy: /usr/bin/lynx, Emulation: native Policy: /usr/bin
> native-issetugid: permit
> native-mprotect: permit
> native-mmap: permit
- native-__sysctl: permit native-__sysctl: permit
+ native-sysctl: permit native-sysctl: permit
> native-fsread: filename eq "/var/run/ld.so.hints" then pe
> native-fstat: permit
native-close: permit native-close: permit
diff --git a/regress/usr.bin/sdiff/Iflag21.out b/regress/usr.bin/sdiff/Iflag21.out
index 4e0d349b79e..c86720d1a10 100644
--- a/regress/usr.bin/sdiff/Iflag21.out
+++ b/regress/usr.bin/sdiff/Iflag21.out
@@ -2,7 +2,7 @@ Policy: /usr/bin/lynx, Emulation: native Policy: /usr/bin
native-issetugid: permit <
native-mprotect: permit <
native-mmap: permit <
- native-__sysctl: permit native-__sysctl: permit
+ native-sysctl: permit native-sysctl: permit
native-fsread: filename eq "/var/run/ld.so.hints" then pe <
native-fstat: permit <
native-close: permit native-close: permit
diff --git a/regress/usr.bin/sdiff/Ilflag12.out b/regress/usr.bin/sdiff/Ilflag12.out
index e9ac88e54ae..fd6195df6d4 100644
--- a/regress/usr.bin/sdiff/Ilflag12.out
+++ b/regress/usr.bin/sdiff/Ilflag12.out
@@ -2,7 +2,7 @@ Policy: /usr/bin/lynx, Emulation: native (
> native-issetugid: permit
> native-mprotect: permit
> native-mmap: permit
- native-__sysctl: permit (
+ native-sysctl: permit (
> native-fsread: filename eq "/var/run/ld.so.hints" then pe
> native-fstat: permit
native-close: permit (
diff --git a/regress/usr.bin/sdiff/Ilflag21.out b/regress/usr.bin/sdiff/Ilflag21.out
index fe7af0ebee5..247f56f08bd 100644
--- a/regress/usr.bin/sdiff/Ilflag21.out
+++ b/regress/usr.bin/sdiff/Ilflag21.out
@@ -2,7 +2,7 @@ Policy: /usr/bin/lynx, Emulation: native (
native-issetugid: permit <
native-mprotect: permit <
native-mmap: permit <
- native-__sysctl: permit (
+ native-sysctl: permit (
native-fsread: filename eq "/var/run/ld.so.hints" then pe <
native-fstat: permit <
native-close: permit (
diff --git a/regress/usr.bin/sdiff/file1 b/regress/usr.bin/sdiff/file1
index 686e8ea2277..fea5160fec3 100644
--- a/regress/usr.bin/sdiff/file1
+++ b/regress/usr.bin/sdiff/file1
@@ -1,5 +1,5 @@
Policy: /usr/bin/lynx, Emulation: native
- native-__sysctl: permit
+ native-sysctl: permit
native-close: permit
native-connect: sockaddr eq "inet-[127.0.0.1]:53" then permit
native-connect: sockaddr match "inet-\\\[*\\\]:80" then permit
diff --git a/regress/usr.bin/sdiff/file2 b/regress/usr.bin/sdiff/file2
index 70e1b57f5fb..e19098d04d3 100644
--- a/regress/usr.bin/sdiff/file2
+++ b/regress/usr.bin/sdiff/file2
@@ -2,7 +2,7 @@ Policy: /usr/bin/lynx, Emulation: native
native-issetugid: permit
native-mprotect: permit
native-mmap: permit
- native-__sysctl: permit
+ native-sysctl: permit
native-fsread: filename eq "/var/run/ld.so.hints" then permit
native-fstat: permit
native-close: permit
diff --git a/regress/usr.bin/sdiff/lflag.out b/regress/usr.bin/sdiff/lflag.out
index c7afce0d98b..50757fa088f 100644
--- a/regress/usr.bin/sdiff/lflag.out
+++ b/regress/usr.bin/sdiff/lflag.out
@@ -2,7 +2,7 @@ Policy: /usr/bin/lynx, Emulation: native
> native-issetugid: permit
> native-mprotect: permit
> native-mmap: permit
- native-__sysctl: permit
+ native-sysctl: permit
> native-fsread: filename eq "/var/run/ld.so.hints" then perm
> native-fstat: permit
native-close: permit
diff --git a/regress/usr.bin/sdiff/same.out b/regress/usr.bin/sdiff/same.out
index bce894420ce..5c82d12b439 100644
--- a/regress/usr.bin/sdiff/same.out
+++ b/regress/usr.bin/sdiff/same.out
@@ -1,5 +1,5 @@
Policy: /usr/bin/lynx, Emulation: native Policy: /usr/bin/lynx, Emulation: native
- native-__sysctl: permit native-__sysctl: permit
+ native-sysctl: permit native-sysctl: permit
native-close: permit native-close: permit
native-connect: sockaddr eq "inet-[127.0.0.1]:53" then perm native-connect: sockaddr eq "inet-[127.0.0.1]:53" then perm
native-connect: sockaddr match "inet-\\\[*\\\]:80" then per native-connect: sockaddr match "inet-\\\[*\\\]:80" then per
diff --git a/regress/usr.bin/sdiff/short.out b/regress/usr.bin/sdiff/short.out
index 7a334601721..289b37d93fc 100644
--- a/regress/usr.bin/sdiff/short.out
+++ b/regress/usr.bin/sdiff/short.out
@@ -2,7 +2,7 @@ Policy: /usr/bin/lynx, Emulation: native
native-issetugid: permit
native-mprotect: permit
native-mmap: permit
- native-__sysctl: permit
+ native-sysctl: permit
native-close: permit
native-fsread: filename match "/usr/lib/libssl.so.*" then permit
native-read: permit
diff --git a/regress/usr.bin/sdiff/tabs.out b/regress/usr.bin/sdiff/tabs.out
index eb34bace6c0..8371cf52c17 100644
--- a/regress/usr.bin/sdiff/tabs.out
+++ b/regress/usr.bin/sdiff/tabs.out
@@ -2,7 +2,7 @@ Policy: /usr/bin/lynx, Emulation: native Policy: /usr/b
> native-issetugid: permit
> native-mprotect: permit
> native-mmap: permit
- native-__sysctl: permit native-__sysctl: permit
+ native-sysctl: permit native-sysctl: permit
> native-fsread: filename eq "/var/run/ld.so.hints" then pe
> native-fstat: permit
native-close: permit native-close: permit
diff --git a/regress/usr.bin/sdiff/tabs1 b/regress/usr.bin/sdiff/tabs1
index b5a1834a339..b5372530171 100644
--- a/regress/usr.bin/sdiff/tabs1
+++ b/regress/usr.bin/sdiff/tabs1
@@ -1,5 +1,4 @@
Policy: /usr/bin/lynx, Emulation: native
- native-__sysctl: permit
native-close: permit
native-connect: sockaddr eq "inet-[127.0.0.1]:53" then permit
native-connect: sockaddr match "inet-\\\[*\\\]:80" then permit
@@ -69,4 +68,5 @@ Policy: /usr/bin/lynx, Emulation: native
native-sigprocmask: permit
native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_DGRAM" then permit
native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_STREAM" then permit
+ native-sysctl: permit
native-write: permit
diff --git a/regress/usr.bin/sdiff/tabs2 b/regress/usr.bin/sdiff/tabs2
index d00f4155d23..d2115daba51 100644
--- a/regress/usr.bin/sdiff/tabs2
+++ b/regress/usr.bin/sdiff/tabs2
@@ -2,7 +2,7 @@ Policy: /usr/bin/lynx, Emulation: native
native-issetugid: permit
native-mprotect: permit
native-mmap: permit
- native-__sysctl: permit
+ native-sysctl: permit
native-fsread: filename eq "/var/run/ld.so.hints" then permit
native-fstat: permit
native-close: permit
diff --git a/regress/usr.bin/sdiff/wflag.out b/regress/usr.bin/sdiff/wflag.out
index 19ea79bf611..76e6a451e6a 100644
--- a/regress/usr.bin/sdiff/wflag.out
+++ b/regress/usr.bin/sdiff/wflag.out
@@ -2,7 +2,7 @@ Policy: /usr/bin/lynx, Emulation: native Policy: /usr/bin
> native-issetugid: permit
> native-mprotect: permit
> native-mmap: permit
- native-__sysctl: permit native-__sysctl: permit
+ native-sysctl: permit native-sysctl: permit
> native-fsread: filename eq "/var/run/ld.so.hints" then pe
> native-fstat: permit
native-close: permit native-close: permit
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index be01c8a1516..a55274f1245 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_misc.c,v 1.94 2015/05/07 08:53:32 mpi Exp $ */
+/* $OpenBSD: linux_misc.c,v 1.95 2015/09/13 17:08:03 guenther Exp $ */
/* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */
/*-
@@ -1453,7 +1453,7 @@ linux_sys___sysctl(p, v, retval)
syscallarg(struct linux___sysctl *) lsp;
} */ *uap = v;
struct linux___sysctl ls;
- struct sys___sysctl_args bsa;
+ struct sys_sysctl_args bsa;
int error;
if ((error = copyin(SCARG(uap, lsp), &ls, sizeof ls)))
@@ -1465,7 +1465,7 @@ linux_sys___sysctl(p, v, retval)
SCARG(&bsa, new) = ls.new;
SCARG(&bsa, newlen) = ls.newlen;
- return sys___sysctl(p, &bsa, retval);
+ return sys_sysctl(p, &bsa, retval);
}
/*
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c
index 29403528cde..bb6a97a3ded 100644
--- a/sys/kern/kern_ktrace.c
+++ b/sys/kern/kern_ktrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_ktrace.c,v 1.77 2015/09/07 15:38:45 guenther Exp $ */
+/* $OpenBSD: kern_ktrace.c,v 1.78 2015/09/13 17:08:03 guenther Exp $ */
/* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */
/*
@@ -159,7 +159,7 @@ ktrsyscall(struct proc *p, register_t code, size_t argsize, register_t args[])
u_int nargs = 0;
int i;
- if (code == SYS___sysctl && (p->p_p->ps_emul->e_flags & EMUL_NATIVE)) {
+ if (code == SYS_sysctl && (p->p_p->ps_emul->e_flags & EMUL_NATIVE)) {
/*
* The native sysctl encoding stores the mib[]
* array because it is interesting.
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 92f4983e183..1eda6753042 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.293 2015/09/11 15:29:47 deraadt Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.294 2015/09/13 17:08:03 guenther Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -146,9 +146,9 @@ struct rwlock sysctl_lock = RWLOCK_INITIALIZER("sysctllk");
struct rwlock sysctl_disklock = RWLOCK_INITIALIZER("sysctldlk");
int
-sys___sysctl(struct proc *p, void *v, register_t *retval)
+sys_sysctl(struct proc *p, void *v, register_t *retval)
{
- struct sys___sysctl_args /* {
+ struct sys_sysctl_args /* {
syscallarg(const int *) name;
syscallarg(u_int) namelen;
syscallarg(void *) old;
diff --git a/sys/kern/kern_tame.c b/sys/kern/kern_tame.c
index 9f7f61effc3..625f6da0449 100644
--- a/sys/kern/kern_tame.c
+++ b/sys/kern/kern_tame.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_tame.c,v 1.40 2015/09/11 15:29:47 deraadt Exp $ */
+/* $OpenBSD: kern_tame.c,v 1.41 2015/09/13 17:08:03 guenther Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -73,7 +73,7 @@ const u_int tame_syscalls[SYS_MAXSYSCALL] = {
[SYS_clock_gettime] = TAME_SELF,
[SYS_getpid] = TAME_SELF,
[SYS_umask] = TAME_SELF,
- [SYS___sysctl] = TAME_SELF, /* read-only; narrow subset */
+ [SYS_sysctl] = TAME_SELF, /* read-only; narrow subset */
[SYS_adjtime] = TAME_SELF, /* read-only */
[SYS_fchdir] = TAME_SELF, /* careful of directory fd inside jails */
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 9c29f9f0d59..4dca9276ecb 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -1,4 +1,4 @@
-; $OpenBSD: syscalls.master,v 1.158 2015/09/09 17:56:59 deraadt Exp $
+; $OpenBSD: syscalls.master,v 1.159 2015/09/13 17:08:03 guenther Exp $
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -349,7 +349,7 @@
200 STD { int sys_truncate(const char *path, int pad, \
off_t length); }
201 STD { int sys_ftruncate(int fd, int pad, off_t length); }
-202 STD { int sys___sysctl(const int *name, u_int namelen, \
+202 STD { int sys_sysctl(const int *name, u_int namelen, \
void *old, size_t *oldlenp, void *new, \
size_t newlen); }
203 STD { int sys_mlock(const void *addr, size_t len); }
diff --git a/sys/uvm/uvm_glue.c b/sys/uvm/uvm_glue.c
index 9eff05e49e9..d277374bc80 100644
--- a/sys/uvm/uvm_glue.c
+++ b/sys/uvm/uvm_glue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_glue.c,v 1.69 2014/12/15 20:38:22 tedu Exp $ */
+/* $OpenBSD: uvm_glue.c,v 1.70 2015/09/13 17:08:03 guenther Exp $ */
/* $NetBSD: uvm_glue.c,v 1.44 2001/02/06 19:54:44 eeh Exp $ */
/*
@@ -140,7 +140,7 @@ uvm_chgkprot(caddr_t addr, size_t len, int rw)
/*
* uvm_vslock: wire user memory for I/O
*
- * - called from physio and sys___sysctl
+ * - called from physio and sys_sysctl
*/
int
@@ -164,7 +164,7 @@ uvm_vslock(struct proc *p, caddr_t addr, size_t len, vm_prot_t access_type)
/*
* uvm_vsunlock: unwire user memory wired by uvm_vslock()
*
- * - called from physio and sys___sysctl
+ * - called from physio and sys_sysctl
*/
void
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index ef9e879fee5..c027eb8b274 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kdump.c,v 1.104 2015/09/07 15:38:45 guenther Exp $ */
+/* $OpenBSD: kdump.c,v 1.105 2015/09/13 17:08:03 guenther Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -830,7 +830,7 @@ static const formatter scargs[][8] = {
[SYS_lseek] = { Pfd, PAD, Poff_t, Whencename },
[SYS_truncate] = { Ppath, PAD, Poff_t },
[SYS_ftruncate] = { Pfd, PAD, Poff_t },
- /* [SYS___sysctl] = { }, Magic */
+ /* [SYS_sysctl] = { }, Magic */
[SYS_mlock] = { Pptr, Pbigsize },
[SYS_munlock] = { Pptr, Pbigsize },
[SYS_getpgid] = { Ppid_t },
@@ -910,7 +910,7 @@ ktrsyscall(struct ktr_syscall *ktr, size_t ktrlen)
if (current != &emulations[0])
goto nonnative;
- if (ktr->ktr_code == SYS___sysctl) {
+ if (ktr->ktr_code == SYS_sysctl) {
const char *s;
int n, i, *top;