CVS commit: src/sys/arch/mips/cavium/dev
Module Name:src Committed By: maya Date: Tue Aug 22 07:09:00 UTC 2017 Modified Files: src/sys/arch/mips/cavium/dev: if_cnmac.c Log Message: Reword warning message To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/cavium/dev/if_cnmac.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/mips/cavium/dev/if_cnmac.c diff -u src/sys/arch/mips/cavium/dev/if_cnmac.c:1.5 src/sys/arch/mips/cavium/dev/if_cnmac.c:1.6 --- src/sys/arch/mips/cavium/dev/if_cnmac.c:1.5 Thu Dec 15 09:28:03 2016 +++ src/sys/arch/mips/cavium/dev/if_cnmac.c Tue Aug 22 07:09:00 2017 @@ -1,8 +1,8 @@ -/* $NetBSD: if_cnmac.c,v 1.5 2016/12/15 09:28:03 ozaki-r Exp $ */ +/* $NetBSD: if_cnmac.c,v 1.6 2017/08/22 07:09:00 maya Exp $ */ #include #if 0 -__KERNEL_RCSID(0, "$NetBSD: if_cnmac.c,v 1.5 2016/12/15 09:28:03 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cnmac.c,v 1.6 2017/08/22 07:09:00 maya Exp $"); #endif #include "opt_octeon.h" @@ -1436,8 +1436,8 @@ octeon_eth_recv_check(struct octeon_eth_ if (ratecheck(&sc->sc_rate_recv_check_code_last, &sc->sc_rate_recv_check_code_cap)) log(LOG_WARNING, -"%s: the reception error had occured, " -"the packet was dropped (error code = %" PRId64 ")\n", +"%s: reception error, packet dropped " +"(error code = %" PRId64 ")\n", device_xname(sc->sc_dev), word2 & PIP_WQE_WORD2_NOIP_OPECODE); } OCTEON_EVCNT_INC(sc, rxerrcode);
CVS commit: src/lib
Module Name:src Committed By: mrg Date: Tue Aug 22 08:21:36 UTC 2017 Modified Files: src/lib: Makefile Log Message: don't build gmp/mpfr/mpc if we're not building GCC commands (MKGCCCMDS==no.) To generate a diff of this commit: cvs rdiff -u -r1.251 -r1.252 src/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/Makefile diff -u src/lib/Makefile:1.251 src/lib/Makefile:1.252 --- src/lib/Makefile:1.251 Sun May 21 15:28:41 2017 +++ src/lib/Makefile Tue Aug 22 08:21:36 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.251 2017/05/21 15:28:41 riastradh Exp $ +# $NetBSD: Makefile,v 1.252 2017/08/22 08:21:36 mrg Exp $ # from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91 .include @@ -86,7 +86,7 @@ SUBDIR+= ../external/gpl3/${EXTERNAL_GCC # Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5 # specific build area, but we get better parallelism this way. # We don't build compat versions of these. -. if !defined(MLIBDIR) +. if !defined(MLIBDIR) && (${MKGCCCMDS} != "no") SUBDIR+= ../external/lgpl3/gmp/lib/libgmp SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr SUBDIR+= ../external/lgpl3/mpc/lib/libmpc
CVS commit: src/external/lgpl3/gmp/lib/libgmp
Module Name:src Committed By: mrg Date: Tue Aug 22 08:26:42 UTC 2017 Removed Files: src/external/lgpl3/gmp/lib/libgmp: shlib_version Log Message: remove unused file To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/external/lgpl3/gmp/lib/libgmp/shlib_version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: maxv Date: Tue Aug 22 09:12:49 UTC 2017 Modified Files: src/sys/arch/sparc64/sparc64: compat_13_machdep.c Log Message: Apply only CCR. Otherwise userland could set PSTATE_PRIV in %pstate and get kernel privileges on the hardware. ok martin To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sparc64/sparc64/compat_13_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/sparc64/sparc64/compat_13_machdep.c diff -u src/sys/arch/sparc64/sparc64/compat_13_machdep.c:1.23 src/sys/arch/sparc64/sparc64/compat_13_machdep.c:1.24 --- src/sys/arch/sparc64/sparc64/compat_13_machdep.c:1.23 Sat Nov 21 04:16:52 2009 +++ src/sys/arch/sparc64/sparc64/compat_13_machdep.c Tue Aug 22 09:12:49 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_13_machdep.c,v 1.23 2009/11/21 04:16:52 rmind Exp $ */ +/* $NetBSD: compat_13_machdep.c,v 1.24 2017/08/22 09:12:49 maxv Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.23 2009/11/21 04:16:52 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.24 2017/08/22 09:12:49 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -129,7 +129,7 @@ compat_13_sys_sigreturn(struct lwp *l, c return (EINVAL); /* take only psr ICC field */ #ifdef __arch64__ - tf->tf_tstate = (int64_t)(tf->tf_tstate & ~TSTATE_CCR) | scp->sc_tstate; + tf->tf_tstate = (int64_t)(tf->tf_tstate & ~TSTATE_CCR) | (scp->sc_tstate & TSTATE_CCR); #else tf->tf_tstate = (int64_t)(tf->tf_tstate & ~TSTATE_CCR) | PSRCC_TO_TSTATE(scp->sc_psr); #endif
CVS commit: src
Module Name:src Committed By: mrg Date: Tue Aug 22 09:17:50 UTC 2017 Modified Files: src/external/gpl3/gcc.old/usr.bin: Makefile.inc src/external/gpl3/gcc/usr.bin: Makefile.inc src/external/lgpl3/gmp/lib/libgmp: Makefile src/external/lgpl3/mpc/lib/libmpc: Makefile src/external/lgpl3/mpfr/lib/libmpfr: Makefile src/tools/gcc: Makefile Added Files: src/external/lgpl3/gmp: Makefile.arch Log Message: move the GMP_MACHINE_ARCH definition into external/lgpl3/gmp/Makefile.arch. soon to be GMP 6 allows us to have only two arm copies. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc.old/usr.bin/Makefile.inc cvs rdiff -u -r1.28 -r1.29 src/external/gpl3/gcc/usr.bin/Makefile.inc cvs rdiff -u -r0 -r1.1 src/external/lgpl3/gmp/Makefile.arch cvs rdiff -u -r1.25 -r1.26 src/external/lgpl3/gmp/lib/libgmp/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/lgpl3/mpc/lib/libmpc/Makefile cvs rdiff -u -r1.16 -r1.17 src/external/lgpl3/mpfr/lib/libmpfr/Makefile cvs rdiff -u -r1.81 -r1.82 src/tools/gcc/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/gpl3/gcc.old/usr.bin/Makefile.inc diff -u src/external/gpl3/gcc.old/usr.bin/Makefile.inc:1.7 src/external/gpl3/gcc.old/usr.bin/Makefile.inc:1.8 --- src/external/gpl3/gcc.old/usr.bin/Makefile.inc:1.7 Fri Aug 4 01:18:39 2017 +++ src/external/gpl3/gcc.old/usr.bin/Makefile.inc Tue Aug 22 09:17:50 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.7 2017/08/04 01:18:39 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.8 2017/08/22 09:17:50 mrg Exp $ .ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_ _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_=1 @@ -8,7 +8,7 @@ _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_ .sinclude "../../Makefile.gcc_path" GCC_MACHINE_ARCH=${MACHINE_ARCH:S/earmv5/earm/} -GMP_MACHINE_ARCH=${MACHINE_ARCH:C/armv[4-7]/arm/} +.include "../../../lgpl3/gmp/Makefile.arch" TOP= ${NETBSDSRCDIR} DIST= ${GCCDIST} Index: src/external/gpl3/gcc/usr.bin/Makefile.inc diff -u src/external/gpl3/gcc/usr.bin/Makefile.inc:1.28 src/external/gpl3/gcc/usr.bin/Makefile.inc:1.29 --- src/external/gpl3/gcc/usr.bin/Makefile.inc:1.28 Fri Aug 4 01:18:39 2017 +++ src/external/gpl3/gcc/usr.bin/Makefile.inc Tue Aug 22 09:17:50 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.28 2017/08/04 01:18:39 mrg Exp $ +# $NetBSD: Makefile.inc,v 1.29 2017/08/22 09:17:50 mrg Exp $ .ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_ _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_=1 @@ -8,7 +8,7 @@ _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_ .sinclude "../../Makefile.gcc_path" GCC_MACHINE_ARCH=${MACHINE_ARCH:S/earmv5/earm/} -GMP_MACHINE_ARCH=${MACHINE_ARCH:C/armv[4-7]/arm/} +.include "../../../lgpl3/gmp/Makefile.arch" TOP= ${NETBSDSRCDIR} DIST= ${GCCDIST} Index: src/external/lgpl3/gmp/lib/libgmp/Makefile diff -u src/external/lgpl3/gmp/lib/libgmp/Makefile:1.25 src/external/lgpl3/gmp/lib/libgmp/Makefile:1.26 --- src/external/lgpl3/gmp/lib/libgmp/Makefile:1.25 Tue Apr 12 19:38:41 2016 +++ src/external/lgpl3/gmp/lib/libgmp/Makefile Tue Aug 22 09:17:50 2017 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.25 2016/04/12 19:38:41 christos Exp $ +# $NetBSD: Makefile,v 1.26 2017/08/22 09:17:50 mrg Exp $ .include # We don't install gmp, just provide it for GCC. LIBISPRIVATE?= yes -GMP_MACHINE_ARCH?= ${MACHINE_ARCH:S/earmv4/arm/:C/armv[5-7]/arm/} +.include "../../Makefile.arch" .if ${LIBISPRIVATE} != "yes" INCS= gmp.h Index: src/external/lgpl3/mpc/lib/libmpc/Makefile diff -u src/external/lgpl3/mpc/lib/libmpc/Makefile:1.2 src/external/lgpl3/mpc/lib/libmpc/Makefile:1.3 --- src/external/lgpl3/mpc/lib/libmpc/Makefile:1.2 Thu Nov 28 14:21:31 2013 +++ src/external/lgpl3/mpc/lib/libmpc/Makefile Tue Aug 22 09:17:50 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2013/11/28 14:21:31 mrg Exp $ +# $NetBSD: Makefile,v 1.3 2017/08/22 09:17:50 mrg Exp $ .include @@ -98,7 +98,7 @@ SRCS= \ CPPFLAGS+= -I${.CURDIR} # Find and -GMP_MACHINE_ARCH=${MACHINE_ARCH:C/armv[4-7]/arm/} +.include "../../../gmp/Makefile.arch" CPPFLAGS+= -I${NETBSDSRCDIR}/external/lgpl3/gmp/lib/libgmp/arch/${GMP_MACHINE_ARCH} CPPFLAGS+= -I${NETBSDSRCDIR}/external/lgpl3/mpfr/dist/src Index: src/external/lgpl3/mpfr/lib/libmpfr/Makefile diff -u src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.16 src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.17 --- src/external/lgpl3/mpfr/lib/libmpfr/Makefile:1.16 Thu Dec 19 01:10:19 2013 +++ src/external/lgpl3/mpfr/lib/libmpfr/Makefile Tue Aug 22 09:17:50 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2013/12/19 01:10:19 gdt Exp $ +# $NetBSD: Makefile,v 1.17 2017/08/22 09:17:50 mrg Exp $ .include @@ -478,7 +478,7 @@ CPPFLAGS+= -I. \ -DHAVE_ATTRIBUTE_MODE=1 # Find -GMP_MACHINE_ARCH=${MACHINE_ARCH:S/earmv4/arm/:C/armv[5-7]/arm/} +.include "../../../gmp/Makefile.arch" CPPFLAGS+= -I${NETBSDSRCDIR}/
CVS import: src/external/lgpl3/gmp/dist
Module Name:src Committed By: mrg Date: Tue Aug 22 09:40:57 UTC 2017 Update of /cvsroot/src/external/lgpl3/gmp/dist In directory ivanova.netbsd.org:/tmp/cvs-serv744 Log Message: initial import of GMP 6.1.2. main changes from 5.1.3 below. notes: - support for thumb-less ARM chips was in our port of 5.1.3, but a similar method has been provided upstream now - someone should look at the AVX failure reports, and fix them Changes between GMP version 6.1.0 and 6.1.1 FEATURES * Work around faulty cpuid on some recent Intel chips (this allows GMP to run on Skylake Pentiums). * Support thumb-less ARM chips. Changes between GMP version 6.0.* and 6.1.0 BUGS FIXED * The public function mpn_com is now correctly declared in gmp.h. * Healed possible failures of mpn_sec_sqr for non-cryptographic sizes for some obsolete CPUs. * Various problems related to precision for mpf have been fixed. * Fixed ABI incompatible stack alignment in calls from assembly code. * Fixed PIC bug in popcount affecting Intel processors using the 32-bit ABI. SPEEDUPS * Speedup for Intel Broadwell and Skylake through assembly code making use of new ADX instructions. * Square root is now faster when the remainder is not needed. Also the speed to compute the k-th root improved, for small sizes. FEATURES * New C++ functions gcd and lcm for mpz_class. * New public mpn functions mpn_divexact_1, mpn_zero_p, and mpn_cnd_swap. * New public mpq_cmp_z function, to efficiently compare rationals with integers. * Support for more 32-bit arm processors. * Support for AVX-less modern x86 CPUs. (Such support might be missing either because the CPU vendor chose to disable AVX, or because the running kernel lacks AVX context switch support.) * Support for NetBSD under Xen; we switch off AVX unconditionally under NetBSD since a bug in NetBSD makes AVX fail under Xen. MISC * Tuned values for FFT multiplications are provided for larger number on many platforms. Changes between GMP version 5.1.* and 6.0.0 BUGS FIXED * The function mpz_invert now considers any number invertible in Z/1Z. * The mpn multiply code now handles operands of more than 2^31 limbs correctly. (Note however that the mpz code is limited to 2^32 bits on 32-bit hosts and 2^37 bits on 64-bit hosts.) SPEEDUPS * Plain division of large operands is faster and more monotonous in operand size. * Major speedup for ARM, in particular ARM Cortex-A15, thanks to improved assembly. * Speedup for Intel Sandy Bridge, Ivy Bridge, Haswell, thanks to rewritten and vastly expanded assembly support. Speedup also for the older Core 2 and Nehalem. * Faster mixed arithmetic between mpq_class and double. FEATURES * Support for new Intel and AMD CPUs. * New public functions mpn_sec_mul and mpn_sec_sqr, implementing side-channel silent multiplication and squaring. * New public functions mpn_sec_div_qr and mpn_sec_div_r, implementing side-channel silent division. * New public functions mpn_cnd_add_n and mpn_cnd_sub_n. Side-channel silent conditional addition and subtraction. * New public function mpn_sec_powm, implementing side-channel silent modexp. * New public function mpn_sec_invert, implementing side-channel silent modular inversion. * Better support for applications which use the mpz_t type, but nevertheless need to call some of the lower-level mpn functions. See the documentation for mpz_limbs_read and related functions. Status: Vendor Tag: gmp Release Tags: gmp-6-1-2 U src/external/lgpl3/gmp/dist/extract-dbl.c U src/external/lgpl3/gmp/dist/Makefile.am C src/external/lgpl3/gmp/dist/configure C src/external/lgpl3/gmp/dist/acinclude.m4 U src/external/lgpl3/gmp/dist/configure.ac U src/external/lgpl3/gmp/dist/aclocal.m4 U src/external/lgpl3/gmp/dist/gmpxx.h C src/external/lgpl3/gmp/dist/Makefile.in U src/external/lgpl3/gmp/dist/config.in C src/external/lgpl3/gmp/dist/gmp-h.in U src/external/lgpl3/gmp/dist/AUTHORS U src/external/lgpl3/gmp/dist/COPYING U src/external/lgpl3/gmp/dist/ChangeLog U src/external/lgpl3/gmp/dist/INSTALL U src/external/lgpl3/gmp/dist/NEWS U src/external/lgpl3/gmp/dist/README N src/external/lgpl3/gmp/dist/compile C src/external/lgpl3/gmp/dist/config.guess C src/external/lgpl3/gmp/dist/config.sub U src/external/lgpl3/gmp/dist/install-sh U src/external/lgpl3/gmp/dist/ltmain.sh U src/external/lgpl3/gmp/dist/missing C src/external/lgpl3/gmp/dist/gmp-impl.h C src/external/lgpl3/gmp/dist/longlong.h U src/external/lgpl3/gmp/dist/errno.c U src/external/lgpl3/gmp/dist/assert.c U src/external/lgpl3/gmp/dist/compat.c U src/external/lgpl3/gmp/dist/mp_minv_tab.c U src/external/lgpl3/gmp/dist/invalid.c U src/external/lgpl3/gmp/dist/memory.c U src/external/lgpl3/gmp/dist/mp_bpl.c U src/external/lgpl3/gmp/dist/mp_clz_tab.c U src/external/lgpl3/gmp/dist/mp_dv_tab.c U src/external/lgpl3/gmp/dist/tal-notreent
CVS commit: src/external/lgpl3/gmp
Module Name:src Committed By: mrg Date: Tue Aug 22 09:57:18 UTC 2017 Modified Files: src/external/lgpl3/gmp: Makefile.netbsd-gmp build-gmp-Makefile.inc.awk Log Message: update these for GMP 6.1.2, and start to make it more automatic. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/lgpl3/gmp/Makefile.netbsd-gmp cvs rdiff -u -r1.3 -r1.4 src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/lgpl3/gmp/Makefile.netbsd-gmp diff -u src/external/lgpl3/gmp/Makefile.netbsd-gmp:1.4 src/external/lgpl3/gmp/Makefile.netbsd-gmp:1.5 --- src/external/lgpl3/gmp/Makefile.netbsd-gmp:1.4 Tue Mar 18 18:20:36 2014 +++ src/external/lgpl3/gmp/Makefile.netbsd-gmp Tue Aug 22 09:57:18 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.netbsd-gmp,v 1.4 2014/03/18 18:20:36 riastradh Exp $ +# $NetBSD: Makefile.netbsd-gmp,v 1.5 2017/08/22 09:57:18 mrg Exp $ # hack makefile to help build gmp ./configure @@ -15,5 +15,18 @@ ENV_ARGS=\ NM=${NM:Q} OBJDUMP=${OBJDUMP:Q} \ LIBS=-lintl +.include "Makefile.arch" +NEWCONFIGDIR?= ${NETBSDSRCDIR} +ARCHDIR= ${NEWCONFIGDIR}/external/lgpl3/gmp/lib/libgmp/arch/${GMP_MACHINE_ARCH} + all: - env ${ENV_ARGS} ${NETBSDSRCDIR}/external/lgpl3/gmp/dist/configure --host=${TARGET} --target=${TARGET} + mkdir -p build + cd build && env ${ENV_ARGS} ${NETBSDSRCDIR}/external/lgpl3/gmp/dist/configure --host=${TARGET} --target=${TARGET} + +copy-files: + cd build && cp gmp.h gmp-mparam.h config.h config.m4 ${ARCHDIR} + sed -i -e 's/define.*CONFIG_TOP_SRCDIR.*//' ${ARCHDIR}/config.m4 + sed -i -e 's/__GMP_CC.*/__GMP_CC "gcc"/' ${ARCHDIR}/gmp.h + sed -i -e 's/GMP_MPARAM_H_SUGGEST[ ]"\/.*dist\/mpn/GMP_MPARAM_H_SUGGEST ".\/mpn/' ${ARCHDIR}/config.h + +.include Index: src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk diff -u src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk:1.3 src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk:1.4 --- src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk:1.3 Sat Jul 2 14:03:20 2011 +++ src/external/lgpl3/gmp/build-gmp-Makefile.inc.awk Tue Aug 22 09:57:18 2017 @@ -7,25 +7,25 @@ sub(/mpn\//, "", $5) sub(/.*external\/lgpl3\/gmp\/dist\//, "", $3) - srcname = $3 - sub(/.*\//, "", srcname) + #srcname = $3 + #sub(/mpn\//, "", srcname) if (match($3, /\.c$/)) { - if ($5 == srcname) { - c_list[$5] = $3 - } else { + #if ($5 == srcname) { + # c_list[$5] = $3 + #} else { c_src_list[$5] = $3 - } + #} } else if (match($3, /\.(asm|s|S)$/)) { asm_list[$5] = $3 } } END { - printf("SRCS+= \\\n"); - for (c in c_list) { - printf("\t%s \\\n", c) - } + #printf("MPN_SRCS+= \\\n"); + #for (c in c_list) { + # printf("\t%s \\\n", c) + #} printf("\nC_SRCS_LIST= \\\n"); for (c in c_src_list) { printf("\t%s\t\t%s \\\n", c, c_src_list[c])
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Tue Aug 22 10:06:57 UTC 2017 Modified Files: src/external/gpl2/xcvs/dist/src: rsh-client.c Log Message: Fix for CVE-2017-12836; (cvs command injection) from MirBSD. XXX: pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl2/xcvs/dist/src/rsh-client.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/gpl2/xcvs/dist/src/rsh-client.c diff -u src/external/gpl2/xcvs/dist/src/rsh-client.c:1.2 src/external/gpl2/xcvs/dist/src/rsh-client.c:1.3 --- src/external/gpl2/xcvs/dist/src/rsh-client.c:1.2 Tue May 17 10:00:09 2016 +++ src/external/gpl2/xcvs/dist/src/rsh-client.c Tue Aug 22 06:06:57 2017 @@ -10,7 +10,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ #include -__RCSID("$NetBSD: rsh-client.c,v 1.2 2016/05/17 14:00:09 christos Exp $"); +__RCSID("$NetBSD: rsh-client.c,v 1.3 2017/08/22 10:06:57 christos Exp $"); #include @@ -55,11 +55,11 @@ start_rsh_server (cvsroot_t *root, struc char *cvs_server = (root->cvs_server != NULL ? root->cvs_server : getenv ("CVS_SERVER")); int i = 0; -/* This needs to fit "rsh", "-b", "-l", "USER", "host", +/* This needs to fit "rsh", "-b", "-l", "USER", "--", "host", "cmd (w/ args)", and NULL. We leave some room to grow. */ -char *rsh_argv[10]; +char *rsh_argv[16]; -if (!cvs_rsh) +if (!cvs_rsh || !*cvs_rsh) /* People sometimes suggest or assume that this should default to "remsh" on systems like HPUX in which that is the system-supplied name for the rsh program. However, that @@ -99,6 +99,9 @@ start_rsh_server (cvsroot_t *root, struc rsh_argv[i++] = root->username; } +/* Only non-option arguments from here. (CVE-2017-12836) */ +rsh_argv[i++] = "--"; + rsh_argv[i++] = root->hostname; rsh_argv[i++] = cvs_server; rsh_argv[i++] = "server"; @@ -159,7 +162,7 @@ start_rsh_server (cvsroot_t *root, struc command = Xasprintf ("%s server", cvs_server); { -char *argv[10]; +char *argv[16]; char **p = argv; *p++ = cvs_rsh; @@ -173,6 +176,8 @@ start_rsh_server (cvsroot_t *root, struc *p++ = root->username; } + *p++ = "--"; + *p++ = root->hostname; *p++ = command; *p++ = NULL;
CVS commit: src
Module Name:src Committed By: mrg Date: Tue Aug 22 10:04:44 UTC 2017 Modified Files: src: UPDATING src/doc: 3RDPARTY Log Message: note GMP 6.1.2 release and the build issues that may occur. To generate a diff of this commit: cvs rdiff -u -r1.285 -r1.286 src/UPDATING cvs rdiff -u -r1.1466 -r1.1467 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/UPDATING diff -u src/UPDATING:1.285 src/UPDATING:1.286 --- src/UPDATING:1.285 Thu Aug 17 01:16:55 2017 +++ src/UPDATING Tue Aug 22 10:04:44 2017 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.285 2017/08/17 01:16:55 mrg Exp $ +$NetBSD: UPDATING,v 1.286 2017/08/22 10:04:44 mrg Exp $ This file (UPDATING) is intended to be a brief reference to recent changes that might cause problems in the build process, and a guide for @@ -19,6 +19,12 @@ See also: BUILDING, build.sh, Makefile. Recent changes: ^^^ +20170822: + a new version of GMP has been imported and probably + will break parts of builds related to themselves or GCC, both + in the tools and the native section. Remove all GCC, GMP, MPFR + and MPC objdirs or build once without -u. + 20170816: a new version of MPFR and MPC have been imported and probably will break parts of builds related to themselves or GCC, both Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1466 src/doc/3RDPARTY:1.1467 --- src/doc/3RDPARTY:1.1466 Thu Aug 17 01:17:17 2017 +++ src/doc/3RDPARTY Tue Aug 22 10:04:44 2017 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1466 2017/08/17 01:17:17 mrg Exp $ +# $NetBSD: 3RDPARTY,v 1.1467 2017/08/22 10:04:44 mrg Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1532,7 +1532,7 @@ Location: external/lgpl3/mpfr/dist Notes: Package: GNU MP -Version: 5.1.3 +Version: 6.1.2 Current Vers: 6.1.2 Maintainer: http://gmplib.org/mailman/listinfo/gmp-devel Archive Site: http://gmplib.org/
CVS commit: src/doc
Module Name:src Committed By: mrg Date: Tue Aug 22 10:25:13 UTC 2017 Modified Files: src/doc: CHANGES Log Message: note gmp/mpfr/mpc updates To generate a diff of this commit: cvs rdiff -u -r1.2306 -r1.2307 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/CHANGES diff -u src/doc/CHANGES:1.2306 src/doc/CHANGES:1.2307 --- src/doc/CHANGES:1.2306 Thu Aug 17 23:19:51 2017 +++ src/doc/CHANGES Tue Aug 22 10:25:13 2017 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2306 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2307 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -51,3 +51,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0: ichsmb(4): Add support for Intel C3000. [msaitoh 20170817] ismt(4): Add support for Intel C3000. [msaitoh 20170817] powerpc: Bump MAXTSIZ to 128MB for OEA based systems [sevan 20170818] + GMP/MPFR/MPC: Update to 6.1.2, 3.1.5 and 1.0.3. [mrg 20170821]
CVS commit: src/share/mk
Module Name:src Committed By: joerg Date: Tue Aug 22 11:14:28 UTC 2017 Modified Files: src/share/mk: bsd.own.mk Log Message: Strip .debug_macinfo when converting to a.out, clang may generate it. To generate a diff of this commit: cvs rdiff -u -r1.1015 -r1.1016 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.1015 src/share/mk/bsd.own.mk:1.1016 --- src/share/mk/bsd.own.mk:1.1015 Wed Aug 16 13:53:54 2017 +++ src/share/mk/bsd.own.mk Tue Aug 22 11:14:28 2017 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1015 2017/08/16 13:53:54 tsutsui Exp $ +# $NetBSD: bsd.own.mk,v 1.1016 2017/08/22 11:14:28 joerg Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -625,6 +625,7 @@ OBJCOPY_ELF2AOUT_FLAGS?= \ -R .debug_pubtypes \ -R .debug_ranges \ -R .debug_str \ + -R .debug_macinfo \ -R .eh_frame \ -R .note.netbsd.ident .endif
CVS commit: src/sys/arch/shark/shark
Module Name:src Committed By: joerg Date: Tue Aug 22 12:52:24 UTC 2017 Modified Files: src/sys/arch/shark/shark: sequoia.h Log Message: Since left shifts of negative values is undefined, make sure the various constants are unsigned. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/shark/shark/sequoia.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/shark/shark/sequoia.h diff -u src/sys/arch/shark/shark/sequoia.h:1.2 src/sys/arch/shark/shark/sequoia.h:1.3 --- src/sys/arch/shark/shark/sequoia.h:1.2 Sat Mar 14 14:46:07 2009 +++ src/sys/arch/shark/shark/sequoia.h Tue Aug 22 12:52:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sequoia.h,v 1.2 2009/03/14 14:46:07 dsl Exp $ */ +/* $NetBSD: sequoia.h,v 1.3 2017/08/22 12:52:24 joerg Exp $ */ /* * Copyright 1997 @@ -745,27 +745,27 @@ #define FOMPCR_V_PCON 0 #define FOMPCR_M_PCON 0x3FF << FOMPCR_V_PCON #define FOMPCR_V_PCON0 0 -#define FOMPCR_M_PCON0 1 << FOMPCR_V_PCON0 +#define FOMPCR_M_PCON0 1U << FOMPCR_V_PCON0 #define FOMPCR_V_PCON1 1 -#define FOMPCR_M_PCON1 1 << FOMPCR_V_PCON1 +#define FOMPCR_M_PCON1 1U << FOMPCR_V_PCON1 #define FOMPCR_V_PCON2 2 -#define FOMPCR_M_PCON2 1 << FOMPCR_V_PCON2 +#define FOMPCR_M_PCON2 1U << FOMPCR_V_PCON2 #define FOMPCR_V_PCON3 3 -#define FOMPCR_M_PCON3 1 << FOMPCR_V_PCON3 +#define FOMPCR_M_PCON3 1U << FOMPCR_V_PCON3 #define FOMPCR_V_PCON4 4 -#define FOMPCR_M_PCON4 1 << FOMPCR_V_PCON4 +#define FOMPCR_M_PCON4 1U << FOMPCR_V_PCON4 #define FOMPCR_V_PCON5 5 -#define FOMPCR_M_PCON5 1 << FOMPCR_V_PCON5 +#define FOMPCR_M_PCON5 1U << FOMPCR_V_PCON5 #define FOMPCR_V_PCON6 6 -#define FOMPCR_M_PCON6 1 << FOMPCR_V_PCON6 +#define FOMPCR_M_PCON6 1U << FOMPCR_V_PCON6 #define FOMPCR_V_PCON7 7 -#define FOMPCR_M_PCON7 1 << FOMPCR_V_PCON7 +#define FOMPCR_M_PCON7 1U << FOMPCR_V_PCON7 #define FOMPCR_V_PCON8 8 -#define FOMPCR_M_PCON8 1 << FOMPCR_V_PCON8 +#define FOMPCR_M_PCON8 1U << FOMPCR_V_PCON8 #define FOMPCR_V_PCON9 9 -#define FOMPCR_M_PCON9 1 << FOMPCR_V_PCON9 +#define FOMPCR_M_PCON9 1U << FOMPCR_V_PCON9 #define FOMPCR_V_GLBLPCEN 10 -#define FOMPCR_M_GLBLPCEN 1 << FOMPCR_V_GLBLPCEN +#define FOMPCR_M_GLBLPCEN 1U << FOMPCR_V_GLBLPCEN /* ** @@ -3008,27 +3008,27 @@ SEQPSR3_M_PC6PINEN | SEQPSR3_M_PC7PINEN | \ SEQPSR3_M_PC8PINEN | SEQPSR3_M_PC9PINEN ) #define SEQPSR3_V_PC0PINEN 0 -#define SEQPSR3_M_PC0PINEN 1 << SEQPSR3_V_PC0PINEN +#define SEQPSR3_M_PC0PINEN 1U << SEQPSR3_V_PC0PINEN #define SEQPSR3_V_PC2PINEN 2 -#define SEQPSR3_M_PC2PINEN 1 << SEQPSR3_V_PC2PINEN +#define SEQPSR3_M_PC2PINEN 1U << SEQPSR3_V_PC2PINEN #define SEQPSR3_V_PC3PINEN 3 -#define SEQPSR3_M_PC3PINEN 1 << SEQPSR3_V_PC3PINEN +#define SEQPSR3_M_PC3PINEN 1U << SEQPSR3_V_PC3PINEN #define SEQPSR3_V_PC4PINEN 4 -#define SEQPSR3_M_PC4PINEN 1 << SEQPSR3_V_PC4PINEN +#define SEQPSR3_M_PC4PINEN 1U << SEQPSR3_V_PC4PINEN #define SEQPSR3_V_PC5PINEN 5 -#define SEQPSR3_M_PC5PINEN 1 << SEQPSR3_V_PC5PINEN +#define SEQPSR3_M_PC5PINEN 1U << SEQPSR3_V_PC5PINEN #define SEQPSR3_V_PC6PINEN 6 -#define SEQPSR3_M_PC6PINEN 1 << SEQPSR3_V_PC6PINEN +#define SEQPSR3_M_PC6PINEN 1U << SEQPSR3_V_PC6PINEN #define SEQPSR3_V_PC7PINEN 7 -#define SEQPSR3_M_PC7PINEN 1 << SEQPSR3_V_PC7PINEN +#define SEQPSR3_M_PC7PINEN 1U << SEQPSR3_V_PC7PINEN #define SEQPSR3_V_PC8PINEN 8 -#define SEQPSR3_M_PC8PINEN 1 << SEQPSR3_V_PC8PINEN +#define SEQPSR3_M_PC8PINEN 1U << SEQPSR3_V_PC8PINEN #define SEQPSR3_V_PC9PINEN 9 -#define SEQPSR3_M_PC9PINEN 1 << SEQPSR3_V_PC9PINEN +#define SEQPSR3_M_PC9PINEN 1U << SEQPSR3_V_PC9PINEN #define SEQPSR3_V_EXTACT0PINEN 12 -#define SEQPSR3_M_EXTACT0PINEN 1 << SEQPSR3_V_EXTACT0PINEN +#define SEQPSR3_M_EXTACT0PINEN 1U << SEQPSR3_V_EXTACT0PINEN #define SEQPSR3_V_EXTACT1PINEN 15 -#define SEQPSR3_M_EXTACT1PINEN 1 << SEQPSR3_V_EXTACT1PINEN +#define SEQPSR3_M_EXTACT1PINEN 1U << SEQPSR3_V_EXTACT1PINEN /* **
CVS commit: src/share/man/man4
Module Name:src Committed By: maya Date: Tue Aug 22 15:56:46 UTC 2017 Modified Files: src/share/man/man4: cfb.4 mfb.4 px.4 pxg.4 sfb.4 tfb.4 Log Message: pmax uses wsdisplay since 2001, so omit BUGS mentioning it doesn't. from Miod Vallat in PR port-pmax/52498 To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/cfb.4 src/share/man/man4/mfb.4 \ src/share/man/man4/pxg.4 cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/px.4 cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/sfb.4 src/share/man/man4/tfb.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/cfb.4 diff -u src/share/man/man4/cfb.4:1.5 src/share/man/man4/cfb.4:1.6 --- src/share/man/man4/cfb.4:1.5 Mon Jul 3 21:30:58 2017 +++ src/share/man/man4/cfb.4 Tue Aug 22 15:56:46 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: cfb.4,v 1.5 2017/07/03 21:30:58 wiz Exp $ +.\" $NetBSD: cfb.4,v 1.6 2017/08/22 15:56:46 maya Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 12, 2001 +.Dd August 22, 2017 .Dt CFB 4 .Os .Sh NAME @@ -51,8 +51,3 @@ of running at a resolution of 1024-by-86 .Xr tc 4 , .Xr tfb 4 , .Xr wscons 4 -.Sh BUGS -.Nx Ns /pmax -does not currently support the machine-independent -.Xr wscons 4 -interface and uses a machine-dependent version. Index: src/share/man/man4/mfb.4 diff -u src/share/man/man4/mfb.4:1.5 src/share/man/man4/mfb.4:1.6 --- src/share/man/man4/mfb.4:1.5 Mon Jul 3 21:30:58 2017 +++ src/share/man/man4/mfb.4 Tue Aug 22 15:56:46 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: mfb.4,v 1.5 2017/07/03 21:30:58 wiz Exp $ +.\" $NetBSD: mfb.4,v 1.6 2017/08/22 15:56:46 maya Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 14, 2001 +.Dd August 22, 2017 .Dt MFB 4 .Os .Sh NAME @@ -51,8 +51,3 @@ of running at a resolution of 1280-by-10 .Xr tc 4 , .Xr tfb 4 , .Xr wscons 4 -.Sh BUGS -.Nx Ns /pmax -does not currently support the machine-independent -.Xr wscons 4 -interface and uses a machine-dependent version. Index: src/share/man/man4/pxg.4 diff -u src/share/man/man4/pxg.4:1.5 src/share/man/man4/pxg.4:1.6 --- src/share/man/man4/pxg.4:1.5 Mon Nov 13 16:33:57 2006 +++ src/share/man/man4/pxg.4 Tue Aug 22 15:56:46 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: pxg.4,v 1.5 2006/11/13 16:33:57 ad Exp $ +.\" $NetBSD: pxg.4,v 1.6 2017/08/22 15:56:46 maya Exp $ .\" .\" Copyright (c) 1997 Jonathan Stone. .\" All rights reserved. @@ -28,7 +28,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 21, 2001 +.Dd August 22, 2017 .Dt PXG 4 .Os .Sh NAME @@ -57,8 +57,3 @@ Previously, the .Nm px driver supported these devices in .Nx Ns /pmax . -.Sh BUGS -.Nx Ns /pmax -does not currently support the machine-independent -.Xr wscons 4 -interface and uses a machine-dependent driver. Index: src/share/man/man4/px.4 diff -u src/share/man/man4/px.4:1.6 src/share/man/man4/px.4:1.7 --- src/share/man/man4/px.4:1.6 Mon Nov 13 16:33:57 2006 +++ src/share/man/man4/px.4 Tue Aug 22 15:56:46 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: px.4,v 1.6 2006/11/13 16:33:57 ad Exp $ +.\" $NetBSD: px.4,v 1.7 2017/08/22 15:56:46 maya Exp $ .\" .\" Copyright (c) 1997 Jonathan Stone. .\" All rights reserved. @@ -28,7 +28,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 21, 2001 +.Dd August 22, 2017 .Dt PX 4 .Os .Sh NAME @@ -55,8 +55,3 @@ driver first appeared in .Nx 1.3 . It became usable as a console device in .Nx 1.5 . -.Sh BUGS -.Nx Ns /pmax -does not currently support the machine-independent -.Xr wscons 4 -interface and uses a machine-dependent driver. Index: src/share/man/man4/sfb.4 diff -u src/share/man/man4/sfb.4:1.4 src/share/man/man4/sfb.4:1.5 --- src/share/man/man4/sfb.4:1.4 Wed Apr 30 13:10:54 2008 +++ src/share/man/man4/sfb.4 Tue Aug 22 15:56:46 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: sfb.4,v 1.4 2008/04/30 13:10:54 martin Exp $ +.\" $NetBSD: sfb.4,v 1.5 2017/08/22 15:56:46 maya Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 14, 2001 +.Dd August 22, 2017 .Dt SFB 4 .Os .Sh NAME @@ -52,8 +52,3 @@ colour/grayscale framebuffer capable of .Xr tc 4 , .Xr tfb 4 , .Xr wscons 4 -.Sh BUGS -.Nx Ns /pmax -does not currently support the
CVS commit: src/share/man/man4
Module Name:src Committed By: maya Date: Tue Aug 22 16:02:16 UTC 2017 Modified Files: src/share/man/man4: pxg.4 Log Message: pxg(4) handles PMAG-D boards but not PMAG-C ones (PMAG-C is handled by px(4)) from Miod Vallat in PR port-pmax/52497 To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/pxg.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/pxg.4 diff -u src/share/man/man4/pxg.4:1.6 src/share/man/man4/pxg.4:1.7 --- src/share/man/man4/pxg.4:1.6 Tue Aug 22 15:56:46 2017 +++ src/share/man/man4/pxg.4 Tue Aug 22 16:02:16 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: pxg.4,v 1.6 2017/08/22 15:56:46 maya Exp $ +.\" $NetBSD: pxg.4,v 1.7 2017/08/22 16:02:16 maya Exp $ .\" .\" Copyright (c) 1997 Jonathan Stone. .\" All rights reserved. @@ -43,7 +43,7 @@ The driver provides support for the 3D .Tn DEC .Tn PixelStamp -video display option cards (PMAG-C, PMAG-E, and PMAG-F). +video display option cards (PMAG-D, PMAG-E, and PMAG-F). .Sh SEE ALSO .Xr px 4 , .Xr tc 4 ,
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Tue Aug 22 16:57:00 UTC 2017 Modified Files: src/sys/dev/usb: xhci.c Log Message: Check both buses for ub_usepolling and schedule the soft interrupt handler or call it directly. Fixes usb keyboard in ddb when attached to xhci. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 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.72 src/sys/dev/usb/xhci.c:1.73 --- src/sys/dev/usb/xhci.c:1.72 Thu Jun 1 02:45:12 2017 +++ src/sys/dev/usb/xhci.c Tue Aug 22 16:57:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: xhci.c,v 1.72 2017/06/01 02:45:12 chs Exp $ */ +/* $NetBSD: xhci.c,v 1.73 2017/08/22 16:57:00 skrll Exp $ */ /* * Copyright (c) 2013 Jonathan A. Kollasch @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.72 2017/06/01 02:45:12 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.73 2017/08/22 16:57:00 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1211,6 +1211,12 @@ xhci_init(struct xhci_softc *sc) return rv; } +static inline bool +xhci_polling_p(struct xhci_softc * const sc) +{ + return sc->sc_bus.ub_usepolling || sc->sc_bus2.ub_usepolling; +} + int xhci_intr(void *v) { @@ -1228,7 +1234,7 @@ xhci_intr(void *v) goto done; /* If we get an interrupt while polling, then just ignore it. */ - if (sc->sc_bus.ub_usepolling) { + if (xhci_polling_p(sc)) { #ifdef DIAGNOSTIC DPRINTFN(16, "ignored interrupt while polling", 0, 0, 0, 0); #endif @@ -1236,6 +1242,9 @@ xhci_intr(void *v) } ret = xhci_intr1(sc); + if (ret) { + usb_schedsoftintr(&sc->sc_bus); + } done: mutex_spin_exit(&sc->sc_intr_lock); return ret; @@ -1270,8 +1279,6 @@ xhci_intr1(struct xhci_softc * const sc) usbsts = xhci_op_read_4(sc, XHCI_USBSTS); DPRINTFN(16, "USBSTS %08x", usbsts, 0, 0, 0); - usb_schedsoftintr(&sc->sc_bus); - return 1; } @@ -2106,7 +2113,7 @@ xhci_softintr(void *v) XHCIHIST_FUNC(); XHCIHIST_CALLED(); - KASSERT(sc->sc_bus.ub_usepolling || mutex_owned(&sc->sc_lock)); + KASSERT(xhci_polling_p(sc) || mutex_owned(&sc->sc_lock)); i = er->xr_ep; j = er->xr_cs; @@ -2150,7 +2157,10 @@ xhci_poll(struct usbd_bus *bus) XHCIHIST_FUNC(); XHCIHIST_CALLED(); mutex_spin_enter(&sc->sc_intr_lock); - xhci_intr1(sc); + int ret = xhci_intr1(sc); + if (ret) { + xhci_softintr(bus); + } mutex_spin_exit(&sc->sc_intr_lock); return; @@ -3771,7 +3781,7 @@ xhci_device_ctrl_start(struct usbd_xfer xhci_db_write_4(sc, XHCI_DOORBELL(xs->xs_idx), dci); - if (xfer->ux_timeout && !sc->sc_bus.ub_usepolling) { + if (xfer->ux_timeout && !xhci_polling_p(sc)) { callout_reset(&xfer->ux_callout, mstohz(xfer->ux_timeout), xhci_timeout, xfer); } @@ -3887,7 +3897,7 @@ xhci_device_bulk_start(struct usbd_xfer xhci_db_write_4(sc, XHCI_DOORBELL(xs->xs_idx), dci); - if (xfer->ux_timeout && !sc->sc_bus.ub_usepolling) { + if (xfer->ux_timeout && !xhci_polling_p(sc)) { callout_reset(&xfer->ux_callout, mstohz(xfer->ux_timeout), xhci_timeout, xfer); } @@ -3993,7 +4003,7 @@ xhci_device_intr_start(struct usbd_xfer xhci_db_write_4(sc, XHCI_DOORBELL(xs->xs_idx), dci); - if (xfer->ux_timeout && !sc->sc_bus.ub_usepolling) { + if (xfer->ux_timeout && !xhci_polling_p(sc)) { callout_reset(&xfer->ux_callout, mstohz(xfer->ux_timeout), xhci_timeout, xfer); } @@ -4015,7 +4025,7 @@ xhci_device_intr_done(struct usbd_xfer * DPRINTFN(15, "%p slot %u dci %u", xfer, xs->xs_idx, dci, 0); - KASSERT(sc->sc_bus.ub_usepolling || mutex_owned(&sc->sc_lock)); + KASSERT(xhci_polling_p(sc) || mutex_owned(&sc->sc_lock)); usb_syncmem(&xfer->ux_dmabuf, 0, xfer->ux_length, isread ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: nisimura Date: Tue Aug 22 17:08:03 UTC 2017 Modified Files: src/sys/arch/aarch64/aarch64: vectors.S Log Message: fill EL1 exception entry vector To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/aarch64/aarch64/vectors.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/aarch64/aarch64/vectors.S diff -u src/sys/arch/aarch64/aarch64/vectors.S:1.1 src/sys/arch/aarch64/aarch64/vectors.S:1.2 --- src/sys/arch/aarch64/aarch64/vectors.S:1.1 Sun Aug 10 05:47:37 2014 +++ src/sys/arch/aarch64/aarch64/vectors.S Tue Aug 22 17:08:03 2017 @@ -1,68 +1,174 @@ +/* $NetBSD: vectors.S,v 1.2 2017/08/22 17:08:03 nisimura Exp $ */ +#include +#include "assym.h" + +lr .req x30 /* link register */ + +#define BAD_SYNC 1 +#define BAD_IRQ 2 +#define BAD_FIQ 3 +#define BAD_ERROR 4 + + .macro VECT_ENTRY, label + .align 7 + b \label + .endm + + .macro VECT_INVAL, el, cause, regsize = 64 + .align 7 + /* small enough to fit 32 instrunction slot */ + stp x0, x1, [sp, #TF_X0] + stp x2, x3, [sp, #TF_X2] + stp x4, x5, [sp, #TF_X4] + stp x6, x7, [sp, #TF_X6] + stp x8, x9, [sp, #TF_X8] + stp x10, x11, [sp, #TF_X10] + stp x12, x13, [sp, #TF_X12] + stp x14, x15, [sp, #TF_X14] + stp x16, x17, [sp, #TF_X16] + str x18, [sp, #TF_X18] + stp x19, x20, [sp, #TF_X19] + stp x21, x22, [sp, #TF_X21] + stp x23, x24, [sp, #TF_X23] + stp x25, x26, [sp, #TF_X25] + stp x27, x28, [sp, #TF_X27] + stp x29, x30, [sp, #TF_X29] + .if \el == 0 + mrs x20, sp_el0 + .else + mrs x20, sp_el1 + .endif + mrs x21, elr_el1 + mrs x22, spsr_el1 + str x20, [sp, #TF_SP] + str x21, [sp, #TF_PC] + str x22, [sp, #TF_SPSR] + mrs x23, esr_el1 + mrs x24, far_el1 + str x23, [sp, #TF_ESR] + str x24, [sp, #TF_FAR] + adr lr, exception_trap_exit + mov x0, sp + mov x1, #\cause + b trap + .endm + + .macro exception_entry, el, regsize = 64 + /* !!! will grow beyond 32 instruction vector slot size !!! */ + .if \regsize == 32 + mov w0, w0 /* fill 0 in upper half of x0 */ + .endif + stp x0, x1, [sp, #TF_X0] + stp x2, x3, [sp, #TF_X2] + stp x4, x5, [sp, #TF_X4] + stp x6, x7, [sp, #TF_X6] + stp x8, x9, [sp, #TF_X8] + stp x10, x11, [sp, #TF_X10] + stp x12, x13, [sp, #TF_X12] + stp x14, x15, [sp, #TF_X14] + stp x16, x17, [sp, #TF_X16] + str x18, [sp, #TF_X18] + stp x19, x20, [sp, #TF_X19] + stp x21, x22, [sp, #TF_X21] + stp x23, x24, [sp, #TF_X23] + stp x25, x26, [sp, #TF_X25] + stp x27, x28, [sp, #TF_X27] + stp x29, x30, [sp, #TF_X29] + .if \el == 0 + mov x29, xzr /* fp pointed to user-space */ + mrs x20, sp_el0 + .else + mrs x20, sp_el1 + .endif + mrs x21, elr_el1 + mrs x22, spsr_el1 + str x20, [sp, #TF_SP] + str x21, [sp, #TF_PC] + str x22, [sp, #TF_SPSR] + mrs x23, esr_el1 + mrs x24, far_el1 + str x23, [sp, #TF_ESR] + str x24, [sp, #TF_FAR] + .endm + + .pushsection ".entry.text", "ax" .p2align 11 -vector_start: +ENTRY(el1_vectors) /* - * Exception taken from current Exception Level with SP_EL0. + * Exception taken from current Exception Level with SP_EL1. * (These shouldn't happen) */ -vec_sp_el0_sync: - hlt #0 * 0x80 - .p2align 7 -vec_sp_el0_irq: - hlt #1 * 0x80 - .p2align 7 -vec_sp_el0_fiq: - hlt #2 * 0x80 - .p2align 7 -vec_sp_el0_serror: - hlt #3 * 0x80 + VECT_INVAL 1, BAD_SYNC /* Synchronous EL1t */ + VECT_INVAL 1, BAD_IRQ /* IRQ EL1t */ + VECT_INVAL 1, BAD_FIQ /* FIQ EL1t */ + VECT_INVAL 1, BAD_ERROR /* Error EL1t */ /* - * Exception takend form current Exception Level with SP_ELx where x > 0. + * Exception taken from current Exception Level with SP. * There are entries for exceptions caused in EL1 (kernel exceptions). */ - .p2align 7 -vec_sp_el1_sync: - hlt #4 * 0x80 - .p2align 7 -vec_sp_el1_irq: - hlt #5 * 0x80 - .p2align 7 -vec_sp_el1_fiq: - hlt #6 * 0x80 - .p2align 7 -vec_sp_el1_serror: - hlt #7 * 0x80 + VECT_ENTRY el1_sync /* Synchronous EL1h */ + VECT_ENTRY el1_irq /* IRQ EL1h */ + VECT_INVAL 1, BAD_FIQ /* FIQ EL1h */ + VECT_INVAL 1, BAD_ERROR /* Error EL1h */ /* * Exception taken from lower Exception Level which is using AArch64 * There are entries for exceptions caused in EL0 (native user exceptions). */ - .p2align 7 -vec_a64_el0_sync: - hlt #8 * 0x80 - .p2align 7 -vec_a64_el0_irq: - hlt #9 * 0x80 - .p2align 7 -vec_a64_el0_fiq: - hlt #10 * 0x80 - .p2align 7 -vec_a64_el0_serror: - hlt #11 * 0x80 + VECT_ENTRY el0_sync /* Synchronous 64bit EL0 */ + VECT_ENTRY el0_irq /* IRQ 64bit EL0 */ + VECT_INVAL 0, BAD_FIQ /* FIQ 64bit EL0 */ + VECT_INVAL 0, BAD_ERROR /* Error 64bit EL0 */ /* * Exception taken from lower Exception Level which is using AArch32 * There are entries for exceptions caused in EL0 (compat user exceptions). */ - .p2align 7 -vec_a32_el0_sync: - hlt #12 * 0x80 - .p2align 7 -vec_a32_el0_irq: - hlt #13 * 0x80 - .p2align 7 -vec_a32_el0_fiq: - hlt #14 * 0x80 - .p2align 7 -vec_a32_el0_serror: - hlt #15 * 0x80 - .p2align 7 -vector_end: + VECT_ENTRY el0_32sync
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: nisimura Date: Tue Aug 22 18:35:09 UTC 2017 Modified Files: src/sys/arch/aarch64/aarch64: vectors.S Log Message: use lr for current x30. some comment snip To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/aarch64/aarch64/vectors.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/aarch64/aarch64/vectors.S diff -u src/sys/arch/aarch64/aarch64/vectors.S:1.2 src/sys/arch/aarch64/aarch64/vectors.S:1.3 --- src/sys/arch/aarch64/aarch64/vectors.S:1.2 Tue Aug 22 17:08:03 2017 +++ src/sys/arch/aarch64/aarch64/vectors.S Tue Aug 22 18:35:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: vectors.S,v 1.2 2017/08/22 17:08:03 nisimura Exp $ */ +/* $NetBSD: vectors.S,v 1.3 2017/08/22 18:35:09 nisimura Exp $ */ #include #include "assym.h" @@ -96,7 +96,7 @@ lr .req x30 /* link register */ .p2align 11 ENTRY(el1_vectors) /* - * Exception taken from current Exception Level with SP_EL1. + * A64 exception taken from current Exception Level with SP_EL1. * (These shouldn't happen) */ VECT_INVAL 1, BAD_SYNC /* Synchronous EL1t */ @@ -104,24 +104,24 @@ ENTRY(el1_vectors) VECT_INVAL 1, BAD_FIQ /* FIQ EL1t */ VECT_INVAL 1, BAD_ERROR /* Error EL1t */ /* - * Exception taken from current Exception Level with SP. - * There are entries for exceptions caused in EL1 (kernel exceptions). + * A64 exception taken from current Exception Level with SP. + * EL1 (kernel exceptions) */ VECT_ENTRY el1_sync /* Synchronous EL1h */ VECT_ENTRY el1_irq /* IRQ EL1h */ VECT_INVAL 1, BAD_FIQ /* FIQ EL1h */ VECT_INVAL 1, BAD_ERROR /* Error EL1h */ /* - * Exception taken from lower Exception Level which is using AArch64 - * There are entries for exceptions caused in EL0 (native user exceptions). + * A64 exception taken from lower Exception Level. + * EL0 (native user exceptions) */ VECT_ENTRY el0_sync /* Synchronous 64bit EL0 */ VECT_ENTRY el0_irq /* IRQ 64bit EL0 */ VECT_INVAL 0, BAD_FIQ /* FIQ 64bit EL0 */ VECT_INVAL 0, BAD_ERROR /* Error 64bit EL0 */ /* - * Exception taken from lower Exception Level which is using AArch32 - * There are entries for exceptions caused in EL0 (compat user exceptions). + * A32 exception taken from lower Exception Level. + * EL0 (compat user exceptions) */ VECT_ENTRY el0_32sync /* Synchronous 32bit EL0 */ VECT_ENTRY el0_32irq /* IRQ 32bit EL0 */ @@ -130,7 +130,7 @@ ENTRY(el1_vectors) ENTRY(el1_sync) exception_entry 1 - adr x30, exception_trap_exit + adr lr, exception_trap_exit mov x0, sp mov x1, xzr b trap @@ -138,14 +138,14 @@ END(el1_sync) ENTRY(el1_irq) exception_entry 1 - adr x30, exception_trap_exit + adr lr, exception_trap_exit mov x0, sp b interrupt END(el1_irq) ENTRY(el0_sync) exception_entry 0 - adr x30, exception_trap_exit + adr lr, exception_trap_exit mov x0, sp mov x1, xzr b trap @@ -153,14 +153,14 @@ END(el0_sync) ENTRY(el0_irq) exception_entry 0 - adr x30, exception_trap_exit + adr lr, exception_trap_exit mov x0, sp b interrupt END(el0_irq) ENTRY(el0_32sync) exception_entry 0, 32 - adr x30, exception_trap_exit + adr lr, exception_trap_exit mov x0, sp mov x1, xzr b trap @@ -168,7 +168,7 @@ END(el0_32sync) ENTRY(el0_32irq) exception_entry 0, 32 - adr x30, exception_trap_exit + adr lr, exception_trap_exit mov x0, sp b interrupt END(el0_32irq)
CVS commit: src/sys/arch/shark/shark
Module Name:src Committed By: kre Date: Tue Aug 22 21:23:58 UTC 2017 Modified Files: src/sys/arch/shark/shark: sequoia.h Log Message: Add () around "1 << n' in #define's, without it ~NAME is "~1 << n" which is not what is wanted at all (and which caused the << of a negative number issue.) Making the values unsigned is harmless (perhaps even better) so those that were changed are still that way. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/shark/shark/sequoia.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/shark/shark/sequoia.h diff -u src/sys/arch/shark/shark/sequoia.h:1.3 src/sys/arch/shark/shark/sequoia.h:1.4 --- src/sys/arch/shark/shark/sequoia.h:1.3 Tue Aug 22 12:52:24 2017 +++ src/sys/arch/shark/shark/sequoia.h Tue Aug 22 21:23:58 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sequoia.h,v 1.3 2017/08/22 12:52:24 joerg Exp $ */ +/* $NetBSD: sequoia.h,v 1.4 2017/08/22 21:23:58 kre Exp $ */ /* * Copyright 1997 @@ -109,39 +109,39 @@ #define PMC_CCR_REG 0x000 #define PMC_CCR_INIT 0x000 #define CCR_V_CNCLKSEL 0 -#define CCR_M_CNCLKSEL 0x7 << CCR_V_CNCLKSEL +#define CCR_M_CNCLKSEL (0x7 << CCR_V_CNCLKSEL) #define CCR_V_CNCLKSEL0 0 -#define CCR_M_CNCLKSEL0 1 << CCR_V_CNCLKSEL0 +#define CCR_M_CNCLKSEL0 (1 << CCR_V_CNCLKSEL0) #define CCR_V_CNCLKSEL1 1 -#define CCR_M_CNCLKSEL1 1 << CCR_V_CNCLKSEL1 +#define CCR_M_CNCLKSEL1 (1 << CCR_V_CNCLKSEL1) #define CCR_V_CNCLKSEL2 2 -#define CCR_M_CNCLKSEL2 1 << CCR_V_CNCLKSEL2 +#define CCR_M_CNCLKSEL2 (1 << CCR_V_CNCLKSEL2) #define CCR_V_CNSRVEN 3 -#define CCR_M_CNSRVEN 1 << CCR_V_CNSRVEN +#define CCR_M_CNSRVEN (1 << CCR_V_CNSRVEN) #define CCR_V_SLCLKSEL 4 -#define CCR_M_SLCLKSEL 0x7 << CCR_V_SLCLKSEL +#define CCR_M_SLCLKSEL (0x7 << CCR_V_SLCLKSEL) #define CCR_V_SLCLKSEL0 4 -#define CCR_M_SLCLKSEL0 1 << CCR_V_SLCLKSEL0 +#define CCR_M_SLCLKSEL0 (1 << CCR_V_SLCLKSEL0) #define CCR_V_SLCLKSEL1 5 -#define CCR_M_SLCLKSEL1 1 << CCR_V_SLCLKSEL1 +#define CCR_M_SLCLKSEL1 (1 << CCR_V_SLCLKSEL1) #define CCR_V_SLCLKSEL2 6 -#define CCR_M_SLCLKSEL2 1 << CCR_V_SLCLKSEL2 +#define CCR_M_SLCLKSEL2 (1 << CCR_V_SLCLKSEL2) #define CCR_V_SLWCLKEN 7 -#define CCR_M_SLWCLKEN 1 << CCR_V_SLWCLKEN +#define CCR_M_SLWCLKEN (1 << CCR_V_SLWCLKEN) #define CCR_V_SLPSLWEN 8 -#define CCR_M_SLPSLWEN 1 << CCR_V_SLPSLWEN +#define CCR_M_SLPSLWEN (1 << CCR_V_SLPSLWEN) #define CCR_V_DZSLWEN 9 -#define CCR_M_DZSLWEN 1 << CCR_V_DZSLWEN +#define CCR_M_DZSLWEN (1 << CCR_V_DZSLWEN) #define CCR_V_SPNDSLWEN 10 -#define CCR_M_SPNDSLWEN 1 << CCR_V_SPNDSLWEN +#define CCR_M_SPNDSLWEN (1 << CCR_V_SPNDSLWEN) #define CCR_V_LBSLWEN 11 -#define CCR_M_LBSLWEN 1 << CCR_V_LBSLWEN +#define CCR_M_LBSLWEN (1 << CCR_V_LBSLWEN) #define CCR_V_DZONHALT 12 -#define CCR_M_DZONHALT 1 << CCR_V_DZONHALT +#define CCR_M_DZONHALT (1 << CCR_V_DZONHALT) #define CCR_V_LBST 14 -#define CCR_M_LBST 1 << CCR_V_LBST +#define CCR_M_LBST (1 << CCR_V_LBST) #define CCR_V_VLBST 15 -#define CCR_M_VLBST 1 << CCR_V_VLBST +#define CCR_M_VLBST (1 << CCR_V_VLBST) /* ** Conserve Clock Selects @@ -193,41 +193,41 @@ #define PMC_PMSR_REG 0x001 #define PMC_PMSR_INIT ( PMSR_M_WAKESRC | PMSR_M_PMISRC | PMMD_ON ) #define PMSR_V_WAKESRC 0 -#define PMSR_M_WAKESRC 0x7 << PMSR_V_WAKESRC +#define PMSR_M_WAKESRC (0x7 << PMSR_V_WAKESRC) #define PMSR_V_WAKESRC0 0 -#define PMSR_M_WAKESRC0 1 << PMSR_V_WAKESRC0 +#define PMSR_M_WAKESRC0 (1 << PMSR_V_WAKESRC0) #define PMSR_V_WAKESRC1 1 -#define PMSR_M_WAKESRC1 1 << PMSR_V_WAKESRC1 +#define PMSR_M_WAKESRC1 (1 << PMSR_V_WAKESRC1) #define PMSR_V_WAKESRC2 2 -#define PMSR_M_WAKESRC2 1 << PMSR_V_WAKESRC2 +#define PMSR_M_WAKESRC2 (1 << PMSR_V_WAKESRC2) #define PMSR_V_ACPWR 3 -#define PMSR_M_ACPWR 1 << PMSR_V_ACPWR +#define PMSR_M_ACPWR (1 << PMSR_V_ACPWR) #define PMSR_V_PMISRC 4 -#define PMSR_M_PMISRC 0x1F << PMSR_V_PMISRC +#define PMSR_M_PMISRC (0x1F << PMSR_V_PMISRC) #define PMSR_V_PMISRC0 4 -#define PMSR_M_PMISRC0 1 << PMSR_V_PMISRC0 +#define PMSR_M_PMISRC0 (1 << PMSR_V_PMISRC0) #define PMSR_V_PMISRC1 5 -#define PMSR_M_PMISRC1 1 << PMSR_V_PMISRC1 +#define PMSR_M_PMISRC1 (1 << PMSR_V_PMISRC1) #define PMSR_V_PMISRC2 6 -#define PMSR_M_PMISRC2 1 << PMSR_V_PMISRC2 +#define PMSR_M_PMISRC2 (1 << PMSR_V_PMISRC2) #define PMSR_V_PMISRC3 7 -#define PMSR_M_PMISRC3 1 << PMSR_V_PMISRC3 +#define PMSR_M_PMISRC3 (1 << PMSR_V_PMISRC3) #define PMSR_V_PMISRC4 8 -#define PMSR_M_PMISRC4 1 << PMSR_V_PMISRC4 +#define PMSR_M_PMISRC4 (1 << PMSR_V_PMISRC4) #define PMSR_V_RESUME 9 -#define PMSR_M_RESUME 1 << PMSR_V_RESUME +#define PMSR_M_RESUME (1 << PMSR_V_RESUME) #define PMSR_V_WAKE0STATUS 10 -#define PMSR_M_WAKE0STATUS 1 << PMSR_V_WAKE0STATUS +#define PMSR_M_WAKE0STATUS (1 << PMSR_V_WAKE0STATUS) #define PMSR_V_WAKE1STATU
CVS commit: src/usr.bin/sys_info
Module Name:src Committed By: kre Date: Wed Aug 23 01:17:46 UTC 2017 Modified Files: src/usr.bin/sys_info: sys_info.1 sys_info.sh Log Message: Put back getopts - it is easier to get correct than hand rolled code. Add -L and -P flags to allow the library/cmd search paths to be set. Add support for getting vers info from sh, dhcpcd, and userland (/etc/release). Stop abusing "sh -x" to support -v - do it properly. Get rid of the duplicate list of components used when there are no args, instead make better use of sh capabilities to just process everything. Better use of what sh can do for us other places too. Add a (more or less random) set of libraries to include in output when no args are given. OK agc (well, earlier version...) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/sys_info/sys_info.1 cvs rdiff -u -r1.7 -r1.8 src/usr.bin/sys_info/sys_info.sh 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/sys_info/sys_info.1 diff -u src/usr.bin/sys_info/sys_info.1:1.2 src/usr.bin/sys_info/sys_info.1:1.3 --- src/usr.bin/sys_info/sys_info.1:1.2 Mon Aug 21 19:22:31 2017 +++ src/usr.bin/sys_info/sys_info.1 Wed Aug 23 01:17:46 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: sys_info.1,v 1.2 2017/08/21 19:22:31 agc Exp $ +.\" $NetBSD: sys_info.1,v 1.3 2017/08/23 01:17:46 kre Exp $ .\" .\" Copyright (c) 2016 Alistair Crooks .\" All rights reserved. @@ -23,16 +23,18 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 21, 2017 +.Dd August 23, 2017 .Dt SYS_INFO 1 .Os .Sh NAME .Nm sys_info -.Nd script to show versioning information +.Nd script to show system version information .Sh SYNOPSIS .Nm .Op Fl v -.Op Ar +.Op Fl L Ar lib-path +.Op Fl P Ar path +.Op Ar component No ... .Sh DESCRIPTION The .Nm @@ -44,10 +46,29 @@ The utility uses a combination of ways to retrieve version information from the installed utilities. .Sh OPTIONS -The following option is available: +The following options are available: .Bl -tag -width inits +.It Fl L +Give a list of directories +.Pq "colon separated" +that are used when searching for libraries. +If not given the value of +.Ev LD_LIBRARY_PATH +is used if set in the environment, or otherwise +a standard (built-in) set of directories. +.It Fl P +Set +.Ev PATH . +If not given, the system default path, as obtained from +.Ic user.cs_path +via +.Xr sysctl 1 +is used. +To use the current value of $PATH from the caller, use: +.Dl -P \*q$PATH\*q .It Fl v -Perform operations in a verbose manner. +Show the commands used to obtain the version information +for each component .El .Pp Arguments may be given to sys_info. @@ -61,9 +82,17 @@ are reported. .Pp If arguments are provided, the output is displayed in alphabetical order, and duplicates are removed. +.Sh EXIT STATUS +.Nm +exits with status 2 if an unknown option is given, +otherwise with status 1 if an unknown component is specified, +otherwise, with status 0. .Sh SEE ALSO .Xr awk 1 , -.Xr strings 1 +.Xr sed 1 , +.Xr strings 1 , +.Xr sysctl 1 , +.Xr uname 1 .Sh HISTORY The .Nm @@ -74,3 +103,5 @@ The .Nm script was written by .An Alistair Crooks Aq Mt a...@netbsd.org . +.Sh BUGS +Component names containing spaces given as arguments do not work. Index: src/usr.bin/sys_info/sys_info.sh diff -u src/usr.bin/sys_info/sys_info.sh:1.7 src/usr.bin/sys_info/sys_info.sh:1.8 --- src/usr.bin/sys_info/sys_info.sh:1.7 Mon Aug 21 19:51:32 2017 +++ src/usr.bin/sys_info/sys_info.sh Wed Aug 23 01:17:46 2017 @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: sys_info.sh,v 1.7 2017/08/21 19:51:32 agc Exp $ +# $NetBSD: sys_info.sh,v 1.8 2017/08/23 01:17:46 kre Exp $ # Copyright (c) 2016 Alistair Crooks # All rights reserved. @@ -26,23 +26,52 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -SYS_INFO_VERSION=20170821 -LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-/usr/lib:/usr/X11R7/lib} +SYS_INFO_VERSION=$( D="\$Date: 2017/08/23 01:17:46 $"; set -f; + IFS=" /"; set -- $D; printf %s "$2$3$4" ) + +PATH=$(sysctl -n user.cs_path) +export PATH + +LIBRARY_PATH=${LD_LIBRARY_PATH:-/usr/lib:/usr/X11R7/lib} + +# default libraries when no args are given (sorted...) +LIBS= +LIBS="${LIBS} libc" +LIBS="${LIBS} libcurses" +LIBS="${LIBS} libdrm" +LIBS="${LIBS} libm" +LIBS="${LIBS} libresolv" +LIBS="${LIBS} libsqlite" +LIBS="${LIBS} libssh" +LIBS="${LIBS} libstdc++" +LIBS="${LIBS} libterminfo" +LIBS="${LIBS} libutil" +LIBS="${LIBS} libX11" +LIBS="${LIBS} libXaw7" +LIBS="${LIBS} libXcb" +LIBS="${LIBS} libXfont" +LIBS="${LIBS} libXft" +LIBS="${LIBS} libXrandr" +LIBS="${LIBS} libXt" # short script to look for an executable $2, and if found, to place # path in $1 # taken from pkgsrc bootstrap which_prog() { + local IFS _var _name _d - + set -f + _var="$1"; _name="$2" - eval _tm