From owner-svn-src-stable-10@freebsd.org Sun Dec 11 02:02:01 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06581C6F01D; Sun, 11 Dec 2016 02:02:01 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9BB11B22; Sun, 11 Dec 2016 02:02:00 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBB2207E068837; Sun, 11 Dec 2016 02:02:00 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBB21xFX068835; Sun, 11 Dec 2016 02:01:59 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201612110201.uBB21xFX068835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Sun, 11 Dec 2016 02:01:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309842 - in stable/10/sys/modules: . bios X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 02:02:01 -0000 Author: rpokala Date: Sun Dec 11 02:01:59 2016 New Revision: 309842 URL: https://svnweb.freebsd.org/changeset/base/309842 Log: MFC r309491: Build smbios.ko as a module for amd64 and i386 For whatever reason, smapi, smbios, vpd are all under the "bios" directory. smapi is only for i386, so the entire "bios" directory is only built for i386. Break smapi out, and make only it i386-specific. Then, build the "bios" directory for both amd64 and i386. Because 'sys/modules/Makefile' was refactored after stable/10 was branched, the diff for that file is different from that of the original commit. They are functionally equivalent. Modified: stable/10/sys/modules/Makefile stable/10/sys/modules/bios/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Sun Dec 11 02:01:57 2016 (r309841) +++ stable/10/sys/modules/Makefile Sun Dec 11 02:01:59 2016 (r309842) @@ -683,6 +683,7 @@ _amdsbwd= amdsbwd _amdtemp= amdtemp _arcmsr= arcmsr _asmc= asmc +_bios= bios _bktr= bktr _bxe= bxe _cardbus= cardbus Modified: stable/10/sys/modules/bios/Makefile ============================================================================== --- stable/10/sys/modules/bios/Makefile Sun Dec 11 02:01:57 2016 (r309841) +++ stable/10/sys/modules/bios/Makefile Sun Dec 11 02:01:59 2016 (r309842) @@ -1,6 +1,10 @@ # $FreeBSD$ # -SUBDIR= smapi smbios vpd +SUBDIR= smbios vpd + +.if ${MACHINE_ARCH} == "i386" +SUBDIR+= smapi +.endif .include From owner-svn-src-stable-10@freebsd.org Sun Dec 11 07:37:21 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1313C70ACE; Sun, 11 Dec 2016 07:37:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A945510EA; Sun, 11 Dec 2016 07:37:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBB7bKxF006009; Sun, 11 Dec 2016 07:37:20 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBB7bKjP006004; Sun, 11 Dec 2016 07:37:20 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201612110737.uBB7bKjP006004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 11 Dec 2016 07:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309848 - in stable/10: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src lib/libmagic X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 07:37:22 -0000 Author: delphij Date: Sun Dec 11 07:37:20 2016 New Revision: 309848 URL: https://svnweb.freebsd.org/changeset/base/309848 Log: MFC r308420: MFV r308392: file 5.29. Added: stable/10/contrib/file/magic/Magdir/algol68 - copied unchanged from r308420, head/contrib/file/magic/Magdir/algol68 stable/10/contrib/file/magic/Magdir/application - copied unchanged from r308420, head/contrib/file/magic/Magdir/application stable/10/contrib/file/magic/Magdir/apt - copied unchanged from r308420, head/contrib/file/magic/Magdir/apt stable/10/contrib/file/magic/Magdir/psl - copied unchanged from r308420, head/contrib/file/magic/Magdir/psl Modified: stable/10/contrib/file/ChangeLog stable/10/contrib/file/TODO stable/10/contrib/file/config.guess stable/10/contrib/file/config.sub stable/10/contrib/file/configure stable/10/contrib/file/configure.ac stable/10/contrib/file/doc/file.man stable/10/contrib/file/doc/magic.man stable/10/contrib/file/ltmain.sh stable/10/contrib/file/magic/Magdir/animation stable/10/contrib/file/magic/Magdir/apple stable/10/contrib/file/magic/Magdir/bioinformatics stable/10/contrib/file/magic/Magdir/c-lang stable/10/contrib/file/magic/Magdir/claris stable/10/contrib/file/magic/Magdir/commands stable/10/contrib/file/magic/Magdir/compress stable/10/contrib/file/magic/Magdir/cups stable/10/contrib/file/magic/Magdir/editors stable/10/contrib/file/magic/Magdir/filesystems stable/10/contrib/file/magic/Magdir/fonts stable/10/contrib/file/magic/Magdir/gcc stable/10/contrib/file/magic/Magdir/gnu stable/10/contrib/file/magic/Magdir/images stable/10/contrib/file/magic/Magdir/jpeg stable/10/contrib/file/magic/Magdir/msdos stable/10/contrib/file/magic/Magdir/pgp stable/10/contrib/file/magic/Magdir/python stable/10/contrib/file/magic/Magdir/ruby stable/10/contrib/file/magic/Magdir/sgml stable/10/contrib/file/magic/Magdir/sql stable/10/contrib/file/magic/Makefile.am stable/10/contrib/file/magic/Makefile.in stable/10/contrib/file/python/magic.py stable/10/contrib/file/src/apprentice.c stable/10/contrib/file/src/ascmagic.c stable/10/contrib/file/src/cdf.c stable/10/contrib/file/src/cdf.h stable/10/contrib/file/src/compress.c stable/10/contrib/file/src/der.c stable/10/contrib/file/src/file.c stable/10/contrib/file/src/file.h stable/10/contrib/file/src/funcs.c stable/10/contrib/file/src/magic.c stable/10/contrib/file/src/readcdf.c stable/10/contrib/file/src/readelf.c stable/10/contrib/file/src/softmagic.c stable/10/lib/libmagic/config.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/file/ChangeLog ============================================================================== --- stable/10/contrib/file/ChangeLog Sun Dec 11 07:33:02 2016 (r309847) +++ stable/10/contrib/file/ChangeLog Sun Dec 11 07:37:20 2016 (r309848) @@ -1,3 +1,32 @@ +2016-10-25 10:40 Christos Zoulas + + * release 5.28 + +2016-10-24 11:20 Christos Zoulas + + * der getlength overflow (Jonas Wagner) + * multiple magic file load failure (Christoph Biedl) + +2016-10-17 11:26 Christos Zoulas + + * CDF parsing improvements (Guy Helmer) + +2016-07-20 7:26 Christos Zoulas + + * Add support for signed indirect offsets + +2016-07-18 7:41 Christos Zoulas + + * cat /dev/null | file - should print empty (Christoph Biedl) + +2016-07-05 15:20 Christos Zoulas + + * Bump string size from 64 to 96. + +2016-06-13 20:20 Christos Zoulas + + * PR/556: Fix separators on annotations. + 2016-06-13 19:40 Christos Zoulas * release 5.28 Modified: stable/10/contrib/file/TODO ============================================================================== --- stable/10/contrib/file/TODO Sun Dec 11 07:33:02 2016 (r309847) +++ stable/10/contrib/file/TODO Sun Dec 11 07:37:20 2016 (r309848) @@ -6,7 +6,6 @@ file, not here. More speculative materia listed in the BUGS section of the man page had been fixed!) --- - It would be nice to simplify file considerably. For example, reimplement the apprentice and non-pattern magic methods in Python, and compile the magic patterns to a giant regex (or something similar; @@ -15,8 +14,23 @@ small amount of C is needed (because fas required for soft magic, not the more detailed information given by hard-wired routines). In this regard, note that hplip, which is BSD-licensed, has a magic reimplementation in Python. - +--- Read the kerberos magic entry for more ideas. - +--- Write a string merger to make magic entry sizes dynamic. Strings will be converted to offsets from the string table. +--- +Programming language support, we can introduce the concept of a group +of rules where n rules need to match before the rule is positive. This +could require structural changes to the matching code :-( + +0 group 2 # require 2 matches +# rule 1 +>0 .... +... +# rule 2 +>0 .... +... + +christos + Modified: stable/10/contrib/file/config.guess ============================================================================== --- stable/10/contrib/file/config.guess Sun Dec 11 07:33:02 2016 (r309847) +++ stable/10/contrib/file/config.guess Sun Dec 11 07:37:20 2016 (r309848) @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2015-03-04' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -22,19 +20,17 @@ timestamp='2012-02-10' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches to . + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -153,20 +168,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ @@ -182,6 +204,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -198,7 +227,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` @@ -302,7 +335,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -560,8 +593,9 @@ EOF else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -801,10 +835,13 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -852,21 +889,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -879,59 +916,57 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -950,54 +985,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1201,6 +1245,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1227,19 +1274,31 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1256,7 +1315,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1330,157 +1389,6 @@ EOF exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 <. @@ -26,11 +20,12 @@ timestamp='2012-04-18' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -73,9 +68,7 @@ Report bugs and patches to Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58C1CC72BF7; Sun, 11 Dec 2016 19:58:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DA1C1626; Sun, 11 Dec 2016 19:58:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBBJwEMk011764; Sun, 11 Dec 2016 19:58:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBBJwE12011763; Sun, 11 Dec 2016 19:58:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201612111958.uBBJwE12011763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 11 Dec 2016 19:58:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309857 - in stable: 10/contrib/llvm/lib/Analysis 11/contrib/llvm/lib/Analysis 9/contrib/llvm/lib/Analysis X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2016 19:58:15 -0000 Author: dim Date: Sun Dec 11 19:58:13 2016 New Revision: 309857 URL: https://svnweb.freebsd.org/changeset/base/309857 Log: MFC r309722: Pull in r281586 from upstream llvm trunk (by Wei Mi): Add some shortcuts in LazyValueInfo to reduce compile time of Correlated Value Propagation. The patch is to partially fix PR10584. Correlated Value Propagation queries LVI to check non-null for pointer params of each callsite. If we know the def of param is an alloca instruction, we know it is non-null and can return early from LVI. Similarly, CVP queries LVI to check whether pointer for each mem access is constant. If the def of the pointer is an alloca instruction, we know it is not a constant pointer. These shortcuts can reduce the cost of CVP significantly. Differential Revision: https://reviews.llvm.org/D18066 This significantly reduces memory usage and compilation time when compiling a particular C++ source file of the graphics/colmap port. PR: 215136 Modified: stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/llvm/lib/Analysis/LazyValueInfo.cpp stable/9/contrib/llvm/lib/Analysis/LazyValueInfo.cpp Directory Properties: stable/11/ (props changed) stable/9/contrib/llvm/ (props changed) Modified: stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp Sun Dec 11 19:50:39 2016 (r309856) +++ stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp Sun Dec 11 19:58:13 2016 (r309857) @@ -1033,7 +1033,26 @@ void LazyValueInfo::releaseMemory() { } } + +/// Returns true if we can statically tell that this value will never be a +/// "useful" constant. In practice, this means we've got something like an +/// alloca or a malloc call for which a comparison against a constant can +/// only be guarding dead code. Note that we are potentially giving up some +/// precision in dead code (a constant result) in favour of avoiding a +/// expensive search for a easily answered common query. +static bool isKnownNonConstant(Value *V) { + V = V->stripPointerCasts(); + // The return val of alloc cannot be a Constant. + if (isa(V)) + return true; + return false; +} + Constant *LazyValueInfo::getConstant(Value *V, BasicBlock *BB) { + // Bail out early if V is known not to be a Constant. + if (isKnownNonConstant(V)) + return nullptr; + LVILatticeVal Result = getCache(PImpl).getValueInBlock(V, BB); if (Result.isConstant()) From owner-svn-src-stable-10@freebsd.org Mon Dec 12 00:47:14 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 163B8C6F807; Mon, 12 Dec 2016 00:47:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCFB515AC; Mon, 12 Dec 2016 00:47:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC0lCte029620; Mon, 12 Dec 2016 00:47:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC0lCC0029618; Mon, 12 Dec 2016 00:47:12 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201612120047.uBC0lCC0029618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 12 Dec 2016 00:47:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309862 - stable/10/usr.bin/sort X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 00:47:14 -0000 Author: delphij Date: Mon Dec 12 00:47:12 2016 New Revision: 309862 URL: https://svnweb.freebsd.org/changeset/base/309862 Log: MFC r309232-309234: r309232: Fix an obvious typo. r309233: Eliminate variables that are computed, assigned but never used. r309234: pages and psize are always assigned, so there is no need to initialize them as zero. Modified: stable/10/usr.bin/sort/bwstring.c stable/10/usr.bin/sort/sort.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/sort/bwstring.c ============================================================================== --- stable/10/usr.bin/sort/bwstring.c Mon Dec 12 00:45:43 2016 (r309861) +++ stable/10/usr.bin/sort/bwstring.c Mon Dec 12 00:47:12 2016 (r309862) @@ -910,7 +910,6 @@ bws_month_score(const struct bwstring *s if (MB_CUR_MAX == 1) { const unsigned char *end, *s; - size_t len; s = s0->data.cstr; end = s + s0->len; @@ -918,8 +917,6 @@ bws_month_score(const struct bwstring *s while (isblank(*s) && s < end) ++s; - len = strlen((const char*)s); - for (int i = 11; i >= 0; --i) { if (cmonths[i] && (s == (unsigned char*)strstr((const char*)s, (char*)(cmonths[i])))) @@ -928,7 +925,6 @@ bws_month_score(const struct bwstring *s } else { const wchar_t *end, *s; - size_t len; s = s0->data.wstr; end = s + s0->len; @@ -936,8 +932,6 @@ bws_month_score(const struct bwstring *s while (iswblank(*s) && s < end) ++s; - len = wcslen(s); - for (int i = 11; i >= 0; --i) { if (wmonths[i] && (s == wcsstr(s, wmonths[i]))) return (i); Modified: stable/10/usr.bin/sort/sort.c ============================================================================== --- stable/10/usr.bin/sort/sort.c Mon Dec 12 00:45:43 2016 (r309861) +++ stable/10/usr.bin/sort/sort.c Mon Dec 12 00:47:12 2016 (r309862) @@ -209,14 +209,10 @@ sort_modifier_empty(struct sort_mods *sm static void usage(bool opt_err) { - struct option *o; FILE *out; - out = stdout; - o = &(long_options[0]); + out = opt_err ? stderr : stdout; - if (opt_err) - out = stderr; fprintf(out, getstr(12), getprogname()); if (opt_err) exit(2); @@ -271,8 +267,6 @@ set_hw_params(void) { long pages, psize; - pages = psize = 0; - #if defined(SORT_THREADS) ncpu = 1; #endif @@ -280,7 +274,7 @@ set_hw_params(void) pages = sysconf(_SC_PHYS_PAGES); if (pages < 1) { perror("sysconf pages"); - psize = 1; + pages = 1; } psize = sysconf(_SC_PAGESIZE); if (psize < 1) { From owner-svn-src-stable-10@freebsd.org Mon Dec 12 02:14:44 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E41EC73F02; Mon, 12 Dec 2016 02:14:44 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7B041E0; Mon, 12 Dec 2016 02:14:43 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC2EhUM065936; Mon, 12 Dec 2016 02:14:43 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC2EhjR065935; Mon, 12 Dec 2016 02:14:43 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201612120214.uBC2EhjR065935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 12 Dec 2016 02:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309867 - stable/10/bin/kenv X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 02:14:44 -0000 Author: delphij Date: Mon Dec 12 02:14:42 2016 New Revision: 309867 URL: https://svnweb.freebsd.org/changeset/base/309867 Log: MFC r309238,309239: r309238: Plug a potential memory leak. r309239: style(9). Modified: stable/10/bin/kenv/kenv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/kenv/kenv.c ============================================================================== --- stable/10/bin/kenv/kenv.c Mon Dec 12 02:13:35 2016 (r309866) +++ stable/10/bin/kenv/kenv.c Mon Dec 12 02:14:42 2016 (r309867) @@ -63,7 +63,6 @@ main(int argc, char **argv) char *env, *eq, *val; int ch, error; - error = 0; val = NULL; env = NULL; while ((ch = getopt(argc, argv, "hNquv")) != -1) { @@ -128,7 +127,7 @@ main(int argc, char **argv) static int kdumpenv(void) { - char *buf, *cp; + char *buf, *bp, *cp; int buflen, envlen; envlen = kenv(KENV_DUMP, NULL, NULL, 0); @@ -136,10 +135,9 @@ kdumpenv(void) return (-1); for (;;) { buflen = envlen * 120 / 100; - buf = malloc(buflen + 1); + buf = calloc(1, buflen + 1); if (buf == NULL) return (-1); - memset(buf, 0, buflen + 1); /* Be defensive */ envlen = kenv(KENV_DUMP, NULL, buf, buflen); if (envlen < 0) { free(buf); @@ -151,21 +149,23 @@ kdumpenv(void) break; } - for (; *buf != '\0'; buf += strlen(buf) + 1) { + for (bp = buf; *bp != '\0'; bp += strlen(bp) + 1) { if (hflag) { - if (strncmp(buf, "hint.", 5) != 0) + if (strncmp(bp, "hint.", 5) != 0) continue; } - cp = strchr(buf, '='); + cp = strchr(bp, '='); if (cp == NULL) continue; *cp++ = '\0'; if (Nflag) - printf("%s\n", buf); + printf("%s\n", bp); else - printf("%s=\"%s\"\n", buf, cp); - buf = cp; + printf("%s=\"%s\"\n", bp, cp); + bp = cp; } + + free(buf); return (0); } @@ -190,7 +190,7 @@ ksetenv(const char *env, char *val) { int ret; - ret = kenv(KENV_SET, env, val, strlen(val)+1); + ret = kenv(KENV_SET, env, val, strlen(val) + 1); if (ret == 0) printf("%s=\"%s\"\n", env, val); return (ret); @@ -200,7 +200,7 @@ static int kunsetenv(const char *env) { int ret; - + ret = kenv(KENV_UNSET, env, NULL, 0); return (ret); } From owner-svn-src-stable-10@freebsd.org Mon Dec 12 02:22:50 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A08A4C732A1; Mon, 12 Dec 2016 02:22:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FC45CB3; Mon, 12 Dec 2016 02:22:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC2Mn4j070020; Mon, 12 Dec 2016 02:22:49 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC2MnBv070019; Mon, 12 Dec 2016 02:22:49 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201612120222.uBC2MnBv070019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 12 Dec 2016 02:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309870 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 02:22:50 -0000 Author: delphij Date: Mon Dec 12 02:22:49 2016 New Revision: 309870 URL: https://svnweb.freebsd.org/changeset/base/309870 Log: MFC r309241,309243: Plug memory leaks. Modified: stable/10/usr.sbin/ctld/ctld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Mon Dec 12 02:21:56 2016 (r309869) +++ stable/10/usr.sbin/ctld/ctld.c Mon Dec 12 02:22:49 2016 (r309870) @@ -400,6 +400,7 @@ auth_portal_new(struct auth_group *ag, c return (ap); error: + free(str); free(ap); log_errx(1, "Incorrect initiator portal '%s'", portal); return (NULL); @@ -673,8 +674,10 @@ parse_addr_port(char *arg, const char *d */ arg++; addr = strsep(&arg, "]"); - if (arg == NULL) + if (arg == NULL) { + free(str); return (1); + } if (arg[0] == '\0') { port = def_port; } else if (arg[0] == ':') { From owner-svn-src-stable-10@freebsd.org Mon Dec 12 02:24:47 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4573C73332; Mon, 12 Dec 2016 02:24:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73AACE3B; Mon, 12 Dec 2016 02:24:47 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC2OkVJ070152; Mon, 12 Dec 2016 02:24:46 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC2Ok4x070151; Mon, 12 Dec 2016 02:24:46 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201612120224.uBC2Ok4x070151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 12 Dec 2016 02:24:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309871 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 02:24:47 -0000 Author: markj Date: Mon Dec 12 02:24:46 2016 New Revision: 309871 URL: https://svnweb.freebsd.org/changeset/base/309871 Log: MFC r308350: Fix WITNESS hints for pagequeue locks. Modified: stable/10/sys/kern/subr_witness.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_witness.c ============================================================================== --- stable/10/sys/kern/subr_witness.c Mon Dec 12 02:22:49 2016 (r309870) +++ stable/10/sys/kern/subr_witness.c Mon Dec 12 02:24:46 2016 (r309871) @@ -592,7 +592,7 @@ static struct witness_order_list_entry o * CDEV */ { "vm map (system)", &lock_class_mtx_sleep }, - { "vm page queue", &lock_class_mtx_sleep }, + { "vm pagequeue", &lock_class_mtx_sleep }, { "vnode interlock", &lock_class_mtx_sleep }, { "cdev", &lock_class_mtx_sleep }, { NULL, NULL }, @@ -602,7 +602,7 @@ static struct witness_order_list_entry o { "vm map (user)", &lock_class_sx }, { "vm object", &lock_class_rw }, { "vm page", &lock_class_mtx_sleep }, - { "vm page queue", &lock_class_mtx_sleep }, + { "vm pagequeue", &lock_class_mtx_sleep }, { "pmap pv global", &lock_class_rw }, { "pmap", &lock_class_mtx_sleep }, { "pmap pv list", &lock_class_rw }, From owner-svn-src-stable-10@freebsd.org Mon Dec 12 06:58:45 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAE38C734E9; Mon, 12 Dec 2016 06:58:45 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 737CE10A5; Mon, 12 Dec 2016 06:58:45 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC6wijE082784; Mon, 12 Dec 2016 06:58:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC6wiqh082783; Mon, 12 Dec 2016 06:58:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201612120658.uBC6wiqh082783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 12 Dec 2016 06:58:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309877 - stable/10/share/misc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 06:58:45 -0000 Author: bapt Date: Mon Dec 12 06:58:44 2016 New Revision: 309877 URL: https://svnweb.freebsd.org/changeset/base/309877 Log: MFC r309795: Update pci ids database to 2016.11.21 Modified: stable/10/share/misc/pci_vendors Directory Properties: stable/10/ (props changed) Modified: stable/10/share/misc/pci_vendors ============================================================================== --- stable/10/share/misc/pci_vendors Mon Dec 12 06:56:19 2016 (r309876) +++ stable/10/share/misc/pci_vendors Mon Dec 12 06:58:44 2016 (r309877) @@ -3,8 +3,8 @@ # # List of PCI ID's # -# Version: 2016.10.20 -# Date: 2016-10-20 03:15:02 +# Version: 2016.11.21 +# Date: 2016-11-21 03:15:01 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -50,9 +50,11 @@ 021b Compaq Computer Corporation 8139 HNE-300 (RealTek RTL8139c) [iPaq Networking] 0270 Hauppauge computer works Inc. (Wrong ID) +0291 Davicom Semiconductor, Inc. (Wrong ID) # SpeedStream is Efficient Networks, Inc, a Siemens Company 02ac SpeedStream 1012 1012 PCMCIA 10/100 Ethernet Card [RTL81xx] +02e0 XFX Pine Group Inc. (Wrong ID) 0303 Hewlett-Packard Company (Wrong ID) 0308 ZyXEL Communications Corporation (Wrong ID) 0315 SK-Electronics Co., Ltd. @@ -548,12 +550,12 @@ 1028 1fd3 HBA330 MMZ 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00ac SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) - 1d49 0201 ThinkSystem 9400-16i PCIe 12Gb HBA - 1d49 0203 ThinkSystem 9400-16e PCIe 12Gb HBA + 1d49 0201 ThinkSystem 430-16i SAS/SATA 12Gb HBA + 1d49 0203 ThinkSystem 430-16e SAS/SATA 12Gb HBA 00ae SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00af SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) - 1d49 0200 ThinkSystem 9400-8i PCIe 12Gb HBA - 1d49 0202 ThinkSystem 9400-8e PCIe 12Gb HBA + 1d49 0200 ThinkSystem 430-8i SAS/SATA 12Gb HBA + 1d49 0202 ThinkSystem 430-8e SAS/SATA 12Gb HBA 00be SAS3504 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00bf SAS3404 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 00c0 SAS3324 PCI-Express Fusion-MPT SAS-3 @@ -7531,7 +7533,7 @@ 1885 0700 Tsunami FPGA PMC with Altera Stratix S40 1885 0701 Tsunami FPGA PMC with Altera Stratix S30 9733 PEX 9733 33-lane, 9-port PCI Express Gen 3 (8.0 GT/s) Switch - 1d49 0001 ThinkSystem P310W-4P NVMe Switch Card + 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter 9749 PEX 9749 49-lane, 13-port PCI Express Gen 3 (8.0 GT/s) Switch a100 Blackmagic Design DeckLink bb04 B&B 3PCIOSD1A Isolated PCI Serial @@ -8377,6 +8379,7 @@ 1048 0c45 GLoria II 1048 0c4a GLoria II-64 Pro 1048 0c4b GLoria II-64 Pro DVII + 10a9 9002 VPro VR3 0110 NV11 [GeForce2 MX/MX 400] 1043 4015 AGP-V7100 Pro 1043 4021 V7100 Deluxe Combo @@ -10649,6 +10652,7 @@ 1b00 GP102 [TITAN X] 1b01 GP102 1b30 GP102GL [Quadro P6000] + 1b38 GP102GL [Tesla P40] 1b70 GP102GL 1b78 GP102GL 1b80 GP104 [GeForce GTX 1080] @@ -10668,10 +10672,11 @@ 1c03 GP106 [GeForce GTX 1060 6GB] 1c20 GP106M [GeForce GTX 1060] 1c30 GP106GL + 1c35 GP106 1c60 GP106M [GeForce GTX 1060] 1c70 GP106GL 1c80 GP107 - 1c81 GP107 + 1c81 GP107 [GeForce GTX 1050] 1c82 GP107 [GeForce GTX 1050 Ti] 1ca7 GP107GL 1ca8 GP107GL @@ -13729,6 +13734,7 @@ 7375 PM7375 [LASAR-155 ATM SAR] 7384 PM7384 [FREEDM - 84P672 Frm Engine & Datalink Mgr] 8000 PM8000 [SPC - SAS Protocol Controller] + 8009 PM8009 SPCve 8x6G 8032 ATTO Celerity FC8xEN 117c 003b Celerity FC-82EN Fibre Channel Adapter 117c 003c Celerity FC-84EN Fibre Channel Adapter @@ -13742,6 +13748,8 @@ 8071 PM8071 Tachyon SPCve 12G eight-port SAS/SATA controller 8072 PM8072 Tachyon SPCv 12G 16-port SAS/SATA controller 8073 PM8073 Tachyon SPCve 12G 16-port SAS/SATA controller + 8531 PM8531 PFX 24xG3 Fanout PCIe Switches + 8546 PM8546 B-FEIP PSX 96xG3 PCIe Storage Switch 11f9 I-Cube Inc 11fa Kasan Electronics Company, Ltd. 11fb Datel Inc @@ -16213,6 +16221,71 @@ 589a T520-509A Unified Wire Ethernet Controller [VF] 589b T540-509B Unified Wire Ethernet Controller [VF] 589c T520-509C Unified Wire Ethernet Controller [VF] + 6001 T6225-CR Unified Wire Ethernet Controller + 6002 T6225-SO-CR Unified Wire Ethernet Controller + 6003 T6425-CR Unified Wire Ethernet Controller + 6004 T6425-SO-CR Unified Wire Ethernet Controller + 6005 T6225-OCP-SO Unified Wire Ethernet Controller + 6006 T62100-OCP-SO Unified Wire Ethernet Controller + 6007 T62100-LP-CR Unified Wire Ethernet Controller + 6008 T62100-SO-CR Unified Wire Ethernet Controller + 6009 T6210-BT Unified Wire Ethernet Controller + 600d T62100-CR Unified Wire Ethernet Controller + 6011 T6225-LL-CR Unified Wire Ethernet Controller + 6014 T61100-OCP-SO Unified Wire Ethernet Controller + 6015 T6201-BT Unified Wire Ethernet Controller + 6401 T6225-CR Unified Wire Ethernet Controller + 6402 T6225-SO-CR Unified Wire Ethernet Controller + 6403 T6425-CR Unified Wire Ethernet Controller + 6404 T6425-SO-CR Unified Wire Ethernet Controller + 6405 T6225-OCP-SO Unified Wire Ethernet Controller + 6406 T62100-OCP-SO Unified Wire Ethernet Controller + 6407 T62100-LP-CR Unified Wire Ethernet Controller + 6408 T62100-SO-CR Unified Wire Ethernet Controller + 6409 T6210-BT Unified Wire Ethernet Controller + 640d T62100-CR Unified Wire Ethernet Controller + 6411 T6225-LL-CR Unified Wire Ethernet Controller + 6414 T61100-OCP-SO Unified Wire Ethernet Controller + 6415 T6201-BT Unified Wire Ethernet Controller + 6501 T6225-CR Unified Wire Storage Controller + 6502 T6225-SO-CR Unified Wire Storage Controller + 6503 T6425-CR Unified Wire Storage Controller + 6504 T6425-SO-CR Unified Wire Storage Controller + 6505 T6225-OCP-SO Unified Wire Storage Controller + 6506 T62100-OCP-SO Unified Wire Storage Controller + 6507 T62100-LP-CR Unified Wire Storage Controller + 6508 T62100-SO-CR Unified Wire Storage Controller + 6509 T6210-BT Unified Wire Storage Controller + 650d T62100-CR Unified Wire Storage Controller + 6511 T6225-LL-CR Unified Wire Storage Controller + 6514 T61100-OCP-SO Unified Wire Storage Controller + 6515 T6201-BT Unified Wire Storage Controller + 6601 T6225-CR Unified Wire Storage Controller + 6602 T6225-SO-CR Unified Wire Storage Controller + 6603 T6425-CR Unified Wire Storage Controller + 6604 T6425-SO-CR Unified Wire Storage Controller + 6605 T6225-OCP-SO Unified Wire Storage Controller + 6606 T62100-OCP-SO Unified Wire Storage Controller + 6607 T62100-LP-CR Unified Wire Storage Controller + 6608 T62100-SO-CR Unified Wire Storage Controller + 6609 T6210-BT Unified Wire Storage Controller + 660d T62100-CR Unified Wire Storage Controller + 6611 T6225-LL-CR Unified Wire Storage Controller + 6614 T61100-OCP-SO Unified Wire Storage Controller + 6615 T6201-BT Unified Wire Storage Controller + 6801 T6225-CR Unified Wire Ethernet Controller [VF] + 6802 T6225-SO-CR Unified Wire Ethernet Controller [VF] + 6803 T6425-CR Unified Wire Ethernet Controller [VF] + 6804 T6425-SO-CR Unified Wire Ethernet Controller [VF] + 6805 T6225-OCP-SO Unified Wire Ethernet Controller [VF] + 6806 T62100-OCP-SO Unified Wire Ethernet Controller [VF] + 6807 T62100-LP-CR Unified Wire Ethernet Controller [VF] + 6808 T62100-SO-CR Unified Wire Ethernet Controller [VF] + 6809 T6210-BT Unified Wire Ethernet Controller [VF] + 680d T62100-CR Unified Wire Ethernet Controller [VF] + 6811 T6225-LL-CR Unified Wire Ethernet Controller [VF] + 6814 T61100-OCP-SO Unified Wire Ethernet Controller [VF] + 6815 T6201-BT Unified Wire Ethernet Controller [VF] a000 PE10K Unified Wire Ethernet Controller 1426 Storage Technology Corp. 1427 Better On-Line Solutions @@ -16923,6 +16996,7 @@ 16bc BCM57765/57785 SDXC/MMC Card Reader 16be BCM57765/57785 MS Card Reader 16bf BCM57765/57785 xD-Picture Card Reader + 16c1 NetXtreme-E RDMA Virtual Function 16c6 NetXtreme BCM5702A3 Gigabit Ethernet 10b7 1100 3C1000B-T 10/100/1000 PCI 14e4 000c BCM5702 1000Base-T @@ -16969,7 +17043,9 @@ 16e8 BCM57406 NetXtreme-E Ethernet Partition 16e9 BCM57407 NetXtreme-E 25Gb Ethernet Controller 16ec BCM57414 NetXtreme-E Ethernet Partition + 16ed BCM57414 NetXtreme-E RDMA Partition 16ee BCM57416 NetXtreme-E Ethernet Partition + 16ef BCM57416 NetXtreme-E RDMA Partition 16f3 NetXtreme BCM5727 Gigabit Ethernet PCIe 16f7 NetXtreme BCM5753 Gigabit Ethernet PCI Express 16fd NetXtreme BCM5753M Gigabit Ethernet PCI Express @@ -17896,6 +17972,7 @@ 0209 MT27700 Family [ConnectX-4 Flash Recovery] 020b MT27710 Family [ConnectX-4 Lx Flash Recovery] 020d MT28800 Family [ConnectX-5 Flash Recovery] + 020f MT28908A0 Family [ConnectX-6 Flash Recovery] # reserved for RM#105916 024e MT53100 [Spectrum-2, Flash recovery mode] # Actual value to be used @@ -17913,6 +17990,7 @@ 1005 MT27510 Family 1006 MT27511 Family 1007 MT27520 Family [ConnectX-3 Pro] + 1014 04eb 2-Port 10GbE NIC and RoCE SR PCIe3 103c 22f3 InfiniBand FDR/Ethernet 10Gb/40Gb 2-port 544+QSFP Adapter 103c 22f4 InfiniBand FDR/Ethernet 10Gb/40Gb 2-port 544+FLR-QSFP Adapter 103c 801f Ethernet 10G 2-port 546SFP+ Adapter @@ -17938,8 +18016,8 @@ 1018 MT27800 Family [ConnectX-5 Virtual Function] 1019 MT28800 Family [ConnectX-5 Ex] 101a MT28800 Family [ConnectX-5 Ex Virtual Function] - 101b MT28831 - 101c MT28840 + 101b MT28908 Family [ConnectX-6] + 101c MT28908 Family [ConnectX-6 Virtual Function] 101d MT28841 101e MT28850 101f MT28851 @@ -17969,6 +18047,7 @@ 103c 1781 NC543i 1-port 4x QDR IB/Flex-10 10Gb Adapter 103c 3349 NC543i 2-port 4xQDR IB/10Gb Adapter 6750 MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s] + 1014 0461 2-Port 10 GbE RoCE SR LP PCIe2 (rev b0) 15b3 0018 HP 10 GbE PCI-e G2 Dual-Port NIC (rev C1) 675a MT25408 [ConnectX EN 10GigE 10GBaseT, PCIe Gen2 5GT/s] 6764 MT26468 [ConnectX EN 10GigE, PCIe 2.0 5GT/s Virtualization+] @@ -17981,8 +18060,8 @@ 7121 NPS-600 configuration and management interface 7122 NPS-600 network interface PF 7123 NPS-600 network interface VF - a2d0 MT416842 - a2d1 MT416842 + a2d0 MT416842 BlueField SoC Crypto enabled + a2d1 MT416842 BlueField SoC Crypto disabled a2d3 MT416842 BlueField multicore SoC family VF # SwitchX-2, 40GbE switch c738 MT51136 @@ -19231,7 +19310,7 @@ 18bc GeCube Technologies, Inc. 18c3 Micronas Semiconductor Holding AG 0720 nGene PCI-Express Multimedia Controller - 07ca 032e Hybrid M779 PCI-E + 1461 032e Hybrid M779 PCI-E # Nee Octigabay System 18c8 Cray Inc 18c9 ARVOO Engineering BV @@ -19330,6 +19409,8 @@ 0155 NT100E3-1-PTP Network Adapter 1x100Gb 0165 NT80E3-2-PTP Network Adapter 2x40Gb 0175 NT20E3-2-PTP Network Adapter 2x10Gb + 0185 NT40A01-4x1 Network Adapter 4x1Gb + 01a5 NT200A01 Network Adapter 2x100Gb 18f6 NextIO 1000 [Nexsis] Switch Virtual P2P PCIe Bridge 1001 [Texsis] Switch Virtual P2P PCIe Bridge @@ -19763,6 +19844,7 @@ 0714 OneConnect 10Gb FCoE Initiator (be3) 103c 3315 NC553i 10Gb 2-port FlexFabric Converged Network Adapter 103c 337b NC554FLB 10Gb 2-port FlexFabric Converged Network Adapter + 0800 ServerView iRMC HTI 19a8 DAQDATA GmbH 19ac Kasten Chase Applied Research 0001 ACA2400 Crypto Accelerator @@ -20121,7 +20203,9 @@ 1bb1 6523 Nytro XP6500-8A4096 0100 Nytro Flash Storage 1bb1 0101 Nytro XF1440 + 1bb1 0103 Nytro 5000 1bb1 0121 Nytro XM1440 + 1bb1 0123 Nytro 5000 1bb1 01a1 Nytro XP7102 1bb3 Bluecherry 4304 BC-04120A MPEG4 4 port video encoder / decoder @@ -20179,7 +20263,9 @@ 00a5 FBC2XLG Capture 2x40Gb 00a6 FBC1CG Capture 1x100Gb 00a9 FBC2XGHH Capture 2x10Gb + 00ad FBC2CGG3HL Capture 2x200Gb 00af Capture slave device + a001 FBC2CGG3 Capture 2x200Gb # Used on V120 VME Crate Controller 1c32 Highland Technology, Inc. 1c33 Daktronics, Inc @@ -20259,10 +20345,15 @@ 100b K35-2SFP 100c K35-4SFP 100d AR-ARKA-FX0 [Arkville 32B DPDK Data Mover] + 1d6c 2001 DPDK-Aware Virtual Function [Arkville VF] 100e AR-ARKA-FX1 [Arkville 64B DPDK Data Mover] + 1d6c 2001 DPDK-Aware Virtual Function [Arkville VF] 4200 A5PL-E1-10GETI [10 GbE Ethernet Traffic Instrument] 1d78 DERA +1d7c Aerotech, Inc. 1d8f Enyx +1d95 Graphcore Ltd +1da1 Teko Telecom S.r.l. 1de1 Tekram Technology Co.,Ltd. 0391 TRM-S1040 [DC-315 / DC-395 series] 2020 DC-390 @@ -20346,6 +20437,7 @@ 2bd8 ROPEX Industrie-Elektronik GmbH 3000 Hansol Electronics Inc. 3112 Satelco Ingenieria S.A. +3130 AUDIOTRAK 3142 Post Impression Systems. 31ab Zonet 1faa ZEW1602 802.11b/g Wireless Adapter @@ -22681,6 +22773,8 @@ 8086 5004 Ethernet 10G 2P X540-t Adapter 1529 82599 10 Gigabit Dual Port Network Connection with FCoE 152a 82599 10 Gigabit Dual Port Backplane Connection with FCoE + 152e 82599 Virtual Function + 1530 X540 Virtual Function 1533 I210 Gigabit Network Connection 103c 0003 Ethernet I210-T1 GbE NIC 1093 7706 Compact Vision System Ethernet Adapter @@ -22736,6 +22830,7 @@ 8086 0001 Ethernet Converged Network Adapter X550-T2 8086 001a Ethernet Converged Network Adapter X550-T2 8086 0022 Ethernet Converged Network Adapter X550-T2 + 1564 X550 Virtual Function 1565 X550 Virtual Function 1566 DSL4410 Thunderbolt NHI [Redwood Ridge 2C 2013] 1567 DSL4410 Thunderbolt Bridge [Redwood Ridge 2C 2013] @@ -22755,10 +22850,12 @@ 103c 0000 Ethernet 10Gb 562SFP+ Adapter 103c 22fc HP Ethernet 10Gb 2-port 562FLR-SFP+ Adapter 103c 22fd HP Ethernet 10Gb 2-port 562SFP+ Adapter - 1137 0000 Ethernet Converged NIC X710-4 - 1137 013b Ethernet Converged NIC X710-4 - 1590 0000 Ethernet 10GbE 4P 563SFP+ Adapter + 1137 0000 Ethernet Converged NIC X710-DA + 1137 013b Ethernet Converged NIC X710-DA4 + 1137 020a Ethernet Converged NIC X710-DA2 + 1590 0000 Ethernet Controller X710 for 10GbE SFP+ 1590 0225 Ethernet 10GbE 4P 563SFP+ Adapter + 1590 022f Ethernet 10Gb 2-port 564i Communication Board 17aa 0000 ThinkServer X710 AnyFabric for 10GbE SFP+ 17aa 4001 ThinkServer X710-4 AnyFabric for 10GbE SFP+ 17aa 4002 ThinkServer X710-2 AnyFabric for 10GbE SFP+ @@ -22775,7 +22872,7 @@ 8086 000b Ethernet Server Adapter X710-DA2 for OCP 8086 000d Ethernet Controller X710 for 10GbE SFP+ 8086 0010 Ethernet Converged Network Adapter X710 - 8086 4005 Ethernet Controller XL710 for 10 Gigabit SFP+ + 8086 4005 Ethernet Controller X710 for 10GbE SFP+ 8086 4006 Ethernet Controller X710 for 10GbE SFP+ 1575 DSL6340 Thunderbolt 3 NHI [Alpine Ridge 2C 2015] 1576 DSL6340 Thunderbolt 3 Bridge [Alpine Ridge 2C 2015] @@ -22847,12 +22944,14 @@ 15a4 Ethernet Switch FM10000 Host Interface 15a5 Ethernet Switch FM10000 Host Virtual Interface 15a8 Ethernet Connection X552 Virtual Function + 15a9 X552 Virtual Function 15aa Ethernet Connection X552 10 GbE Backplane 1059 0120 T4008 10GbE interface 15ab Ethernet Connection X552 10 GbE Backplane 15ac Ethernet Connection X552 10 GbE SFP+ 15ad Ethernet Connection X552/X557-AT 10GBASE-T 15ae Ethernet Connection X552 1000BASE-T + 15b4 X553 Virtual Function 15b5 DSL6340 USB 3.1 Controller [Alpine Ridge] 15b6 DSL6540 USB 3.1 Controller [Alpine Ridge] 15b7 Ethernet Connection (2) I219-LM @@ -22860,6 +22959,7 @@ 15b9 Ethernet Connection (3) I219-LM 15bf JHL6240 Thunderbolt 3 NHI (Low Power) [Alpine Ridge LP 2016] 15c0 JHL6240 Thunderbolt 3 Bridge (Low Power) [Alpine Ridge LP 2016] + 15c5 X553 Virtual Function 15d0 Ethernet SDI Adapter FM10420-100GbE-QDA2 15d1 Ethernet Controller 10G X550T 8086 0002 Ethernet Converged Network Adapter X550-T1 @@ -22974,7 +23074,30 @@ e4bf 3100 CX1-BAND 1962 80960RM (i960RM) Microprocessor 105a 0000 SuperTrak SX6000 I2O CPU + 19ac DNV SMBus Contoller - Host + 19b0 DNV SATA Controller 0 + 19b1 DNV SATA Controller 0 + 19b2 DNV SATA Controller 0 + 19b3 DNV SATA Controller 0 + 19b4 DNV SATA Controller 0 + 19b5 DNV SATA Controller 0 + 19b6 DNV SATA Controller 0 + 19b7 DNV SATA Controller 0 + 19be DNV SATA Controller 0 + 19bf DNV SATA Controller 0 + 19c0 DNV SATA Controller 1 + 19c1 DNV SATA Controller 1 + 19c2 DNV SATA Controller 1 + 19c3 DNV SATA Controller 1 + 19c4 DNV SATA Controller 1 + 19c5 DNV SATA Controller 1 + 19c6 DNV SATA Controller 1 + 19c7 DNV SATA Controller 1 + 19ce DNV SATA Controller 1 + 19cf DNV SATA Controller 1 + 19dc DNV LPC or eSPI 19df DNV SMBus controller + 19e0 DNV SPI Controller 1a21 82840 840 [Carmel] Chipset Host Bridge (Hub A) 1a23 82840 840 [Carmel] Chipset AGP Bridge 1a24 82840 840 [Carmel] Chipset PCI Bridge (Hub B) @@ -25845,6 +25968,9 @@ 2f09 Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 2f0a Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 2f0b Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 + 2f0d Haswell Xeon Non-Transparent Bridge (Back-to-back) + 2f0e Haswell Xeon Non-Transparent Bridge (Primary Side) + 2f0f Haswell Xeon Non-Transparent Bridge (Secondary Side) 2f10 Xeon E7 v3/Xeon E5 v3/Core i7 IIO Debug 2f11 Xeon E7 v3/Xeon E5 v3/Core i7 IIO Debug 2f12 Xeon E7 v3/Xeon E5 v3/Core i7 IIO Debug @@ -26272,19 +26398,22 @@ 17aa 4023 Intel Ethernet Connection X722 for 10GbE backplane 37cf Ethernet Connection X722 for 10GbE QSFP+ 37d0 Ethernet Connection X722 for 10GbE SFP+ + 17aa 4020 Intel Ethernet Connection X722 for 10G SFP+ + 17aa 4021 Intel Ethernet Connection X722 for 10G SFP+ + 17aa 4022 Ethernet Connection X722 for 10GbE SFP+ 37d1 Ethernet Connection X722 for 1GbE + 1590 0216 Ethernet 1Gb 2-port 368i Adapter + 1590 0217 Ethernet 1Gb 2-port 368FLR-MMT Adapter 17aa 4020 Intel Ethernet Connection X722 for 1GbE 17aa 4021 Intel Ethernet Connection X722 for 1GbE 17aa 4022 Intel Ethernet Connection X722 for 1GbE - 8086 4020 Ethernet Connection X722 for 1GbE - 8086 4021 Ethernet Connection X722 for 1GbE - 8086 4022 Ethernet Connection X722 for 1GbE 37d2 Ethernet Connection X722 for 10GBASE-T + 1590 0218 Ethernet 10Gb 2-port 568FLR-MMT Adapter 17aa 4020 Intel Ethernet Connection X722 for 10GBASE 17aa 4021 Intel Ethernet Connection X722 for 10GBASE - 8086 4020 Ethernet Connection X722 for 10GBASE - 8086 4021 Ethernet Connection X722 for 10GBASE + 17aa 4022 Ethernet Connection X722 for 10GBASE-T 37d3 Ethernet Connection X722 for 10GbE SFP+ + 1590 0219 Ethernet 10Gb 2-port 568FLR-MMSFP+ Adapter 37d4 Ethernet Connection X722 for 10GbE QSFP+ 37d9 X722 Hyper-V Virtual Function 3a00 82801JD/DO (ICH10 Family) 4-port SATA IDE Controller @@ -27641,6 +27770,7 @@ a16a Sunrise Point-H PCI Root Port #20 a170 Sunrise Point-H HD Audio a182 Lewisburg SATA Controller [AHCI mode] + a186 Lewisburg SATA Controller [RAID mode] a190 Lewisburg PCI Express Root Port #1 a191 Lewisburg PCI Express Root Port #2 a192 Lewisburg PCI Express Root Port #3 @@ -27676,6 +27806,7 @@ a1c6 Lewisburg LPC Controller a1c7 Lewisburg LPC Controller a1d2 Lewisburg SSATA Controller [AHCI mode] + a1d6 Lewisburg SSATA Controller [RAID mode] a1e7 Lewisburg PCI Express Root Port #17 a1e8 Lewisburg PCI Express Root Port #18 a1e9 Lewisburg PCI Express Root Port #19 @@ -27687,6 +27818,14 @@ a1fa Lewisburg IE: IDE-r a1fb Lewisburg IE: KT Controller a1fc Lewisburg IE: HECI #3 + a202 Lewisburg SATA Controller [AHCI mode] + a206 Lewisburg SATA Controller [RAID mode] + a223 Lewisburg SMBus + a224 Lewisburg SPI Controller + a242 Lewisburg LPC or eSPI Controller + a243 Lewisburg LPC or eSPI Controller + a252 Lewisburg SSATA Controller [AHCI mode] + a256 Lewisburg SSATA Controller [RAID mode] a620 6400/6402 Advanced Memory Buffer (AMB) abc0 Omni-Path Fabric Switch Silicon 100 Series b152 21152 PCI-to-PCI Bridge From owner-svn-src-stable-10@freebsd.org Mon Dec 12 07:01:07 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 533B7C735EC; Mon, 12 Dec 2016 07:01:07 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 221D115B8; Mon, 12 Dec 2016 07:01:07 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC716c6083851; Mon, 12 Dec 2016 07:01:06 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC716xe083849; Mon, 12 Dec 2016 07:01:06 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201612120701.uBC716xe083849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 12 Dec 2016 07:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309879 - in stable/10/contrib/groff: contrib/mm src/utils/afmtodit X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 07:01:07 -0000 Author: bapt Date: Mon Dec 12 07:01:05 2016 New Revision: 309879 URL: https://svnweb.freebsd.org/changeset/base/309879 Log: MFC r309796: Perl is not available in base fix scripts depending on it to use the version from ports PR: 215159 Reported by: Anatoly Kamchatnov Modified: stable/10/contrib/groff/contrib/mm/mmroff.pl stable/10/contrib/groff/src/utils/afmtodit/afmtodit.pl Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/groff/contrib/mm/mmroff.pl ============================================================================== --- stable/10/contrib/groff/contrib/mm/mmroff.pl Mon Dec 12 07:00:14 2016 (r309878) +++ stable/10/contrib/groff/contrib/mm/mmroff.pl Mon Dec 12 07:01:05 2016 (r309879) @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#! /usr/bin/env perl use strict; # runs groff in safe mode, that seems to be the default Modified: stable/10/contrib/groff/src/utils/afmtodit/afmtodit.pl ============================================================================== --- stable/10/contrib/groff/src/utils/afmtodit/afmtodit.pl Mon Dec 12 07:00:14 2016 (r309878) +++ stable/10/contrib/groff/src/utils/afmtodit/afmtodit.pl Mon Dec 12 07:01:05 2016 (r309879) @@ -1,4 +1,4 @@ -#! /usr/bin/perl -w +#! /usr/bin/env perl -w # -*- Perl -*- # Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. From owner-svn-src-stable-10@freebsd.org Mon Dec 12 07:03:11 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBD53C737DC; Mon, 12 Dec 2016 07:03:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B84D41966; Mon, 12 Dec 2016 07:03:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC73ATT086840; Mon, 12 Dec 2016 07:03:10 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC73A3R086839; Mon, 12 Dec 2016 07:03:10 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201612120703.uBC73A3R086839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 12 Dec 2016 07:03:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309881 - stable/10/usr.sbin/pw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 07:03:12 -0000 Author: bapt Date: Mon Dec 12 07:03:10 2016 New Revision: 309881 URL: https://svnweb.freebsd.org/changeset/base/309881 Log: MFC r309803: Fix pw groupshow PR: 204676 Submitted by: longwitz@incore.de Modified: stable/10/usr.sbin/pw/pw_group.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pw/pw_group.c ============================================================================== --- stable/10/usr.sbin/pw/pw_group.c Mon Dec 12 07:02:53 2016 (r309880) +++ stable/10/usr.sbin/pw/pw_group.c Mon Dec 12 07:03:10 2016 (r309881) @@ -282,7 +282,7 @@ int pw_group_show(int argc, char **argv, char *arg1) { struct group *grp = NULL; - char *name; + char *name = NULL; intmax_t id = -1; int ch; bool all, force, quiet, pretty; From owner-svn-src-stable-10@freebsd.org Mon Dec 12 11:04:23 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D27DDC71F05; Mon, 12 Dec 2016 11:04:23 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0E3716DB; Mon, 12 Dec 2016 11:04:23 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBCB4MjR083603; Mon, 12 Dec 2016 11:04:22 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBCB4MOS083602; Mon, 12 Dec 2016 11:04:22 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201612121104.uBCB4MOS083602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 12 Dec 2016 11:04:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309885 - stable/10/tools/tools/nanobsd/Files/root X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 11:04:23 -0000 Author: brueffer Date: Mon Dec 12 11:04:22 2016 New Revision: 309885 URL: https://svnweb.freebsd.org/changeset/base/309885 Log: MFC: r309060 Fix comment typo. PR: 208484 Submitted by: madpilot Modified: stable/10/tools/tools/nanobsd/Files/root/save_cfg Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/nanobsd/Files/root/save_cfg ============================================================================== --- stable/10/tools/tools/nanobsd/Files/root/save_cfg Mon Dec 12 11:02:55 2016 (r309884) +++ stable/10/tools/tools/nanobsd/Files/root/save_cfg Mon Dec 12 11:04:22 2016 (r309885) @@ -66,7 +66,7 @@ do # i) -> add file to ignore list (/cfg/.ignore hiereachy) and never save # try to add this file to /cfg. # - # touch is ised to add files to /cfg to keep the script flow straight and easy + # touch is used to add files to /cfg to keep the script flow straight and easy # read -p "New file /etc/$filename found. Add to /cfg (y/n/i)? " key case "$key" in From owner-svn-src-stable-10@freebsd.org Mon Dec 12 17:58:44 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A4459C741E1; Mon, 12 Dec 2016 17:58:44 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 735D3E3C; Mon, 12 Dec 2016 17:58:44 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBCHwhg2052729; Mon, 12 Dec 2016 17:58:43 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBCHwhJ9052728; Mon, 12 Dec 2016 17:58:43 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201612121758.uBCHwhJ9052728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 12 Dec 2016 17:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309900 - stable/10/usr.sbin/bsdconfig/share X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 17:58:44 -0000 Author: dteske Date: Mon Dec 12 17:58:43 2016 New Revision: 309900 URL: https://svnweb.freebsd.org/changeset/base/309900 Log: MFC r307402: Guard against bad service name argument(s) to load_rc_config() Modified: stable/10/usr.sbin/bsdconfig/share/sysrc.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/share/sysrc.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/sysrc.subr Mon Dec 12 17:56:56 2016 (r309899) +++ stable/10/usr.sbin/bsdconfig/share/sysrc.subr Mon Dec 12 17:58:43 2016 (r309900) @@ -256,7 +256,9 @@ f_sysrc_service_configs() last_name= print_name() { local name="$1" - [ "$name" = "$last_name" ] && return + case "$name" in + ""|.|..|*/*|"$last_name") return ;; + esac echo "$name" >&9 last_name="$name" } From owner-svn-src-stable-10@freebsd.org Mon Dec 12 21:54:50 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F362C7498F; Mon, 12 Dec 2016 21:54:50 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 294EA6A2; Mon, 12 Dec 2016 21:54:50 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBCLsnnB053740; Mon, 12 Dec 2016 21:54:49 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBCLsnGM053739; Mon, 12 Dec 2016 21:54:49 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201612122154.uBCLsnGM053739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Mon, 12 Dec 2016 21:54:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309956 - stable/10/sbin/camcontrol X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 21:54:50 -0000 Author: ken Date: Mon Dec 12 21:54:49 2016 New Revision: 309956 URL: https://svnweb.freebsd.org/changeset/base/309956 Log: MFC r307684, r307747 ------------------------------------------------------------------------ r307684 | ken | 2016-10-20 13:42:26 -0600 (Thu, 20 Oct 2016) | 13 lines For CCBs allocated on the stack, we need to clear the entire CCB, not just the header. Otherwise stack garbage can lead to random flags getting set. This showed up as 'camcontrol rescan all' failing with EINVAL because the address type wasn't CAM_DATA_VADDR. sbin/camcontrol/camcontrol.c: In rescan_or_reset_bus(), bzero the stack-allocated CCBs before use instead of clearing the body. Sponsored by: Spectra Logic ------------------------------------------------------------------------ r307747 | ken | 2016-10-21 12:54:56 -0600 (Fri, 21 Oct 2016) | 27 lines Fix a problem in camcontrol(8) that cropped up with r307684. In r307684, I changed rescan_or_reset_bus() to bzero stack-allocated CCBs before sending them to the kernel because there was stack garbage in there that wound up meaning that bogus CCB flags were set. While this fixed the 'camcontrol rescan all' case (XPT_DEV_MATCH CCBs were failing previously), it broke the 'camcontrol rescan 0' (or any other number) case when INVARIANTS are turned on. Rescanning a single bus reliably produced an assert in cam_periph_runccb(): panic: cam_periph_runccb: ccb=0xfffff80044ffe000, func_code=0x708, flags=0xffffdde0 The flags values don't make sense from the code. Changing the CCBs in rescan_or_reset_bus() from stack to heap allocated avoids the problem. It would be better to understand why userland stack allocated CCBs don't work properly, since there may be other code that breaks if stack allocated CCBs don't work. sbin/camcontrol/camcontrol.c: In rescan_or_reset_bus(), allocate the CCBs using malloc(3) instead of on the stack to avoid an assertion in cam_periph_runccb(). Sponsored by: Spectra Logic ------------------------------------------------------------------------ Sponsored by: Spectra Logic Modified: stable/10/sbin/camcontrol/camcontrol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.c Mon Dec 12 21:49:29 2016 (r309955) +++ stable/10/sbin/camcontrol/camcontrol.c Mon Dec 12 21:54:49 2016 (r309956) @@ -3124,8 +3124,8 @@ dorescan_or_reset(int argc, char **argv, static int rescan_or_reset_bus(path_id_t bus, int rescan) { - union ccb ccb, matchccb; - int fd, retval; + union ccb *ccb = NULL, *matchccb = NULL; + int fd = -1, retval; int bufsize; retval = 0; @@ -3136,35 +3136,41 @@ rescan_or_reset_bus(path_id_t bus, int r return(1); } + ccb = malloc(sizeof(*ccb)); + if (ccb == NULL) { + warn("failed to allocate CCB"); + retval = 1; + goto bailout; + } + bzero(ccb, sizeof(*ccb)); + if (bus != CAM_BUS_WILDCARD) { - ccb.ccb_h.func_code = rescan ? XPT_SCAN_BUS : XPT_RESET_BUS; - ccb.ccb_h.path_id = bus; - ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; - ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; - ccb.crcn.flags = CAM_FLAG_NONE; + ccb->ccb_h.func_code = rescan ? XPT_SCAN_BUS : XPT_RESET_BUS; + ccb->ccb_h.path_id = bus; + ccb->ccb_h.target_id = CAM_TARGET_WILDCARD; + ccb->ccb_h.target_lun = CAM_LUN_WILDCARD; + ccb->crcn.flags = CAM_FLAG_NONE; /* run this at a low priority */ - ccb.ccb_h.pinfo.priority = 5; + ccb->ccb_h.pinfo.priority = 5; - if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { + if (ioctl(fd, CAMIOCOMMAND, ccb) == -1) { warn("CAMIOCOMMAND ioctl failed"); - close(fd); - return(1); + retval = 1; + goto bailout; } - if ((ccb.ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { + if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { fprintf(stdout, "%s of bus %d was successful\n", rescan ? "Re-scan" : "Reset", bus); } else { fprintf(stdout, "%s of bus %d returned error %#x\n", rescan ? "Re-scan" : "Reset", bus, - ccb.ccb_h.status & CAM_STATUS_MASK); + ccb->ccb_h.status & CAM_STATUS_MASK); retval = 1; } - close(fd); - return(retval); - + goto bailout; } @@ -3178,58 +3184,64 @@ rescan_or_reset_bus(path_id_t bus, int r * no-op, sending a rescan to the xpt bus would result in a status of * CAM_REQ_INVALID. */ - CCB_CLEAR_ALL_EXCEPT_HDR(&matchccb.cdm); - matchccb.ccb_h.func_code = XPT_DEV_MATCH; - matchccb.ccb_h.path_id = CAM_BUS_WILDCARD; + matchccb = malloc(sizeof(*matchccb)); + if (matchccb == NULL) { + warn("failed to allocate CCB"); + retval = 1; + goto bailout; + } + bzero(matchccb, sizeof(*matchccb)); + matchccb->ccb_h.func_code = XPT_DEV_MATCH; + matchccb->ccb_h.path_id = CAM_BUS_WILDCARD; bufsize = sizeof(struct dev_match_result) * 20; - matchccb.cdm.match_buf_len = bufsize; - matchccb.cdm.matches=(struct dev_match_result *)malloc(bufsize); - if (matchccb.cdm.matches == NULL) { + matchccb->cdm.match_buf_len = bufsize; + matchccb->cdm.matches=(struct dev_match_result *)malloc(bufsize); + if (matchccb->cdm.matches == NULL) { warnx("can't malloc memory for matches"); retval = 1; goto bailout; } - matchccb.cdm.num_matches = 0; + matchccb->cdm.num_matches = 0; - matchccb.cdm.num_patterns = 1; - matchccb.cdm.pattern_buf_len = sizeof(struct dev_match_pattern); + matchccb->cdm.num_patterns = 1; + matchccb->cdm.pattern_buf_len = sizeof(struct dev_match_pattern); - matchccb.cdm.patterns = (struct dev_match_pattern *)malloc( - matchccb.cdm.pattern_buf_len); - if (matchccb.cdm.patterns == NULL) { + matchccb->cdm.patterns = (struct dev_match_pattern *)malloc( + matchccb->cdm.pattern_buf_len); + if (matchccb->cdm.patterns == NULL) { warnx("can't malloc memory for patterns"); retval = 1; goto bailout; } - matchccb.cdm.patterns[0].type = DEV_MATCH_BUS; - matchccb.cdm.patterns[0].pattern.bus_pattern.flags = BUS_MATCH_ANY; + matchccb->cdm.patterns[0].type = DEV_MATCH_BUS; + matchccb->cdm.patterns[0].pattern.bus_pattern.flags = BUS_MATCH_ANY; do { unsigned int i; - if (ioctl(fd, CAMIOCOMMAND, &matchccb) == -1) { + if (ioctl(fd, CAMIOCOMMAND, matchccb) == -1) { warn("CAMIOCOMMAND ioctl failed"); retval = 1; goto bailout; } - if ((matchccb.ccb_h.status != CAM_REQ_CMP) - || ((matchccb.cdm.status != CAM_DEV_MATCH_LAST) - && (matchccb.cdm.status != CAM_DEV_MATCH_MORE))) { + if ((matchccb->ccb_h.status != CAM_REQ_CMP) + || ((matchccb->cdm.status != CAM_DEV_MATCH_LAST) + && (matchccb->cdm.status != CAM_DEV_MATCH_MORE))) { warnx("got CAM error %#x, CDM error %d\n", - matchccb.ccb_h.status, matchccb.cdm.status); + matchccb->ccb_h.status, matchccb->cdm.status); retval = 1; goto bailout; } - for (i = 0; i < matchccb.cdm.num_matches; i++) { + for (i = 0; i < matchccb->cdm.num_matches; i++) { struct bus_match_result *bus_result; /* This shouldn't happen. */ - if (matchccb.cdm.matches[i].type != DEV_MATCH_BUS) + if (matchccb->cdm.matches[i].type != DEV_MATCH_BUS) continue; - bus_result = &matchccb.cdm.matches[i].result.bus_result; + bus_result =&matchccb->cdm.matches[i].result.bus_result; /* * We don't want to rescan or reset the xpt bus. @@ -3238,23 +3250,23 @@ rescan_or_reset_bus(path_id_t bus, int r if (bus_result->path_id == CAM_XPT_PATH_ID) continue; - ccb.ccb_h.func_code = rescan ? XPT_SCAN_BUS : + ccb->ccb_h.func_code = rescan ? XPT_SCAN_BUS : XPT_RESET_BUS; - ccb.ccb_h.path_id = bus_result->path_id; - ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; - ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; - ccb.crcn.flags = CAM_FLAG_NONE; + ccb->ccb_h.path_id = bus_result->path_id; + ccb->ccb_h.target_id = CAM_TARGET_WILDCARD; + ccb->ccb_h.target_lun = CAM_LUN_WILDCARD; + ccb->crcn.flags = CAM_FLAG_NONE; /* run this at a low priority */ - ccb.ccb_h.pinfo.priority = 5; + ccb->ccb_h.pinfo.priority = 5; - if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { + if (ioctl(fd, CAMIOCOMMAND, ccb) == -1) { warn("CAMIOCOMMAND ioctl failed"); retval = 1; goto bailout; } - if ((ccb.ccb_h.status & CAM_STATUS_MASK) ==CAM_REQ_CMP){ + if ((ccb->ccb_h.status & CAM_STATUS_MASK)==CAM_REQ_CMP){ fprintf(stdout, "%s of bus %d was successful\n", rescan? "Re-scan" : "Reset", bus_result->path_id); @@ -3267,22 +3279,24 @@ rescan_or_reset_bus(path_id_t bus, int r fprintf(stderr, "%s of bus %d returned error " "%#x\n", rescan? "Re-scan" : "Reset", bus_result->path_id, - ccb.ccb_h.status & CAM_STATUS_MASK); + ccb->ccb_h.status & CAM_STATUS_MASK); retval = 1; } } - } while ((matchccb.ccb_h.status == CAM_REQ_CMP) - && (matchccb.cdm.status == CAM_DEV_MATCH_MORE)); + } while ((matchccb->ccb_h.status == CAM_REQ_CMP) + && (matchccb->cdm.status == CAM_DEV_MATCH_MORE)); bailout: if (fd != -1) close(fd); - if (matchccb.cdm.patterns != NULL) - free(matchccb.cdm.patterns); - if (matchccb.cdm.matches != NULL) - free(matchccb.cdm.matches); + if (matchccb != NULL) { + free(matchccb->cdm.patterns); + free(matchccb->cdm.matches); + free(matchccb); + } + free(ccb); return(retval); } From owner-svn-src-stable-10@freebsd.org Tue Dec 13 23:10:37 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DD81C768A3; Tue, 13 Dec 2016 23:10:37 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCC17CBE; Tue, 13 Dec 2016 23:10:36 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBDNAarc076655; Tue, 13 Dec 2016 23:10:36 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBDNAZVL076653; Tue, 13 Dec 2016 23:10:35 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201612132310.uBDNAZVL076653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 13 Dec 2016 23:10:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310041 - stable/10/usr.bin/locale X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 23:10:37 -0000 Author: vangyzen Date: Tue Dec 13 23:10:35 2016 New Revision: 310041 URL: https://svnweb.freebsd.org/changeset/base/310041 Log: MFC r309364 r309367 r309624 locale: fix buffer management Also, handle signed and unsigned chars, and more gracefully handle invalid input. locale: enable more warnings; fix them Do not set WARNS, so it gets the current default of 6. Fix the warnings by sprinkling static, const, or strdup. Make some constant data tables const. Fix whitespace. Sponsored by: Dell EMC Modified: stable/10/usr.bin/locale/Makefile stable/10/usr.bin/locale/locale.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/locale/Makefile ============================================================================== --- stable/10/usr.bin/locale/Makefile Tue Dec 13 23:09:22 2016 (r310040) +++ stable/10/usr.bin/locale/Makefile Tue Dec 13 23:10:35 2016 (r310041) @@ -1,7 +1,6 @@ # $FreeBSD$ PROG= locale -WARNS?= 3 CFLAGS+= -I${.CURDIR}/../../lib/libc/locale .include Modified: stable/10/usr.bin/locale/locale.c ============================================================================== --- stable/10/usr.bin/locale/locale.c Tue Dec 13 23:09:22 2016 (r310040) +++ stable/10/usr.bin/locale/locale.c Tue Dec 13 23:10:35 2016 (r310041) @@ -55,8 +55,8 @@ void list_charmaps(void); void list_locales(void); const char *lookup_localecat(int); char *kwval_lconv(int); -int kwval_lookup(char *, char **, int *, int *); -void showdetails(char *); +int kwval_lookup(const char *, char **, int *, int *); +void showdetails(const char *); void showkeywordslist(char *substring); void showlocale(void); void usage(void); @@ -64,13 +64,12 @@ void usage(void); /* Global variables */ static StringList *locales = NULL; -int all_locales = 0; -int all_charmaps = 0; -int prt_categories = 0; -int prt_keywords = 0; -int more_params = 0; +static int all_locales = 0; +static int all_charmaps = 0; +static int prt_categories = 0; +static int prt_keywords = 0; -struct _lcinfo { +static const struct _lcinfo { const char *name; int id; } lcinfo [] = { @@ -108,7 +107,7 @@ struct _lcinfo { #define KW_INT_P_SIGN_POSN (KW_ZERO+21) #define KW_INT_N_SIGN_POSN (KW_ZERO+22) -struct _kwinfo { +static const struct _kwinfo { const char *name; int isstr; /* true - string, false - number */ int catid; /* LC_* */ @@ -222,7 +221,7 @@ struct _kwinfo { }; #define NKWINFO (sizeof(kwinfo)/sizeof(kwinfo[0])) -const char *boguslocales[] = { "UTF-8" }; +static const char *boguslocales[] = { "UTF-8" }; #define NBOGUS (sizeof(boguslocales)/sizeof(boguslocales[0])) int @@ -294,7 +293,7 @@ main(int argc, char *argv[]) } else { uint i; for (i = 0; i < sizeof (kwinfo) / sizeof (struct _kwinfo); i++) - showdetails ((char *)kwinfo [i].name); + showdetails(kwinfo[i].name); } exit(0); } @@ -339,7 +338,7 @@ list_locales(void) static int scmp(const void *s1, const void *s2) { - return strcmp(*(const char **)s1, *(const char **)s2); + return strcmp(*(const char * const *)s1, *(const char * const *)s2); } /* @@ -376,7 +375,7 @@ list_charmaps(void) /* add US-ASCII, if not yet added */ if (sl_find(charmaps, "US-ASCII") == NULL) - sl_add(charmaps, "US-ASCII"); + sl_add(charmaps, strdup("US-ASCII")); /* sort the list */ qsort(charmaps->sl_str, charmaps->sl_cur, sizeof(char *), scmp); @@ -435,10 +434,10 @@ init_locales_list(void) * we also list 'C' for constistency */ if (sl_find(locales, "POSIX") == NULL) - sl_add(locales, "POSIX"); + sl_add(locales, strdup("POSIX")); if (sl_find(locales, "C") == NULL) - sl_add(locales, "C"); + sl_add(locales, strdup("C")); /* make output nicer, sort the list */ qsort(locales->sl_str, locales->sl_cur, sizeof(char *), scmp); @@ -493,29 +492,31 @@ format_grouping(const char *binary) { static char rval[64]; const char *cp; - size_t len; + size_t roff; + int len; rval[0] = '\0'; + roff = 0; for (cp = binary; *cp != '\0'; ++cp) { - char group[sizeof("127;")]; - snprintf(group, sizeof(group), "%hhd;", *cp); - len = strlcat(rval, group, sizeof(rval)); - if (len >= sizeof(rval)) { - len = sizeof(rval) - 1; - break; - } - if (*cp == CHAR_MAX) { - break; - } - } - - /* Remove the trailing ';'. */ - rval[len - 1] = '\0'; +#if CHAR_MIN != 0 + if (*cp < 0) + break; /* garbage input */ +#endif + len = snprintf(&rval[roff], sizeof(rval) - roff, "%u;", *cp); + if (len < 0 || (unsigned)len >= sizeof(rval) - roff) + break; /* insufficient space for output */ + roff += len; + if (*cp == CHAR_MAX) + break; /* special termination */ + } + + /* Truncate at the last successfully snprintf()ed semicolon. */ + if (roff != 0) + rval[roff - 1] = '\0'; - return (rval); + return (&rval[0]); } - /* * keyword value lookup helper (via localeconv()) */ @@ -604,7 +605,7 @@ kwval_lconv(int id) * keyword value and properties lookup */ int -kwval_lookup(char *kwname, char **kwval, int *cat, int *isstr) +kwval_lookup(const char *kwname, char **kwval, int *cat, int *isstr) { int rval; size_t i; @@ -632,7 +633,7 @@ kwval_lookup(char *kwname, char **kwval, * command line options specified. */ void -showdetails(char *kw) +showdetails(const char *kw) { int isstr, cat, tmpval; char *kwval; @@ -647,9 +648,9 @@ showdetails(char *kw) } if (prt_categories) { - if (prt_keywords) + if (prt_keywords) printf("%-20s ", lookup_localecat(cat)); - else + else printf("%-20s\t%s\n", kw, lookup_localecat(cat)); } From owner-svn-src-stable-10@freebsd.org Tue Dec 13 23:13:05 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 387EDC76B2E; Tue, 13 Dec 2016 23:13:05 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF4561125; Tue, 13 Dec 2016 23:13:04 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBDND4DD080661; Tue, 13 Dec 2016 23:13:04 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBDND41D080660; Tue, 13 Dec 2016 23:13:04 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201612132313.uBDND41D080660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 13 Dec 2016 23:13:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310043 - stable/10/sbin/rcorder X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 23:13:05 -0000 Author: vangyzen Date: Tue Dec 13 23:13:03 2016 New Revision: 310043 URL: https://svnweb.freebsd.org/changeset/base/310043 Log: MFC r309625 This is imported from NetBSD. The author--Joerg Sonnenberger--agreed to apply a two-clause BSD license, just so the license was clear. This source tree location matches NetBSD, and is the first place someone might look for such a tool. Obtained from: Joerg Sonnenberger via NetBSD Sponsored by: Dell EMC Added: stable/10/sbin/rcorder/rcorder-visualize.sh - copied unchanged from r309625, head/sbin/rcorder/rcorder-visualize.sh Modified: Directory Properties: stable/10/ (props changed) Copied: stable/10/sbin/rcorder/rcorder-visualize.sh (from r309625, head/sbin/rcorder/rcorder-visualize.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sbin/rcorder/rcorder-visualize.sh Tue Dec 13 23:13:03 2016 (r310043, copy of r309625, head/sbin/rcorder/rcorder-visualize.sh) @@ -0,0 +1,52 @@ +#!/bin/sh +# $NetBSD: rcorder-visualize.sh,v 1.5 2009/08/09 17:08:53 apb Exp $ +# +# Copyright (c) 2009 by Joerg Sonnenberger +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# $FreeBSD$ +# +# Simple script to show the dependency graph for rc scripts. +# Output is in the dot(1) language and can be rendered using +# sh rcorder-visualize | dot -T svg -o rcorder.svg +# dot(1) can be found in graphics/graphviz in pkgsrc. + +rc_files=${*:-/etc/rc.d/*} + +{ +echo ' digraph {' +for f in $rc_files; do +< $f awk ' +/# PROVIDE: / { provide = $3 } +/# REQUIRE: / { for (i = 3; i <= NF; i++) requires[$i] = $i } +/# BEFORE: / { for (i = 3; i <= NF; i++) befores[$i] = $i } + +END { + print " \"" provide "\";" + for (x in requires) print " \"" provide "\"->\"" x "\";" + for (x in befores) print " \"" x "\"->\"" provide "\";" +} +' +done +echo '}' +} From owner-svn-src-stable-10@freebsd.org Wed Dec 14 14:23:26 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8775BC775D7; Wed, 14 Dec 2016 14:23:26 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62268F8E; Wed, 14 Dec 2016 14:23:26 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEENPGA049049; Wed, 14 Dec 2016 14:23:25 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEENP9j049046; Wed, 14 Dec 2016 14:23:25 GMT (envelope-from des@FreeBSD.org) Message-Id: <201612141423.uBEENP9j049046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Wed, 14 Dec 2016 14:23:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310060 - stable/10/lib/libfetch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 14:23:26 -0000 Author: des Date: Wed Dec 14 14:23:25 2016 New Revision: 310060 URL: https://svnweb.freebsd.org/changeset/base/310060 Log: MFH (r308996, r309051, r309738): refactor, avoid repeating DNS requests Modified: stable/10/lib/libfetch/common.c stable/10/lib/libfetch/common.h stable/10/lib/libfetch/ftp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libfetch/common.c ============================================================================== --- stable/10/lib/libfetch/common.c Wed Dec 14 14:20:32 2016 (r310059) +++ stable/10/lib/libfetch/common.c Wed Dec 14 14:23:25 2016 (r310060) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998-2014 Dag-Erling Smørgrav + * Copyright (c) 1998-2016 Dag-Erling Smørgrav * Copyright (c) 2013 Michael Gmelin * All rights reserved. * @@ -241,27 +241,79 @@ fetch_ref(conn_t *conn) /* + * Resolve an address + */ +struct addrinfo * +fetch_resolve(const char *addr, int port, int af) +{ + char hbuf[256], sbuf[8]; + struct addrinfo hints, *res; + const char *sep, *host, *service; + int err, len; + + /* split address if necessary */ + err = EAI_SYSTEM; + if ((sep = strchr(addr, ':')) != NULL) { + len = snprintf(hbuf, sizeof(hbuf), + "%.*s", (int)(sep - addr), addr); + if (len < 0) + return (NULL); + if (len >= (int)sizeof(hbuf)) { + errno = ENAMETOOLONG; + fetch_syserr(); + return (NULL); + } + host = hbuf; + service = sep + 1; + } else if (port != 0) { + if (port < 1 || port > 65535) { + errno = EINVAL; + fetch_syserr(); + return (NULL); + } + if (snprintf(sbuf, sizeof(sbuf), "%d", port) < 0) { + fetch_syserr(); + return (NULL); + } + host = addr; + service = sbuf; + } else { + host = addr; + service = NULL; + } + + /* resolve */ + memset(&hints, 0, sizeof(hints)); + hints.ai_family = af; + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_ADDRCONFIG; + if ((err = getaddrinfo(host, service, &hints, &res)) != 0) { + netdb_seterr(err); + return (NULL); + } + return (res); +} + + + +/* * Bind a socket to a specific local address */ int fetch_bind(int sd, int af, const char *addr) { - struct addrinfo hints, *res, *res0; + struct addrinfo *cliai, *ai; int err; - memset(&hints, 0, sizeof(hints)); - hints.ai_family = af; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = 0; - if ((err = getaddrinfo(addr, NULL, &hints, &res0)) != 0) + if ((cliai = fetch_resolve(addr, 0, af)) == NULL) return (-1); - for (res = res0; res; res = res->ai_next) - if (bind(sd, res->ai_addr, res->ai_addrlen) == 0) { - freeaddrinfo(res0); - return (0); - } - freeaddrinfo(res0); - return (-1); + for (ai = cliai; ai != NULL; ai = ai->ai_next) + if ((err = bind(sd, ai->ai_addr, ai->ai_addrlen)) == 0) + break; + if (err != 0) + fetch_syserr(); + freeaddrinfo(cliai); + return (err == 0 ? 0 : -1); } @@ -271,59 +323,76 @@ fetch_bind(int sd, int af, const char *a conn_t * fetch_connect(const char *host, int port, int af, int verbose) { - conn_t *conn; - char pbuf[10]; + struct addrinfo *cais = NULL, *sais = NULL, *cai, *sai; const char *bindaddr; - struct addrinfo hints, *res, *res0; - int sd, err; + conn_t *conn = NULL; + int err = 0, sd = -1; DEBUG(fprintf(stderr, "---> %s:%d\n", host, port)); + /* resolve server address */ if (verbose) - fetch_info("looking up %s", host); + fetch_info("resolving server address: %s:%d", host, port); + if ((sais = fetch_resolve(host, port, af)) == NULL) + goto fail; - /* look up host name and set up socket address structure */ - snprintf(pbuf, sizeof(pbuf), "%d", port); - memset(&hints, 0, sizeof(hints)); - hints.ai_family = af; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = 0; - if ((err = getaddrinfo(host, pbuf, &hints, &res0)) != 0) { - netdb_seterr(err); - return (NULL); - } + /* resolve client address */ bindaddr = getenv("FETCH_BIND_ADDRESS"); + if (bindaddr != NULL && *bindaddr != '\0') { + if (verbose) + fetch_info("resolving client address: %s", bindaddr); + if ((cais = fetch_resolve(bindaddr, 0, af)) == NULL) + goto fail; + } - if (verbose) - fetch_info("connecting to %s:%d", host, port); - - /* try to connect */ - for (sd = -1, res = res0; res; sd = -1, res = res->ai_next) { - if ((sd = socket(res->ai_family, res->ai_socktype, - res->ai_protocol)) == -1) - continue; - if (bindaddr != NULL && *bindaddr != '\0' && - fetch_bind(sd, res->ai_family, bindaddr) != 0) { - fetch_info("failed to bind to '%s'", bindaddr); - close(sd); - continue; + /* try each server address in turn */ + for (err = 0, sai = sais; sai != NULL; sai = sai->ai_next) { + /* open socket */ + if ((sd = socket(sai->ai_family, SOCK_STREAM, 0)) < 0) + goto syserr; + /* attempt to bind to client address */ + for (err = 0, cai = cais; cai != NULL; cai = cai->ai_next) { + if (cai->ai_family != sai->ai_family) + continue; + if ((err = bind(sd, cai->ai_addr, cai->ai_addrlen)) == 0) + break; + } + if (err != 0) { + if (verbose) + fetch_info("failed to bind to %s", bindaddr); + goto syserr; } - if (connect(sd, res->ai_addr, res->ai_addrlen) == 0 && - fcntl(sd, F_SETFL, O_NONBLOCK) == 0) + /* attempt to connect to server address */ + if ((err = connect(sd, sai->ai_addr, sai->ai_addrlen)) == 0) break; + /* clean up before next attempt */ close(sd); + sd = -1; } - freeaddrinfo(res0); - if (sd == -1) { - fetch_syserr(); - return (NULL); + if (err != 0) { + if (verbose) + fetch_info("failed to connect to %s:%s", host, port); + goto syserr; } - if ((conn = fetch_reopen(sd)) == NULL) { - fetch_syserr(); - close(sd); - } + if ((conn = fetch_reopen(sd)) == NULL) + goto syserr; + if (cais != NULL) + freeaddrinfo(cais); + if (sais != NULL) + freeaddrinfo(sais); return (conn); +syserr: + fetch_syserr(); + goto fail; +fail: + if (sd >= 0) + close(sd); + if (cais != NULL) + freeaddrinfo(cais); + if (sais != NULL) + freeaddrinfo(sais); + return (NULL); } #ifdef WITH_SSL Modified: stable/10/lib/libfetch/common.h ============================================================================== --- stable/10/lib/libfetch/common.h Wed Dec 14 14:20:32 2016 (r310059) +++ stable/10/lib/libfetch/common.h Wed Dec 14 14:23:25 2016 (r310060) @@ -76,6 +76,7 @@ void fetch_syserr(void); void fetch_info(const char *, ...); int fetch_default_port(const char *); int fetch_default_proxy_port(const char *); +struct addrinfo *fetch_resolve(const char *, int, int); int fetch_bind(int, int, const char *); conn_t *fetch_connect(const char *, int, int, int); conn_t *fetch_reopen(int); Modified: stable/10/lib/libfetch/ftp.c ============================================================================== --- stable/10/lib/libfetch/ftp.c Wed Dec 14 14:20:32 2016 (r310059) +++ stable/10/lib/libfetch/ftp.c Wed Dec 14 14:23:25 2016 (r310060) @@ -768,8 +768,8 @@ ftp_transfer(conn_t *conn, const char *o fetch_info("opening data connection"); bindaddr = getenv("FETCH_BIND_ADDRESS"); if (bindaddr != NULL && *bindaddr != '\0' && - fetch_bind(sd, sa.ss_family, bindaddr) != 0) - goto sysouch; + (e = fetch_bind(sd, sa.ss_family, bindaddr)) != 0) + goto ouch; if (connect(sd, (struct sockaddr *)&sa, sa.ss_len) == -1) goto sysouch; From owner-svn-src-stable-10@freebsd.org Wed Dec 14 15:38:29 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A128BC80B15; Wed, 14 Dec 2016 15:38:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 654F61E2B; Wed, 14 Dec 2016 15:38:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEFcS89077402; Wed, 14 Dec 2016 15:38:28 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEFcSWl077401; Wed, 14 Dec 2016 15:38:28 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141538.uBEFcSWl077401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 15:38:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310062 - stable/10/sys/dev/smbus X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 15:38:29 -0000 Author: avg Date: Wed Dec 14 15:38:28 2016 New Revision: 310062 URL: https://svnweb.freebsd.org/changeset/base/310062 Log: make smbus_get_addr() an ivar accessor This is a direct commit to this branch. smbus_get_addr() was declared as a funciton prototype, but the function was never defined. read_ivar and write_ivar methods were unused. This was exposed after jedec_ts driver was imported to this branch as that driver turned out to be the first user of smbus_get_addr(). This change is a small subset of a larger change in r281985. Reported by: jhb Pointyhat to: avg Modified: stable/10/sys/dev/smbus/smbconf.h Modified: stable/10/sys/dev/smbus/smbconf.h ============================================================================== --- stable/10/sys/dev/smbus/smbconf.h Wed Dec 14 15:00:24 2016 (r310061) +++ stable/10/sys/dev/smbus/smbconf.h Wed Dec 14 15:38:28 2016 (r310062) @@ -74,7 +74,9 @@ /* * ivars codes */ -#define SMBUS_IVAR_ADDR 0x1 /* slave address of the device */ +enum smbus_ivars { + SMBUS_IVAR_ADDR, /* slave address of the device */ +}; int smbus_request_bus(device_t, device_t, int); int smbus_release_bus(device_t, device_t); @@ -83,7 +85,12 @@ int smbus_error(int error); void smbus_intr(device_t, u_char, char low, char high, int error); -u_char smbus_get_addr(device_t); +#define SMBUS_ACCESSOR(var, ivar, type) \ + __BUS_ACCESSOR(smbus, var, SMBUS, ivar, type) + +SMBUS_ACCESSOR(addr, ADDR, int) + +#undef SMBUS_ACCESSOR extern driver_t smbus_driver; extern devclass_t smbus_devclass; From owner-svn-src-stable-10@freebsd.org Wed Dec 14 15:42:54 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE41FC80DC1; Wed, 14 Dec 2016 15:42:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 626A785D; Wed, 14 Dec 2016 15:42:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA21043; Wed, 14 Dec 2016 17:42:45 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1cHBhd-0002GJ-Aw; Wed, 14 Dec 2016 17:42:45 +0200 Subject: Re: svn commit: r308371 - in stable/10: share/man/man4 sys/conf sys/dev/jedec_ts sys/modules/i2c sys/modules/i2c/jedec_ts To: John Baldwin References: <201611061356.uA6DuYcO079294@repo.freebsd.org> <1625245.4edrXav981@ralph.baldwin.cx> Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-stable-10@FreeBSD.org From: Andriy Gapon Message-ID: <912ba7fd-353c-006e-ef65-faa12b83de9f@FreeBSD.org> Date: Wed, 14 Dec 2016 17:41:47 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1625245.4edrXav981@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 15:42:55 -0000 On 05/12/2016 23:49, John Baldwin wrote: > On Sunday, November 06, 2016 01:56:34 PM Andriy Gapon wrote: >> Author: avg >> Date: Sun Nov 6 13:56:34 2016 >> New Revision: 308371 >> URL: https://svnweb.freebsd.org/changeset/base/308371 >> >> Log: >> MFC r307768: jedec_ts: a driver for thermal sensors on memory modules >> >> Added: >> stable/10/share/man/man4/jedec_ts.4 >> - copied unchanged from r307768, head/share/man/man4/jedec_ts.4 >> stable/10/sys/dev/jedec_ts/ >> - copied from r307768, head/sys/dev/jedec_ts/ >> stable/10/sys/modules/i2c/jedec_ts/ >> - copied from r307768, head/sys/modules/i2c/jedec_ts/ >> Modified: >> stable/10/sys/conf/NOTES >> stable/10/sys/conf/files >> stable/10/sys/modules/i2c/Makefile >> Directory Properties: >> stable/10/ (props changed) > > FYI, this doesn't work and has broken tinderbox builds on stable/10. > smbus_get_addr() doesn't exist on 10. It was originally a hand-rolled > ivar wrapper that was removed in r93023 in 2002. The function prototype > was not removed, so the compile works, but linking fails. The stale > prototype is still present in smbconf.h in HEAD (and should be removed). > The "real" smbus_get_addr() was added back to smbconf.h along with an > implementation of smbus_read_ivar() in r281985. Parts of that commit > probably need to be MFC'd to 10. > John, thank you for catching this and sorry for the trouble. Could you please check if r310062 really fixes the problem? -- Andriy Gapon From owner-svn-src-stable-10@freebsd.org Wed Dec 14 16:03:25 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23BCCC6655C; Wed, 14 Dec 2016 16:03:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E72F313A6; Wed, 14 Dec 2016 16:03:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEG3Ol8089722; Wed, 14 Dec 2016 16:03:24 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEG3Oes089721; Wed, 14 Dec 2016 16:03:24 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141603.uBEG3Oes089721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310063 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:03:25 -0000 Author: avg Date: Wed Dec 14 16:03:23 2016 New Revision: 310063 URL: https://svnweb.freebsd.org/changeset/base/310063 Log: MFC r308480: pmc_process_csw_out: ignore deleted counters Modified: stable/10/sys/dev/hwpmc/hwpmc_mod.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_mod.c Wed Dec 14 15:38:28 2016 (r310062) +++ stable/10/sys/dev/hwpmc/hwpmc_mod.c Wed Dec 14 16:03:23 2016 (r310063) @@ -1432,8 +1432,8 @@ pmc_process_csw_out(struct thread *td) * save the reading. */ - if (pp != NULL && pp->pp_pmcs[ri].pp_pmc != NULL) { - + if (pm->pm_state != PMC_STATE_DELETED && pp != NULL && + pp->pp_pmcs[ri].pp_pmc != NULL) { KASSERT(pm == pp->pp_pmcs[ri].pp_pmc, ("[pmc,%d] pm %p != pp_pmcs[%d] %p", __LINE__, pm, ri, pp->pp_pmcs[ri].pp_pmc)); From owner-svn-src-stable-10@freebsd.org Wed Dec 14 16:08:36 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9617FC667FB; Wed, 14 Dec 2016 16:08:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CEB01B04; Wed, 14 Dec 2016 16:08:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEG8ZjR090816; Wed, 14 Dec 2016 16:08:35 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEG8ZNf090814; Wed, 14 Dec 2016 16:08:35 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141608.uBEG8ZNf090814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:08:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310067 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:08:36 -0000 Author: avg Date: Wed Dec 14 16:08:35 2016 New Revision: 310067 URL: https://svnweb.freebsd.org/changeset/base/310067 Log: MFC r308887,309090: fix unsafe modification of zfs_vnodeops when DIAGNOSTIC is enabled Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Dec 14 16:08:28 2016 (r310066) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Wed Dec 14 16:08:35 2016 (r310067) @@ -6020,26 +6020,17 @@ zfs_lock(ap) int line; } */ *ap; { - zfsvfs_t *zfsvfs; - znode_t *zp; vnode_t *vp; - int flags; + znode_t *zp; int err; - vp = ap->a_vp; - flags = ap->a_flags; - if ((flags & LK_INTERLOCK) == 0 && (flags & LK_NOWAIT) == 0 && - (vp->v_iflag & VI_DOOMED) == 0 && (zp = vp->v_data) != NULL && - (zp->z_pflags & ZFS_XATTR) == 0) { - zfsvfs = zp->z_zfsvfs; - VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock)); - } err = vop_stdlock(ap); - if ((flags & LK_INTERLOCK) != 0 && (flags & LK_NOWAIT) == 0 && - (vp->v_iflag & VI_DOOMED) == 0 && (zp = vp->v_data) != NULL && - (zp->z_pflags & ZFS_XATTR) == 0) { - zfsvfs = zp->z_zfsvfs; - VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock)); + if (err == 0 && (ap->a_flags & LK_NOWAIT) == 0) { + vp = ap->a_vp; + zp = vp->v_data; + if (vp->v_mount != NULL && (vp->v_iflag & VI_DOOMED) == 0 && + zp != NULL && (zp->z_pflags & ZFS_XATTR) == 0) + VERIFY(!RRM_LOCK_HELD(&zp->z_zfsvfs->z_teardown_lock)); } return (err); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Dec 14 16:08:28 2016 (r310066) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Wed Dec 14 16:08:35 2016 (r310067) @@ -727,14 +727,7 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_bu /* * Acquire vnode lock before making it available to the world. */ -#ifdef DIAGNOSTIC - vop_lock1_t *orig_lock = vp->v_op->vop_lock1; - vp->v_op->vop_lock1 = vop_stdlock; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - vp->v_op->vop_lock1 = orig_lock; -#else - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); -#endif VN_LOCK_AREC(vp); if (vp->v_type != VFIFO) VN_LOCK_ASHARE(vp); From owner-svn-src-stable-10@freebsd.org Wed Dec 14 16:11:20 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A0E3C66AC9; Wed, 14 Dec 2016 16:11:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D453113A; Wed, 14 Dec 2016 16:11:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEGBJlU091286; Wed, 14 Dec 2016 16:11:19 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEGBJuu091285; Wed, 14 Dec 2016 16:11:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141611.uBEGBJuu091285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310069 - stable/10/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:11:20 -0000 Author: avg Date: Wed Dec 14 16:11:19 2016 New Revision: 310069 URL: https://svnweb.freebsd.org/changeset/base/310069 Log: MFC r308985: revert r304520, set canmount=on is not supposed to mount the filesystem Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Dec 14 16:10:58 2016 (r310068) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Wed Dec 14 16:11:19 2016 (r310069) @@ -1609,17 +1609,12 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvl assert(cl_idx < nvl_len); /* * We don't want to unmount & remount the dataset when changing - * its canmount property. We only use the changelist logic to - * unmount when setting canmount=off for a mounted filesystem - * or when setting canmount=on for an unmounted filesystem. - * For all other changes to canmount property the filesystem - * remains the same. + * its canmount property to 'on' or 'noauto'. We only use + * the changelist logic to unmount when setting canmount=off. */ if (prop != ZFS_PROP_CANMOUNT || (fnvpair_value_uint64(elem) == ZFS_CANMOUNT_OFF && - zfs_is_mounted(zhp, NULL)) || - (fnvpair_value_uint64(elem) == ZFS_CANMOUNT_ON && - !zfs_is_mounted(zhp, NULL))) { + zfs_is_mounted(zhp, NULL))) { cls[cl_idx] = changelist_gather(zhp, prop, 0, 0); if (cls[cl_idx] == NULL) goto error; From owner-svn-src-stable-10@freebsd.org Wed Dec 14 16:21:11 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA393C80197; Wed, 14 Dec 2016 16:21:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99B5A1D41; Wed, 14 Dec 2016 16:21:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEGLAXX096134; Wed, 14 Dec 2016 16:21:10 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEGLAdL096133; Wed, 14 Dec 2016 16:21:10 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141621.uBEGLAdL096133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:21:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310071 - stable/10/sys/dev/iicbus X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:21:11 -0000 Author: avg Date: Wed Dec 14 16:21:10 2016 New Revision: 310071 URL: https://svnweb.freebsd.org/changeset/base/310071 Log: MFC r306589: Implement iicbus_write_ivar and impelemnt the NOSTOP ivar in both read and write. Modified: stable/10/sys/dev/iicbus/iicbus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iicbus/iicbus.c ============================================================================== --- stable/10/sys/dev/iicbus/iicbus.c Wed Dec 14 16:20:51 2016 (r310070) +++ stable/10/sys/dev/iicbus/iicbus.c Wed Dec 14 16:21:10 2016 (r310071) @@ -192,6 +192,26 @@ iicbus_read_ivar(device_t bus, device_t case IICBUS_IVAR_ADDR: *result = devi->addr; break; + case IICBUS_IVAR_NOSTOP: + *result = devi->nostop; + break; + } + return (0); +} + +static int +iicbus_write_ivar(device_t bus, device_t child, int which, uintptr_t value) +{ + struct iicbus_ivar *devi = IICBUS_IVAR(child); + + switch (which) { + default: + return (EINVAL); + case IICBUS_IVAR_ADDR: + return (EINVAL); + case IICBUS_IVAR_NOSTOP: + devi->nostop = value; + break; } return (0); } @@ -302,6 +322,7 @@ static device_method_t iicbus_methods[] DEVMETHOD(bus_print_child, iicbus_print_child), DEVMETHOD(bus_probe_nomatch, iicbus_probe_nomatch), DEVMETHOD(bus_read_ivar, iicbus_read_ivar), + DEVMETHOD(bus_write_ivar, iicbus_write_ivar), DEVMETHOD(bus_child_pnpinfo_str, iicbus_child_pnpinfo_str), DEVMETHOD(bus_child_location_str, iicbus_child_location_str), DEVMETHOD(bus_hinted_child, iicbus_hinted_child), From owner-svn-src-stable-10@freebsd.org Wed Dec 14 16:30:54 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92697C80526; Wed, 14 Dec 2016 16:30:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61BA91445; Wed, 14 Dec 2016 16:30:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEGUrwf099623; Wed, 14 Dec 2016 16:30:53 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEGUrKP099622; Wed, 14 Dec 2016 16:30:53 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141630.uBEGUrKP099622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:30:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310074 - stable/10/sys/dev/firewire X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:30:54 -0000 Author: avg Date: Wed Dec 14 16:30:53 2016 New Revision: 310074 URL: https://svnweb.freebsd.org/changeset/base/310074 Log: MFC r309092: fwohci: report whether PhysicalUpperBound register is implemented Modified: stable/10/sys/dev/firewire/fwohci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/firewire/fwohci.c ============================================================================== --- stable/10/sys/dev/firewire/fwohci.c Wed Dec 14 16:30:47 2016 (r310073) +++ stable/10/sys/dev/firewire/fwohci.c Wed Dec 14 16:30:53 2016 (r310074) @@ -1874,6 +1874,16 @@ fwohci_intr_core(struct fwohci_softc *sc OWRITE(sc, OHCI_PREQLO, 0xffffffff); /* 0 to 4GB region */ OWRITE(sc, OHCI_PREQUPPER, 0x10000); + if (OREAD(sc, OHCI_PREQUPPER) != + (prequpper & 0xffffffff)) { + device_printf(fc->dev, + "PhysicalUpperBound register is not " + "implemented. Physical memory access " + "is limited to the first 4GB\n"); + device_printf(fc->dev, + "PhysicalUpperBound = 0x%08x\n", + OREAD(sc, OHCI_PREQUPPER)); + } } /* Set ATRetries register */ OWRITE(sc, OHCI_ATRETRY, 1<<(13+16) | 0xfff); From owner-svn-src-stable-10@freebsd.org Wed Dec 14 16:35:18 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A197C8071C; Wed, 14 Dec 2016 16:35:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D7DD1CDB; Wed, 14 Dec 2016 16:35:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEGZHgA003680; Wed, 14 Dec 2016 16:35:17 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEGZHM2003679; Wed, 14 Dec 2016 16:35:17 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141635.uBEGZHM2003679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310076 - stable/10/sys/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:35:18 -0000 Author: avg Date: Wed Dec 14 16:35:17 2016 New Revision: 310076 URL: https://svnweb.freebsd.org/changeset/base/310076 Log: MFC r308529: intpm: clean up intsmb_bread and intsmb_pcall Modified: stable/10/sys/pci/intpm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/pci/intpm.c ============================================================================== --- stable/10/sys/pci/intpm.c Wed Dec 14 16:34:13 2016 (r310075) +++ stable/10/sys/pci/intpm.c Wed Dec 14 16:35:17 2016 (r310076) @@ -785,39 +785,11 @@ intsmb_readw(device_t dev, u_char slave, return (error); } -/* - * Data sheet claims that it implements all function, but also claims - * that it implements 7 function and not mention PCALL. So I don't know - * whether it will work. - */ static int intsmb_pcall(device_t dev, u_char slave, char cmd, short sdata, short *rdata) { -#ifdef PROCCALL_TEST - struct intsmb_softc *sc = device_get_softc(dev); - int error; - INTSMB_LOCK(sc); - error = intsmb_free(sc); - if (error) { - INTSMB_UNLOCK(sc); - return (error); - } - bus_write_1(sc->io_res, PIIX4_SMBHSTADD, slave & ~LSB); - bus_write_1(sc->io_res, PIIX4_SMBHSTCMD, cmd); - bus_write_1(sc->io_res, PIIX4_SMBHSTDAT0, sdata & 0xff); - bus_write_1(sc->io_res, PIIX4_SMBHSTDAT1, (sdata & 0xff) >> 8); - intsmb_start(sc, PIIX4_SMBHSTCNT_PROT_WDATA, 0); - error = intsmb_stop(sc); - if (error == 0) { - *rdata = bus_read_1(sc->io_res, PIIX4_SMBHSTDAT0); - *rdata |= bus_read_1(sc->io_res, PIIX4_SMBHSTDAT1) << 8; - } - INTSMB_UNLOCK(sc); - return (error); -#else return (SMB_ENOTSUPP); -#endif } static int @@ -857,9 +829,6 @@ intsmb_bread(device_t dev, u_char slave, int error, i; u_char data, nread; - if (*count > SMBBLOCKTRANS_MAX || *count == 0) - return (SMB_EINVAL); - INTSMB_LOCK(sc); error = intsmb_free(sc); if (error) { @@ -872,18 +841,14 @@ intsmb_bread(device_t dev, u_char slave, bus_write_1(sc->io_res, PIIX4_SMBHSTADD, slave | LSB); bus_write_1(sc->io_res, PIIX4_SMBHSTCMD, cmd); - bus_write_1(sc->io_res, PIIX4_SMBHSTDAT0, *count); intsmb_start(sc, PIIX4_SMBHSTCNT_PROT_BLOCK, 0); error = intsmb_stop(sc); if (error == 0) { nread = bus_read_1(sc->io_res, PIIX4_SMBHSTDAT0); if (nread != 0 && nread <= SMBBLOCKTRANS_MAX) { - for (i = 0; i < nread; i++) { - data = bus_read_1(sc->io_res, PIIX4_SMBBLKDAT); - if (i < *count) - buf[i] = data; - } *count = nread; + for (i = 0; i < nread; i++) + data = bus_read_1(sc->io_res, PIIX4_SMBBLKDAT); } else error = SMB_EBUSERR; } From owner-svn-src-stable-10@freebsd.org Wed Dec 14 16:43:10 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49A55C80AF6; Wed, 14 Dec 2016 16:43:10 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 190657EC; Wed, 14 Dec 2016 16:43:10 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEGh9Qi007754; Wed, 14 Dec 2016 16:43:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEGh9Yh007753; Wed, 14 Dec 2016 16:43:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141643.uBEGh9Yh007753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:43:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310078 - stable/10/sys/dev/firewire X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:43:10 -0000 Author: avg Date: Wed Dec 14 16:43:09 2016 New Revision: 310078 URL: https://svnweb.freebsd.org/changeset/base/310078 Log: MFC r309093: firewire: initialize tag label to -1 in fw_xfer_alloc() Modified: stable/10/sys/dev/firewire/firewire.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/firewire/firewire.c ============================================================================== --- stable/10/sys/dev/firewire/firewire.c Wed Dec 14 16:43:04 2016 (r310077) +++ stable/10/sys/dev/firewire/firewire.c Wed Dec 14 16:43:09 2016 (r310078) @@ -1126,6 +1126,7 @@ fw_xfer_alloc(struct malloc_type *type) return xfer; xfer->malloc = type; + xfer->tl = -1; return xfer; } From owner-svn-src-stable-10@freebsd.org Wed Dec 14 16:44:40 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26A69C80BCB; Wed, 14 Dec 2016 16:44:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA10BAB8; Wed, 14 Dec 2016 16:44:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEGidGC007934; Wed, 14 Dec 2016 16:44:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEGid13007933; Wed, 14 Dec 2016 16:44:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141644.uBEGid13007933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 16:44:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310080 - stable/10/sys/dev/virtio/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 16:44:40 -0000 Author: avg Date: Wed Dec 14 16:44:38 2016 New Revision: 310080 URL: https://svnweb.freebsd.org/changeset/base/310080 Log: MFC r309119: virtio_pci: fix announcement of MSI-X interrupts for queues Modified: stable/10/sys/dev/virtio/pci/virtio_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- stable/10/sys/dev/virtio/pci/virtio_pci.c Wed Dec 14 16:44:33 2016 (r310079) +++ stable/10/sys/dev/virtio/pci/virtio_pci.c Wed Dec 14 16:44:38 2016 (r310080) @@ -1087,7 +1087,8 @@ vtpci_set_host_msix_vectors(struct vtpci * For shared MSIX, all the virtqueues share the first * interrupt. */ - if ((sc->vtpci_flags & VTPCI_FLAG_SHARED_MSIX) == 0) + if (!sc->vtpci_vqs[idx].vtv_no_intr && + (sc->vtpci_flags & VTPCI_FLAG_SHARED_MSIX) == 0) intr++; } From owner-svn-src-stable-10@freebsd.org Wed Dec 14 17:17:09 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 423E1C778A2; Wed, 14 Dec 2016 17:17:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0410F681; Wed, 14 Dec 2016 17:17:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEHH8JR020250; Wed, 14 Dec 2016 17:17:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEHH8e4020249; Wed, 14 Dec 2016 17:17:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201612141717.uBEHH8e4020249@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Wed, 14 Dec 2016 17:17:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310081 - stable/10/sys/dev/firewire X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 17:17:09 -0000 Author: avg Date: Wed Dec 14 17:17:07 2016 New Revision: 310081 URL: https://svnweb.freebsd.org/changeset/base/310081 Log: MFC r277511: Fix remote DMA based firewire debugging when targeting systems with more than 4GB of physical memory. Modified: stable/10/sys/dev/firewire/fwohci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/firewire/fwohci.c ============================================================================== --- stable/10/sys/dev/firewire/fwohci.c Wed Dec 14 16:44:38 2016 (r310080) +++ stable/10/sys/dev/firewire/fwohci.c Wed Dec 14 17:17:07 2016 (r310081) @@ -55,6 +55,7 @@ #include #include +#include #if defined(__DragonFly__) || __FreeBSD_version < 500000 #include /* for DELAY() */ @@ -202,6 +203,7 @@ static void fwohci_task_dma(void *, int) #define OHCI_PREQLO 0x118 #define OHCI_PREQLOCLR 0x11c #define OHCI_PREQUPPER 0x120 +#define OHCI_PREQUPPER_MAX 0xffff0000 #define OHCI_SID_BUF 0x64 #define OHCI_SID_CNT 0x68 @@ -869,7 +871,7 @@ fwohci_execute_db2(void *arg, bus_dma_se static void fwohci_start(struct fwohci_softc *sc, struct fwohci_dbch *dbch) { - int i, s; + int i; int tcode, hdr_len, pl_off; int fsegment = -1; uint32_t off; @@ -895,7 +897,6 @@ fwohci_start(struct fwohci_softc *sc, st if (dbch->flags & FWOHCI_DBCH_FULL) return; - s = splfw(); db_tr = dbch->top; txloop: xfer = STAILQ_FIRST(&dbch->xferq.q); @@ -1045,7 +1046,6 @@ kick: } dbch->top = db_tr; - splx(s); return; } @@ -1841,6 +1841,7 @@ static void fwohci_intr_core(struct fwohci_softc *sc, uint32_t stat, int count) { struct firewire_comm *fc = (struct firewire_comm *)sc; + uintmax_t prequpper; uint32_t node_id, plen; FW_GLOCK_ASSERT(fc); @@ -1872,8 +1873,17 @@ fwohci_intr_core(struct fwohci_softc *sc /* allow from all nodes */ OWRITE(sc, OHCI_PREQHI, 0x7fffffff); OWRITE(sc, OHCI_PREQLO, 0xffffffff); - /* 0 to 4GB region */ - OWRITE(sc, OHCI_PREQUPPER, 0x10000); + prequpper = ((uintmax_t)Maxmem << PAGE_SHIFT) >> 16; + if (prequpper > OHCI_PREQUPPER_MAX) { + device_printf(fc->dev, + "Physical memory size of 0x%jx exceeds " + "fire wire address space. Limiting dma " + "to memory below 0x%jx\n", + (uintmax_t)Maxmem << PAGE_SHIFT, + (uintmax_t)OHCI_PREQUPPER_MAX << 16); + prequpper = OHCI_PREQUPPER_MAX; + } + OWRITE(sc, OHCI_PREQUPPER, prequpper & 0xffffffff); if (OREAD(sc, OHCI_PREQUPPER) != (prequpper & 0xffffffff)) { device_printf(fc->dev, @@ -2203,7 +2213,7 @@ fwohci_rbuf_update(struct fwohci_softc * struct fw_bulkxfer *chunk; struct fw_xferq *ir; uint32_t stat; - int s, w = 0, ldesc; + int w = 0, ldesc; ir = fc->ir[dmach]; ldesc = sc->ir[dmach].ndesc - 1; @@ -2211,7 +2221,6 @@ fwohci_rbuf_update(struct fwohci_softc * #if 0 dump_db(sc, dmach); #endif - s = splfw(); if ((ir->flag & FWXFERQ_HANDLER) == 0) FW_GLOCK(fc); fwdma_sync_multiseg_all(sc->ir[dmach].am, BUS_DMASYNC_POSTREAD); @@ -2250,7 +2259,6 @@ fwohci_rbuf_update(struct fwohci_softc * } if ((ir->flag & FWXFERQ_HANDLER) == 0) FW_GUNLOCK(fc); - splx(s); if (w == 0) return; From owner-svn-src-stable-10@freebsd.org Wed Dec 14 17:27:45 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAFE9C77F64; Wed, 14 Dec 2016 17:27:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA0C115B2; Wed, 14 Dec 2016 17:27:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBEHRigd024507; Wed, 14 Dec 2016 17:27:44 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBEHRi6V024506; Wed, 14 Dec 2016 17:27:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201612141727.uBEHRi6V024506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 14 Dec 2016 17:27:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310082 - stable/10/contrib/llvm/lib/Analysis X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 17:27:46 -0000 Author: dim Date: Wed Dec 14 17:27:44 2016 New Revision: 310082 URL: https://svnweb.freebsd.org/changeset/base/310082 Log: Merge r309860 from stable/9, as this also applies to stable/10: Fix libllvmanalysis build failure after r309857: on stable/9, llvm is compiled by gcc, and without -std=c++11, so the nullptr keyword is unknown. Use the old-school plain zero syntax instead. Modified: stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp Wed Dec 14 17:17:07 2016 (r310081) +++ stable/10/contrib/llvm/lib/Analysis/LazyValueInfo.cpp Wed Dec 14 17:27:44 2016 (r310082) @@ -1051,7 +1051,7 @@ static bool isKnownNonConstant(Value *V) Constant *LazyValueInfo::getConstant(Value *V, BasicBlock *BB) { // Bail out early if V is known not to be a Constant. if (isKnownNonConstant(V)) - return nullptr; + return 0; LVILatticeVal Result = getCache(PImpl).getValueInBlock(V, BB); From owner-svn-src-stable-10@freebsd.org Wed Dec 14 21:30:36 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E80CC8055D; Wed, 14 Dec 2016 21:30:36 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E00F1D75; Wed, 14 Dec 2016 21:30:36 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBELUZ6M023791; Wed, 14 Dec 2016 21:30:35 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBELUZ4a023790; Wed, 14 Dec 2016 21:30:35 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201612142130.uBELUZ4a023790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 14 Dec 2016 21:30:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310094 - stable/10/sys/netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 21:30:36 -0000 Author: kp Date: Wed Dec 14 21:30:35 2016 New Revision: 310094 URL: https://svnweb.freebsd.org/changeset/base/310094 Log: MFC r309563: pflog: Correctly initialise subrulenr subrulenr is considered unset if it's set to -1, not if it's set to 1. See contrib/tcpdump/print-pflog.c pflog_print() for a user. This caused incorrect pflog output (tcpdump -n -e -ttt -i pflog0): rule 0..16777216(match) instead of the correct output of rule 0/0(match) PR: 214832 Submitted by: andywhite@gmail.com Modified: stable/10/sys/netpfil/pf/if_pflog.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/if_pflog.c ============================================================================== --- stable/10/sys/netpfil/pf/if_pflog.c Wed Dec 14 21:29:12 2016 (r310093) +++ stable/10/sys/netpfil/pf/if_pflog.c Wed Dec 14 21:30:35 2016 (r310094) @@ -217,7 +217,7 @@ pflog_packet(struct pfi_kif *kif, struct if (am == NULL) { hdr.rulenr = htonl(rm->nr); - hdr.subrulenr = 1; + hdr.subrulenr = -1; } else { hdr.rulenr = htonl(am->nr); hdr.subrulenr = htonl(rm->nr); From owner-svn-src-stable-10@freebsd.org Thu Dec 15 01:45:32 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4C88C768D3; Thu, 15 Dec 2016 01:45:32 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3FD116F8; Thu, 15 Dec 2016 01:45:32 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBF1jVmB030899; Thu, 15 Dec 2016 01:45:31 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBF1jV7S030898; Thu, 15 Dec 2016 01:45:31 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201612150145.uBF1jV7S030898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Thu, 15 Dec 2016 01:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310099 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 01:45:33 -0000 Author: vangyzen Date: Thu Dec 15 01:45:31 2016 New Revision: 310099 URL: https://svnweb.freebsd.org/changeset/base/310099 Log: MFC r309460 thr_set_name(): silently truncate the given name as needed Instead of failing with ENAMETOOLONG, which is swallowed by pthread_set_name_np() anyway, truncate the given name to MAXCOMLEN+1 bytes. This is more likely what the user wants, and saves the caller from truncating it before the call (which was the only recourse). The man page changes were not merged because thr_set_name.2 does not exist on stable/10. Sponsored by: Dell EMC Modified: stable/10/sys/kern/kern_thr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_thr.c ============================================================================== --- stable/10/sys/kern/kern_thr.c Wed Dec 14 23:36:32 2016 (r310098) +++ stable/10/sys/kern/kern_thr.c Thu Dec 15 01:45:31 2016 (r310099) @@ -569,8 +569,11 @@ sys_thr_set_name(struct thread *td, stru error = 0; name[0] = '\0'; if (uap->name != NULL) { - error = copyinstr(uap->name, name, sizeof(name), - NULL); + error = copyinstr(uap->name, name, sizeof(name), NULL); + if (error == ENAMETOOLONG) { + error = copyin(uap->name, name, sizeof(name) - 1); + name[sizeof(name) - 1] = '\0'; + } if (error) return (error); } From owner-svn-src-stable-10@freebsd.org Thu Dec 15 08:11:34 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14029C81BC9; Thu, 15 Dec 2016 08:11:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEB40961; Thu, 15 Dec 2016 08:11:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBF8BW0U087741; Thu, 15 Dec 2016 08:11:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBF8BWrX087740; Thu, 15 Dec 2016 08:11:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201612150811.uBF8BWrX087740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 15 Dec 2016 08:11:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310106 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 08:11:34 -0000 Author: mav Date: Thu Dec 15 08:11:32 2016 New Revision: 310106 URL: https://svnweb.freebsd.org/changeset/base/310106 Log: MFC 309714: Fix spa_alloc_tree sorting by offset in r305331. Original commit "7090 zfs should improve allocation order" declares alloc queue sorted by time and offset. But in practice io_offset is always zero, so sorting happened only by time, while order of writes with equal time was completely random. On Illumos this did not affected much thanks to using high resolution timestamps. On FreeBSD due to using much faster but low resolution timestamps it caused bad data placement on disks, affecting further read performance. This change switches zio_timestamp_compare() from comparing uninitialized io_offset to really populated io_bookmark values. I haven't decided yet what to do with timestampts, but on simple tests this change gives the same peformance results by just making code to work as declared. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Dec 15 08:10:47 2016 (r310105) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Dec 15 08:11:32 2016 (r310106) @@ -568,9 +568,24 @@ zio_timestamp_compare(const void *x1, co if (z1->io_queued_timestamp > z2->io_queued_timestamp) return (1); - if (z1->io_offset < z2->io_offset) + if (z1->io_bookmark.zb_objset < z2->io_bookmark.zb_objset) return (-1); - if (z1->io_offset > z2->io_offset) + if (z1->io_bookmark.zb_objset > z2->io_bookmark.zb_objset) + return (1); + + if (z1->io_bookmark.zb_object < z2->io_bookmark.zb_object) + return (-1); + if (z1->io_bookmark.zb_object > z2->io_bookmark.zb_object) + return (1); + + if (z1->io_bookmark.zb_level < z2->io_bookmark.zb_level) + return (-1); + if (z1->io_bookmark.zb_level > z2->io_bookmark.zb_level) + return (1); + + if (z1->io_bookmark.zb_blkid < z2->io_bookmark.zb_blkid) + return (-1); + if (z1->io_bookmark.zb_blkid > z2->io_bookmark.zb_blkid) return (1); if (z1 < z2) From owner-svn-src-stable-10@freebsd.org Thu Dec 15 10:47:36 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A974C803B5; Thu, 15 Dec 2016 10:47:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29FD36C6; Thu, 15 Dec 2016 10:47:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBFAlZ7x049847; Thu, 15 Dec 2016 10:47:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBFAlZYL049846; Thu, 15 Dec 2016 10:47:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201612151047.uBFAlZYL049846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 15 Dec 2016 10:47:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310110 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 10:47:36 -0000 Author: kib Date: Thu Dec 15 10:47:35 2016 New Revision: 310110 URL: https://svnweb.freebsd.org/changeset/base/310110 Log: MFC r309708: Style. Modified: stable/10/sys/vm/phys_pager.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/phys_pager.c ============================================================================== --- stable/10/sys/vm/phys_pager.c Thu Dec 15 10:44:45 2016 (r310109) +++ stable/10/sys/vm/phys_pager.c Thu Dec 15 10:47:35 2016 (r310110) @@ -56,9 +56,6 @@ phys_pager_init(void) mtx_init(&phys_pager_mtx, "phys_pager list", NULL, MTX_DEF); } -/* - * MPSAFE - */ static vm_object_t phys_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot, vm_ooffset_t foff, struct ucred *cred) @@ -101,8 +98,8 @@ phys_pager_alloc(void *handle, vm_ooffse object = object1; object1 = NULL; object->handle = handle; - TAILQ_INSERT_TAIL(&phys_pager_object_list, object, - pager_object_list); + TAILQ_INSERT_TAIL(&phys_pager_object_list, + object, pager_object_list); } } else { if (pindex > object->size) @@ -117,9 +114,6 @@ phys_pager_alloc(void *handle, vm_ooffse return (object); } -/* - * MPSAFE - */ static void phys_pager_dealloc(vm_object_t object) { @@ -167,7 +161,7 @@ phys_pager_getpages(vm_object_t object, static void phys_pager_putpages(vm_object_t object, vm_page_t *m, int count, boolean_t sync, - int *rtvals) + int *rtvals) { panic("phys_pager_putpage called"); @@ -185,7 +179,7 @@ phys_pager_putpages(vm_object_t object, #endif static boolean_t phys_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, - int *after) + int *after) { vm_pindex_t base, end; From owner-svn-src-stable-10@freebsd.org Thu Dec 15 10:51:36 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DC53C8065A; Thu, 15 Dec 2016 10:51:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D090BB1; Thu, 15 Dec 2016 10:51:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBFApZif053616; Thu, 15 Dec 2016 10:51:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBFApZLp053615; Thu, 15 Dec 2016 10:51:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201612151051.uBFApZLp053615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 15 Dec 2016 10:51:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310111 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 10:51:36 -0000 Author: kib Date: Thu Dec 15 10:51:35 2016 New Revision: 310111 URL: https://svnweb.freebsd.org/changeset/base/310111 Log: MFC r309709: Move map_generation snapshot value into struct faultstate. Modified: stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Thu Dec 15 10:47:35 2016 (r310110) +++ stable/10/sys/vm/vm_fault.c Thu Dec 15 10:51:35 2016 (r310111) @@ -124,6 +124,7 @@ struct faultstate { vm_map_t map; vm_map_entry_t entry; int lookup_still_valid; + int map_generation; struct vnode *vp; }; @@ -336,7 +337,6 @@ vm_fault_hold(vm_map_t map, vm_offset_t long ahead, behind; int alloc_req, era, faultcount, nera, reqpage, result; boolean_t dead, growstack, is_first_object_locked, wired; - int map_generation; vm_object_t next_object; vm_page_t marray[VM_FAULT_READ_MAX]; int hardfault; @@ -372,7 +372,7 @@ RetryFault:; return (result); } - map_generation = fs.map->timestamp; + fs.map_generation = fs.map->timestamp; if (fs.entry->eflags & MAP_ENTRY_NOFAULT) { panic("vm_fault: fault on nofault entry, addr: %lx", @@ -950,7 +950,7 @@ readrest: goto RetryFault; } fs.lookup_still_valid = TRUE; - if (fs.map->timestamp != map_generation) { + if (fs.map->timestamp != fs.map_generation) { result = vm_map_lookup_locked(&fs.map, vaddr, fault_type, &fs.entry, &retry_object, &retry_pindex, &retry_prot, &wired); From owner-svn-src-stable-10@freebsd.org Thu Dec 15 16:52:19 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C83A2C81B67; Thu, 15 Dec 2016 16:52:19 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95BF71EDB; Thu, 15 Dec 2016 16:52:19 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBFGqIP5098695; Thu, 15 Dec 2016 16:52:18 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBFGqHRq098683; Thu, 15 Dec 2016 16:52:17 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201612151652.uBFGqHRq098683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Thu, 15 Dec 2016 16:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310121 - in stable/10: bin/ps lib/libkvm sys/compat/freebsd32 sys/kern sys/sys usr.bin/procstat usr.bin/top X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 16:52:19 -0000 Author: vangyzen Date: Thu Dec 15 16:52:17 2016 New Revision: 310121 URL: https://svnweb.freebsd.org/changeset/base/310121 Log: MFC r309676 Export the whole thread name in kinfo_proc kinfo_proc::ki_tdname is three characters shorter than thread::td_name. Add a ki_moretdname field for these three extra characters. Add the new field to kinfo_proc32, as well. Update all in-tree consumers to read the new field and assemble the full name, except for lldb's HostThreadFreeBSD.cpp, which I will handle separately. Bump __FreeBSD_version. Sponsored by: Dell EMC Modified: stable/10/bin/ps/print.c stable/10/lib/libkvm/kvm_proc.c stable/10/sys/compat/freebsd32/freebsd32.h stable/10/sys/kern/kern_proc.c stable/10/sys/sys/param.h stable/10/sys/sys/user.h stable/10/usr.bin/procstat/procstat.c stable/10/usr.bin/procstat/procstat.h stable/10/usr.bin/procstat/procstat_cs.c stable/10/usr.bin/procstat/procstat_kstack.c stable/10/usr.bin/procstat/procstat_threads.c stable/10/usr.bin/top/machine.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/ps/print.c ============================================================================== --- stable/10/bin/ps/print.c Thu Dec 15 16:51:33 2016 (r310120) +++ stable/10/bin/ps/print.c Thu Dec 15 16:52:17 2016 (r310121) @@ -119,11 +119,12 @@ command(KINFO *k, VARENT *ve) if (cflag) { /* If it is the last field, then don't pad */ if (STAILQ_NEXT(ve, next_ve) == NULL) { - asprintf(&str, "%s%s%s%s", + asprintf(&str, "%s%s%s%s%s", k->ki_d.prefix ? k->ki_d.prefix : "", k->ki_p->ki_comm, (showthreads && k->ki_p->ki_numthreads > 1) ? "/" : "", - (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_tdname : ""); + (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_tdname : "", + (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_moretdname : ""); } else str = strdup(k->ki_p->ki_comm); @@ -171,14 +172,16 @@ ucomm(KINFO *k, VARENT *ve) char *str; if (STAILQ_NEXT(ve, next_ve) == NULL) { /* last field, don't pad */ - asprintf(&str, "%s%s%s%s", + asprintf(&str, "%s%s%s%s%s", k->ki_d.prefix ? k->ki_d.prefix : "", k->ki_p->ki_comm, (showthreads && k->ki_p->ki_numthreads > 1) ? "/" : "", - (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_tdname : ""); + (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_tdname : "", + (showthreads && k->ki_p->ki_numthreads > 1) ? k->ki_p->ki_moretdname : ""); } else { if (showthreads && k->ki_p->ki_numthreads > 1) - asprintf(&str, "%s/%s", k->ki_p->ki_comm, k->ki_p->ki_tdname); + asprintf(&str, "%s/%s%s", k->ki_p->ki_comm, + k->ki_p->ki_tdname, k->ki_p->ki_moretdname); else str = strdup(k->ki_p->ki_comm); } @@ -191,7 +194,8 @@ tdnam(KINFO *k, VARENT *ve __unused) char *str; if (showthreads && k->ki_p->ki_numthreads > 1) - str = strdup(k->ki_p->ki_tdname); + asprintf(&str, "%s%s", k->ki_p->ki_tdname, + k->ki_p->ki_moretdname); else str = strdup(" "); Modified: stable/10/lib/libkvm/kvm_proc.c ============================================================================== --- stable/10/lib/libkvm/kvm_proc.c Thu Dec 15 16:51:33 2016 (r310120) +++ stable/10/lib/libkvm/kvm_proc.c Thu Dec 15 16:52:17 2016 (r310121) @@ -424,8 +424,6 @@ nopgrp: kp->ki_pri.pri_native = mtd.td_base_pri; kp->ki_lastcpu = mtd.td_lastcpu; kp->ki_wchan = mtd.td_wchan; - if (mtd.td_name[0] != 0) - strlcpy(kp->ki_tdname, mtd.td_name, MAXCOMLEN); kp->ki_oncpu = mtd.td_oncpu; if (mtd.td_name[0] != '\0') strlcpy(kp->ki_tdname, mtd.td_name, sizeof(kp->ki_tdname)); Modified: stable/10/sys/compat/freebsd32/freebsd32.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32.h Thu Dec 15 16:51:33 2016 (r310120) +++ stable/10/sys/compat/freebsd32/freebsd32.h Thu Dec 15 16:52:17 2016 (r310121) @@ -315,7 +315,8 @@ struct kinfo_proc32 { char ki_comm[COMMLEN+1]; char ki_emul[KI_EMULNAMELEN+1]; char ki_loginclass[LOGINCLASSLEN+1]; - char ki_sparestrings[50]; + char ki_moretdname[MAXCOMLEN-TDNAMLEN+1]; + char ki_sparestrings[46]; int ki_spareints[KI_NSPARE_INT]; int ki_flag2; int ki_fibnum; Modified: stable/10/sys/kern/kern_proc.c ============================================================================== --- stable/10/sys/kern/kern_proc.c Thu Dec 15 16:51:33 2016 (r310120) +++ stable/10/sys/kern/kern_proc.c Thu Dec 15 16:52:17 2016 (r310121) @@ -959,7 +959,14 @@ fill_kinfo_thread(struct thread *td, str strlcpy(kp->ki_wmesg, td->td_wmesg, sizeof(kp->ki_wmesg)); else bzero(kp->ki_wmesg, sizeof(kp->ki_wmesg)); - strlcpy(kp->ki_tdname, td->td_name, sizeof(kp->ki_tdname)); + if (strlcpy(kp->ki_tdname, td->td_name, sizeof(kp->ki_tdname)) >= + sizeof(kp->ki_tdname)) { + strlcpy(kp->ki_moretdname, + td->td_name + sizeof(kp->ki_tdname) - 1, + sizeof(kp->ki_moretdname)); + } else { + bzero(kp->ki_moretdname, sizeof(kp->ki_moretdname)); + } if (TD_ON_LOCK(td)) { kp->ki_kiflag |= KI_LOCKBLOCK; strlcpy(kp->ki_lockname, td->td_lockname, @@ -1180,6 +1187,7 @@ freebsd32_kinfo_proc_out(const struct ki bcopy(ki->ki_comm, ki32->ki_comm, COMMLEN + 1); bcopy(ki->ki_emul, ki32->ki_emul, KI_EMULNAMELEN + 1); bcopy(ki->ki_loginclass, ki32->ki_loginclass, LOGINCLASSLEN + 1); + bcopy(ki->ki_moretdname, ki32->ki_moretdname, MAXCOMLEN - TDNAMLEN + 1); CP(*ki, *ki32, ki_flag2); CP(*ki, *ki32, ki_fibnum); CP(*ki, *ki32, ki_cr_flags); Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Thu Dec 15 16:51:33 2016 (r310120) +++ stable/10/sys/sys/param.h Thu Dec 15 16:52:17 2016 (r310121) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1003510 /* Master, propagated to newvers */ +#define __FreeBSD_version 1003511 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: stable/10/sys/sys/user.h ============================================================================== --- stable/10/sys/sys/user.h Thu Dec 15 16:51:33 2016 (r310120) +++ stable/10/sys/sys/user.h Thu Dec 15 16:52:17 2016 (r310121) @@ -180,12 +180,13 @@ struct kinfo_proc { char ki_comm[COMMLEN+1]; /* command name */ char ki_emul[KI_EMULNAMELEN+1]; /* emulation name */ char ki_loginclass[LOGINCLASSLEN+1]; /* login class */ + char ki_moretdname[MAXCOMLEN-TDNAMLEN+1]; /* more thread name */ /* * When adding new variables, take space for char-strings from the * front of ki_sparestrings, and ints from the end of ki_spareints. * That way the spare room from both arrays will remain contiguous. */ - char ki_sparestrings[50]; /* spare string space */ + char ki_sparestrings[46]; /* spare string space */ int ki_spareints[KI_NSPARE_INT]; /* spare room for growth */ int ki_flag2; /* P2_* flags */ int ki_fibnum; /* Default FIB number */ Modified: stable/10/usr.bin/procstat/procstat.c ============================================================================== --- stable/10/usr.bin/procstat/procstat.c Thu Dec 15 16:51:33 2016 (r310120) +++ stable/10/usr.bin/procstat/procstat.c Thu Dec 15 16:52:17 2016 (r310121) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -115,6 +116,21 @@ kinfo_proc_sort(struct kinfo_proc *kipp, qsort(kipp, count, sizeof(*kipp), kinfo_proc_compare); } +const char * +kinfo_proc_thread_name(const struct kinfo_proc *kipp) +{ + static char name[MAXCOMLEN+1]; + + strlcpy(name, kipp->ki_tdname, sizeof(name)); + strlcat(name, kipp->ki_moretdname, sizeof(name)); + if (name[0] == '\0' || strcmp(kipp->ki_comm, name) == 0) { + name[0] = '-'; + name[1] = '\0'; + } + + return (name); +} + int main(int argc, char *argv[]) { Modified: stable/10/usr.bin/procstat/procstat.h ============================================================================== --- stable/10/usr.bin/procstat/procstat.h Thu Dec 15 16:51:33 2016 (r310120) +++ stable/10/usr.bin/procstat/procstat.h Thu Dec 15 16:52:17 2016 (r310121) @@ -33,6 +33,7 @@ extern int hflag, nflag, Cflag, Hflag; struct kinfo_proc; void kinfo_proc_sort(struct kinfo_proc *kipp, int count); +const char * kinfo_proc_thread_name(const struct kinfo_proc *kipp); void procstat_args(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_auxv(struct procstat *prstat, struct kinfo_proc *kipp); Modified: stable/10/usr.bin/procstat/procstat_cs.c ============================================================================== --- stable/10/usr.bin/procstat/procstat_cs.c Thu Dec 15 16:51:33 2016 (r310120) +++ stable/10/usr.bin/procstat/procstat_cs.c Thu Dec 15 16:52:17 2016 (r310121) @@ -50,7 +50,7 @@ procstat_cs(struct procstat *procstat, s int once, twice, lastcpu, cpu; if (!hflag) - printf("%5s %6s %-16s %-16s %2s %4s %-7s\n", "PID", + printf("%5s %6s %-19s %-19s %2s %4s %-7s\n", "PID", "TID", "COMM", "TDNAME", "CPU", "CSID", "CPU MASK"); kip = procstat_getprocs(procstat, KERN_PROC_PID | KERN_PROC_INC_THREAD, @@ -62,11 +62,9 @@ procstat_cs(struct procstat *procstat, s kipp = &kip[i]; printf("%5d ", kipp->ki_pid); printf("%6d ", kipp->ki_tid); - printf("%-16s ", strlen(kipp->ki_comm) ? + printf("%-19s ", strlen(kipp->ki_comm) ? kipp->ki_comm : "-"); - printf("%-16s ", (strlen(kipp->ki_tdname) && - (strcmp(kipp->ki_comm, kipp->ki_tdname) != 0)) ? - kipp->ki_tdname : "-"); + printf("%-19s ", kinfo_proc_thread_name(kipp)); if (kipp->ki_oncpu != 255) printf("%3d ", kipp->ki_oncpu); else if (kipp->ki_lastcpu != 255) Modified: stable/10/usr.bin/procstat/procstat_kstack.c ============================================================================== --- stable/10/usr.bin/procstat/procstat_kstack.c Thu Dec 15 16:51:33 2016 (r310120) +++ stable/10/usr.bin/procstat/procstat_kstack.c Thu Dec 15 16:52:17 2016 (r310121) @@ -134,7 +134,7 @@ procstat_kstack(struct procstat *procsta unsigned int kip_count, kstk_count; if (!hflag) - printf("%5s %6s %-16s %-16s %-29s\n", "PID", "TID", "COMM", + printf("%5s %6s %-19s %-19s %-29s\n", "PID", "TID", "COMM", "TDNAME", "KSTACK"); kkstp = kkstp_free = procstat_getkstack(procstat, kipp, &kstk_count); @@ -171,10 +171,8 @@ procstat_kstack(struct procstat *procsta printf("%5d ", kipp->ki_pid); printf("%6d ", kkstp->kkst_tid); - printf("%-16s ", kipp->ki_comm); - printf("%-16s ", (strlen(kipp->ki_tdname) && - (strcmp(kipp->ki_comm, kipp->ki_tdname) != 0)) ? - kipp->ki_tdname : "-"); + printf("%-19s ", kipp->ki_comm); + printf("%-19s ", kinfo_proc_thread_name(kipp)); switch (kkstp->kkst_state) { case KKST_STATE_RUNNING: Modified: stable/10/usr.bin/procstat/procstat_threads.c ============================================================================== --- stable/10/usr.bin/procstat/procstat_threads.c Thu Dec 15 16:51:33 2016 (r310120) +++ stable/10/usr.bin/procstat/procstat_threads.c Thu Dec 15 16:52:17 2016 (r310121) @@ -47,7 +47,7 @@ procstat_threads(struct procstat *procst const char *str; if (!hflag) - printf("%5s %6s %-16s %-16s %2s %4s %-7s %-9s\n", "PID", + printf("%5s %6s %-19s %-19s %2s %4s %-7s %-9s\n", "PID", "TID", "COMM", "TDNAME", "CPU", "PRI", "STATE", "WCHAN"); kip = procstat_getprocs(procstat, KERN_PROC_PID | KERN_PROC_INC_THREAD, @@ -59,11 +59,9 @@ procstat_threads(struct procstat *procst kipp = &kip[i]; printf("%5d ", kipp->ki_pid); printf("%6d ", kipp->ki_tid); - printf("%-16s ", strlen(kipp->ki_comm) ? + printf("%-19s ", strlen(kipp->ki_comm) ? kipp->ki_comm : "-"); - printf("%-16s ", (strlen(kipp->ki_tdname) && - (strcmp(kipp->ki_comm, kipp->ki_tdname) != 0)) ? - kipp->ki_tdname : "-"); + printf("%-19s ", kinfo_proc_thread_name(kipp)); if (kipp->ki_oncpu != 255) printf("%3d ", kipp->ki_oncpu); else if (kipp->ki_lastcpu != 255) Modified: stable/10/usr.bin/top/machine.c ============================================================================== --- stable/10/usr.bin/top/machine.c Thu Dec 15 16:51:33 2016 (r310120) +++ stable/10/usr.bin/top/machine.c Thu Dec 15 16:52:17 2016 (r310121) @@ -889,8 +889,8 @@ format_next_process(caddr_t handle, char if (!(flags & FMT_SHOWARGS)) { if (ps.thread && pp->ki_flag & P_HADTHREADS && pp->ki_tdname[0]) { - snprintf(cmdbuf, cmdlen, "%s{%s}", pp->ki_comm, - pp->ki_tdname); + snprintf(cmdbuf, cmdlen, "%s{%s%s}", pp->ki_comm, + pp->ki_tdname, pp->ki_moretdname); } else { snprintf(cmdbuf, cmdlen, "%s", pp->ki_comm); } @@ -902,7 +902,8 @@ format_next_process(caddr_t handle, char if (ps.thread && pp->ki_flag & P_HADTHREADS && pp->ki_tdname[0]) { snprintf(cmdbuf, cmdlen, - "[%s{%s}]", pp->ki_comm, pp->ki_tdname); + "[%s{%s%s}]", pp->ki_comm, pp->ki_tdname, + pp->ki_moretdname); } else { snprintf(cmdbuf, cmdlen, "[%s]", pp->ki_comm); @@ -950,8 +951,9 @@ format_next_process(caddr_t handle, char if (ps.thread && pp->ki_flag & P_HADTHREADS && pp->ki_tdname[0]) snprintf(cmdbuf, cmdlen, - "%s (%s){%s}", argbuf, pp->ki_comm, - pp->ki_tdname); + "%s (%s){%s%s}", argbuf, + pp->ki_comm, pp->ki_tdname, + pp->ki_moretdname); else snprintf(cmdbuf, cmdlen, "%s (%s)", argbuf, pp->ki_comm); @@ -959,7 +961,8 @@ format_next_process(caddr_t handle, char if (ps.thread && pp->ki_flag & P_HADTHREADS && pp->ki_tdname[0]) snprintf(cmdbuf, cmdlen, - "%s{%s}", argbuf, pp->ki_tdname); + "%s{%s%s}", argbuf, pp->ki_tdname, + pp->ki_moretdname); else strlcpy(cmdbuf, argbuf, cmdlen); } From owner-svn-src-stable-10@freebsd.org Thu Dec 15 20:13:41 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8775AC81A03; Thu, 15 Dec 2016 20:13:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56AA1F38; Thu, 15 Dec 2016 20:13:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBFKDet7080993; Thu, 15 Dec 2016 20:13:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBFKDewh080992; Thu, 15 Dec 2016 20:13:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201612152013.uBFKDewh080992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 15 Dec 2016 20:13:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310127 - stable/10/tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2016 20:13:41 -0000 Author: ngie Date: Thu Dec 15 20:13:40 2016 New Revision: 310127 URL: https://svnweb.freebsd.org/changeset/base/310127 Log: MFstable/11 r310126: MFC r309602: Remove svn[lite]{bench,fsfs} if either MK_SVN == no or MK_SVNLITE == no Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Dec 15 20:10:20 2016 (r310126) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Dec 15 20:13:40 2016 (r310127) @@ -5511,7 +5511,9 @@ OLD_FILES+=usr/share/man/man8/wpa_suppli .if ${MK_SVNLITE} == no || ${MK_SVN} == yes OLD_FILES+=usr/bin/svnlite OLD_FILES+=usr/bin/svnliteadmin +OLD_FILES+=usr/bin/svnlitebench OLD_FILES+=usr/bin/svnlitedumpfilter +OLD_FILES+=usr/bin/svnlitefsfs OLD_FILES+=usr/bin/svnlitelook OLD_FILES+=usr/bin/svnlitemucc OLD_FILES+=usr/bin/svnliterdump @@ -5524,7 +5526,9 @@ OLD_FILES+=usr/share/man/man1/svnlite.1. .if ${MK_SVN} == no OLD_FILES+=usr/bin/svn OLD_FILES+=usr/bin/svnadmin +OLD_FILES+=usr/bin/svnbench OLD_FILES+=usr/bin/svndumpfilter +OLD_FILES+=usr/bin/svnfsfs OLD_FILES+=usr/bin/svnlook OLD_FILES+=usr/bin/svnmucc OLD_FILES+=usr/bin/svnrdump From owner-svn-src-stable-10@freebsd.org Fri Dec 16 01:06:36 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE21DC76A61; Fri, 16 Dec 2016 01:06:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D300153A; Fri, 16 Dec 2016 01:06:36 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBG16Z1B000516; Fri, 16 Dec 2016 01:06:35 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBG16ZaW000515; Fri, 16 Dec 2016 01:06:35 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201612160106.uBG16ZaW000515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 16 Dec 2016 01:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310133 - in stable: 10/sys/mips/mips 11/sys/mips/mips X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 01:06:36 -0000 Author: jhb Date: Fri Dec 16 01:06:35 2016 New Revision: 310133 URL: https://svnweb.freebsd.org/changeset/base/310133 Log: MFC 308690: Sync instruction cache's after writing user breakpoints on MIPS. Add an implementation for pmaps_sync_icache() on MIPS that sync's the instruction cache on all CPUs via smp_rendezvous() after a debugger inserts a breakpoint via ptrace(PT_IO). Modified: stable/10/sys/mips/mips/pmap.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/mips/mips/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/10/sys/mips/mips/pmap.c ============================================================================== --- stable/10/sys/mips/mips/pmap.c Fri Dec 16 00:35:59 2016 (r310132) +++ stable/10/sys/mips/mips/pmap.c Fri Dec 16 01:06:35 2016 (r310133) @@ -74,11 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef SMP #include -#else -#include -#endif #include #include @@ -3203,9 +3199,19 @@ pmap_activate(struct thread *td) critical_exit(); } +static void +pmap_sync_icache_one(void *arg __unused) +{ + + mips_icache_sync_all(); + mips_dcache_wbinv_all(); +} + void pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) { + + smp_rendezvous(NULL, pmap_sync_icache_one, NULL, NULL); } /* From owner-svn-src-stable-10@freebsd.org Fri Dec 16 01:14:01 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB469C82018; Fri, 16 Dec 2016 01:14:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A7D51CEF; Fri, 16 Dec 2016 01:14:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBG1E0oO004643; Fri, 16 Dec 2016 01:14:00 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBG1E0cc004642; Fri, 16 Dec 2016 01:14:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201612160114.uBG1E0cc004642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 16 Dec 2016 01:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310134 - in stable: 10/include 11/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 01:14:01 -0000 Author: jhb Date: Fri Dec 16 01:14:00 2016 New Revision: 310134 URL: https://svnweb.freebsd.org/changeset/base/310134 Log: MFC 309274: Use the correct name for the GCC macro indicating max_align_t is defined. Modified: stable/10/include/stddef.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/include/stddef.h Directory Properties: stable/11/ (props changed) Modified: stable/10/include/stddef.h ============================================================================== --- stable/10/include/stddef.h Fri Dec 16 01:06:35 2016 (r310133) +++ stable/10/include/stddef.h Fri Dec 16 01:14:00 2016 (r310134) @@ -63,7 +63,7 @@ typedef ___wchar_t wchar_t; #ifndef __CLANG_MAX_ALIGN_T_DEFINED typedef __max_align_t max_align_t; #define __CLANG_MAX_ALIGN_T_DEFINED -#define __GCC_MAX_ALIGN_T +#define _GCC_MAX_ALIGN_T #endif #endif From owner-svn-src-stable-10@freebsd.org Fri Dec 16 20:10:57 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BB70C838D5; Fri, 16 Dec 2016 20:10:57 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C8B02D3; Fri, 16 Dec 2016 20:10:57 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBGKAu2Z067235; Fri, 16 Dec 2016 20:10:56 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBGKAtxr067229; Fri, 16 Dec 2016 20:10:55 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201612162010.uBGKAtxr067229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 16 Dec 2016 20:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310173 - in stable/10: lib/libutil usr.sbin/pw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 20:10:57 -0000 Author: asomers Date: Fri Dec 16 20:10:55 2016 New Revision: 310173 URL: https://svnweb.freebsd.org/changeset/base/310173 Log: MFC r308806 Speed up pw operations that edit /etc/group or /etc/passwd r285050 fixed a bug in pw that could lead to /etc/passwd or /etc/group corruption on power loss. However, it fixed it by opening those files with O_SYNC, which is very slow, especially on ZFS. This change replaces O_SYNC with appropriately placed fsync()s instead, which is much faster. Using a ZFS tmpdir, the time to run pw's kyua tests drops from 245s to 35s. Modified: stable/10/lib/libutil/gr_util.c stable/10/lib/libutil/pw_util.c stable/10/usr.sbin/pw/grupd.c stable/10/usr.sbin/pw/pw_nis.c stable/10/usr.sbin/pw/pwupd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libutil/gr_util.c ============================================================================== --- stable/10/lib/libutil/gr_util.c Fri Dec 16 20:04:56 2016 (r310172) +++ stable/10/lib/libutil/gr_util.c Fri Dec 16 20:10:55 2016 (r310173) @@ -141,7 +141,7 @@ gr_tmp(int mfd) errno = ENAMETOOLONG; return (-1); } - if ((tfd = mkostemp(tempname, O_SYNC)) == -1) + if ((tfd = mkostemp(tempname, 0)) == -1) return (-1); if (mfd != -1) { while ((nr = read(mfd, buf, sizeof(buf))) > 0) Modified: stable/10/lib/libutil/pw_util.c ============================================================================== --- stable/10/lib/libutil/pw_util.c Fri Dec 16 20:04:56 2016 (r310172) +++ stable/10/lib/libutil/pw_util.c Fri Dec 16 20:10:55 2016 (r310173) @@ -226,7 +226,7 @@ pw_tmp(int mfd) errno = ENAMETOOLONG; return (-1); } - if ((tfd = mkostemp(tempname, O_SYNC)) == -1) + if ((tfd = mkostemp(tempname, 0)) == -1) return (-1); if (mfd != -1) { while ((nr = read(mfd, buf, sizeof(buf))) > 0) Modified: stable/10/usr.sbin/pw/grupd.c ============================================================================== --- stable/10/usr.sbin/pw/grupd.c Fri Dec 16 20:04:56 2016 (r310172) +++ stable/10/usr.sbin/pw/grupd.c Fri Dec 16 20:10:55 2016 (r310173) @@ -77,6 +77,7 @@ gr_update(struct group * grp, char const close(tfd); err(1, "gr_copy()"); } + fsync(tfd); close(tfd); if (gr_mkdb() == -1) { gr_fini(); Modified: stable/10/usr.sbin/pw/pw_nis.c ============================================================================== --- stable/10/usr.sbin/pw/pw_nis.c Fri Dec 16 20:04:56 2016 (r310172) +++ stable/10/usr.sbin/pw/pw_nis.c Fri Dec 16 20:10:55 2016 (r310173) @@ -67,6 +67,7 @@ pw_nisupdate(const char * path, struct p close(tfd); err(1, "pw_copy()"); } + fsync(tfd); close(tfd); if (chmod(pw_tempname(), 0644) == -1) err(1, "chmod()"); Modified: stable/10/usr.sbin/pw/pwupd.c ============================================================================== --- stable/10/usr.sbin/pw/pwupd.c Fri Dec 16 20:04:56 2016 (r310172) +++ stable/10/usr.sbin/pw/pwupd.c Fri Dec 16 20:10:55 2016 (r310173) @@ -114,6 +114,7 @@ pw_update(struct passwd * pwd, char cons close(tfd); err(1, "pw_copy()"); } + fsync(tfd); close(tfd); /* * in case of deletion of a user, the whole database From owner-svn-src-stable-10@freebsd.org Fri Dec 16 23:42:50 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91E31C838A9; Fri, 16 Dec 2016 23:42:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 472D5C82; Fri, 16 Dec 2016 23:42:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBGNgnTa055952; Fri, 16 Dec 2016 23:42:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBGNgnYK055951; Fri, 16 Dec 2016 23:42:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201612162342.uBGNgnYK055951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 16 Dec 2016 23:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r310183 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2016 23:42:50 -0000 Author: kib Date: Fri Dec 16 23:42:49 2016 New Revision: 310183 URL: https://svnweb.freebsd.org/changeset/base/310183 Log: MFC r296775 (by gibbs): Provide high precision conversion from ns,us,ms -> sbintime in kevent. Tested by: ian Modified: stable/10/sys/kern/kern_event.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_event.c ============================================================================== --- stable/10/sys/kern/kern_event.c Fri Dec 16 23:33:37 2016 (r310182) +++ stable/10/sys/kern/kern_event.c Fri Dec 16 23:42:49 2016 (r310183) @@ -556,34 +556,59 @@ knote_fork(struct knlist *list, int pid) #define NOTE_TIMER_PRECMASK (NOTE_SECONDS|NOTE_MSECONDS|NOTE_USECONDS| \ NOTE_NSECONDS) -static __inline sbintime_t +static sbintime_t timer2sbintime(intptr_t data, int flags) { - sbintime_t modifier; + /* + * Macros for converting to the fractional second portion of an + * sbintime_t using 64bit multiplication to improve precision. + */ +#define NS_TO_SBT(ns) (((ns) * (((uint64_t)1 << 63) / 500000000)) >> 32) +#define US_TO_SBT(us) (((us) * (((uint64_t)1 << 63) / 500000)) >> 32) +#define MS_TO_SBT(ms) (((ms) * (((uint64_t)1 << 63) / 500)) >> 32) switch (flags & NOTE_TIMER_PRECMASK) { case NOTE_SECONDS: - modifier = SBT_1S; - break; +#ifdef __LP64__ + if (data > (SBT_MAX / SBT_1S)) + return SBT_MAX; +#endif + return ((sbintime_t)data << 32); case NOTE_MSECONDS: /* FALLTHROUGH */ case 0: - modifier = SBT_1MS; - break; + if (data >= 1000) { + int64_t secs = data / 1000; +#ifdef __LP64__ + if (secs > (SBT_MAX / SBT_1S)) + return SBT_MAX; +#endif + return (secs << 32 | MS_TO_SBT(data % 1000)); + } + return MS_TO_SBT(data); case NOTE_USECONDS: - modifier = SBT_1US; - break; + if (data >= 1000000) { + int64_t secs = data / 1000000; +#ifdef __LP64__ + if (secs > (SBT_MAX / SBT_1S)) + return SBT_MAX; +#endif + return (secs << 32 | US_TO_SBT(data % 1000000)); + } + return US_TO_SBT(data); case NOTE_NSECONDS: - modifier = SBT_1NS; - break; - default: - return (-1); - } - + if (data >= 1000000000) { + int64_t secs = data / 1000000000; #ifdef __LP64__ - if (data > SBT_MAX / modifier) - return (SBT_MAX); + if (secs > (SBT_MAX / SBT_1S)) + return SBT_MAX; #endif - return (modifier * data); + return (secs << 32 | US_TO_SBT(data % 1000000000)); + } + return NS_TO_SBT(data); + default: + break; + } + return (-1); } static void