CVS commit: src/distrib/sets
Module Name:src Committed By: martin Date: Wed May 27 09:26:46 UTC 2015 Modified Files: src/distrib/sets: maketars Log Message: Instead of guessing wether to preserve permissions on install operations from the METALOG variable, default them to yes and add a new argument -U to switch preservation off. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/distrib/sets/maketars 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/maketars diff -u src/distrib/sets/maketars:1.82 src/distrib/sets/maketars:1.83 --- src/distrib/sets/maketars:1.82 Tue May 26 15:46:01 2015 +++ src/distrib/sets/maketars Wed May 27 09:26:46 2015 @@ -1,11 +1,11 @@ #!/bin/sh # -# $NetBSD: maketars,v 1.82 2015/05/26 15:46:01 martin Exp $ +# $NetBSD: maketars,v 1.83 2015/05/27 09:26:46 martin Exp $ # # Make release tar files for some or all lists. Usage: # maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir] # [-M metalog] [-N etcdir] [-F setlistsdir] [-d destdir] -# [-t tardir] [setname ...] +# [-t tardir] [-U] [setname ...] # # The default sets are base comp debug etc games man misc tests text # The X sets are xbase xcomp xdebug xetc xfont xserver @@ -31,6 +31,7 @@ setlistdir= setfilesonly=false quiet=false skipkeys=time,md5,sha1,sha384,sha512,rmd160,cksum +preserve=-pe usage() { @@ -53,6 +54,7 @@ Usage: ${prog} [-L base,x,ext] [-b] [-x] -S Exit after creating set files ${dest}/etc/mtree/set.* -M metalog metalog file -N etcdir etc dir for metalog use [${dest}/etc] + -U do not preserve file permissions (with -i ..) -d dest \${DESTDIR} [${dest}] -t targetdir \${RELEASEDIR} [${tars}] [setname ...] Sets to build [${lists}] @@ -66,7 +68,7 @@ msg() } # handle args -while getopts L:bxyi:a:m:qs:F:SM:N:d:t: ch; do +while getopts L:bxyi:a:m:qs:F:SM:N:Ud:t: ch; do case ${ch} in L) save_IFS=${IFS} @@ -118,6 +120,9 @@ while getopts L:bxyi:a:m:qs:F:SM:N:d:t: N) etcdir=${OPTARG} ;; + U) + preserve= + ;; d) dest=${OPTARG} ;; @@ -213,10 +218,6 @@ runpax() { GZIP=-9n # for pax -z export GZIP es=0 -preserve= -if [ -n ${metalog} ]; then - preserve=-pe -fi for setname in ${lists:-${nlists}}; do out=${setname}.tgz
CVS commit: [netbsd-7] src/lib/libm/arch
Module Name:src Committed By: msaitoh Date: Wed May 27 09:22:56 UTC 2015 Modified Files: src/lib/libm/arch/alpha [netbsd-7]: s_copysign.S src/lib/libm/arch/m68k [netbsd-7]: s_copysign.S Log Message: Pull up following revision(s) (requested by joerg in ticket #808): lib/libm/arch/alpha/s_copysign.S: revision 1.6 lib/libm/arch/alpha/s_copysign.S: revision 1.7 lib/libm/arch/m68k/s_copysign.S: revision 1.8 lib/libm/arch/m68k/s_copysign.S: revision 1.9 - Add copysignl aliases. - It's copysign, not _copysign. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.40.1 src/lib/libm/arch/alpha/s_copysign.S cvs rdiff -u -r1.7 -r1.7.74.1 src/lib/libm/arch/m68k/s_copysign.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/arch/alpha/s_copysign.S diff -u src/lib/libm/arch/alpha/s_copysign.S:1.5 src/lib/libm/arch/alpha/s_copysign.S:1.5.40.1 --- src/lib/libm/arch/alpha/s_copysign.S:1.5 Mon Apr 28 20:23:01 2008 +++ src/lib/libm/arch/alpha/s_copysign.S Wed May 27 09:22:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: s_copysign.S,v 1.5 2008/04/28 20:23:01 martin Exp $ */ +/* $NetBSD: s_copysign.S,v 1.5.40.1 2015/05/27 09:22:56 msaitoh Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -31,6 +31,9 @@ #include machine/asm.h +STRONG_ALIAS(_copysignl, copysign) +WEAK_ALIAS(copysignl, _copysignl) + LEAF(copysign, 2) cpys fa1, fa0, fv0 RET Index: src/lib/libm/arch/m68k/s_copysign.S diff -u src/lib/libm/arch/m68k/s_copysign.S:1.7 src/lib/libm/arch/m68k/s_copysign.S:1.7.74.1 --- src/lib/libm/arch/m68k/s_copysign.S:1.7 Thu Aug 7 16:44:41 2003 +++ src/lib/libm/arch/m68k/s_copysign.S Wed May 27 09:22:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: s_copysign.S,v 1.7 2003/08/07 16:44:41 agc Exp $ */ +/* $NetBSD: s_copysign.S,v 1.7.74.1 2015/05/27 09:22:56 msaitoh Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,10 @@ ;_sccsid: ;.asciz from: @(#)support.s 5.2 (Berkeley) 5/17/90 -RCSID($NetBSD: s_copysign.S,v 1.7 2003/08/07 16:44:41 agc Exp $) +RCSID($NetBSD: s_copysign.S,v 1.7.74.1 2015/05/27 09:22:56 msaitoh Exp $) + +STRONG_ALIAS(_copysignl, copysign) +WEAK_ALIAS(copysignl, _copysignl) | copysign(x,y) | returns x with the sign of y.
CVS commit: src/distrib/common
Module Name:src Committed By: martin Date: Wed May 27 09:27:40 UTC 2015 Modified Files: src/distrib/common: Makefile.bootcd Log Message: Pass -U to maketars if we are not building as root. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/distrib/common/Makefile.bootcd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/common/Makefile.bootcd diff -u src/distrib/common/Makefile.bootcd:1.28 src/distrib/common/Makefile.bootcd:1.29 --- src/distrib/common/Makefile.bootcd:1.28 Mon May 25 15:38:33 2015 +++ src/distrib/common/Makefile.bootcd Wed May 27 09:27:40 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.bootcd,v 1.28 2015/05/25 15:38:33 martin Exp $ +# $NetBSD: Makefile.bootcd,v 1.29 2015/05/27 09:27:40 martin Exp $ # # Makefile snipped to create a CD/DVD ISO # @@ -78,8 +78,10 @@ _CDMAKEFSOPTIONS= rockridge,label=${ISO_ .if ${MKUNPRIVED} == no CD_METALOG.unpriv= +mtunpriv= .else CD_METALOG.unpriv=-M ${METALOG}.sanitised +mtunpriv=-U .endif # Stuff that should come from elsewhere - XXX where? - HF @@ -248,7 +250,7 @@ copy-releasedir: ${CHMOD} +w ${CUROBJDIR:Q}/cdrom/etc/mtree/set.${set}; \ fi;\ ${CDSETSCMD} ./maketars -i ${CUROBJDIR}/cdrom \ - ${CD_METALOG.unpriv} -N ${NETBSDSRCDIR}/etc \ + ${CD_METALOG.unpriv} ${mtunpriv} -N ${NETBSDSRCDIR}/etc \ -F ${CUROBJDIR}/cdrom/etc/mtree\ -d ${DESTDIR:S,^$,/,} ${set} .endfor
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: msaitoh Date: Wed May 27 10:00:24 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Ticket 808. To generate a diff of this commit: cvs rdiff -u -r1.1.2.311 -r1.1.2.312 src/doc/CHANGES-7.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.311 src/doc/CHANGES-7.0:1.1.2.312 --- src/doc/CHANGES-7.0:1.1.2.311 Wed May 27 05:37:13 2015 +++ src/doc/CHANGES-7.0 Wed May 27 10:00:24 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.311 2015/05/27 05:37:13 msaitoh Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.312 2015/05/27 10:00:24 msaitoh Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -23568,3 +23568,9 @@ external/gpl3/gcc/dist/gcc/config/arm/ne Fix up TARGET_ENDIAN_DEFAULT for BE oabi. [skrll, ticket #807] + +lib/libm/arch/alpha/s_copysign.S 1.6-1.7 +lib/libm/arch/m68k/s_copysign.S 1.8-1.9 + + Add copysignl aliases. + [joerg, ticket #808]
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: jmcneill Date: Wed May 27 09:40:51 UTC 2015 Modified Files: src/sys/arch/evbarm/rpi: rpi_machdep.c Log Message: MP not ready, disable it again To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/evbarm/rpi/rpi_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/evbarm/rpi/rpi_machdep.c diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.64 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.65 --- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.64 Thu May 21 20:50:57 2015 +++ src/sys/arch/evbarm/rpi/rpi_machdep.c Wed May 27 09:40:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rpi_machdep.c,v 1.64 2015/05/21 20:50:57 skrll Exp $ */ +/* $NetBSD: rpi_machdep.c,v 1.65 2015/05/27 09:40:51 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.64 2015/05/21 20:50:57 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.65 2015/05/27 09:40:51 jmcneill Exp $); #include opt_arm_debug.h #include opt_bcm283x.h @@ -536,6 +536,11 @@ rpi_bootstrap(void) __func__, i); } } + + /* + * XXXNH: Disable non-boot CPUs for now + */ + arm_cpu_hatched = 0; #endif }
CVS commit: src/distrib
Module Name:src Committed By: martin Date: Wed May 27 09:44:40 UTC 2015 Modified Files: src/distrib/amd64/cdroms: Makefile.cdrom src/distrib/common: Makefile.bootcd src/distrib/i386/cdroms: Makefile.cdrom src/distrib/sparc64/cdroms/installcd: Makefile Log Message: Do not default any CD_SETS - let the MD makefiles request them specifically. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/distrib/amd64/cdroms/Makefile.cdrom cvs rdiff -u -r1.29 -r1.30 src/distrib/common/Makefile.bootcd cvs rdiff -u -r1.37 -r1.38 src/distrib/i386/cdroms/Makefile.cdrom cvs rdiff -u -r1.24 -r1.25 src/distrib/sparc64/cdroms/installcd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/amd64/cdroms/Makefile.cdrom diff -u src/distrib/amd64/cdroms/Makefile.cdrom:1.17 src/distrib/amd64/cdroms/Makefile.cdrom:1.18 --- src/distrib/amd64/cdroms/Makefile.cdrom:1.17 Mon May 25 15:38:33 2015 +++ src/distrib/amd64/cdroms/Makefile.cdrom Wed May 27 09:44:40 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.cdrom,v 1.17 2015/05/25 15:38:33 martin Exp $ +# $NetBSD: Makefile.cdrom,v 1.18 2015/05/27 09:44:40 martin Exp $ .include bsd.own.mk @@ -10,6 +10,7 @@ CDMAKEFSOPTIONS= bootimage=i386;bootxx.$ CDINSTKERNEL= ../../instkernel CDKERNELS= netbsd-GENERIC.gz netbsd CDRELEASE_NOISOS= true +CD_SETS= base etc modules image_md_pre: ${RM} -f cdrom/etc/gettytab cdrom/etc/ttys cdrom/etc/rc Index: src/distrib/common/Makefile.bootcd diff -u src/distrib/common/Makefile.bootcd:1.29 src/distrib/common/Makefile.bootcd:1.30 --- src/distrib/common/Makefile.bootcd:1.29 Wed May 27 09:27:40 2015 +++ src/distrib/common/Makefile.bootcd Wed May 27 09:44:40 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.bootcd,v 1.29 2015/05/27 09:27:40 martin Exp $ +# $NetBSD: Makefile.bootcd,v 1.30 2015/05/27 09:44:40 martin Exp $ # # Makefile snipped to create a CD/DVD ISO # @@ -32,7 +32,6 @@ #source name_on_cd # CDRUNTIME files/directories to copy from $DESTDIR onto the CD # CD_SETS sets to be extracted onto the CD -# (default: base modules etc) # SETS_DIR where the CD_SETS are found (default provided) # source kernels are copied from ${CDINSTKERNEL} (or its obj dir) # note that as of yet, bootxx_cd9660 can't load kernel names of more than @@ -59,7 +58,6 @@ CDRELEASE_EXCLUDE+= -s ',./installation/ CDRELEASE_EXCLUDE+= -s ',./installation/installimage.*,,gp' .endif -CD_SETS?= base modules etc SETS_DIR?= ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets .include bsd.own.mk # For PRINTOBJDIR Index: src/distrib/i386/cdroms/Makefile.cdrom diff -u src/distrib/i386/cdroms/Makefile.cdrom:1.37 src/distrib/i386/cdroms/Makefile.cdrom:1.38 --- src/distrib/i386/cdroms/Makefile.cdrom:1.37 Mon May 25 15:38:33 2015 +++ src/distrib/i386/cdroms/Makefile.cdrom Wed May 27 09:44:40 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.cdrom,v 1.37 2015/05/25 15:38:33 martin Exp $ +# $NetBSD: Makefile.cdrom,v 1.38 2015/05/27 09:44:40 martin Exp $ .include bsd.own.mk @@ -10,6 +10,7 @@ CDMAKEFSOPTIONS= bootimage=i386;bootxx.$ CDINSTKERNEL= ../../instkernel CDKERNELS= netbsd-GENERIC.gz netbsd CDRELEASE_NOISOS= true +CD_SETS= base etc modules image_md_pre: ${RM} -f cdrom/etc/gettytab cdrom/etc/ttys cdrom/etc/rc cdrom/install.sh Index: src/distrib/sparc64/cdroms/installcd/Makefile diff -u src/distrib/sparc64/cdroms/installcd/Makefile:1.24 src/distrib/sparc64/cdroms/installcd/Makefile:1.25 --- src/distrib/sparc64/cdroms/installcd/Makefile:1.24 Mon May 25 15:38:33 2015 +++ src/distrib/sparc64/cdroms/installcd/Makefile Wed May 27 09:44:40 2015 @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.24 2015/05/25 15:38:33 martin Exp $ +# $NetBSD: Makefile,v 1.25 2015/05/27 09:44:40 martin Exp $ CDBASE= sparc64cd # gives ${CDBASE}.iso CDRELEASE= true # include $RELEASEDIR/$MACHINE CDKERNELS= ${RELEASEDIR}/${MACHINE}/binary/kernel/netbsd-GENERIC.gz netbsd +CD_SETS= base etc modules # for PRINTOBJDIR .include bsd.own.mk
CVS commit: src/sbin/raidctl
Module Name:src Committed By: christos Date: Wed May 27 17:55:23 UTC 2015 Modified Files: src/sbin/raidctl: raidctl.c Log Message: use strtou To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sbin/raidctl/raidctl.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/raidctl/raidctl.c diff -u src/sbin/raidctl/raidctl.c:1.58 src/sbin/raidctl/raidctl.c:1.59 --- src/sbin/raidctl/raidctl.c:1.58 Wed May 27 11:31:15 2015 +++ src/sbin/raidctl/raidctl.c Wed May 27 13:55:23 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: raidctl.c,v 1.58 2015/05/27 15:31:15 manu Exp $ */ +/* $NetBSD: raidctl.c,v 1.59 2015/05/27 17:55:23 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: raidctl.c,v 1.58 2015/05/27 15:31:15 manu Exp $); +__RCSID($NetBSD: raidctl.c,v 1.59 2015/05/27 17:55:23 christos Exp $); #endif @@ -55,6 +55,7 @@ __RCSID($NetBSD: raidctl.c,v 1.58 2015/ #include stdio.h #include stdlib.h #include string.h +#include inttypes.h #include unistd.h #include util.h @@ -85,7 +86,7 @@ static void get_bar(char *, double, int static void get_time_string(char *, int); static void rf_output_pmstat(int, int); static void rf_pm_configure(int, int, char *, int[]); -static unsigned int _strtoud(char *); +static unsigned int xstrtouint(const char *); int verbose; @@ -184,7 +185,7 @@ main(int argc,char *argv[]) break; case 'I': action = RAIDFRAME_INIT_LABELS; - serial_number = _strtoud(optarg); + serial_number = xstrtouint(optarg); num_options++; break; case 'm': @@ -200,7 +201,7 @@ main(int argc,char *argv[]) i = 0; while (i 3 optind argc isdigit((int)argv[optind][0])) -parityparams[i++] = _strtoud(argv[optind++]); +parityparams[i++] = xstrtouint(argv[optind++]); while (i 3) parityparams[i++] = 0; break; @@ -1161,24 +1162,11 @@ usage(void) } static unsigned int -_strtoud(char *str) +xstrtouint(const char *str) { - long num; - char *ep; - - errno = 0; - num = strtol(str, ep, 10); - if (str[0] == '\0' || *ep != '\0') - errx(1, Not a number: %s, str); - - if (errno) - err(1, Inavlid number %s, str); - - if (num 0) - errx(1, Negative number: %s, str); - - if (num INT_MAX) - errx(1, Number too large: %s, str); - - return (unsigned int)num; + int e; + unsigned int num = (unsigned int)strtou(str, NULL, 10, 0, INT_MAX, e); + if (e) + errc(EXIT_FAILURE, e, Bad number `%s', str); + return num; }
CVS commit: src
Module Name:src Committed By: kefren Date: Wed May 27 18:13:14 UTC 2015 Modified Files: src/distrib/sets/lists/tests: mi src/tests/net/mpls: Makefile Added Files: src/tests/net/mpls: t_mpls_fw64.sh Log Message: Add another simple MPLS test but using this time a mixed IPv4/IPv6 LSR This test encapsulates IPv6 packets, pass them over MPLS to an IPv6 neighbour that switches label and passes forward to an IPv4 neighbour. There, the IPv6 packet is decapsulated and passed to IPv6 stack For the return path we test both implicit and explicit null encapsulations To generate a diff of this commit: cvs rdiff -u -r1.626 -r1.627 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.5 -r1.6 src/tests/net/mpls/Makefile cvs rdiff -u -r0 -r1.1 src/tests/net/mpls/t_mpls_fw64.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.626 src/distrib/sets/lists/tests/mi:1.627 --- src/distrib/sets/lists/tests/mi:1.626 Wed May 27 16:40:33 2015 +++ src/distrib/sets/lists/tests/mi Wed May 27 18:13:14 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.626 2015/05/27 16:40:33 kefren Exp $ +# $NetBSD: mi,v 1.627 2015/05/27 18:13:14 kefren Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -3162,6 +3162,7 @@ ./usr/tests/net/mpls/t_ldp_static tests-net-tests obsolete ./usr/tests/net/mpls/t_mpls_fw tests-net-tests atf,rump ./usr/tests/net/mpls/t_mpls_fw6 tests-net-tests atf,rump +./usr/tests/net/mpls/t_mpls_fw64 tests-net-tests atf,rump ./usr/tests/net/mpls/t_rfc4182 tests-net-tests atf,rump ./usr/tests/net/nettests-net-tests ./usr/tests/net/net/Atffile tests-net-tests atf Index: src/tests/net/mpls/Makefile diff -u src/tests/net/mpls/Makefile:1.5 src/tests/net/mpls/Makefile:1.6 --- src/tests/net/mpls/Makefile:1.5 Wed May 27 16:40:33 2015 +++ src/tests/net/mpls/Makefile Wed May 27 18:13:14 2015 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.5 2015/05/27 16:40:33 kefren Exp $ +# $NetBSD: Makefile,v 1.6 2015/05/27 18:13:14 kefren Exp $ # .include bsd.own.mk TESTSDIR= ${TESTSBASE}/net/mpls -TESTS_SH= t_mpls_fw t_mpls_fw6 t_rfc4182 t_ldp_regen +TESTS_SH= t_mpls_fw t_mpls_fw6 t_mpls_fw64 t_rfc4182 t_ldp_regen .include bsd.test.mk Added files: Index: src/tests/net/mpls/t_mpls_fw64.sh diff -u /dev/null src/tests/net/mpls/t_mpls_fw64.sh:1.1 --- /dev/null Wed May 27 18:13:14 2015 +++ src/tests/net/mpls/t_mpls_fw64.sh Wed May 27 18:13:14 2015 @@ -0,0 +1,230 @@ +# $NetBSD: t_mpls_fw64.sh,v 1.1 2015/05/27 18:13:14 kefren Exp $ +# +# Copyright (c) 2015 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +# Test MPLS encap/decap and forwarding using INET6 as encapsulated protocol +# Setup four routers connected like this: R1---R2---R3---R4-- +# Goal is to be able to ping from R1 the outermost interface of R4 +# Disable net.inet[6].ip[6].forwarding, enable net.mpls.forwarding +# Use IPv6 between R1-R2-R3 and IPv4 between R3-R4 +# As we use IPv4 on last link we should use only expl.null there +# because implicit null will assume IPv4 (as the next-hop) +# But we can use impl null on R2-R1 link because stack will correctly +# guess IPv6 (from next-hop) +# Add route on R1 in order to encapsulate into MPLS the IP6 packets with +# destination equal to R4 right hand side interface +# Add MPLS routes on R2 in order to forward frames belonging to that FEC to R3 +# Add MPLS expl.null route on R3 for that FEC, pointing to R4 +# Do the same for the reverse direction (R4 to R1) +# ping6 from R1 to R4 right hand side
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: matt Date: Wed May 27 15:33:41 UTC 2015 Modified Files: src/external/gpl3/gcc/dist/gcc: config.gcc src/external/gpl3/gcc/dist/gcc/config/arm: netbsd-eabi.h Added Files: src/external/gpl3/gcc/dist/gcc/config/arm: t-netbsdeabi Log Message: Make MULTILIBS work for oabi To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/external/gpl3/gcc/dist/gcc/config.gcc cvs rdiff -u -r1.13 -r1.14 \ src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/dist/gcc/config/arm/t-netbsdeabi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config.gcc diff -u src/external/gpl3/gcc/dist/gcc/config.gcc:1.32 src/external/gpl3/gcc/dist/gcc/config.gcc:1.33 --- src/external/gpl3/gcc/dist/gcc/config.gcc:1.32 Sat Jan 10 01:06:41 2015 +++ src/external/gpl3/gcc/dist/gcc/config.gcc Wed May 27 15:33:41 2015 @@ -897,7 +897,7 @@ arm*-*-netbsdelf*) case ${target} in arm*-*-netbsdelf-*eabi*) tm_file=$tm_file arm/bpabi.h arm/netbsd-elf.h arm/netbsd-eabi.h - tmake_file=$tmake_file arm/t-bpabi + tmake_file=$tmake_file arm/t-bpabi arm/t-netbsdeabi # The BPABI long long divmod functions return a 128-bit value in # registers r0-r3. Correctly modeling that requires the use of # TImode. Index: src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h diff -u src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.13 src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.14 --- src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h:1.13 Fri May 30 18:31:31 2014 +++ src/external/gpl3/gcc/dist/gcc/config/arm/netbsd-eabi.h Wed May 27 15:33:41 2015 @@ -40,8 +40,6 @@ #define TARGET_LINKER_EMULATION TARGET_LINKER_LITTLE_EMULATION #endif -#undef MULTILIB_DEFAULTS - #undef ARM_DEFAULT_ABI #define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX Added files: Index: src/external/gpl3/gcc/dist/gcc/config/arm/t-netbsdeabi diff -u /dev/null src/external/gpl3/gcc/dist/gcc/config/arm/t-netbsdeabi:1.1 --- /dev/null Wed May 27 15:33:41 2015 +++ src/external/gpl3/gcc/dist/gcc/config/arm/t-netbsdeabi Wed May 27 15:33:41 2015 @@ -0,0 +1,8 @@ +# NetBSD has (will have) non-native libraries in /usr/lib/arch. + +MULTILIB_OPTIONS = mabi=aapcs-linux/mabi=apcs-gnu +MULTILIB_DIRNAMES = eabi oabi +MULTILIB_OSDIRNAMES = . ../lib/oabi + +LIBGCC = stmp-multilib +INSTALL_LIBGCC = install-multilib
CVS commit: src/sbin/raidctl
Module Name:src Committed By: manu Date: Wed May 27 15:31:15 UTC 2015 Modified Files: src/sbin/raidctl: raidctl.c Log Message: Better sanity check numbers given to raidctl(8) Replace atoi(3) by strtol(3), and check that numbers are valid, positive, and in int32_t range. The previous lack of check could silently lead to the same serial being set to all RAID volumes for instance because given numbers were bigger than INT_MAX. The consequence is in an awful mess when RAIDframe would mix volumes... To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sbin/raidctl/raidctl.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/raidctl/raidctl.c diff -u src/sbin/raidctl/raidctl.c:1.57 src/sbin/raidctl/raidctl.c:1.58 --- src/sbin/raidctl/raidctl.c:1.57 Thu Apr 3 18:54:10 2014 +++ src/sbin/raidctl/raidctl.c Wed May 27 15:31:15 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: raidctl.c,v 1.57 2014/04/03 18:54:10 christos Exp $ */ +/* $NetBSD: raidctl.c,v 1.58 2015/05/27 15:31:15 manu Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: raidctl.c,v 1.57 2014/04/03 18:54:10 christos Exp $); +__RCSID($NetBSD: raidctl.c,v 1.58 2015/05/27 15:31:15 manu Exp $); #endif @@ -85,6 +85,7 @@ static void get_bar(char *, double, int static void get_time_string(char *, int); static void rf_output_pmstat(int, int); static void rf_pm_configure(int, int, char *, int[]); +static unsigned int _strtoud(char *); int verbose; @@ -183,7 +184,7 @@ main(int argc,char *argv[]) break; case 'I': action = RAIDFRAME_INIT_LABELS; - serial_number = atoi(optarg); + serial_number = _strtoud(optarg); num_options++; break; case 'm': @@ -195,11 +196,11 @@ main(int argc,char *argv[]) action = RAIDFRAME_PARITYMAP_SET_DISABLE; parityconf = strdup(optarg); num_options++; - /* XXXjld: should rf_pm_configure do the atoi()s? */ + /* XXXjld: should rf_pm_configure do the strtol()s? */ i = 0; while (i 3 optind argc isdigit((int)argv[optind][0])) -parityparams[i++] = atoi(argv[optind++]); +parityparams[i++] = _strtoud(argv[optind++]); while (i 3) parityparams[i++] = 0; break; @@ -1158,3 +1159,26 @@ usage(void) exit(1); /* NOTREACHED */ } + +static unsigned int +_strtoud(char *str) +{ + long num; + char *ep; + + errno = 0; + num = strtol(str, ep, 10); + if (str[0] == '\0' || *ep != '\0') + errx(1, Not a number: %s, str); + + if (errno) + err(1, Inavlid number %s, str); + + if (num 0) + errx(1, Negative number: %s, str); + + if (num INT_MAX) + errx(1, Number too large: %s, str); + + return (unsigned int)num; +}
CVS commit: src/compat
Module Name:src Committed By: matt Date: Wed May 27 15:35:23 UTC 2015 Modified Files: src/compat: archdirs.mk Log Message: Only support oabi for earm* To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/compat/archdirs.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/compat/archdirs.mk diff -u src/compat/archdirs.mk:1.9 src/compat/archdirs.mk:1.10 --- src/compat/archdirs.mk:1.9 Mon May 25 12:42:26 2015 +++ src/compat/archdirs.mk Wed May 27 15:35:23 2015 @@ -1,4 +1,4 @@ -# $NetBSD: archdirs.mk,v 1.9 2015/05/25 12:42:26 martin Exp $ +# $NetBSD: archdirs.mk,v 1.10 2015/05/27 15:35:23 matt Exp $ # list of subdirs used per-platform @@ -10,12 +10,8 @@ ARCHDIR_SUBDIR= sparc64/sparc ARCHDIR_SUBDIR= amd64/i386 .endif -.if !empty(MACHINE_ARCH:Mearmhf*) || !empty(MACHINE_ARCH:Mearmv?hf*) -ARCHDIR_SUBDIR= arm/oabi arm/eabi -.elif !empty(MACHINE_ARCH:Mearm*) +.if !empty(MACHINE_ARCH:Mearm*) ARCHDIR_SUBDIR= arm/oabi -.elif !empty(MACHINE_ARCH:Marm) -ARCHDIR_SUBDIR= arm/eabi .endif .if (${MACHINE_ARCH} == mips64eb || ${MACHINE_ARCH} == mips64el)
CVS commit: src/distrib/common
Module Name:src Committed By: martin Date: Wed May 27 15:17:59 UTC 2015 Modified Files: src/distrib/common: Makefile.bootcd Log Message: Deal with WORKSPECFILE not existing for many cd images To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/distrib/common/Makefile.bootcd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/common/Makefile.bootcd diff -u src/distrib/common/Makefile.bootcd:1.30 src/distrib/common/Makefile.bootcd:1.31 --- src/distrib/common/Makefile.bootcd:1.30 Wed May 27 09:44:40 2015 +++ src/distrib/common/Makefile.bootcd Wed May 27 15:17:59 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.bootcd,v 1.30 2015/05/27 09:44:40 martin Exp $ +# $NetBSD: Makefile.bootcd,v 1.31 2015/05/27 15:17:59 martin Exp $ # # Makefile snipped to create a CD/DVD ISO # @@ -76,7 +76,7 @@ _CDMAKEFSOPTIONS= rockridge,label=${ISO_ .if ${MKUNPRIVED} == no CD_METALOG.unpriv= -mtunpriv= +mtunpriv= .else CD_METALOG.unpriv=-M ${METALOG}.sanitised mtunpriv=-U @@ -95,7 +95,6 @@ CDIMAGE= ${CDBASE}.iso CDIMAGE= NetBSD-${DISTRIBVER}-${CDBASE:S/cd$//}.iso .endif WORKSPEC= fs.spec -CDMAKEFSEXTRAOPTS+=-F ${WORKSPEC} CLEANFILES+= ${CDIMAGE} CLEANFILES+= bootxx.${MACHINE} @@ -260,11 +259,16 @@ copy-releasedir: image: @echo Preparing spec files for makefs... ${RM} -f ${WORKSPEC} - cat cdrom/etc/mtree/* | \ - ${TOOL_SED} -e 's/ size=[0-9]*//'\ - -e '/^\.\/etc\/gettytab/d' ${WORKSPEC} - ${HOST_SH} cdrom/dev/MAKEDEV -s all | \ - ${TOOL_SED} -e '/^\. type=dir/d' -e 's,^\.,./dev,' ${WORKSPEC} + if [ -d cdrom/etc/mtree ]; then\ + cat cdrom/etc/mtree/* |\ + ${TOOL_SED} -e 's/ size=[0-9]*//' \ + -e '/^\.\/etc\/gettytab/d' ${WORKSPEC}; \ + fi + if [ -r cdrom/dev/MAKEDEV ]; then \ + ${HOST_SH} cdrom/dev/MAKEDEV -s all | \ + ${TOOL_SED} -e '/^\. type=dir/d' \ + -e 's,^\.,./dev,' ${WORKSPEC}; \ + fi .if defined(SPEC_IN) cat ${SPEC_IN} ${WORKSPEC} .endif @@ -275,7 +279,9 @@ image: .if defined(SPEC_EXTRA) cat ${SPEC_EXTRA} ${WORKSPEC} .endif - ${TOOL_MAKEFS} -N ${NETBSDSRCDIR}/etc -t cd9660 ${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom + if [ -s ${WORKSPEC} ]; then specarg=-F ${WORKSPEC}; fi; \ + ${TOOL_MAKEFS} -N ${NETBSDSRCDIR}/etc -t cd9660 $${specarg} \ + ${CDMAKEFSEXTRAOPTS} -o ${_CDMAKEFSOPTIONS:Q} ${CDIMAGE} cdrom .if ${CDRELEASE} == false release: prepare .WAIT prepare_md_post .WAIT copy-releasedir .WAIT image_md_pre .WAIT image .WAIT image_md_post
CVS commit: src/distrib/sets
Module Name:src Committed By: martin Date: Wed May 27 15:18:29 UTC 2015 Modified Files: src/distrib/sets: maketars Log Message: Simplify slightly To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/distrib/sets/maketars 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/maketars diff -u src/distrib/sets/maketars:1.83 src/distrib/sets/maketars:1.84 --- src/distrib/sets/maketars:1.83 Wed May 27 09:26:46 2015 +++ src/distrib/sets/maketars Wed May 27 15:18:29 2015 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: maketars,v 1.83 2015/05/27 09:26:46 martin Exp $ +# $NetBSD: maketars,v 1.84 2015/05/27 15:18:29 martin Exp $ # # Make release tar files for some or all lists. Usage: # maketars [-b] [-x] [-i installdir] [-a arch] [-m machine] [-s setsdir] @@ -121,7 +121,7 @@ while getopts L:bxyi:a:m:qs:F:SM:N:Ud:t: etcdir=${OPTARG} ;; U) - preserve= + preserve= ;; d) dest=${OPTARG}
CVS commit: src
Module Name:src Committed By: kefren Date: Wed May 27 16:40:33 UTC 2015 Modified Files: src/distrib/sets/lists/tests: mi src/tests/net/mpls: Makefile Added Files: src/tests/net/mpls: t_mpls_fw6.sh Log Message: Add a simple IPv6/MPLS test To generate a diff of this commit: cvs rdiff -u -r1.625 -r1.626 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.4 -r1.5 src/tests/net/mpls/Makefile cvs rdiff -u -r0 -r1.1 src/tests/net/mpls/t_mpls_fw6.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.625 src/distrib/sets/lists/tests/mi:1.626 --- src/distrib/sets/lists/tests/mi:1.625 Tue May 26 22:05:44 2015 +++ src/distrib/sets/lists/tests/mi Wed May 27 16:40:33 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.625 2015/05/26 22:05:44 htodd Exp $ +# $NetBSD: mi,v 1.626 2015/05/27 16:40:33 kefren Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -3161,6 +3161,7 @@ ./usr/tests/net/mpls/t_ldp_regen tests-net-tests atf,rump ./usr/tests/net/mpls/t_ldp_static tests-net-tests obsolete ./usr/tests/net/mpls/t_mpls_fw tests-net-tests atf,rump +./usr/tests/net/mpls/t_mpls_fw6 tests-net-tests atf,rump ./usr/tests/net/mpls/t_rfc4182 tests-net-tests atf,rump ./usr/tests/net/nettests-net-tests ./usr/tests/net/net/Atffile tests-net-tests atf Index: src/tests/net/mpls/Makefile diff -u src/tests/net/mpls/Makefile:1.4 src/tests/net/mpls/Makefile:1.5 --- src/tests/net/mpls/Makefile:1.4 Tue Nov 12 12:22:33 2013 +++ src/tests/net/mpls/Makefile Wed May 27 16:40:33 2015 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.4 2013/11/12 12:22:33 kefren Exp $ +# $NetBSD: Makefile,v 1.5 2015/05/27 16:40:33 kefren Exp $ # .include bsd.own.mk TESTSDIR= ${TESTSBASE}/net/mpls -TESTS_SH= t_mpls_fw t_rfc4182 t_ldp_regen +TESTS_SH= t_mpls_fw t_mpls_fw6 t_rfc4182 t_ldp_regen .include bsd.test.mk Added files: Index: src/tests/net/mpls/t_mpls_fw6.sh diff -u /dev/null src/tests/net/mpls/t_mpls_fw6.sh:1.1 --- /dev/null Wed May 27 16:40:33 2015 +++ src/tests/net/mpls/t_mpls_fw6.sh Wed May 27 16:40:33 2015 @@ -0,0 +1,224 @@ +# $NetBSD: t_mpls_fw6.sh,v 1.1 2015/05/27 16:40:33 kefren Exp $ +# +# Copyright (c) 2015 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +# Test MPLS encap/decap and forwarding using INET6 as encapsulated protocol +# Setup four routers connected like this: R1---R2---R3---R4-- +# Goal is to be able to ping from R1 the outermost interface of R4 +# Disable net.inet6.ip6.forwarding, enable net.mpls.forwarding +# Add route on R1 in order to encapsulate into MPLS the IP6 packets with +# destination equal to R4 right hand side interface +# Add MPLS routes on R2 in order to forward frames belonging to that FEC to R3 +# Add MPLS POP route on R3 for that FEC, pointing to R4 +# Do the same for the reverse direction (R4 to R1) +# ping6 from R1 to R4 right hand side interface +# +# redo the test using IPv6 explicit null label + +RUMP_SERVER1=unix://./r1 +RUMP_SERVER2=unix://./r2 +RUMP_SERVER3=unix://./r3 +RUMP_SERVER4=unix://./r4 + +RUMP_FLAGS6=\ +-lrumpnet -lrumpnet_net -lrumpnet_netmpls -lrumpnet_netinet -lrumpnet_netinet6 -lrumpnet_shmif + +atf_test_case mplsfw6 cleanup +mplsfw6_head() +{ + + atf_set descr IP6/MPLS forwarding test using PHP + atf_set require.progs rump_server +} + +startservers() +{ + + ulimit -r 300 + atf_check -s exit:0 rump_server ${RUMP_FLAGS6} ${RUMP_SERVER1} + atf_check -s exit:0 rump_server ${RUMP_FLAGS6} ${RUMP_SERVER2} + atf_check -s exit:0 rump_server ${RUMP_FLAGS6}
CVS commit: src/sys/uvm
Module Name:src Committed By: rmind Date: Wed May 27 19:43:40 UTC 2015 Modified Files: src/sys/uvm: uvm_bio.c Log Message: ubc_alloc: perform pmap_update() in the error path as we might have removed the mapping. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/sys/uvm/uvm_bio.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/uvm/uvm_bio.c diff -u src/sys/uvm/uvm_bio.c:1.82 src/sys/uvm/uvm_bio.c:1.83 --- src/sys/uvm/uvm_bio.c:1.82 Fri Sep 5 09:24:21 2014 +++ src/sys/uvm/uvm_bio.c Wed May 27 19:43:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_bio.c,v 1.82 2014/09/05 09:24:21 matt Exp $ */ +/* $NetBSD: uvm_bio.c,v 1.83 2015/05/27 19:43:40 rmind Exp $ */ /* * Copyright (c) 1998 Chuck Silvers. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uvm_bio.c,v 1.82 2014/09/05 09:24:21 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: uvm_bio.c,v 1.83 2015/05/27 19:43:40 rmind Exp $); #include opt_uvmhist.h #include opt_ubc.h @@ -581,6 +581,10 @@ again_faultbusy: npages, 0, VM_PROT_READ | VM_PROT_WRITE, advice, gpflags); UVMHIST_LOG(ubchist, faultbusy getpages %d, error, 0, 0, 0); if (error) { + /* + * Flush: the mapping above might have been removed. + */ + pmap_update(pmap_kernel()); goto out; } for (i = 0; i npages; i++) {
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: matt Date: Wed May 27 21:42:43 UTC 2015 Modified Files: src/sys/compat/netbsd32: netbsd32_ioctl.c netbsd32_ioctl.h Log Message: Add missing SIOCGDRVSPEC32 Fix SIOCGETSGCNT32 To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/compat/netbsd32/netbsd32_ioctl.c cvs rdiff -u -r1.48 -r1.49 src/sys/compat/netbsd32/netbsd32_ioctl.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/compat/netbsd32/netbsd32_ioctl.c diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.72 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.73 --- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.72 Wed May 20 04:37:45 2015 +++ src/sys/compat/netbsd32/netbsd32_ioctl.c Wed May 27 21:42:43 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ioctl.c,v 1.72 2015/05/20 04:37:45 matt Exp $ */ +/* $NetBSD: netbsd32_ioctl.c,v 1.73 2015/05/27 21:42:43 matt Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_ioctl.c,v 1.72 2015/05/20 04:37:45 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_ioctl.c,v 1.73 2015/05/27 21:42:43 matt Exp $); #include sys/param.h #include sys/systm.h @@ -1041,6 +1041,8 @@ netbsd32_ioctl(struct lwp *l, const stru case SIOCSDRVSPEC32: IOCTL_STRUCT_CONV_TO(SIOCSDRVSPEC, ifdrv); + case SIOCGDRVSPEC32: + IOCTL_STRUCT_CONV_TO(SIOCGDRVSPEC, ifdrv); case SIOCGETVIFCNT32: IOCTL_STRUCT_CONV_TO(SIOCGETVIFCNT, sioc_vif_req); Index: src/sys/compat/netbsd32/netbsd32_ioctl.h diff -u src/sys/compat/netbsd32/netbsd32_ioctl.h:1.48 src/sys/compat/netbsd32/netbsd32_ioctl.h:1.49 --- src/sys/compat/netbsd32/netbsd32_ioctl.h:1.48 Wed May 20 07:24:49 2015 +++ src/sys/compat/netbsd32/netbsd32_ioctl.h Wed May 27 21:42:43 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ioctl.h,v 1.48 2015/05/20 07:24:49 matt Exp $ */ +/* $NetBSD: netbsd32_ioctl.h,v 1.49 2015/05/27 21:42:43 matt Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -434,7 +434,8 @@ struct netbsd32_ifdrv { netbsd32_voidp ifd_data; }; /* from sys/sockio.h */ -#define SIOCSDRVSPEC32 _IOW('i', 123, struct netbsd32_ifdrv) /* set driver-specific */ +#define SIOCSDRVSPEC32 _IOW('i', 123, struct netbsd32_ifdrv) /* set driver-specific */ +#define SIOCGDRVSPEC32 _IOWR('i', 123, struct netbsd32_ifdrv) /* get driver-specific */ /* from netinet/ip_mroute.h */ struct netbsd32_sioc_vif_req { @@ -450,9 +451,9 @@ struct netbsd32_sioc_vif_req { struct netbsd32_sioc_sg_req { struct in_addr src; struct in_addr grp; - u_long pktcnt; - u_long bytecnt; - u_long wrong_if; + netbsd32_u_long pktcnt; + netbsd32_u_long bytecnt; + netbsd32_u_long wrong_if; }; /* from sys/sockio.h */ #define SIOCGETSGCNT32 _IOWR('u', 52, struct netbsd32_sioc_sg_req) /* sg pkt cnt */
CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm
Module Name:src Committed By: matt Date: Wed May 27 21:27:03 UTC 2015 Modified Files: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm: crypto.inc Log Message: Rework setting of __ARM_MAX_ARCH__ to better deal with BE arm MACHINE_ARCHes To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc:1.5 src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc:1.6 --- src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc:1.5 Mon Mar 16 20:32:08 2015 +++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/arm/crypto.inc Wed May 27 21:27:03 2015 @@ -2,14 +2,14 @@ CPUID_SRCS = armv4cpuid.S armcap.c armv4-mont.S armv4-gf2m.S CPUID = yes CPPFLAGS += -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -.if ${MACHINE_ARCH:M*armv4*} == -. if ${MACHINE_ARCH} == earmeb || ${MACHINE_ARCH} == earmhfeb +.if !empty(MACHINE_ARCH:Mearmv4*) || ${MACHINE_ARCH} == armeb +CPPFLAGS += -D__ARM_MAX_ARCH__=4 +.elif ${MACHINE_ARCH} == earmeb || ${MACHINE_ARCH} == earmhfeb CPPFLAGS += -D__ARM_MAX_ARCH__=5 -. else -CPPFLAGS += -D__ARM_MAX_ARCH__=8 -.endif +.elif !empty(MACHINE_ARCH:Mearmv6*eb) +CPPFLAGS += -D__ARM_MAX_ARCH__=6 .else -CPPFLAGS += -D__ARM_MAX_ARCH__=4 +CPPFLAGS += -D__ARM_MAX_ARCH__=8 .endif .include ../../crypto.inc
CVS commit: [netbsd-5] src/sys/dev/usb
Module Name:src Committed By: msaitoh Date: Wed May 27 06:18:05 UTC 2015 Modified Files: src/sys/dev/usb [netbsd-5]: uftdi.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1964): sys/dev/usb/uftdi.c: revision 1.53 Use as large a packet size as the ftdi endpoint specifies. Now I can read from my beaglebone! To generate a diff of this commit: cvs rdiff -u -r1.39.4.1 -r1.39.4.2 src/sys/dev/usb/uftdi.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/uftdi.c diff -u src/sys/dev/usb/uftdi.c:1.39.4.1 src/sys/dev/usb/uftdi.c:1.39.4.2 --- src/sys/dev/usb/uftdi.c:1.39.4.1 Sat Oct 10 20:34:45 2009 +++ src/sys/dev/usb/uftdi.c Wed May 27 06:18:05 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uftdi.c,v 1.39.4.1 2009/10/10 20:34:45 sborrill Exp $ */ +/* $NetBSD: uftdi.c,v 1.39.4.2 2015/05/27 06:18:05 msaitoh Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: uftdi.c,v 1.39.4.1 2009/10/10 20:34:45 sborrill Exp $); +__KERNEL_RCSID(0, $NetBSD: uftdi.c,v 1.39.4.2 2015/05/27 06:18:05 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -63,12 +63,19 @@ int uftdidebug = 0; #define UFTDI_MAX_PORTS 4 /* - * These are the maximum number of bytes transferred per frame. - * The output buffer size cannot be increased due to the size encoding. + * These are the default number of bytes transferred per frame if the + * endpoint doesn't tell us. The output buffer size is a hard limit + * for devices that use a 6-bit size encoding. */ #define UFTDIIBUFSIZE 64 #define UFTDIOBUFSIZE 64 +/* + * Magic constants! Where do these come from? They're what Linux uses... + */ +#define UFTDI_MAX_IBUFSIZE 512 +#define UFTDI_MAX_OBUFSIZE 256 + struct uftdi_softc { USBBASEDEVICE sc_dev; /* base device */ usbd_device_handle sc_udev; /* device */ @@ -243,6 +250,7 @@ USB_ATTACH(uftdi) sc-sc_iface[idx] = iface; uca.bulkin = uca.bulkout = -1; + uca.ibufsize = uca.obufsize = 0; for (i = 0; i id-bNumEndpoints; i++) { int addr, dir, attr; ed = usbd_interface2endpoint_descriptor(iface, i); @@ -256,11 +264,22 @@ USB_ATTACH(uftdi) addr = ed-bEndpointAddress; dir = UE_GET_DIR(ed-bEndpointAddress); attr = ed-bmAttributes UE_XFERTYPE; - if (dir == UE_DIR_IN attr == UE_BULK) + if (dir == UE_DIR_IN attr == UE_BULK) { uca.bulkin = addr; - else if (dir == UE_DIR_OUT attr == UE_BULK) +uca.ibufsize = UGETW(ed-wMaxPacketSize); +if (uca.ibufsize = UFTDI_MAX_IBUFSIZE) + uca.ibufsize = UFTDI_MAX_IBUFSIZE; + } else if (dir == UE_DIR_OUT attr == UE_BULK) { uca.bulkout = addr; - else { +uca.obufsize = UGETW(ed-wMaxPacketSize) +- sc-sc_hdrlen; +if (uca.obufsize = UFTDI_MAX_OBUFSIZE) + uca.obufsize = UFTDI_MAX_OBUFSIZE; +/* Limit length if we have a 6-bit header. */ +if ((sc-sc_hdrlen 0) +(uca.obufsize UFTDIOBUFSIZE)) + uca.obufsize = UFTDIOBUFSIZE; + } else { aprint_error_dev(self, unexpected endpoint\n); goto bad; @@ -279,9 +298,11 @@ USB_ATTACH(uftdi) uca.portno = FTDI_PIT_SIOA + idx; /* bulkin, bulkout set above */ - uca.ibufsize = UFTDIIBUFSIZE; - uca.obufsize = UFTDIOBUFSIZE - sc-sc_hdrlen; - uca.ibufsizepad = UFTDIIBUFSIZE; + if (uca.ibufsize == 0) + uca.ibufsize = UFTDIIBUFSIZE; + uca.ibufsizepad = uca.ibufsize; + if (uca.obufsize == 0) + uca.obufsize = UFTDIOBUFSIZE - sc-sc_hdrlen; uca.opkthdrlen = sc-sc_hdrlen; uca.device = dev; uca.iface = iface; @@ -289,7 +310,9 @@ USB_ATTACH(uftdi) uca.arg = sc; uca.info = NULL; - DPRINTF((uftdi: in=0x%x out=0x%x\n, uca.bulkin, uca.bulkout)); + DPRINTF((uftdi: in=0x%x out=0x%x isize=0x%x osize=0x%x\n, + uca.bulkin, uca.bulkout, + uca.ibufsize, uca.obufsize)); sc-sc_subdev[idx] = config_found_sm_loc(self, ucombus, NULL, uca, ucomprint, ucomsubmatch); }
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: msaitoh Date: Wed May 27 06:19:25 UTC 2015 Modified Files: src/doc [netbsd-5]: CHANGES-5.3 Log Message: Ticket 1964. To generate a diff of this commit: cvs rdiff -u -r1.1.2.115 -r1.1.2.116 src/doc/CHANGES-5.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.3 diff -u src/doc/CHANGES-5.3:1.1.2.115 src/doc/CHANGES-5.3:1.1.2.116 --- src/doc/CHANGES-5.3:1.1.2.115 Fri May 22 11:05:57 2015 +++ src/doc/CHANGES-5.3 Wed May 27 06:19:25 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.3,v 1.1.2.115 2015/05/22 11:05:57 sborrill Exp $ +# $NetBSD: CHANGES-5.3,v 1.1.2.116 2015/05/27 06:19:25 msaitoh Exp $ A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3 release: @@ -3897,3 +3897,7 @@ sys/arch/xen/xen/xenevt.c 1.42 Fix off by one error, addresses port-xen/49919. [bouyer, ticket #1965] +sys/dev/usb/uftdi.c1.53 + + Use as large a packet size as the ftdi endpoint specifies. + [riastradh, ticket #1964]
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Wed May 27 06:54:18 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: xhci.c Log Message: Add comments. Some cosmetic changes. From Takahiro HAYASHI. To generate a diff of this commit: cvs rdiff -u -r1.28.2.20 -r1.28.2.21 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.28.2.20 src/sys/dev/usb/xhci.c:1.28.2.21 --- src/sys/dev/usb/xhci.c:1.28.2.20 Tue Apr 7 06:52:03 2015 +++ src/sys/dev/usb/xhci.c Wed May 27 06:54:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.28.2.20 2015/04/07 06:52:03 skrll Exp $ */ +/* $NetBSD: xhci.c,v 1.28.2.21 2015/05/27 06:54:18 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -26,8 +26,17 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* + * USB rev 3.1 specification + * http://www.usb.org/developers/docs/usb_31_040315.zip + * USB rev 2.0 specification + * http://www.usb.org/developers/docs/usb20_docs/usb_20_031815.zip + * xHCI rev 1.1 specification + * http://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/extensible-host-controler-interface-usb-xhci.pdf + */ + #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.20 2015/04/07 06:52:03 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.21 2015/05/27 06:54:18 skrll Exp $); #include opt_usb.h @@ -1374,7 +1383,7 @@ xhci_stop_endpoint(struct usbd_pipe *pip /* * Set TR Dequeue Pointer. * xCHI 1.1 4.6.10 6.4.3.9 - * Purge all of transfer requests in ring. + * Purge all of the transfer requests on ring. * EPSTATE of endpoint must be ERROR or STOPPED, or CONTEXT_STATE error. */ static usbd_status @@ -1578,7 +1587,13 @@ xhci_abort_xfer(struct usbd_xfer *xfer, } #if 1 /* XXX experimental */ -/* issue reset_ep and set_dequeue in thread context */ +/* + * Recover STALLed endpoint. + * xHCI 1.1 sect 4.10.2.1 + * Issue RESET_EP to recover halt condition and SET_TR_DEQUEUE to remove + * all transfers on transfer ring. + * These are done in thread context asynchronously. + */ static void xhci_clear_endpoint_stall_async_task(void *cookie) { @@ -2765,8 +2780,7 @@ xhci_roothub_ctrl(struct usbd_bus *bus, break; case C(UR_SET_FEATURE, UT_WRITE_CLASS_DEVICE): break; - case C(UR_SET_FEATURE, UT_WRITE_CLASS_OTHER): - { + case C(UR_SET_FEATURE, UT_WRITE_CLASS_OTHER): { int optval = (index 8) 0xff; index = 0xff; if (index 1 || index sc-sc_maxports) {
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Wed May 27 07:03:18 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: xhci.c Log Message: Fix slot leak when address_device fails. From Takahiro HAYASHI. To generate a diff of this commit: cvs rdiff -u -r1.28.2.22 -r1.28.2.23 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.28.2.22 src/sys/dev/usb/xhci.c:1.28.2.23 --- src/sys/dev/usb/xhci.c:1.28.2.22 Wed May 27 06:56:16 2015 +++ src/sys/dev/usb/xhci.c Wed May 27 07:03:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.28.2.22 2015/05/27 06:56:16 skrll Exp $ */ +/* $NetBSD: xhci.c,v 1.28.2.23 2015/05/27 07:03:18 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.22 2015/05/27 06:56:16 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.23 2015/05/27 07:03:18 skrll Exp $); #include opt_usb.h @@ -2065,6 +2065,14 @@ xhci_new_device(device_t parent, struct err = xhci_init_slot(dev, slot, route, rhport); if (err) { dev-ud_hcpriv = NULL; + /* + * We have to disable_slot here because + * xs-xs_idx == 0 when xhci_init_slot fails, + * in that case usbd_remove_dev won't work. + */ + mutex_enter(sc-sc_lock); + xhci_disable_slot(sc, slot); + mutex_exit(sc-sc_lock); goto bad; }
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Wed May 27 07:08:16 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: xhci.c Log Message: Rewrite if-else-if chains with switch-case. From Takahiro HAYASHI. To generate a diff of this commit: cvs rdiff -u -r1.28.2.24 -r1.28.2.25 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.28.2.24 src/sys/dev/usb/xhci.c:1.28.2.25 --- src/sys/dev/usb/xhci.c:1.28.2.24 Wed May 27 07:06:58 2015 +++ src/sys/dev/usb/xhci.c Wed May 27 07:08:16 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.28.2.24 2015/05/27 07:06:58 skrll Exp $ */ +/* $NetBSD: xhci.c,v 1.28.2.25 2015/05/27 07:08:16 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.24 2015/05/27 07:06:58 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.25 2015/05/27 07:08:16 skrll Exp $); #include opt_usb.h @@ -1754,17 +1754,19 @@ xhci_handle_event(struct xhci_softc * co } } - if (trberr == XHCI_TRB_ERROR_SUCCESS || - trberr == XHCI_TRB_ERROR_SHORT_PKT) { + switch (trberr) { + case XHCI_TRB_ERROR_SHORT_PKT: + case XHCI_TRB_ERROR_SUCCESS: xfer-ux_actlen = xfer-ux_length - XHCI_TRB_2_REM_GET(trb_2); err = USBD_NORMAL_COMPLETION; - } else if (trberr == XHCI_TRB_ERROR_STALL || - trberr == XHCI_TRB_ERROR_BABBLE) { - err = USBD_STALLED; - xr-is_halted = true; + break; + case XHCI_TRB_ERROR_STALL: + case XHCI_TRB_ERROR_BABBLE: DPRINTFN(1, evh: xfer done: ERR %u slot %u dci %u, trberr, slot, dci, 0); + xr-is_halted = true; + err = USBD_STALLED; #if 1 /* XXX experimental */ /* * Stalled endpoints can be recoverd by issuing @@ -1781,12 +1783,22 @@ xhci_handle_event(struct xhci_softc * co */ xfer-ux_status = err; xhci_clear_endpoint_stall_async(xfer); + return; +#else break; #endif - } else { + case XHCI_TRB_ERROR_CMD_ABORTED: + case XHCI_TRB_ERROR_STOPPED: + err = USBD_CANCELLED; + break; + case XHCI_TRB_ERROR_NO_SLOTS: + err = USBD_NO_ADDR; + break; + default: DPRINTFN(1, evh: xfer done: ERR %u slot %u dci %u, trberr, slot, dci, 0); err = USBD_IOERROR; + break; } xfer-ux_status = err;
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Wed May 27 06:56:16 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: xhci.c Log Message: Don't abuse pipe-up_async_task for xhci_clear_endpoint_stall_async_task. Add member struct usb_task xp_async_task to struct xhci_pipe. From Takahiro HAYASHI. To generate a diff of this commit: cvs rdiff -u -r1.28.2.21 -r1.28.2.22 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.28.2.21 src/sys/dev/usb/xhci.c:1.28.2.22 --- src/sys/dev/usb/xhci.c:1.28.2.21 Wed May 27 06:54:18 2015 +++ src/sys/dev/usb/xhci.c Wed May 27 06:56:16 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.28.2.21 2015/05/27 06:54:18 skrll Exp $ */ +/* $NetBSD: xhci.c,v 1.28.2.22 2015/05/27 06:56:16 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.21 2015/05/27 06:54:18 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.22 2015/05/27 06:56:16 skrll Exp $); #include opt_usb.h @@ -116,6 +116,7 @@ fail: struct xhci_pipe { struct usbd_pipe xp_pipe; + struct usb_task xp_async_task; }; #define XHCI_COMMAND_RING_TRBS 256 @@ -1620,6 +1621,7 @@ static usbd_status xhci_clear_endpoint_stall_async(struct usbd_xfer *xfer) { struct xhci_softc * const sc = xfer-ux_pipe-up_dev-ud_bus-ub_hcpriv; + struct xhci_pipe * const xp = (struct xhci_pipe *)xfer-ux_pipe; XHCIHIST_FUNC(); XHCIHIST_CALLED(); DPRINTFN(4, xfer %p, xfer, 0, 0, 0); @@ -1628,11 +1630,9 @@ xhci_clear_endpoint_stall_async(struct u return USBD_IOERROR; } - /* XXX never use up_async_task for incompatible type of function */ - usb_init_task(xfer-ux_pipe-up_async_task, + usb_init_task(xp-xp_async_task, xhci_clear_endpoint_stall_async_task, xfer, USB_TASKQ_MPSAFE); - usb_add_task(xfer-ux_pipe-up_dev, xfer-ux_pipe-up_async_task, - USB_TASKQ_HC); + usb_add_task(xfer-ux_pipe-up_dev, xp-xp_async_task, USB_TASKQ_HC); DPRINTFN(4, ends, 0, 0, 0, 0); return USBD_NORMAL_COMPLETION;
CVS commit: [nick-nhusb] src/sys/dev/usb
Module Name:src Committed By: skrll Date: Wed May 27 07:06:58 UTC 2015 Modified Files: src/sys/dev/usb [nick-nhusb]: xhci.c Log Message: Add some sanity checks for xfer. [Ed: should really find the bugs] From Takahiro HAYASHI. To generate a diff of this commit: cvs rdiff -u -r1.28.2.23 -r1.28.2.24 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.28.2.23 src/sys/dev/usb/xhci.c:1.28.2.24 --- src/sys/dev/usb/xhci.c:1.28.2.23 Wed May 27 07:03:18 2015 +++ src/sys/dev/usb/xhci.c Wed May 27 07:06:58 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.28.2.23 2015/05/27 07:03:18 skrll Exp $ */ +/* $NetBSD: xhci.c,v 1.28.2.24 2015/05/27 07:06:58 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.23 2015/05/27 07:03:18 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: xhci.c,v 1.28.2.24 2015/05/27 07:06:58 skrll Exp $); #include opt_usb.h @@ -1702,7 +1702,10 @@ xhci_handle_event(struct xhci_softc * co xs = sc-sc_slots[slot]; xr = xs-xs_ep[dci].xe_tr; /* sanity check */ - KASSERT(xs-xs_idx != 0); + if (xs-xs_idx == 0 || xs-xs_idx = sc-sc_maxslots) { + DPRINTFN(1, invalid slot %u, xs-xs_idx, 0, 0, 0); + break; + } if ((trb_3 XHCI_TRB_3_ED_BIT) == 0) { bus_addr_t trbp = xhci_ring_trbp(xr, 0); @@ -1722,8 +1725,24 @@ xhci_handle_event(struct xhci_softc * co } else { xx = (void *)(uintptr_t)(trb_0 ~0x3); } + /* XXX this may not happen */ + if (xx == NULL) { + DPRINTFN(1, xfer done: xx is NULL, 0, 0, 0, 0); + break; + } xfer = xx-xx_xfer; + /* XXX this may happen when detaching */ + if (xfer == NULL) { + DPRINTFN(1, xfer done: xfer is NULL, 0, 0, 0, 0); + break; + } DPRINTFN(14, xfer %p, xfer, 0, 0, 0); + /* XXX I dunno why this happens */ + if (!xfer-ux_pipe-up_repeat + SIMPLEQ_EMPTY(xfer-ux_pipe-up_queue)) { + DPRINTFN(1, xfer done: xfer not started, 0, 0, 0, 0); + break; + } if ((trb_3 XHCI_TRB_3_ED_BIT) != 0) { DPRINTFN(14, transfer event data:
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: matt Date: Thu May 28 02:23:18 UTC 2015 Modified Files: src/sys/arch/arm/cortex: a9_mpsubr.S Log Message: A15 change for 2 cores. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/arm/cortex/a9_mpsubr.S 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/cortex/a9_mpsubr.S diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.38 src/sys/arch/arm/cortex/a9_mpsubr.S:1.39 --- src/sys/arch/arm/cortex/a9_mpsubr.S:1.38 Sun May 17 06:12:40 2015 +++ src/sys/arch/arm/cortex/a9_mpsubr.S Thu May 28 02:23:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: a9_mpsubr.S,v 1.38 2015/05/17 06:12:40 matt Exp $ */ +/* $NetBSD: a9_mpsubr.S,v 1.39 2015/05/28 02:23:18 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -469,6 +469,14 @@ cortex_init: mrc p15, 0, r0, c1, c0, 1 // ACTLR read orr r0, r0, #CORTEXA9_AUXCTL_SMP // enable SMP +#if defined(CPU_CORTEXA15) + // The A15 requires snoop-delayed exclusive handling to be set + // if there are 3 or more CPUs. + mrc p15, 1, r2, c9, c0, 2 // L2CTRL read + ubfx r2, r2, #25, #1 // bit 25 is set when 3+ CPUs + bfi r0, r2, #31, #1 // copy it to bit 31 in ACTRL +#endif + #if defined(CPU_CORTEXA5) || defined(CPU_CORTEXA9) // // Step 4a (continued on A5/A9), ACTLR.FW=1)
CVS commit: src/sys/arch/arm/include
Module Name:src Committed By: matt Date: Thu May 28 02:22:37 UTC 2015 Modified Files: src/sys/arch/arm/include: locore.h Log Message: Fix ldrht To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/arm/include/locore.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/locore.h diff -u src/sys/arch/arm/include/locore.h:1.21 src/sys/arch/arm/include/locore.h:1.22 --- src/sys/arch/arm/include/locore.h:1.21 Mon Mar 30 05:43:55 2015 +++ src/sys/arch/arm/include/locore.h Thu May 28 02:22:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.h,v 1.21 2015/03/30 05:43:55 matt Exp $ */ +/* $NetBSD: locore.h,v 1.22 2015/05/28 02:22:37 matt Exp $ */ /* * Copyright (c) 1994-1996 Mark Brinicombe. @@ -227,7 +227,7 @@ read_thumb_insn(vaddr_t va, bool user_p) uint32_t insn; if (user_p) { #ifdef _ARM_ARCH_T2 - __asm __volatile(ldrht %0, [%1], #0 : =r(insn) : r(va)); + __asm __volatile(ldrht %0, [%1] : =r(insn) : r(va)); #else __asm __volatile(ldrt %0, [%1] : =r(insn) : r(va ~3)); #ifdef __ARMEB__
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Thu May 28 04:16:50 UTC 2015 Modified Files: src/sys/arch/mips/include: cpu.h Log Message: Use the lwp_getcpu() inline for curcpu(). To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/arch/mips/include/cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.110 src/sys/arch/mips/include/cpu.h:1.111 --- src/sys/arch/mips/include/cpu.h:1.110 Sat May 2 17:39:31 2015 +++ src/sys/arch/mips/include/cpu.h Thu May 28 04:16:50 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.110 2015/05/02 17:39:31 matt Exp $ */ +/* $NetBSD: cpu.h,v 1.111 2015/05/28 04:16:50 matt Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -232,7 +232,7 @@ extern struct cpu_info cpu_info_store; register struct lwp *mips_curlwp asm(MIPS_CURLWP_QUOTED); #define curlwp mips_curlwp -#define curcpu() (curlwp-l_cpu) +#define curcpu() lwp_getcpu(curlwp) #define curpcb ((struct pcb *)lwp_getpcb(curlwp)) #ifdef MULTIPROCESSOR #define cpu_number() (curcpu()-ci_index)
CVS commit: src/sbin/brconfig
Module Name:src Committed By: matt Date: Thu May 28 01:35:32 UTC 2015 Modified Files: src/sbin/brconfig: brconfig.c Log Message: Constify an array of strings. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sbin/brconfig/brconfig.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/brconfig/brconfig.c diff -u src/sbin/brconfig/brconfig.c:1.14 src/sbin/brconfig/brconfig.c:1.15 --- src/sbin/brconfig/brconfig.c:1.14 Thu Aug 23 12:06:32 2012 +++ src/sbin/brconfig/brconfig.c Thu May 28 01:35:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: brconfig.c,v 1.14 2012/08/23 12:06:32 drochner Exp $ */ +/* $NetBSD: brconfig.c,v 1.15 2015/05/28 01:35:31 matt Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -43,7 +43,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: brconfig.c,v 1.14 2012/08/23 12:06:32 drochner Exp $); +__RCSID($NetBSD: brconfig.c,v 1.15 2015/05/28 01:35:31 matt Exp $); #endif @@ -411,7 +411,7 @@ show_config(int sock, const char *bridge static void show_interfaces(int sock, const char *bridge, const char *prefix) { - static const char *stpstates[] = { + static const char const stpstates[][11] = { disabled, listening, learning,
CVS commit: src/sys/arch/arm/include/arm32
Module Name:src Committed By: matt Date: Thu May 28 02:24:23 UTC 2015 Modified Files: src/sys/arch/arm/include/arm32: vmparam.h Log Message: ARM systems are no longer small, increase MAXTSIZ/MAXDSIZ/MAXSSIZ. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/include/arm32/vmparam.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/include/arm32/vmparam.h diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.36 src/sys/arch/arm/include/arm32/vmparam.h:1.37 --- src/sys/arch/arm/include/arm32/vmparam.h:1.36 Tue Feb 24 22:02:40 2015 +++ src/sys/arch/arm/include/arm32/vmparam.h Thu May 28 02:24:23 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.36 2015/02/24 22:02:40 joerg Exp $ */ +/* $NetBSD: vmparam.h,v 1.37 2015/05/28 02:24:23 matt Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -61,18 +61,18 @@ * Note that MAXTSIZ can't be larger than 32M, otherwise the compiler * would have to be changed to not generate bl instructions. */ -#define MAXTSIZ (64*1024*1024) /* max text size */ +#define MAXTSIZ (128*1024*1024) /* max text size */ #ifndef DFLDSIZ -#define DFLDSIZ (128*1024*1024) /* initial data size limit */ +#define DFLDSIZ (384*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (1024*1024*1024) /* max data size */ +#define MAXDSIZ (1856*1024*1024) /* max data size */ #endif #ifndef DFLSSIZ -#define DFLSSIZ (2*1024*1024) /* initial stack size limit */ +#define DFLSSIZ (4*1024*1024) /* initial stack size limit */ #endif #ifndef MAXSSIZ -#define MAXSSIZ (32*1024*1024) /* max stack size */ +#define MAXSSIZ (64*1024*1024) /* max stack size */ #endif /*
CVS commit: src/share/mk
Module Name:src Committed By: matt Date: Thu May 28 04:08:48 UTC 2015 Modified Files: src/share/mk: bsd.own.mk Log Message: Compile ARM apcs with -marm (no thumb). To generate a diff of this commit: cvs rdiff -u -r1.849 -r1.850 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.849 src/share/mk/bsd.own.mk:1.850 --- src/share/mk/bsd.own.mk:1.849 Thu May 21 00:12:10 2015 +++ src/share/mk/bsd.own.mk Thu May 28 04:08:48 2015 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.849 2015/05/21 00:12:10 rjs Exp $ +# $NetBSD: bsd.own.mk,v 1.850 2015/05/28 04:08:48 matt Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -820,6 +820,7 @@ MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH .if !empty(MACHINE_ARCH:M*arm*) # Flags to pass to CC for using the old APCS ABI on ARM for compat or stand. ARM_APCS_FLAGS= -mabi=apcs-gnu -mfloat-abi=soft +ARM_APCS_FLAGS+=${${ACTIVE_CC} == gcc:? -marm :} ARM_APCS_FLAGS+=${${ACTIVE_CC} == clang:? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :} .endif
CVS commit: src/sys/arch/riscv/include
Module Name:src Committed By: matt Date: Thu May 28 02:19:05 UTC 2015 Modified Files: src/sys/arch/riscv/include: elf_machdep.h Log Message: add ELF64_MACHDEP_ID To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/riscv/include/elf_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/riscv/include/elf_machdep.h diff -u src/sys/arch/riscv/include/elf_machdep.h:1.4 src/sys/arch/riscv/include/elf_machdep.h:1.5 --- src/sys/arch/riscv/include/elf_machdep.h:1.4 Wed Apr 1 21:59:01 2015 +++ src/sys/arch/riscv/include/elf_machdep.h Thu May 28 02:19:05 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_machdep.h,v 1.4 2015/04/01 21:59:01 matt Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.5 2015/05/28 02:19:05 matt Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -33,6 +33,7 @@ #define _RISCV_ELF_MACHDEP_H_ #define ELF32_MACHDEP_ID EM_RISCV +#define ELF64_MACHDEP_ID EM_RISCV #define ELF32_MACHDEP_ENDIANNESS ELFDATA2LSB #define ELF64_MACHDEP_ENDIANNESS ELFDATA2LSB
CVS commit: src/external/bsd/blacklist/lib
Module Name:src Committed By: christos Date: Thu May 28 01:01:37 UTC 2015 Modified Files: src/external/bsd/blacklist/lib: bl.c Log Message: put back setting uid and gid to -1 if they are not available. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/external/bsd/blacklist/lib/bl.c 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/lib/bl.c diff -u src/external/bsd/blacklist/lib/bl.c:1.25 src/external/bsd/blacklist/lib/bl.c:1.26 --- src/external/bsd/blacklist/lib/bl.c:1.25 Wed May 27 18:37:13 2015 +++ src/external/bsd/blacklist/lib/bl.c Wed May 27 21:01:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bl.c,v 1.25 2015/05/27 22:37:13 christos Exp $ */ +/* $NetBSD: bl.c,v 1.26 2015/05/28 01:01:37 christos Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include sys/cdefs.h -__RCSID($NetBSD: bl.c,v 1.25 2015/05/27 22:37:13 christos Exp $); +__RCSID($NetBSD: bl.c,v 1.26 2015/05/28 01:01:37 christos Exp $); #include sys/param.h #include sys/types.h @@ -483,6 +483,10 @@ bl_recv(bl_t b) bi-bi_type = ub.bl.bl_type; bi-bi_slen = ub.bl.bl_salen; bi-bi_ss = ub.bl.bl_ss; +#ifndef CRED_MESSAGE + bi-bi_uid = -1; + bi-bi_gid = -1; +#endif strlcpy(bi-bi_msg, ub.bl.bl_data, MIN(sizeof(bi-bi_msg), ((size_t)rlen - sizeof(ub.bl) + 1))); return bi;
CVS commit: src/sys/arch/evbarm/bcm53xx
Module Name:src Committed By: matt Date: Thu May 28 02:22:06 UTC 2015 Modified Files: src/sys/arch/evbarm/bcm53xx: bcm53xx_start.S Log Message: Remove #define VERBOSE_INIT_ARM To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S 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/evbarm/bcm53xx/bcm53xx_start.S diff -u src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S:1.11 src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S:1.12 --- src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S:1.11 Fri Feb 21 22:22:48 2014 +++ src/sys/arch/evbarm/bcm53xx/bcm53xx_start.S Thu May 28 02:22:05 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bcm53xx_start.S,v 1.11 2014/02/21 22:22:48 matt Exp $ */ +/* $NetBSD: bcm53xx_start.S,v 1.12 2015/05/28 02:22:05 matt Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -45,10 +45,7 @@ #define CONADDR 0x18000300 #endif -RCSID($NetBSD: bcm53xx_start.S,v 1.11 2014/02/21 22:22:48 matt Exp $) - -#undef VERBOSE_INIT_ARM -#define VERBOSE_INIT_ARM +RCSID($NetBSD: bcm53xx_start.S,v 1.12 2015/05/28 02:22:05 matt Exp $) #if defined(VERBOSE_INIT_ARM) #define XPUTC(n) mov r0, n; bl xputc
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: matt Date: Wed May 27 21:56:43 UTC 2015 Modified Files: src/sys/compat/netbsd32: netbsd32_ioctl.c Log Message: Fix netbsd32 ifdrv copy routines to not use memcpy. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/compat/netbsd32/netbsd32_ioctl.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_ioctl.c diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.73 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.74 --- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.73 Wed May 27 21:42:43 2015 +++ src/sys/compat/netbsd32/netbsd32_ioctl.c Wed May 27 21:56:43 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ioctl.c,v 1.73 2015/05/27 21:42:43 matt Exp $ */ +/* $NetBSD: netbsd32_ioctl.c,v 1.74 2015/05/27 21:56:43 matt Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_ioctl.c,v 1.73 2015/05/27 21:42:43 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_ioctl.c,v 1.74 2015/05/27 21:56:43 matt Exp $); #include sys/param.h #include sys/systm.h @@ -163,7 +163,9 @@ static inline void netbsd32_to_ifdrv(struct netbsd32_ifdrv *s32p, struct ifdrv *p, u_long cmd) { - memcpy(p, s32p, sizeof *s32p); + memcpy(p-ifd_name, s32p-ifd_name, sizeof s32p-ifd_name); + p-ifd_cmd = s32p-ifd_cmd; + p-ifd_len = s32p-ifd_len; p-ifd_data = (void *)NETBSD32PTR64(s32p-ifd_data); } @@ -502,12 +504,10 @@ netbsd32_from_ifmediareq(struct ifmediar static inline void netbsd32_from_ifdrv(struct ifdrv *p, struct netbsd32_ifdrv *s32p, u_long cmd) { - - memcpy(s32p, p, sizeof *p); -/* filled in? */ -#if 0 - s32p-ifm_data = (netbsd32_u_longp_t)p-ifm_data; -#endif + memcpy(p-ifd_name, s32p-ifd_name, sizeof s32p-ifd_name); + s32p-ifd_cmd = p-ifd_cmd; + s32p-ifd_len = p-ifd_len; + NETBSD32PTR32(s32p-ifd_data, p-ifd_data); } static inline void
CVS commit: src/external/bsd/blacklist/bin
Module Name:src Committed By: christos Date: Wed May 27 22:37:37 UTC 2015 Modified Files: src/external/bsd/blacklist/bin: state.c Log Message: print the key in human readable form when debugging. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/external/bsd/blacklist/bin/state.c 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/bin/state.c diff -u src/external/bsd/blacklist/bin/state.c:1.15 src/external/bsd/blacklist/bin/state.c:1.16 --- src/external/bsd/blacklist/bin/state.c:1.15 Tue Jan 27 14:40:37 2015 +++ src/external/bsd/blacklist/bin/state.c Wed May 27 18:37:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: state.c,v 1.15 2015/01/27 19:40:37 christos Exp $ */ +/* $NetBSD: state.c,v 1.16 2015/05/27 22:37:37 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include sys/cdefs.h -__RCSID($NetBSD: state.c,v 1.15 2015/01/27 19:40:37 christos Exp $); +__RCSID($NetBSD: state.c,v 1.16 2015/05/27 22:37:37 christos Exp $); #include sys/types.h #include sys/socket.h @@ -115,6 +115,9 @@ dumpkey(const struct conf *k) z = sizeof(buf); } (*lfun)(LOG_DEBUG, %s, buf); + (*lfun)(LOG_DEBUG, %s: %s, __func__, + conf_print(buf, sizeof(buf), , , k)); + } int
CVS commit: src/external/bsd/blacklist/lib
Module Name:src Committed By: christos Date: Wed May 27 22:37:13 UTC 2015 Modified Files: src/external/bsd/blacklist/lib: bl.c Log Message: Make sure that we get the socket messages we expect, otherwise return NULL. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/external/bsd/blacklist/lib/bl.c 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/lib/bl.c diff -u src/external/bsd/blacklist/lib/bl.c:1.24 src/external/bsd/blacklist/lib/bl.c:1.25 --- src/external/bsd/blacklist/lib/bl.c:1.24 Mon Feb 2 20:22:08 2015 +++ src/external/bsd/blacklist/lib/bl.c Wed May 27 18:37:13 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bl.c,v 1.24 2015/02/03 01:22:08 christos Exp $ */ +/* $NetBSD: bl.c,v 1.25 2015/05/27 22:37:13 christos Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include sys/cdefs.h -__RCSID($NetBSD: bl.c,v 1.24 2015/02/03 01:22:08 christos Exp $); +__RCSID($NetBSD: bl.c,v 1.25 2015/05/27 22:37:13 christos Exp $); #include sys/param.h #include sys/types.h @@ -199,6 +199,7 @@ bl_init(bl_t b, bool srv) } b-b_connected = 0; +#define GOT_FD 1 #if defined(LOCAL_CREDS) #define CRED_LEVEL 0 #define CRED_NAME LOCAL_CREDS @@ -207,6 +208,7 @@ bl_init(bl_t b, bool srv) #define CRED_MESSAGE SCM_CREDS #define CRED_SIZE SOCKCREDSIZE(NGROUPS_MAX) #define CRED_TYPE struct sockcred +#define GOT_CRED 2 #elif defined(SO_PASSCRED) #define CRED_LEVEL SOL_SOCKET #define CRED_NAME SO_PASSCRED @@ -215,7 +217,9 @@ bl_init(bl_t b, bool srv) #define CRED_MESSAGE SCM_CREDENTIALS #define CRED_SIZE sizeof(struct ucred) #define CRED_TYPE struct ucred +#define GOT_CRED 2 #else +#define GOT_CRED 0 /* * getpeereid() and LOCAL_PEERCRED don't help here * because we are not a stream socket! @@ -395,9 +399,13 @@ bl_recv(bl_t b) bl_message_t bl; char buf[512]; } ub; + int got; ssize_t rlen; bl_info_t *bi = b-b_info; + got = 0; + memset(bi, 0, sizeof(*bi)); + iov.iov_base = ub.buf; iov.iov_len = sizeof(ub); @@ -433,12 +441,14 @@ bl_recv(bl_t b) continue; } memcpy(bi-bi_fd, CMSG_DATA(cmsg), sizeof(bi-bi_fd)); + got |= GOT_FD; break; #ifdef CRED_MESSAGE case CRED_MESSAGE: sc = (void *)CMSG_DATA(cmsg); bi-bi_uid = sc-CRED_SC_UID; bi-bi_gid = sc-CRED_SC_GID; + got |= GOT_CRED; break; #endif default: @@ -450,6 +460,16 @@ bl_recv(bl_t b) } + if (got != (GOT_CRED|GOT_FD)) { + bl_log(b-b_fun, LOG_ERR, message missing %s %s, +#if GOT_CRED != 0 + (got GOT_CRED) == 0 ? cred : +#endif + , (got GOT_FD) == 0 ? fd : ); + + return NULL; + } + if ((size_t)rlen = sizeof(ub.bl)) { bl_log(b-b_fun, LOG_ERR, message too short %zd, rlen); return NULL; @@ -463,10 +483,6 @@ bl_recv(bl_t b) bi-bi_type = ub.bl.bl_type; bi-bi_slen = ub.bl.bl_salen; bi-bi_ss = ub.bl.bl_ss; -#ifndef CRED_MESSAGE - bi-bi_uid = -1; - bi-bi_gid = -1; -#endif strlcpy(bi-bi_msg, ub.bl.bl_data, MIN(sizeof(bi-bi_msg), ((size_t)rlen - sizeof(ub.bl) + 1))); return bi;
CVS commit: src/external/bsd/blacklist/bin
Module Name:src Committed By: christos Date: Wed May 27 22:39:01 UTC 2015 Modified Files: src/external/bsd/blacklist/bin: conf.c Log Message: Merge the uid data too, so that we don't end up with multiple entries when we don't care about the uid in the config file. In this case sshd returns either uid=root|sshd depending on how we failed, so we used to get two entries. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/external/bsd/blacklist/bin/conf.c 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/bin/conf.c diff -u src/external/bsd/blacklist/bin/conf.c:1.18 src/external/bsd/blacklist/bin/conf.c:1.19 --- src/external/bsd/blacklist/bin/conf.c:1.18 Tue Jan 27 19:42:15 2015 +++ src/external/bsd/blacklist/bin/conf.c Wed May 27 18:39:01 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.18 2015/01/28 00:42:15 christos Exp $ */ +/* $NetBSD: conf.c,v 1.19 2015/05/27 22:39:01 christos Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #endif #include sys/cdefs.h -__RCSID($NetBSD: conf.c,v 1.18 2015/01/28 00:42:15 christos Exp $); +__RCSID($NetBSD: conf.c,v 1.19 2015/05/27 22:39:01 christos Exp $); #include stdio.h #include string.h @@ -882,6 +882,7 @@ conf_apply(struct conf *c, const struct conf_print(buf, sizeof(buf), to:\t, , c)); } memcpy(c-c_name, sc-c_name, CONFNAMESZ); + c-c_uid = sc-c_uid; c-c_rmask = sc-c_rmask; c-c_nfail = sc-c_nfail; c-c_duration = sc-c_duration; @@ -908,6 +909,8 @@ conf_merge(struct conf *c, const struct if (sc-c_name[0]) memcpy(c-c_name, sc-c_name, CONFNAMESZ); + if (sc-c_uid != -2) + c-c_uid = sc-c_uid; if (sc-c_rmask != -2) c-c_lmask = c-c_rmask = sc-c_rmask; if (sc-c_nfail != -2)
CVS commit: [nick-nhusb] src/sys/dev
Module Name:src Committed By: skrll Date: Wed May 27 07:22:52 UTC 2015 Modified Files: src/sys/dev/pci [nick-nhusb]: xhci_pci.c src/sys/dev/usb [nick-nhusb]: xhci.c Log Message: Add patch for intel chips quirk from ryoon@ in https://mail-index.netbsd.org/netbsd-bugs/2014/08/31/msg038109.html slightly modified to set quirks before calling xhci_init. Set special IMOD value and route ports to xhci for intel chips. From Takahiro HAYASHI. To generate a diff of this commit: cvs rdiff -u -r1.4.2.2 -r1.4.2.3 src/sys/dev/pci/xhci_pci.c cvs rdiff -u -r1.28.2.25 -r1.28.2.26 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/pci/xhci_pci.c diff -u src/sys/dev/pci/xhci_pci.c:1.4.2.2 src/sys/dev/pci/xhci_pci.c:1.4.2.3 --- src/sys/dev/pci/xhci_pci.c:1.4.2.2 Mon Apr 6 12:17:30 2015 +++ src/sys/dev/pci/xhci_pci.c Wed May 27 07:22:51 2015 @@ -1,4 +1,5 @@ -/* $NetBSD: xhci_pci.c,v 1.4.2.2 2015/04/06 12:17:30 skrll Exp $ */ +/* $NetBSD: xhci_pci.c,v 1.4.2.3 2015/05/27 07:22:51 skrll Exp $ */ +/* OpenBSD: xhci_pci.c,v 1.4 2014/07/12 17:38:51 yuo Exp */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xhci_pci.c,v 1.4.2.2 2015/04/06 12:17:30 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: xhci_pci.c,v 1.4.2.3 2015/05/27 07:22:51 skrll Exp $); #include sys/param.h #include sys/systm.h @@ -43,6 +44,7 @@ __KERNEL_RCSID(0, $NetBSD: xhci_pci.c,v #include sys/bus.h #include dev/pci/pcivar.h +#include dev/pci/pcidevs.h #include dev/usb/usb.h #include dev/usb/usbdi.h @@ -52,6 +54,17 @@ __KERNEL_RCSID(0, $NetBSD: xhci_pci.c,v #include dev/usb/xhcireg.h #include dev/usb/xhcivar.h +struct xhci_pci_quirk { + pci_vendor_id_t vendor; + pci_product_id_t product; + int quirks; +}; + +static const struct xhci_pci_quirk xhci_pci_quirks[] = { + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_CORE4G_M_XHCI, + XHCI_QUIRK_FORCE_INTR }, +}; + struct xhci_pci_softc { struct xhci_softc sc_xhci; pci_chipset_tag_t sc_pc; @@ -59,6 +72,18 @@ struct xhci_pci_softc { }; static int +xhci_pci_has_quirk(pci_vendor_id_t vendor, pci_product_id_t product) +{ + int i; + + for (i = 0; i __arraycount(xhci_pci_quirks); i++) + if (vendor == xhci_pci_quirks[i].vendor + product == xhci_pci_quirks[i].product) + return xhci_pci_quirks[i].quirks; + return 0; +} + +static int xhci_pci_match(device_t parent, cfdata_t match, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; @@ -71,6 +96,42 @@ xhci_pci_match(device_t parent, cfdata_t return 0; } +static int +xhci_pci_port_route(struct xhci_pci_softc *psc) +{ + struct xhci_softc * const sc = psc-sc_xhci; + + pcireg_t val; + + /* + * Check USB3 Port Routing Mask register that indicates the ports + * can be changed from OS, and turn on by USB3 Port SS Enable register. + */ + val = pci_conf_read(psc-sc_pc, psc-sc_tag, PCI_XHCI_INTEL_USB3PRM); + aprint_debug_dev(sc-sc_dev, + USB3PRM / USB3.0 configurable ports: 0x%08x\n, val); + + pci_conf_write(psc-sc_pc, psc-sc_tag, PCI_XHCI_INTEL_USB3_PSSEN, val); + val = pci_conf_read(psc-sc_pc, psc-sc_tag,PCI_XHCI_INTEL_USB3_PSSEN); + aprint_debug_dev(sc-sc_dev, + USB3_PSSEN / Enabled USB3.0 ports under xHCI: 0x%08x\n, val); + + /* + * Check USB2 Port Routing Mask register that indicates the USB2.0 + * ports to be controlled by xHCI HC, and switch them to xHCI HC. + */ + val = pci_conf_read(psc-sc_pc, psc-sc_tag, PCI_XHCI_INTEL_USB2PRM); + aprint_debug_dev(sc-sc_dev, + XUSB2PRM / USB2.0 ports can switch from EHCI to xHCI: + 0x%08x\n, val); + pci_conf_write(psc-sc_pc, psc-sc_tag, PCI_XHCI_INTEL_XUSB2PR, val); + val = pci_conf_read(psc-sc_pc, psc-sc_tag, PCI_XHCI_INTEL_XUSB2PR); + aprint_debug_dev(sc-sc_dev, + XUSB2PR / USB2.0 ports under xHCI: 0x%08x\n, val); + + return 0; +} + static void xhci_pci_attach(device_t parent, device_t self, void *aux) { @@ -92,6 +153,10 @@ xhci_pci_attach(device_t parent, device_ pci_aprint_devinfo(pa, USB Controller); + /* Check for quirks */ + sc-sc_quirks = xhci_pci_has_quirk(PCI_VENDOR(pa-pa_id), + PCI_PRODUCT(pa-pa_id)); + /* check if memory space access is enabled */ csr = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG); #ifdef DEBUG @@ -122,9 +187,9 @@ xhci_pci_attach(device_t parent, device_ psc-sc_pc = pc; psc-sc_tag = tag; - hccparams = bus_space_read_4(sc-sc_iot, sc-sc_ioh, 0x10); + hccparams = bus_space_read_4(sc-sc_iot, sc-sc_ioh, XHCI_HCCPARAMS); - if (pci_dma64_available(pa) ((hccparams1)==1)) + if (pci_dma64_available(pa) (XHCI_HCC_AC64(hccparams) != 0)) sc-sc_bus.ub_dmatag = pa-pa_dmat64; else sc-sc_bus.ub_dmatag = pa-pa_dmat; @@ -160,12 +225,24 @@ xhci_pci_attach(device_t parent, device_ sc-sc_id_vendor); #endif + /* Intel chipset requires SuperSpeed enable and USB2 port
CVS commit: src/share/man/man7
Module Name:src Committed By: matt Date: Wed May 27 07:52:02 UTC 2015 Modified Files: src/share/man/man7: sysctl.7 Log Message: Change draft-ietf-tcpm-initcwnd-08.txt to RFC6928, To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/share/man/man7/sysctl.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/sysctl.7 diff -u src/share/man/man7/sysctl.7:1.86 src/share/man/man7/sysctl.7:1.87 --- src/share/man/man7/sysctl.7:1.86 Thu Nov 13 16:10:21 2014 +++ src/share/man/man7/sysctl.7 Wed May 27 07:52:02 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: sysctl.7,v 1.86 2014/11/13 16:10:21 christos Exp $ +.\ $NetBSD: sysctl.7,v 1.87 2015/05/27 07:52:02 matt Exp $ .\ .\ Copyright (c) 1993 .\ The Regents of the University of California. All rights reserved. @@ -1493,7 +1493,7 @@ Perform TCP checksum on loopback. .It Li tcp.init_win A value indicating the TCP initial congestion window. The valid range -is 0 to 10 (maximum specified by draft-ietf-tcpm-initcwnd-08.txt), +is 0 to 10 (maximum specified by RFC6928), with a default of 4 (approximately 4K per RFC3390). .It Li tcp.init_win_local Like