CVS commit: src/distrib/notes/common
Module Name:src Committed By: yamaguchi Date: Thu Jan 25 04:48:45 UTC 2018 Modified Files: src/distrib/notes/common: main Log Message: Added myself. To generate a diff of this commit: cvs rdiff -u -r1.540 -r1.541 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.540 src/distrib/notes/common/main:1.541 --- src/distrib/notes/common/main:1.540 Wed Jan 24 09:04:41 2018 +++ src/distrib/notes/common/main Thu Jan 25 04:48:45 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: main,v 1.540 2018/01/24 09:04:41 skrll Exp $ +.\" $NetBSD: main,v 1.541 2018/01/25 04:48:45 yamaguchi Exp $ .\" .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -1442,6 +1442,7 @@ If you're one of them, and would like to .It Ta Steve Woodford Ta Mt s...@netbsd.org .It Ta YAMAMOTO Takashi Ta Mt y...@netbsd.org .It Ta Abhinav Upadhyay Ta Mt abhi...@netbsd.org +.It Ta Shoichi Yamaguchi Ta Mt yamagu...@netbsd.org .It Ta Yuji Yamano Ta Mt yyam...@netbsd.org .It Ta David Young Ta Mt dyo...@netbsd.org .It Ta Arnaud Ysmal Ta Mt stack...@netbsd.org
CVS commit: src/lib/libm/arch/i387
Module Name:src Committed By: christos Date: Thu Jan 25 03:54:21 UTC 2018 Modified Files: src/lib/libm/arch/i387: fenv.c Log Message: use named initializers To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libm/arch/i387/fenv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/arch/i387/fenv.c diff -u src/lib/libm/arch/i387/fenv.c:1.8 src/lib/libm/arch/i387/fenv.c:1.9 --- src/lib/libm/arch/i387/fenv.c:1.8 Wed Mar 22 19:11:08 2017 +++ src/lib/libm/arch/i387/fenv.c Wed Jan 24 22:54:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.c,v 1.8 2017/03/22 23:11:08 chs Exp $ */ +/* $NetBSD: fenv.c,v 1.9 2018/01/25 03:54:21 christos Exp $ */ /*- * Copyright (c) 2004-2005 David Schultz@@ -27,7 +27,7 @@ */ #include -__RCSID("$NetBSD: fenv.c,v 1.8 2017/03/22 23:11:08 chs Exp $"); +__RCSID("$NetBSD: fenv.c,v 1.9 2018/01/25 03:54:21 christos Exp $"); #include "namespace.h" @@ -106,19 +106,18 @@ __weak_alias(feupdateenv,_feupdateenv) * consumers of FE_DFL_ENV, during runtime. */ fenv_t __fe_dfl_env = { - { - __NetBSD_NPXCW__, /* Control word register */ - 0x0, /* Unused */ - 0x, /* Status word register */ - 0x0, /* Unused */ - 0x, /* Tag word register */ - 0x0, /* Unused */ - { - 0x, 0x, - 0x, 0x + .x87 = { + .control = __NetBSD_NPXCW__,/* Control word register */ + .unused1 = 0, /* Unused */ + .status = 0, /* Status word register */ + .unused2 = 0, /* Unused */ + .tag = 0x, /* Tag word register */ + .unused3 = 0, /* Unused */ + .others = { + 0, 0, 0, 0x, } }, - __INITIAL_MXCSR__ /* MXCSR register */ + .mxcsr = __INITIAL_MXCSR__ /* MXCSR register */ }; /*
CVS commit: src/sys/net/agr
Module Name:src Committed By: christos Date: Thu Jan 25 03:54:57 UTC 2018 Modified Files: src/sys/net/agr: if_agr.c if_agrsubr.c Log Message: Add locking. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/net/agr/if_agr.c cvs rdiff -u -r1.11 -r1.12 src/sys/net/agr/if_agrsubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/agr/if_agr.c diff -u src/sys/net/agr/if_agr.c:1.45 src/sys/net/agr/if_agr.c:1.46 --- src/sys/net/agr/if_agr.c:1.45 Tue Jan 16 02:34:12 2018 +++ src/sys/net/agr/if_agr.c Wed Jan 24 22:54:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_agr.c,v 1.45 2018/01/16 07:34:12 knakahara Exp $ */ +/* $NetBSD: if_agr.c,v 1.46 2018/01/25 03:54:57 christos Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_agr.c,v 1.45 2018/01/16 07:34:12 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_agr.c,v 1.46 2018/01/25 03:54:57 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -611,7 +611,9 @@ agr_addport(struct ifnet *ifp, struct if * of each port to that of the first port. No need for arps * since there are no inet addresses assigned to the ports. */ + IFNET_LOCK(ifp_port); error = if_addr_init(ifp_port, ifp->if_dl, true); + IFNET_UNLOCK(ifp_port); if (error) { printf("%s: if_addr_init error %d\n", __func__, error); Index: src/sys/net/agr/if_agrsubr.c diff -u src/sys/net/agr/if_agrsubr.c:1.11 src/sys/net/agr/if_agrsubr.c:1.12 --- src/sys/net/agr/if_agrsubr.c:1.11 Tue Dec 5 23:37:00 2017 +++ src/sys/net/agr/if_agrsubr.c Wed Jan 24 22:54:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_agrsubr.c,v 1.11 2017/12/06 04:37:00 ozaki-r Exp $ */ +/* $NetBSD: if_agrsubr.c,v 1.12 2018/01/25 03:54:57 christos Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_agrsubr.c,v 1.11 2017/12/06 04:37:00 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_agrsubr.c,v 1.12 2018/01/25 03:54:57 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -294,7 +294,9 @@ agr_vlan_add(struct agr_port *port, void */ ec_port->ec_capenable |= ETHERCAP_VLAN_MTU; if (p->if_flags & IFF_UP) { + IFNET_LOCK(p); error = if_flags_set(p, p->if_flags); + IFNET_UNLOCK(p); if (error) { if (ec_port->ec_nvlans-- == 1) ec_port->ec_capenable &= @@ -321,15 +323,17 @@ agr_vlan_del(struct agr_port *port, void /* Disable vlan support */ if ((*force_zero && ec_port->ec_nvlans > 0) || ec_port->ec_nvlans-- == 1) { + struct ifnet *p = port->port_ifp; if (*force_zero) ec_port->ec_nvlans = 0; /* * Disable Tx/Rx of VLAN-sized frames. */ ec_port->ec_capenable &= ~ETHERCAP_VLAN_MTU; - if (port->port_ifp->if_flags & IFF_UP) { - (void)if_flags_set(port->port_ifp, - port->port_ifp->if_flags); + if (p->if_flags & IFF_UP) { + IFNET_LOCK(p); + (void)if_flags_set(p, p->if_flags); + IFNET_UNLOCK(p); } }
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Thu Jan 25 03:09:05 UTC 2018 Modified Files: src/sys/net: rtsock.c Log Message: Fix another deadlock When waiting for a route update to finish, a waiter has to release its reference to the route to avoid a deadlock. Because a updater tries to wait for references to a target route (except for a reference by the updater itself) to be released. To generate a diff of this commit: cvs rdiff -u -r1.237 -r1.238 src/sys/net/rtsock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/rtsock.c diff -u src/sys/net/rtsock.c:1.237 src/sys/net/rtsock.c:1.238 --- src/sys/net/rtsock.c:1.237 Fri Jan 19 05:19:29 2018 +++ src/sys/net/rtsock.c Thu Jan 25 03:09:05 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rtsock.c,v 1.237 2018/01/19 05:19:29 ozaki-r Exp $ */ +/* $NetBSD: rtsock.c,v 1.238 2018/01/25 03:09:05 ozaki-r Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.237 2018/01/19 05:19:29 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.238 2018/01/25 03:09:05 ozaki-r Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1015,11 +1015,21 @@ COMPATNAME(route_output)(struct mbuf *m, * Release rt_so_mtx to avoid a deadlock with route_intr * and also serialize updating routes to avoid another. */ + if (rt_updating) { +/* Release to allow the updater to proceed */ +rt_unref(rt); +rt = NULL; + } while (rt_updating) { error = cv_wait_sig(_update_cv, rt_so_mtx); if (error != 0) goto flush; } + if (rt == NULL) { +error = rtrequest1(RTM_GET, , ); +if (error != 0) + goto flush; + } rt_updating = true; mutex_exit(rt_so_mtx);
CVS commit: src/sys/net
Module Name:src Committed By: ozaki-r Date: Thu Jan 25 02:45:02 UTC 2018 Modified Files: src/sys/net: bpf.c bpfdesc.h Log Message: Abandon unnecessary softint The softint was introduced to defer fownsignal that was called in bpf_wakeup to softint at v1.139, but now bpf_wakeup always runs in softint so we don't need the softint anymore. To generate a diff of this commit: cvs rdiff -u -r1.222 -r1.223 src/sys/net/bpf.c cvs rdiff -u -r1.44 -r1.45 src/sys/net/bpfdesc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/bpf.c diff -u src/sys/net/bpf.c:1.222 src/sys/net/bpf.c:1.223 --- src/sys/net/bpf.c:1.222 Fri Dec 15 07:29:11 2017 +++ src/sys/net/bpf.c Thu Jan 25 02:45:02 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bpf.c,v 1.222 2017/12/15 07:29:11 ozaki-r Exp $ */ +/* $NetBSD: bpf.c,v 1.223 2018/01/25 02:45:02 ozaki-r Exp $ */ /* * Copyright (c) 1990, 1991, 1993 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.222 2017/12/15 07:29:11 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.223 2018/01/25 02:45:02 ozaki-r Exp $"); #if defined(_KERNEL_OPT) #include "opt_bpf.h" @@ -268,7 +268,6 @@ static int bpf_poll(struct file *, int); static int bpf_stat(struct file *, struct stat *); static int bpf_close(struct file *); static int bpf_kqfilter(struct file *, struct knote *); -static void bpf_softintr(void *); static const struct fileops bpf_fileops = { .fo_name = "bpf", @@ -563,8 +562,6 @@ bpfopen(dev_t dev, int flag, int mode, s d->bd_atime = d->bd_mtime = d->bd_btime; callout_init(>bd_callout, CALLOUT_MPSAFE); selinit(>bd_sel); - d->bd_sih = softint_establish(SOFTINT_CLOCK|SOFTINT_MPSAFE, - bpf_softintr, d); d->bd_jitcode = NULL; d->bd_filter = NULL; BPF_DLIST_ENTRY_INIT(d); @@ -621,7 +618,6 @@ bpf_close(struct file *fp) bpf_freed(d); callout_destroy(>bd_callout); seldestroy(>bd_sel); - softint_disestablish(d->bd_sih); mutex_obj_free(d->bd_mtx); mutex_obj_free(d->bd_buf_mtx); cv_destroy(>bd_cv); @@ -756,20 +752,8 @@ bpf_wakeup(struct bpf_d *d) mutex_exit(d->bd_buf_mtx); if (d->bd_async) - softint_schedule(d->bd_sih); - selnotify(>bd_sel, 0, 0); -} - -static void -bpf_softintr(void *cookie) -{ - struct bpf_d *d; - - d = cookie; - mutex_enter(d->bd_mtx); - if (d->bd_async) fownsignal(d->bd_pgid, SIGIO, 0, 0, NULL); - mutex_exit(d->bd_mtx); + selnotify(>bd_sel, 0, 0); } static void Index: src/sys/net/bpfdesc.h diff -u src/sys/net/bpfdesc.h:1.44 src/sys/net/bpfdesc.h:1.45 --- src/sys/net/bpfdesc.h:1.44 Thu Feb 9 09:30:26 2017 +++ src/sys/net/bpfdesc.h Thu Jan 25 02:45:02 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bpfdesc.h,v 1.44 2017/02/09 09:30:26 ozaki-r Exp $ */ +/* $NetBSD: bpfdesc.h,v 1.45 2018/01/25 02:45:02 ozaki-r Exp $ */ /* * Copyright (c) 1990, 1991, 1993 @@ -113,6 +113,7 @@ struct bpf_d { pid_t bd_pid; /* corresponding PID */ /* DEPRECATED. Keep it to avoid breaking kvm(3) users */ LIST_ENTRY(bpf_d) _bd_list; /* list of all BPF's */ + /* DEPRECATED. Keep it to avoid breaking kvm(3) users */ void *bd_sih; /* soft interrupt handle */ struct timespec bd_atime; /* access time */ struct timespec bd_mtime; /* modification time */
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: christos Date: Thu Jan 25 01:27:14 UTC 2018 Modified Files: src/distrib/sets/lists/man: mi Log Message: man pages for amdsmn and amdzentemp To generate a diff of this commit: cvs rdiff -u -r1.1573 -r1.1574 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1573 src/distrib/sets/lists/man/mi:1.1574 --- src/distrib/sets/lists/man/mi:1.1573 Wed Jan 24 04:51:26 2018 +++ src/distrib/sets/lists/man/mi Wed Jan 24 20:27:14 2018 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1573 2018/01/24 09:51:26 wiz Exp $ +# $NetBSD: mi,v 1.1574 2018/01/25 01:27:14 christos Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2006,6 +2006,8 @@ ./usr/share/man/cat4/x68k/powsw.0 man-sys-catman .cat ./usr/share/man/cat4/x68k/vs.0 man-sys-catman .cat ./usr/share/man/cat4/x86/amdpcib.0 man-sys-catman .cat +./usr/share/man/cat4/x86/amdsmn.0 man-sys-catman .cat +./usr/share/man/cat4/x86/amdzentemp.0 man-sys-catman .cat ./usr/share/man/cat4/x86/apic.0 man-sys-catman .cat ./usr/share/man/cat4/x86/balloon.0 man-sys-catman .cat ./usr/share/man/cat4/x86/coretemp.0 man-sys-catman .cat @@ -5060,6 +5062,8 @@ ./usr/share/man/html4/x68k/powsw.html man-sys-htmlman html ./usr/share/man/html4/x68k/vs.html man-sys-htmlman html ./usr/share/man/html4/x86/amdpcib.html man-sys-htmlman html +./usr/share/man/html4/x86/amdsmn.html man-sys-htmlman html +./usr/share/man/html4/x86/amdzentemp.html man-sys-htmlman html ./usr/share/man/html4/x86/apic.html man-sys-htmlman html ./usr/share/man/html4/x86/balloon.html man-sys-htmlman html ./usr/share/man/html4/x86/coretemp.html man-sys-htmlman html @@ -8046,6 +8050,8 @@ ./usr/share/man/man4/x68k/powsw.4 man-sys-man .man ./usr/share/man/man4/x68k/vs.4 man-sys-man .man ./usr/share/man/man4/x86/amdpcib.4 man-sys-man .man +./usr/share/man/man4/x86/amdsmn.4 man-sys-man .man +./usr/share/man/man4/x86/amdzentemp.4 man-sys-man .man ./usr/share/man/man4/x86/apic.4 man-sys-man .man ./usr/share/man/man4/x86/balloon.4 man-sys-man .man ./usr/share/man/man4/x86/coretemp.4 man-sys-man .man
CVS commit: src/share/man/man4/man4.x86
Module Name:src Committed By: christos Date: Thu Jan 25 01:25:39 UTC 2018 Modified Files: src/share/man/man4/man4.x86: Makefile Added Files: src/share/man/man4/man4.x86: amdsmn.4 amdzentemp.4 Log Message: man pages for amdsmn and amdzentemp To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/share/man/man4/man4.x86/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.x86/amdsmn.4 \ src/share/man/man4/man4.x86/amdzentemp.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.x86/Makefile diff -u src/share/man/man4/man4.x86/Makefile:1.16 src/share/man/man4/man4.x86/Makefile:1.17 --- src/share/man/man4/man4.x86/Makefile:1.16 Sun May 3 22:43:18 2015 +++ src/share/man/man4/man4.x86/Makefile Wed Jan 24 20:25:39 2018 @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.16 2015/05/04 02:43:18 pgoyette Exp $ +# $NetBSD: Makefile,v 1.17 2018/01/25 01:25:39 christos Exp $ MAN= amdpcib.4 apic.4 balloon.4 coretemp.4 est.4 fdc.4 \ fwhrng.4 hpet.4 ichlpcib.4 lpt.4 mem.4 odcm.4 powernow.4 \ - soekrisgpio.4 tco.4 tprof_amdpmi.4 tprof_pmi.4 vmt.4 vmx.4 + soekrisgpio.4 tco.4 tprof_amdpmi.4 tprof_pmi.4 vmt.4 vmx.4 \ + amdsmn.4 amdzentemp.4 MLINKS+=apic.4 ioapic.4 \ apic.4 lapic.4 Added files: Index: src/share/man/man4/man4.x86/amdsmn.4 diff -u /dev/null src/share/man/man4/man4.x86/amdsmn.4:1.1 --- /dev/null Wed Jan 24 20:25:39 2018 +++ src/share/man/man4/man4.x86/amdsmn.4 Wed Jan 24 20:25:39 2018 @@ -0,0 +1,90 @@ +.\" $NetBSD: amdsmn.4,v 1.1 2018/01/25 01:25:39 christos Exp $ +.\" +.\" Copyright (c) 2018 Ian Clark+.\" All rights reserved. +.\" +.\" This code is derived from the FreeBSD amdsmn driver by +.\" Conrad Meyer +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\"- +.\" Copyright (c) 2017 Conrad Meyer +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD: head/share/man/man4/amdsmn.4 323184 2017-09-05 15:13:41Z cem $ +.\" +.Dd January 22, 2018 +.Dt AMDSMN 4 x86 +.Os +.Sh NAME +.Nm amdsmn +.Nd device driver for +.Tn AMD +processor System Management Network +.Sh SYNOPSIS +.Cd "amdsmn* at pci?" +.Sh DESCRIPTION +The +.Nm +driver provides support for resources on the System Management Network bus +in +.Tn AMD +Family 17h processors. +.Sh SEE
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: christos Date: Thu Jan 25 01:22:21 UTC 2018 Modified Files: src/sys/arch/x86/pci: files.pci Added Files: src/sys/arch/x86/pci: amdsmn.c amdsmn.h amdzentemp.c Log Message: Add amdzentemp from FreeBSD via Ian Clark To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/x86/pci/amdsmn.c \ src/sys/arch/x86/pci/amdsmn.h src/sys/arch/x86/pci/amdzentemp.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x86/pci/files.pci Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/pci/files.pci diff -u src/sys/arch/x86/pci/files.pci:1.21 src/sys/arch/x86/pci/files.pci:1.22 --- src/sys/arch/x86/pci/files.pci:1.21 Sun Dec 10 12:12:54 2017 +++ src/sys/arch/x86/pci/files.pci Wed Jan 24 20:22:21 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.21 2017/12/10 17:12:54 bouyer Exp $ +# $NetBSD: files.pci,v 1.22 2018/01/25 01:22:21 christos Exp $ device aapic attach aapic at pci @@ -34,6 +34,16 @@ filearch/x86/pci/amdpcib_hpet.c amd device amdnb_misc: amdnb_miscbus attach amdnb_misc at pci file arch/x86/pci/amdnb_misc.c amdnb_misc + +# AMD Family 17h system management network +device amdsmn {} +attach amdsmn at pci +file arch/x86/pci/amdsmn.c amdsmn + +# AMD Family 17h CPU temp sensor +device amdzentemp: sysmon_envsys +attach amdzentemp at amdsmn +file arch/x86/pci/amdzentemp.c amdzentemp device amdtemp: sysmon_envsys attach amdtemp at amdnb_miscbus Added files: Index: src/sys/arch/x86/pci/amdsmn.c diff -u /dev/null src/sys/arch/x86/pci/amdsmn.c:1.1 --- /dev/null Wed Jan 24 20:22:21 2018 +++ src/sys/arch/x86/pci/amdsmn.c Wed Jan 24 20:22:21 2018 @@ -0,0 +1,138 @@ +/* $NetBSD: amdsmn.c,v 1.1 2018/01/25 01:22:21 christos Exp $ */ + +/*- + * Copyright (c) 2017 Conrad Meyer+ * All rights reserved. + * + * NetBSD port by Ian Clark + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.1 2018/01/25 01:22:21 christos Exp $ "); + +/* + * Driver for the AMD Family 17h CPU System Management Network. + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include "amdsmn.h" + +#define SMN_ADDR_REG 0x60 +#define SMN_DATA_REG 0x64 +#define AMD_17H_MANAGEMENT_NETWORK_PCI_ID 0x14501022 + +struct amdsmn_softc { + kmutex_t smn_lock; + struct pci_attach_args pa; + pci_chipset_tag_t pc; + pcitag_t pcitag; +}; + +static int amdsmn_match(device_t, cfdata_t, void *); +static void amdsmn_attach(device_t, device_t, void *); +static int amdsmn_detach(device_t, int); +static int amdsmn_misc_search(device_t, cfdata_t, const int *, void *); + +CFATTACH_DECL_NEW(amdsmn, sizeof(struct amdsmn_softc), amdsmn_match, +amdsmn_attach, amdsmn_detach, NULL); + +static int +amdsmn_match(device_t parent, cfdata_t match, void *aux) +{ + struct pci_attach_args *pa = aux; + + return pa->pa_id == AMD_17H_MANAGEMENT_NETWORK_PCI_ID ? 2 : 0; +} + +static int +amdsmn_misc_search(device_t parent, cfdata_t cf, const int *locs, void *aux) +{ + if (config_match(parent, cf, aux)) + config_attach_loc(parent, cf, locs, aux, NULL); + + return 0; +} + +static void +amdsmn_attach(device_t parent, device_t self, void *aux) +{ + struct amdsmn_softc *sc = device_private(self); + struct pci_attach_args *pa = aux; + + mutex_init(>smn_lock, MUTEX_DEFAULT, IPL_NONE); + sc->pa = *pa; + sc->pc = pa->pa_pc; + sc->pcitag = pa->pa_tag; + aprint_normal(": AMD Family 17h System Management Network\n"); + config_search_loc(amdsmn_misc_search, self, "amdsmn", NULL, >pa); +} + +static int +amdsmn_detach(device_t self, int flags)
CVS commit: src/sys/arch/amd64/conf
Module Name:src Committed By: christos Date: Thu Jan 25 01:21:40 UTC 2018 Modified Files: src/sys/arch/amd64/conf: ALL GENERIC XEN3_DOM0 Log Message: add amdzentemp To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.481 -r1.482 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.145 -r1.146 src/sys/arch/amd64/conf/XEN3_DOM0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/conf/ALL diff -u src/sys/arch/amd64/conf/ALL:1.78 src/sys/arch/amd64/conf/ALL:1.79 --- src/sys/arch/amd64/conf/ALL:1.78 Sat Jan 13 07:38:16 2018 +++ src/sys/arch/amd64/conf/ALL Wed Jan 24 20:21:40 2018 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.78 2018/01/13 12:38:16 christos Exp $ +# $NetBSD: ALL,v 1.79 2018/01/25 01:21:40 christos Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.78 $" +#ident "ALL-$Revision: 1.79 $" maxusers 64 # estimated number of users @@ -427,6 +427,9 @@ options PCIBIOS_SHARP_MM20_FIXUP # this amdnb_misc* at pci? # AMD NB Misc Configuration amdtemp* at amdnb_misc? # AMD CPU Temperature sensors +amdsmn* at pci?# AMD SMN Configuration +amdzentemp* at amdsmn? # AMD Ryzen Family 17h CPU temp sensors + # PCI bridges rdcpcib* at pci? dev ? function ? # RDC Vortex86/PMX-1000 PCI-ISA w/ pchb* at pci? dev ? function ? # PCI-Host bridges Index: src/sys/arch/amd64/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.481 src/sys/arch/amd64/conf/GENERIC:1.482 --- src/sys/arch/amd64/conf/GENERIC:1.481 Sat Jan 13 07:38:16 2018 +++ src/sys/arch/amd64/conf/GENERIC Wed Jan 24 20:21:40 2018 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.481 2018/01/13 12:38:16 christos Exp $ +# $NetBSD: GENERIC,v 1.482 2018/01/25 01:21:40 christos Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.481 $" +#ident "GENERIC-$Revision: 1.482 $" maxusers 64 # estimated number of users @@ -475,6 +475,9 @@ lpt1 at isa? port 0x278 amdnb_misc* at pci? # AMD NB Misc Configuration amdtemp* at amdnb_misc? # AMD CPU Temperature sensors +amdsmn* at pci?# AMD SMN Configuration +amdzentemp* at amdsmn? # AMD Ryzen Family 17h CPU temp sensors + # Winbond LPC Super I/O #wbsio* at isa? port 0x2e #wbsio* at isa? port 0x4e Index: src/sys/arch/amd64/conf/XEN3_DOM0 diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.145 src/sys/arch/amd64/conf/XEN3_DOM0:1.146 --- src/sys/arch/amd64/conf/XEN3_DOM0:1.145 Tue Jan 23 09:47:53 2018 +++ src/sys/arch/amd64/conf/XEN3_DOM0 Wed Jan 24 20:21:40 2018 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.145 2018/01/23 14:47:53 sevan Exp $ +# $NetBSD: XEN3_DOM0,v 1.146 2018/01/25 01:21:40 christos Exp $ include "arch/amd64/conf/std.xen" @@ -10,7 +10,7 @@ options INCLUDE_CONFIG_FILE # embed con #options UVMHIST_PRINT #options SYSCALL_DEBUG -#ident "XEN3_DOM0-$Revision: 1.145 $" +#ident "XEN3_DOM0-$Revision: 1.146 $" maxusers 32 # estimated number of users @@ -298,6 +298,9 @@ lpt0 at isa? port 0x378 irq 7 # standard amdnb_misc* at pci? # AMD NB Misc Configuration amdtemp* at amdnb_misc? # AMD CPU Temperature sensors +amdsmn* at pci?# AMD SMN Configuration +amdzentemp* at amdsmn? # AMD Ryzen Family 17h CPU temp sensors + # AMD 768 and 8111 power/ACPI controllers amdpm* at pci? dev ? function ? # RNG and SMBus 1.0 interface #iic* at amdpm? # sensors below are on this bus
CVS commit: src/sys/dev/pci
Module Name:src Committed By: sevan Date: Wed Jan 24 22:23:51 UTC 2018 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add Nvidia GeForce FX Go5200, as found in the PowerBook6,4 To generate a diff of this commit: cvs rdiff -u -r1.1305 -r1.1306 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1305 src/sys/dev/pci/pcidevs:1.1306 --- src/sys/dev/pci/pcidevs:1.1305 Sun Jan 21 18:33:56 2018 +++ src/sys/dev/pci/pcidevs Wed Jan 24 22:23:51 2018 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1305 2018/01/21 18:33:56 sevan Exp $ +$NetBSD: pcidevs,v 1.1306 2018/01/24 22:23:51 sevan Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -5602,6 +5602,7 @@ product NVIDIA GF_FX5600_SE 0x0314 GeFor product NVIDIA GF_FX5200U 0x0321 GeForce FX 5200 Ultra product NVIDIA GF_FX5200 0x0322 GeForce FX 5200 product NVIDIA GF_FX5200SE 0x0323 GeForce FX 5200SE +product NVIDIA GF_FXGO5200 0x0329 GeForce FX Go5200 product NVIDIA QUADRO_FX_500 0x032B Quadro FX 500 product NVIDIA GF_FX5900U 0x0330 GeForce FX 5900 Ultra product NVIDIA GF_FX5900 0x0331 GeForce FX 5900
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: skrll Date: Wed Jan 24 19:42:30 UTC 2018 Modified Files: src/sys/arch/arm/include: frame.h Log Message: Remove references to arm26 To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/include/frame.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/frame.h diff -u src/sys/arch/arm/include/frame.h:1.20 src/sys/arch/arm/include/frame.h:1.21 --- src/sys/arch/arm/include/frame.h:1.20 Wed Jan 24 09:04:45 2018 +++ src/sys/arch/arm/include/frame.h Wed Jan 24 19:42:30 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: frame.h,v 1.20 2018/01/24 09:04:45 skrll Exp $ */ +/* $NetBSD: frame.h,v 1.21 2018/01/24 19:42:30 skrll Exp $ */ /* * Copyright (c) 1994-1997 Mark Brinicombe. @@ -35,7 +35,7 @@ * SUCH DAMAGE. */ /* - * arm/frame.h - Stack frames structures common to arm26 and arm32 + * arm/frame.h - Stack frames structures */ #ifndef _ARM_FRAME_H_ @@ -51,7 +51,7 @@ */ typedef struct trapframe { - register_t tf_spsr; /* Zero on arm26 */ + register_t tf_spsr; register_t tf_fill; /* fill here so r0 will be dword aligned */ register_t tf_r0; register_t tf_r1; @@ -68,8 +68,8 @@ typedef struct trapframe { register_t tf_r12; register_t tf_usr_sp; register_t tf_usr_lr; - register_t tf_svc_sp; /* Not used on arm26 */ - register_t tf_svc_lr; /* Not used on arm26 */ + register_t tf_svc_sp; + register_t tf_svc_lr; register_t tf_pc; } trapframe_t;
CVS commit: src/sys/arch/arm
Module Name:src Committed By: skrll Date: Wed Jan 24 19:29:36 UTC 2018 Modified Files: src/sys/arch/arm: Makefile Log Message: arm26 is gone. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/Makefile diff -u src/sys/arch/arm/Makefile:1.8 src/sys/arch/arm/Makefile:1.9 --- src/sys/arch/arm/Makefile:1.8 Wed Jun 25 03:33:39 2008 +++ src/sys/arch/arm/Makefile Wed Jan 24 19:29:36 2018 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.8 2008/06/25 03:33:39 matt Exp $ +# $NetBSD: Makefile,v 1.9 2018/01/24 19:29:36 skrll Exp $ -SUBDIR= include .WAIT include/arm26 include/arm32 +SUBDIR= include .WAIT include/arm32 # install footbridge headers. SUBDIR+= footbridge
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: macallan Date: Wed Jan 24 17:21:03 UTC 2018 Modified Files: src/sys/arch/macppc/dev: ki2c.c Log Message: note to self: OF_getprop() returns -1 on error now this works properly on sevan's iMac G4 To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/macppc/dev/ki2c.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/macppc/dev/ki2c.c diff -u src/sys/arch/macppc/dev/ki2c.c:1.23 src/sys/arch/macppc/dev/ki2c.c:1.24 --- src/sys/arch/macppc/dev/ki2c.c:1.23 Wed Sep 27 22:10:19 2017 +++ src/sys/arch/macppc/dev/ki2c.c Wed Jan 24 17:21:03 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ki2c.c,v 1.23 2017/09/27 22:10:19 macallan Exp $ */ +/* $NetBSD: ki2c.c,v 1.24 2018/01/24 17:21:03 macallan Exp $ */ /* Id: ki2c.c,v 1.7 2002/10/05 09:56:05 tsubai Exp */ /*- @@ -151,15 +151,15 @@ ki2c_attach(device_t parent, device_t se devs = OF_child(i2cbus); while (devs != 0) { - if (OF_getprop(devs, "name", name, 32) == 0) + if (OF_getprop(devs, "name", name, 32) <= 0) goto skip; - if (OF_getprop(devs, "compatible", compat, 256) == 0) { + if (OF_getprop(devs, "compatible", compat, 256) <= 0) { /* some i2c device nodes don't have 'compatible' */ memset(compat, 0, 256); strncpy(compat, name, 256); } - if (OF_getprop(devs, "reg", , 4) == 0) - if (OF_getprop(devs, "i2c-address", , 4) == 0) + if (OF_getprop(devs, "reg", , 4) <= 0) + if (OF_getprop(devs, "i2c-address", , 4) <= 0) goto skip; addr = (addr & 0xff) >> 1; DPRINTF("-> %s@%x\n", name, addr);
CVS commit: src/usr.sbin/memswitch
Module Name:src Committed By: sevan Date: Wed Jan 24 14:45:44 UTC 2018 Modified Files: src/usr.sbin/memswitch: memswitch.h Log Message: typo, remove extra bracket To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/memswitch/memswitch.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/memswitch/memswitch.h diff -u src/usr.sbin/memswitch/memswitch.h:1.3 src/usr.sbin/memswitch/memswitch.h:1.4 --- src/usr.sbin/memswitch/memswitch.h:1.3 Tue Jan 23 21:06:25 2018 +++ src/usr.sbin/memswitch/memswitch.h Wed Jan 24 14:45:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: memswitch.h,v 1.3 2018/01/23 21:06:25 sevan Exp $ */ +/* $NetBSD: memswitch.h,v 1.4 2018/01/24 14:45:44 sevan Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -79,7 +79,7 @@ extern char *progname; extern u_int8_t *current_values; extern u_int8_t *modified_values; -static void usage(void)) __dead; +static void usage(void) __dead; void show_single(const char*)); void show_all(void)); void modify_single(const char*));
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Jan 24 14:39:14 UTC 2018 Modified Files: src/sys/netipsec: xform_ipip.c Log Message: style To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/netipsec/xform_ipip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netipsec/xform_ipip.c diff -u src/sys/netipsec/xform_ipip.c:1.57 src/sys/netipsec/xform_ipip.c:1.58 --- src/sys/netipsec/xform_ipip.c:1.57 Wed Jan 24 14:37:34 2018 +++ src/sys/netipsec/xform_ipip.c Wed Jan 24 14:39:14 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: xform_ipip.c,v 1.57 2018/01/24 14:37:34 maxv Exp $ */ +/* $NetBSD: xform_ipip.c,v 1.58 2018/01/24 14:39:14 maxv Exp $ */ /* $FreeBSD: src/sys/netipsec/xform_ipip.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $ */ /* $OpenBSD: ip_ipip.c,v 1.25 2002/06/10 18:04:55 itojun Exp $ */ @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xform_ipip.c,v 1.57 2018/01/24 14:37:34 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xform_ipip.c,v 1.58 2018/01/24 14:39:14 maxv Exp $"); /* * IP-inside-IP processing @@ -189,16 +189,16 @@ _ipip_input(struct mbuf *m, int iphlen, switch (v >> 4) { #ifdef INET -case 4: + case 4: hlen = sizeof(struct ip); break; #endif /* INET */ #ifdef INET6 -case 6: + case 6: hlen = sizeof(struct ip6_hdr); break; #endif -default: + default: DPRINTF(("%s: bad protocol version 0x%x (%u) " "for outer header\n", __func__, v, v>>4)); IPIP_STATINC(IPIP_STAT_FAMILY); @@ -256,13 +256,13 @@ _ipip_input(struct mbuf *m, int iphlen, switch (v >> 4) { #ifdef INET -case 4: + case 4: hlen = sizeof(struct ip); break; #endif /* INET */ #ifdef INET6 -case 6: + case 6: hlen = sizeof(struct ip6_hdr); break; #endif @@ -294,20 +294,20 @@ _ipip_input(struct mbuf *m, int iphlen, /* Some sanity checks in the inner IP header */ switch (v >> 4) { #ifdef INET - case 4: -ipo = mtod(m, struct ip *); + case 4: + ipo = mtod(m, struct ip *); ip_ecn_egress(ip4_ipsec_ecn, , >ip_tos); -break; + break; #endif /* INET */ #ifdef INET6 - case 6: + case 6: ipo = NULL; ip6 = mtod(m, struct ip6_hdr *); itos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; ip_ecn_egress(ip6_ipsec_ecn, , ); ip6->ip6_flow &= ~htonl(0xff << 20); ip6->ip6_flow |= htonl((uint32_t) itos << 20); -break; + break; #endif default: panic("%s: unknown ip version %u (inner)", __func__, v>>4);
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Jan 24 14:37:34 UTC 2018 Modified Files: src/sys/netipsec: xform_ipip.c Log Message: As I said in my last commit in this file, ipo should be set to NULL; otherwise the 'local address spoofing' check below is always wrong on IPv6. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/netipsec/xform_ipip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netipsec/xform_ipip.c diff -u src/sys/netipsec/xform_ipip.c:1.56 src/sys/netipsec/xform_ipip.c:1.57 --- src/sys/netipsec/xform_ipip.c:1.56 Sun Jan 14 16:36:04 2018 +++ src/sys/netipsec/xform_ipip.c Wed Jan 24 14:37:34 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: xform_ipip.c,v 1.56 2018/01/14 16:36:04 maxv Exp $ */ +/* $NetBSD: xform_ipip.c,v 1.57 2018/01/24 14:37:34 maxv Exp $ */ /* $FreeBSD: src/sys/netipsec/xform_ipip.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $ */ /* $OpenBSD: ip_ipip.c,v 1.25 2002/06/10 18:04:55 itojun Exp $ */ @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xform_ipip.c,v 1.56 2018/01/14 16:36:04 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xform_ipip.c,v 1.57 2018/01/24 14:37:34 maxv Exp $"); /* * IP-inside-IP processing @@ -301,8 +301,8 @@ _ipip_input(struct mbuf *m, int iphlen, #endif /* INET */ #ifdef INET6 case 6: - ipo = mtod(m, struct ip *); - ip6 = (struct ip6_hdr *)ipo; + ipo = NULL; + ip6 = mtod(m, struct ip6_hdr *); itos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; ip_ecn_egress(ip6_ipsec_ecn, , ); ip6->ip6_flow &= ~htonl(0xff << 20);
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Jan 24 14:28:13 UTC 2018 Modified Files: src/sys/netipsec: ipsec_input.c Log Message: Fix the iteration: IPPROTO_FRAGMENT options are special, in the sense that they don't have a 'length' field. It is therefore incorrect to read ip6e.ip6e_len, it contains garbage. I'm not sure whether this an exploitable vulnerability. Because of this bug you could theoretically craft 'protoff', which means that you can have the kernel patch the nxt value at the wrong place once the packet is decrypted. Perhaps it can be used in some unusual MITM - a router that happens to be between two IPsec hosts adds a frag6 option in the outer IPv6 header to trigger the bug in the receiver -, but I couldn't come up with anything worrying. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/netipsec/ipsec_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netipsec/ipsec_input.c diff -u src/sys/netipsec/ipsec_input.c:1.54 src/sys/netipsec/ipsec_input.c:1.55 --- src/sys/netipsec/ipsec_input.c:1.54 Wed Jan 24 14:01:40 2018 +++ src/sys/netipsec/ipsec_input.c Wed Jan 24 14:28:13 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_input.c,v 1.54 2018/01/24 14:01:40 maxv Exp $ */ +/* $NetBSD: ipsec_input.c,v 1.55 2018/01/24 14:28:13 maxv Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $ */ /* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */ @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.54 2018/01/24 14:01:40 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.55 2018/01/24 14:28:13 maxv Exp $"); /* * IPsec input processing. @@ -507,6 +507,8 @@ ipsec6_common_input(struct mbuf **mp, in if (nxt == IPPROTO_AH) l = (ip6e.ip6e_len + 2) << 2; + else if (nxt == IPPROTO_FRAGMENT) +l = sizeof(struct ip6_frag); else l = (ip6e.ip6e_len + 1) << 3; KASSERT(l > 0);
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Jan 24 14:01:40 UTC 2018 Modified Files: src/sys/netipsec: ipsec_input.c Log Message: ipsec4_fixup_checksum calls m_pullup, so don't forget to do mtod() again, to prevent use-after-free. In fact, the m_pullup call is never reached: it is impossible for 'skip' to be zero in this function, so add an XXX for now. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/netipsec/ipsec_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netipsec/ipsec_input.c diff -u src/sys/netipsec/ipsec_input.c:1.53 src/sys/netipsec/ipsec_input.c:1.54 --- src/sys/netipsec/ipsec_input.c:1.53 Tue Jan 23 02:21:49 2018 +++ src/sys/netipsec/ipsec_input.c Wed Jan 24 14:01:40 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ipsec_input.c,v 1.53 2018/01/23 02:21:49 ozaki-r Exp $ */ +/* $NetBSD: ipsec_input.c,v 1.54 2018/01/24 14:01:40 maxv Exp $ */ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec_input.c,v 1.2.4.2 2003/03/28 20:32:53 sam Exp $ */ /* $OpenBSD: ipsec_input.c,v 1.63 2003/02/20 18:35:43 deraadt Exp $ */ @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.53 2018/01/23 02:21:49 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipsec_input.c,v 1.54 2018/01/24 14:01:40 maxv Exp $"); /* * IPsec input processing. @@ -370,6 +370,7 @@ cantpull: ip->ip_sum = 0; ip->ip_sum = in_cksum(m, ip->ip_hl << 2); } else { + /* XXX this branch is never taken */ ip = mtod(m, struct ip *); } @@ -381,6 +382,7 @@ cantpull: m = ipsec4_fixup_checksum(m); if (m == NULL) goto cantpull; + ip = mtod(m, struct ip *); prot = ip->ip_p;
CVS commit: src/doc
Module Name:src Committed By: kre Date: Wed Jan 24 13:57:37 UTC 2018 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note update to tzdata2018c To generate a diff of this commit: cvs rdiff -u -r1.1495 -r1.1496 src/doc/3RDPARTY cvs rdiff -u -r1.2349 -r1.2350 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1495 src/doc/3RDPARTY:1.1496 --- src/doc/3RDPARTY:1.1495 Wed Jan 24 10:46:14 2018 +++ src/doc/3RDPARTY Wed Jan 24 13:57:37 2018 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1495 2018/01/24 10:46:14 wiz Exp $ +# $NetBSD: 3RDPARTY,v 1.1496 2018/01/24 13:57:37 kre Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1411,8 +1411,8 @@ Notes: Added changes from a5 -> a12 manually. Package: tz -Version: tzcode2017c / tzdata2017c -Current Vers: tzcode2017c / tzdata2017c +Version: tzcode2017c / tzdata2018c +Current Vers: tzcode2018c / tzdata2018c Maintainer: Paul Eggert <egg...@cs.ucla.edu> Archive Site: ftp://ftp.iana.org/tz/releases/ Archive Site: ftp://munnari.oz.au/pub/oldtz/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2349 src/doc/CHANGES:1.2350 --- src/doc/CHANGES:1.2349 Thu Jan 18 00:34:05 2018 +++ src/doc/CHANGES Wed Jan 24 13:57:37 2018 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2349 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2350 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -103,3 +103,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0: [mrg 20180116] macppc: Enable Veriexec support in the GENERIC kernel [sevan 20180117] raid(4): Add support for 32-bit on 64-bit kernel. [mrg 20180117] + zoneinfo: Import tzdata2018c (skipping 2018a & 2018b). [kre 20180124]
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Jan 24 13:54:16 UTC 2018 Modified Files: src/sys/netipsec: xform_esp.c Log Message: Add missing NULL check. Normally that's not triggerable remotely, since we are guaranteed that 8 bytes are valid at mbuf+skip. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/netipsec/xform_esp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netipsec/xform_esp.c diff -u src/sys/netipsec/xform_esp.c:1.72 src/sys/netipsec/xform_esp.c:1.73 --- src/sys/netipsec/xform_esp.c:1.72 Tue Oct 3 08:56:52 2017 +++ src/sys/netipsec/xform_esp.c Wed Jan 24 13:54:16 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: xform_esp.c,v 1.72 2017/10/03 08:56:52 ozaki-r Exp $ */ +/* $NetBSD: xform_esp.c,v 1.73 2018/01/24 13:54:16 maxv Exp $ */ /* $FreeBSD: src/sys/netipsec/xform_esp.c,v 1.2.2.1 2003/01/24 05:11:36 sam Exp $ */ /* $OpenBSD: ip_esp.c,v 1.69 2001/06/26 06:18:59 angelos Exp $ */ @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.72 2017/10/03 08:56:52 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.73 2018/01/24 13:54:16 maxv Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -322,6 +322,10 @@ esp_input(struct mbuf *m, struct secasva /* XXX don't pullup, just copy header */ IP6_EXTHDR_GET(esp, struct newesp *, m, skip, sizeof(struct newesp)); + if (esp == NULL) { + /* m already freed */ + return EINVAL; + } esph = sav->tdb_authalgxform; espx = sav->tdb_encalgxform;
CVS import: src/external/public-domain/tz/dist
Module Name:src Committed By: kre Date: Wed Jan 24 13:52:19 UTC 2018 Update of /cvsroot/src/external/public-domain/tz/dist In directory ivanova.netbsd.org:/tmp/cvs-serv12860 Log Message: Import tzdata2018c from ftp://ftp.iana.org/tz/releases/tzdata2018c.tar.gz Summary of changes in tzdata2018c (2018-01-22 23:00:44 -0800): Summary of changes in tzdata2018b (2018-01-17 23:24:48 -0800): Summary of changes in tzdata2018a (2018-01-12 22:29:21 -0800): 2018a and 2018b were (kind of) released, but never announced. Some "issues" were found with them that caused the relatively quick updates... The updates are from the previous version (2017c) to the current one (2018c) - that 2018a & 2018b intervened is best forgotten... (changes in 2018a that were corrected (2018b) or reverted (2018c) are not mentioned). Briefly: Sao Tome and Principe (An island nation off west coast of Equatorial Africa) switched from +00 to +01. Brazil's DST will now start on November's first Sunday. Use Debian-style installation locations, instead of 4.3BSD-style. (this does not affect NetBSD, we do not use the tzdata Makefile) Changes to past and future time stamps Sao Tome and Principe switched from +00 to +01 on 2018-01-01 at 01:00. (Thanks to Steffen Thorsen and Michael Deckers.) Changes to future time stamps Starting in 2018 southern Brazil will begin DST on November's first Sunday instead of October's third Sunday. (Thanks to Steffen Thorsen.) Changes to past time stamps Japanese DST transitions (1948-1951) were Sundays at 00:00, not Saturdays or Sundays at 02:00. (Thanks to Takayuki Nikai.) A discrepancy of 4 s in timestamps before 1931 in South Sudan has been corrected. The 'backzone' and 'zone.tab' files did not agree with the 'africa' and 'zone1970.tab' files. (Problem reported by Michael Deckers.) The abbreviation invented for Bolivia Summer Time (1931-2) is now BST instead of BOST, to be more consistent with the convention used for Latvian Summer Time (1918-9) and for British Summer Time. Status: Vendor Tag: TZDATA Release Tags: TZDATA2018C U src/external/public-domain/tz/dist/leap-seconds.list U src/external/public-domain/tz/dist/calendars U src/external/public-domain/tz/dist/CONTRIBUTING U src/external/public-domain/tz/dist/LICENSE U src/external/public-domain/tz/dist/Makefile U src/external/public-domain/tz/dist/NEWS U src/external/public-domain/tz/dist/README U src/external/public-domain/tz/dist/theory.html U src/external/public-domain/tz/dist/version U src/external/public-domain/tz/dist/africa U src/external/public-domain/tz/dist/antarctica U src/external/public-domain/tz/dist/asia U src/external/public-domain/tz/dist/australasia U src/external/public-domain/tz/dist/europe U src/external/public-domain/tz/dist/northamerica U src/external/public-domain/tz/dist/southamerica U src/external/public-domain/tz/dist/etcetera U src/external/public-domain/tz/dist/systemv U src/external/public-domain/tz/dist/factory U src/external/public-domain/tz/dist/backward U src/external/public-domain/tz/dist/pacificnew U src/external/public-domain/tz/dist/backzone U src/external/public-domain/tz/dist/iso3166.tab U src/external/public-domain/tz/dist/checklinks.awk U src/external/public-domain/tz/dist/zone.tab U src/external/public-domain/tz/dist/leapseconds U src/external/public-domain/tz/dist/yearistype.sh U src/external/public-domain/tz/dist/zone1970.tab U src/external/public-domain/tz/dist/leapseconds.awk U src/external/public-domain/tz/dist/checktab.awk U src/external/public-domain/tz/dist/zoneinfo2tdf.pl U src/external/public-domain/tz/dist/zishrink.awk No conflicts created by this import
CVS commit: src/external/public-domain/tz/dist
Module Name:src Committed By: kre Date: Wed Jan 24 13:52:47 UTC 2018 Modified Files: src/external/public-domain/tz/dist: TZDATA_VERSION Log Message: Merge tzdata2018c To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/public-domain/tz/dist/TZDATA_VERSION Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/public-domain/tz/dist/TZDATA_VERSION diff -u src/external/public-domain/tz/dist/TZDATA_VERSION:1.9 src/external/public-domain/tz/dist/TZDATA_VERSION:1.10 --- src/external/public-domain/tz/dist/TZDATA_VERSION:1.9 Tue Oct 24 01:28:18 2017 +++ src/external/public-domain/tz/dist/TZDATA_VERSION Wed Jan 24 13:52:47 2018 @@ -1 +1 @@ -tzdata-2017c +tzdata-2018c
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Jan 24 13:49:23 UTC 2018 Modified Files: src/sys/netipsec: xform_ah.c Log Message: Reinforce and clarify. To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/netipsec/xform_ah.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netipsec/xform_ah.c diff -u src/sys/netipsec/xform_ah.c:1.76 src/sys/netipsec/xform_ah.c:1.77 --- src/sys/netipsec/xform_ah.c:1.76 Wed Jan 24 13:30:47 2018 +++ src/sys/netipsec/xform_ah.c Wed Jan 24 13:49:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: xform_ah.c,v 1.76 2018/01/24 13:30:47 maxv Exp $ */ +/* $NetBSD: xform_ah.c,v 1.77 2018/01/24 13:49:23 maxv Exp $ */ /* $FreeBSD: src/sys/netipsec/xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */ /* $OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */ /* @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.76 2018/01/24 13:30:47 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.77 2018/01/24 13:49:23 maxv Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -494,54 +494,45 @@ ah_massage_headers(struct mbuf **m0, int nxt = ip6.ip6_nxt & 0xff; /* Next header type. */ - for (off = 0; off < skip - sizeof(struct ip6_hdr);) + for (off = 0; off < skip - sizeof(struct ip6_hdr);) { + int noff; + switch (nxt) { case IPPROTO_HOPOPTS: case IPPROTO_DSTOPTS: -ip6e = (struct ip6_ext *) (ptr + off); +ip6e = (struct ip6_ext *)(ptr + off); +noff = off + ((ip6e->ip6e_len + 1) << 3); + +/* Sanity check. */ +if (noff > skip - sizeof(struct ip6_hdr)) { + goto error6; +} /* - * Process the mutable/immutable - * options -- borrows heavily from the - * KAME code. + * Zero out mutable options. */ for (count = off + sizeof(struct ip6_ext); - count < off + ((ip6e->ip6e_len + 1) << 3);) { + count < noff;) { if (ptr[count] == IP6OPT_PAD1) { count++; - continue; /* Skip padding. */ - } - - /* Sanity check. */ - if (count > off + - ((ip6e->ip6e_len + 1) << 3)) { - m_freem(m); - - /* Free, if we allocated. */ - if (alloc) - free(ptr, M_XDATA); - return EINVAL; + continue; } ad = ptr[count + 1] + 2; - /* If mutable option, zeroize. */ - if (ptr[count] & IP6OPT_MUTABLE) - memcpy(ptr + count, ipseczeroes, - ad); + if (count + ad > noff) { + goto error6; + } + + if (ptr[count] & IP6OPT_MUTABLE) { + memset(ptr + count, 0, ad); + } count += ad; +} - /* Sanity check. */ - if (count > - skip - sizeof(struct ip6_hdr)) { - m_freem(m); - - /* Free, if we allocated. */ - if (alloc) - free(ptr, M_XDATA); - return EINVAL; - } +if (count != noff) { + goto error6; } /* Advance. */ @@ -595,11 +586,13 @@ ah_massage_headers(struct mbuf **m0, int default: DPRINTF(("%s: unexpected IPv6 header type %d\n", __func__, off)); +error6: if (alloc) free(ptr, M_XDATA); m_freem(m); return EINVAL; } + } /* Copyback and free, if we allocated. */ if (alloc) {
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Jan 24 13:30:47 UTC 2018 Modified Files: src/sys/netipsec: xform_ah.c Log Message: Fix a vulnerability in IPsec-IPv6-AH, that allows an attacker to remotely crash the kernel with a single packet. In this loop we need to increment 'ad' by two, because the length field of the option header does not count the size of the option header itself. If the length is zero, then 'count' is incremented by zero, and there's an infinite loop. Beyond that, this code was written with the assumption that since the IPv6 packet already went through the generic IPv6 option parser, several fields are guaranteed to be valid; but this assumption does not hold because of the missing '+2', and there's as a result a triggerable buffer overflow (write zeros after the end of the mbuf, potentially to the next mbuf in memory since it's a pool). Add the missing '+2', this place will be reinforced in separate commits. To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/netipsec/xform_ah.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netipsec/xform_ah.c diff -u src/sys/netipsec/xform_ah.c:1.75 src/sys/netipsec/xform_ah.c:1.76 --- src/sys/netipsec/xform_ah.c:1.75 Wed Jan 24 13:13:11 2018 +++ src/sys/netipsec/xform_ah.c Wed Jan 24 13:30:47 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: xform_ah.c,v 1.75 2018/01/24 13:13:11 maxv Exp $ */ +/* $NetBSD: xform_ah.c,v 1.76 2018/01/24 13:30:47 maxv Exp $ */ /* $FreeBSD: src/sys/netipsec/xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */ /* $OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */ /* @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.75 2018/01/24 13:13:11 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.76 2018/01/24 13:30:47 maxv Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -523,12 +523,12 @@ ah_massage_headers(struct mbuf **m0, int return EINVAL; } - ad = ptr[count + 1]; + ad = ptr[count + 1] + 2; /* If mutable option, zeroize. */ if (ptr[count] & IP6OPT_MUTABLE) memcpy(ptr + count, ipseczeroes, - ptr[count + 1]); + ad); count += ad;
CVS commit: src/sys/netipsec
Module Name:src Committed By: maxv Date: Wed Jan 24 13:13:11 UTC 2018 Modified Files: src/sys/netipsec: xform_ah.c Log Message: Revert a part of rev1.49 (six months ago). The pointer given to memcpy was correct. Discussed with Christos and Ryota. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/netipsec/xform_ah.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netipsec/xform_ah.c diff -u src/sys/netipsec/xform_ah.c:1.74 src/sys/netipsec/xform_ah.c:1.75 --- src/sys/netipsec/xform_ah.c:1.74 Tue Oct 3 08:56:52 2017 +++ src/sys/netipsec/xform_ah.c Wed Jan 24 13:13:11 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: xform_ah.c,v 1.74 2017/10/03 08:56:52 ozaki-r Exp $ */ +/* $NetBSD: xform_ah.c,v 1.75 2018/01/24 13:13:11 maxv Exp $ */ /* $FreeBSD: src/sys/netipsec/xform_ah.c,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */ /* $OpenBSD: ip_ah.c,v 1.63 2001/06/26 06:18:58 angelos Exp $ */ /* @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.74 2017/10/03 08:56:52 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xform_ah.c,v 1.75 2018/01/24 13:13:11 maxv Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -419,7 +419,7 @@ ah_massage_headers(struct mbuf **m0, int /* Zeroize all other options. */ count = ptr[off + 1]; -memcpy(ptr, ipseczeroes, count); +memcpy(ptr + off, ipseczeroes, count); off += count; break; }
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: uwe Date: Wed Jan 24 12:05:50 UTC 2018 Modified Files: src/usr.sbin/autofs: auto_master.5 Log Message: Try to use proper semantic markup. Fix a few formatting nits. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/autofs/auto_master.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/auto_master.5 diff -u src/usr.sbin/autofs/auto_master.5:1.4 src/usr.sbin/autofs/auto_master.5:1.5 --- src/usr.sbin/autofs/auto_master.5:1.4 Sun Jan 14 03:17:28 2018 +++ src/usr.sbin/autofs/auto_master.5 Wed Jan 24 12:05:50 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: auto_master.5,v 1.4 2018/01/14 03:17:28 uwe Exp $ +.\" $NetBSD: auto_master.5,v 1.5 2018/01/24 12:05:50 uwe Exp $ .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" Copyright (c) 2016 The DragonFly Project .\" Copyright (c) 2014 The FreeBSD Foundation @@ -58,28 +58,28 @@ The file consists of lines with two or three entries separated by whitespace and terminated by a newline character: .Bd -literal -offset indent -.Pa mountpoint Pa map_name Op Ar -options +.Ar mountpoint Ar map_name Op Fl Ar options .Ed .Pp -.Pa mountpoint +.Ar mountpoint is either a fully specified path, or -.Li /- . +.Pa /- . When -.Pa mountpoint +.Ar mountpoint is a full path, -.Pa map_name +.Ar map_name must reference an indirect map. Otherwise, -.Pa map_name +.Ar map_name must reference a direct map. See .Sx "MAP SYNTAX" below. .Pp -.Pa map_name +.Ar map_name specifies map to use. If -.Pa map_name +.Ar map_name begins with .Li - , it specifies a special map. @@ -87,7 +87,7 @@ See .Sx "MAP SYNTAX" below. If -.Pa map_name +.Ar map_name is not a fully specified path .Pq it does not start with Li / , .Xr automountd 8 @@ -95,7 +95,7 @@ will search for that name in .Pa /etc . Otherwise it will use the path as given. If the file indicated by -.Pa map_name +.Ar map_name is executable, .Xr automountd 8 will assume it is an executable map. @@ -104,9 +104,9 @@ See below. Otherwise, the file is opened and the contents parsed. .Pp -.Pa -options +.Op Fl Ar options is an optional field that starts with -.Li - +.Fl and can contain generic file system mount options. .Pp The following example specifies that the @@ -120,15 +120,15 @@ indirect map will be mounted on Map files consist of lines with a number of entries separated by whitespace and terminated by newline character: .Bd -literal -offset indent -.Pa key Oo Ar -options Oc Oo Ar mountpoint Oo -options Oc Oc Ar location Op ... +.Ar key Oo Fl Ar options Oc Oo Ar mountpoint Oo Fl Ar options Oc Oc Ar location Op ... .Ed .Pp In most cases, it can be simplified to: .Bd -literal -offset indent -.Pa key Oo Ar -options Oc Ar location +.Ar key Oo Fl Ar options Oc Ar location .Ed .Pp -.Pa key +.Ar key is the path component used by .Xr automountd 8 to find the right map entry to use. @@ -142,27 +142,27 @@ Those directories will not be visible to The .Ar options field, if present, must begin with -.Li - . +.Fl . When mounting the file system, options supplied to .Nm and options specified in the map entry are concatenated together. The special option -.Li fstype +.Ic fstype is used to specify file system type. It is not passed to the mount program as an option. Instead, it is passed as an argument to .Cm "mount -t". The default -.Li fstype +.Ic fstype is .Ql nfs . The special option -.Li nobrowse +.Ic nobrowse is used to disable creation of top-level directories for special and executable maps. .Pp The optional -.Pa mountpoint +.Ar mountpoint field is used to specify multiple mount points for a single key. .Pp The @@ -188,23 +188,23 @@ field may contain references to variable .Pp Defined variables are: .Pp -.Bl -tag -width "-OSNAME" -compact -.It Li ARCH +.Bl -tag -width "Dv OSNAME" -compact +.It Dv ARCH Expands to the output of .Li "uname -p" . -.It Li CPU +.It Dv CPU Same as -.Li ARCH . -.It Li HOST +.Dv ARCH . +.It Dv HOST Expands to the output of .Li "uname -n" . -.It Li OSNAME +.It Dv OSNAME Expands to the output of .Li "uname -s" . -.It Li OSREL +.It Dv OSREL Expands to the output of .Li "uname -r" . -.It Li OSVERS +.It Dv OSVERS Expands to the output of .Li "uname -v" . .El @@ -217,7 +217,7 @@ and .Xr automountd 8 . .Pp To pass a location that begins with -.Li / , +.Pa / , prefix it with a colon. For example, .Li :/dev/cd0 . @@ -231,9 +231,9 @@ referring to the map as described above, will be mounted on .Pa /example/x/ when any process attempts to access that mountpoint, with -.Li intr +.Ic intr and -.Li nfsv4 +.Ic nfsv4 mount options, described in .Xr mount_nfs 8 : .Bd -literal -offset indent @@ -255,25 +255,25 @@ Special maps have names beginning with .Li - . Supported special maps are: .Pp -.Bl -tag -width "-hosts" -compact -.It Li -hosts +.Bl -tag -width ".Ic -noauto"
CVS commit: src/sbin/mount_autofs
Module Name:src Committed By: uwe Date: Wed Jan 24 12:04:47 UTC 2018 Modified Files: src/sbin/mount_autofs: mount_autofs.8 Log Message: It's not literal "-options" so use .Ar To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sbin/mount_autofs/mount_autofs.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/mount_autofs/mount_autofs.8 diff -u src/sbin/mount_autofs/mount_autofs.8:1.5 src/sbin/mount_autofs/mount_autofs.8:1.6 --- src/sbin/mount_autofs/mount_autofs.8:1.5 Tue Jan 23 14:58:46 2018 +++ src/sbin/mount_autofs/mount_autofs.8 Wed Jan 24 12:04:47 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: mount_autofs.8,v 1.5 2018/01/23 14:58:46 wiz Exp $ +.\" $NetBSD: mount_autofs.8,v 1.6 2018/01/24 12:04:47 uwe Exp $ .\" .\" Copyright (c) 2018 The DragonFly Project .\" All rights reserved. @@ -81,7 +81,7 @@ Set the .Xr autofs 5 options. See the -.Op Fl options +.Op Fl Ar options in .Sx AUTO_MASTER SYNTAX of
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Wed Jan 24 10:46:14 UTC 2018 Modified Files: src/doc: 3RDPARTY Log Message: sqlite-3.22 out. To generate a diff of this commit: cvs rdiff -u -r1.1494 -r1.1495 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1494 src/doc/3RDPARTY:1.1495 --- src/doc/3RDPARTY:1.1494 Wed Jan 17 17:22:14 2018 +++ src/doc/3RDPARTY Wed Jan 24 10:46:14 2018 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1494 2018/01/17 17:22:14 mlelstv Exp $ +# $NetBSD: 3RDPARTY,v 1.1495 2018/01/24 10:46:14 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1285,7 +1285,7 @@ original. Package: sqlite Version: 3.17.0 -Current Vers: 3.19.3 +Current Vers: 3.22 Maintainer: Richard HippHome Page: http://www.sqlite.org Responsible: joerg
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Wed Jan 24 10:04:28 UTC 2018 Modified Files: src/share/man/man4: ddb.4 Log Message: Remove macros without effect. To generate a diff of this commit: cvs rdiff -u -r1.171 -r1.172 src/share/man/man4/ddb.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/ddb.4 diff -u src/share/man/man4/ddb.4:1.171 src/share/man/man4/ddb.4:1.172 --- src/share/man/man4/ddb.4:1.171 Wed Jan 24 09:04:42 2018 +++ src/share/man/man4/ddb.4 Wed Jan 24 10:04:28 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: ddb.4,v 1.171 2018/01/24 09:04:42 skrll Exp $ +.\" $NetBSD: ddb.4,v 1.172 2018/01/24 10:04:28 wiz Exp $ .\" .\" Copyright (c) 1997 - 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -205,9 +205,9 @@ Multiple commands can be separated by a .Sh COMMAND SYNTAX The general command syntax is: .Bd -ragged -offset indent -.Ic command Ns Op Cm / Ns Ar modifier +.Ic command Ns Op / Ns Ar modifier .Ar address -.Op Cm , Ns Ar count +.Op , Ns Ar count .Ed .Pp The current memory location being edited is referred to as @@ -299,10 +299,10 @@ retrieve next command in history (if any .Nm supports the following commands: .Bl -tag -width 5n -.It Ic \&! Ns Ar address Ns Oo Cm ( Ar expression Ns Oo Ar ,... Oc Ns Cm ) Oc +.It Ic \&! Ns Ar address Ns Oo ( Ar expression Ns Oo Ar ,... Oc ) Oc A synonym for .Ic call . -.It Ic break Ns Oo Cm /u Oc Ar address Ns Op Cm , Ns Ar count +.It Ic break Ns Oo Cm /u Oc Ar address Ns Op , Ns Ar count Set a breakpoint at .Ar address . If @@ -333,16 +333,16 @@ Warning: if a user text is shadowed by a user-space breakpoints may not work correctly. Setting a breakpoint at the low-level code paths may also cause strange behavior. -.It Ic bt Ns Oo Cm /ul Oc Oo Ar frame-address Oc Ns Oo Cm , Ns Ar count Oc +.It Ic bt Ns Oo Cm /ul Oc Oo Ar frame-address Oc Ns Oo , Ns Ar count Oc A synonym for .Ic trace . -.It Ic bt/t Ns Oo Cm /ul Oc Oo Ar pid Oc Ns Oo Cm , Ns Ar count Oc +.It Ic bt/t Ns Oo Cm /ul Oc Oo Ar pid Oc Ns Oo , Ns Ar count Oc A synonym for .Ic trace/t . -.It Ic bt/a Ns Oo Cm /ul Oc Oo Ar lwpaddr Oc Ns Oo Cm , Ns Ar count Oc +.It Ic bt/a Ns Oo Cm /ul Oc Oo Ar lwpaddr Oc Ns Oo , Ns Ar count Oc A synonym for .Ic trace/a . -.It Ic call Ar address Ns Oo Cm ( Ns Ar expression Ns Oo Ar ,... Oc Ns Cm ) Oc +.It Ic call Ar address Ns Oo ( Ns Ar expression Ns Oo Ar ,... Oc ) Oc Call the function specified by .Ar address with the argument(s) listed in parentheses. @@ -382,7 +382,7 @@ Delete the watchpoint at that was previously set with .Ic watch command. -.It Ic examine Ns Oo Cm / Ns Ar modifier Oc Ar address Ns Op Cm , Ns Ar count +.It Ic examine Ns Oo Cm / Ns Ar modifier Oc Ar address Ns Op , Ns Ar count Display the address locations according to the format in .Ar modifier . Multiple modifier formats display multiple locations. @@ -447,7 +447,7 @@ use Motorola syntax don't assume that each external label is a procedure entry mask .El .El -.It Ic kill Ar pid Ns Op Cm , Ns Ar signal_number +.It Ic kill Ar pid Ns Op , Ns Ar signal_number Send a signal to the process specified by the .Ar pid . Note that @@ -522,7 +522,7 @@ Some of the more useful flags: Note: Limitations of the command line interface preclude specification of a boot string. .It Ic search Ns Oo Cm /bhl Oc Ar address Ar value \ -Oo Ar mask Oc Oo Cm , Ns Ar count Oc +Oo Ar mask Oc Oo , Ns Ar count Oc Search memory from .Ar address for @@ -626,7 +626,7 @@ trap counters will be displayed. .Pp If none of .Cm /i , -.Cm /m +.Cm /m , or .Cm /t are specified, all are shown. @@ -795,7 +795,7 @@ character with a backslash as: .Bd -literal -offset indent sifting \\386 .Ed -.It Ic step Ns Oo Cm /p Oc Op Cm , Ns Ar count +.It Ic step Ns Oo Cm /p Oc Op , Ns Ar count Single-step .Ar count times. @@ -813,7 +813,7 @@ do the wrong thing. .It Ic sync Sync the disks, force a crash dump, and then reboot. .It Ic trace Ns Oo Cm /u Ns Oo Cm l Oc Oc Oo Ar frame-address Oc Ns \ -Oo Cm , Ns Ar count Oc +Oo , Ns Ar count Oc Stack trace from .Ar frame-address . If @@ -831,7 +831,7 @@ message buffer. .Pp Warning: user-space stack trace is valid only if the machine dependent code supports it. -.It Ic trace/t Ns Oo Cm l Oc Oo Ar pid Oc Ns Oo Cm , Ns Ar count Oc +.It Ic trace/t Ns Oo Cm l Oc Oo Ar pid Oc Ns Oo , Ns Ar count Oc Stack trace by .Dq thread (process, on @@ -855,7 +855,7 @@ message buffer. .Pp Warning: trace by pid is valid only if the machine dependent code supports it. -.It Ic trace/a Ns Oo Cm l Oc Oo Ar lwpaddr Oc Ns Oo Cm , Ns Ar count Oc +.It Ic trace/a Ns Oo Cm l Oc Oo Ar lwpaddr Oc Ns Oo , Ns Ar count Oc Stack trace by light weight process (LWP) address rather than by stack frame address. If @@ -872,7 +872,7 @@ If is specified, print the call nesting depth and the cumulative instruction count at each call or return. Otherwise,
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Wed Jan 24 10:00:43 UTC 2018 Modified Files: src/share/man/man4: iic.4 Log Message: Remove Tn. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/share/man/man4/iic.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/iic.4 diff -u src/share/man/man4/iic.4:1.14 src/share/man/man4/iic.4:1.15 --- src/share/man/man4/iic.4:1.14 Wed Jan 24 09:04:42 2018 +++ src/share/man/man4/iic.4 Wed Jan 24 10:00:42 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: iic.4,v 1.14 2018/01/24 09:04:42 skrll Exp $ +.\" $NetBSD: iic.4,v 1.15 2018/01/24 10:00:42 wiz Exp $ .\" $OpenBSD: iic.4,v 1.74 2008/09/10 16:13:43 reyk Exp $ .\" .\" Copyright (c) 2004, 2006 Alexander Yurchenko@@ -77,8 +77,7 @@ .Cd "iic* at voyager0 # evbmips " .Cd "iic0 at ziic?# evbmips zaurus " .Sh DESCRIPTION -.Tn I2C -is a two-wire bus developed by Philips used for connecting +I2C is a two-wire bus developed by Philips used for connecting integrated circuits. It is commonly used for connecting devices such as EEPROMs, temperature sensors, fan controllers, real-time clocks, tuners, @@ -86,22 +85,15 @@ and other types of integrated circuits. .Pp The .Nm -driver provides a uniform programming interface layer between -.Tn I2C -master controllers and various -.Tn I2C -slave devices. -Each -.Tn I2C -master controller attaches an +driver provides a uniform programming interface layer between I2C +master controllers and various I2C slave devices. +Each I2C master controller attaches an .Nm framework; several slave devices can then be attached to the .Nm bus. .Pp -All -.Tn I2C -slave devices are uniquely identified by the address on the bus. +All I2C slave devices are uniquely identified by the address on the bus. The master accesses a particular slave device using its address. .\" Devices are found on the bus using a sophisticated scanning routine .\" which attempts to identify commonly available devices. @@ -109,9 +101,7 @@ The master accesses a particular slave d .\" supplies a list of I2C devices, that list is used instead. .Pp System Management Bus (SMBus) protocol is also supported by emulating -it with the -.Tn I2C -commands. +it with the I2C commands. .Sh SUPPORTED MASTERS A wide list of I2C masters are supported, among them are: .Pp @@ -215,9 +205,7 @@ Generic Memory Module Serial Presence De .Xr i2cscan 8 , .Xr iic 9 .Sh HISTORY -The -.Tn I2C -framework first appeared in +The I2C framework first appeared in .Nx 2.0 . .Ox support was added in @@ -228,9 +216,7 @@ it was ported from .Ox . .Sh AUTHORS .An -nosplit -The -.Tn I2C -framework was written by +The I2C framework was written by .An Steve C. Woodford and .An Jason R. Thorpe
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Wed Jan 24 10:00:03 UTC 2018 Modified Files: src/share/man/man4: podulebus.4 Log Message: Remove Tn. Remove more references to acorn26. Bump date. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/podulebus.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/podulebus.4 diff -u src/share/man/man4/podulebus.4:1.4 src/share/man/man4/podulebus.4:1.5 --- src/share/man/man4/podulebus.4:1.4 Wed Jan 24 09:04:42 2018 +++ src/share/man/man4/podulebus.4 Wed Jan 24 10:00:03 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: podulebus.4,v 1.4 2018/01/24 09:04:42 skrll Exp $ +.\" $NetBSD: podulebus.4,v 1.5 2018/01/24 10:00:03 wiz Exp $ .\" .\" Copyright (c) 2000, 2006 Ben Harris .\" All rights reserved. @@ -25,7 +25,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 26, 2006 +.Dd January 24, 2018 .Dt PODULEBUS 4 .Os .Sh NAME @@ -57,71 +57,41 @@ The following devices are supported by .Ss SCSI interfaces .Bl -tag -width Nm .It Nm asc -Acorn -.Tn AKA30 , AKA31 , -and -.Tn AKA32 SCSI -expansion cards +Acorn AKA30, AKA31, and AKA32 SCSI expansion cards .Pq Nx Ns /acorn32 . .It Nm cosc -.Tn MCS -Connect32 -.Tn SCSI -interface +MCS Connect32 SCSI interface .Pq Nx Ns /acorn32 . .It Nm csa -Cumana 8-bit -.Tn SCSI -interface +Cumana 8-bit SCSI interface .Pq Nx Ns /acorn32 . .It Nm csc -Cumana 16-bit -.Tn SCSI -interface +Cumana 16-bit SCSI interface .Pq Nx Ns /acorn32 . .It Nm hcsc -.Tn HCCS -8-bit -.Tn SCSI -interface. +HCCS 8-bit SCSI interface. .It Nm oak -Oak -.Tn SCSI -interface. +Oak SCSI interface. .It Nm ptsc -Powertec -.Tn SCSI -interface +Powertec SCSI interface .Pq Nx Ns /acorn32 . .It Nm sec -Acorn -.Tn AKA30 , AKA31 , -and -.Tn AKA32 SCSI -expansion cards. +Acorn AKA30, AKA31, and AKA32 SCSI expansion cards. .El .Ss Disk controllers .Bl -tag -width Nm .It Nm dtide -D.T. Software -.Tn IDE -controller. +D.T. Software IDE controller. .It Nm hcide -.Tn HCCS IDE -controller. +HCCS IDE controller. .It Nm icside -.Tn ICS IDE -controller +ICS IDE controller .Pq Nx Ns /acorn32 . .It Nm rapide -Yellowstone Educational Solutions RapIDE -.Tn IDE -controller +Yellowstone Educational Solutions RapIDE IDE controller .Pq Nx Ns /acorn32 . .It Nm simide -Simtec -.Tn IDE -controller +Simtec IDE controller .Pq Nx Ns /acorn32 . .El .Ss Network interfaces @@ -129,36 +99,16 @@ controller .It Nm ea Atomwide .No A-10 Ns Ar xx -and Acorn -.Tn AEH54 -Ethernet cards (Ether3). +and Acorn AEH54 Ethernet cards (Ether3). .It Nm eb -Atomwide and -.Tn ANT -network-slot and Acorn -.Tn AEH61 -Ethernet cards (EtherB). -.It Nm eh -i-cubed EtherLan 100-, 200- and 500-series, -and Acorn -.Tn AEH75 , AEH77 , -and -.Tn AEH79 -Ethernet cards (EtherH) -.Pq Nx Ns /acorn26 . +Atomwide and ANT network-slot and Acorn AEH61 Ethernet cards (EtherB). .It Nm ei -Acorn -.Tn AKA25 -Ethernet card (Ether1). +Acorn AKA25 Ethernet card (Ether1). .It Nm ie -Acorn -.Tn AKA25 -Ethernet card (Ether1) +Acorn AKA25 Ethernet card (Ether1) .Pq Nx Ns /acorn32 . .It Nm ne -Various vaguely -.Tn NE2000 Ns -compatible -Ethernet cards +Various vaguely NE2000-compatible Ethernet cards .Pq Nx Ns /acorn32 . .El .Ss Serial interfaces @@ -168,7 +118,6 @@ Atomwide multi-port serial interface .Pq Nx Ns /acorn32 . .El .Sh SEE ALSO -.Xr acorn26/eh 4 , .\" .Xr acorn32/amps 4 , .Xr acorn32/asc 4 , .Xr acorn32/cosc 4 , @@ -188,8 +137,3 @@ Atomwide multi-port serial interface .Xr ne 4 , .Xr oak 4 , .Xr sec 4 -.Sh BUGS -Too few drivers are shared between -.Nx Ns /acorn26 -and -.Nx Ns /acorn32 .
CVS commit: src/bin/ksh
Module Name:src Committed By: kamil Date: Wed Jan 24 09:53:21 UTC 2018 Modified Files: src/bin/ksh: c_ksh.c exec.c lex.c proto.h table.c var.c vi.c Log Message: ksh: Rename a local function tsearch to mytsearch This removes a clash with well-known libc function tsearch(3) from POSIX. This allows to build ksh against MSan. The new name might not be perfect, but long term ksh should be switched to the libc version. Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/bin/ksh/c_ksh.c cvs rdiff -u -r1.25 -r1.26 src/bin/ksh/exec.c cvs rdiff -u -r1.21 -r1.22 src/bin/ksh/lex.c cvs rdiff -u -r1.11 -r1.12 src/bin/ksh/proto.h cvs rdiff -u -r1.5 -r1.6 src/bin/ksh/table.c cvs rdiff -u -r1.22 -r1.23 src/bin/ksh/var.c cvs rdiff -u -r1.18 -r1.19 src/bin/ksh/vi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/ksh/c_ksh.c diff -u src/bin/ksh/c_ksh.c:1.26 src/bin/ksh/c_ksh.c:1.27 --- src/bin/ksh/c_ksh.c:1.26 Fri Jun 30 04:41:19 2017 +++ src/bin/ksh/c_ksh.c Wed Jan 24 09:53:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: c_ksh.c,v 1.26 2017/06/30 04:41:19 kamil Exp $ */ +/* $NetBSD: c_ksh.c,v 1.27 2018/01/24 09:53:20 kamil Exp $ */ /* * built-in Korn commands: c_* @@ -6,7 +6,7 @@ #include #ifndef lint -__RCSID("$NetBSD: c_ksh.c,v 1.26 2017/06/30 04:41:19 kamil Exp $"); +__RCSID("$NetBSD: c_ksh.c,v 1.27 2018/01/24 09:53:20 kamil Exp $"); #endif #include @@ -470,9 +470,9 @@ c_whence(wp) while ((vflag || ret == 0) && (id = *wp++) != NULL) { tp = NULL; if ((iam_whence || vflag) && !pflag) - tp = tsearch(, id, hash(id)); + tp = mytsearch(, id, hash(id)); if (!tp && !pflag) { - tp = tsearch(, id, hash(id)); + tp = mytsearch(, id, hash(id)); if (tp && !(tp->flag & ISSET)) tp = NULL; } @@ -946,7 +946,7 @@ c_alias(wp) alias = str_nsave(alias, val++ - alias, ATEMP); h = hash(alias); if (val == NULL && !tflag && !xflag) { - ap = tsearch(t, alias, h); + ap = mytsearch(t, alias, h); if (ap != NULL && (ap->flag)) { if (pflag) shf_puts("alias ", shl_stdout); @@ -1017,7 +1017,7 @@ c_unalias(wp) wp += builtin_opt.optind; for (; *wp != NULL; wp++) { - ap = tsearch(t, *wp, hash(*wp)); + ap = mytsearch(t, *wp, hash(*wp)); if (ap == NULL) { rv = 1; /* POSIX */ continue; Index: src/bin/ksh/exec.c diff -u src/bin/ksh/exec.c:1.25 src/bin/ksh/exec.c:1.26 --- src/bin/ksh/exec.c:1.25 Wed Jan 24 09:21:20 2018 +++ src/bin/ksh/exec.c Wed Jan 24 09:53:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: exec.c,v 1.25 2018/01/24 09:21:20 kamil Exp $ */ +/* $NetBSD: exec.c,v 1.26 2018/01/24 09:53:21 kamil Exp $ */ /* * execute command tree @@ -6,7 +6,7 @@ #include #ifndef lint -__RCSID("$NetBSD: exec.c,v 1.25 2018/01/24 09:21:20 kamil Exp $"); +__RCSID("$NetBSD: exec.c,v 1.26 2018/01/24 09:53:21 kamil Exp $"); #endif #include @@ -775,7 +775,7 @@ shcomexec(wp) { register struct tbl *tp; - tp = tsearch(, *wp, hash(*wp)); + tp = mytsearch(, *wp, hash(*wp)); if (tp == NULL) internal_errorf(1, "shcomexec: %s", *wp); return call_builtin(tp, wp); @@ -795,7 +795,7 @@ findfunc(name, h, create) struct tbl *tp = (struct tbl *) 0; for (l = e->loc; l; l = l->next) { - tp = tsearch(>funs, name, h); + tp = mytsearch(>funs, name, h); if (tp) break; if (!l->next && create) { @@ -906,7 +906,7 @@ findcom(name, flags) flags &= ~FC_FUNC; goto Search; } - tbi = (flags & FC_BI) ? tsearch(, name, h) : NULL; + tbi = (flags & FC_BI) ? mytsearch(, name, h) : NULL; /* POSIX says special builtins first, then functions, then * POSIX regular builtins, then search path... */ @@ -936,7 +936,7 @@ findcom(name, flags) if (!tp && (flags & FC_UNREGBI) && tbi) tp = tbi; if (!tp && (flags & FC_PATH) && !(flags & FC_DEFPATH)) { - tp = tsearch(, name, h); + tp = mytsearch(, name, h); if (tp && (tp->flag & ISSET) && eaccess(tp->val.s, X_OK) != 0) { if (tp->flag & ALLOC) { tp->flag &= ~ALLOC; Index: src/bin/ksh/lex.c diff -u src/bin/ksh/lex.c:1.21 src/bin/ksh/lex.c:1.22 --- src/bin/ksh/lex.c:1.21 Fri Jun 30 04:41:19 2017 +++ src/bin/ksh/lex.c Wed Jan 24 09:53:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: lex.c,v 1.21 2017/06/30 04:41:19 kamil Exp $ */ +/* $NetBSD: lex.c,v 1.22 2018/01/24 09:53:21 kamil Exp $ */ /* * lexical analysis and source input @@ -6,7 +6,7 @@ #include #ifndef lint -__RCSID("$NetBSD: lex.c,v 1.21 2017/06/30 04:41:19 kamil Exp $"); +__RCSID("$NetBSD: lex.c,v 1.22 2018/01/24 09:53:21 kamil Exp $"); #endif @@ -734,13 +734,13 @@ Done: int h = hash(ident); /* { */ - if ((cf & KEYWORD) && (p = tsearch(, ident, h)) + if ((cf & KEYWORD) && (p = mytsearch(, ident, h)) && (!(cf & ESACONLY) || p->val.i == ESAC || p->val.i == '}')) { afree(yylval.cp, ATEMP); return p->val.i; } - if ((cf & ALIAS) && (p = tsearch(, ident, h)) + if ((cf & ALIAS) && (p
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: wiz Date: Wed Jan 24 09:51:26 UTC 2018 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/comp: ad.aarch64 ad.arm mi src/distrib/sets/lists/debug: mi src/distrib/sets/lists/man: mi src/distrib/sets/lists/xbase: mi shl.mi Log Message: When second keyword is 'obsolete', first one should be foo-obsolete as well. To generate a diff of this commit: cvs rdiff -u -r1.1169 -r1.1170 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.15 -r1.16 src/distrib/sets/lists/comp/ad.aarch64 cvs rdiff -u -r1.80 -r1.81 src/distrib/sets/lists/comp/ad.arm cvs rdiff -u -r1.2170 -r1.2171 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.235 -r1.236 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.1572 -r1.1573 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.144 -r1.145 src/distrib/sets/lists/xbase/mi cvs rdiff -u -r1.78 -r1.79 src/distrib/sets/lists/xbase/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1169 src/distrib/sets/lists/base/mi:1.1170 --- src/distrib/sets/lists/base/mi:1.1169 Wed Jan 24 09:04:41 2018 +++ src/distrib/sets/lists/base/mi Wed Jan 24 09:51:25 2018 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1169 2018/01/24 09:04:41 skrll Exp $ +# $NetBSD: mi,v 1.1170 2018/01/24 09:51:25 wiz Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -4360,7 +4360,7 @@ ./usr/share/man/cat3fbase-obsolete obsolete ./usr/share/man/cat3luabase-man-share ./usr/share/man/cat4base-man-share -./usr/share/man/cat4/acorn26 base-man-share obsolete +./usr/share/man/cat4/acorn26 base-obsolete obsolete ./usr/share/man/cat4/acorn32 base-man-share ./usr/share/man/cat4/alpha base-man-share ./usr/share/man/cat4/amiga base-man-share @@ -4402,7 +4402,7 @@ ./usr/share/man/cat6base-man-share ./usr/share/man/cat7base-man-share ./usr/share/man/cat8base-man-share -./usr/share/man/cat8/acorn26 base-man-share obsolete +./usr/share/man/cat8/acorn26 base-obsolete obsolete ./usr/share/man/cat8/acorn32 base-man-share ./usr/share/man/cat8/algor base-man-share ./usr/share/man/cat8/alpha base-man-share @@ -4463,7 +4463,7 @@ ./usr/share/man/cat8/x86 base-man-share ./usr/share/man/cat8/x86_64 base-obsolete obsolete ./usr/share/man/cat9base-man-share -./usr/share/man/cat9/acorn26 base-man-share obsolete +./usr/share/man/cat9/acorn26 base-obsolete obsolete ./usr/share/man/cat9/alpha base-man-share ./usr/share/man/cat9/amiga base-man-share ./usr/share/man/cat9/arm26 base-obsolete obsolete @@ -4490,7 +4490,7 @@ ./usr/share/man/html3fbase-man-share ./usr/share/man/html3lua base-man-share ./usr/share/man/html4base-man-share -./usr/share/man/html4/acorn26 base-man-share obsolete +./usr/share/man/html4/acorn26 base-obsolete obsolete ./usr/share/man/html4/acorn32 base-man-share ./usr/share/man/html4/alpha base-man-share ./usr/share/man/html4/amiga base-man-share @@ -4531,7 +4531,7 @@ ./usr/share/man/html6base-man-share ./usr/share/man/html7base-man-share ./usr/share/man/html8base-man-share -./usr/share/man/html8/acorn26 base-man-share obsolete +./usr/share/man/html8/acorn26 base-obsolete obsolete ./usr/share/man/html8/acorn32 base-man-share ./usr/share/man/html8/algor base-man-share ./usr/share/man/html8/alpha base-man-share @@ -4592,7 +4592,7 @@ ./usr/share/man/html8/x86 base-man-share ./usr/share/man/html8/x86_64 base-obsolete obsolete ./usr/share/man/html9base-man-share -./usr/share/man/html9/acorn26 base-man-share obsolete +./usr/share/man/html9/acorn26 base-obsolete obsolete ./usr/share/man/html9/alpha base-man-share ./usr/share/man/html9/amiga base-man-share ./usr/share/man/html9/arm26 base-obsolete obsolete @@ -4621,7 +4621,7 @@ ./usr/share/man/man3fbase-man-share ./usr/share/man/man3luabase-man-share ./usr/share/man/man4base-man-share -./usr/share/man/man4/acorn26 base-man-share obsolete +./usr/share/man/man4/acorn26 base-obsolete obsolete ./usr/share/man/man4/acorn32 base-man-share ./usr/share/man/man4/alpha base-man-share ./usr/share/man/man4/amiga base-man-share @@ -4663,7 +4663,7 @@ ./usr/share/man/man6base-man-share ./usr/share/man/man7base-man-share ./usr/share/man/man8base-man-share -./usr/share/man/man8/acorn26 base-man-share obsolete +./usr/share/man/man8/acorn26 base-obsolete obsolete ./usr/share/man/man8/acorn32 base-man-share ./usr/share/man/man8/algor base-man-share ./usr/share/man/man8/alpha base-man-share @@ -4724,7 +4724,7 @@ ./usr/share/man/man8/x86 base-man-share ./usr/share/man/man8/x86_64 base-obsolete obsolete ./usr/share/man/man9base-man-share -./usr/share/man/man9/acorn26
CVS commit: src/bin/ksh
Module Name:src Committed By: kamil Date: Wed Jan 24 09:21:20 UTC 2018 Modified Files: src/bin/ksh: exec.c proto.h table.c var.c Log Message: ksh: Rename a local function tdelete to mytdelete This removes a clash with well-known libc function tdelete(3) from POSIX. This allows to build ksh against MSan. The new name might not be perfect, but long term ksh should be switched to the libc version. Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/bin/ksh/exec.c cvs rdiff -u -r1.10 -r1.11 src/bin/ksh/proto.h cvs rdiff -u -r1.4 -r1.5 src/bin/ksh/table.c cvs rdiff -u -r1.21 -r1.22 src/bin/ksh/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/ksh/exec.c diff -u src/bin/ksh/exec.c:1.24 src/bin/ksh/exec.c:1.25 --- src/bin/ksh/exec.c:1.24 Sat Jul 1 23:12:08 2017 +++ src/bin/ksh/exec.c Wed Jan 24 09:21:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: exec.c,v 1.24 2017/07/01 23:12:08 joerg Exp $ */ +/* $NetBSD: exec.c,v 1.25 2018/01/24 09:21:20 kamil Exp $ */ /* * execute command tree @@ -6,7 +6,7 @@ #include #ifndef lint -__RCSID("$NetBSD: exec.c,v 1.24 2017/07/01 23:12:08 joerg Exp $"); +__RCSID("$NetBSD: exec.c,v 1.25 2018/01/24 09:21:20 kamil Exp $"); #endif #include @@ -843,7 +843,7 @@ define(name, t) } if (t == NULL) { /* undefine */ - tdelete(tp); + mytdelete(tp); return was_set ? 0 : 1; } Index: src/bin/ksh/proto.h diff -u src/bin/ksh/proto.h:1.10 src/bin/ksh/proto.h:1.11 --- src/bin/ksh/proto.h:1.10 Sat Jul 1 23:12:08 2017 +++ src/bin/ksh/proto.h Wed Jan 24 09:21:20 2018 @@ -1,9 +1,9 @@ -/* $NetBSD: proto.h,v 1.10 2017/07/01 23:12:08 joerg Exp $ */ +/* $NetBSD: proto.h,v 1.11 2018/01/24 09:21:20 kamil Exp $ */ /* * prototypes for PD-KSH * originally generated using "cproto.c 3.5 92/04/11 19:28:01 cthuang " - * $Id: proto.h,v 1.10 2017/07/01 23:12:08 joerg Exp $ + * $Id: proto.h,v 1.11 2018/01/24 09:21:20 kamil Exp $ */ #include @@ -218,7 +218,7 @@ unsigned int hash ARGS((const char *)); void tinit ARGS((struct table *, Area *, int)); struct tbl * tsearch ARGS((struct table *, const char *, unsigned int)); struct tbl * tenter ARGS((struct table *, const char *, unsigned int)); -void tdelete ARGS((struct tbl *)); +void mytdelete ARGS((struct tbl *)); void twalk ARGS((struct tstate *, struct table *)); struct tbl * tnext ARGS((struct tstate *)); struct tbl ** tsort ARGS((struct table *)); Index: src/bin/ksh/table.c diff -u src/bin/ksh/table.c:1.4 src/bin/ksh/table.c:1.5 --- src/bin/ksh/table.c:1.4 Mon Jun 23 11:39:04 2003 +++ src/bin/ksh/table.c Wed Jan 24 09:21:20 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: table.c,v 1.4 2003/06/23 11:39:04 agc Exp $ */ +/* $NetBSD: table.c,v 1.5 2018/01/24 09:21:20 kamil Exp $ */ /* * dynamic hashed associative table for commands and variables @@ -6,7 +6,7 @@ #include #ifndef lint -__RCSID("$NetBSD: table.c,v 1.4 2003/06/23 11:39:04 agc Exp $"); +__RCSID("$NetBSD: table.c,v 1.5 2018/01/24 09:21:20 kamil Exp $"); #endif @@ -144,7 +144,7 @@ tenter(tp, n, h) } void -tdelete(p) +mytdelete(p) register struct tbl *p; { p->flag = 0; Index: src/bin/ksh/var.c diff -u src/bin/ksh/var.c:1.21 src/bin/ksh/var.c:1.22 --- src/bin/ksh/var.c:1.21 Sat Jul 1 23:12:08 2017 +++ src/bin/ksh/var.c Wed Jan 24 09:21:20 2018 @@ -1,9 +1,9 @@ -/* $NetBSD: var.c,v 1.21 2017/07/01 23:12:08 joerg Exp $ */ +/* $NetBSD: var.c,v 1.22 2018/01/24 09:21:20 kamil Exp $ */ #include #ifndef lint -__RCSID("$NetBSD: var.c,v 1.21 2017/07/01 23:12:08 joerg Exp $"); +__RCSID("$NetBSD: var.c,v 1.22 2018/01/24 09:21:20 kamil Exp $"); #endif #include @@ -939,7 +939,7 @@ unspecial(name) tp = tsearch(, name, hash(name)); if (tp) - tdelete(tp); + mytdelete(tp); } #ifdef KSH
CVS commit: src
Module Name:src Committed By: skrll Date: Wed Jan 24 09:04:46 UTC 2018 Modified Files: src: build.sh src/distrib/cdrom: Makefile current.conf src/distrib/notes: Makefile src/distrib/notes/common: contents macros main postinstall sysinst src/distrib/sets/lists/base: ad.arm mi src/distrib/sets/lists/comp: ad.aarch64 ad.arm src/distrib/sets/lists/man: mi src/distrib/utils/x_disklabel: Makefile src/doc: RESPONSIBLE src/etc/mtree: NetBSD.dist.base src/external/gpl2/groff/dist/tmac: doc-common groff_mdoc.man src/external/gpl2/send-pr/dist/send-pr: categories src/external/gpl3/gdb/dist/gdb: arm-nbsd-nat.c src/sbin/disklabel: Makefile main.c src/share/examples/disktab: disktab src/share/man/man4: Makefile ddb.4 iic.4 podulebus.4 src/share/man/man7: hier.7 src/share/man/man8: Makefile src/share/mk: bsd.own.mk src/sys/arch: Makefile README src/sys/arch/acorn32/stand/boot32: boot32.c src/sys/arch/arm/arm: arm_machdep.c ast.c bcopyinout.S compat_16_machdep.c copystr.S cpu_in_cksum.S db_trace.c fiq.c fiq_subr.S fusu.S lock_cas.S process_machdep.c sig_machdep.c syscall.c undefined.c src/sys/arch/arm/arm32: genassym.cf src/sys/arch/arm/conf: files.arm src/sys/arch/arm/include: armreg.h cpu.h cpufunc.h db_machdep.h frame.h locore.h pcb.h profile.h src/sys/arch/arm/include/arm32: pmap.h types.h src/sys/arch/arm/xscale: becc_intr.h i80321_intr.h pxa2x0_intr.h src/sys/arch/iyonix: TODO src/sys/arch/usermode/usermode: vm_machdep.c src/sys/compat/linux/arch/arm: linux_sys_machdep.c src/sys/dev/ic: ncr5380var.h src/sys/modules: Makefile.assym src/sys/sys: mman.h src/tools: headerlist src/usr.sbin/crash: Makefile src/usr.sbin/sysinst: Makefile src/usr.sbin/sysinst/arch/acorn32: md.c Removed Files: src/distrib/acorn26: Makefile src/distrib/acorn26/cdroms: Makefile src/distrib/acorn26/cdroms/installcd: Makefile src/distrib/acorn26/instkernel: Makefile dot.profile list src/distrib/notes/acorn26: Makefile contents hardware install prep upgrade xfer src/etc/etc.acorn26: MAKEDEV.conf Makefile.inc ttys src/share/man/man4/man4.acorn26: Makefile arckbd.4 cpu.4 eca.4 eh.4 iobus.4 unixbp.4 src/share/man/man8/man8.acorn26: Makefile boot26.8 src/sys/arch/acorn26: Makefile src/sys/arch/acorn26/acorn26: autoconf.c bus.c bus_asm.S conf.c cons_machdep.c cpu.c cpuswitch.c cpuvar.h db_interface.c db_machdep.c except.c fpu.c fpu_asm.S fpuvar.h genassym.cf irq.c locore.S machdep.c pmap.c rscons.c start.c stubs.c sys_machdep.c vm_machdep.c src/sys/arch/acorn26/compile: Makefile src/sys/arch/acorn26/conf: FOURMEG GENERIC INSTALL Makefile.acorn26 TESTING files.acorn26 majors.acorn26 std.acorn26 src/sys/arch/acorn26/include: Makefile ansi.h aout_machdep.h asm.h boot.h bootconfig.h bswap.h bus_defs.h bus_funcs.h cdefs.h cpu.h db_machdep.h disklabel.h elf_machdep.h endian.h endian_machdep.h fiq.h float.h fpureg.h frame.h ieee.h ieeefp.h int_const.h int_fmtio.h int_limits.h int_mwgwtypes.h int_types.h intr.h irq.h limits.h loadfile_machdep.h lock.h machdep.h math.h mcontext.h memcreg.h mutex.h param.h pcb.h pmap.h pmc.h podulebus_machdep.h proc.h profile.h ptrace.h reg.h rwlock.h setjmp.h signal.h softintr.h stdarg.h sysarch.h trap.h types.h vmparam.h wchar_limits.h src/sys/arch/acorn26/iobus: iobus.c iobusvar.h ioc.c iocreg.h iocvar.h upc_iobus.c src/sys/arch/acorn26/ioc: arckbd.c arckbdmap.c arckbdreg.h arckbdvar.h arcpp.c arcppreg.h if_eca.c if_eca_fiq.S if_ecavar.h ioc_fiq_util.S iociic.c iociicvar.h ioeb.c ioebreg.h ioebvar.h latches.c latchreg.h latchvar.h ssn.c src/sys/arch/acorn26/podulebus: if_eh.c if_ehreg.h podloader_asm.S podulebus.c podulebusreg.h powerrom.c unixbp.c unixbpreg.h unixbpvar.h src/sys/arch/acorn26/stand: Makefile Makefile.buildboot src/sys/arch/acorn26/stand/boot26: Makefile boot26.c rmheader.S start.S version src/sys/arch/acorn26/stand/lib: Makefile Makefile.inc devopen.c newvers_rm.sh riscoscalls.S riscoscalls.h riscoscons.c riscosdisk.c riscosdisk.h riscoserrors.c riscosfile.c riscosfile.h srt0.S srt1.c src/sys/arch/acorn26/vidc: arcvideo.c arcvideovar.h vidcreg.h vidmodes.c src/sys/arch/arm/include/arm26: Makefile types.h src/usr.sbin/sysinst/arch/acorn26: Makefile md.c md.h menus.md.en