CVS commit: src/sys/arch/x86
Module Name:src Committed By: kamil Date: Fri Apr 14 04:43:47 UTC 2017 Modified Files: src/sys/arch/x86/include: cpu.h src/sys/arch/x86/x86: x86_machdep.c Log Message: x86: Export fpu_save, fpu_save_size, xsave_features to dedicated sysctl nodes Add new defines: - CPU_FPU_SAVE (15) int: FPU Instructions layout * to use this, CPU_OSFXSR must be true * 0: FSAVE * 1: FXSAVE * 2: XSAVE * 3: XSAVEOPT - CPU_FPU_SAVE_SIZE (16) int: FPU Instruction layout size - CPU_XSAVE_FEATURES (17) quad: FPU XSAVE features Bump CPU_MAXID from 15 to 18. These values were prepared originally to be exported without ASCIIZ name to be used as handler. These values are useful to get FPU accessors in a debugger easier to implement on x86 (PT_SETFPREG, PT_GETFPREG). This interface handles all supported x86 targets. In the older (i386) and less featured CPUs check first osfxsr (OS uses FXSAVE/FXRSTOR). According to sys/arch/x86/include/cpu.h r.1.65 this was prepared to be exported beyond simple CTL_CREATE node. Sponsored by To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/arch/x86/include/cpu.h cvs rdiff -u -r1.90 -r1.91 src/sys/arch/x86/x86/x86_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/x86/include/cpu.h diff -u src/sys/arch/x86/include/cpu.h:1.68 src/sys/arch/x86/include/cpu.h:1.69 --- src/sys/arch/x86/include/cpu.h:1.68 Sat Feb 11 14:11:24 2017 +++ src/sys/arch/x86/include/cpu.h Fri Apr 14 04:43:47 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.68 2017/02/11 14:11:24 maxv Exp $ */ +/* $NetBSD: cpu.h,v 1.69 2017/04/14 04:43:47 kamil Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -512,7 +512,17 @@ void x86_bus_space_mallocok(void); #define CPU_TMLR_FREQUENCY 12 /* int: current frequency */ #define CPU_TMLR_VOLTAGE 13 /* int: curret voltage */ #define CPU_TMLR_PERCENTAGE 14 /* int: current clock percentage */ -#define CPU_MAXID 15 /* number of valid machdep ids */ +#define CPU_FPU_SAVE 15 /* int: FPU Instructions layout + * to use this, CPU_OSFXSR must be true + * 0: FSAVE + * 1: FXSAVE + * 2: XSAVE + * 3: XSAVEOPT + */ +#define CPU_FPU_SAVE_SIZE 16 /* int: FPU Instruction layout size */ +#define CPU_XSAVE_FEATURES 17 /* quad: XSAVE features */ + +#define CPU_MAXID 18 /* number of valid machdep ids */ /* * Structure for CPU_DISKINFO sysctl call. Index: src/sys/arch/x86/x86/x86_machdep.c diff -u src/sys/arch/x86/x86/x86_machdep.c:1.90 src/sys/arch/x86/x86/x86_machdep.c:1.91 --- src/sys/arch/x86/x86/x86_machdep.c:1.90 Fri Mar 24 17:09:37 2017 +++ src/sys/arch/x86/x86/x86_machdep.c Fri Apr 14 04:43:47 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: x86_machdep.c,v 1.90 2017/03/24 17:09:37 maxv Exp $ */ +/* $NetBSD: x86_machdep.c,v 1.91 2017/04/14 04:43:47 kamil Exp $ */ /*- * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi, @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.90 2017/03/24 17:09:37 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.91 2017/04/14 04:43:47 kamil Exp $"); #include "opt_modular.h" #include "opt_physmem.h" @@ -1185,11 +1185,11 @@ SYSCTL_SETUP(sysctl_machdep_setup, "sysc CPU_SSE2); const_sysctl(clog, "fpu_save", CTLTYPE_INT, x86_fpu_save, - CTL_CREATE); + CPU_FPU_SAVE); const_sysctl(clog, "fpu_save_size", CTLTYPE_INT, x86_fpu_save_size, - CTL_CREATE); + CPU_FPU_SAVE_SIZE); const_sysctl(clog, "xsave_features", CTLTYPE_QUAD, x86_xsave_features, - CTL_CREATE); + CPU_XSAVE_FEATURES); #ifndef XEN const_sysctl(clog, "biosbasemem", CTLTYPE_INT, biosbasemem,
CVS commit: src/tests/net/ipsec
Module Name:src Committed By: ozaki-r Date: Fri Apr 14 03:35:40 UTC 2017 Modified Files: src/tests/net/ipsec: t_ipsec_tunnel.sh Log Message: Mark tests of tunnel/AH/IPv6 as expected failure (PR kern/52161) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/net/ipsec/t_ipsec_tunnel.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/ipsec/t_ipsec_tunnel.sh diff -u src/tests/net/ipsec/t_ipsec_tunnel.sh:1.1 src/tests/net/ipsec/t_ipsec_tunnel.sh:1.2 --- src/tests/net/ipsec/t_ipsec_tunnel.sh:1.1 Fri Apr 14 02:56:49 2017 +++ src/tests/net/ipsec/t_ipsec_tunnel.sh Fri Apr 14 03:35:40 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_ipsec_tunnel.sh,v 1.1 2017/04/14 02:56:49 ozaki-r Exp $ +# $NetBSD: t_ipsec_tunnel.sh,v 1.2 2017/04/14 03:35:40 ozaki-r Exp $ # # Copyright (c) 2017 Internet Initiative Japan Inc. # All rights reserved. @@ -312,11 +312,15 @@ add_test_tunnel_mode() local ipproto=$1 local proto=$2 local algo=$3 + local expected_failure=$4 local _algo=$(echo $algo | sed 's/-//g') - local name= desc= + local name= desc= expected_failure_code= name="ipsec_tunnel_${ipproto}_${proto}_${_algo}" desc="Tests of IPsec ($ipproto) tunnel mode with $proto ($algo)" + if [ "$expected_failure" = yes ]; then + expected_failure_code="atf_expect_fail 'PR kern/52161';" + fi atf_test_case ${name} cleanup eval "\ @@ -325,6 +329,7 @@ add_test_tunnel_mode() atf_set \"require.progs\" \"rump_server\" \"setkey\"; \ };\ ${name}_body() { \ + $expected_failure_code \ test_tunnel_common $ipproto $proto $algo; \ rump_server_destroy_ifaces;\ };\ @@ -347,6 +352,10 @@ atf_init_test_cases() for algo in $AH_AUTHENTICATION_ALGORITHMS; do add_test_tunnel_mode ipv4 ah $algo - add_test_tunnel_mode ipv6 ah $algo + if [ $algo = null ]; then + add_test_tunnel_mode ipv6 ah $algo + else + add_test_tunnel_mode ipv6 ah $algo yes + fi done }
CVS commit: src
Module Name:src Committed By: ozaki-r Date: Fri Apr 14 02:56:49 UTC 2017 Modified Files: src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.tests src/tests/net: Makefile net_common.sh Added Files: src/tests/net/ipsec: Makefile algorithms.sh t_ipsec_ah_keys.sh t_ipsec_esp_keys.sh t_ipsec_sysctl.sh t_ipsec_transport.sh t_ipsec_tunnel.sh Log Message: Add tests for ipsec - Check if setkey correctly handles algorithms for AH/ESP - Check IPsec of transport mode with AH/ESP over IPv4/IPv6 - Check IPsec of tunnel mode with AH/ESP over IPv4/IPv6 To generate a diff of this commit: cvs rdiff -u -r1.733 -r1.734 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.144 -r1.145 src/etc/mtree/NetBSD.dist.tests cvs rdiff -u -r1.31 -r1.32 src/tests/net/Makefile cvs rdiff -u -r1.14 -r1.15 src/tests/net/net_common.sh cvs rdiff -u -r0 -r1.1 src/tests/net/ipsec/Makefile \ src/tests/net/ipsec/algorithms.sh src/tests/net/ipsec/t_ipsec_ah_keys.sh \ src/tests/net/ipsec/t_ipsec_esp_keys.sh \ src/tests/net/ipsec/t_ipsec_sysctl.sh \ src/tests/net/ipsec/t_ipsec_transport.sh \ src/tests/net/ipsec/t_ipsec_tunnel.sh 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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.733 src/distrib/sets/lists/tests/mi:1.734 --- src/distrib/sets/lists/tests/mi:1.733 Mon Apr 3 05:06:28 2017 +++ src/distrib/sets/lists/tests/mi Fri Apr 14 02:56:48 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.733 2017/04/03 05:06:28 kamil Exp $ +# $NetBSD: mi,v 1.734 2017/04/14 02:56:48 ozaki-r Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -3293,6 +3293,14 @@ ./usr/tests/net/in_cksum/Kyuafile tests-net-tests compattestfile,atf,kyua ./usr/tests/net/in_cksum/in_cksum tests-net-tests compattestfile,atf ./usr/tests/net/in_cksum/t_in_cksum tests-net-tests compattestfile,atf +./usr/tests/net/ipsectests-net-tests compattestfile,atf +./usr/tests/net/ipsec/Atffile tests-net-tests atf,rump +./usr/tests/net/ipsec/Kyuafile tests-net-tests atf,rump,kyua +./usr/tests/net/ipsec/t_ipsec_ah_keys tests-net-tests atf,rump +./usr/tests/net/ipsec/t_ipsec_esp_keys tests-net-tests atf,rump +./usr/tests/net/ipsec/t_ipsec_sysctl tests-net-tests atf,rump +./usr/tests/net/ipsec/t_ipsec_transport tests-net-tests atf,rump +./usr/tests/net/ipsec/t_ipsec_tunnel tests-net-tests atf,rump ./usr/tests/net/mcasttests-net-tests compattestfile,atf ./usr/tests/net/mcast/Atffile tests-net-tests atf,rump ./usr/tests/net/mcast/Kyuafile tests-net-tests atf,rump,kyua Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.144 src/etc/mtree/NetBSD.dist.tests:1.145 --- src/etc/mtree/NetBSD.dist.tests:1.144 Mon Apr 3 04:33:32 2017 +++ src/etc/mtree/NetBSD.dist.tests Fri Apr 14 02:56:48 2017 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.144 2017/04/03 04:33:32 kamil Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.145 2017/04/14 02:56:48 ozaki-r Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -338,6 +338,7 @@ ./usr/tests/net/if_tun ./usr/tests/net/if_vlan ./usr/tests/net/in_cksum +./usr/tests/net/ipsec ./usr/tests/net/mcast ./usr/tests/net/mpls ./usr/tests/net/net Index: src/tests/net/Makefile diff -u src/tests/net/Makefile:1.31 src/tests/net/Makefile:1.32 --- src/tests/net/Makefile:1.31 Thu Feb 16 08:44:47 2017 +++ src/tests/net/Makefile Fri Apr 14 02:56:48 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.31 2017/02/16 08:44:47 knakahara Exp $ +# $NetBSD: Makefile,v 1.32 2017/04/14 02:56:48 ozaki-r Exp $ .include @@ -7,8 +7,8 @@ TESTSDIR= ${TESTSBASE}/net TESTS_SUBDIRS= fdpass in_cksum net sys .if (${MKRUMP} != "no") && !defined(BSD_MK_COMPAT_FILE) TESTS_SUBDIRS+= arp bpf bpfilter carp icmp if if_bridge if_gif if_l2tp -TESTS_SUBDIRS+= if_loop if_pppoe if_tap if_tun mcast mpls ndp npf route -TESTS_SUBDIRS+= if_vlan +TESTS_SUBDIRS+= if_loop if_pppoe if_tap if_tun ipsec mcast mpls ndp npf +TESTS_SUBDIRS+= route if_vlan .if (${MKSLJIT} != "no") TESTS_SUBDIRS+= bpfjit .endif Index: src/tests/net/net_common.sh diff -u src/tests/net/net_common.sh:1.14 src/tests/net/net_common.sh:1.15 --- src/tests/net/net_common.sh:1.14 Mon Mar 6 07:15:47 2017 +++ src/tests/net/net_common.sh Fri Apr 14 02:56:48 2017 @@ -1,4 +1,4 @@ -# $NetBSD: net_common.sh,v 1.14 2017/03/06 07:15:47 ozaki-r Exp $ +# $NetBSD: net_common.sh,v 1.15 2017/04/14 02:56:48 ozaki-r Exp $ # # Copyright (c) 2016 Internet Initiative Japan Inc. # All rights reserved. @@ -170,6 +170,8 @@ stop_nc_server() BASIC_LIBS="-lrumpnet -lrumpnet_net -lrumpnet_netinet \ -lrumpnet_shmif -lrumpdev" FS_LIBS="$BASIC_LIBS -lrumpvfs -lrumpfs_ffs" +CRYPTO_LIBS="$BASIC_LIBS -lrumpvfs -lrumpdev_opencrypto \ +-lrumpkern_z -lrumpkern_crypto" # We cannot keep vari
CVS commit: src
Module Name:src Committed By: ozaki-r Date: Fri Apr 14 02:43:28 UTC 2017 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/comp: mi shl.mi src/distrib/sets/lists/debug: mi shl.mi src/sys/netinet: in_proto.c src/sys/netinet6: in6_proto.c src/sys/rump/librump/rumpnet: Makefile.rumpnet net_stub.c src/sys/rump/net: Makefile.rumpnetcomp src/sys/rump/net/lib/libnetinet: Makefile.inc src/sys/rump/net/lib/libnetinet6: Makefile.inc Added Files: src/sys/rump/net/lib/libnetipsec: Makefile Makefile.inc netipsec_component.c Log Message: Rumpify netipsec Note that we should modularize netipsec and reduce reverse symbol references (referencing symbols of netipsec from net, netinet and netinet6) though, the task needs lots of code changes. Prior to doing so, rumpifying it and having ATF tests should be useful. To generate a diff of this commit: cvs rdiff -u -r1.806 -r1.807 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.2119 -r1.2120 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.301 -r1.302 src/distrib/sets/lists/comp/shl.mi cvs rdiff -u -r1.204 -r1.205 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.164 -r1.165 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r1.122 -r1.123 src/sys/netinet/in_proto.c cvs rdiff -u -r1.116 -r1.117 src/sys/netinet6/in6_proto.c cvs rdiff -u -r1.21 -r1.22 src/sys/rump/librump/rumpnet/Makefile.rumpnet cvs rdiff -u -r1.25 -r1.26 src/sys/rump/librump/rumpnet/net_stub.c cvs rdiff -u -r1.17 -r1.18 src/sys/rump/net/Makefile.rumpnetcomp cvs rdiff -u -r1.13 -r1.14 src/sys/rump/net/lib/libnetinet/Makefile.inc cvs rdiff -u -r1.3 -r1.4 src/sys/rump/net/lib/libnetinet6/Makefile.inc cvs rdiff -u -r0 -r1.1 src/sys/rump/net/lib/libnetipsec/Makefile \ src/sys/rump/net/lib/libnetipsec/Makefile.inc \ src/sys/rump/net/lib/libnetipsec/netipsec_component.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/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.806 src/distrib/sets/lists/base/shl.mi:1.807 --- src/distrib/sets/lists/base/shl.mi:1.806 Fri Mar 24 11:46:52 2017 +++ src/distrib/sets/lists/base/shl.mi Fri Apr 14 02:43:27 2017 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.806 2017/03/24 11:46:52 nat Exp $ +# $NetBSD: shl.mi,v 1.807 2017/04/14 02:43:27 ozaki-r Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -721,6 +721,9 @@ ./usr/lib/librumpnet_netinet6.so base-rump-shlib rump ./usr/lib/librumpnet_netinet6.so.0 base-rump-shlib rump ./usr/lib/librumpnet_netinet6.so.0.0 base-rump-shlib rump +./usr/lib/librumpnet_netipsec.so base-rump-shlib rump +./usr/lib/librumpnet_netipsec.so.0 base-rump-shlib rump +./usr/lib/librumpnet_netipsec.so.0.0 base-rump-shlib rump ./usr/lib/librumpnet_netmpls.so base-rump-shlib rump ./usr/lib/librumpnet_netmpls.so.0 base-rump-shlib rump ./usr/lib/librumpnet_netmpls.so.0.0 base-rump-shlib rump Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2119 src/distrib/sets/lists/comp/mi:1.2120 --- src/distrib/sets/lists/comp/mi:1.2119 Thu Apr 6 10:46:52 2017 +++ src/distrib/sets/lists/comp/mi Fri Apr 14 02:43:27 2017 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2119 2017/04/06 10:46:52 abhinav Exp $ +# $NetBSD: mi,v 1.2120 2017/04/14 02:43:27 ozaki-r Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -3566,6 +3566,8 @@ ./usr/lib/librumpnet_netinet6.a comp-c-lib rump ./usr/lib/librumpnet_netinet6_p.a comp-c-proflib rump,profile ./usr/lib/librumpnet_netinet_p.a comp-c-proflib rump,profile +./usr/lib/librumpnet_netipsec.a comp-c-lib rump +./usr/lib/librumpnet_netipsec_p.a comp-c-proflib rump,profile ./usr/lib/librumpnet_netmpls.a comp-c-lib rump ./usr/lib/librumpnet_netmpls_p.a comp-c-proflib rump,profile ./usr/lib/librumpnet_npf.a comp-c-lib rump Index: src/distrib/sets/lists/comp/shl.mi diff -u src/distrib/sets/lists/comp/shl.mi:1.301 src/distrib/sets/lists/comp/shl.mi:1.302 --- src/distrib/sets/lists/comp/shl.mi:1.301 Thu Feb 16 08:39:10 2017 +++ src/distrib/sets/lists/comp/shl.mi Fri Apr 14 02:43:27 2017 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.301 2017/02/16 08:39:10 knakahara Exp $ +# $NetBSD: shl.mi,v 1.302 2017/04/14 02:43:27 ozaki-r Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -225,6 +225,7 @@ ./usr/lib/librumpnet_netbt_pic.a comp-c-piclib picinstall,rump ./usr/lib/librumpnet_netinet6_pic.a comp-c-piclib picinstall,rump ./usr/lib/librumpnet_netinet_pic.a comp-c-piclib picinstall,rump +./usr/lib/librumpnet_netipsec_pic.a comp-c-piclib picinstall,rump ./usr/lib/librumpnet_netmpls_pic.a comp-c-piclib picinstall,rump ./usr/lib/librumpnet_npf_pic.a comp-c-picl
CVS commit: src/tests/fs/union
Module Name:src Committed By: riastradh Date: Fri Apr 14 01:30:38 UTC 2017 Modified Files: src/tests/fs/union: t_pr.c Log Message: Gotta mark crashes on signal separately from failures... To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/tests/fs/union/t_pr.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/fs/union/t_pr.c diff -u src/tests/fs/union/t_pr.c:1.11 src/tests/fs/union/t_pr.c:1.12 --- src/tests/fs/union/t_pr.c:1.11 Wed Apr 12 15:12:55 2017 +++ src/tests/fs/union/t_pr.c Fri Apr 14 01:30:38 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_pr.c,v 1.11 2017/04/12 15:12:55 riastradh Exp $ */ +/* $NetBSD: t_pr.c,v 1.12 2017/04/14 01:30:38 riastradh Exp $ */ #include #include @@ -63,7 +63,7 @@ ATF_TC_BODY(multilayer2, tc) { struct union_args unionargs; - atf_tc_expect_fail("PR kern/2423"); + atf_tc_expect_signal(-1, "PR kern/2423"); rump_init(); @@ -103,7 +103,7 @@ ATF_TC_BODY(cyclic, tc) { struct union_args unionargs; - atf_tc_expect_fail("PR kern/3645"); + atf_tc_expect_signal(-1, "PR kern/3645"); rump_init(); @@ -133,7 +133,7 @@ ATF_TC_BODY(cyclic2, tc) { struct union_args unionargs; - atf_tc_expect_fail("PR kern/4597"); + atf_tc_expect_signal(-1, "PR kern/4597"); rump_init();
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Fri Apr 14 00:19:34 UTC 2017 Modified Files: src/sys/arch/arm/nvidia: tegra_var.h tegra_xusb.c tegra_xusbpad.c Log Message: Only route USB ports to XHCI controller after the firmware is loaded successfully. This gives us working USB (via USB2 controllers) until the tegra-firmware package is installed. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/nvidia/tegra_var.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/nvidia/tegra_xusb.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/nvidia/tegra_xusbpad.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/nvidia/tegra_var.h diff -u src/sys/arch/arm/nvidia/tegra_var.h:1.30 src/sys/arch/arm/nvidia/tegra_var.h:1.31 --- src/sys/arch/arm/nvidia/tegra_var.h:1.30 Sat Mar 26 08:42:07 2016 +++ src/sys/arch/arm/nvidia/tegra_var.h Fri Apr 14 00:19:34 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_var.h,v 1.30 2016/03/26 08:42:07 skrll Exp $ */ +/* $NetBSD: tegra_var.h,v 1.31 2017/04/14 00:19:34 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -90,6 +90,7 @@ psize_t tegra_mc_memsize(void); uint32_t tegra_fuse_read(u_int); void tegra_xusbpad_sata_enable(void); +void tegra_xusbpad_xhci_enable(void); struct videomode; int tegra_dc_port(device_t); Index: src/sys/arch/arm/nvidia/tegra_xusb.c diff -u src/sys/arch/arm/nvidia/tegra_xusb.c:1.3 src/sys/arch/arm/nvidia/tegra_xusb.c:1.4 --- src/sys/arch/arm/nvidia/tegra_xusb.c:1.3 Mon Feb 27 12:38:00 2017 +++ src/sys/arch/arm/nvidia/tegra_xusb.c Fri Apr 14 00:19:34 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_xusb.c,v 1.3 2017/02/27 12:38:00 skrll Exp $ */ +/* $NetBSD: tegra_xusb.c,v 1.4 2017/04/14 00:19:34 jmcneill Exp $ */ /* * Copyright (c) 2016 Jonathan A. Kollasch @@ -30,7 +30,7 @@ #include "opt_tegra.h" #include -__KERNEL_RCSID(0, "$NetBSD: tegra_xusb.c,v 1.3 2017/02/27 12:38:00 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_xusb.c,v 1.4 2017/04/14 00:19:34 jmcneill Exp $"); #include #include @@ -93,7 +93,7 @@ static void csb_write_4(struct tegra_xus uint32_t); static void tegra_xusb_init(struct tegra_xusb_softc * const); -static void tegra_xusb_load_fw(struct tegra_xusb_softc * const); +static int tegra_xusb_load_fw(struct tegra_xusb_softc * const); static int xusb_mailbox_send(struct tegra_xusb_softc * const, uint32_t); @@ -337,9 +337,12 @@ tegra_xusb_mountroot(device_t self) val = bus_space_read_4(bst, ipfsh, 0x0); device_printf(sc->sc_dev, "%s ipfs 0x0 = 0x%x\n", __func__, val); - tegra_xusb_load_fw(psc); + if (tegra_xusb_load_fw(psc) != 0) + return; device_printf(sc->sc_dev, "post fw\n"); + tegra_xusbpad_xhci_enable(); + clk = fdtbus_clock_get(psc->sc_phandle, "xusb_falcon_src"); rate = clk_get_rate(clk); error = clk_enable(clk); @@ -579,7 +582,7 @@ fw_dma_free(struct tegra_xusb_softc * co #define FWHEADER_FWIMG_LEN 100 #define FWHEADER__LEN 256 -static void +static int tegra_xusb_load_fw(struct tegra_xusb_softc * const psc) { struct xhci_softc * const sc = &psc->sc_xhci; @@ -596,8 +599,8 @@ tegra_xusb_load_fw(struct tegra_xusb_sof #else if ((error = firmware_open("nvidia/tegra124", "xusb.bin", &fw)) != 0) { aprint_error_dev(sc->sc_dev, - "could not open firmware file %s: %d\n", "xusb.bin", error); - return; + "couldn't load firmware from 'nvidia/tegra124/xusb.bin': %d\n", error); + return error; } firmware_size = firmware_get_size(fw); #endif @@ -607,7 +610,7 @@ tegra_xusb_load_fw(struct tegra_xusb_sof #if !defined(TEGRA124_XUSB_BIN_STATIC) firmware_close(fw); #endif - return; + return error; } firmware_image = psc->sc_fw_dma.addr; @@ -621,7 +624,7 @@ tegra_xusb_load_fw(struct tegra_xusb_sof if (error != 0) { fw_dma_free(psc, &psc->sc_fw_dma); firmware_close(fw); - return; + return error; } firmware_close(fw); #endif @@ -733,6 +736,8 @@ tegra_xusb_load_fw(struct tegra_xusb_sof XUSB_CSB_FALCON_CPUCTL_STARTCPU); device_printf(sc->sc_dev, "XUSB_FALC_CPUCTL 0x%x\n", csb_read_4(psc, XUSB_CSB_FALCON_CPUCTL_REG)); + + return 0; } static uint32_t Index: src/sys/arch/arm/nvidia/tegra_xusbpad.c diff -u src/sys/arch/arm/nvidia/tegra_xusbpad.c:1.4 src/sys/arch/arm/nvidia/tegra_xusbpad.c:1.5 --- src/sys/arch/arm/nvidia/tegra_xusbpad.c:1.4 Tue Apr 11 11:32:51 2017 +++ src/sys/arch/arm/nvidia/tegra_xusbpad.c Fri Apr 14 00:19:34 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_xusbpad.c,v 1.4 2017/04/11 11:32:51 jmcneill Exp $ */ +/* $NetBSD: tegra_xusbpad.c,v 1.5 2017/04/14 00:19:34 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,7 +29,7 @@ #include "opt_tegra.h" #include -__KERNEL_RCSID(0, "$NetBSD: tegra_xusbpad.c,v 1.4 2017/04/11 11:32:51 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_xusbpad.c,v 1.5 2017/04/14 00:19:34 jmcneill Exp $"); #include #include @@ -59,8 +
CVS commit: src/sys/dev
Module Name:src Committed By: nat Date: Fri Apr 14 00:05:46 UTC 2017 Modified Files: src/sys/dev: audio.c Log Message: Increase the priority of the mixing thread yet again. Ensure that there is data in the mix ring. Addresses PR kern/52098. To generate a diff of this commit: cvs rdiff -u -r1.323 -r1.324 src/sys/dev/audio.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/audio.c diff -u src/sys/dev/audio.c:1.323 src/sys/dev/audio.c:1.324 --- src/sys/dev/audio.c:1.323 Wed Apr 12 14:21:12 2017 +++ src/sys/dev/audio.c Fri Apr 14 00:05:46 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.323 2017/04/12 14:21:12 nat Exp $ */ +/* $NetBSD: audio.c,v 1.324 2017/04/14 00:05:46 nat Exp $ */ /*- * Copyright (c) 2016 Nathanial Sloss @@ -148,7 +148,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.323 2017/04/12 14:21:12 nat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.324 2017/04/14 00:05:46 nat Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -882,9 +882,9 @@ bad_rec: #ifdef AUDIO_PM_IDLE callout_schedule(&sc->sc_idle_counter, audio_idle_timeout * hz); #endif - kthread_create(PRI_BIO, KTHREAD_MPSAFE | KTHREAD_MUSTJOIN, NULL, + kthread_create(PRI_SOFTBIO, KTHREAD_MPSAFE | KTHREAD_MUSTJOIN, NULL, audio_rec_thread, sc, &sc->sc_recthread, "audiorec"); - kthread_create(PRI_BIO, KTHREAD_MPSAFE | KTHREAD_MUSTJOIN, NULL, + kthread_create(PRI_SOFTBIO, KTHREAD_MPSAFE | KTHREAD_MUSTJOIN, NULL, audio_play_thread, sc, &sc->sc_playthread, "audiomix"); audiorescan(self, "audio", NULL); } @@ -5893,9 +5893,11 @@ audio_play_thread(void *v) } mutex_exit(sc->sc_intr_lock); - mutex_enter(sc->sc_lock); - audio_mix(sc); - mutex_exit(sc->sc_lock); + while (audio_stream_get_used(&sc->sc_pr.s) < sc->sc_pr.blksize) { + mutex_enter(sc->sc_lock); + audio_mix(sc); + mutex_exit(sc->sc_lock); + } } }
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: jmcneill Date: Thu Apr 13 22:27:07 UTC 2017 Modified Files: src/sys/dev/fdt: fdtbus.c Log Message: Allow devices to attach to nodes without a "compatible" property, but only print "not configured" messages for nodes with one. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/fdt/fdtbus.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/fdt/fdtbus.c diff -u src/sys/dev/fdt/fdtbus.c:1.4 src/sys/dev/fdt/fdtbus.c:1.5 --- src/sys/dev/fdt/fdtbus.c:1.4 Thu Apr 13 22:12:53 2017 +++ src/sys/dev/fdt/fdtbus.c Thu Apr 13 22:27:07 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fdtbus.c,v 1.4 2017/04/13 22:12:53 jmcneill Exp $ */ +/* $NetBSD: fdtbus.c,v 1.5 2017/04/13 22:27:07 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.4 2017/04/13 22:12:53 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.5 2017/04/13 22:27:07 jmcneill Exp $"); #include #include @@ -102,11 +102,6 @@ fdt_scan(device_t self, const struct fdt struct fdt_attach_args nfaa = *faa; nfaa.faa_phandle = child; - /* Only attach to nodes with a compatible property */ - len = OF_getproplen(child, "compatible"); - if (len <= 0) - continue; - /* If there is a "status" property, make sure it is "okay" */ len = OF_getproplen(child, "status"); if (len > 0) { @@ -158,6 +153,10 @@ fdt_print(void *aux, const char *pnp) char buf[FDT_MAX_PATH]; const char *name = buf; + /* Skip "not configured" for nodes w/o compatible property */ + if (OF_getproplen(faa->faa_phandle, "compatible") <= 0) + return QUIET; + if (pnp) { if (!fdtbus_get_path(faa->faa_phandle, buf, sizeof(buf))) name = faa->faa_name;
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: jmcneill Date: Thu Apr 13 22:12:53 UTC 2017 Modified Files: src/sys/dev/fdt: fdt_subr.c fdtbus.c fdtvar.h Log Message: Print the full DT node path in "not configured" autoconf messages. Before: clock at fdt2 not configured After: /clocks/clock@0 at fdt2 not configured To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/fdt/fdt_subr.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/fdt/fdtbus.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/fdt/fdtvar.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/fdt/fdt_subr.c diff -u src/sys/dev/fdt/fdt_subr.c:1.5 src/sys/dev/fdt/fdt_subr.c:1.6 --- src/sys/dev/fdt/fdt_subr.c:1.5 Tue Dec 22 21:42:11 2015 +++ src/sys/dev/fdt/fdt_subr.c Thu Apr 13 22:12:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fdt_subr.c,v 1.5 2015/12/22 21:42:11 jmcneill Exp $ */ +/* $NetBSD: fdt_subr.c,v 1.6 2017/04/13 22:12:53 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdt_subr.c,v 1.5 2015/12/22 21:42:11 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdt_subr.c,v 1.6 2017/04/13 22:12:53 jmcneill Exp $"); #include #include @@ -143,6 +143,19 @@ fdtbus_get_phandle_from_native(int phand return fdtbus_offset2phandle(off); } +bool +fdtbus_get_path(int phandle, char *buf, size_t buflen) +{ + const int off = fdtbus_phandle2offset(phandle); + if (off < 0) { + return false; + } + if (fdt_get_path(fdt_data, off, buf, (int)buflen) != 0) { + return false; + } + return true; +} + int fdtbus_get_reg(int phandle, u_int index, bus_addr_t *paddr, bus_size_t *psize) { Index: src/sys/dev/fdt/fdtbus.c diff -u src/sys/dev/fdt/fdtbus.c:1.3 src/sys/dev/fdt/fdtbus.c:1.4 --- src/sys/dev/fdt/fdtbus.c:1.3 Tue Feb 7 09:14:52 2017 +++ src/sys/dev/fdt/fdtbus.c Thu Apr 13 22:12:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fdtbus.c,v 1.3 2017/02/07 09:14:52 skrll Exp $ */ +/* $NetBSD: fdtbus.c,v 1.4 2017/04/13 22:12:53 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.3 2017/02/07 09:14:52 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1.4 2017/04/13 22:12:53 jmcneill Exp $"); #include #include @@ -40,6 +40,8 @@ __KERNEL_RCSID(0, "$NetBSD: fdtbus.c,v 1 #include +#define FDT_MAX_PATH 256 + static int fdt_match(device_t, cfdata_t, void *); static void fdt_attach(device_t, device_t, void *); static void fdt_scan(device_t, const struct fdt_attach_args *, const char *); @@ -153,9 +155,13 @@ static int fdt_print(void *aux, const char *pnp) { const struct fdt_attach_args * const faa = aux; + char buf[FDT_MAX_PATH]; + const char *name = buf; if (pnp) { - aprint_normal("%s at %s", faa->faa_name, pnp); + if (!fdtbus_get_path(faa->faa_phandle, buf, sizeof(buf))) + name = faa->faa_name; + aprint_normal("%s at %s", name, pnp); } return UNCONF; Index: src/sys/dev/fdt/fdtvar.h diff -u src/sys/dev/fdt/fdtvar.h:1.7 src/sys/dev/fdt/fdtvar.h:1.8 --- src/sys/dev/fdt/fdtvar.h:1.7 Tue Jan 5 21:53:48 2016 +++ src/sys/dev/fdt/fdtvar.h Thu Apr 13 22:12:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fdtvar.h,v 1.7 2016/01/05 21:53:48 marty Exp $ */ +/* $NetBSD: fdtvar.h,v 1.8 2017/04/13 22:12:53 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -166,5 +166,6 @@ bool fdtbus_set_data(const void *); const void * fdtbus_get_data(void); int fdtbus_phandle2offset(int); int fdtbus_offset2phandle(int); +bool fdtbus_get_path(int, char *, size_t); #endif /* _DEV_FDT_FDTVAR_H */
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Thu Apr 13 21:20:44 UTC 2017 Modified Files: src/sys/arch/arm/nvidia: soc_tegra124.c Log Message: DT ode path to i2c controller with ams3722 has changed from /i2c@0,7000d000 to /i2c@7000d000 in newer dts files. Support both paths for cpufreq scaling. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/nvidia/soc_tegra124.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/nvidia/soc_tegra124.c diff -u src/sys/arch/arm/nvidia/soc_tegra124.c:1.12 src/sys/arch/arm/nvidia/soc_tegra124.c:1.13 --- src/sys/arch/arm/nvidia/soc_tegra124.c:1.12 Tue Dec 22 22:10:36 2015 +++ src/sys/arch/arm/nvidia/soc_tegra124.c Thu Apr 13 21:20:44 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: soc_tegra124.c,v 1.12 2015/12/22 22:10:36 jmcneill Exp $ */ +/* $NetBSD: soc_tegra124.c,v 1.13 2017/04/13 21:20:44 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -30,7 +30,7 @@ #include "opt_multiprocessor.h" #include -__KERNEL_RCSID(0, "$NetBSD: soc_tegra124.c,v 1.12 2015/12/22 22:10:36 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: soc_tegra124.c,v 1.13 2017/04/13 21:20:44 jmcneill Exp $"); #include #include @@ -116,9 +116,11 @@ static struct clk *tegra124_clk_pllx = N void tegra124_cpuinit(void) { - const int node = OF_finddevice("/i2c@0,7000d000"); + int node = OF_finddevice("/i2c@7000d000"); + if (node == -1) + node = OF_finddevice("/i2c@0,7000d000"); /* old DTB */ if (node == -1) { - aprint_error("cpufreq: ERROR: couldn't find i2c@0,7000d000\n"); + aprint_error("cpufreq: ERROR: couldn't find i2c@7000d000\n"); return; } i2c_tag_t ic = fdtbus_get_i2c_tag(node);
CVS commit: src/doc
Module Name:src Committed By: christos Date: Thu Apr 13 20:18:22 UTC 2017 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: new ntpd To generate a diff of this commit: cvs rdiff -u -r1.1430 -r1.1431 src/doc/3RDPARTY cvs rdiff -u -r1.2271 -r1.2272 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.1430 src/doc/3RDPARTY:1.1431 --- src/doc/3RDPARTY:1.1430 Thu Apr 13 15:12:09 2017 +++ src/doc/3RDPARTY Thu Apr 13 16:18:22 2017 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1430 2017/04/13 19:12:09 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1431 2017/04/13 20:18:22 christos Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -955,8 +955,8 @@ and ndbootd-raw.c. Restore saved config HAVE_STRICT_ALIGNMENT. Fix RCS IDs, import. Package: ntp -Version: 4.2.8p9 -Current Vers: 4.2.8p9 +Version: 4.2.8p10 +Current Vers: 4.2.8p10 Maintainer: David L. Mills Archive Site: http://www.ntp.org/ Home Page: http://www.ntp.org/, http://support.ntp.org/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2271 src/doc/CHANGES:1.2272 --- src/doc/CHANGES:1.2271 Thu Apr 13 15:12:09 2017 +++ src/doc/CHANGES Thu Apr 13 16:18:22 2017 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2271 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2272 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -497,3 +497,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0: PT_SETSTEP and PT_CLEARSTEP [kamil 20170408] dc(1): Import from OpenBSD (replaced GPL version) [christos 20170410] bind: Import version 9.10.4-P8. [christos 20170413] + ntp: Import ntp 4.2.8p10. [christos 20170413]
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Thu Apr 13 19:54:22 UTC 2017 Modified Files: src/sys/dev/usb: xhci.c Log Message: PR/52154: xHCI Slot Context Not Include in configure endpoint process eXtensible Host Controller Interface Specification(rev 1.1), 4.6.6: "A0 shall be set to 1 and refer to section 6.2.2.2 for the Slot Context fields used by the Configure Endpoint Command." To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/dev/usb/xhci.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/xhci.c diff -u src/sys/dev/usb/xhci.c:1.70 src/sys/dev/usb/xhci.c:1.71 --- src/sys/dev/usb/xhci.c:1.70 Sat Jan 21 07:39:30 2017 +++ src/sys/dev/usb/xhci.c Thu Apr 13 19:54:22 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.70 2017/01/21 07:39:30 skrll Exp $ */ +/* $NetBSD: xhci.c,v 1.71 2017/04/13 19:54:22 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.70 2017/01/21 07:39:30 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.71 2017/04/13 19:54:22 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -2956,8 +2956,7 @@ xhci_setup_ctx(struct usbd_pipe *pipe) cp = xhci_slot_get_icv(sc, xs, XHCI_ICI_INPUT_CONTROL); cp[0] = htole32(0); cp[1] = htole32(XHCI_INCTX_1_ADD_MASK(dci)); - if (dci == XHCI_DCI_EP_CONTROL) - cp[1] |= htole32(XHCI_INCTX_1_ADD_MASK(XHCI_DCI_SLOT)); + cp[1] |= htole32(XHCI_INCTX_1_ADD_MASK(XHCI_DCI_SLOT)); cp[7] = htole32(0); /* set up input slot context */
CVS import: src/external/bsd/ntp/dist
Module Name:src Committed By: christos Date: Thu Apr 13 19:18:06 UTC 2017 Update of /cvsroot/src/external/bsd/ntp/dist In directory ivanova.netbsd.org:/tmp/cvs-serv1827 Log Message: Import ntp 4.2.8p10 Status: Vendor Tag: UDEL Release Tags: ntp-4-2-8p10 U src/external/bsd/ntp/dist/CommitLog-4.1.0 U src/external/bsd/ntp/dist/COPYRIGHT U src/external/bsd/ntp/dist/ChangeLog U src/external/bsd/ntp/dist/CommitLog U src/external/bsd/ntp/dist/Makefile.am U src/external/bsd/ntp/dist/INSTALL U src/external/bsd/ntp/dist/NOTES.y2kfixes U src/external/bsd/ntp/dist/Makefile.in U src/external/bsd/ntp/dist/NEWS U src/external/bsd/ntp/dist/README.bk U src/external/bsd/ntp/dist/README U src/external/bsd/ntp/dist/README.pullrequests U src/external/bsd/ntp/dist/README.hackers U src/external/bsd/ntp/dist/README.leapsmear U src/external/bsd/ntp/dist/README.patches U src/external/bsd/ntp/dist/README.refclocks U src/external/bsd/ntp/dist/README.versions U src/external/bsd/ntp/dist/TODO U src/external/bsd/ntp/dist/WHERE-TO-START U src/external/bsd/ntp/dist/aclocal.m4 U src/external/bsd/ntp/dist/bincheck.mf U src/external/bsd/ntp/dist/bootstrap U src/external/bsd/ntp/dist/build U src/external/bsd/ntp/dist/check-libopts.mf U src/external/bsd/ntp/dist/config.h.in U src/external/bsd/ntp/dist/configure U src/external/bsd/ntp/dist/configure.ac U src/external/bsd/ntp/dist/deps-ver U src/external/bsd/ntp/dist/depsver.mf U src/external/bsd/ntp/dist/dot.emacs U src/external/bsd/ntp/dist/flock-build U src/external/bsd/ntp/dist/packageinfo.sh U src/external/bsd/ntp/dist/includes.mf U src/external/bsd/ntp/dist/readme.y2kfixes U src/external/bsd/ntp/dist/results.y2kfixes U src/external/bsd/ntp/dist/adjtimed/adjtimed.c U src/external/bsd/ntp/dist/adjtimed/Makefile.am U src/external/bsd/ntp/dist/adjtimed/Makefile.in U src/external/bsd/ntp/dist/adjtimed/README U src/external/bsd/ntp/dist/clockstuff/propdelay.c U src/external/bsd/ntp/dist/clockstuff/Makefile.am U src/external/bsd/ntp/dist/clockstuff/README U src/external/bsd/ntp/dist/clockstuff/chutest.c U src/external/bsd/ntp/dist/clockstuff/Makefile.in U src/external/bsd/ntp/dist/lib/isc/hmacmd5.c U src/external/bsd/ntp/dist/lib/isc/rwlock.c U src/external/bsd/ntp/dist/lib/isc/app_api.c U src/external/bsd/ntp/dist/lib/isc/event.c U src/external/bsd/ntp/dist/lib/isc/mutexblock.c U src/external/bsd/ntp/dist/lib/isc/hex.c U src/external/bsd/ntp/dist/lib/isc/radix.c U src/external/bsd/ntp/dist/lib/isc/task_p.h U src/external/bsd/ntp/dist/lib/isc/httpd.c U src/external/bsd/ntp/dist/lib/isc/api U src/external/bsd/ntp/dist/lib/isc/region.c U src/external/bsd/ntp/dist/lib/isc/error.c U src/external/bsd/ntp/dist/lib/isc/base64.c U src/external/bsd/ntp/dist/lib/isc/taskpool.c U src/external/bsd/ntp/dist/lib/isc/inet_ntop.c U src/external/bsd/ntp/dist/lib/isc/log.c U src/external/bsd/ntp/dist/lib/isc/random.c U src/external/bsd/ntp/dist/lib/isc/Atffile U src/external/bsd/ntp/dist/lib/isc/timer_api.c U src/external/bsd/ntp/dist/lib/isc/task_api.c U src/external/bsd/ntp/dist/lib/isc/strtoul.c U src/external/bsd/ntp/dist/lib/isc/lfsr.c U src/external/bsd/ntp/dist/lib/isc/version.c U src/external/bsd/ntp/dist/lib/isc/stats.c U src/external/bsd/ntp/dist/lib/isc/string.c U src/external/bsd/ntp/dist/lib/isc/tsmemcmp.c U src/external/bsd/ntp/dist/lib/isc/netaddr.c U src/external/bsd/ntp/dist/lib/isc/hmacsha.c U src/external/bsd/ntp/dist/lib/isc/netscope.c U src/external/bsd/ntp/dist/lib/isc/timer.c U src/external/bsd/ntp/dist/lib/isc/socket_api.c U src/external/bsd/ntp/dist/lib/isc/sockaddr.c U src/external/bsd/ntp/dist/lib/isc/symtab.c U src/external/bsd/ntp/dist/lib/isc/sha2.c U src/external/bsd/ntp/dist/lib/isc/backtrace-emptytbl.c U src/external/bsd/ntp/dist/lib/isc/serial.c U src/external/bsd/ntp/dist/lib/isc/ondestroy.c U src/external/bsd/ntp/dist/lib/isc/md5.c U src/external/bsd/ntp/dist/lib/isc/iterated_hash.c U src/external/bsd/ntp/dist/lib/isc/timer_p.h U src/external/bsd/ntp/dist/lib/isc/mem_api.c U src/external/bsd/ntp/dist/lib/isc/refcount.c U src/external/bsd/ntp/dist/lib/isc/parseint.c U src/external/bsd/ntp/dist/lib/isc/print.c U src/external/bsd/ntp/dist/lib/isc/hash.c U src/external/bsd/ntp/dist/lib/isc/mem.c U src/external/bsd/ntp/dist/lib/isc/assertions.c U src/external/bsd/ntp/dist/lib/isc/task.c U src/external/bsd/ntp/dist/lib/isc/fsaccess.c U src/external/bsd/ntp/dist/lib/isc/heap.c U src/external/bsd/ntp/dist/lib/isc/lib.c U src/external/bsd/ntp/dist/lib/isc/ratelimiter.c U src/external/bsd/ntp/dist/lib/isc/sha1.c U src/external/bsd/ntp/dist/lib/isc/backtrace.c U src/external/bsd/ntp/dist/lib/isc/portset.c U src/external/bsd/ntp/dist/lib/isc/buffer.c U src/external/bsd/ntp/dist/lib/isc/base32.c U src/external/bsd/ntp/dist/lib/isc/commandline.c U src/external/bsd/ntp/dist/lib/isc/quota.c C src/external/bsd/ntp/dist/lib/isc/inet_pton.c U src/external/bsd/ntp/dist/lib/isc/lex.c U src/external/bsd/ntp/dist/lib/isc/inet_aton.c U src/external/bsd/ntp/dis
CVS commit: src/doc
Module Name:src Committed By: christos Date: Thu Apr 13 19:12:09 UTC 2017 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: new bind To generate a diff of this commit: cvs rdiff -u -r1.1429 -r1.1430 src/doc/3RDPARTY cvs rdiff -u -r1.2270 -r1.2271 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.1429 src/doc/3RDPARTY:1.1430 --- src/doc/3RDPARTY:1.1429 Mon Apr 10 12:44:46 2017 +++ src/doc/3RDPARTY Thu Apr 13 15:12:09 2017 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1429 2017/04/10 16:44:46 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1430 2017/04/13 19:12:09 christos Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -114,8 +114,8 @@ Notes: bc includes dc, both of which are in the NetBSD tree. Package: bind [named and utils] -Version: 9.10.4-P6/BSD 9.11.0-P3/MPL -Current Vers: 9.10.4-P6/BSD +Version: 9.10.4-P8/BSD 9.11.0-P3/MPL +Current Vers: 9.10.4-P8/BSD Maintainer: Paul Vixie Archive Site: ftp://ftp.isc.org/isc/bind9/ Home Page: http://www.isc.org/software/bind/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2270 src/doc/CHANGES:1.2271 --- src/doc/CHANGES:1.2270 Mon Apr 10 12:44:46 2017 +++ src/doc/CHANGES Thu Apr 13 15:12:09 2017 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2270 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2271 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -496,3 +496,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0: ptrace(2): Add operations to single step specified threads: PT_SETSTEP and PT_CLEARSTEP [kamil 20170408] dc(1): Import from OpenBSD (replaced GPL version) [christos 20170410] + bind: Import version 9.10.4-P8. [christos 20170413]
CVS commit: src/external/bsd/bind/dist
Module Name:src Committed By: christos Date: Thu Apr 13 19:11:20 UTC 2017 Modified Files: src/external/bsd/bind/dist: CHANGES README configure srcid version src/external/bsd/bind/dist/bin/named: query.c src/external/bsd/bind/dist/doc/arm: Bv9ARM.ch04.html Bv9ARM.ch06.html Bv9ARM.ch07.html Bv9ARM.ch08.html Bv9ARM.ch09.html Bv9ARM.html Bv9ARM.pdf man.arpaname.html man.ddns-confgen.html man.delv.html man.dig.html man.dnssec-checkds.html man.dnssec-coverage.html man.dnssec-dsfromkey.html man.dnssec-importkey.html man.dnssec-keyfromlabel.html man.dnssec-keygen.html man.dnssec-revoke.html man.dnssec-settime.html man.dnssec-signzone.html man.dnssec-verify.html man.genrandom.html man.host.html man.isc-hmac-fixup.html man.named-checkconf.html man.named-checkzone.html man.named-journalprint.html man.named-rrchecker.html man.named.html man.nsec3hash.html man.nsupdate.html man.rndc-confgen.html man.rndc.conf.html man.rndc.html src/external/bsd/bind/dist/lib/dns: api rdataset.c resolver.c src/external/bsd/bind/dist/lib/isc: lex.c src/external/bsd/bind/dist/lib/isc/include/isc: lex.h Log Message: merge conflicts. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/external/bsd/bind/dist/CHANGES cvs rdiff -u -r1.13 -r1.14 src/external/bsd/bind/dist/README cvs rdiff -u -r1.6 -r1.7 src/external/bsd/bind/dist/configure cvs rdiff -u -r1.19 -r1.20 src/external/bsd/bind/dist/srcid cvs rdiff -u -r1.23 -r1.24 src/external/bsd/bind/dist/version cvs rdiff -u -r1.23 -r1.24 src/external/bsd/bind/dist/bin/named/query.c cvs rdiff -u -r1.13 -r1.14 \ src/external/bsd/bind/dist/doc/arm/Bv9ARM.ch04.html \ src/external/bsd/bind/dist/doc/arm/Bv9ARM.ch06.html \ src/external/bsd/bind/dist/doc/arm/Bv9ARM.ch07.html \ src/external/bsd/bind/dist/doc/arm/Bv9ARM.ch08.html \ src/external/bsd/bind/dist/doc/arm/Bv9ARM.ch09.html \ src/external/bsd/bind/dist/doc/arm/Bv9ARM.html \ src/external/bsd/bind/dist/doc/arm/man.arpaname.html \ src/external/bsd/bind/dist/doc/arm/man.ddns-confgen.html \ src/external/bsd/bind/dist/doc/arm/man.delv.html \ src/external/bsd/bind/dist/doc/arm/man.dig.html \ src/external/bsd/bind/dist/doc/arm/man.dnssec-checkds.html \ src/external/bsd/bind/dist/doc/arm/man.dnssec-coverage.html \ src/external/bsd/bind/dist/doc/arm/man.dnssec-dsfromkey.html \ src/external/bsd/bind/dist/doc/arm/man.dnssec-importkey.html \ src/external/bsd/bind/dist/doc/arm/man.dnssec-keyfromlabel.html \ src/external/bsd/bind/dist/doc/arm/man.dnssec-keygen.html \ src/external/bsd/bind/dist/doc/arm/man.dnssec-revoke.html \ src/external/bsd/bind/dist/doc/arm/man.dnssec-settime.html \ src/external/bsd/bind/dist/doc/arm/man.dnssec-signzone.html \ src/external/bsd/bind/dist/doc/arm/man.dnssec-verify.html \ src/external/bsd/bind/dist/doc/arm/man.genrandom.html \ src/external/bsd/bind/dist/doc/arm/man.host.html \ src/external/bsd/bind/dist/doc/arm/man.isc-hmac-fixup.html \ src/external/bsd/bind/dist/doc/arm/man.named-checkconf.html \ src/external/bsd/bind/dist/doc/arm/man.named-checkzone.html \ src/external/bsd/bind/dist/doc/arm/man.named-journalprint.html \ src/external/bsd/bind/dist/doc/arm/man.named-rrchecker.html \ src/external/bsd/bind/dist/doc/arm/man.named.html \ src/external/bsd/bind/dist/doc/arm/man.nsec3hash.html \ src/external/bsd/bind/dist/doc/arm/man.nsupdate.html \ src/external/bsd/bind/dist/doc/arm/man.rndc-confgen.html \ src/external/bsd/bind/dist/doc/arm/man.rndc.conf.html \ src/external/bsd/bind/dist/doc/arm/man.rndc.html cvs rdiff -u -r1.18 -r1.19 src/external/bsd/bind/dist/doc/arm/Bv9ARM.pdf cvs rdiff -u -r1.13 -r1.14 src/external/bsd/bind/dist/lib/dns/api cvs rdiff -u -r1.9 -r1.10 src/external/bsd/bind/dist/lib/dns/rdataset.c cvs rdiff -u -r1.29 -r1.30 src/external/bsd/bind/dist/lib/dns/resolver.c cvs rdiff -u -r1.7 -r1.8 src/external/bsd/bind/dist/lib/isc/lex.c cvs rdiff -u -r1.4 -r1.5 src/external/bsd/bind/dist/lib/isc/include/isc/lex.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/bind/dist/CHANGES diff -u src/external/bsd/bind/dist/CHANGES:1.25 src/external/bsd/bind/dist/CHANGES:1.26 --- src/external/bsd/bind/dist/CHANGES:1.25 Wed Feb 8 19:23:26 2017 +++ src/external/bsd/bind/dist/CHANGES Thu Apr 13 15:11:19 2017 @@ -1,7 +1,27 @@ + --- 9.10.4-P8 released --- + +4582. [security] 'rndc ""' could trigger a assertion failure in named. + (CVE-2017-3138) [RT #44924] + +4580. [bug] 4578 introduced a regression when handling CNAME to + referral below the current domain. [RT #44850] + + --- 9.10.4-P7 released --- + +4578. [security] Some chaining (CNAME or DNAME) responses to upstream +
CVS commit: src/external/bsd/dhcpcd/sbin/dhcpcd
Module Name:src Committed By: roy Date: Thu Apr 13 18:12:32 UTC 2017 Modified Files: src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile Log Message: Add dhcpcd-embedded.h to DPSRCS to ensure it exists when generating dependencies. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.37 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.38 --- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.37 Sun Apr 2 20:17:11 2017 +++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Thu Apr 13 18:12:32 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.37 2017/04/02 20:17:11 roy Exp $ +# $NetBSD: Makefile,v 1.38 2017/04/13 18:12:32 roy Exp $ # WARNS?= 6 @@ -13,6 +13,9 @@ SRCS+= if.c if-options.c route.c sa.c s SRCS+= dhcp-common.c dhcpcd-embedded.c SRCS+= if-bsd.c +# Need to generate this for dependencies +DPSRCS+= dhcpcd-embedded.h + CPPFLAGS+= -DHAVE_CONFIG_H -D_OPENBSD_SOURCE USE_INET?= yes @@ -64,8 +67,6 @@ dhcpcd-embedded.h: genembedh ${DHCPCD_DE dhcpcd-embedded.c: genembedc ${DHCPCD_DEFS} dhcpcd-embedded.c.in ${HOST_SH} ${.ALLSRC} $^ > $@ -if-options.c: dhcpcd-embedded.h - CLEANFILES+= dhcpcd-embedded.c dhcpcd-embedded.h .for f in dhcpcd.conf.5 dhcpcd.8
CVS commit: src/external/bsd/blacklist
Module Name:src Committed By: christos Date: Thu Apr 13 17:59:34 UTC 2017 Modified Files: src/external/bsd/blacklist: README Log Message: Explain a bit more how to examine the blacklist state. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/bsd/blacklist/README Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/blacklist/README diff -u src/external/bsd/blacklist/README:1.7 src/external/bsd/blacklist/README:1.8 --- src/external/bsd/blacklist/README:1.7 Sun Jan 25 19:34:50 2015 +++ src/external/bsd/blacklist/README Thu Apr 13 13:59:34 2017 @@ -1,4 +1,4 @@ -# $NetBSD: README,v 1.7 2015/01/26 00:34:50 christos Exp $ +# $NetBSD: README,v 1.8 2017/04/13 17:59:34 christos Exp $ This package contains library that can be used by network daemons to communicate with a packet filter via a daemon to enforce opening and @@ -98,6 +98,16 @@ group "internal" on $int_if { ... } +You can use 'blacklistctl dump -a' to list all the current entries +in the database; the ones that have nfail / where urrent +>= otal, should have an id assosiated with them; this means that +there is a packet filter rule added for that entry. For npf, you +can examine the packet filter dynamic rule entries using 'npfctl +rule list'. The number of current entries can exceed +the total. This happens because entering packet filter rules is +asynchronous; there could be other connection before the rule +becomes activated. + Enjoy, christos
CVS commit: src/lib/libc/gen
Module Name:src Committed By: christos Date: Thu Apr 13 17:45:56 UTC 2017 Modified Files: src/lib/libc/gen: humanize_number.c Log Message: Fix out of bounds read for very large numbers (pointed out by Brooks Davis) https://svnweb.freebsd.org/changeset/base/316766 To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/gen/humanize_number.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/libc/gen/humanize_number.c diff -u src/lib/libc/gen/humanize_number.c:1.16 src/lib/libc/gen/humanize_number.c:1.17 --- src/lib/libc/gen/humanize_number.c:1.16 Sat Mar 17 16:01:14 2012 +++ src/lib/libc/gen/humanize_number.c Thu Apr 13 13:45:56 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: humanize_number.c,v 1.16 2012/03/17 20:01:14 christos Exp $ */ +/* $NetBSD: humanize_number.c,v 1.17 2017/04/13 17:45:56 christos Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: humanize_number.c,v 1.16 2012/03/17 20:01:14 christos Exp $"); +__RCSID("$NetBSD: humanize_number.c,v 1.17 2017/04/13 17:45:56 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -76,9 +76,9 @@ humanize_number(char *buf, size_t len, i } #define SCALE2PREFIX(scale) (&prefixes[(scale) << 1]) - maxscale = 7; + maxscale = 6; - if ((size_t)scale >= maxscale && + if ((size_t)scale > maxscale && (scale & (HN_AUTOSCALE | HN_GETSCALE)) == 0) return (-1);
CVS commit: src/usr.sbin/makefs
Module Name:src Committed By: christos Date: Thu Apr 13 17:21:29 UTC 2017 Modified Files: src/usr.sbin/makefs: makefs.8 Log Message: Explain the 's' image size better. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/usr.sbin/makefs/makefs.8 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/makefs/makefs.8 diff -u src/usr.sbin/makefs/makefs.8:1.61 src/usr.sbin/makefs/makefs.8:1.62 --- src/usr.sbin/makefs/makefs.8:1.61 Sun Feb 12 09:45:09 2017 +++ src/usr.sbin/makefs/makefs.8 Thu Apr 13 13:21:29 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: makefs.8,v 1.61 2017/02/12 14:45:09 wiz Exp $ +.\" $NetBSD: makefs.8,v 1.62 2017/04/13 17:21:29 christos Exp $ .\" .\" Copyright (c) 2001-2003 Wasabi Systems, Inc. .\" All rights reserved. @@ -33,7 +33,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 11, 2017 +.Dd April 13, 2017 .Dt MAKEFS 8 .Os .Sh NAME @@ -200,6 +200,19 @@ Defaults to 512. .It Fl s Ar image-size Set the size of the file system image to .Ar image-size . +This is equivalent of setting both the minimum +.Fl ( m ) +and the maximum +.Fl ( M ) +sizes to +.Ar image-size. +For +.Sy ffs +and +.Sy msdos +the +.Ar offset +is not included on that size. .It Fl T Ar timestamp Specify a timestamp to be set for all file system files and directories created so that repeatable builds are possible.
CVS commit: src/usr.sbin/makefs
Module Name:src Committed By: christos Date: Thu Apr 13 17:20:59 UTC 2017 Modified Files: src/usr.sbin/makefs: msdos.c Log Message: for consistency with ffs, don't count the offset into the size. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/makefs/msdos.c 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/makefs/msdos.c diff -u src/usr.sbin/makefs/msdos.c:1.18 src/usr.sbin/makefs/msdos.c:1.19 --- src/usr.sbin/makefs/msdos.c:1.18 Thu Feb 16 17:44:06 2017 +++ src/usr.sbin/makefs/msdos.c Thu Apr 13 13:20:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: msdos.c,v 1.18 2017/02/16 22:44:06 christos Exp $ */ +/* $NetBSD: msdos.c,v 1.19 2017/04/13 17:20:59 christos Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #include #if defined(__RCSID) && !defined(__lint) -__RCSID("$NetBSD: msdos.c,v 1.18 2017/02/16 22:44:06 christos Exp $"); +__RCSID("$NetBSD: msdos.c,v 1.19 2017/04/13 17:20:59 christos Exp $"); #endif /* !__lint */ #include @@ -157,12 +157,9 @@ msdos_makefs(const char *image, const ch assert(root != NULL); assert(fsopts != NULL); - /* - * XXX: pick up other options from the msdos specific ones? - * Is minsize right here? - */ + fsopts->size = fsopts->offset + fsopts->maxsize; msdos_opt->options.create_size = MAX(msdos_opt->options.create_size, - fsopts->minsize); + fsopts->size); msdos_opt->options.offset = fsopts->offset; if (msdos_opt->options.bytes_per_sector == 0) { if (fsopts->sectorsize == -1)
CVS commit: src/usr.sbin/makefs/msdos
Module Name:src Committed By: christos Date: Thu Apr 13 17:10:12 UTC 2017 Modified Files: src/usr.sbin/makefs/msdos: msdosfs_vnops.c Log Message: Fix error handling; msdosfs_wfile is supposed to return errno. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/makefs/msdos/msdosfs_vnops.c 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/makefs/msdos/msdosfs_vnops.c diff -u src/usr.sbin/makefs/msdos/msdosfs_vnops.c:1.18 src/usr.sbin/makefs/msdos/msdosfs_vnops.c:1.19 --- src/usr.sbin/makefs/msdos/msdosfs_vnops.c:1.18 Thu Feb 16 13:50:05 2017 +++ src/usr.sbin/makefs/msdos/msdosfs_vnops.c Thu Apr 13 13:10:12 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: msdosfs_vnops.c,v 1.18 2017/02/16 18:50:05 christos Exp $ */ +/* $NetBSD: msdosfs_vnops.c,v 1.19 2017/04/13 17:10:12 christos Exp $ */ /*- * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. @@ -51,7 +51,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.18 2017/02/16 18:50:05 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.19 2017/04/13 17:10:12 christos Exp $"); #include #include @@ -440,31 +440,29 @@ msdosfs_wfile(const char *path, struct d return 0; /* Don't bother to try to write files larger than the fs limit */ - if (st->st_size > MSDOSFS_FILESIZE_MAX) { - errno = EFBIG; - return -1; - } + if (st->st_size > MSDOSFS_FILESIZE_MAX) + return EFBIG; nsize = st->st_size; DPRINTF(("%s(nsize=%zu, osize=%zu)\n", __func__, nsize, osize)); if (nsize > osize) { - if ((error = deextend(dep, nsize, NULL)) != 0) { - errno = error; - return -1; - } - if ((error = msdosfs_updatede(dep)) != 0) { - errno = error; - return -1; - } + if ((error = deextend(dep, nsize, NULL)) != 0) + return error; + if ((error = msdosfs_updatede(dep)) != 0) + return error; } - if ((fd = open(path, O_RDONLY)) == -1) - err(1, "open %s", path); + if ((fd = open(path, O_RDONLY)) == -1) { + error = errno; + DPRINTF((1, "open %s: %s", path, strerror(error))); + return error; + } if ((dat = mmap(0, nsize, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, 0)) == MAP_FAILED) { - DPRINTF(("%s: mmap %s %s", __func__, node->name, - strerror(errno))); + error = errno; + DPRINTF(("%s: mmap %s: %s", __func__, node->name, + strerror(error))); close(fd); goto out; } @@ -478,6 +476,7 @@ msdosfs_wfile(const char *path, struct d cn = dep->de_StartCluster; if (cn == MSDOSFSROOT) { DPRINTF(("%s: bad lbn %lu", __func__, cn)); + error = EINVAL; goto out; } bn = cntobn(pmp, cn);
CVS commit: src
Module Name:src Committed By: christos Date: Thu Apr 13 16:38:32 UTC 2017 Modified Files: src/sys/net: pfkeyv2.h src/sys/netipsec: ah_var.h esp_var.h ipcomp_var.h xform_ah.c xform_esp.c xform_ipcomp.c src/usr.bin/netstat: fast_ipsec.c Log Message: Redo the statistics through an indirection array and put the definitions of the arrays in pfkeyv2.h so that they are next to the index definitions. Remove "bogus" comment about compressing the statistics which is now fixed. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/net/pfkeyv2.h cvs rdiff -u -r1.4 -r1.5 src/sys/netipsec/ah_var.h src/sys/netipsec/esp_var.h cvs rdiff -u -r1.6 -r1.7 src/sys/netipsec/ipcomp_var.h cvs rdiff -u -r1.46 -r1.47 src/sys/netipsec/xform_ah.c cvs rdiff -u -r1.49 -r1.50 src/sys/netipsec/xform_esp.c cvs rdiff -u -r1.32 -r1.33 src/sys/netipsec/xform_ipcomp.c cvs rdiff -u -r1.20 -r1.21 src/usr.bin/netstat/fast_ipsec.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/pfkeyv2.h diff -u src/sys/net/pfkeyv2.h:1.30 src/sys/net/pfkeyv2.h:1.31 --- src/sys/net/pfkeyv2.h:1.30 Thu Jun 9 15:54:18 2011 +++ src/sys/net/pfkeyv2.h Thu Apr 13 12:38:31 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pfkeyv2.h,v 1.30 2011/06/09 19:54:18 drochner Exp $ */ +/* $NetBSD: pfkeyv2.h,v 1.31 2017/04/13 16:38:31 christos Exp $ */ /* $KAME: pfkeyv2.h,v 1.36 2003/07/25 09:33:37 itojun Exp $ */ /* @@ -341,6 +341,16 @@ struct sadb_x_nat_t_frag { #define SADB_SAFLAGS_PFS 1 +/* + * Statistics variable definitions. For ESP/AH/IPCOMP we define + * indirection arrays of 256 elements indexed by algorithm (which + * is uint8_t. All unknown/unhandled entries are summed in the 0th + * element. We provide three variables per protocol: + * 1. *_STATS_INIT: a list of initializers + * 2. *_STATS_NUM: number of algorithms/statistics including (0/unknown) + * 3. *_STATS_STR: a list of strings to symbolically print the statistics + */ + /* RFC2367 numbers - meets RFC2407 */ #define SADB_AALG_NONE 0 #define SADB_AALG_MD5HMAC 2 @@ -361,6 +371,43 @@ struct sadb_x_nat_t_frag { #define SADB_X_AALG_NULL 251 /* null authentication */ #define SADB_X_AALG_TCP_MD5 252 /* Keyed TCP-MD5 (RFC2385) */ + +#define SADB_AALG_STATS_INIT \ +[SADB_AALG_NONE] = 1, \ +[SADB_AALG_MD5HMAC] = 2, \ +[SADB_AALG_SHA1HMAC] = 3, \ +[SADB_X_AALG_SHA2_256] = 4, \ +[SADB_X_AALG_SHA2_384] = 5, \ +[SADB_X_AALG_SHA2_512] = 6, \ +[SADB_X_AALG_RIPEMD160HMAC] = 7, \ +[SADB_X_AALG_AES_XCBC_MAC] = 8, \ +[SADB_X_AALG_AES128GMAC] = 9, \ +[SADB_X_AALG_AES192GMAC] = 10, \ +[SADB_X_AALG_AES256GMAC] = 11, \ +[SADB_X_AALG_MD5] = 12, \ +[SADB_X_AALG_SHA] = 13, \ +[SADB_X_AALG_NULL] = 14, \ +[SADB_X_AALG_TCP_MD5] = 15, + +#define SADB_AALG_STATS_NUM 16 +#define SADB_AALG_STATS_STR \ +"*unknown*", \ +"none", \ +"hmac-md5", \ +"hmac-sha1", \ +"hmac-sha2-256", \ +"hmac-sha2-384", \ +"hmac-sha2-512", \ +"hmac-ripe-md160", \ +"aes-xbc-mac", \ +"aes-128-mac", \ +"aes-192-mac", \ +"aes-256-mac", \ +"md5", \ +"sha", \ +"null", \ +"tcp-md5", + /* RFC2367 numbers - meets RFC2407 */ #define SADB_EALG_NONE 0 #define SADB_EALG_DESCBC 2 @@ -381,6 +428,40 @@ struct sadb_x_nat_t_frag { /* private allocations should use 249-255 (RFC2407) */ #define SADB_X_EALG_SKIPJACK250 +#define SADB_EALG_STATS_INIT \ +[SADB_EALG_NONE] = 1, \ +[SADB_EALG_DESCBC] = 2, \ +[SADB_EALG_3DESCBC] = 3, \ +[SADB_EALG_NULL] = 4, \ +[SADB_X_EALG_CAST128CBC] = 5, \ +[SADB_X_EALG_BLOWFISHCBC] = 6, \ +[SADB_X_EALG_RIJNDAELCBC] = 7, \ +[SADB_X_EALG_AESCTR] = 8, \ +[SADB_X_EALG_AESGCM8] = 9, \ +[SADB_X_EALG_AESGCM12] = 10, \ +[SADB_X_EALG_AESGCM16] = 11, \ +[SADB_X_EALG_CAMELLIACBC] = 12, \ +[SADB_X_EALG_AESGMAC] = 13, \ +[SADB_X_EALG_SKIPJACK] = 14, + +#define SADB_EALG_STATS_NUM 15 +#define SADB_EALG_STATS_STR \ +"*unknown*", \ +"none", \ +"des-cbc", \ +"3des-cbc", \ +"null", \ +"cast128-cbc", \ +"blowfish-cbc", \ +"aes-cbc", \ +"aes-ctr", \ +"aes-gcm-8", \ +"aes-gcm-12", \ +"aes-gcm-16", \ +"camelia-cbc", \ +"aes-gmac", \ +"skipjack", + /* private allocations - based on RFC2407/IANA assignment */ #define SADB_X_CALG_NONE 0 #define SADB_X_CALG_OUI 1 @@ -388,6 +469,22 @@ struct sadb_x_nat_t_frag { #define SADB_X_CALG_LZS 3 #define SADB_X_CALG_MAX 4 +#define SADB_CALG_STATS_INIT \ +[SADB_X_CALG_NONE] = 1, \ +[SADB_X_CALG_OUI] = 2, \ +[SADB_X_CALG_DEFLATE] = 3, \ +[SADB_X_CALG_LZS] = 4, + +#define SADB_CALG_STATS_NUM 5 + +#define SADB_CALG_STATS_STR \ +"*unknown*", \ +"none", \ +"oui", \ +"deflate", \ +"lzs", + + #define SADB_IDENTTYPE_RESERVED 0 #define SADB_IDENTTYPE_PREFIX 1 #define SADB_IDENTT
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Thu Apr 13 16:32:00 UTC 2017 Modified Files: src/sys/sys: param.h Log Message: bump to 59: mountiterator changes/vnode stuff make the tmpfs module crash. To generate a diff of this commit: cvs rdiff -u -r1.535 -r1.536 src/sys/sys/param.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/sys/param.h diff -u src/sys/sys/param.h:1.535 src/sys/sys/param.h:1.536 --- src/sys/sys/param.h:1.535 Mon Apr 10 15:52:38 2017 +++ src/sys/sys/param.h Thu Apr 13 12:32:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.535 2017/04/10 19:52:38 jdolecek Exp $ */ +/* $NetBSD: param.h,v 1.536 2017/04/13 16:32:00 christos Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -67,7 +67,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 799006800 /* NetBSD 7.99.68 */ +#define __NetBSD_Version__ 799006900 /* NetBSD 7.99.69 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: sjg Date: Thu Apr 13 16:23:39 UTC 2017 Modified Files: src/usr.bin/make/unit-tests: modmatch.exp modmatch.mk Log Message: Add test case for :M[^A-Z] To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/modmatch.exp \ src/usr.bin/make/unit-tests/modmatch.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/unit-tests/modmatch.exp diff -u src/usr.bin/make/unit-tests/modmatch.exp:1.1 src/usr.bin/make/unit-tests/modmatch.exp:1.2 --- src/usr.bin/make/unit-tests/modmatch.exp:1.1 Thu Aug 21 13:44:51 2014 +++ src/usr.bin/make/unit-tests/modmatch.exp Thu Apr 13 16:23:39 2017 @@ -14,4 +14,6 @@ LIB=e X_LIBS:M${LIB${LIB:tu}} is "/tmp/l LIB=e X_LIBS:M*/lib${LIB}.a is "/tmp/libe.a" LIB=e X_LIBS:M*/lib${LIB}.a:tu is "/TMP/LIBE.A" Mscanner=OK +Upper=One Two Three Four +Lower=five six seven exit status 0 Index: src/usr.bin/make/unit-tests/modmatch.mk diff -u src/usr.bin/make/unit-tests/modmatch.mk:1.1 src/usr.bin/make/unit-tests/modmatch.mk:1.2 --- src/usr.bin/make/unit-tests/modmatch.mk:1.1 Thu Aug 21 13:44:51 2014 +++ src/usr.bin/make/unit-tests/modmatch.mk Thu Apr 13 16:23:39 2017 @@ -15,7 +15,9 @@ res = no res = OK .endif -all: +all: show-libs check-cclass + +show-libs: @for x in $X; do ${.MAKE} -f ${MAKEFILE} show LIB=$$x; done @echo "Mscanner=${res}" @@ -23,3 +25,9 @@ show: @echo 'LIB=${LIB} X_LIBS:M$${LIB$${LIB:tu}} is "${X_LIBS:M${LIB${LIB:tu}}}"' @echo 'LIB=${LIB} X_LIBS:M*/lib$${LIB}.a is "${X_LIBS:M*/lib${LIB}.a}"' @echo 'LIB=${LIB} X_LIBS:M*/lib$${LIB}.a:tu is "${X_LIBS:M*/lib${LIB}.a:tu}"' + +LIST= One Two Three Four five six seven + +check-cclass: + @echo Upper=${LIST:M[A-Z]*} + @echo Lower=${LIST:M[^A-Z]*}
CVS commit: src/sbin/sysctl
Module Name:src Committed By: christos Date: Thu Apr 13 14:46:32 UTC 2017 Modified Files: src/sbin/sysctl: sysctl.c Log Message: say ipsec stats are viewable with netstat. To generate a diff of this commit: cvs rdiff -u -r1.158 -r1.159 src/sbin/sysctl/sysctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/sysctl/sysctl.c diff -u src/sbin/sysctl/sysctl.c:1.158 src/sbin/sysctl/sysctl.c:1.159 --- src/sbin/sysctl/sysctl.c:1.158 Sun Jul 31 19:30:28 2016 +++ src/sbin/sysctl/sysctl.c Thu Apr 13 10:46:32 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sysctl.c,v 1.158 2016/07/31 23:30:28 dholland Exp $ */ +/* $NetBSD: sysctl.c,v 1.159 2017/04/13 14:46:32 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\ #if 0 static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: sysctl.c,v 1.158 2016/07/31 23:30:28 dholland Exp $"); +__RCSID("$NetBSD: sysctl.c,v 1.159 2017/04/13 14:46:32 christos Exp $"); #endif #endif /* not lint */ @@ -218,6 +218,9 @@ static const struct handlespec { { "/net/[^/]+/[^/]+/pcblist", printother, NULL, "netstat' or 'sockstat" }, { "/net/(inet|inet6)/[^/]+/stats", printother, NULL, "netstat"}, + { "/net/inet/(ipip|esp|ah|ipcomp)/.*_stats", + printother, NULL, "netstat"}, + { "/net/inet/ipsec/ipsecstats", printother, NULL, "netstat"}, { "/net/bpf/(stats|peers)", printother, NULL, "netstat"}, { "/net/inet.*/tcp.*/deb.*", printother, NULL, "trpt" },
CVS commit: src/usr.bin/make
Module Name:src Committed By: christos Date: Thu Apr 13 13:55:23 UTC 2017 Modified Files: src/usr.bin/make: main.c Log Message: PR/52159: Jamie Landeg-Jones: Don't try to expand $'s in paths or system variables. Only expand them ${MAKE} variable values. To generate a diff of this commit: cvs rdiff -u -r1.259 -r1.260 src/usr.bin/make/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.259 src/usr.bin/make/main.c:1.260 --- src/usr.bin/make/main.c:1.259 Sun Mar 26 13:16:03 2017 +++ src/usr.bin/make/main.c Thu Apr 13 09:55:23 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.259 2017/03/26 17:16:03 sjg Exp $ */ +/* $NetBSD: main.c,v 1.260 2017/04/13 13:55:23 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.259 2017/03/26 17:16:03 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.260 2017/04/13 13:55:23 christos Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.259 2017/03/26 17:16:03 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.260 2017/04/13 13:55:23 christos Exp $"); #endif #endif /* not lint */ #endif @@ -691,22 +691,15 @@ Boolean Main_SetObjdir(const char *fmt, ...) { struct stat sb; - char *p, *path; - char buf[MAXPATHLEN + 1], pbuf[MAXPATHLEN + 1]; + char *path; + char buf[MAXPATHLEN + 1]; Boolean rc = FALSE; va_list ap; va_start(ap, fmt); - vsnprintf(path = pbuf, MAXPATHLEN, fmt, ap); + vsnprintf(path = buf, MAXPATHLEN, fmt, ap); va_end(ap); - /* expand variable substitutions */ - if (strchr(path, '$') != 0) { - snprintf(buf, MAXPATHLEN, "%s", path); - path = p = Var_Subst(NULL, buf, VAR_GLOBAL, VARF_WANTRES); - } else - p = NULL; - if (path[0] != '/') { snprintf(buf, MAXPATHLEN, "%s/%s", curdir, path); path = buf; @@ -729,19 +722,28 @@ Main_SetObjdir(const char *fmt, ...) } } - free(p); return rc; } static Boolean Main_SetVarObjdir(const char *var, const char *suffix) { - char *p1, *path; - if ((path = Var_Value(var, VAR_CMD, &p1)) == NULL) + char *p, *path, *xpath; + + if ((path = Var_Value(var, VAR_CMD, &p)) == NULL) return FALSE; - (void)Main_SetObjdir("%s%s", path, suffix); - free(p1); + /* expand variable substitutions */ + if (strchr(path, '$') != 0) + xpath = Var_Subst(NULL, path, VAR_GLOBAL, VARF_WANTRES); + else + xpath = path; + + (void)Main_SetObjdir("%s%s", xpath, suffix); + + if (xpath != path) + free(xpath); + free(p); return TRUE; }
CVS commit: src
Module Name:src Committed By: knakahara Date: Thu Apr 13 10:37:36 UTC 2017 Modified Files: src/share/man/man4: wm.4 src/sys/dev/pci: files.pci if_wm.c Log Message: wm(4) can disable msi/msix by build option and ddb command. suggested by nonaka@n.o. reviewed by msaitoh@n.o and nonaka@n.o. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/share/man/man4/wm.4 cvs rdiff -u -r1.387 -r1.388 src/sys/dev/pci/files.pci cvs rdiff -u -r1.507 -r1.508 src/sys/dev/pci/if_wm.c 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/wm.4 diff -u src/share/man/man4/wm.4:1.35 src/share/man/man4/wm.4:1.36 --- src/share/man/man4/wm.4:1.35 Wed Mar 22 09:38:10 2017 +++ src/share/man/man4/wm.4 Thu Apr 13 10:37:36 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: wm.4,v 1.35 2017/03/22 09:38:10 wiz Exp $ +.\" $NetBSD: wm.4,v 1.36 2017/04/13 10:37:36 knakahara Exp $ .\" .\" Copyright 2002, 2003 Wasabi Systems, Inc. .\" All rights reserved. @@ -196,6 +196,12 @@ Enable many event counters such as each counter. Caution: If this flag is enabled, the number of evcnt entries increase very much. +.It Dv WM_DISABLE_MSI +If this option is set non-zero value, this driver does not use msi. +The default value is 0. +.It Dv WM_DISABLE_MSIX +If this option is set non-zero value, this driver does not use msix. +The default value is 0. .El .Pp Setting Index: src/sys/dev/pci/files.pci diff -u src/sys/dev/pci/files.pci:1.387 src/sys/dev/pci/files.pci:1.388 --- src/sys/dev/pci/files.pci:1.387 Wed Mar 22 03:32:09 2017 +++ src/sys/dev/pci/files.pci Thu Apr 13 10:37:36 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.387 2017/03/22 03:32:09 knakahara Exp $ +# $NetBSD: files.pci,v 1.388 2017/04/13 10:37:36 knakahara Exp $ # # Config file and device description for machine-independent PCI code. # Included by ports that need it. Requires that the SCSI files be @@ -693,6 +693,8 @@ file dev/pci/if_wm.c wm defflag opt_if_wm.h WM_EVENT_COUNTERS defparam opt_if_wm.h WM_RX_PROCESS_LIMIT_DEFAULT WM_RX_INTR_PROCESS_LIMIT_DEFAULT + WM_DISABLE_MSI + WM_DISABLE_MSIX # Broadcom 570x Gigabit Ethernet device bge: ether, ifnet, arp, mii, mii_bitbang Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.507 src/sys/dev/pci/if_wm.c:1.508 --- src/sys/dev/pci/if_wm.c:1.507 Wed Apr 12 05:08:00 2017 +++ src/sys/dev/pci/if_wm.c Thu Apr 13 10:37:36 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.507 2017/04/12 05:08:00 knakahara Exp $ */ +/* $NetBSD: if_wm.c,v 1.508 2017/04/13 10:37:36 knakahara Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -84,7 +84,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.507 2017/04/12 05:08:00 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508 2017/04/13 10:37:36 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -173,6 +173,16 @@ int wm_debug = WM_DEBUG_TX | WM_DEBUG_RX #define WM_MAX_NQUEUEINTR 16 #define WM_MAX_NINTR (WM_MAX_NQUEUEINTR + 1) +#ifndef WM_DISABLE_MSI +#define WM_DISABLE_MSI 0 +#endif +#ifndef WM_DISABLE_MSIX +#define WM_DISABLE_MSIX 0 +#endif + +int wm_disable_msi = WM_DISABLE_MSI; +int wm_disable_msix = WM_DISABLE_MSIX; + /* * Transmit descriptor list size. Due to errata, we can only have * 256 hardware descriptors in the ring on < 82544, but we use 4096 @@ -1831,6 +1841,17 @@ wm_attach(device_t parent, device_t self counts[PCI_INTR_TYPE_MSIX] = sc->sc_nqueues + 1; counts[PCI_INTR_TYPE_MSI] = 1; counts[PCI_INTR_TYPE_INTX] = 1; + /* overridden by disable flags */ + if (wm_disable_msi != 0) { + counts[PCI_INTR_TYPE_MSI] = 0; + if (wm_disable_msix != 0) { + max_type = PCI_INTR_TYPE_INTX; + counts[PCI_INTR_TYPE_MSIX] = 0; + } + } else if (wm_disable_msix != 0) { + max_type = PCI_INTR_TYPE_MSI; + counts[PCI_INTR_TYPE_MSIX] = 0; + } alloc_retry: if (pci_intr_alloc(pa, &sc->sc_intrs, counts, max_type) != 0) {
CVS commit: src/sys/ufs/lfs
Module Name:src Committed By: hannken Date: Thu Apr 13 09:57:28 UTC 2017 Modified Files: src/sys/ufs/lfs: lfs_bio.c lfs_vfsops.c Log Message: Switch lfs_flush() and lfs_writerd() to mountlist iterator. To generate a diff of this commit: cvs rdiff -u -r1.137 -r1.138 src/sys/ufs/lfs/lfs_bio.c cvs rdiff -u -r1.356 -r1.357 src/sys/ufs/lfs/lfs_vfsops.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/ufs/lfs/lfs_bio.c diff -u src/sys/ufs/lfs/lfs_bio.c:1.137 src/sys/ufs/lfs/lfs_bio.c:1.138 --- src/sys/ufs/lfs/lfs_bio.c:1.137 Sat Apr 1 17:34:21 2017 +++ src/sys/ufs/lfs/lfs_bio.c Thu Apr 13 09:57:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_bio.c,v 1.137 2017/04/01 17:34:21 maya Exp $ */ +/* $NetBSD: lfs_bio.c,v 1.138 2017/04/13 09:57:28 hannken Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2008 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.137 2017/04/01 17:34:21 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.138 2017/04/13 09:57:28 hannken Exp $"); #include #include @@ -514,7 +514,8 @@ void lfs_flush(struct lfs *fs, int flags, int only_onefs) { extern u_int64_t locked_fakequeue_count; - struct mount *mp, *nmp; + mount_iterator_t *iter; + struct mount *mp; struct lfs *tfs; KASSERT(mutex_owned(&lfs_lock)); @@ -543,12 +544,8 @@ lfs_flush(struct lfs *fs, int flags, int vfs_unbusy(fs->lfs_ivnode->v_mount, false, NULL); } else { locked_fakequeue_count = 0; - mutex_enter(&mountlist_lock); - for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { - if (vfs_busy(mp, &nmp)) { -DLOG((DLOG_FLUSH, "lfs_flush: fs vfs_busy\n")); -continue; - } + mountlist_iterator_init(&iter); + while ((mp = mountlist_iterator_next(iter)) != NULL) { if (strncmp(&mp->mnt_stat.f_fstypename[0], MOUNT_LFS, sizeof(mp->mnt_stat.f_fstypename)) == 0) { tfs = VFSTOULFS(mp)->um_lfs; @@ -556,9 +553,8 @@ lfs_flush(struct lfs *fs, int flags, int lfs_flush_fs(tfs, flags); mutex_exit(&lfs_lock); } - vfs_unbusy(mp, false, &nmp); } - mutex_exit(&mountlist_lock); + mountlist_iterator_destroy(iter); } LFS_DEBUG_COUNTLOCKED("flush"); wakeup(&lfs_subsys_pages); Index: src/sys/ufs/lfs/lfs_vfsops.c diff -u src/sys/ufs/lfs/lfs_vfsops.c:1.356 src/sys/ufs/lfs/lfs_vfsops.c:1.357 --- src/sys/ufs/lfs/lfs_vfsops.c:1.356 Sat Apr 1 17:34:21 2017 +++ src/sys/ufs/lfs/lfs_vfsops.c Thu Apr 13 09:57:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_vfsops.c,v 1.356 2017/04/01 17:34:21 maya Exp $ */ +/* $NetBSD: lfs_vfsops.c,v 1.357 2017/04/13 09:57:28 hannken Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007 @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.356 2017/04/01 17:34:21 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.357 2017/04/13 09:57:28 hannken Exp $"); #if defined(_KERNEL_OPT) #include "opt_lfs.h" @@ -387,11 +387,11 @@ struct pool lfs_lbnentry_pool; static void lfs_writerd(void *arg) { - struct mount *mp, *nmp; + mount_iterator_t *iter; + struct mount *mp; struct lfs *fs; struct vfsops *vfs = NULL; int fsflags; - int skipc; int lfsc; int wrote_something = 0; @@ -446,14 +446,9 @@ lfs_writerd(void *arg) * Look through the list of LFSs to see if any of them * have requested pageouts. */ - mutex_enter(&mountlist_lock); + mountlist_iterator_init(&iter); lfsc = 0; - skipc = 0; - for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { - if (vfs_busy(mp, &nmp)) { -++skipc; - continue; - } + while ((mp = mountlist_iterator_next(iter)) != NULL) { KASSERT(!mutex_owned(&lfs_lock)); if (strncmp(mp->mnt_stat.f_fstypename, MOUNT_LFS, sizeof(mp->mnt_stat.f_fstypename)) == 0) { @@ -468,7 +463,6 @@ lfs_writerd(void *arg) if (lfs_sb_getnextseg(fs) < lfs_sb_getcurseg(fs) && fs->lfs_nowrap) { /* Don't try to write if we're suspended */ mutex_exit(&lfs_lock); - vfs_unbusy(mp, false, &nmp); continue; } if (LFS_STARVED_FOR_SEGS(fs)) { @@ -476,7 +470,6 @@ lfs_writerd(void *arg) DLOG((DLOG_FLUSH, "lfs_writerd: need cleaning before writing possible\n")); lfs_wakeup_cleaner(fs); - vfs_unbusy(mp, false, &nmp); continue; } @@ -503,21 +496,19 @@ lfs_writerd(void *arg) mutex_exit(&lfs_lock); } KASSERT(!mutex_owned(&lfs_lock)); - vfs_unbusy(mp, false, &nmp); } - if (lfsc + skipc == 0) { + if (lfsc == 0) { mutex_enter(&lfs_lock); lfs_writer_daemon = NULL; mutex_exit(&lfs_lock); - mutex_exit(&mountlist_lock); + mountlist_iterator_destroy(iter); break; } - mutex_exit(&mountlist_lock); + mountlist_iterator_destroy(iter); mutex_enter(&lfs_lock); } KASSERT(!mutex_owned(&lfs_lock)); - KASSERT(!mutex_owned(&mountlist_lock)); /* Give up o
CVS commit: src/sys/miscfs/procfs
Module Name:src Committed By: hannken Date: Thu Apr 13 09:54:18 UTC 2017 Modified Files: src/sys/miscfs/procfs: procfs_linux.c Log Message: Switch procfs_domounts() to mountlist iterator. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/miscfs/procfs/procfs_linux.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/miscfs/procfs/procfs_linux.c diff -u src/sys/miscfs/procfs/procfs_linux.c:1.72 src/sys/miscfs/procfs/procfs_linux.c:1.73 --- src/sys/miscfs/procfs/procfs_linux.c:1.72 Mon Mar 28 17:23:47 2016 +++ src/sys/miscfs/procfs/procfs_linux.c Thu Apr 13 09:54:18 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_linux.c,v 1.72 2016/03/28 17:23:47 mlelstv Exp $ */ +/* $NetBSD: procfs_linux.c,v 1.73 2017/04/13 09:54:18 hannken Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.72 2016/03/28 17:23:47 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.73 2017/04/13 09:54:18 hannken Exp $"); #include #include @@ -603,26 +603,22 @@ procfs_domounts(struct lwp *curl, struct { char *bf, *mtab = NULL; size_t mtabsz = 0; - struct mount *mp, *nmp; + mount_iterator_t *iter; + struct mount *mp; int error = 0, root = 0; struct cwdinfo *cwdi = curl->l_proc->p_cwdi; bf = malloc(LBFSZ, M_TEMP, M_WAITOK); - mutex_enter(&mountlist_lock); - for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { + mountlist_iterator_init(&iter); + while ((mp = mountlist_iterator_next(iter)) != NULL) { struct statvfs sfs; - if (vfs_busy(mp, &nmp)) - continue; - if ((error = dostatvfs(mp, &sfs, curl, MNT_WAIT, 0)) == 0) root |= procfs_format_sfs(&mtab, &mtabsz, bf, LBFSZ, &sfs, curl, 0); - - vfs_unbusy(mp, false, &nmp); } - mutex_exit(&mountlist_lock); + mountlist_iterator_destroy(iter); /* * If we are inside a chroot that is not itself a mount point,
CVS commit: src/sys/gdbscripts
Module Name:src Committed By: hannken Date: Thu Apr 13 09:52:18 UTC 2017 Modified Files: src/sys/gdbscripts: vchain Log Message: Change command mountdump to evaluate mountlist_entry. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/gdbscripts/vchain Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/gdbscripts/vchain diff -u src/sys/gdbscripts/vchain:1.8 src/sys/gdbscripts/vchain:1.9 --- src/sys/gdbscripts/vchain:1.8 Wed Dec 14 15:48:55 2016 +++ src/sys/gdbscripts/vchain Thu Apr 13 09:52:18 2017 @@ -1,4 +1,4 @@ -# $NetBSD: vchain,v 1.8 2016/12/14 15:48:55 hannken Exp $ +# $NetBSD: vchain,v 1.9 2017/04/13 09:52:18 hannken Exp $ # @(#)vchain 8.1 (Berkeley) 6/10/93 # @@ -53,14 +53,18 @@ print vnode chains for all mount points end define mountdump - set $mp=mountlist.tqh_first - while ($mp) - printf "%s on %s type %s, (mp 0x%x, privdata 0x%x)\n", \ - $mp->mnt_stat->f_mntfromname, $mp->mnt_stat->f_mntonname, \ - $mp->mnt_op->vfs_name, $mp, $mp->mnt_data - set $mp=$mp->mnt_list.tqe_next - if ((const void *)$mp == (const void *)&mountlist) - set $mp = 0 + set $me=mount_list.tqh_first + while ($me) + if ($me->me_type == ME_MOUNT) + set $mp = $me->me_mount + printf "%s on %s type %s, (mp 0x%x, privdata 0x%x)\n", \ + $mp->mnt_stat->f_mntfromname, \ + $mp->mnt_stat->f_mntonname, \ + $mp->mnt_op->vfs_name, $mp, $mp->mnt_data + end + set $me=$me->me_list.tqe_next + if ((const void *)$me == (const void *)&mount_list) + set $me = 0 end end end
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: hannken Date: Thu Apr 13 09:46:59 UTC 2017 Modified Files: src/sys/compat/netbsd32: netbsd32_compat_20.c Log Message: Switch compat_20_netbsd32_getfsstat() to mountlist iterator. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/compat/netbsd32/netbsd32_compat_20.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/compat/netbsd32/netbsd32_compat_20.c diff -u src/sys/compat/netbsd32/netbsd32_compat_20.c:1.35 src/sys/compat/netbsd32/netbsd32_compat_20.c:1.36 --- src/sys/compat/netbsd32/netbsd32_compat_20.c:1.35 Tue Mar 28 18:44:04 2017 +++ src/sys/compat/netbsd32/netbsd32_compat_20.c Thu Apr 13 09:46:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_compat_20.c,v 1.35 2017/03/28 18:44:04 chs Exp $ */ +/* $NetBSD: netbsd32_compat_20.c,v 1.36 2017/04/13 09:46:59 hannken Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_20.c,v 1.35 2017/03/28 18:44:04 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_20.c,v 1.36 2017/04/13 09:46:59 hannken Exp $"); #include #include @@ -85,7 +85,8 @@ compat_20_netbsd32_getfsstat(struct lwp } */ int root = 0; struct proc *p = l->l_proc; - struct mount *mp, *nmp; + mount_iterator_t *iter; + struct mount *mp; struct statvfs *sb; struct netbsd32_statfs sb32; void *sfsp; @@ -95,32 +96,24 @@ compat_20_netbsd32_getfsstat(struct lwp sb = STATVFSBUF_GET(); maxcount = SCARG(uap, bufsize) / sizeof(struct netbsd32_statfs); sfsp = SCARG_P32(uap, buf); - mutex_enter(&mountlist_lock); + mountlist_iterator_init(&iter); count = 0; - for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { - if (vfs_busy(mp, &nmp)) { - continue; - } + while ((mp = mountlist_iterator_next(iter)) != NULL) { if (sfsp && count < maxcount) { error = dostatvfs(mp, sb, l, SCARG(uap, flags), 0); if (error) { -vfs_unbusy(mp, false, &nmp); error = 0; continue; } compat_20_netbsd32_from_statvfs(sb, &sb32); error = copyout(&sb32, sfsp, sizeof(sb32)); - if (error) { -vfs_unbusy(mp, false, NULL); + if (error) goto out; - } sfsp = (char *)sfsp + sizeof(sb32); root |= strcmp(sb->f_mntonname, "/") == 0; } count++; - vfs_unbusy(mp, false, &nmp); } - mutex_exit(&mountlist_lock); if (root == 0 && p->p_cwdi->cwdi_rdir) { /* @@ -144,6 +137,7 @@ compat_20_netbsd32_getfsstat(struct lwp else *retval = count; out: + mountlist_iterator_destroy(iter); STATVFSBUF_PUT(sb); return error; }
CVS commit: src/sys/compat/ndis
Module Name:src Committed By: hannken Date: Thu Apr 13 09:44:48 UTC 2017 Modified Files: src/sys/compat/ndis: subr_ndis.c Log Message: Switch NdisOpenFile() to mountlist iterator. XXX: Do we need a function or variable to retrieve the root mount or NULL? To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/compat/ndis/subr_ndis.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/compat/ndis/subr_ndis.c diff -u src/sys/compat/ndis/subr_ndis.c:1.28 src/sys/compat/ndis/subr_ndis.c:1.29 --- src/sys/compat/ndis/subr_ndis.c:1.28 Tue Mar 25 16:23:58 2014 +++ src/sys/compat/ndis/subr_ndis.c Thu Apr 13 09:44:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_ndis.c,v 1.28 2014/03/25 16:23:58 christos Exp $ */ +/* $NetBSD: subr_ndis.c,v 1.29 2017/04/13 09:44:48 hannken Exp $ */ /*- * Copyright (c) 2003 @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.67.2.7 2005/03/31 21:50:11 wpaul Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: subr_ndis.c,v 1.28 2014/03/25 16:23:58 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_ndis.c,v 1.29 2017/04/13 09:44:48 hannken Exp $"); #endif /* @@ -3042,6 +3042,8 @@ NdisOpenFile(ndis_status *status, ndis_h char *path; linker_file_t head, lf; void *kldstart, *kldend; + mount_iterator_t *iter; + struct mount *mp; ndis_unicode_to_ascii(filename->us_buf, filename->us_len, &afilename); @@ -3094,7 +3096,10 @@ NdisOpenFile(ndis_status *status, ndis_h return; } - if (TAILQ_EMPTY(&mountlist)) { + mountlist_iterator_init(&iter); + mp = mountlist_iterator_next(iter); + mountlist_iterator_destroy(iter); + if (mp == NULL) { ExFreePool(fh); *status = NDIS_STATUS_FILE_NOT_FOUND; printf("NDIS: could not find file %s in linker list\n",
CVS commit: src/sys/compat/common
Module Name:src Committed By: hannken Date: Thu Apr 13 09:41:28 UTC 2017 Modified Files: src/sys/compat/common: vfs_syscalls_20.c Log Message: Switch compat_20_sys_getfsstat() to mountlist iterator. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/compat/common/vfs_syscalls_20.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/compat/common/vfs_syscalls_20.c diff -u src/sys/compat/common/vfs_syscalls_20.c:1.39 src/sys/compat/common/vfs_syscalls_20.c:1.40 --- src/sys/compat/common/vfs_syscalls_20.c:1.39 Fri Jul 24 13:02:52 2015 +++ src/sys/compat/common/vfs_syscalls_20.c Thu Apr 13 09:41:28 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls_20.c,v 1.39 2015/07/24 13:02:52 maxv Exp $ */ +/* $NetBSD: vfs_syscalls_20.c,v 1.40 2017/04/13 09:41:28 hannken Exp $ */ /* * Copyright (c) 1989, 1993 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_20.c,v 1.39 2015/07/24 13:02:52 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls_20.c,v 1.40 2017/04/13 09:41:28 hannken Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -203,7 +203,8 @@ compat_20_sys_getfsstat(struct lwp *l, c syscallarg(int) flags; } */ int root = 0; - struct mount *mp, *nmp; + mount_iterator_t *iter; + struct mount *mp; struct statvfs *sbuf; struct statfs12 *sfsp; size_t count, maxcount; @@ -212,30 +213,21 @@ compat_20_sys_getfsstat(struct lwp *l, c sbuf = malloc(sizeof(*sbuf), M_TEMP, M_WAITOK); maxcount = (size_t)SCARG(uap, bufsize) / sizeof(struct statfs12); sfsp = SCARG(uap, buf); - mutex_enter(&mountlist_lock); count = 0; - for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { - if (vfs_busy(mp, &nmp)) { - continue; - } + mountlist_iterator_init(&iter); + while ((mp = mountlist_iterator_next(iter)) != NULL) { if (sfsp && count < maxcount) { error = dostatvfs(mp, sbuf, l, SCARG(uap, flags), 0); - if (error) { -vfs_unbusy(mp, false, &nmp); + if (error) continue; - } error = vfs2fs(sfsp, sbuf); - if (error) { -vfs_unbusy(mp, false, NULL); + if (error) goto out; - } sfsp++; root |= strcmp(sbuf->f_mntonname, "/") == 0; } count++; - vfs_unbusy(mp, false, &nmp); } - mutex_exit(&mountlist_lock); if (root == 0 && l->l_proc->p_cwdi->cwdi_rdir) { /* * fake a root entry @@ -252,6 +244,7 @@ compat_20_sys_getfsstat(struct lwp *l, c else *retval = count; out: + mountlist_iterator_destroy(iter); free(sbuf, M_TEMP); return error; }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Thu Apr 13 09:25:34 UTC 2017 Modified Files: src/sys/dev/pci: if_bge.c Log Message: Add forgotten BGE_EVCNT_INCR() for spurious interrupt. To generate a diff of this commit: cvs rdiff -u -r1.305 -r1.306 src/sys/dev/pci/if_bge.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_bge.c diff -u src/sys/dev/pci/if_bge.c:1.305 src/sys/dev/pci/if_bge.c:1.306 --- src/sys/dev/pci/if_bge.c:1.305 Thu Apr 13 04:27:46 2017 +++ src/sys/dev/pci/if_bge.c Thu Apr 13 09:25:33 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bge.c,v 1.305 2017/04/13 04:27:46 msaitoh Exp $ */ +/* $NetBSD: if_bge.c,v 1.306 2017/04/13 09:25:33 msaitoh Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -79,7 +79,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.305 2017/04/13 04:27:46 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.306 2017/04/13 09:25:33 msaitoh Exp $"); #include #include @@ -4767,12 +4767,14 @@ bge_intr(void *xsc) if (sc->bge_flags & BGEF_TAGGED_STATUS) { if (sc->bge_lasttag == statustag && (~pcistate & intrmask)) { + BGE_EVCNT_INCR(sc->bge_ev_intr_spurious); return (0); } sc->bge_lasttag = statustag; } else { if (!(statusword & BGE_STATFLAG_UPDATED) && !(~pcistate & intrmask)) { + BGE_EVCNT_INCR(sc->bge_ev_intr_spurious2); return (0); } statustag = 0;
CVS commit: src/sys/compat/ultrix
Module Name:src Committed By: hannken Date: Thu Apr 13 09:18:18 UTC 2017 Modified Files: src/sys/compat/ultrix: ultrix_fs.c Log Message: Switch ultrix_sys_getmnt() to mountlist iterator. Really skip "start" items instead of a useless loop. Compile tested only. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/compat/ultrix/ultrix_fs.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/compat/ultrix/ultrix_fs.c diff -u src/sys/compat/ultrix/ultrix_fs.c:1.56 src/sys/compat/ultrix/ultrix_fs.c:1.57 --- src/sys/compat/ultrix/ultrix_fs.c:1.56 Fri Oct 23 19:40:11 2015 +++ src/sys/compat/ultrix/ultrix_fs.c Thu Apr 13 09:18:18 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ultrix_fs.c,v 1.56 2015/10/23 19:40:11 maxv Exp $ */ +/* $NetBSD: ultrix_fs.c,v 1.57 2017/04/13 09:18:18 hannken Exp $ */ /* * Copyright (c) 1995, 1997 Jonathan Stone @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.56 2015/10/23 19:40:11 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ultrix_fs.c,v 1.57 2017/04/13 09:18:18 hannken Exp $"); #include #include @@ -206,9 +206,10 @@ make_ultrix_mntent(struct statvfs *sp, s int ultrix_sys_getmnt(struct lwp *l, const struct ultrix_sys_getmnt_args *uap, register_t *retval) { - struct mount *mp, *nmp; + struct mount *mp; struct statvfs *sp; struct ultrix_fs_data *sfsp; + mount_iterator_t *iter; char *path; int mntflags; int skip; @@ -216,7 +217,6 @@ ultrix_sys_getmnt(struct lwp *l, const s long count, maxcount; int error; - nmp = NULL; /* XXX keep gcc quiet */ path = NULL; error = 0; maxcount = SCARG(uap, bufsize) / sizeof(struct ultrix_fs_data); @@ -237,6 +237,7 @@ ultrix_sys_getmnt(struct lwp *l, const s if ((error = copyinstr(SCARG(uap, path), path, MAXPATHLEN, NULL)) != 0) goto bad; + skip = 0; maxcount = 1; } else { /* @@ -247,20 +248,14 @@ ultrix_sys_getmnt(struct lwp *l, const s if ((error = copyin((void *)SCARG(uap, start), &start, sizeof(*SCARG(uap, start != 0) goto bad; - mutex_enter(&mountlist_lock); - for (skip = start, mp = TAILQ_FIRST(&mountlist); - mp != NULL && skip-- > 0; - mp = TAILQ_NEXT(mp, mnt_list)) - continue; - mutex_exit(&mountlist_lock); + skip = start; } - mutex_enter(&mountlist_lock); - for (count = 0, mp = TAILQ_FIRST(&mountlist); - mp != NULL && count < maxcount; mp = nmp) { - if (vfs_busy(mp, &nmp)) { + count = 0; + mountlist_iterator_init(&iter); + while (count < maxcount && (mp = mountlist_iterator_next(iter))) { + if (skip-- > 0) continue; - } if (sfsp != NULL) { struct ultrix_fs_data tem; sp = &mp->mnt_stat; @@ -281,16 +276,13 @@ ultrix_sys_getmnt(struct lwp *l, const s make_ultrix_mntent(sp, &tem); if ((error = copyout((void *)&tem, sfsp, sizeof(tem))) != 0) { - vfs_unbusy(mp, false, NULL); goto bad; } sfsp++; count++; } } - vfs_unbusy(mp, false, &nmp); } - mutex_exit(&mountlist_lock); if (sfsp != NULL && count > maxcount) *retval = maxcount; @@ -298,6 +290,7 @@ ultrix_sys_getmnt(struct lwp *l, const s *retval = count; bad: + mountlist_iterator_destroy(iter); if (path) free(path, M_TEMP); return error;
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: hannken Date: Thu Apr 13 09:17:55 UTC 2017 Modified Files: src/sys/compat/osf1: osf1_mount.c Log Message: Switch osf1_sys_getfsstat() to mountlist iterator. Compile tested only. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/compat/osf1/osf1_mount.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/compat/osf1/osf1_mount.c diff -u src/sys/compat/osf1/osf1_mount.c:1.53 src/sys/compat/osf1/osf1_mount.c:1.54 --- src/sys/compat/osf1/osf1_mount.c:1.53 Fri Oct 23 19:40:11 2015 +++ src/sys/compat/osf1/osf1_mount.c Thu Apr 13 09:17:55 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_mount.c,v 1.53 2015/10/23 19:40:11 maxv Exp $ */ +/* $NetBSD: osf1_mount.c,v 1.54 2017/04/13 09:17:55 hannken Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: osf1_mount.c,v 1.53 2015/10/23 19:40:11 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_mount.c,v 1.54 2017/04/13 09:17:55 hannken Exp $"); #include #include @@ -132,7 +132,8 @@ osf1_sys_fstatfs(struct lwp *l, const st int osf1_sys_getfsstat(struct lwp *l, const struct osf1_sys_getfsstat_args *uap, register_t *retval) { - struct mount *mp, *nmp; + mount_iterator_t *iter; + struct mount *mp; struct statvfs *sp; struct osf1_statfs osfs; char *osf_sfsp; @@ -143,13 +144,9 @@ osf1_sys_getfsstat(struct lwp *l, const maxcount = SCARG(uap, bufsize) / sizeof(struct osf1_statfs); osf_sfsp = (void *)SCARG(uap, buf); - mutex_enter(&mountlist_lock); - for (count = 0, mp = TAILQ_FIRST(&mountlist); - mp != NULL; - mp = nmp) { - if (vfs_busy(mp, &nmp)) { - continue; - } + mountlist_iterator_init(&iter); + count = 0; + while ((mp = mountlist_iterator_next(iter)) != NULL) { if (osf_sfsp && count < maxcount) { sp = &mp->mnt_stat; /* @@ -164,16 +161,15 @@ osf1_sys_getfsstat(struct lwp *l, const osf1_cvt_statfs_from_native(sp, &osfs); if ((error = copyout(&osfs, osf_sfsp, sizeof (struct osf1_statfs { - vfs_unbusy(mp, false, NULL); + mountlist_iterator_destroy(iter); return (error); } osf_sfsp += sizeof (struct osf1_statfs); } } count++; - vfs_unbusy(mp, false, &nmp); } - mutex_exit(&mountlist_lock); + mountlist_iterator_destroy(iter); if (osf_sfsp && count > maxcount) *retval = maxcount; else
CVS commit: src/sys/kern
Module Name:src Committed By: skrll Date: Thu Apr 13 07:58:45 UTC 2017 Modified Files: src/sys/kern: sys_process.c Log Message: Paranoia... keep vmspace reference while doing pmap_procwr To generate a diff of this commit: cvs rdiff -u -r1.178 -r1.179 src/sys/kern/sys_process.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/kern/sys_process.c diff -u src/sys/kern/sys_process.c:1.178 src/sys/kern/sys_process.c:1.179 --- src/sys/kern/sys_process.c:1.178 Fri Mar 24 17:40:44 2017 +++ src/sys/kern/sys_process.c Thu Apr 13 07:58:45 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_process.c,v 1.178 2017/03/24 17:40:44 christos Exp $ */ +/* $NetBSD: sys_process.c,v 1.179 2017/04/13 07:58:45 skrll Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -118,7 +118,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_process.c,v 1.178 2017/03/24 17:40:44 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_process.c,v 1.179 2017/04/13 07:58:45 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_ptrace.h" @@ -177,12 +177,13 @@ process_domem(struct lwp *curl /*tracer* if (error != 0) return error; error = uvm_io(&vm->vm_map, uio, pax_mprotect_prot(l)); - uvmspace_free(vm); #ifdef PMAP_NEED_PROCWR if (error == 0 && uio->uio_rw == UIO_WRITE) pmap_procwr(p, addr, len); #endif + uvmspace_free(vm); + return error; } #endif /* KTRACE || PTRACE_HOOKS */
CVS commit: src/common/lib/libc/arch/arm/string
Module Name:src Committed By: skrll Date: Thu Apr 13 07:49:52 UTC 2017 Modified Files: src/common/lib/libc/arch/arm/string: memmove.S Log Message: Comment alignment. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/common/lib/libc/arch/arm/string/memmove.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/arm/string/memmove.S diff -u src/common/lib/libc/arch/arm/string/memmove.S:1.9 src/common/lib/libc/arch/arm/string/memmove.S:1.10 --- src/common/lib/libc/arch/arm/string/memmove.S:1.9 Thu Mar 26 13:34:51 2015 +++ src/common/lib/libc/arch/arm/string/memmove.S Thu Apr 13 07:49:52 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: memmove.S,v 1.9 2015/03/26 13:34:51 justin Exp $ */ +/* $NetBSD: memmove.S,v 1.10 2017/04/13 07:49:52 skrll Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ ENTRY(bcopy) ands r12, r0, #3 bne .Lmemmove_fdestul /* oh unaligned destination addr */ ands r12, r1, #3 - bne .Lmemmove_fsrcul /* oh unaligned source addr */ + bne .Lmemmove_fsrcul /* oh unaligned source addr */ .Lmemmove_ft8: /* We have aligned source and destination */
CVS commit: src/share/man/man4
Module Name:src Committed By: skrll Date: Thu Apr 13 07:22:50 UTC 2017 Modified Files: src/share/man/man4: axen.4 Log Message: Fix details around the AX88179 USB 3.0 chipset To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/axen.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/axen.4 diff -u src/share/man/man4/axen.4:1.5 src/share/man/man4/axen.4:1.6 --- src/share/man/man4/axen.4:1.5 Thu Jan 7 12:31:55 2016 +++ src/share/man/man4/axen.4 Thu Apr 13 07:22:50 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: axen.4,v 1.5 2016/01/07 12:31:55 nonaka Exp $ +.\" $NetBSD: axen.4,v 1.6 2017/04/13 07:22:50 skrll Exp $ .\" $OpenBSD: axen.4,v 1.2 2013/10/07 07:18:36 jmc Exp $ .\" .\" Copyright (c) 2013 Yojiro UO @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd April 21, 2015 +.Dd April 13, 2017 .Dt AXEN 4 .Os .Sh NAME @@ -28,9 +28,7 @@ The .Nm driver provides support for USB Ethernet adapters based on the ASIX -Electronics AX88178a and AX88779 USB 2.0 chipsets -(potentially the AX88779 supports USB 3.0, but there is currently no xhci support in -.Nx ) , +Electronics AX88178a USB 2.0 and AX88179 USB 3.0 chipsets including the following: .Pp .Bl -tag -width Ds -offset indent -compact