CVS commit: [netbsd-8] src/lib/libpthread
Module Name:src Committed By: snj Date: Mon Jul 24 05:48:00 UTC 2017 Modified Files: src/lib/libpthread [netbsd-8]: pthread_tsd.c Log Message: Pull up following revision(s) (requested by kamil in ticket #119): lib/libpthread/pthread_tsd.c: revision 1.16 PR/52386: Use the number of iterations we document. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.15.8.1 src/lib/libpthread/pthread_tsd.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/libpthread/pthread_tsd.c diff -u src/lib/libpthread/pthread_tsd.c:1.15 src/lib/libpthread/pthread_tsd.c:1.15.8.1 --- src/lib/libpthread/pthread_tsd.c:1.15 Tue Aug 25 13:46:23 2015 +++ src/lib/libpthread/pthread_tsd.c Mon Jul 24 05:47:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread_tsd.c,v 1.15 2015/08/25 13:46:23 pooka Exp $ */ +/* $NetBSD: pthread_tsd.c,v 1.15.8.1 2017/07/24 05:47:59 snj Exp $ */ /*- * Copyright (c) 2001, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: pthread_tsd.c,v 1.15 2015/08/25 13:46:23 pooka Exp $"); +__RCSID("$NetBSD: pthread_tsd.c,v 1.15.8.1 2017/07/24 05:47:59 snj Exp $"); /* Functions and structures dealing with thread-specific data */ #include @@ -332,7 +332,8 @@ pthread__destroy_tsd(pthread_t self) * a while.'' */ - iterations = 4; /* We're not required to try very hard */ + /* We're not required to try very hard */ + iterations = PTHREAD_DESTRUCTOR_ITERATIONS; do { done = 1; for (i = 0; i < pthread_keys_max; i++) { @@ -356,7 +357,7 @@ pthread__destroy_tsd(pthread_t self) (*destructor)(val); } } - } while (!done && iterations--); + } while (!done && --iterations); self->pt_havespecific = 0; pthread_mutex_lock(>pt_lock);
CVS commit: [netbsd-8] src/share/man/man8
Module Name:src Committed By: snj Date: Mon Jul 24 05:37:58 UTC 2017 Modified Files: src/share/man/man8 [netbsd-8]: MAKEDEV.8 Log Message: Pull up following revision(s) (requested by sevan in ticket #118): share/man/man8/MAKEDEV.8: revision 1.46 regen To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.45.18.1 src/share/man/man8/MAKEDEV.8 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/man8/MAKEDEV.8 diff -u src/share/man/man8/MAKEDEV.8:1.45 src/share/man/man8/MAKEDEV.8:1.45.18.1 --- src/share/man/man8/MAKEDEV.8:1.45 Mon Feb 24 07:23:41 2014 +++ src/share/man/man8/MAKEDEV.8 Mon Jul 24 05:37:58 2017 @@ -6,7 +6,7 @@ .\" *** DO NOT EDIT - any changes will be lost!!! .\" *** -- .\" -.\" $NetBSD: MAKEDEV.8,v 1.45 2014/02/24 07:23:41 skrll Exp $ +.\" $NetBSD: MAKEDEV.8,v 1.45.18.1 2017/07/24 05:37:58 snj Exp $ .\" .\" Copyright (c) 2001, 2003, 2007, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -35,7 +35,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 25, 2012 +.Dd July 9, 2017 .Dt MAKEDEV 8 .Os .Sh NAME @@ -238,6 +238,8 @@ Devices to be put into INSTALL kernel ra Standard devices .It Ar local Configuration specific devices +.It Ar lua +Lua device .It Ar wscons Make wscons devices .It Ar usbs @@ -283,6 +285,9 @@ TU58 cassettes on DL11 controller, see . El .It Disks : . Bl -tag -width 0123456789 -compact +. It Ar dk# +Wedge disk slices, see +.Xr \ 4 . It Ar ccd# Concatenated disk devices, see .Xr \ 4 @@ -442,6 +447,10 @@ UART on first 68901 (formerly mdm01) (at IXP12x0 COM ports . It Ar epcom EP93xx COM ports +. It Ar plcom +ARM PL01[01] serial ports +. It Ar wmcom +EPOC Windermere COM ports . It Ar ttyM? HP200/300 4 port serial mux interface (hp300) . It Ar ttya @@ -736,6 +745,8 @@ Graphics frame buffer device, see . It Ar hdaudio# High Definition audio control device, see .Xr \ 4 +. It Ar hdmicec# +HDMI CEC devices . It Ar hil HP300 HIL input devices, see .Xr \ 4 @@ -774,6 +785,9 @@ Magma multiport serial/parallel cards, s . It Ar midi# MIDI, see .Xr \ 4 +. It Ar mfi# +LSI MegaRAID/MegaSAS control interface, see +.Xr \ 4 . It Ar mlx# Mylex DAC960 control interface, see .Xr \ 4 @@ -788,6 +802,11 @@ NPF packet filter . It Ar nsmb# SMB requester, see .Xr \ 4 +. It Ar nvme# +Non-Volatile Memory Host Controller Interface device driver, see +.Xr \ 4 +. It Ar nvme#ns* +Non-Volatile Memory namespace . It Ar openfirm OpenFirmware accessor . It Ar pad# @@ -875,6 +894,17 @@ Xen event interface . It Ar iscsi# ISCSI driver and /sbin/iscsid communication . El +.It Trusted Computing devices +. Bl -tag -width 0123456789 -compact +. It Ar tpm +Trusted Platform Module, see +.Xr \ 4 +. El +.It Debugging and tracing +. Bl -tag -width 0123456789 -compact +. It Ar dtrace +Dynamic tracing framework +. El .El .Sh ENVIRONMENT The following environment variables affect the execution of @@ -997,6 +1027,6 @@ this can be done on a .Nx host, or can be done in a cross-build environment using .Sy TOOLDIR Ns Pa /bin/nbpax . -Finally, use apropriate tools on the foreign server +Finally, use appropriate tools on the foreign server to unpack the archive and create the device nodes. .El
CVS commit: src/tests/net
Module Name:src Committed By: ozaki-r Date: Mon Jul 24 02:07:43 UTC 2017 Modified Files: src/tests/net: net_common.sh src/tests/net/ipsec: t_ipsec_misc.sh Log Message: Skip ipsec_spi_*_*_preferred_new_timeout when running on qemu Probably due to PR 43997 To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/tests/net/net_common.sh cvs rdiff -u -r1.15 -r1.16 src/tests/net/ipsec/t_ipsec_misc.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/net_common.sh diff -u src/tests/net/net_common.sh:1.19 src/tests/net/net_common.sh:1.20 --- src/tests/net/net_common.sh:1.19 Mon Jun 19 09:20:29 2017 +++ src/tests/net/net_common.sh Mon Jul 24 02:07:43 2017 @@ -1,4 +1,4 @@ -# $NetBSD: net_common.sh,v 1.19 2017/06/19 09:20:29 ozaki-r Exp $ +# $NetBSD: net_common.sh,v 1.20 2017/07/24 02:07:43 ozaki-r Exp $ # # Copyright (c) 2016 Internet Initiative Japan Inc. # All rights reserved. @@ -404,3 +404,11 @@ dump() rump_server_dump_servers rump_server_dump_buses } + +skip_if_qemu() +{ + if sysctl machdep.cpu_brand 2>/dev/null | grep QEMU >/dev/null 2>&1 + then + atf_skip "unreliable under qemu, skip until PR kern/43997 fixed" + fi +} Index: src/tests/net/ipsec/t_ipsec_misc.sh diff -u src/tests/net/ipsec/t_ipsec_misc.sh:1.15 src/tests/net/ipsec/t_ipsec_misc.sh:1.16 --- src/tests/net/ipsec/t_ipsec_misc.sh:1.15 Fri Jul 21 04:43:42 2017 +++ src/tests/net/ipsec/t_ipsec_misc.sh Mon Jul 24 02:07:43 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_ipsec_misc.sh,v 1.15 2017/07/21 04:43:42 ozaki-r Exp $ +# $NetBSD: t_ipsec_misc.sh,v 1.16 2017/07/24 02:07:43 ozaki-r Exp $ # # Copyright (c) 2017 Internet Initiative Japan Inc. # All rights reserved. @@ -485,6 +485,10 @@ test_spi() local spistr= local longtime= shorttime= + if [ $method = timeout -a $preferred = new ]; then + skip_if_qemu + fi + if [ $method = delete ]; then shorttime=100 longtime=100
CVS commit: src/distrib/evbppc/ramdisk
Module Name:src Committed By: joerg Date: Sun Jul 23 20:59:00 UTC 2017 Modified Files: src/distrib/evbppc/ramdisk: Makefile Log Message: Don't build unwind data for the ramdisk, use more aggressive size optimization for clang. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/distrib/evbppc/ramdisk/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/evbppc/ramdisk/Makefile diff -u src/distrib/evbppc/ramdisk/Makefile:1.22 src/distrib/evbppc/ramdisk/Makefile:1.23 --- src/distrib/evbppc/ramdisk/Makefile:1.22 Thu Feb 9 15:24:08 2017 +++ src/distrib/evbppc/ramdisk/Makefile Sun Jul 23 20:59:00 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2017/02/09 15:24:08 joerg Exp $ +# $NetBSD: Makefile,v 1.23 2017/07/23 20:59:00 joerg Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" @@ -8,7 +8,7 @@ IMAGESIZE= 3280k MAKEFS_FLAGS+= -f 15 WARNS= 1 -DBG= -Os +DBG= ${${ACTIVE_CC} == "clang":? -Oz -fomit-frame-pointer : -Os } -fno-unwind-tables CRUNCHBIN= ramdiskbin CRUNCHGEN_FLAGS=-d "${DBG}"
CVS commit: src/share/mk
Module Name:src Committed By: mrg Date: Sun Jul 23 20:45:31 UTC 2017 Modified Files: src/share/mk: bsd.own.mk Log Message: GCC 5.3 now lives in gcc.old. add Xfont2 to X11 list. To generate a diff of this commit: cvs rdiff -u -r1.1011 -r1.1012 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1011 src/share/mk/bsd.own.mk:1.1012 --- src/share/mk/bsd.own.mk:1.1011 Tue Jul 18 14:36:43 2017 +++ src/share/mk/bsd.own.mk Sun Jul 23 20:45:31 2017 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1011 2017/07/18 14:36:43 joerg Exp $ +# $NetBSD: bsd.own.mk,v 1.1012 2017/07/23 20:45:31 mrg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -81,7 +81,7 @@ MKGCCCMDS?= no # set to the relevant subdirectory in src/external/gpl3 for his HAVE_GCC. # .if ${HAVE_GCC} == 53 -EXTERNAL_GCC_SUBDIR= gcc +EXTERNAL_GCC_SUBDIR= gcc.old .else EXTERNAL_GCC_SUBDIR= /does/not/exist .endif @@ -1336,7 +1336,7 @@ X11USRLIBDIR?= ${X11ROOTDIR}/lib${MLIBD X11SRCDIRMIT?= ${X11SRCDIR}/external/mit .for _lib in \ FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \ - Xdmcp Xevie Xext Xfixes Xfont Xft Xi Xinerama Xmu Xpresent Xpm \ + Xdmcp Xevie Xext Xfixes Xfont Xfont2 Xft Xi Xinerama Xmu Xpresent Xpm \ Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \ epoxy fontenc xkbfile xkbui Xaw Xfontcache pciaccess xcb xshmfence \ pthread-stubs
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: perseant Date: Sun Jul 23 19:26:06 UTC 2017 Modified Files: src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi Log Message: Add missing setlist entries for DUCET collation test. To generate a diff of this commit: cvs rdiff -u -r1.220 -r1.221 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.757 -r1.758 src/distrib/sets/lists/tests/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/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.220 src/distrib/sets/lists/debug/mi:1.221 --- src/distrib/sets/lists/debug/mi:1.220 Fri Jul 14 14:57:43 2017 +++ src/distrib/sets/lists/debug/mi Sun Jul 23 19:26:05 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.220 2017/07/14 14:57:43 perseant Exp $ +# $NetBSD: mi,v 1.221 2017/07/23 19:26:05 perseant Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -1947,6 +1947,7 @@ ./usr/libdata/debug/usr/tests/lib/libc/locale/t_ctype2.debug tests-obsolete obsolete,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/locale/t_btowc.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/locale/t_digittoint.debug tests-lib-debug debug,atf,compattestfile +./usr/libdata/debug/usr/tests/lib/libc/locale/t_ducet.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/locale/t_io.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/locale/t_mbrtowc.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/locale/t_mbsnrtowcs.debug tests-lib-debug debug,atf,compattestfile Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.757 src/distrib/sets/lists/tests/mi:1.758 --- src/distrib/sets/lists/tests/mi:1.757 Tue Jul 18 02:16:07 2017 +++ src/distrib/sets/lists/tests/mi Sun Jul 23 19:26:06 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.757 2017/07/18 02:16:07 ozaki-r Exp $ +# $NetBSD: mi,v 1.758 2017/07/23 19:26:06 perseant Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2544,6 +2544,7 @@ ./usr/tests/lib/libc/locale/t_ctype2 tests-obsolete obsolete ./usr/tests/lib/libc/locale/t_btowc tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/locale/t_digittoint tests-lib-tests compattestfile,atf +./usr/tests/lib/libc/locale/t_ducet tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/locale/t_io tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/locale/t_mbrtowc tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/locale/t_mbsnrtowcs tests-lib-tests compattestfile,atf
CVS commit: [perseant-stdc-iso10646] src/tests/lib/libc/locale
Module Name:src Committed By: perseant Date: Sun Jul 23 19:16:11 UTC 2017 Modified Files: src/tests/lib/libc/locale [perseant-stdc-iso10646]: Makefile ducet_test.h t_ducet.c Log Message: Add Unicode copyright notice and more verbose DUCET test. To generate a diff of this commit: cvs rdiff -u -r1.10.2.1 -r1.10.2.2 src/tests/lib/libc/locale/Makefile cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/tests/lib/libc/locale/ducet_test.h \ src/tests/lib/libc/locale/t_ducet.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/locale/Makefile diff -u src/tests/lib/libc/locale/Makefile:1.10.2.1 src/tests/lib/libc/locale/Makefile:1.10.2.2 --- src/tests/lib/libc/locale/Makefile:1.10.2.1 Fri Jul 14 15:53:08 2017 +++ src/tests/lib/libc/locale/Makefile Sun Jul 23 19:16:11 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10.2.1 2017/07/14 15:53:08 perseant Exp $ +# $NetBSD: Makefile,v 1.10.2.2 2017/07/23 19:16:11 perseant Exp $ .include Index: src/tests/lib/libc/locale/ducet_test.h diff -u src/tests/lib/libc/locale/ducet_test.h:1.1.2.1 src/tests/lib/libc/locale/ducet_test.h:1.1.2.2 --- src/tests/lib/libc/locale/ducet_test.h:1.1.2.1 Fri Jul 14 15:53:08 2017 +++ src/tests/lib/libc/locale/ducet_test.h Sun Jul 23 19:16:11 2017 @@ -6,6 +6,39 @@ /* UCA Version: 10.0.0*/ /* UCD Version: 10.0.0*/ /* For a description of the format and usage, see CollationTest.html*/ +/* + * Copyright © 1991-2017 Unicode, Inc. All rights reserved. + * Distributed under the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of the Unicode data files and any associated documentation + * (the "Data Files") or Unicode software and any associated documentation + * (the "Software") to deal in the Data Files or Software + * without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, and/or sell copies of + * the Data Files or Software, and to permit persons to whom the Data Files + * or Software are furnished to do so, provided that either + * (a) this copyright and permission notice appear with all copies + * of the Data Files or Software, or + * (b) this copyright and permission notice appear in associated + * Documentation. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF + * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS + * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL + * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in these Data Files or Software without prior + * written authorization of the copyright holder. + */ #define MAX_TS_LEN 7 wchar_t ducet_test_data[][MAX_TS_LEN] = { {0x0338, 0x0334, 0x0}, Index: src/tests/lib/libc/locale/t_ducet.c diff -u src/tests/lib/libc/locale/t_ducet.c:1.1.2.1 src/tests/lib/libc/locale/t_ducet.c:1.1.2.2 --- src/tests/lib/libc/locale/t_ducet.c:1.1.2.1 Fri Jul 14 15:53:08 2017 +++ src/tests/lib/libc/locale/t_ducet.c Sun Jul 23 19:16:11 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ducet.c,v 1.1.2.1 2017/07/14 15:53:08 perseant Exp $ */ +/* $NetBSD: t_ducet.c,v 1.1.2.2 2017/07/23 19:16:11 perseant Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2011\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_ducet.c,v 1.1.2.1 2017/07/14 15:53:08 perseant Exp $"); +__RCSID("$NetBSD: t_ducet.c,v 1.1.2.2 2017/07/23 19:16:11 perseant Exp $"); #include #include @@ -98,7 +98,7 @@ ATF_TC_BODY(wcsxfrm_ducet, tc) wchar_t *tmp, *oline = NULL, *line; wchar_t xfb1[BUFLEN], xfb2[BUFLEN]; /* Gross overestimates */ wchar_t *oxf = xfb1, *xf = xfb2; - int i, lineno = 0; + int i, lineno = 0, result; setlocale(LC_COLLATE, "en_US.UTF-8"); /* should be "vanilla" DUCET, but en_US will do */ ATF_REQUIRE_STREQ("en_US.UTF-8", setlocale(LC_COLLATE, NULL)); @@ -122,7 +122,18 @@ ATF_TC_BODY(wcsxfrm_ducet, tc) printf("\n"); wcsxfrm(xf, line, BUFLEN); - ATF_CHECK(wcscmp(oxf, xf) < 0); + result = wcscmp(oxf, xf); + if (result > 0) { + printf("FAILED result was %d\nweights were ", result); + for (i = 0; oxf[i] != 0; i++) +printf("0x%lx ", (long)oline[i]); + printf(" and "); + for (i = 0; xf[i] != 0;
CVS commit: src/distrib/sparc/miniroot
Module Name:src Committed By: joerg Date: Sun Jul 23 19:00:22 UTC 2017 Modified Files: src/distrib/sparc/miniroot: Makefile.inc Log Message: Bump the miniroot size slightly for clang. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/distrib/sparc/miniroot/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sparc/miniroot/Makefile.inc diff -u src/distrib/sparc/miniroot/Makefile.inc:1.27 src/distrib/sparc/miniroot/Makefile.inc:1.28 --- src/distrib/sparc/miniroot/Makefile.inc:1.27 Thu Feb 9 18:15:07 2017 +++ src/distrib/sparc/miniroot/Makefile.inc Sun Jul 23 19:00:22 2017 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.27 2017/02/09 18:15:07 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.28 2017/07/23 19:00:22 joerg Exp $ -IMAGESIZE= 9600k +IMAGESIZE= 9700k DBG= ${${ACTIVE_CC} == "clang":? -Oz -fomit-frame-pointer : -Os } -fno-unwind-tables MAKEFS_FLAGS+= -o density=4k
CVS commit: [perseant-stdc-iso10646, trunk] src
Module Name:src Committed By: perseant Date: Sun Jul 23 18:51:21 UTC 2017 Modified Files: src/tests/lib/libc/locale: Makefile src/lib/libc/iconv [perseant-stdc-iso10646]: iconv.c Added Files: src/tests/lib/libc/locale: ducet_test.h t_ducet.c src/lib/libc/citrus [perseant-stdc-iso10646]: citrus_u2k_template.h Log Message: Add missing files from last commit: Move Unicode <-> ku/ten mapping into the individual codec modules. Mapping is based on existing iconv data for single-byte encodings, and included for several, but not all, multibyte encodings. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.2.1 src/lib/libc/citrus/citrus_u2k_template.h cvs rdiff -u -r1.13 -r1.13.34.1 src/lib/libc/iconv/iconv.c cvs rdiff -u -r1.10 -r1.11 src/tests/lib/libc/locale/Makefile cvs rdiff -u -r0 -r1.2 src/tests/lib/libc/locale/ducet_test.h \ src/tests/lib/libc/locale/t_ducet.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: snj Date: Sun Jul 23 15:06:16 UTC 2017 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: 105 To generate a diff of this commit: cvs rdiff -u -r1.1.2.29 -r1.1.2.30 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.29 src/doc/CHANGES-8.0:1.1.2.30 --- src/doc/CHANGES-8.0:1.1.2.29 Sun Jul 23 15:01:21 2017 +++ src/doc/CHANGES-8.0 Sun Jul 23 15:06:16 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.29 2017/07/23 15:01:21 snj Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.30 2017/07/23 15:06:16 snj Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -4575,3 +4575,8 @@ bin/sh/var.h 1.29-1.35 expansion methods), and fix some ancient memory management bugs. [kre, ticket #103] +share/man/man7/environ.7 1.27 + + Document EDITRC + [kre, ticket #105] +
CVS commit: [netbsd-8] src/share/man/man7
Module Name:src Committed By: snj Date: Sun Jul 23 15:05:36 UTC 2017 Modified Files: src/share/man/man7 [netbsd-8]: environ.7 Log Message: Pull up following revision(s) (requested by kre in ticket #105): share/man/man7/environ.7: revision 1.27 Document EDITRC To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.26.4.1 src/share/man/man7/environ.7 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/man7/environ.7 diff -u src/share/man/man7/environ.7:1.26 src/share/man/man7/environ.7:1.26.4.1 --- src/share/man/man7/environ.7:1.26 Sat Feb 25 15:55:45 2017 +++ src/share/man/man7/environ.7 Sun Jul 23 15:05:36 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: environ.7,v 1.26 2017/02/25 15:55:45 abhinav Exp $ +.\" $NetBSD: environ.7,v 1.26.4.1 2017/07/23 15:05:36 snj Exp $ .\" .\" Copyright (c) 1983, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -80,6 +80,13 @@ by or .Ql g . Sizes less than 512 bytes or greater than a gigabyte are ignored. +.It Ev EDITRC +Gives the path name of the file used by +.Xr editline 7 +when command line editing is enabled in various programs. +See +.Xr editrc 5 +for information on the format of the file. .It Ev EXINIT A startup list of commands read by .Xr ex 1
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: snj Date: Sun Jul 23 15:01:21 UTC 2017 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: 102, 103 To generate a diff of this commit: cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.28 src/doc/CHANGES-8.0:1.1.2.29 --- src/doc/CHANGES-8.0:1.1.2.28 Thu Jul 20 01:24:13 2017 +++ src/doc/CHANGES-8.0 Sun Jul 23 15:01:21 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.28 2017/07/20 01:24:13 snj Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.29 2017/07/23 15:01:21 snj Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -4511,3 +4511,67 @@ sys/dev/fdt/fdt_subr.c1.17 size -1 to kmem_alloc when the property was not found. [jmcneill, ticket #147] +lib/libedit/Makefile1.64-1.65 +lib/libedit/editline.31.94-1.96 +lib/libedit/editrc.51.33 +lib/libedit/el.c1.93-1.94 +lib/libedit/el.h1.42 +lib/libedit/literal.c1.1-1.3 +lib/libedit/literal.h1.1-1.2 +lib/libedit/prompt.c1.27 +lib/libedit/read.c1.103 +lib/libedit/refresh.c1.52-1.54 +lib/libedit/refresh.h1.11 +lib/libedit/terminal.c1.33 + + Properly support invisible (mode change) sequences in prompts, + and use EDITRC from the environ (if set) instead of always + $HOME/.editrc + [kre, ticket #102] + +bin/kill/kill.c 1.28 +bin/sh/Makefile 1.111-1.113 +bin/sh/arith_token.c1.5 +bin/sh/arith_tokens.h1.2 +bin/sh/arithmetic.c1.3 +bin/sh/arithmetic.h1.2 +bin/sh/bltin/bltin.h1.15 +bin/sh/cd.c 1.49-1.50 +bin/sh/error.c 1.40 +bin/sh/eval.c 1.142-1.151 +bin/sh/exec.c 1.49-1.51 +bin/sh/exec.h 1.26 +bin/sh/expand.c 1.113-1.119 +bin/sh/expand.h 1.23 +bin/sh/histedit.c1.49-1.52 +bin/sh/input.c 1.57-1.60 +bin/sh/input.h 1.19-1.20 +bin/sh/jobs.c 1.86-1.87 +bin/sh/main.c 1.71-1.72 +bin/sh/memalloc.c1.30 +bin/sh/memalloc.h1.17 +bin/sh/mknodenames.sh1.4 +bin/sh/mkoptions.sh1.3-1.4 +bin/sh/myhistedit.h1.12-1.13 +bin/sh/nodetypes1.16-1.18 +bin/sh/option.list1.3-1.5 +bin/sh/parser.c 1.133-1.141 +bin/sh/parser.h 1.22-1.23 +bin/sh/redir.c 1.58 +bin/sh/redir.h 1.24 +bin/sh/sh.1 1.149-1.159 +bin/sh/shell.h 1.24 +bin/sh/show.c 1.43-1.47 +bin/sh/show.h 1.11 +bin/sh/syntax.c 1.4 +bin/sh/syntax.h 1.8 +bin/sh/trap.c 1.41 +bin/sh/var.c 1.56-1.65 +bin/sh/var.h 1.29-1.35 + + Properly support LINENO, implement posix required expansions + or prompts (add some new variables to enable better use of + newly expandable prompts and avoid requests for other magic + expansion methods), and fix some ancient memory management bugs. + [kre, ticket #103] +
CVS commit: [netbsd-8] src/lib/libedit
Module Name:src Committed By: snj Date: Sun Jul 23 14:41:26 UTC 2017 Modified Files: src/lib/libedit [netbsd-8]: Makefile editline.3 editrc.5 el.c el.h prompt.c read.c refresh.c refresh.h terminal.c Added Files: src/lib/libedit [netbsd-8]: literal.c literal.h Log Message: Pull up following revision(s) (requested by kre in ticket #102): lib/libedit/Makefile: 1.64-1.65 lib/libedit/editline.3: 1.94-1.96 lib/libedit/editrc.5: 1.33 lib/libedit/el.c: 1.93-1.94 lib/libedit/el.h: 1.42 lib/libedit/literal.c: 1.1-1.3 lib/libedit/literal.h: 1.1-1.2 lib/libedit/prompt.c: 1.27 lib/libedit/read.c: 1.103 lib/libedit/refresh.c: 1.52-1.54 lib/libedit/refresh.h: 1.11 lib/libedit/terminal.c: 1.33 Make the default editrc file be $EDITRC (from env) if set, falling back to $HOME/.editrc otherwise.Better support for this in sh coming. -- Include EDITRC in doc. -- mention the limitation of the literal sequence delimiter. -- - handle literal escape sequence printing. - factor out common code in allocation and freeing of the display. -- - add literal sequence handling. -- remove unused variable -- add literal escape sequence support, patterned after the tcsh ones. -- fix comment -- Fix an obvious, but almost invisible typo (avoid some core dumps). -- Allow wide characters (properly encoded as byte strings according to LC_CTYPE) to be (perhaps part of) the "invisible" characters in a prompt, or the required prompt character which follows the literal sequence (this character must be one with a printing column width >= 1). The literal indicator character (which is just a marker, and not printed anywhere) (the PSlit parameter in sh(1)) can also be a wide char (passed to libedit as a wchar_t, encoded as that by sh(1) or other applications that support this.) Note: this has currently only been tested with everything ascii (C locale). -- Remove workaround for ancient HTML generation code. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.63.8.1 src/lib/libedit/Makefile cvs rdiff -u -r1.93 -r1.93.4.1 src/lib/libedit/editline.3 cvs rdiff -u -r1.32 -r1.32.8.1 src/lib/libedit/editrc.5 \ src/lib/libedit/terminal.c cvs rdiff -u -r1.92 -r1.92.8.1 src/lib/libedit/el.c cvs rdiff -u -r1.41 -r1.41.8.1 src/lib/libedit/el.h cvs rdiff -u -r0 -r1.3.4.2 src/lib/libedit/literal.c cvs rdiff -u -r0 -r1.2.4.2 src/lib/libedit/literal.h cvs rdiff -u -r1.26 -r1.26.8.1 src/lib/libedit/prompt.c cvs rdiff -u -r1.102 -r1.102.6.1 src/lib/libedit/read.c cvs rdiff -u -r1.51 -r1.51.8.1 src/lib/libedit/refresh.c cvs rdiff -u -r1.10 -r1.10.8.1 src/lib/libedit/refresh.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libedit/Makefile diff -u src/lib/libedit/Makefile:1.63 src/lib/libedit/Makefile:1.63.8.1 --- src/lib/libedit/Makefile:1.63 Tue May 24 17:42:54 2016 +++ src/lib/libedit/Makefile Sun Jul 23 14:41:26 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.63 2016/05/24 17:42:54 christos Exp $ +# $NetBSD: Makefile,v 1.63.8.1 2017/07/23 14:41:26 snj Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 USE_SHLIBDIR= yes @@ -15,7 +15,7 @@ CWARNFLAGS.gcc+= -Wconversion CWARNFLAGS.clang+= -Wno-cast-qual SRCS = chared.c chartype.c common.c el.c eln.c emacs.c filecomplete.c \ - hist.c history.c historyn.c keymacro.c map.c \ + hist.c history.c historyn.c keymacro.c literal.c map.c \ parse.c prompt.c read.c readline.c refresh.c search.c sig.c \ terminal.c tokenizer.c tokenizern.c tty.c vi.c @@ -133,6 +133,7 @@ tc1: libedit.a tc1.o # XXX .if defined(HAVE_GCC) COPTS.editline.c+= -Wno-cast-qual +COPTS.literal.c+= -Wno-sign-conversion COPTS.tokenizer.c+= -Wno-cast-qual COPTS.tokenizern.c+= -Wno-cast-qual .endif Index: src/lib/libedit/editline.3 diff -u src/lib/libedit/editline.3:1.93 src/lib/libedit/editline.3:1.93.4.1 --- src/lib/libedit/editline.3:1.93 Mon Apr 10 15:02:40 2017 +++ src/lib/libedit/editline.3 Sun Jul 23 14:41:26 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: editline.3,v 1.93 2017/04/10 15:02:40 abhinav Exp $ +.\" $NetBSD: editline.3,v 1.93.4.1 2017/07/23 14:41:26 snj Exp $ .\" .\" Copyright (c) 1997-2014 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -26,7 +26,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd May 22, 2016 +.Dd June 27, 2017 .Dt EDITLINE 3 .Os .Sh NAME @@ -358,6 +358,8 @@ terminal without affecting the state of A subsequent second start/stop literal character ends this behavior. This is typically used to embed literal escape sequences that change the color/style of the terminal in the prompt. +Note that the literal escape character cannot be the last character in the +prompt, as the escape sequence is attached to the next character in the prompt. .Dv 0 unsets it. .It Dv EL_REFRESH @@ -667,6 +669,8 @@
CVS commit: src/libexec/ld.elf_so/arch/sparc64
Module Name:src Committed By: martin Date: Sun Jul 23 14:37:51 UTC 2017 Modified Files: src/libexec/ld.elf_so/arch/sparc64: mdreloc.c Log Message: Simplify and fix the offset calculation when doing a %pc relative branch from the PLT slot to the target. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/libexec/ld.elf_so/arch/sparc64/mdreloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/sparc64/mdreloc.c diff -u src/libexec/ld.elf_so/arch/sparc64/mdreloc.c:1.61 src/libexec/ld.elf_so/arch/sparc64/mdreloc.c:1.62 --- src/libexec/ld.elf_so/arch/sparc64/mdreloc.c:1.61 Mon Jun 19 11:57:02 2017 +++ src/libexec/ld.elf_so/arch/sparc64/mdreloc.c Sun Jul 23 14:37:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: mdreloc.c,v 1.61 2017/06/19 11:57:02 joerg Exp $ */ +/* $NetBSD: mdreloc.c,v 1.62 2017/07/23 14:37:51 martin Exp $ */ /*- * Copyright (c) 2000 Eduardo Horvath. @@ -32,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: mdreloc.c,v 1.61 2017/06/19 11:57:02 joerg Exp $"); +__RCSID("$NetBSD: mdreloc.c,v 1.62 2017/07/23 14:37:51 martin Exp $"); #endif /* not lint */ #include @@ -579,7 +579,7 @@ _rtld_relocate_plt_object(const Obj_Entr Elf_Word *where = (Elf_Word *)(obj->relocbase + rela->r_offset); const Elf_Sym *def; const Obj_Entry *defobj; - Elf_Addr value, offset; + Elf_Addr value, offset, offBAA; unsigned long info = rela->r_info; assert(ELF_R_TYPE(info) == R_TYPE(JMP_SLOT)); @@ -625,6 +625,7 @@ _rtld_relocate_plt_object(const Obj_Entr */ offset = ((Elf_Addr)where) - value; + offBAA = value - (((Elf_Addr)where) +4); /* ba,a at where[1] */ if (rela->r_addend) { Elf_Addr *ptr = (Elf_Addr *)where; /* @@ -634,7 +635,7 @@ _rtld_relocate_plt_object(const Obj_Entr */ ptr[0] += value - (Elf_Addr)obj->pltgot; - } else if (offset <= (1L<<20) && (Elf_SOff)offset >= -(1L<<20)) { + } else if (offBAA <= (1L<<20) && (Elf_SOff)offBAA >= -(1L<<20)) { /* * We're within 1MB -- we can use a direct branch insn. * @@ -650,7 +651,7 @@ _rtld_relocate_plt_object(const Obj_Entr * nop * */ - where[1] = BAA | ((offset >> 2) & 0x7); + where[1] = BAA | (offBAA >> 2); __asm volatile("iflush %0+4" : : "r" (where)); } else if (value < (1L<<32)) { /*
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Sun Jul 23 14:30:15 UTC 2017 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: 1452, 1462, 1463 To generate a diff of this commit: cvs rdiff -u -r1.1.2.292 -r1.1.2.293 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.292 src/doc/CHANGES-6.2:1.1.2.293 --- src/doc/CHANGES-6.2:1.1.2.292 Fri Jul 21 04:53:34 2017 +++ src/doc/CHANGES-6.2 Sun Jul 23 14:30:15 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.292 2017/07/21 04:53:34 snj Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.293 2017/07/23 14:30:15 snj Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -18007,3 +18007,28 @@ sys/dev/audio.c patch overflow. [nat, ticket #1457] +lib/lua/sqlite/sqlite.c1.9 + + Guard against double freeing of objects (explicit by the Lua + program, then later by the garbage collector). + This fixes PR bin/52218. + [mbalmer, ticket #1452] + +libexec/ld.elf_so/tls.c1.11 via patch + + Fix two bugs related to promotion of DSO TLS blocks into + the static thread allocation: + (1) Set the DTV vector up whenever an offset into the + static allocation is assigned, even if the block itself + is not initialized. This has been seen in libstdc++. + (2) Do not free a DTV block if it is part of the static + thread allocation. + [joerg, ticket #1462] + +sys/dev/pci/aceride.c1.37 +sys/dev/pci/pciide_acer_reg.h 1.13 + + Apply workaround from FreeBSD to fix read data corruption + observed on Fire V100 and mSATA-SSD with mSATA to IDE adapter. + [nakayama, ticket #1463] +
CVS commit: [netbsd-6] src/sys/dev/pci
Module Name:src Committed By: snj Date: Sun Jul 23 14:27:24 UTC 2017 Modified Files: src/sys/dev/pci [netbsd-6]: aceride.c pciide_acer_reg.h Log Message: Pull up following revision(s) (requested by nakayama in ticket #1463): sys/dev/pci/aceride.c: revision 1.37 sys/dev/pci/pciide_acer_reg.h: revision 1.13 Apply workaround from FreeBSD to fix read data corruption observed on Fire V100 and mSATA-SSD with mSATA to IDE adapter. The patch is from port-sparc64@. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.30.10.1 src/sys/dev/pci/aceride.c cvs rdiff -u -r1.12 -r1.12.18.1 src/sys/dev/pci/pciide_acer_reg.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/dev/pci/aceride.c diff -u src/sys/dev/pci/aceride.c:1.30 src/sys/dev/pci/aceride.c:1.30.10.1 --- src/sys/dev/pci/aceride.c:1.30 Mon Apr 4 20:37:56 2011 +++ src/sys/dev/pci/aceride.c Sun Jul 23 14:27:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: aceride.c,v 1.30 2011/04/04 20:37:56 dyoung Exp $ */ +/* $NetBSD: aceride.c,v 1.30.10.1 2017/07/23 14:27:24 snj Exp $ */ /* * Copyright (c) 1999, 2000, 2001 Manuel Bouyer. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aceride.c,v 1.30 2011/04/04 20:37:56 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aceride.c,v 1.30.10.1 2017/07/23 14:27:24 snj Exp $"); #include #include @@ -193,8 +193,13 @@ acer_chip_map(struct pciide_softc *sc, c interface = PCI_INTERFACE(pci_conf_read(sc->sc_pc, sc->sc_tag, PCI_CLASS_REG)); - /* From linux: enable "Cable Detection" */ if (rev >= 0xC2) { + /* From FreeBSD: use device interrupt as byte count end */ + pciide_pci_write(sc->sc_pc, sc->sc_tag, ACER_0x4A, + pciide_pci_read(sc->sc_pc, sc->sc_tag, ACER_0x4A) + | ACER_0x4A_BCEINT); + + /* From linux: enable "Cable Detection" */ pciide_pci_write(sc->sc_pc, sc->sc_tag, ACER_0x4B, pciide_pci_read(sc->sc_pc, sc->sc_tag, ACER_0x4B) | ACER_0x4B_CDETECT); Index: src/sys/dev/pci/pciide_acer_reg.h diff -u src/sys/dev/pci/pciide_acer_reg.h:1.12 src/sys/dev/pci/pciide_acer_reg.h:1.12.18.1 --- src/sys/dev/pci/pciide_acer_reg.h:1.12 Mon Oct 19 18:41:15 2009 +++ src/sys/dev/pci/pciide_acer_reg.h Sun Jul 23 14:27:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pciide_acer_reg.h,v 1.12 2009/10/19 18:41:15 bouyer Exp $ */ +/* $NetBSD: pciide_acer_reg.h,v 1.12.18.1 2017/07/23 14:27:24 snj Exp $ */ /* * Copyright (c) 1999 Manuel Bouyer. @@ -37,6 +37,8 @@ * bit 1 is 0 -> secondary has 80 pin cable */ #define ACER_0x4A_80PIN(chan) (0x1 << (chan)) +/* From FreeBSD, use device interrupt as byte count end */ +#define ACER_0x4A_BCEINT 0x20 /* From FreeBSD, for UDMA mode > 2 */ #define ACER_0x4B 0x4b
CVS commit: [netbsd-6] src/libexec/ld.elf_so
Module Name:src Committed By: snj Date: Sun Jul 23 14:25:46 UTC 2017 Modified Files: src/libexec/ld.elf_so [netbsd-6]: tls.c Log Message: Pull up following revision(s) (requested by joerg in ticket #1462): libexec/ld.elf_so/tls.c: revision 1.11 via patch Fix two bugs related to promotion of DSO TLS blocks into the static thread allocation: (1) Set the DTV vector up whenever an offset into the static allocation is assigned, even if the block itself is not initialized. This has been seen in libstdc++. (2) Do not free a DTV block if it is part of the static thread allocation. To generate a diff of this commit: cvs rdiff -u -r1.7.6.1 -r1.7.6.2 src/libexec/ld.elf_so/tls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/tls.c diff -u src/libexec/ld.elf_so/tls.c:1.7.6.1 src/libexec/ld.elf_so/tls.c:1.7.6.2 --- src/libexec/ld.elf_so/tls.c:1.7.6.1 Thu Nov 7 20:23:46 2013 +++ src/libexec/ld.elf_so/tls.c Sun Jul 23 14:25:46 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: tls.c,v 1.7.6.1 2013/11/07 20:23:46 snj Exp $ */ +/* $NetBSD: tls.c,v 1.7.6.2 2017/07/23 14:25:46 snj Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -29,7 +29,7 @@ */ #include -__RCSID("$NetBSD: tls.c,v 1.7.6.1 2013/11/07 20:23:46 snj Exp $"); +__RCSID("$NetBSD: tls.c,v 1.7.6.2 2017/07/23 14:25:46 snj Exp $"); #include #include @@ -138,13 +138,14 @@ _rtld_tls_allocate_locked(void) SET_DTV_GENERATION(tcb->tcb_dtv, _rtld_tls_dtv_generation); for (obj = _rtld_objlist; obj != NULL; obj = obj->next) { - if (obj->tlsinitsize && obj->tls_done) { + if (obj->tls_done) { #ifdef __HAVE_TLS_VARIANT_I q = p + obj->tlsoffset; #else q = p - obj->tlsoffset; #endif - memcpy(q, obj->tlsinit, obj->tlsinitsize); + if (obj->tlsinitsize) +memcpy(q, obj->tlsinit, obj->tlsinitsize); tcb->tcb_dtv[obj->tlsindex] = q; } } @@ -169,21 +170,25 @@ void _rtld_tls_free(struct tls_tcb *tcb) { size_t i, max_index; - uint8_t *p; + uint8_t *p, *p_end; sigset_t mask; _rtld_exclusive_enter(); - max_index = DTV_MAX_INDEX(tcb->tcb_dtv); - for (i = 1; i <= max_index; ++i) - xfree(tcb->tcb_dtv[i]); - xfree(tcb->tcb_dtv - 1); - #ifdef __HAVE_TLS_VARIANT_I p = (uint8_t *)tcb; #else p = (uint8_t *)tcb - _rtld_tls_static_space; #endif + p_end = p + _rtld_tls_static_space; + + max_index = DTV_MAX_INDEX(tcb->tcb_dtv); + for (i = 1; i <= max_index; ++i) { + if ((uint8_t *)tcb->tcb_dtv[i] < p || + (uint8_t *)tcb->tcb_dtv[i] >= p_end) + xfree(tcb->tcb_dtv[i]); + } + xfree(tcb->tcb_dtv - 1); xfree(p); _rtld_exclusive_exit();
CVS commit: [netbsd-6] src/lib/lua/sqlite
Module Name:src Committed By: snj Date: Sun Jul 23 14:19:28 UTC 2017 Modified Files: src/lib/lua/sqlite [netbsd-6]: sqlite.c Log Message: Pull up following revision(s) (requested by mbalmer in ticket #1452): lib/lua/sqlite/sqlite.c: revision 1.9 Guard against double freeing of objects (explicit by the Lua program, then later by the garbage collector). This fixes PR bin/52218. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.4.1 src/lib/lua/sqlite/sqlite.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/lua/sqlite/sqlite.c diff -u src/lib/lua/sqlite/sqlite.c:1.3 src/lib/lua/sqlite/sqlite.c:1.3.4.1 --- src/lib/lua/sqlite/sqlite.c:1.3 Sat Oct 15 12:58:20 2011 +++ src/lib/lua/sqlite/sqlite.c Sun Jul 23 14:19:27 2017 @@ -1,7 +1,7 @@ -/* $NetBSD: sqlite.c,v 1.3 2011/10/15 12:58:20 mbalmer Exp $ */ +/* $NetBSD: sqlite.c,v 1.3.4.1 2017/07/23 14:19:27 snj Exp $ */ /* - * Copyright (c) 2011 Marc Balmer+ * Copyright (c) 2011, 2013, 2016, 2017 Marc Balmer * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -117,7 +117,11 @@ db_close(lua_State *L) sqlite3 **db; db = luaL_checkudata(L, 1, SQLITE_DB_METATABLE); - lua_pushinteger(L, sqlite3_close(*db)); + if (*db) { + lua_pushinteger(L, sqlite3_close(*db)); + *db = NULL; + } else + lua_pushnil(L); return 1; } @@ -339,7 +343,10 @@ stmt_finalize(lua_State *L) sqlite3_stmt **stmt; stmt = luaL_checkudata(L, 1, SQLITE_STMT_METATABLE); - sqlite3_finalize(*stmt); + if (*stmt) { + sqlite3_finalize(*stmt); + *stmt = NULL; + } return 0; }
CVS commit: [jdolecek-ncq] src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Sun Jul 23 14:14:44 UTC 2017 Modified Files: src/sys/dev/ic [jdolecek-ncq]: ahcisata_core.c Log Message: rework the error handling and recovery, so that errors during the recovery are handled correctly, and the recovery more closely follows the spec this fixes e.g. NCQ error handling under QEMU, which doesn't implement READ LOG EXT - previous code actually made the call 'succeed', returning bogus (zero) slot/error/status finished xfers are still handled before entering recovery (with channel frozen) to avoid unnecessary retries To generate a diff of this commit: cvs rdiff -u -r1.57.6.19 -r1.57.6.20 src/sys/dev/ic/ahcisata_core.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/dev/ic/ahcisata_core.c diff -u src/sys/dev/ic/ahcisata_core.c:1.57.6.19 src/sys/dev/ic/ahcisata_core.c:1.57.6.20 --- src/sys/dev/ic/ahcisata_core.c:1.57.6.19 Fri Jul 21 18:36:47 2017 +++ src/sys/dev/ic/ahcisata_core.c Sun Jul 23 14:14:43 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ahcisata_core.c,v 1.57.6.19 2017/07/21 18:36:47 jdolecek Exp $ */ +/* $NetBSD: ahcisata_core.c,v 1.57.6.20 2017/07/23 14:14:43 jdolecek Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.57.6.19 2017/07/21 18:36:47 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.57.6.20 2017/07/23 14:14:43 jdolecek Exp $"); #include #include @@ -77,7 +77,8 @@ static void ahci_bio_kill_xfer(struct at static void ahci_channel_stop(struct ahci_softc *, struct ata_channel *, int); static void ahci_channel_start(struct ahci_softc *, struct ata_channel *, int, int); -static void ahci_channel_recover(struct ahci_softc *, struct ata_channel *); +static void ahci_channel_recover(struct ahci_softc *, struct ata_channel *, +int); static int ahci_dma_setup(struct ata_channel *, int, void *, size_t, int); #if NATAPIBUS > 0 @@ -563,6 +564,7 @@ ahci_intr_port(struct ahci_softc *sc, st struct ata_channel *chp = >ata_channel; struct ata_xfer *xfer; int slot; + bool recover = false; is = AHCI_READ(sc, AHCI_P_IS(chp->ch_channel)); AHCI_WRITE(sc, AHCI_P_IS(chp->ch_channel), is); @@ -573,34 +575,30 @@ ahci_intr_port(struct ahci_softc *sc, st AHCI_READ(sc, AHCI_P_TFD(chp->ch_channel))), DEBUG_INTR); - active = AHCI_READ(sc, AHCI_P_CI(chp->ch_channel)) - | AHCI_READ(sc, AHCI_P_SACT(chp->ch_channel)); - - /* Complete all successful commands first */ - for (slot=0; slot < sc->sc_ncmds; slot++) { - if ((achp->ahcic_cmds_active & (1 << slot)) == 0) - continue; - if ((active & (1 << slot)) == 0) { - xfer = ata_queue_hwslot_to_xfer(chp, slot); - xfer->c_intr(chp, xfer, 0); - } + if ((chp->ch_flags & ATACH_NCQ) == 0) { + /* Non-NCQ operation */ + active = AHCI_READ(sc, AHCI_P_CI(chp->ch_channel)); + slot = (AHCI_READ(sc, AHCI_P_CMD(chp->ch_channel)) + & AHCI_P_CMD_CCS_MASK) >> AHCI_P_CMD_CCS_SHIFT; + } else { + /* NCQ operation */ + active = AHCI_READ(sc, AHCI_P_SACT(chp->ch_channel)); + slot = -1; } /* Handle errors */ if (is & (AHCI_P_IX_TFES | AHCI_P_IX_HBFS | AHCI_P_IX_HBDS | AHCI_P_IX_IFS | AHCI_P_IX_OFS | AHCI_P_IX_UFS)) { + /* Fatal errors */ if (is & AHCI_P_IX_TFES) { tfd = AHCI_READ(sc, AHCI_P_TFD(chp->ch_channel)); - if ((AHCI_TFD_ST(tfd) & (WDCS_DRQ|WDCS_BSY)) == 0 && - !achp->ahcic_recovering) -goto recover; - aprint_error("%s port %d: active %x is 0x%x tfd 0x%x\n", AHCINAME(sc), chp->ch_channel, active, is, tfd); } else { - /* emulate a CRC error */ - tfd = (WDCE_CRC << AHCI_P_TFD_ERR_SHIFT) | WDCS_ERR; + /* mark an error, and set BSY */ + tfd = (WDCE_ABRT << AHCI_P_TFD_ERR_SHIFT) | + WDCS_ERR | WDCS_BSY; } if (is & AHCI_P_IX_IFS) { @@ -609,29 +607,52 @@ ahci_intr_port(struct ahci_softc *sc, st AHCI_READ(sc, AHCI_P_SERR(chp->ch_channel))); } - /* Request channel reset */ - ata_reset_channel(chp, 0); - return; + if (!achp->ahcic_recovering) + recover = true; } else if (is & (AHCI_P_IX_DHRS|AHCI_P_IX_SDBS)) { - /* D2H Register FIS or Set Device Bits */ tfd = AHCI_READ(sc, AHCI_P_TFD(chp->ch_channel)); + + /* D2H Register FIS or Set Device Bits */ if ((tfd & WDCS_ERR) != 0 && !achp->ahcic_recovering) { -recover: + recover = true; + aprint_error("%s port %d: transfer aborted 0x%x\n", AHCINAME(sc), chp->ch_channel, tfd); - /* - * Device indicated transfer aborted without any fatal - * error. Transfers can be reissued after resetting - * CMD.ST. Need to execute READ LOG EXT for NCQ - * commands. - */ - ahci_channel_stop(sc, chp, AT_POLL); - ahci_channel_start(sc, chp, AT_POLL, - (sc->sc_ahci_cap & AHCI_CAP_CLO) ? 1 : 0); - ahci_channel_recover(sc, chp); + } + } else { + tfd = 0; + } + + if (recover) +
CVS commit: [jdolecek-ncq] src/sys/dev/ata
Module Name:src Committed By: jdolecek Date: Sun Jul 23 13:50:43 UTC 2017 Modified Files: src/sys/dev/ata [jdolecek-ncq]: wd.c Log Message: for wd, only call disk_busy() on the first try, do not call it on retries, as unbusy is called just once when the xfer is finished also noticed in PR kern/43169 by Matthias Pfaller, but contrary to suggested fix done in way to keep the disk marked busy during the timeouts, as I think it's more correct To generate a diff of this commit: cvs rdiff -u -r1.428.2.28 -r1.428.2.29 src/sys/dev/ata/wd.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/dev/ata/wd.c diff -u src/sys/dev/ata/wd.c:1.428.2.28 src/sys/dev/ata/wd.c:1.428.2.29 --- src/sys/dev/ata/wd.c:1.428.2.28 Fri Jul 21 17:32:27 2017 +++ src/sys/dev/ata/wd.c Sun Jul 23 13:50:43 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.428.2.28 2017/07/21 17:32:27 jdolecek Exp $ */ +/* $NetBSD: wd.c,v 1.428.2.29 2017/07/23 13:50:43 jdolecek Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -54,7 +54,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.428.2.28 2017/07/21 17:32:27 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.428.2.29 2017/07/23 13:50:43 jdolecek Exp $"); #include "opt_ata.h" #include "opt_wd.h" @@ -766,7 +766,8 @@ wdstart1(struct wd_softc *wd, struct buf } /* Instrumentation. */ - disk_busy(>sc_dk); + if (xfer->c_retries == 0) + disk_busy(>sc_dk); switch (wd->atabus->ata_bio(wd->drvp, xfer)) { case ATACMD_TRY_AGAIN: panic("wdstart1: try again");
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: skrll Date: Sun Jul 23 13:35:15 UTC 2017 Modified Files: src/sys/arch/arm/arm: arm_machdep.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/arch/arm/arm/arm_machdep.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/arm/arm/arm_machdep.c diff -u src/sys/arch/arm/arm/arm_machdep.c:1.51 src/sys/arch/arm/arm/arm_machdep.c:1.52 --- src/sys/arch/arm/arm/arm_machdep.c:1.51 Tue Apr 4 11:46:12 2017 +++ src/sys/arch/arm/arm/arm_machdep.c Sun Jul 23 13:35:15 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: arm_machdep.c,v 1.51 2017/04/04 11:46:12 sevan Exp $ */ +/* $NetBSD: arm_machdep.c,v 1.52 2017/07/23 13:35:15 skrll Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -80,7 +80,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: arm_machdep.c,v 1.51 2017/04/04 11:46:12 sevan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arm_machdep.c,v 1.52 2017/07/23 13:35:15 skrll Exp $"); #include #include @@ -191,7 +191,7 @@ setregs(struct lwp *l, struct exec_packa tf->tf_spsr = PSR_USR32_MODE | (CPU_IS_ARMV7_P() ? PSR_E_BIT : 0); #else tf->tf_spsr = PSR_USR32_MODE; -#endif /* __ARMEB__ */ +#endif /* __ARMEB__ */ #ifdef THUMB_CODE if (pack->ep_entry & 1) @@ -217,7 +217,7 @@ setregs(struct lwp *l, struct exec_packa void startlwp(void *arg) { - ucontext_t *uc = (ucontext_t *)arg; + ucontext_t *uc = (ucontext_t *)arg; lwp_t *l = curlwp; int error __diagused;
CVS commit: src/sys
Module Name:src Committed By: para Date: Sun Jul 23 10:55:00 UTC 2017 Modified Files: src/sys/dev/pci: if_iwm.c src/sys/net: if_ethersubr.c src/sys/netinet: ip_mroute.c ip_output.c Log Message: kmem_intr_free kmem_intr_[z]alloced memory the underlying pools are the same but api-wise those should match To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pci/if_iwm.c cvs rdiff -u -r1.242 -r1.243 src/sys/net/if_ethersubr.c cvs rdiff -u -r1.146 -r1.147 src/sys/netinet/ip_mroute.c cvs rdiff -u -r1.282 -r1.283 src/sys/netinet/ip_output.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/dev/pci/if_iwm.c diff -u src/sys/dev/pci/if_iwm.c:1.74 src/sys/dev/pci/if_iwm.c:1.75 --- src/sys/dev/pci/if_iwm.c:1.74 Fri Jun 9 04:48:58 2017 +++ src/sys/dev/pci/if_iwm.c Sun Jul 23 10:55:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwm.c,v 1.74 2017/06/09 04:48:58 nonaka Exp $ */ +/* $NetBSD: if_iwm.c,v 1.75 2017/07/23 10:55:00 para Exp $ */ /* OpenBSD: if_iwm.c,v 1.148 2016/11/19 21:07:08 stsp Exp */ #define IEEE80211_NO_HT /* @@ -106,7 +106,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.74 2017/06/09 04:48:58 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.75 2017/07/23 10:55:00 para Exp $"); #include #include @@ -6321,7 +6321,7 @@ iwm_newstate_cb(struct work *wk, void *v int arg = iwmns->ns_arg; int s; - kmem_free(iwmns, sizeof(*iwmns)); + kmem_intr_free(iwmns, sizeof(*iwmns)); s = splnet(); Index: src/sys/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.242 src/sys/net/if_ethersubr.c:1.243 --- src/sys/net/if_ethersubr.c:1.242 Thu Apr 6 03:54:59 2017 +++ src/sys/net/if_ethersubr.c Sun Jul 23 10:55:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ethersubr.c,v 1.242 2017/04/06 03:54:59 ozaki-r Exp $ */ +/* $NetBSD: if_ethersubr.c,v 1.243 2017/07/23 10:55:00 para Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.242 2017/04/06 03:54:59 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.243 2017/07/23 10:55:00 para Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1013,7 +1013,7 @@ ether_ifdetach(struct ifnet *ifp) mutex_enter(ec->ec_lock); while ((enm = LIST_FIRST(>ec_multiaddrs)) != NULL) { LIST_REMOVE(enm, enm_list); - kmem_free(enm, sizeof(*enm)); + kmem_intr_free(enm, sizeof(*enm)); ec->ec_multicnt--; } mutex_exit(ec->ec_lock); @@ -1277,7 +1277,7 @@ ether_addmulti(const struct sockaddr *sa out: mutex_exit(ec->ec_lock); if (enm != NULL) - kmem_free(enm, sizeof(*enm)); + kmem_intr_free(enm, sizeof(*enm)); return error; } @@ -1319,7 +1319,7 @@ ether_delmulti(const struct sockaddr *sa ec->ec_multicnt--; mutex_exit(ec->ec_lock); - kmem_free(enm, sizeof(*enm)); + kmem_intr_free(enm, sizeof(*enm)); /* * Return ENETRESET to inform the driver that the list has changed * and its reception filter should be adjusted accordingly. Index: src/sys/netinet/ip_mroute.c diff -u src/sys/netinet/ip_mroute.c:1.146 src/sys/netinet/ip_mroute.c:1.147 --- src/sys/netinet/ip_mroute.c:1.146 Tue Jan 24 07:09:24 2017 +++ src/sys/netinet/ip_mroute.c Sun Jul 23 10:55:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_mroute.c,v 1.146 2017/01/24 07:09:24 ozaki-r Exp $ */ +/* $NetBSD: ip_mroute.c,v 1.147 2017/07/23 10:55:00 para Exp $ */ /* * Copyright (c) 1992, 1993 @@ -93,7 +93,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.146 2017/01/24 07:09:24 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.147 2017/07/23 10:55:00 para Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1586,7 +1586,7 @@ expire_upcalls(void *v) struct bw_meter *x = rt->mfc_bw_meter; rt->mfc_bw_meter = x->bm_mfc_next; -kmem_free(x, sizeof(*x)); +kmem_intr_free(x, sizeof(*x)); } ++mrtstat.mrts_cache_cleanups; @@ -2530,7 +2530,7 @@ free_bw_list(struct bw_meter *list) list = list->bm_mfc_next; unschedule_bw_meter(x); - kmem_free(x, sizeof(*x)); + kmem_intr_free(x, sizeof(*x)); } } @@ -2589,7 +2589,7 @@ del_bw_upcall(struct bw_upcall *req) unschedule_bw_meter(x); splx(s); /* Free the bw_meter entry */ - kmem_free(x, sizeof(*x)); + kmem_intr_free(x, sizeof(*x)); return 0; } else { splx(s); Index: src/sys/netinet/ip_output.c diff -u src/sys/netinet/ip_output.c:1.282 src/sys/netinet/ip_output.c:1.283 --- src/sys/netinet/ip_output.c:1.282 Tue Jul 4 10:25:45 2017 +++ src/sys/netinet/ip_output.c Sun Jul 23 10:55:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_output.c,v 1.282 2017/07/04 10:25:45 roy Exp $ */ +/* $NetBSD: ip_output.c,v 1.283 2017/07/23 10:55:00 para Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD:
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sun Jul 23 10:16:09 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: files.sunxi sunxi_gpio.c sunxi_gpio.h sunxi_platform.c Added Files: src/sys/arch/arm/sunxi: sun50i_a64_gpio.c Log Message: Add sun50i gpio and platform support. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sun50i_a64_gpio.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/sunxi/sunxi_gpio.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sunxi/sunxi_gpio.h cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sunxi/sunxi_platform.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/arm/sunxi/files.sunxi diff -u src/sys/arch/arm/sunxi/files.sunxi:1.12 src/sys/arch/arm/sunxi/files.sunxi:1.13 --- src/sys/arch/arm/sunxi/files.sunxi:1.12 Mon Jul 17 23:26:17 2017 +++ src/sys/arch/arm/sunxi/files.sunxi Sun Jul 23 10:16:08 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.sunxi,v 1.12 2017/07/17 23:26:17 jmcneill Exp $ +# $NetBSD: files.sunxi,v 1.13 2017/07/23 10:16:08 jmcneill Exp $ # # Configuration info for Allwinner sunxi family SoCs # @@ -59,6 +59,7 @@ file arch/arm/sunxi/sunxi_gpio.c sunxi_ file arch/arm/sunxi/sun6i_a31_gpio.c sunxi_gpio & soc_sun6i_a31 file arch/arm/sunxi/sun8i_a83t_gpio.c sunxi_gpio & soc_sun8i_a83t file arch/arm/sunxi/sun8i_h3_gpio.c sunxi_gpio & soc_sun8i_h3 +file arch/arm/sunxi/sun50i_a64_gpio.c sunxi_gpio & soc_sun50i_a64 # UART attach com at fdt with sunxi_com @@ -109,3 +110,5 @@ defflag opt_soc.h SOC_SUN8I_A83T: SOC_ defflag opt_soc.h SOC_SUN8I_H3: SOC_SUN8I defflag opt_soc.h SOC_SUN6I: SOC_SUNXI defflag opt_soc.h SOC_SUN6I_A31: SOC_SUN6I +defflag opt_soc.h SOC_SUN50I: SOC_SUNXI +defflag opt_soc.h SOC_SUN50I_A64: SOC_SUN50I Index: src/sys/arch/arm/sunxi/sunxi_gpio.c diff -u src/sys/arch/arm/sunxi/sunxi_gpio.c:1.8 src/sys/arch/arm/sunxi/sunxi_gpio.c:1.9 --- src/sys/arch/arm/sunxi/sunxi_gpio.c:1.8 Sat Jul 8 11:12:24 2017 +++ src/sys/arch/arm/sunxi/sunxi_gpio.c Sun Jul 23 10:16:08 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_gpio.c,v 1.8 2017/07/08 11:12:24 jmcneill Exp $ */ +/* $NetBSD: sunxi_gpio.c,v 1.9 2017/07/23 10:16:08 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -29,7 +29,7 @@ #include "opt_soc.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_gpio.c,v 1.8 2017/07/08 11:12:24 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_gpio.c,v 1.9 2017/07/23 10:16:08 jmcneill Exp $"); #include #include @@ -70,6 +70,10 @@ static const struct of_compat_data compa { "allwinner,sun8i-h3-pinctrl", (uintptr_t)_h3_padconf }, { "allwinner,sun8i-h3-r-pinctrl", (uintptr_t)_h3_r_padconf }, #endif +#ifdef SOC_SUN50I_A64 + { "allwinner,sun50i-a64-pinctrl", (uintptr_t)_a64_padconf }, + { "allwinner,sun50i-a64-r-pinctrl", (uintptr_t)_a64_r_padconf }, +#endif { NULL } }; Index: src/sys/arch/arm/sunxi/sunxi_gpio.h diff -u src/sys/arch/arm/sunxi/sunxi_gpio.h:1.3 src/sys/arch/arm/sunxi/sunxi_gpio.h:1.4 --- src/sys/arch/arm/sunxi/sunxi_gpio.h:1.3 Thu Jul 6 22:10:14 2017 +++ src/sys/arch/arm/sunxi/sunxi_gpio.h Sun Jul 23 10:16:08 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_gpio.h,v 1.3 2017/07/06 22:10:14 jmcneill Exp $ */ +/* $NetBSD: sunxi_gpio.h,v 1.4 2017/07/23 10:16:08 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -65,4 +65,9 @@ extern const struct sunxi_gpio_padconf s extern const struct sunxi_gpio_padconf sun8i_h3_r_padconf; #endif +#ifdef SOC_SUN50I_A64 +extern const struct sunxi_gpio_padconf sun50i_a64_padconf; +extern const struct sunxi_gpio_padconf sun50i_a64_r_padconf; +#endif + #endif /* _ARM_SUNXI_GPIO_H */ Index: src/sys/arch/arm/sunxi/sunxi_platform.c diff -u src/sys/arch/arm/sunxi/sunxi_platform.c:1.5 src/sys/arch/arm/sunxi/sunxi_platform.c:1.6 --- src/sys/arch/arm/sunxi/sunxi_platform.c:1.5 Thu Jul 13 09:04:28 2017 +++ src/sys/arch/arm/sunxi/sunxi_platform.c Sun Jul 23 10:16:08 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_platform.c,v 1.5 2017/07/13 09:04:28 jmcneill Exp $ */ +/* $NetBSD: sunxi_platform.c,v 1.6 2017/07/23 10:16:08 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -31,7 +31,7 @@ #include "opt_fdt_arm.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.5 2017/07/13 09:04:28 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.6 2017/07/23 10:16:08 jmcneill Exp $"); #include #include @@ -142,6 +142,28 @@ sun6i_platform_reset(void) bus_space_write_4(bst, bsh, SUN6I_WDT_MODE, SUN6I_WDT_MODE_EN); } +static void +sun50i_platform_bootstrap(void) +{ + /* XXX + * This should use psci_fdt_bootstrap, but it hangs + * (at least in aarch32 mode) + */ +} + +static const struct arm_platform sun6i_platform = { + .devmap = sunxi_platform_devmap, +
CVS commit: src/lib/libc/compiler_rt
Module Name:src Committed By: martin Date: Sun Jul 23 09:50:54 UTC 2017 Modified Files: src/lib/libc/compiler_rt: Makefile.inc Log Message: Do not use IEEE 754 specific functions for VAX To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/lib/libc/compiler_rt/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/compiler_rt/Makefile.inc diff -u src/lib/libc/compiler_rt/Makefile.inc:1.34 src/lib/libc/compiler_rt/Makefile.inc:1.35 --- src/lib/libc/compiler_rt/Makefile.inc:1.34 Fri Jun 16 21:22:14 2017 +++ src/lib/libc/compiler_rt/Makefile.inc Sun Jul 23 09:50:54 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.34 2017/06/16 21:22:14 joerg Exp $ +# $NetBSD: Makefile.inc,v 1.35 2017/07/23 09:50:54 martin Exp $ COMPILER_RT_SRCDIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist @@ -31,6 +31,52 @@ GENERIC_SRCS+= \ gcc_personality_v0.c .endif +GENERIC_SRCS+= \ + absvsi2.c \ + absvti2.c \ + addvsi3.c \ + addvti3.c \ + ashlti3.c \ + ashrti3.c \ + clzti2.c \ + cmpti2.c \ + ctzti2.c \ + divti3.c \ + ffsti2.c \ + fixsfdi.c \ + fixdfdi.c \ + fixunsdfdi.c \ + fixunsdfsi.c \ + fixunssfdi.c \ + fixunssfsi.c \ + fixunsxfdi.c \ + fixunsxfsi.c \ + int_util.c \ + lshrti3.c \ + modti3.c \ + muldc3.c \ + mulosi4.c \ + muloti4.c \ + multi3.c \ + mulvsi3.c \ + mulvti3.c \ + negti2.c \ + negvsi2.c \ + negvti2.c \ + paritysi2.c \ + parityti2.c \ + popcountsi2.c \ + popcountti2.c \ + subvsi3.c \ + subvti3.c \ + ucmpti2.c \ + udivmodti4.c \ + udivti3.c \ + umodti3.c + +# only used for machines using IEEE 754 floating point formats +.if ${MACHINE_ARCH} != "vax" + .if 0 # Conflicts with soft-float GENERIC_SRCS+= \ @@ -64,60 +110,21 @@ GENERIC_SRCS+= \ trunctfsf2.c .endif -GENERIC_SRCS+= \ - absvsi2.c \ - absvti2.c \ - addvsi3.c \ - addvti3.c \ - ashlti3.c \ - ashrti3.c \ - clzti2.c \ - cmpti2.c \ - ctzti2.c \ - divti3.c \ - ffsti2.c \ - fixsfdi.c \ - fixdfdi.c \ - fixunsdfdi.c \ - fixunsdfsi.c \ - fixunssfdi.c \ - fixunssfsi.c \ - fixunsxfdi.c \ - fixunsxfsi.c \ +GENERIC_SRCS+= \ floatdidf.c \ floatdisf.c \ floatdixf.c \ floatundidf.c \ floatundisf.c \ floatundixf.c \ - int_util.c \ - lshrti3.c \ - modti3.c \ - muldc3.c \ - mulosi4.c \ - muloti4.c \ - multi3.c \ - mulvsi3.c \ - mulvti3.c \ negdf2.c \ negsf2.c \ - negti2.c \ - negvsi2.c \ - negvti2.c \ - paritysi2.c \ - parityti2.c \ - popcountsi2.c \ - popcountti2.c \ powidf2.c \ powisf2.c \ powitf2.c \ - powixf2.c \ - subvsi3.c \ - subvti3.c \ - ucmpti2.c \ - udivmodti4.c \ - udivti3.c \ - umodti3.c + powixf2.c + +.endif # IEEE 754 only machines .if ${MACHINE_ARCH} != "m68k" GENERIC_SRCS+= \
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: snj Date: Sun Jul 23 06:29:48 UTC 2017 Modified Files: src/doc [netbsd-7]: CHANGES-7.2 Log Message: 1418, 1422, 1423, 1438-1440, 1447, 1452, 1456 To generate a diff of this commit: cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/doc/CHANGES-7.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.2 diff -u src/doc/CHANGES-7.2:1.1.2.30 src/doc/CHANGES-7.2:1.1.2.31 --- src/doc/CHANGES-7.2:1.1.2.30 Thu Jul 20 01:45:08 2017 +++ src/doc/CHANGES-7.2 Sun Jul 23 06:29:48 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.2,v 1.1.2.30 2017/07/20 01:45:08 snj Exp $ +# $NetBSD: CHANGES-7.2,v 1.1.2.31 2017/07/23 06:29:48 snj Exp $ A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.2 release: @@ -2513,3 +2513,63 @@ sys/arch/i386/i386/trap.c 1.288 via pa the kernel. [maxv, ticket #1441] +sys/modules/lua/lua.c1.21 + + Avoid possible null pointer dereferencing. + Fixes PR kern/52225. + [mbalmer, ticket #1418] + +sys/modules/lua/lua.c1.22 via patch + + Only load a module if it is not already loaded in a state + (much like userland Lua handles require). PR kern/52226. + [mbalmer, ticket #1422] + +sys/modules/lua/lua.c1.23 + + always put the module on the stack + [mbalmer, ticket #1423] + +sys/dev/hpc/hpckbd.c1.31 + + Restore wscons keymaps feature on hpcarm + [manu, ticket #1438] + +lib/libc/net/Makefile.inc 1.87 + + Include IPv6 global variable in USE_INET6=no libc. + This ensures a binary built with USE_INET6=yes libc can + still link at runtime with a USE_INET6=no libc. + [manu, ticket #1439] + +distrib/utils/libhack/Makefile 1.25 +distrib/utils/libhack/Makefile.inc 1.27 +lib/libc/gen/getcap.c1.57 + + Make shared -DSMALL libc buildable without breaking libhack + [manu, ticket #1440] + +sys/dev/sdmmc/ld_sdmmc.c 1.29 + + The config_* APIs are not MPSAFE, so make sure the deferred + attach thread holds KERNEL_LOCK. + [jmcneill, ticket #1447] + +sys/dev/usb/uhci.c1.276 + + Only call uhci_free_stds if there are TDs to free. + + In uhci_alloc_std_chain ensure we fill the TD array correctly + and note the number of allocated TDs so that uhci_free_stds + will do the right thing + [skrll, ticket #1456] + +sys/arch/arm/arm/cpufunc_asm_arm11x6.S 1.8 +sys/arch/arm/arm32/genassym.cf 1.75 + + In idcache_wbinv_range if the range size is bigger than the + dcache size then call idcache_wbinv_all + + Avoids a problem with large ranges as seen in port-evbarm/52169. + [skrll, ticket #1452] +
CVS commit: src/sys/external/bsd/ipf/netinet
Module Name:src Committed By: christos Date: Sun Jul 23 06:19:00 UTC 2017 Modified Files: src/sys/external/bsd/ipf/netinet: ip_fil_netbsd.c Log Message: use the scoping functions (JINMEI, Tatuya) To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.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/external/bsd/ipf/netinet/ip_fil_netbsd.c diff -u src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.25 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.26 --- src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.25 Sun Jul 23 02:12:02 2017 +++ src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c Sun Jul 23 02:19:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_fil_netbsd.c,v 1.25 2017/07/23 06:12:02 christos Exp $ */ +/* $NetBSD: ip_fil_netbsd.c,v 1.26 2017/07/23 06:19:00 christos Exp $ */ /* * Copyright (C) 2012 by Darren Reed. @@ -8,7 +8,7 @@ #if !defined(lint) #if defined(__NetBSD__) #include -__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.25 2017/07/23 06:12:02 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.26 2017/07/23 06:19:00 christos Exp $"); #else static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed"; static const char rcsid[] = "@(#)Id: ip_fil_netbsd.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp"; @@ -79,6 +79,9 @@ static const char rcsid[] = "@(#)Id: ip_ # if (__NetBSD_Version__ >= 10600) # include # endif +# if __NetBSD_Version__ >= 499001100 +# include +# endif #endif #include "netinet/ip_fil.h" #include "netinet/ip_nat.h" @@ -1420,9 +1423,12 @@ ipf_fastroute6(struct mbuf *m0, struct m sockaddr_in6_init(, >fd_ip6.in6, 0, 0, 0); else sockaddr_in6_init(, >fin_fi.fi_dst.in6, 0, 0, 0); - /* KAME */ - if (IN6_IS_ADDR_LINKLOCAL(_addr)) - u.dst6.sin6_addr.s6_addr16[1] = htons(ifp->if_index); + if ((error = in6_setscope(_addr, ifp, + _scope_id)) != 0) + return error; + if ((error = sa6_embedscope(, 0)) != 0) + return error; + dst = rtcache_setdst(ro, dst);
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: snj Date: Sun Jul 23 06:15:49 UTC 2017 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.1 Log Message: 1418 To generate a diff of this commit: cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/doc/CHANGES-7.1.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.1.1 diff -u src/doc/CHANGES-7.1.1:1.1.2.17 src/doc/CHANGES-7.1.1:1.1.2.18 --- src/doc/CHANGES-7.1.1:1.1.2.17 Thu Jul 20 01:43:30 2017 +++ src/doc/CHANGES-7.1.1 Sun Jul 23 06:15:49 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1.1,v 1.1.2.17 2017/07/20 01:43:30 snj Exp $ +# $NetBSD: CHANGES-7.1.1,v 1.1.2.18 2017/07/23 06:15:49 snj Exp $ A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.1.1 release: @@ -1718,3 +1718,9 @@ sys/arch/i386/i386/trap.c 1.288 via pa the kernel. [maxv, ticket #1441] +sys/modules/lua/lua.c1.21 + + Avoid possible null pointer dereferencing. + Fixes PR kern/52225. + [mbalmer, ticket #1418] +
CVS commit: [netbsd-7] src/sys/arch/arm
Module Name:src Committed By: snj Date: Sun Jul 23 06:14:04 UTC 2017 Modified Files: src/sys/arch/arm/arm [netbsd-7]: cpufunc_asm_arm11x6.S src/sys/arch/arm/arm32 [netbsd-7]: genassym.cf Log Message: Pull up following revision(s) (requested by skrll in ticket #1452): sys/arch/arm/arm32/genassym.cf: revision 1.75 sys/arch/arm/arm/cpufunc_asm_arm11x6.S: revision 1.8 In idcache_wbinv_range if the range size is bigger than the dcache size then call idcache_wbinv_all Avoids a problem with large ranges as seen in port-evbarm/52169: setting dtrace module to load cause Pi to hang on boot To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.2.1 src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S cvs rdiff -u -r1.69.2.1 -r1.69.2.2 src/sys/arch/arm/arm32/genassym.cf 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/arm/cpufunc_asm_arm11x6.S diff -u src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S:1.7 src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S:1.7.2.1 --- src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S:1.7 Wed Jul 30 13:31:17 2014 +++ src/sys/arch/arm/arm/cpufunc_asm_arm11x6.S Sun Jul 23 06:14:03 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc_asm_arm11x6.S,v 1.7 2014/07/30 13:31:17 skrll Exp $ */ +/* $NetBSD: cpufunc_asm_arm11x6.S,v 1.7.2.1 2017/07/23 06:14:03 snj Exp $ */ /* * Copyright (c) 2007 Microsoft @@ -63,7 +63,7 @@ #include #include -RCSID("$NetBSD: cpufunc_asm_arm11x6.S,v 1.7 2014/07/30 13:31:17 skrll Exp $") +RCSID("$NetBSD: cpufunc_asm_arm11x6.S,v 1.7.2.1 2017/07/23 06:14:03 snj Exp $") #if 0 #define Invalidate_I_cache(Rtmp1, Rtmp2) \ @@ -164,6 +164,11 @@ ENTRY_NP(arm11x6_icache_sync_range) END(arm11x6_icache_sync_range) ENTRY_NP(arm11x6_idcache_wbinv_range) + ldr r2, .Larm_pcache + ldr r2, [r2, #DCACHE_SIZE] + cmp r1, r2 + bge arm11x6_idcache_wbinv_all + add r1, r1, r0 sub r1, r1, #1 /* Erratum ARM1136 371025, workaround #2 */ @@ -212,3 +217,6 @@ ENTRY_NP(arm11x6_sleep) bne 1b RET END(arm11x6_sleep) + +.Larm_pcache: + .word arm_pcache Index: src/sys/arch/arm/arm32/genassym.cf diff -u src/sys/arch/arm/arm32/genassym.cf:1.69.2.1 src/sys/arch/arm/arm32/genassym.cf:1.69.2.2 --- src/sys/arch/arm/arm32/genassym.cf:1.69.2.1 Fri Mar 27 11:27:39 2015 +++ src/sys/arch/arm/arm32/genassym.cf Sun Jul 23 06:14:04 2017 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.69.2.1 2015/03/27 11:27:39 martin Exp $ +# $NetBSD: genassym.cf,v 1.69.2.2 2017/07/23 06:14:04 snj Exp $ # Copyright (c) 1982, 1990 The Regents of the University of California. # All rights reserved. @@ -248,3 +248,6 @@ define M_DATAoffsetof(struct mbuf, m define M_NEXToffsetof(struct mbuf, m_next) define IP_SRCoffsetof(struct ip, ip_src) define IP_DSToffsetof(struct ip, ip_dst) + +# Cache information +define DCACHE_SIZE offsetof(struct arm_cache_info, dcache_size)
CVS commit: src/sys/external/bsd/ipf/netinet
Module Name:src Committed By: christos Date: Sun Jul 23 06:12:02 UTC 2017 Modified Files: src/sys/external/bsd/ipf/netinet: ip_fil_netbsd.c Log Message: >From Edgar Fuss: ipf's return-icmp doesn't work when the packet matched by the rule is directed at a link local address. The problem is that ipf_send_icmp_err() calls ipf_ifpaddr() to find an address of the interface in question, but that routine discards link local addresses. I guess the best fix is to simply use the destination address instead if it is link local, i.e. treat the rule as if return-icmp-as-dest was given in this case. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.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/external/bsd/ipf/netinet/ip_fil_netbsd.c diff -u src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.24 src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.25 --- src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c:1.24 Thu Jul 20 14:12:51 2017 +++ src/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c Sun Jul 23 02:12:02 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_fil_netbsd.c,v 1.24 2017/07/20 18:12:51 christos Exp $ */ +/* $NetBSD: ip_fil_netbsd.c,v 1.25 2017/07/23 06:12:02 christos Exp $ */ /* * Copyright (C) 2012 by Darren Reed. @@ -8,7 +8,7 @@ #if !defined(lint) #if defined(__NetBSD__) #include -__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.24 2017/07/20 18:12:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.25 2017/07/23 06:12:02 christos Exp $"); #else static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed"; static const char rcsid[] = "@(#)Id: ip_fil_netbsd.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp"; @@ -987,7 +987,7 @@ ipf_send_icmp_err(int type, fr_info_t *f } xtra = MIN(fin->fin_plen, avail - iclen - max_linkhdr); xtra = MIN(xtra, IPV6_MMTU - iclen); - if (dst == 0) { + if (dst == 0 && !IN6_IS_ADDR_LINKLOCAL(>fin_dst6.in6)) { if (ipf_ifpaddr(, 6, FRI_NORMAL, ifp, , NULL) == -1) { FREE_MB_T(m);
CVS commit: [netbsd-7] src/sys/dev/usb
Module Name:src Committed By: snj Date: Sun Jul 23 06:11:47 UTC 2017 Modified Files: src/sys/dev/usb [netbsd-7]: uhci.c Log Message: Pull up following revision(s) (requested by skrll in ticket #1456): sys/dev/usb/uhci.c: revision 1.276 Only call uhci_free_stds if there are TDs to free. In uhci_alloc_std_chain ensure we fill the TD array correctly and note the number of allocated TDs so that uhci_free_stds will do the right thing Fixes a problem seen by anon To generate a diff of this commit: cvs rdiff -u -r1.264.2.1 -r1.264.2.2 src/sys/dev/usb/uhci.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/dev/usb/uhci.c diff -u src/sys/dev/usb/uhci.c:1.264.2.1 src/sys/dev/usb/uhci.c:1.264.2.2 --- src/sys/dev/usb/uhci.c:1.264.2.1 Wed Apr 5 19:54:20 2017 +++ src/sys/dev/usb/uhci.c Sun Jul 23 06:11:47 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.264.2.1 2017/04/05 19:54:20 snj Exp $ */ +/* $NetBSD: uhci.c,v 1.264.2.2 2017/07/23 06:11:47 snj Exp $ */ /* * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.2.1 2017/04/05 19:54:20 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.2.2 2017/07/23 06:11:47 snj Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1995,7 +1995,6 @@ uhci_alloc_std_chain(uhci_softc_t *sc, s uxfer->ux_stds = NULL; uxfer->ux_nstd = ntd; - p = NULL; if (ntd == 0) { *sp = NULL; DPRINTF("ntd=0", 0, 0, 0, 0); @@ -2004,11 +2003,13 @@ uhci_alloc_std_chain(uhci_softc_t *sc, s uxfer->ux_stds = kmem_alloc(sizeof(uhci_soft_td_t *) * ntd, KM_SLEEP); - ntd--; - for (int i = ntd; i >= 0; i--) { + for (int i = 0; i < ntd; i++) { p = uhci_alloc_std(sc); if (p == NULL) { - uhci_free_stds(sc, uxfer); + if (i != 0) { +uxfer->ux_nstd = i; +uhci_free_stds(sc, uxfer); + } kmem_free(uxfer->ux_stds, sizeof(uhci_soft_td_t *) * ntd); return ENOMEM; @@ -2212,9 +2213,10 @@ uhci_device_bulk_fini(struct usbd_xfer * KASSERT(ux->ux_type == UX_BULK); - uhci_free_stds(sc, ux); - if (ux->ux_nstd) + if (ux->ux_nstd) { + uhci_free_stds(sc, ux); kmem_free(ux->ux_stds, sizeof(uhci_soft_td_t *) * ux->ux_nstd); + } } usbd_status @@ -2482,9 +2484,10 @@ uhci_device_ctrl_fini(struct usbd_xfer * KASSERT(ux->ux_type == UX_CTRL); - uhci_free_stds(sc, ux); - if (ux->ux_nstd) + if (ux->ux_nstd) { + uhci_free_stds(sc, ux); kmem_free(ux->ux_stds, sizeof(uhci_soft_td_t *) * ux->ux_nstd); + } } usbd_status @@ -2687,9 +2690,10 @@ uhci_device_intr_fini(struct usbd_xfer * KASSERT(ux->ux_type == UX_INTR); - uhci_free_stds(sc, ux); - if (ux->ux_nstd) + if (ux->ux_nstd) { + uhci_free_stds(sc, ux); kmem_free(ux->ux_stds, sizeof(uhci_soft_td_t *) * ux->ux_nstd); + } } usbd_status
CVS commit: [netbsd-7] src/sys/dev/sdmmc
Module Name:src Committed By: snj Date: Sun Jul 23 06:09:53 UTC 2017 Modified Files: src/sys/dev/sdmmc [netbsd-7]: ld_sdmmc.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1447): sys/dev/sdmmc/ld_sdmmc.c: revision 1.29 The config_* APIs are not MPSAFE, so make sure the deferred attach thread holds KERNEL_LOCK. To generate a diff of this commit: cvs rdiff -u -r1.12.4.1 -r1.12.4.2 src/sys/dev/sdmmc/ld_sdmmc.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/dev/sdmmc/ld_sdmmc.c diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.12.4.1 src/sys/dev/sdmmc/ld_sdmmc.c:1.12.4.2 --- src/sys/dev/sdmmc/ld_sdmmc.c:1.12.4.1 Tue May 26 01:29:53 2015 +++ src/sys/dev/sdmmc/ld_sdmmc.c Sun Jul 23 06:09:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ld_sdmmc.c,v 1.12.4.1 2015/05/26 01:29:53 msaitoh Exp $ */ +/* $NetBSD: ld_sdmmc.c,v 1.12.4.2 2017/07/23 06:09:53 snj Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.12.4.1 2015/05/26 01:29:53 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.12.4.2 2017/07/23 06:09:53 snj Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -136,7 +136,7 @@ ld_sdmmc_attach(device_t parent, device_ * when wedge is supported. */ config_pending_incr(self); - if (kthread_create(PRI_NONE, KTHREAD_MPSAFE, NULL, + if (kthread_create(PRI_NONE, 0, NULL, ld_sdmmc_doattach, sc, , "%sattach", device_xname(self))) { aprint_error_dev(self, "couldn't create thread\n"); }
CVS commit: [netbsd-7] src
Module Name:src Committed By: snj Date: Sun Jul 23 06:08:17 UTC 2017 Modified Files: src/distrib/utils/libhack [netbsd-7]: Makefile Makefile.inc src/lib/libc/gen [netbsd-7]: getcap.c Log Message: Pull up following revision(s) (requested by manu in ticket #1440): distrib/utils/libhack/Makefile: revision 1.25 distrib/utils/libhack/Makefile.inc: revision 1.27 lib/libc/gen/getcap.c: revision 1.57 Make shared -DSMALL libc buildable without breaking libhack We used -DSMALL to exclude code from libc in order to build libhack. Introduce -DLIBHACK to do this without so that -DSMALL does not remove code necessary for building a shared libc To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.24.4.1 src/distrib/utils/libhack/Makefile cvs rdiff -u -r1.25 -r1.25.4.1 src/distrib/utils/libhack/Makefile.inc cvs rdiff -u -r1.53 -r1.53.2.1 src/lib/libc/gen/getcap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/libhack/Makefile diff -u src/distrib/utils/libhack/Makefile:1.24 src/distrib/utils/libhack/Makefile:1.24.4.1 --- src/distrib/utils/libhack/Makefile:1.24 Tue Aug 27 09:53:33 2013 +++ src/distrib/utils/libhack/Makefile Sun Jul 23 06:08:16 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.24 2013/08/27 09:53:33 christos Exp $ +# $NetBSD: Makefile,v 1.24.4.1 2017/07/23 06:08:16 snj Exp $ # # Stubs to kill off some things from libc: # This save space on a boot system. @@ -10,6 +10,7 @@ HACKSRC?=${.CURDIR} HACKOBJ?=${.OBJDIR} CPPFLAGS+= -DSMALL +CPPFLAGS+= -DLIBHACK CPPFLAGS.runetable.c+= -I${HACKSRC}/../../../lib/libc/citrus \ -DALL_80_TO_FF_SW1 CPPFLAGS.syslog.c+= -I${HACKSRC}/../../../lib/libc/include Index: src/distrib/utils/libhack/Makefile.inc diff -u src/distrib/utils/libhack/Makefile.inc:1.25 src/distrib/utils/libhack/Makefile.inc:1.25.4.1 --- src/distrib/utils/libhack/Makefile.inc:1.25 Tue Aug 27 09:53:33 2013 +++ src/distrib/utils/libhack/Makefile.inc Sun Jul 23 06:08:16 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.25 2013/08/27 09:53:33 christos Exp $ +# $NetBSD: Makefile.inc,v 1.25.4.1 2017/07/23 06:08:16 snj Exp $ # # Include this fragment to build libhack.o # It is .o and not .a to make sure these are the @@ -17,6 +17,7 @@ # CPPFLAGS+= -DSMALL +CPPFLAGS+= -DLIBHACK HACKOBJS+= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o \ localeconv.o multibyte.o perror.o runetable.o setlocale.o \ strerror.o strsignal.o syslog.o utmp.o yplib.o Index: src/lib/libc/gen/getcap.c diff -u src/lib/libc/gen/getcap.c:1.53 src/lib/libc/gen/getcap.c:1.53.2.1 --- src/lib/libc/gen/getcap.c:1.53 Thu Jun 26 20:14:32 2014 +++ src/lib/libc/gen/getcap.c Sun Jul 23 06:08:17 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: getcap.c,v 1.53 2014/06/26 20:14:32 christos Exp $ */ +/* $NetBSD: getcap.c,v 1.53.2.1 2017/07/23 06:08:17 snj Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -41,11 +41,11 @@ #if 0 static char sccsid[] = "@(#)getcap.c 8.3 (Berkeley) 3/25/94"; #else -__RCSID("$NetBSD: getcap.c,v 1.53 2014/06/26 20:14:32 christos Exp $"); +__RCSID("$NetBSD: getcap.c,v 1.53.2.1 2017/07/23 06:08:17 snj Exp $"); #endif #endif /* LIBC_SCCS and not lint */ -#ifndef SMALL +#ifndef LIBHACK #include "namespace.h" #endif #include @@ -65,7 +65,7 @@ __RCSID("$NetBSD: getcap.c,v 1.53 2014/0 #include #include -#if defined(__weak_alias) && !defined(SMALL) +#if defined(__weak_alias) && !defined(LIBHACK) __weak_alias(cgetcap,_cgetcap) __weak_alias(cgetclose,_cgetclose) __weak_alias(cgetent,_cgetent)
CVS commit: [netbsd-7] src/lib/libc/net
Module Name:src Committed By: snj Date: Sun Jul 23 06:06:52 UTC 2017 Modified Files: src/lib/libc/net [netbsd-7]: Makefile.inc Log Message: Pull up following revision(s) (requested by manu in ticket #1439): lib/libc/net/Makefile.inc: revision 1.87 Include IPv6 global variable in USE_INET6=no libc This ensures a binary built with USE_INET6=yes libc can still link at runtime with a USE_INET6=no libc. Of course IPv6 functionnality is not available, but dynamic linking is not killed by missing symbols such as in6addr_any. To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.85.4.1 src/lib/libc/net/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/net/Makefile.inc diff -u src/lib/libc/net/Makefile.inc:1.85 src/lib/libc/net/Makefile.inc:1.85.4.1 --- src/lib/libc/net/Makefile.inc:1.85 Sat Oct 19 19:56:56 2013 +++ src/lib/libc/net/Makefile.inc Sun Jul 23 06:06:52 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.85 2013/10/19 19:56:56 christos Exp $ +# $NetBSD: Makefile.inc,v 1.85.4.1 2017/07/23 06:06:52 snj Exp $ # @(#)Makefile.inc 8.2 (Berkeley) 9/5/93 # net sources @@ -24,8 +24,9 @@ COPTS.hesiod.c+= ${${ACTIVE_CC} == "gcc" SRCS+= getaddrinfo.c getnameinfo.c .if (${USE_INET6} != "no") -SRCS+= ip6opt.c rthdr.c vars6.c inet6_scopeid.c +SRCS+= ip6opt.c rthdr.c inet6_scopeid.c .endif +SRCS+= vars6.c SRCS+= if_indextoname.c if_nameindex.c if_nametoindex.c LPREFIX=_nsyy
CVS commit: [netbsd-7] src/sys/dev/hpc
Module Name:src Committed By: snj Date: Sun Jul 23 06:05:36 UTC 2017 Modified Files: src/sys/dev/hpc [netbsd-7]: hpckbd.c Log Message: Pull up following revision(s) (requested by manu in ticket #1438): sys/dev/hpc/hpckbd.c: revision 1.31 Restore wscons keymaps feature on hpcarm hpc ports need to alter keydesc data at runtime in order to load alternate keymaps. But since keydesc is const initialized data, it is mapped read only and the operation should fail. It seems older compiler failed to enforce the read-only mapping and this is why it used to work, but on recent NetBSD releases, the feature is broken. We fix it by duplicating the keydesc data once into a malloc'ed area that can be modified. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.30.12.1 src/sys/dev/hpc/hpckbd.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/dev/hpc/hpckbd.c diff -u src/sys/dev/hpc/hpckbd.c:1.30 src/sys/dev/hpc/hpckbd.c:1.30.12.1 --- src/sys/dev/hpc/hpckbd.c:1.30 Sat Oct 27 17:18:17 2012 +++ src/sys/dev/hpc/hpckbd.c Sun Jul 23 06:05:36 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: hpckbd.c,v 1.30 2012/10/27 17:18:17 chs Exp $ */ +/* $NetBSD: hpckbd.c,v 1.30.12.1 2017/07/23 06:05:36 snj Exp $ */ /*- * Copyright (c) 1999-2001 The NetBSD Foundation, Inc. @@ -30,11 +30,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.30 2012/10/27 17:18:17 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.30.12.1 2017/07/23 06:05:36 snj Exp $"); #include #include #include +#include #include @@ -264,22 +265,30 @@ hpckbd_keymap_setup(struct hpckbd_core * const keysym_t *map, int mapsize) { int i; - struct wscons_keydesc *desc; + const struct wscons_keydesc *desc; + static struct wscons_keydesc *ndesc = NULL; - /* fix keydesc table */ /* - * XXX The way this is done is really wrong. The __UNCONST() - * is a hint as to what is wrong. This actually ends up modifying - * initialized data which is marked "const". - * The reason we get away with it here is apparently that text - * and read-only data gets mapped read/write on the platforms - * using this code. + * fix keydesc table. Since it is const data, we must + * copy it once before changingg it. */ - desc = (struct wscons_keydesc *)__UNCONST(hpckbd_keymapdata.keydesc); + + if (ndesc == NULL) { + size_t sz; + + for (sz = 0; hpckbd_keymapdata.keydesc[sz].name != 0; sz++); + + ndesc = malloc(sz * sizeof(*ndesc), M_DEVBUF, M_WAITOK); + memcpy(ndesc, hpckbd_keymapdata.keydesc, sz * sizeof(*ndesc)); + + hpckbd_keymapdata.keydesc = ndesc; + } + + desc = hpckbd_keymapdata.keydesc; for (i = 0; desc[i].name != 0; i++) { if ((desc[i].name & KB_MACHDEP) && desc[i].map == NULL) { - desc[i].map = map; - desc[i].map_size = mapsize; + ndesc[i].map = map; + ndesc[i].map_size = mapsize; } }
CVS commit: [netbsd-7] src/sys/modules/lua
Module Name:src Committed By: snj Date: Sun Jul 23 06:03:30 UTC 2017 Modified Files: src/sys/modules/lua [netbsd-7]: lua.c Log Message: Pull up following revision(s) (requested by mbalmer in ticket #1423): sys/modules/lua/lua.c: revision 1.23 always put the module on the stack To generate a diff of this commit: cvs rdiff -u -r1.13.2.5 -r1.13.2.6 src/sys/modules/lua/lua.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/modules/lua/lua.c diff -u src/sys/modules/lua/lua.c:1.13.2.5 src/sys/modules/lua/lua.c:1.13.2.6 --- src/sys/modules/lua/lua.c:1.13.2.5 Sun Jul 23 06:00:39 2017 +++ src/sys/modules/lua/lua.c Sun Jul 23 06:03:30 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: lua.c,v 1.13.2.5 2017/07/23 06:00:39 snj Exp $ */ +/* $NetBSD: lua.c,v 1.13.2.6 2017/07/23 06:03:30 snj Exp $ */ /* * Copyright (c) 2011 - 2017 by Marc Balmer. @@ -513,16 +513,16 @@ lua_require(lua_State *L) if (md != NULL) LIST_FOREACH(s, _states, lua_next) if (s->K->L == L) { -LIST_FOREACH(m, >lua_modules, mod_next) - if (m == md) - return 1; - if (lua_verbose) device_printf(sc_self, "require module %s\n", md->mod_name); luaL_requiref(L, md->mod_name, md->open, 0); +LIST_FOREACH(m, >lua_modules, mod_next) + if (m == md) + return 1; + md->refcount++; LIST_INSERT_HEAD(>lua_modules, md, mod_next); return 1;
CVS commit: [netbsd-7] src/sys/modules/lua
Module Name:src Committed By: snj Date: Sun Jul 23 06:00:39 UTC 2017 Modified Files: src/sys/modules/lua [netbsd-7]: lua.c Log Message: Pull up following revision(s) (requested by mbalmer in ticket #1422): sys/modules/lua/lua.c: revision 1.22 via patch Only load a module if it is not already loaded in a state (much like userland Lua handles require). Fixes PR kern/52226. To generate a diff of this commit: cvs rdiff -u -r1.13.2.4 -r1.13.2.5 src/sys/modules/lua/lua.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/modules/lua/lua.c diff -u src/sys/modules/lua/lua.c:1.13.2.4 src/sys/modules/lua/lua.c:1.13.2.5 --- src/sys/modules/lua/lua.c:1.13.2.4 Sun Jul 23 05:55:03 2017 +++ src/sys/modules/lua/lua.c Sun Jul 23 06:00:39 2017 @@ -1,8 +1,8 @@ -/* $NetBSD: lua.c,v 1.13.2.4 2017/07/23 05:55:03 snj Exp $ */ +/* $NetBSD: lua.c,v 1.13.2.5 2017/07/23 06:00:39 snj Exp $ */ /* + * Copyright (c) 2011 - 2017 by Marc Balmer. * Copyright (c) 2014 by Lourival Vieira Neto . - * Copyright (c) 2011, 2013 by Marc Balmer . * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -513,6 +513,10 @@ lua_require(lua_State *L) if (md != NULL) LIST_FOREACH(s, _states, lua_next) if (s->K->L == L) { +LIST_FOREACH(m, >lua_modules, mod_next) + if (m == md) + return 1; + if (lua_verbose) device_printf(sc_self, "require module %s\n",