From owner-svn-src-stable@FreeBSD.ORG Sun May 10 21:26:08 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78509443; Sun, 10 May 2015 21:26:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 66D001E12; Sun, 10 May 2015 21:26:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ALQ8T6077372; Sun, 10 May 2015 21:26:08 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ALQ84W077371; Sun, 10 May 2015 21:26:08 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201505102126.t4ALQ84W077371@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 10 May 2015 21:26: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: r282738 - stable/10/usr.bin/hexdump 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 May 2015 21:26:08 -0000 Author: jilles Date: Sun May 10 21:26:07 2015 New Revision: 282738 URL: https://svnweb.freebsd.org/changeset/base/282738 Log: MFC r282041: hexdump: Don't use uninitialized struct stat. PR: 196194 Modified: stable/10/usr.bin/hexdump/display.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/hexdump/display.c ============================================================================== --- stable/10/usr.bin/hexdump/display.c Sun May 10 21:24:55 2015 (r282737) +++ stable/10/usr.bin/hexdump/display.c Sun May 10 21:26:07 2015 (r282738) @@ -380,7 +380,7 @@ doskip(const char *fname, int statok) return; } } - if (S_ISREG(sb.st_mode)) { + if (statok && S_ISREG(sb.st_mode)) { if (fseeko(stdin, skip, SEEK_SET)) err(1, "%s", fname); address += skip; From owner-svn-src-stable@FreeBSD.ORG Mon May 11 01:33:37 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74E22E17; Mon, 11 May 2015 01:33:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 61FDB158A; Mon, 11 May 2015 01:33:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B1Xb3e002904; Mon, 11 May 2015 01:33:37 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B1XYAr002878; Mon, 11 May 2015 01:33:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505110133.t4B1XYAr002878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 11 May 2015 01:33:34 +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: r282746 - in stable/10: contrib/openresolv sbin/resolvconf 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 01:33:37 -0000 Author: gjb Date: Mon May 11 01:33:34 2015 New Revision: 282746 URL: https://svnweb.freebsd.org/changeset/base/282746 Log: MFC r282434: MFV r225523, r282431: r225523 (hrs): Import openresolv-3.4.4. r282431: Import openresolv-3.7.0. PR: 199854 Submitted by: yuri@rawbw.com Relnotes: yes Sponsored by: The FreeBSD Foundation Added: stable/10/contrib/openresolv/GNUmakefile - copied unchanged from r282434, head/contrib/openresolv/GNUmakefile stable/10/contrib/openresolv/config-null.mk - copied unchanged from r282434, head/contrib/openresolv/config-null.mk stable/10/contrib/openresolv/pdns_recursor.in - copied unchanged from r282434, head/contrib/openresolv/pdns_recursor.in Modified: stable/10/contrib/openresolv/Makefile stable/10/contrib/openresolv/configure stable/10/contrib/openresolv/dnsmasq.in stable/10/contrib/openresolv/libc.in stable/10/contrib/openresolv/named.in stable/10/contrib/openresolv/pdnsd.in stable/10/contrib/openresolv/resolvconf.8.in stable/10/contrib/openresolv/resolvconf.conf.5.in stable/10/contrib/openresolv/resolvconf.in stable/10/contrib/openresolv/unbound.in stable/10/sbin/resolvconf/Makefile Directory Properties: stable/10/ (props changed) Copied: stable/10/contrib/openresolv/GNUmakefile (from r282434, head/contrib/openresolv/GNUmakefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/openresolv/GNUmakefile Mon May 11 01:33:34 2015 (r282746, copy of r282434, head/contrib/openresolv/GNUmakefile) @@ -0,0 +1,4 @@ +# Nasty hack so that make clean works without configure being run +CONFIG_MK?=$(shell test -e config.mk && echo config.mk || echo config-null.mk) + +include Makefile Modified: stable/10/contrib/openresolv/Makefile ============================================================================== --- stable/10/contrib/openresolv/Makefile Mon May 11 00:16:32 2015 (r282745) +++ stable/10/contrib/openresolv/Makefile Mon May 11 01:33:34 2015 (r282746) @@ -1,8 +1,19 @@ -include config.mk +PKG= openresolv +VERSION= 3.7.0 -NAME= openresolv -VERSION= 3.4.1 -PKG= ${NAME}-${VERSION} +# Nasty hack so that make clean works without configure being run +_CONFIG_MK!= test -e config.mk && echo config.mk || echo config-null.mk +CONFIG_MK?= ${_CONFIG_MK} +include ${CONFIG_MK} + +SBINDIR?= /sbin +SYSCONFDIR?= /etc +LIBEXECDIR?= /libexec/resolvconf +VARDIR?= /var/run/resolvconf +RCDIR?= /etc/rc.d +RESTARTCMD?= if ${RCDIR}/\1 status >/dev/null 2>\&1; then \ + ${RCDIR}/\1 restart; \ + fi INSTALL?= install SED?= sed @@ -17,31 +28,36 @@ TARGET= ${RESOLVCONF} ${SUBSCRIBERS} SRCS= ${TARGET:C,$,.in,} # pmake SRCS:= ${TARGET:=.in} # gmake -SED_PREFIX= -e 's:@PREFIX@:${PREFIX}:g' +SED_SBINDIR= -e 's:@SBINDIR@:${SBINDIR}:g' SED_SYSCONFDIR= -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' SED_LIBEXECDIR= -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' SED_VARDIR= -e 's:@VARDIR@:${VARDIR}:g' SED_RCDIR= -e 's:@RCDIR@:${RCDIR}:g' SED_RESTARTCMD= -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' +DISTPREFIX?= ${PKG}-${VERSION} +DISTFILEGZ?= ${DISTPREFIX}.tar.gz +DISTFILE?= ${DISTPREFIX}.tar.bz2 +FOSSILID?= current + .SUFFIXES: .in all: ${TARGET} .in: - ${SED} ${SED_PREFIX} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \ + ${SED} ${SED_SBINDIR} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \ ${SED_VARDIR} ${SED_RCDIR} ${SED_RESTARTCMD} \ $< > $@ clean: - rm -f ${TARGET} openresolv-${VERSION}.tar.bz2 + rm -f ${TARGET} distclean: clean - rm -f config.mk + rm -f config.mk ${DISTFILE} installdirs: -install: ${TARGET} +proginstall: ${TARGET} ${INSTALL} -d ${DESTDIR}${SBINDIR} ${INSTALL} -m ${BINMODE} resolvconf ${DESTDIR}${SBINDIR} ${INSTALL} -d ${DESTDIR}${SYSCONFDIR} @@ -49,18 +65,21 @@ install: ${TARGET} ${INSTALL} -m ${DOCMODE} resolvconf.conf ${DESTDIR}${SYSCONFDIR} ${INSTALL} -d ${DESTDIR}${LIBEXECDIR} ${INSTALL} -m ${DOCMODE} ${SUBSCRIBERS} ${DESTDIR}${LIBEXECDIR} + +maninstall: ${INSTALL} -d ${DESTDIR}${MANDIR}/man8 ${INSTALL} -m ${MANMODE} resolvconf.8 ${DESTDIR}${MANDIR}/man8 ${INSTALL} -d ${DESTDIR}${MANDIR}/man5 ${INSTALL} -m ${MANMODE} resolvconf.conf.5 ${DESTDIR}${MANDIR}/man5 +install: proginstall maninstall + import: - rm -rf /tmp/${PKG} - ${INSTALL} -d /tmp/${PKG} - cp README ${SRCS} /tmp/${PKG} - -dist: import - cp configure Makefile resolvconf.conf /tmp/${PKG} - tar cvjpf ${PKG}.tar.bz2 -C /tmp ${PKG} - rm -rf /tmp/${PKG} - ls -l ${PKG}.tar.bz2 + rm -rf /tmp/${DISTPREFIX} + ${INSTALL} -d /tmp/${DISTPREFIX} + cp README ${SRCS} /tmp/${DISPREFIX} + +dist: + fossil tarball --name ${DISTPREFIX} ${FOSSILID} ${DISTFILEGZ} + gunzip -c ${DISTFILEGZ} | bzip2 >${DISTFILE} + rm ${DISTFILEGZ} Copied: stable/10/contrib/openresolv/config-null.mk (from r282434, head/contrib/openresolv/config-null.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/openresolv/config-null.mk Mon May 11 01:33:34 2015 (r282746, copy of r282434, head/contrib/openresolv/config-null.mk) @@ -0,0 +1 @@ +# This space left intentionally blank Modified: stable/10/contrib/openresolv/configure ============================================================================== --- stable/10/contrib/openresolv/configure Mon May 11 00:16:32 2015 (r282745) +++ stable/10/contrib/openresolv/configure Mon May 11 01:33:34 2015 (r282746) @@ -9,7 +9,7 @@ TARGET= RESTARTCMD= RCDIR= -for x; do +for x do opt=${x%%=*} var=${x#*=} case "$opt" in @@ -18,7 +18,7 @@ for x; do --debug) DEBUG=$var;; --disable-debug) DEBUG=no;; --enable-debug) DEBUG=yes;; - --prefix) prefix=$var;; + --prefix) PREFIX=$var;; --sysconfdir) SYSCONFDIR=$var;; --bindir|--sbindir) SBINDIR=$var;; --libexecdir) LIBEXECDIR=$var;; @@ -41,68 +41,76 @@ for x; do esac done +if [ -z "$LIBEXECDIR" ]; then + printf "Checking for directory /libexec ... " + if [ -d /libexec ]; then + echo "yes" + LIBEXECDIR=$PREFIX/libexec/resolvconf + else + echo "no" + LIBEXECDIR=$PREFIX/lib/resolvconf + fi +fi +if [ -z "$RUNDIR" ]; then + printf "Checking for directory /run ... " + if [ -d /run ]; then + echo "yes" + RUNDIR=/run + else + echo "no" + RUNDIR=/var/run + fi +fi + : ${SED:=sed} -: ${PREFIX:=$prefix} : ${SYSCONFDIR:=$PREFIX/etc} : ${SBINDIR:=$PREFIX/sbin} -: ${LIBEXECDIR:=$PREFIX/libexec} +: ${LIBEXECDIR:=$PREFIX/libexec/resolvconf} : ${STATEDIR:=/var} : ${RUNDIR:=$STATEDIR/run} : ${MANDIR:=${PREFIX:-/usr}/share/man} eval SYSCONFDIR="$SYSCONFDIR" eval SBINDIR="$SBINDIR" -eval LIBEXECDIR="$LIBEXECDIR/resolvconf" +eval LIBEXECDIR="$LIBEXECDIR" eval VARDIR="$RUNDIR/resolvconf" eval MANDIR="$MANDIR" CONFIG_MK=config.mk if [ -z "$BUILD" ]; then - BUILD=`uname -m`-`uname -s | tr '[:upper:]' '[:lower:]'` -fi -if [ -z "$HOST" ]; then - [ -z "$TARGET" ] && TARGET=$BUILD - HOST=$TARGET -fi -if [ -z "$TARGET" ]; then - [ -z "$HOST" ] && HOST=$BUILD - TARGET=$HOST -fi - -# Debian and Slackware have linux in different places when dealing with -# autoconf, so we deal with that here. -if [ -z "$OS" ]; then - case "$TARGET" in - *-linux-*|linux-*|*-linux|linux) OS=linux;; - esac + # autoconf target triplet: cpu-vendor-os + BUILD=$(uname -m)-unknown-$(uname -s | tr '[:upper:]' '[:lower:]') fi +: ${HOST:=$BUILD} if [ -z "$OS" ]; then - # Derive OS from cpu-manufacturer-os-kernel - CPU=${TARGET%%-*} - REST=${TARGET#*-} + echo "Deriving operating system from ... $HOST" + # Derive OS from cpu-vendor-[kernel-]os + CPU=${HOST%%-*} + REST=${HOST#*-} if [ "$CPU" != "$REST" ]; then - MANU=${REST%%-*} + VENDOR=${REST%%-*} REST=${REST#*-} - if [ "$MANU" != "$REST" ]; then + if [ "$VENDOR" != "$REST" ]; then + # Use kernel if given, otherwise os OS=${REST%%-*} - REST=${REST#*-} - if [ "$OS" != "$REST" ]; then - KERNEL=${REST%%-*} - else - # 3 tupple - KERNEL=$OS - OS=$MANU - MANU= - fi else # 2 tupple - OS=$MANU - MANU= + OS=$VENDOR + VENDOR= fi fi + + # Work with cpu-kernel-os, ie Debian + case "$VENDOR" in + linux*|kfreebsd*) OS=$VENDOR; VENDOR= ;; + esac + # Special case + case "$OS" in + gnu*) OS=hurd;; # No HURD support as yet + esac fi echo "Configuring openresolv for ... $OS" @@ -118,17 +126,36 @@ for x in SYSCONFDIR SBINDIR LIBEXECDIR V echo "$x=$t $v" >>$CONFIG_MK done -if [ -e /etc/arch-release -a -d /etc/rc.d ]; then - echo "Overriding service status check for Arch Linux" - RCDIR=/etc/rc.d - RESTARTCMD="[ -e /var/run/daemons/\1 ] \&\& /etc/rc.d/\1 restart" - echo "yes" +if [ -z "$RESTARTCMD" ]; then + printf "Checking for systemd ... " + if [ -x /bin/systemctl ]; then + RESTARTCMD="/bin/systemctl try-restart \1" + echo "yes" + elif [ -x /usr/bin/systemctl ]; then + RESTARTCMD="/usr/bin/systemctl try-restart \1" + echo "yes" + else + echo "no" + fi +fi + +# Arch upgraded to systemd, so this check has to be just after systemd +# but higher than the others +if [ -z "$RESTARTCMD" ]; then + printf "Checking for Arch ... " + if [ -e /etc/arch-release -a -d /etc/rc.d ]; then + RCDIR=/etc/rc.d + RESTARTCMD="[ -e /var/run/daemons/\1 ] \&\& /etc/rc.d/\1 restart" + echo "yes" + else + echo "no" + fi fi if [ -z "$RESTARTCMD" ]; then printf "Checking for OpenRC ... " if [ -x /sbin/rc-service ]; then - RESTARTCMD="/sbin/rc-service -e \1 \&\& /sbin/rc-service \1 -- -Ds restart" + RESTARTCMD="if /sbin/rc-service -e \1; then /sbin/rc-service \1 -- -Ds restart; fi" echo "yes" else echo "no" @@ -138,7 +165,7 @@ if [ -z "$RESTARTCMD" ]; then printf "Checking for invoke-rc.d ... " if [ -x /usr/sbin/invoke-rc.d ]; then RCDIR=/etc/init.d - RESTARTCMD="/usr/sbin/invoke-rc.d --quiet \1 status >/dev/null 2>\&1 \&\& /usr/sbin/invoke-rc.d \1 restart" + RESTARTCMD="if /usr/sbin/invoke-rc.d --quiet \1 status >/dev/null 2>\&1; then /usr/sbin/invoke-rc.d \1 restart; fi" echo "yes" else echo "no" @@ -148,7 +175,19 @@ if [ -z "$RESTARTCMD" ]; then printf "Checking for service ... " if [ -x /sbin/service ]; then RCDIR=/etc/init.d - RESTARTCMD="/sbin/service \1 \&\& /sbin/service \1 restart" + RESTARTCMD="if /sbin/service \1; then /sbin/service \1 restart; fi" + echo "yes" + else + echo "no" + fi +fi +if [ -z "$RESTARTCMD" ]; then + printf "Checking for runit... " + if [ -x /bin/sv ]; then + RESTARTCMD="/bin/sv try-restart \1" + echo "yes" + elif [ -x /usr/bin/sv ]; then + RESTARTCMD="/usr/bin/sv try-restart \1" echo "yes" else echo "no" @@ -159,7 +198,7 @@ if [ -z "$RESTARTCMD" ]; then printf "Checking for $x ... " if [ -d $x ]; then RCDIR=$x - RESTARTCMD="$x/\1 status >/dev/null 2>\&1 \&\& $x/\1 restart" + RESTARTCMD="if $x/\1 status >/dev/null 2>\&1; then $x/\1 restart; fi" echo "yes" break else @@ -169,7 +208,7 @@ if [ -z "$RESTARTCMD" ]; then fi if [ -z "$RESTARTCMD" ]; then - echo "WARNING! No means of interacting with system services detected!" + echo "$0: WARNING: No means of interacting with system services detected!" exit 1 fi Modified: stable/10/contrib/openresolv/dnsmasq.in ============================================================================== --- stable/10/contrib/openresolv/dnsmasq.in Mon May 11 00:16:32 2015 (r282745) +++ stable/10/contrib/openresolv/dnsmasq.in Mon May 11 01:33:34 2015 (r282746) @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2009 Roy Marples +# Copyright (c) 2007-2012 Roy Marples # All rights reserved # dnsmasq subscriber for resolvconf @@ -29,12 +29,13 @@ [ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0 . "@SYSCONFDIR@/resolvconf.conf" || exit 1 [ -z "$dnsmasq_conf" -a -z "$dnsmasq_resolv" ] && exit 0 -[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)" +[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)" NL=" " : ${dnsmasq_pid:=/var/run/dnsmasq.pid} [ -s "$dnsmasq_pid" ] || dnsmasq_pid=/var/run/dnsmasq/dnsmasq.pid +[ -s "$dnsmasq_pid" ] || unset dnsmasq_pid : ${dnsmasq_service:=dnsmasq} : ${dnsmasq_restart:=@RESTARTCMD ${dnsmasq_service}@} newconf="# Generated by resolvconf$NL" @@ -46,21 +47,18 @@ newresolv="$newconf" # so we need to validate a few things first. # Check for DBus support in the binary dbus=false -: ${dbus_pid:=/var/run/dbus/dbus.pid} -[ -s "$dbus_pid" ] || dbus_pid=/var/run/dbus.pid -[ -s "$dbus_pid" ] || dbus_pid=/var/run/dbus/pid -if [ -s "$dbus_pid" -a -s "$dnsmasq_pid" ]; then - if dnsmasq --version 2>/dev/null | \ - grep -q "^Compile time options.*[[:space:]]DBus[[:space:]]" +dbus_ex=false +dbus_introspect=$(dbus-send --print-reply --system \ + --dest=uk.org.thekelleys.dnsmasq \ + /uk/org/thekelleys/dnsmasq \ + org.freedesktop.DBus.Introspectable.Introspect \ + 2>/dev/null) +if [ $? = 0 ]; then + dbus=true + if printf %s "$dbus_introspect" | \ + grep -q '' then - # Sanity - check that dnsmasq and dbus are running - if kill -0 $(cat "$dbus_pid") 2>/dev/null && \ - kill -0 $(cat "$dnsmasq_pid") 2>/dev/null - then - dbus=true - newconf="$newconf$NL# Domain specific servers will" - newconf="$newconf be sent over dbus${NL}enable-dbus$NL" - fi + dbus_ex=true fi fi @@ -69,30 +67,97 @@ for n in $NAMESERVERS; do done dbusdest= +dbusdest_ex= +conf= for d in $DOMAINS; do dn="${d%%:*}" ns="${d#*:}" while [ -n "$ns" ]; do - if $dbus; then - SIFS=${IFS-y} OIFS=$IFS - IFS=. - set -- ${ns%%,*} - num="0x$(printf %02x $1 $2 $3 $4)" - if [ "$SIFS" = yi ]; then - unset IFS - else - IFS=$OIFS - fi - dbusdest="$dbusdest uint32:$(printf %u $num)" - dbusdest="$dbusdest string:$dn" - else - newconf="${newconf}server=/$dn/${ns%%,*}$NL" + n="${ns%%,*}" + if $dbus && ! $dbus_ex; then + case "$n" in + *.*.*.*) + SIFS=${IFS-y} OIFS=$IFS + IFS=. + set -- $n + num="0x$(printf %02x $1 $2 $3 $4)" + if [ "$SIFS" = y ]; then + unset IFS + else + IFS=$OIFS + fi + dbusdest="$dbusdest uint32:$(printf %u $num)" + dbusdest="$dbusdest string:$dn" + ;; + *:*%*) + # This version of dnsmasq won't accept + # scoped IPv6 addresses + dbus=false + ;; + *:*) + SIFS=${IFS-y} OIFS=$IFS bytes= front= back= + empty=false i=0 + IFS=: + set -- $n + while [ -n "$1" -o -n "$2" ]; do + addr="$1" + shift + if [ -z "$addr" ]; then + empty=true + continue + fi + i=$(($i + 1)) + while [ ${#addr} -lt 4 ]; do + addr="0${addr}" + done + byte1="$(printf %d 0x${addr%??})" + byte2="$(printf %d 0x${addr#??})" + if $empty; then + back="$back byte:$byte1 byte:$byte2" + else + front="$front byte:$byte1 byte:$byte2" + fi + done + while [ $i != 8 ]; do + i=$(($i + 1)) + front="$front byte:0 byte:0" + done + front="${front}$back" + if [ "$SIFS" = y ]; then + unset IFS + else + IFS=$OIFS + fi + dbusdest="${dbusdest}$front string:$dn" + ;; + *) + if ! $dbus_ex; then + dbus=false + fi + ;; + esac fi + dbusdest_ex="$dbusdest_ex${dbusdest_ex:+,}/$dn/$n" + conf="${conf}server=/$dn/$n$NL" [ "$ns" = "${ns#*,}" ] && break ns="${ns#*,}" done done +if $dbus; then + newconf="$newconf$NL# Domain specific servers will" + newconf="$newconf be sent over dbus${NL}" +else + newconf="$newconf$conf" +fi + +# Try to ensure that config dirs exist +if type config_mkdirs >/dev/null 2>&1; then + config_mkdirs "$dnsmasq_conf" "$dnsmasq_resolv" +else + @SBINDIR@/resolvconf -D "$dnsmasq_conf" "$dnsmasq_resolv" +fi + changed=false if [ -n "$dnsmasq_conf" ]; then if [ ! -f "$dnsmasq_conf" ] || \ @@ -103,14 +168,13 @@ if [ -n "$dnsmasq_conf" ]; then fi fi if [ -n "$dnsmasq_resolv" ]; then + # dnsmasq polls this file so no need to set changed=true if [ -f "$dnsmasq_resolv" ]; then if [ "$(cat "$dnsmasq_resolv")" != "$(printf %s "$newresolv")" ] then - changed=true printf %s "$newresolv" >"$dnsmasq_resolv" fi else - # dnsmasq polls this file so no need to set changed=true printf %s "$newresolv" >"$dnsmasq_resolv" fi fi @@ -119,9 +183,20 @@ if $changed; then eval $dnsmasq_restart fi if $dbus; then - $changed || kill -HUP $(cat "$dnsmasq_pid") + if [ -s "$dnsmasq_pid" ]; then + $changed || kill -HUP $(cat "$dnsmasq_pid") + fi # Send even if empty so old servers are cleared + if $dbus_ex; then + method=SetDomainServers + if [ -n "$dbusdest_ex" ]; then + dbusdest_ex="array:string:$dbusdest_ex" + fi + dbusdest="$dbusdest_ex" + else + method=SetServers + fi dbus-send --system --dest=uk.org.thekelleys.dnsmasq \ - /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetServers \ + /uk/org/thekelleys/dnsmasq uk.org.thekelleys.$method \ $dbusdest fi Modified: stable/10/contrib/openresolv/libc.in ============================================================================== --- stable/10/contrib/openresolv/libc.in Mon May 11 00:16:32 2015 (r282745) +++ stable/10/contrib/openresolv/libc.in Mon May 11 01:33:34 2015 (r282746) @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2009 Roy Marples +# Copyright (c) 2007-2014 Roy Marples # All rights reserved # libc subscriber for resolvconf @@ -36,18 +36,18 @@ NL=" # sed may not be available, and this is faster on small files key_get_value() { - local key="$1" value= x= line= + local key="$1" x= line= shift if [ $# -eq 0 ]; then - while read line; do + while read -r line; do case "$line" in "$key"*) echo "${line##$key}";; esac done else - for x; do - while read line; do + for x do + while read -r line; do case "$line" in "$key"*) echo "${line##$key}";; esac @@ -56,6 +56,24 @@ key_get_value() fi } +keys_remove() +{ + local key x line found + + while read -r line; do + found=false + for key do + case "$line" in + "$key"*|"#"*|" "*|" "*|"") found=true;; + esac + $found && break + done + $found || echo "$line" + done +} + +local_nameservers="127.* 0.0.0.0 255.255.255.255 ::1" + # Support original resolvconf configuration layout # as well as the openresolv config file if [ -f "$SYSCONFDIR"/resolvconf.conf ]; then @@ -64,12 +82,11 @@ elif [ -d "$SYSCONFDIR"/resolvconf ]; th SYSCONFDIR="$SYSCONFDIR/resolvconf/resolv.conf.d" base="$SYSCONFDIR/resolv.conf.d/base" if [ -f "$base" ]; then - name_servers="$(key_get_value "nameserver " "$base")" - search_domains="$(key_get_value "search " "$base")" - if [ -z "$search_domains" ]; then - search_domains="$(key_get_value "domain " "$base")" - fi + prepend_nameservers="$(key_get_value "nameserver " "$base")" + domain="$(key_get_value "domain " "$base")" + prepend_search="$(key_get_value "search " "$base")" resolv_conf_options="$(key_get_value "options " "$base")" + resolv_conf_sortlist="$(key_get_value "sortlist " "$base")" fi if [ -f "$SYSCONFDIR"/resolv.conf.d/head ]; then resolv_conf_head="$(cat "${SYSCONFDIR}"/resolv.conf.d/head)" @@ -81,7 +98,7 @@ fi : ${resolv_conf:=/etc/resolv.conf} : ${libc_service:=nscd} : ${libc_restart:=@RESTARTCMD ${libc_service}@} -: ${list_resolv:=@PREFIX@/sbin/resolvconf -l} +: ${list_resolv:=@SBINDIR@/resolvconf -l} if [ "${resolv_conf_head-x}" = x -a -f "$SYSCONFDIR"/resolv.conf.head ]; then resolv_conf_head="$(cat "${SYSCONFDIR}"/resolv.conf.head)" fi @@ -89,6 +106,9 @@ if [ "${resolv_conf_tail-x}" = x -a -f " resolv_conf_tail="$(cat "$SYSCONFDIR"/resolv.conf.tail)" fi +backup=true +signature="# Generated by resolvconf" + uniqify() { local result= @@ -104,6 +124,7 @@ uniqify() case "${resolv_conf_passthrough:-NO}" in [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + backup=false newest= for conf in "$IFACEDIR"/*; do if [ -z "$newest" -o "$conf" -nt "$newest" ]; then @@ -113,31 +134,70 @@ case "${resolv_conf_passthrough:-NO}" in [ -z "$newest" ] && exit 0 newconf="$(cat "$newest")$NL" ;; +/dev/null|[Nn][Uu][Ll][Ll]) + : ${resolv_conf_local_only:=NO} + if [ "$local_nameservers" = "127.* 0.0.0.0 255.255.255.255 ::1" ]; then + local_nameservers= + fi + # Need to overwrite our variables. + eval "$(@SBINDIR@/resolvconf -V)" + ;; + +*) + [ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)" + ;; +esac +case "${resolv_conf_passthrough:-NO}" in +[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) ;; *) - [ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)" - newsearch="$(uniqify $search_domains $SEARCH $search_domains_append)" + : ${domain:=$DOMAIN} + newsearch="$(uniqify $prepend_search $SEARCH $append_search)" NS="$LOCALNAMESERVERS $NAMESERVERS" - newns="$(uniqify $name_servers $NS $name_servers_append)" + newns= + gotlocal=false + for n in $(uniqify $prepend_nameservers $NS $append_nameservers); do + add=true + islocal=false + for l in $local_nameservers; do + case "$n" in + $l) islocal=true; gotlocal=true; break;; + esac + done + if ! $islocal; then + case "${resolv_conf_local_only:-YES}" in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + $gotlocal && add=false;; + esac + fi + $add && newns="$newns $n" + done # Hold our new resolv.conf in a variable to save on temporary files - newconf="# Generated by resolvconf$NL" + newconf="$signature$NL" if [ -n "$resolv_conf_head" ]; then newconf="$newconf$resolv_conf_head$NL" fi - [ -n "$newsearch" ] && newconf="${newconf}search $newsearch$NL" + + [ -n "$domain" ] && newconf="${newconf}domain $domain$NL" + if [ -n "$newsearch" -a "$newsearch" != "$domain" ]; then + newconf="${newconf}search $newsearch$NL" + fi for n in $newns; do newconf="${newconf}nameserver $n$NL" done - # Now get any configured options - opts="$resolv_conf_options${resolv_conf_options:+ }" - opts="$opts$($list_resolv | key_get_value "options ")" - if [ -n "$opts" ]; then - newconf="${newconf}options" - for opt in $(uniqify $opts); do - newconf="${newconf} $opt" - done - newconf="$newconf$NL" + # Now add anything we don't care about such as sortlist and options + stuff="$($list_resolv | keys_remove nameserver domain search)" + if [ -n "$stuff" ]; then + newconf="$newconf$stuff$NL" + fi + + # Append any user defined ones + if [ -n "$resolv_conf_options" ]; then + newconf="${newconf}options $resolv_conf_options$NL" + fi + if [ -n "$resolv_conf_sortlist" ]; then + newconf="${newconf}sortlist $resolv_conf_sortlist$NL" fi if [ -n "$resolv_conf_tail" ]; then @@ -151,6 +211,22 @@ if [ -e "$resolv_conf" ]; then [ "$(cat "$resolv_conf")" = "$(printf %s "$newconf")" ] && exit 0 fi +# Change is good. +# If the old file does not have our signature, back it up. +# If the new file just has our signature, restore the backup. +if $backup; then + if [ "$newconf" = "$signature$NL" ]; then + if [ -e "$resolv_conf.bak" ]; then + newconf="$(cat "$resolv_conf.bak")" + fi + elif [ -e "$resolv_conf" ]; then + read line <"$resolv_conf" + if [ "$line" != "$signature" ]; then + cp "$resolv_conf" "$resolv_conf.bak" + fi + fi +fi + # Create our resolv.conf now (umask 022; echo "$newconf" >"$resolv_conf") eval $libc_restart @@ -162,7 +238,7 @@ for script in "$LIBEXECDIR"/libc.d/*; do if [ -x "$script" ]; then "$script" "$@" else - (. "$script" "$@") + (. "$script") fi retval=$(($retval + $?)) fi Modified: stable/10/contrib/openresolv/named.in ============================================================================== --- stable/10/contrib/openresolv/named.in Mon May 11 00:16:32 2015 (r282745) +++ stable/10/contrib/openresolv/named.in Mon May 11 01:33:34 2015 (r282746) @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2007-2009 Roy Marples +# Copyright (c) 2007-2012 Roy Marples # All rights reserved # named subscriber for resolvconf @@ -29,7 +29,7 @@ [ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0 . "@SYSCONFDIR@/resolvconf.conf" || exit 1 [ -z "$named_zones" -a -z "$named_options" ] && exit 0 -[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)" +[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)" NL=" " @@ -40,6 +40,9 @@ then if [ -x "@RCDIR@"/bind9 ]; then # Debian and derivatives named_service=bind9 + elif [ -x "@RCDIR@"/rc.bind ]; then + # Slackware + named_service=rc.bind fi fi : ${named_service:=named} @@ -71,6 +74,13 @@ for d in $DOMAINS; do newzones="$newzones };$NL};$NL" done +# Try to ensure that config dirs exist +if type config_mkdirs >/dev/null 2>&1; then + config_mkdirs "$named_options" "$named_zones" +else + @SBINDIR@/resolvconf -D "$named_options" "$named_zones" +fi + # No point in changing files or reloading bind if the end result has not # changed changed=false Copied: stable/10/contrib/openresolv/pdns_recursor.in (from r282434, head/contrib/openresolv/pdns_recursor.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/openresolv/pdns_recursor.in Mon May 11 01:33:34 2015 (r282746, copy of r282434, head/contrib/openresolv/pdns_recursor.in) @@ -0,0 +1,72 @@ +#!/bin/sh +# Copyright (c) 2009-2011 Roy Marples +# All rights reserved + +# PowerDNS Recursor subscriber for resolvconf + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * 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 COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +[ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0 +. "@SYSCONFDIR@/resolvconf.conf" || exit 1 +[ -z "$pdns_zones" ] && exit 0 +[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)" +NL=" +" + +: ${pdns_service:=pdns_recursor} +: ${pdns_restart:=@RESTARTCMD ${pdns_service}@} + +newzones= + +# pds_recursor does not present support global forward servers, which +# does limit it's usefulness somewhat. +# If it did, the below code can be enabled, or something like it. +#for n in $NAMESERVERS; do +# newzones="$newzones${newzones:+,}$n" +#done +#[ -n "$newzones" ] && newzones=".=$newzones$NL" + +for d in $DOMAINS; do + newns= + ns="${d#*:}" + while [ -n "$ns" ]; do + newns="$newns${newns:+,}${ns%%,*}" + [ "$ns" = "${ns#*,}" ] && break + ns="${ns#*,}" + done + [ -n "$newns" ] && newzones="$newzones${d%%:*}=$newns$NL" +done + +# Try to ensure that config dirs exist +if type config_mkdirs >/dev/null 2>&1; then + config_mkdirs "$pdnsd_zones" +else + @SBINDIR@/resolvconf -D "$pdnsd_zones" +fi + +if [ ! -f "$pdns_zones" ] || \ + [ "$(cat "$pdns_zones")" != "$(printf %s "$newzones")" ] +then + printf %s "$newzones" >"$pdns_zones" + eval $pdns_restart +fi Modified: stable/10/contrib/openresolv/pdnsd.in ============================================================================== --- stable/10/contrib/openresolv/pdnsd.in Mon May 11 00:16:32 2015 (r282745) +++ stable/10/contrib/openresolv/pdnsd.in Mon May 11 01:33:34 2015 (r282746) @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2010 Roy Marples +# Copyright (c) 2010-2013 Roy Marples # All rights reserved # pdnsd subscriber for resolvconf @@ -29,7 +29,9 @@ [ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0 . "@SYSCONFDIR@/resolvconf.conf" || exit 1 [ -z "$pdnsd_conf" -a -z "$pdnsd_resolv" ] && exit 0 -[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)" +[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)" +NL=" +" : ${pdnsd_restart:=pdnsd-ctl config $pdnsd_conf} signature="# Generated by resolvconf" @@ -46,7 +48,7 @@ remove_markers() sed "/^$m1/,/^$m2/d" $@ else for x; do - while read line; do + while read -r line; do case "$line" in "$m1"*) in_marker=1;; "$m2"*) in_marker=0;; @@ -80,24 +82,32 @@ change_file() return 0 } -newresolv="# Generated by resolvconf\n" +newresolv="# Generated by resolvconf$NL" changed=false +# Try to ensure that config dirs exist +if type config_mkdirs >/dev/null 2>&1; then + config_mkdirs "$pdnsd_resolv" "$pdnsd_conf" +else + @SBINDIR@/resolvconf -D "$pdnsd_resolv" "$pdnsd_conf" +fi + if [ -n "$pdnsd_resolv" ]; then for n in $NAMESERVERS; do - newresolv="${newresolv}nameserver $n\n" + newresolv="${newresolv}nameserver $n$NL" done fi -if [ -n "$pdnsd_conf" ]; then +# Only modify the configuration if it exists and we can write to it +if [ -w "$pdnsd_conf" ]; then cf="$pdnsd_conf.new" newconf= if [ -z "$pdnsd_resolv" ]; then - newconf="${newconf}server {\n" - newconf="${newconf}\tlabel=resolvconf;\n" + newconf="${newconf}server {$NL" + newconf="${newconf} label=resolvconf;$NL" if [ -n "$NAMESERVERS" ]; then - newconf="${newconf}\tip=" + newconf="${newconf} ip=" first=true for n in $NAMESERVERS; do if $first; then @@ -107,16 +117,16 @@ if [ -n "$pdnsd_conf" ]; then fi newconf="$newconf$n" done - newconf="${newconf};\n" + newconf="${newconf};$NL" fi - newconf="${newconf}}\n" + newconf="${newconf}}$NL" fi for d in $DOMAINS; do - newconf="${newconf}server {\n" - newconf="${newconf}\tinclude=.${d%%:*}.;\n" - newconf="${newconf}\tpolicy=excluded;\n" - newconf="${newconf}\tip=" + newconf="${newconf}server {$NL" + newconf="${newconf} include=.${d%%:*}.;$NL" + newconf="${newconf} policy=excluded;$NL" + newconf="${newconf} ip=" ns="${d#*:}" while [ -n "$ns" ]; do newconf="${newconf}${ns%%,*}" @@ -124,7 +134,7 @@ if [ -n "$pdnsd_conf" ]; then ns="${ns#*,}" newconf="${newconf}," done - newconf="${newconf};\n}\n" + newconf="${newconf};$NL}$NL" done rm -f "$cf" @@ -136,7 +146,7 @@ if [ -n "$pdnsd_conf" ]; then fi if change_file "$pdnsd_conf" "$cf"; then changed=true - fi + fi fi if [ -n "$pdnsd_resolv" ]; then Modified: stable/10/contrib/openresolv/resolvconf.8.in ============================================================================== --- stable/10/contrib/openresolv/resolvconf.8.in Mon May 11 00:16:32 2015 (r282745) +++ stable/10/contrib/openresolv/resolvconf.8.in Mon May 11 01:33:34 2015 (r282746) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2007-2009 Roy Marples +.\" Copyright (c) 2007-2015 Roy Marples .\" All rights reserved .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,8 +22,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 3, 2009 -.Dt RESOLVCONF 8 SMM *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon May 11 07:54:43 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20AEBA03; Mon, 11 May 2015 07:54:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 0CBC71BB8; Mon, 11 May 2015 07:54:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B7shdQ088187; Mon, 11 May 2015 07:54:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B7seVh088151; Mon, 11 May 2015 07:54:40 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110754.t4B7seVh088151@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 07:54: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: r282748 - in stable/10/sys: cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/sys cddl/dev/cyclic cddl/dev/fbt cddl/dev/profile ... 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 07:54:43 -0000 Author: avg Date: Mon May 11 07:54:39 2015 New Revision: 282748 URL: https://svnweb.freebsd.org/changeset/base/282748 Log: MFC r275576: remove opensolaris cyclic code, replace with high-precision callouts Deleted: stable/10/sys/cddl/compat/opensolaris/sys/cyclic.h stable/10/sys/cddl/compat/opensolaris/sys/cyclic_impl.h stable/10/sys/cddl/dev/cyclic/ Modified: stable/10/sys/cddl/compat/opensolaris/sys/cpuvar.h stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h stable/10/sys/cddl/dev/fbt/fbt.c stable/10/sys/cddl/dev/profile/profile.c stable/10/sys/kern/kern_clocksource.c stable/10/sys/modules/Makefile stable/10/sys/modules/dtrace/Makefile.inc stable/10/sys/modules/dtrace/dtraceall/dtraceall.c stable/10/sys/sys/dtrace_bsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/compat/opensolaris/sys/cpuvar.h ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/sys/cpuvar.h Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/cddl/compat/opensolaris/sys/cpuvar.h Mon May 11 07:54:39 2015 (r282748) @@ -38,11 +38,8 @@ struct cyc_cpu; typedef struct { int cpuid; - struct cyc_cpu *cpu_cyclic; uint32_t cpu_flags; uint_t cpu_intr_actv; - uintptr_t cpu_profile_pc; - uintptr_t cpu_profile_upc; uintptr_t cpu_dtrace_caller; /* DTrace: caller, if any */ hrtime_t cpu_dtrace_chillmark; /* DTrace: chill mark time */ hrtime_t cpu_dtrace_chilled; /* DTrace: total chill time */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon May 11 07:54:39 2015 (r282748) @@ -17947,6 +17947,5 @@ SYSINIT(dtrace_anon_init, SI_SUB_DTRACE_ DEV_MODULE(dtrace, dtrace_modevent, NULL); MODULE_VERSION(dtrace, 1); -MODULE_DEPEND(dtrace, cyclic, 1, 1, 1); MODULE_DEPEND(dtrace, opensolaris, 1, 1, 1); #endif Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Mon May 11 07:54:39 2015 (r282748) @@ -57,6 +57,7 @@ extern "C" { #if defined(sun) #include #else +#include #include #include #include @@ -64,8 +65,8 @@ extern "C" { typedef int model_t; #endif #include -#include #if defined(sun) +#include #include #else #include Modified: stable/10/sys/cddl/dev/fbt/fbt.c ============================================================================== --- stable/10/sys/cddl/dev/fbt/fbt.c Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/cddl/dev/fbt/fbt.c Mon May 11 07:54:39 2015 (r282748) @@ -428,13 +428,6 @@ fbt_provide_module(void *arg, modctl_t * return; /* - * The cyclic timer subsystem can be built as a module and DTrace - * depends on that, so it is ineligible too. - */ - if (strcmp(modname, "cyclic") == 0) - return; - - /* * To register with DTrace, a module must list 'dtrace' as a * dependency in order for the kernel linker to resolve * symbols like dtrace_register(). All modules with such a Modified: stable/10/sys/cddl/dev/profile/profile.c ============================================================================== --- stable/10/sys/cddl/dev/profile/profile.c Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/cddl/dev/profile/profile.c Mon May 11 07:54:39 2015 (r282748) @@ -52,9 +52,9 @@ #include #include #include +#include #include -#include #include #include @@ -97,7 +97,7 @@ * allow for a manual override in case we get it completely wrong. */ #ifdef __amd64 -#define PROF_ARTIFICIAL_FRAMES 7 +#define PROF_ARTIFICIAL_FRAMES 10 #else #ifdef __i386 #define PROF_ARTIFICIAL_FRAMES 6 @@ -126,18 +126,30 @@ #define PROF_ARTIFICIAL_FRAMES 3 #endif +struct profile_probe_percpu; + typedef struct profile_probe { char prof_name[PROF_NAMELEN]; dtrace_id_t prof_id; int prof_kind; +#ifdef illumos hrtime_t prof_interval; cyclic_id_t prof_cyclic; +#else + sbintime_t prof_interval; + struct callout prof_cyclic; + sbintime_t prof_expected; + struct profile_probe_percpu **prof_pcpus; +#endif } profile_probe_t; typedef struct profile_probe_percpu { hrtime_t profc_expected; hrtime_t profc_interval; profile_probe_t *profc_probe; +#ifdef __FreeBSD__ + struct callout profc_cyclic; +#endif } profile_probe_percpu_t; static d_open_t profile_open; @@ -206,29 +218,92 @@ static dtrace_provider_id_t profile_id; static hrtime_t profile_interval_min = NANOSEC / 5000; /* 5000 hz */ static int profile_aframes = 0; /* override */ +static sbintime_t +nsec_to_sbt(hrtime_t nsec) +{ + time_t sec; + + /* + * We need to calculate nsec * 2^32 / 10^9 + * Seconds and nanoseconds are split to avoid overflow. + */ + sec = nsec / NANOSEC; + nsec = nsec % NANOSEC; + return (((sbintime_t)sec << 32) | ((sbintime_t)nsec << 32) / NANOSEC); +} + +static hrtime_t +sbt_to_nsec(sbintime_t sbt) +{ + + return ((sbt >> 32) * NANOSEC + + (((uint32_t)sbt * (hrtime_t)NANOSEC) >> 32)); +} + static void profile_fire(void *arg) { profile_probe_percpu_t *pcpu = arg; profile_probe_t *prof = pcpu->profc_probe; hrtime_t late; - solaris_cpu_t *c = &solaris_cpu[curcpu]; + struct trapframe *frame; + uintfptr_t pc, upc; +#ifdef illumos late = gethrtime() - pcpu->profc_expected; - pcpu->profc_expected += pcpu->profc_interval; +#else + late = sbt_to_nsec(sbinuptime() - pcpu->profc_expected); +#endif - dtrace_probe(prof->prof_id, c->cpu_profile_pc, - c->cpu_profile_upc, late, 0, 0); + pc = 0; + upc = 0; + + /* + * td_intr_frame can be unset if this is a catch up event + * after waking up from idle sleep. + * This can only happen on a CPU idle thread. + */ + frame = curthread->td_intr_frame; + if (frame != NULL) { + if (TRAPF_USERMODE(frame)) + upc = TRAPF_PC(frame); + else + pc = TRAPF_PC(frame); + } + dtrace_probe(prof->prof_id, pc, upc, late, 0, 0); + + pcpu->profc_expected += pcpu->profc_interval; + callout_schedule_sbt_curcpu(&pcpu->profc_cyclic, + pcpu->profc_expected, 0, C_DIRECT_EXEC | C_ABSOLUTE); } static void profile_tick(void *arg) { profile_probe_t *prof = arg; - solaris_cpu_t *c = &solaris_cpu[curcpu]; + struct trapframe *frame; + uintfptr_t pc, upc; + + pc = 0; + upc = 0; + + /* + * td_intr_frame can be unset if this is a catch up event + * after waking up from idle sleep. + * This can only happen on a CPU idle thread. + */ + frame = curthread->td_intr_frame; + if (frame != NULL) { + if (TRAPF_USERMODE(frame)) + upc = TRAPF_PC(frame); + else + pc = TRAPF_PC(frame); + } + dtrace_probe(prof->prof_id, pc, upc, 0, 0, 0); - dtrace_probe(prof->prof_id, c->cpu_profile_pc, - c->cpu_profile_upc, 0, 0, 0); + prof->prof_expected += prof->prof_interval; + callout_schedule_sbt(&prof->prof_cyclic, + prof->prof_expected, 0, C_DIRECT_EXEC | C_ABSOLUTE); } static void @@ -250,8 +325,13 @@ profile_create(hrtime_t interval, char * prof = kmem_zalloc(sizeof (profile_probe_t), KM_SLEEP); (void) strcpy(prof->prof_name, name); +#ifdef illumos prof->prof_interval = interval; prof->prof_cyclic = CYCLIC_NONE; +#else + prof->prof_interval = nsec_to_sbt(interval); + callout_init(&prof->prof_cyclic, CALLOUT_MPSAFE); +#endif prof->prof_kind = kind; prof->prof_id = dtrace_probe_create(profile_id, NULL, NULL, name, @@ -396,13 +476,18 @@ profile_destroy(void *arg, dtrace_id_t i { profile_probe_t *prof = parg; +#ifdef illumos ASSERT(prof->prof_cyclic == CYCLIC_NONE); +#else + ASSERT(!callout_active(&prof->prof_cyclic) && prof->prof_pcpus == NULL); +#endif kmem_free(prof, sizeof (profile_probe_t)); ASSERT(profile_total >= 1); atomic_add_32(&profile_total, -1); } +#ifdef illumos /*ARGSUSED*/ static void profile_online(void *arg, cpu_t *cpu, cyc_handler_t *hdlr, cyc_time_t *when) @@ -478,6 +563,81 @@ profile_disable(void *arg, dtrace_id_t i prof->prof_cyclic = CYCLIC_NONE; } +#else + +static void +profile_enable_omni(profile_probe_t *prof) +{ + profile_probe_percpu_t *pcpu; + int cpu; + + prof->prof_pcpus = kmem_zalloc((mp_maxid + 1) * sizeof(pcpu), KM_SLEEP); + CPU_FOREACH(cpu) { + pcpu = kmem_zalloc(sizeof(profile_probe_percpu_t), KM_SLEEP); + prof->prof_pcpus[cpu] = pcpu; + pcpu->profc_probe = prof; + pcpu->profc_expected = sbinuptime() + prof->prof_interval; + pcpu->profc_interval = prof->prof_interval; + callout_init(&pcpu->profc_cyclic, CALLOUT_MPSAFE); + callout_reset_sbt_on(&pcpu->profc_cyclic, + pcpu->profc_expected, 0, profile_fire, pcpu, + cpu, C_DIRECT_EXEC | C_ABSOLUTE); + } +} + +static void +profile_disable_omni(profile_probe_t *prof) +{ + profile_probe_percpu_t *pcpu; + int cpu; + + ASSERT(prof->prof_pcpus != NULL); + CPU_FOREACH(cpu) { + pcpu = prof->prof_pcpus[cpu]; + ASSERT(pcpu->profc_probe == prof); + ASSERT(callout_active(&pcpu->profc_cyclic)); + callout_stop(&pcpu->profc_cyclic); + callout_drain(&pcpu->profc_cyclic); + kmem_free(pcpu, sizeof(profile_probe_percpu_t)); + } + kmem_free(prof->prof_pcpus, (mp_maxid + 1) * sizeof(pcpu)); + prof->prof_pcpus = NULL; +} + +/* ARGSUSED */ +static void +profile_enable(void *arg, dtrace_id_t id, void *parg) +{ + profile_probe_t *prof = parg; + + if (prof->prof_kind == PROF_TICK) { + prof->prof_expected = sbinuptime() + prof->prof_interval; + callout_reset_sbt(&prof->prof_cyclic, + prof->prof_expected, 0, profile_tick, prof, + C_DIRECT_EXEC | C_ABSOLUTE); + } else { + ASSERT(prof->prof_kind == PROF_PROFILE); + profile_enable_omni(prof); + } +} + +/* ARGSUSED */ +static void +profile_disable(void *arg, dtrace_id_t id, void *parg) +{ + profile_probe_t *prof = parg; + + if (prof->prof_kind == PROF_TICK) { + ASSERT(callout_active(&prof->prof_cyclic)); + callout_stop(&prof->prof_cyclic); + callout_drain(&prof->prof_cyclic); + } else { + ASSERT(prof->prof_kind == PROF_PROFILE); + profile_disable_omni(prof); + } +} +#endif + static void profile_load(void *dummy) { @@ -541,5 +701,4 @@ SYSUNINIT(profile_unload, SI_SUB_DTRACE_ DEV_MODULE(profile, profile_modevent, NULL); MODULE_VERSION(profile, 1); MODULE_DEPEND(profile, dtrace, 1, 1, 1); -MODULE_DEPEND(profile, cyclic, 1, 1, 1); MODULE_DEPEND(profile, opensolaris, 1, 1, 1); Modified: stable/10/sys/kern/kern_clocksource.c ============================================================================== --- stable/10/sys/kern/kern_clocksource.c Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/kern/kern_clocksource.c Mon May 11 07:54:39 2015 (r282748) @@ -55,11 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef KDTRACE_HOOKS -#include -cyclic_clock_func_t cyclic_clock_func = NULL; -#endif - int cpu_deepest_sleep = 0; /* Deepest Cx state available. */ int cpu_disable_c2_sleep = 0; /* Timer dies in C2. */ int cpu_disable_c3_sleep = 0; /* Timer dies in C3. */ @@ -129,9 +124,6 @@ struct pcpu_state { sbintime_t nextprof; /* Next profclock() event. */ sbintime_t nextcall; /* Next callout event. */ sbintime_t nextcallopt; /* Next optional callout event. */ -#ifdef KDTRACE_HOOKS - sbintime_t nextcyc; /* Next OpenSolaris cyclics event. */ -#endif int ipi; /* This CPU needs IPI. */ int idle; /* This CPU is in idle mode. */ }; @@ -223,13 +215,6 @@ handleevents(sbintime_t now, int fake) callout_process(now); } -#ifdef KDTRACE_HOOKS - if (fake == 0 && now >= state->nextcyc && cyclic_clock_func != NULL) { - state->nextcyc = INT64_MAX; - (*cyclic_clock_func)(frame); - } -#endif - t = getnextcpuevent(0); ET_HW_LOCK(state); if (!busy) { @@ -275,10 +260,6 @@ getnextcpuevent(int idle) if (profiling && event > state->nextprof) event = state->nextprof; } -#ifdef KDTRACE_HOOKS - if (event > state->nextcyc) - event = state->nextcyc; -#endif return (event); } @@ -599,9 +580,6 @@ cpu_initclocks_bsp(void) CPU_FOREACH(cpu) { state = DPCPU_ID_PTR(cpu, timerstate); mtx_init(&state->et_hw_mtx, "et_hw_mtx", NULL, MTX_SPIN); -#ifdef KDTRACE_HOOKS - state->nextcyc = INT64_MAX; -#endif state->nextcall = INT64_MAX; state->nextcallopt = INT64_MAX; } @@ -820,41 +798,6 @@ cpu_et_frequency(struct eventtimer *et, ET_UNLOCK(); } -#ifdef KDTRACE_HOOKS -void -clocksource_cyc_set(const struct bintime *bt) -{ - sbintime_t now, t; - struct pcpu_state *state; - - /* Do not touch anything if somebody reconfiguring timers. */ - if (busy) - return; - t = bttosbt(*bt); - state = DPCPU_PTR(timerstate); - if (periodic) - now = state->now; - else - now = sbinuptime(); - - CTR5(KTR_SPARE2, "set_cyc at %d: now %d.%08x t %d.%08x", - curcpu, (int)(now >> 32), (u_int)(now & 0xffffffff), - (int)(t >> 32), (u_int)(t & 0xffffffff)); - - ET_HW_LOCK(state); - if (t == state->nextcyc) - goto done; - state->nextcyc = t; - if (t >= state->nextevent) - goto done; - state->nextevent = t; - if (!periodic) - loadtimer(now, 0); -done: - ET_HW_UNLOCK(state); -} -#endif - void cpu_new_callout(int cpu, sbintime_t bt, sbintime_t bt_opt) { Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/modules/Makefile Mon May 11 07:54:39 2015 (r282748) @@ -85,7 +85,6 @@ SUBDIR= \ ctl \ ${_cxgb} \ ${_cxgbe} \ - ${_cyclic} \ dc \ dcons \ dcons_crom \ @@ -498,9 +497,6 @@ _cp= cp _cpuctl= cpuctl _cpufreq= cpufreq _cs= cs -.if ${MK_CDDL} != "no" || defined(ALL_MODULES) -_cyclic= cyclic -.endif _dpms= dpms _drm= drm _drm2= drm2 @@ -847,9 +843,6 @@ _cardbus= cardbus _cbb= cbb _cfi= cfi _cpufreq= cpufreq -.if ${MK_CDDL} != "no" || defined(ALL_MODULES) -_cyclic= cyclic -.endif _drm= drm .if ${MK_CDDL} != "no" || defined(ALL_MODULES) _dtrace= dtrace Modified: stable/10/sys/modules/dtrace/Makefile.inc ============================================================================== --- stable/10/sys/modules/dtrace/Makefile.inc Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/modules/dtrace/Makefile.inc Mon May 11 07:54:39 2015 (r282748) @@ -3,7 +3,6 @@ IGNORE_PRAGMA= 1 load : - -kldload cyclic -kldload dtrace .if ${MACHINE_CPUARCH} == "i386" -kldload sdt @@ -25,5 +24,4 @@ unload : -kldunload sdt .endif -kldunload dtrace - -kldunload cyclic kldstat Modified: stable/10/sys/modules/dtrace/dtraceall/dtraceall.c ============================================================================== --- stable/10/sys/modules/dtrace/dtraceall/dtraceall.c Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/modules/dtrace/dtraceall/dtraceall.c Mon May 11 07:54:39 2015 (r282748) @@ -63,7 +63,6 @@ DEV_MODULE(dtraceall, dtraceall_modevent MODULE_VERSION(dtraceall, 1); /* All the DTrace modules should be dependencies here: */ -MODULE_DEPEND(dtraceall, cyclic, 1, 1, 1); MODULE_DEPEND(dtraceall, opensolaris, 1, 1, 1); MODULE_DEPEND(dtraceall, dtrace, 1, 1, 1); MODULE_DEPEND(dtraceall, dtmalloc, 1, 1, 1); Modified: stable/10/sys/sys/dtrace_bsd.h ============================================================================== --- stable/10/sys/sys/dtrace_bsd.h Mon May 11 04:54:56 2015 (r282747) +++ stable/10/sys/sys/dtrace_bsd.h Mon May 11 07:54:39 2015 (r282748) @@ -42,15 +42,6 @@ struct devstat; struct bio; /* - * Cyclic clock function type definition used to hook the cyclic - * subsystem into the appropriate timer interrupt. - */ -typedef void (*cyclic_clock_func_t)(struct trapframe *); -extern cyclic_clock_func_t cyclic_clock_func; - -void clocksource_cyc_set(const struct bintime *t); - -/* * The dtrace module handles traps that occur during a DTrace probe. * This type definition is used in the trap handler to provide a * hook for the dtrace module to register it's handler with. From owner-svn-src-stable@FreeBSD.ORG Mon May 11 08:00:18 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05632B99; Mon, 11 May 2015 08:00:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 E82551BE1; Mon, 11 May 2015 08:00:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B80H9J089084; Mon, 11 May 2015 08:00:17 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B80GQ6089078; Mon, 11 May 2015 08:00:16 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110800.t4B80GQ6089078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:00:16 +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: r282749 - in stable/10/sys/dev: fb vt vt/hw/fb 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:00:18 -0000 Author: avg Date: Mon May 11 08:00:16 2015 New Revision: 282749 URL: https://svnweb.freebsd.org/changeset/base/282749 Log: MFC r277795,278849: vt(4): Use power_{suspend,resume} event handlers Modified: stable/10/sys/dev/fb/fbd.c stable/10/sys/dev/vt/hw/fb/vt_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.h stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fb/fbd.c ============================================================================== --- stable/10/sys/dev/fb/fbd.c Mon May 11 07:54:39 2015 (r282748) +++ stable/10/sys/dev/fb/fbd.c Mon May 11 08:00:16 2015 (r282749) @@ -332,22 +332,6 @@ fbd_detach(device_t dev) return (err); } -static int -fbd_suspend(device_t dev) -{ - - vt_fb_suspend(); - return (bus_generic_suspend(dev)); -} - -static int -fbd_resume(device_t dev) -{ - - vt_fb_resume(); - return (bus_generic_resume(dev)); -} - static device_method_t fbd_methods[] = { /* Device interface */ DEVMETHOD(device_probe, fbd_probe), @@ -355,8 +339,6 @@ static device_method_t fbd_methods[] = { DEVMETHOD(device_detach, fbd_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, fbd_suspend), - DEVMETHOD(device_resume, fbd_resume), { 0, 0 } }; Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Mon May 11 07:54:39 2015 (r282748) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Mon May 11 08:00:16 2015 (r282749) @@ -53,6 +53,8 @@ static struct vt_driver vt_fb_driver = { .vd_priority = VD_PRIORITY_GENERIC+10, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, + .vd_suspend = vt_fb_suspend, + .vd_resume = vt_fb_resume, }; VT_DRIVER_DECLARE(vt_fb, vt_fb_driver); @@ -441,15 +443,15 @@ vt_fb_attach(struct fb_info *info) } void -vt_fb_resume(void) +vt_fb_suspend(struct vt_device *vd) { - vt_resume(); + vt_suspend(vd); } void -vt_fb_suspend(void) +vt_fb_resume(struct vt_device *vd) { - vt_suspend(); + vt_resume(vd); } Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.h Mon May 11 07:54:39 2015 (r282748) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.h Mon May 11 08:00:16 2015 (r282749) @@ -33,8 +33,8 @@ #define _DEV_VT_HW_FB_VT_FB_H_ /* Generic framebuffer interface call vt_fb_attach to init VT(9) */ int vt_fb_attach(struct fb_info *info); -void vt_fb_resume(void); -void vt_fb_suspend(void); +void vt_fb_resume(struct vt_device *vd); +void vt_fb_suspend(struct vt_device *vd); vd_init_t vt_fb_init; vd_blank_t vt_fb_blank; Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Mon May 11 07:54:39 2015 (r282748) +++ stable/10/sys/dev/vt/vt.h Mon May 11 08:00:16 2015 (r282749) @@ -91,8 +91,6 @@ TUNABLE_INT("kern.vt." #_name, &vt_##_na struct vt_driver; void vt_allocate(struct vt_driver *, void *); -void vt_resume(void); -void vt_suspend(void); typedef unsigned int vt_axis_t; @@ -162,6 +160,9 @@ struct vt_device { #define VD_PASTEBUFSZ(vd) ((vd)->vd_pastebuf.vpb_bufsz) #define VD_PASTEBUFLEN(vd) ((vd)->vd_pastebuf.vpb_len) +void vt_resume(struct vt_device *vd); +void vt_suspend(struct vt_device *vd); + /* * Per-window terminal screen buffer. * @@ -314,6 +315,8 @@ typedef int vd_fb_mmap_t(struct vt_devic typedef void vd_drawrect_t(struct vt_device *, int, int, int, int, int, term_color_t); typedef void vd_setpixel_t(struct vt_device *, int, int, term_color_t); +typedef void vd_suspend_t(struct vt_device *); +typedef void vd_resume_t(struct vt_device *); struct vt_driver { char vd_name[16]; @@ -337,6 +340,10 @@ struct vt_driver { /* Update display setting on vt switch. */ vd_postswitch_t *vd_postswitch; + /* Suspend/resume handlers. */ + vd_suspend_t *vd_suspend; + vd_resume_t *vd_resume; + /* Priority to know which one can override */ int vd_priority; #define VD_PRIORITY_DUMB 10 Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Mon May 11 07:54:39 2015 (r282748) +++ stable/10/sys/dev/vt/vt_core.c Mon May 11 08:00:16 2015 (r282749) @@ -166,6 +166,8 @@ static void vt_update_static(void *); #ifndef SC_NO_CUTPASTE static void vt_mouse_paste(void); #endif +static void vt_suspend_handler(void *priv); +static void vt_resume_handler(void *priv); SET_DECLARE(vt_drv_set, struct vt_driver); @@ -2507,6 +2509,7 @@ vt_upgrade(struct vt_device *vd) { struct vt_window *vw; unsigned int i; + int register_handlers; if (!vty_enabled(VTY_VT)) return; @@ -2535,6 +2538,7 @@ vt_upgrade(struct vt_device *vd) if (vd->vd_curwindow == NULL) vd->vd_curwindow = vd->vd_windows[VT_CONSWINDOW]; + register_handlers = 0; if (!(vd->vd_flags & VDF_ASYNC)) { /* Attach keyboard. */ vt_allocate_keyboard(vd); @@ -2546,12 +2550,21 @@ vt_upgrade(struct vt_device *vd) vd->vd_flags |= VDF_ASYNC; callout_reset(&vd->vd_timer, hz / VT_TIMERFREQ, vt_timer, vd); vd->vd_timer_armed = 1; + register_handlers = 1; } VT_UNLOCK(vd); /* Refill settings with new sizes. */ vt_resize(vd); + + if (register_handlers) { + /* Register suspend/resume handlers. */ + EVENTHANDLER_REGISTER(power_suspend, vt_suspend_handler, vd, + EVENTHANDLER_PRI_ANY); + EVENTHANDLER_REGISTER(power_resume, vt_resume_handler, vd, + EVENTHANDLER_PRI_ANY); + } } static void @@ -2649,26 +2662,54 @@ vt_allocate(struct vt_driver *drv, void termcn_cnregister(vd->vd_windows[VT_CONSWINDOW]->vw_terminal); } +static void +vt_suspend_handler(void *priv) +{ + struct vt_device *vd; + + vd = priv; + if (vd->vd_driver != NULL && vd->vd_driver->vd_suspend != NULL) + vd->vd_driver->vd_suspend(vd); +} + +static void +vt_resume_handler(void *priv) +{ + struct vt_device *vd; + + vd = priv; + if (vd->vd_driver != NULL && vd->vd_driver->vd_resume != NULL) + vd->vd_driver->vd_resume(vd); +} + void -vt_suspend() +vt_suspend(struct vt_device *vd) { + int error; if (vt_suspendswitch == 0) return; /* Save current window. */ - main_vd->vd_savedwindow = main_vd->vd_curwindow; + vd->vd_savedwindow = vd->vd_curwindow; /* Ask holding process to free window and switch to console window */ - vt_proc_window_switch(main_vd->vd_windows[VT_CONSWINDOW]); + vt_proc_window_switch(vd->vd_windows[VT_CONSWINDOW]); + + /* Wait for the window switch to complete. */ + error = 0; + VT_LOCK(vd); + while (vd->vd_curwindow != vd->vd_windows[VT_CONSWINDOW] && error == 0) + error = cv_wait_sig(&vd->vd_winswitch, &vd->vd_lock); + VT_UNLOCK(vd); } void -vt_resume() +vt_resume(struct vt_device *vd) { if (vt_suspendswitch == 0) return; /* Switch back to saved window */ - if (main_vd->vd_savedwindow != NULL) - vt_proc_window_switch(main_vd->vd_savedwindow); - main_vd->vd_savedwindow = NULL; + if (vd->vd_savedwindow != NULL) + vt_proc_window_switch(vd->vd_savedwindow); + vd->vd_savedwindow = NULL; } From owner-svn-src-stable@FreeBSD.ORG Mon May 11 08:16:35 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26BB512F; Mon, 11 May 2015 08:16:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 083DD1E0A; Mon, 11 May 2015 08:16:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8GYPe098394; Mon, 11 May 2015 08:16:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8GYxc098388; Mon, 11 May 2015 08:16:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110816.t4B8GYxc098388@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:16:33 +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: r282750 - in stable/10/sys: dev/acpica dev/syscons dev/vt sys 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:16:35 -0000 Author: avg Date: Mon May 11 08:16:33 2015 New Revision: 282750 URL: https://svnweb.freebsd.org/changeset/base/282750 Log: MFC r277796: hook userland threads suspend + resume into acpi suspend code Modified: stable/10/sys/dev/acpica/acpi.c stable/10/sys/dev/syscons/syscons.c stable/10/sys/dev/vt/vt_core.c stable/10/sys/sys/eventhandler.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/acpica/acpi.c ============================================================================== --- stable/10/sys/dev/acpica/acpi.c Mon May 11 08:00:16 2015 (r282749) +++ stable/10/sys/dev/acpica/acpi.c Mon May 11 08:16:33 2015 (r282750) @@ -2749,6 +2749,8 @@ acpi_EnterSleepState(struct acpi_softc * return_ACPI_STATUS (AE_OK); } + EVENTHANDLER_INVOKE(power_suspend_early); + stop_all_proc(); EVENTHANDLER_INVOKE(power_suspend); if (smp_started) { @@ -2892,6 +2894,8 @@ backout: thread_unlock(curthread); } + resume_all_proc(); + EVENTHANDLER_INVOKE(power_resume); /* Allow another sleep request after a while. */ Modified: stable/10/sys/dev/syscons/syscons.c ============================================================================== --- stable/10/sys/dev/syscons/syscons.c Mon May 11 08:00:16 2015 (r282749) +++ stable/10/sys/dev/syscons/syscons.c Mon May 11 08:16:33 2015 (r282750) @@ -550,7 +550,7 @@ sc_attach_unit(int unit, int flags) /* Register suspend/resume/shutdown callbacks for the kernel console. */ if (sc_console_unit == unit) { - EVENTHANDLER_REGISTER(power_suspend, scsuspend, NULL, + EVENTHANDLER_REGISTER(power_suspend_early, scsuspend, NULL, EVENTHANDLER_PRI_ANY); EVENTHANDLER_REGISTER(power_resume, scresume, NULL, EVENTHANDLER_PRI_ANY); Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Mon May 11 08:00:16 2015 (r282749) +++ stable/10/sys/dev/vt/vt_core.c Mon May 11 08:16:33 2015 (r282750) @@ -2560,8 +2560,8 @@ vt_upgrade(struct vt_device *vd) if (register_handlers) { /* Register suspend/resume handlers. */ - EVENTHANDLER_REGISTER(power_suspend, vt_suspend_handler, vd, - EVENTHANDLER_PRI_ANY); + EVENTHANDLER_REGISTER(power_suspend_early, vt_suspend_handler, + vd, EVENTHANDLER_PRI_ANY); EVENTHANDLER_REGISTER(power_resume, vt_resume_handler, vd, EVENTHANDLER_PRI_ANY); } Modified: stable/10/sys/sys/eventhandler.h ============================================================================== --- stable/10/sys/sys/eventhandler.h Mon May 11 08:00:16 2015 (r282749) +++ stable/10/sys/sys/eventhandler.h Mon May 11 08:16:33 2015 (r282750) @@ -182,6 +182,7 @@ EVENTHANDLER_DECLARE(shutdown_final, shu typedef void (*power_change_fn)(void *); EVENTHANDLER_DECLARE(power_resume, power_change_fn); EVENTHANDLER_DECLARE(power_suspend, power_change_fn); +EVENTHANDLER_DECLARE(power_suspend_early, power_change_fn); /* Low memory event */ typedef void (*vm_lowmem_handler_t)(void *, int); From owner-svn-src-stable@FreeBSD.ORG Mon May 11 08:30:58 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95087447; Mon, 11 May 2015 08:30:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 836191FCC; Mon, 11 May 2015 08:30:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8Uwqh006471; Mon, 11 May 2015 08:30:58 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8Uwje006470; Mon, 11 May 2015 08:30:58 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110830.t4B8Uwje006470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:30:58 +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: r282751 - stable/10/cddl/contrib/opensolaris/lib/libnvpair 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:30:58 -0000 Author: avg Date: Mon May 11 08:30:57 2015 New Revision: 282751 URL: https://svnweb.freebsd.org/changeset/base/282751 Log: MFC r282121: dump_nvlist: handle DATA_TYPE_BOOLEAN_ARRAY Modified: stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Mon May 11 08:16:33 2015 (r282750) +++ stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Mon May 11 08:30:57 2015 (r282751) @@ -793,6 +793,7 @@ dump_nvlist(nvlist_t *list, int indent) { nvpair_t *elem = NULL; boolean_t bool_value; + boolean_t *bool_array_value; nvlist_t *nvlist_value; nvlist_t **nvlist_array_value; uint_t i, count; @@ -853,6 +854,16 @@ dump_nvlist(nvlist_t *list, int indent) NVP(elem, string, char *, char *, "'%s'"); break; + case DATA_TYPE_BOOLEAN_ARRAY: + (void) nvpair_value_boolean_array(elem, + &bool_array_value, &count); + for (i = 0; i < count; i++) { + (void) printf("%*s%s[%d]: %s\n", indent, "", + nvpair_name(elem), i, + bool_array_value[i] ? "true" : "false"); + } + break; + case DATA_TYPE_BYTE_ARRAY: NVPA(elem, byte_array, uchar_t, int, "%u"); break; From owner-svn-src-stable@FreeBSD.ORG Mon May 11 08:31:39 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9FA45EB; Mon, 11 May 2015 08:31:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 D891D1FDC; Mon, 11 May 2015 08:31:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8Vd6w007773; Mon, 11 May 2015 08:31:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8VdOH007772; Mon, 11 May 2015 08:31:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110831.t4B8VdOH007772@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:31:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282752 - stable/9/cddl/contrib/opensolaris/lib/libnvpair X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:31:40 -0000 Author: avg Date: Mon May 11 08:31:39 2015 New Revision: 282752 URL: https://svnweb.freebsd.org/changeset/base/282752 Log: MFC r282121: dump_nvlist: handle DATA_TYPE_BOOLEAN_ARRAY Modified: stable/9/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Directory Properties: stable/9/cddl/contrib/opensolaris/lib/libnvpair/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Mon May 11 08:30:57 2015 (r282751) +++ stable/9/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Mon May 11 08:31:39 2015 (r282752) @@ -793,6 +793,7 @@ dump_nvlist(nvlist_t *list, int indent) { nvpair_t *elem = NULL; boolean_t bool_value; + boolean_t *bool_array_value; nvlist_t *nvlist_value; nvlist_t **nvlist_array_value; uint_t i, count; @@ -853,6 +854,16 @@ dump_nvlist(nvlist_t *list, int indent) NVP(elem, string, char *, char *, "'%s'"); break; + case DATA_TYPE_BOOLEAN_ARRAY: + (void) nvpair_value_boolean_array(elem, + &bool_array_value, &count); + for (i = 0; i < count; i++) { + (void) printf("%*s%s[%d]: %s\n", indent, "", + nvpair_name(elem), i, + bool_array_value[i] ? "true" : "false"); + } + break; + case DATA_TYPE_BYTE_ARRAY: NVPA(elem, byte_array, uchar_t, int, "%u"); break; From owner-svn-src-stable@FreeBSD.ORG Mon May 11 08:33:50 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8ABD5763; Mon, 11 May 2015 08:33:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 78E561FFC; Mon, 11 May 2015 08:33:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8XoN5008265; Mon, 11 May 2015 08:33:50 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8XoZJ008264; Mon, 11 May 2015 08:33:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110833.t4B8XoZJ008264@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:33:50 +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: r282753 - stable/10/sys/cddl/contrib/opensolaris/common/nvpair 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:33:50 -0000 Author: avg Date: Mon May 11 08:33:49 2015 New Revision: 282753 URL: https://svnweb.freebsd.org/changeset/base/282753 Log: MFC r282122: nvpair_type_is_array: DATA_TYPE_INT8_ARRAY was not recognized Modified: stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Mon May 11 08:31:39 2015 (r282752) +++ stable/10/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Mon May 11 08:33:49 2015 (r282753) @@ -1227,6 +1227,7 @@ nvpair_type_is_array(nvpair_t *nvp) data_type_t type = NVP_TYPE(nvp); if ((type == DATA_TYPE_BYTE_ARRAY) || + (type == DATA_TYPE_INT8_ARRAY) || (type == DATA_TYPE_UINT8_ARRAY) || (type == DATA_TYPE_INT16_ARRAY) || (type == DATA_TYPE_UINT16_ARRAY) || From owner-svn-src-stable@FreeBSD.ORG Mon May 11 08:34:09 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35B268A6; Mon, 11 May 2015 08:34:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2444D1007; Mon, 11 May 2015 08:34:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8Y9vY008370; Mon, 11 May 2015 08:34:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8Y85Z008369; Mon, 11 May 2015 08:34:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110834.t4B8Y85Z008369@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:34:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282754 - stable/9/sys/cddl/contrib/opensolaris/common/nvpair X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:34:09 -0000 Author: avg Date: Mon May 11 08:34:08 2015 New Revision: 282754 URL: https://svnweb.freebsd.org/changeset/base/282754 Log: MFC r282122: nvpair_type_is_array: DATA_TYPE_INT8_ARRAY was not recognized Modified: stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Mon May 11 08:33:49 2015 (r282753) +++ stable/9/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Mon May 11 08:34:08 2015 (r282754) @@ -1227,6 +1227,7 @@ nvpair_type_is_array(nvpair_t *nvp) data_type_t type = NVP_TYPE(nvp); if ((type == DATA_TYPE_BYTE_ARRAY) || + (type == DATA_TYPE_INT8_ARRAY) || (type == DATA_TYPE_UINT8_ARRAY) || (type == DATA_TYPE_INT16_ARRAY) || (type == DATA_TYPE_UINT16_ARRAY) || From owner-svn-src-stable@FreeBSD.ORG Mon May 11 08:36:59 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78D21C5C; Mon, 11 May 2015 08:36:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 67292104D; Mon, 11 May 2015 08:36:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8axaD008795; Mon, 11 May 2015 08:36:59 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8axQB008794; Mon, 11 May 2015 08:36:59 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110836.t4B8axQB008794@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:36: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: r282755 - 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:36:59 -0000 Author: avg Date: Mon May 11 08:36:58 2015 New Revision: 282755 URL: https://svnweb.freebsd.org/changeset/base/282755 Log: MFC r282125: MFV r282124: 5393 spurious failures from dsl_dataset_hold_obj() Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon May 11 08:34:08 2015 (r282754) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Mon May 11 08:36:58 2015 (r282755) @@ -413,7 +413,8 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin offsetof(dmu_sendarg_t, dsa_link)); if (doi.doi_type == DMU_OTN_ZAP_METADATA) { - int zaperr = zap_contains(mos, dsobj, DS_FIELD_LARGE_BLOCKS); + int zaperr = zap_contains(mos, dsobj, + DS_FIELD_LARGE_BLOCKS); if (zaperr != ENOENT) { VERIFY0(zaperr); ds->ds_large_blocks = B_TRUE; From owner-svn-src-stable@FreeBSD.ORG Mon May 11 08:40:56 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5131CE64; Mon, 11 May 2015 08:40:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2573C1152; Mon, 11 May 2015 08:40:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8euP3009372; Mon, 11 May 2015 08:40:56 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8etTi009370; Mon, 11 May 2015 08:40:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110840.t4B8etTi009370@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:40: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: r282756 - 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:40:56 -0000 Author: avg Date: Mon May 11 08:40:55 2015 New Revision: 282756 URL: https://svnweb.freebsd.org/changeset/base/282756 Log: MFC r282126: FV r282123: 5610 zfs clone from different source and target pools Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Mon May 11 08:36:58 2015 (r282755) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Mon May 11 08:40:55 2015 (r282756) @@ -23,6 +23,7 @@ * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -879,11 +880,7 @@ dmu_objset_clone_check(void *arg, dmu_tx dsl_dir_rele(pdd, FTAG); return (SET_ERROR(EEXIST)); } - /* You can't clone across pools. */ - if (pdd->dd_pool != dp) { - dsl_dir_rele(pdd, FTAG); - return (SET_ERROR(EXDEV)); - } + error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, doca->doca_cred); if (error != 0) { @@ -896,12 +893,6 @@ dmu_objset_clone_check(void *arg, dmu_tx if (error != 0) return (error); - /* You can't clone across pools. */ - if (origin->ds_dir->dd_pool != dp) { - dsl_dataset_rele(origin, FTAG); - return (SET_ERROR(EXDEV)); - } - /* You can only clone snapshots, not the head datasets. */ if (!dsl_dataset_is_snapshot(origin)) { dsl_dataset_rele(origin, FTAG); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:36:58 2015 (r282755) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:40:55 2015 (r282756) @@ -24,6 +24,7 @@ * All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2014 Joyent, Inc. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ #include @@ -408,7 +409,7 @@ dsl_dir_hold(dsl_pool_t *dp, const char /* Make sure the name is in the specified pool. */ spaname = spa_name(dp->dp_spa); if (strcmp(buf, spaname) != 0) - return (SET_ERROR(EINVAL)); + return (SET_ERROR(EXDEV)); ASSERT(dsl_pool_config_held(dp)); From owner-svn-src-stable@FreeBSD.ORG Mon May 11 08:41:23 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17312F93; Mon, 11 May 2015 08:41:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 DFCA41159; Mon, 11 May 2015 08:41:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8fMl6009981; Mon, 11 May 2015 08:41:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8fM5C009979; Mon, 11 May 2015 08:41:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110841.t4B8fM5C009979@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282757 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:41:23 -0000 Author: avg Date: Mon May 11 08:41:21 2015 New Revision: 282757 URL: https://svnweb.freebsd.org/changeset/base/282757 Log: MFC r282126: FV r282123: 5610 zfs clone from different source and target pools Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Mon May 11 08:40:55 2015 (r282756) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Mon May 11 08:41:21 2015 (r282757) @@ -23,6 +23,7 @@ * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -842,11 +843,7 @@ dmu_objset_clone_check(void *arg, dmu_tx dsl_dir_rele(pdd, FTAG); return (SET_ERROR(EEXIST)); } - /* You can't clone across pools. */ - if (pdd->dd_pool != dp) { - dsl_dir_rele(pdd, FTAG); - return (SET_ERROR(EXDEV)); - } + error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, doca->doca_cred); if (error != 0) { @@ -859,12 +856,6 @@ dmu_objset_clone_check(void *arg, dmu_tx if (error != 0) return (error); - /* You can't clone across pools. */ - if (origin->ds_dir->dd_pool != dp) { - dsl_dataset_rele(origin, FTAG); - return (SET_ERROR(EXDEV)); - } - /* You can only clone snapshots, not the head datasets. */ if (!dsl_dataset_is_snapshot(origin)) { dsl_dataset_rele(origin, FTAG); Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:40:55 2015 (r282756) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:41:21 2015 (r282757) @@ -24,6 +24,7 @@ * All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2014 Joyent, Inc. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ #include @@ -404,7 +405,7 @@ dsl_dir_hold(dsl_pool_t *dp, const char /* Make sure the name is in the specified pool. */ spaname = spa_name(dp->dp_spa); if (strcmp(buf, spaname) != 0) - return (SET_ERROR(EINVAL)); + return (SET_ERROR(EXDEV)); ASSERT(dsl_pool_config_held(dp)); From owner-svn-src-stable@FreeBSD.ORG Mon May 11 08:43:21 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A916318D; Mon, 11 May 2015 08:43:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 978DE1176; Mon, 11 May 2015 08:43:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8hLRk013336; Mon, 11 May 2015 08:43:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8hLgW013335; Mon, 11 May 2015 08:43:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110843.t4B8hLgW013335@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:43:21 +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: r282758 - 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:43:21 -0000 Author: avg Date: Mon May 11 08:43:20 2015 New Revision: 282758 URL: https://svnweb.freebsd.org/changeset/base/282758 Log: MFC r282127: dsl_dir_rename_check: return EXDEV on cross-pool rename attempt Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:41:21 2015 (r282757) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:43:20 2015 (r282758) @@ -1707,7 +1707,7 @@ dsl_dir_rename_check(void *arg, dmu_tx_t if (dd->dd_pool != newparent->dd_pool) { dsl_dir_rele(newparent, FTAG); dsl_dir_rele(dd, FTAG); - return (SET_ERROR(ENXIO)); + return (SET_ERROR(EXDEV)); } /* new name should not already exist */ From owner-svn-src-stable@FreeBSD.ORG Mon May 11 08:43:38 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 291BD2EC; Mon, 11 May 2015 08:43:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 1765D117B; Mon, 11 May 2015 08:43:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8hbhl013419; Mon, 11 May 2015 08:43:37 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8hbWd013418; Mon, 11 May 2015 08:43:37 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110843.t4B8hbWd013418@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282759 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:43:38 -0000 Author: avg Date: Mon May 11 08:43:37 2015 New Revision: 282759 URL: https://svnweb.freebsd.org/changeset/base/282759 Log: MFC r282127: dsl_dir_rename_check: return EXDEV on cross-pool rename attempt Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:43:20 2015 (r282758) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Mon May 11 08:43:37 2015 (r282759) @@ -1698,7 +1698,7 @@ dsl_dir_rename_check(void *arg, dmu_tx_t if (dd->dd_pool != newparent->dd_pool) { dsl_dir_rele(newparent, FTAG); dsl_dir_rele(dd, FTAG); - return (SET_ERROR(ENXIO)); + return (SET_ERROR(EXDEV)); } /* new name should not already exist */ From owner-svn-src-stable@FreeBSD.ORG Mon May 11 08:46:04 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AAE3457; Mon, 11 May 2015 08:46:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 38EBD1192; Mon, 11 May 2015 08:46:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8k4at013850; Mon, 11 May 2015 08:46:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8k4Uf013849; Mon, 11 May 2015 08:46:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110846.t4B8k4Uf013849@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:46: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: r282760 - 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:46:04 -0000 Author: avg Date: Mon May 11 08:46:03 2015 New Revision: 282760 URL: https://svnweb.freebsd.org/changeset/base/282760 Log: MFC r282130: zfs_onexit_fd_hold: return EBADF even if devfs_get_cdevpriv gave ENOENT Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Mon May 11 08:43:37 2015 (r282759) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Mon May 11 08:46:03 2015 (r282760) @@ -137,7 +137,7 @@ zfs_onexit_fd_hold(int fd, minor_t *mino *minorp = (minor_t)(uintptr_t)data; curthread->td_fpop = tmpfp; if (error != 0) - return (error); + return (SET_ERROR(EBADF)); return (zfs_onexit_minor_to_state(*minorp, &zo)); } From owner-svn-src-stable@FreeBSD.ORG Mon May 11 08:46:24 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48AAF587; Mon, 11 May 2015 08:46:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 36E801199; Mon, 11 May 2015 08:46:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B8kOns013940; Mon, 11 May 2015 08:46:24 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B8kOrU013938; Mon, 11 May 2015 08:46:24 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110846.t4B8kOrU013938@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 08:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282761 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 08:46:24 -0000 Author: avg Date: Mon May 11 08:46:23 2015 New Revision: 282761 URL: https://svnweb.freebsd.org/changeset/base/282761 Log: MFC r282130: zfs_onexit_fd_hold: return EBADF even if devfs_get_cdevpriv gave ENOENT Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Mon May 11 08:46:03 2015 (r282760) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Mon May 11 08:46:23 2015 (r282761) @@ -136,7 +136,7 @@ zfs_onexit_fd_hold(int fd, minor_t *mino *minorp = (minor_t)(uintptr_t)data; curthread->td_fpop = tmpfp; if (error != 0) - return (error); + return (SET_ERROR(EBADF)); return (zfs_onexit_minor_to_state(*minorp, &zo)); } From owner-svn-src-stable@FreeBSD.ORG Mon May 11 09:43:04 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 256369AE; Mon, 11 May 2015 09:43:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 EE9121853; Mon, 11 May 2015 09:43:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B9h3nd043062; Mon, 11 May 2015 09:43:03 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B9h3JW043061; Mon, 11 May 2015 09:43:03 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110943.t4B9h3JW043061@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 09:43:03 +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: r282764 - 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 09:43:04 -0000 Author: avg Date: Mon May 11 09:43:03 2015 New Revision: 282764 URL: https://svnweb.freebsd.org/changeset/base/282764 Log: MFC r282131: replace a comment about zfs recv -F corner case with a longer one Modified: 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_znode.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon May 11 08:57:23 2015 (r282763) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon May 11 09:43:03 2015 (r282764) @@ -1320,15 +1320,25 @@ zfs_rezget(znode_t *zp) } /* - * XXXPJD: Not sure how is that possible, but under heavy - * zfs recv -F load it happens that z_gen is the same, but - * vnode type is different than znode type. This would mean - * that for example regular file was replaced with directory - * which has the same object number. + * It is highly improbable but still quite possible that two + * objects in different datasets are created with the same + * object numbers and in transaction groups with the same + * numbers. znodes corresponding to those objects would + * have the same z_id and z_gen, but their other attributes + * may be different. + * zfs recv -F may replace one of such objects with the other. + * As a result file properties recorded in the replaced + * object's vnode may no longer match the received object's + * properties. At present the only cached property is the + * files type recorded in v_type. + * So, handle this case by leaving the old vnode and znode + * disassociated from the actual object. A new vnode and a + * znode will be created if the object is accessed + * (e.g. via a look-up). The old vnode and znode will be + * recycled when the last vnode reference is dropped. */ vp = ZTOV(zp); - if (vp != NULL && - vp->v_type != IFTOVT((mode_t)zp->z_mode)) { + if (vp != NULL && vp->v_type != IFTOVT((mode_t)zp->z_mode)) { zfs_znode_dmu_fini(zp); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); return (EIO); From owner-svn-src-stable@FreeBSD.ORG Mon May 11 09:43:17 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 583C3AE2; Mon, 11 May 2015 09:43:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2C528185B; Mon, 11 May 2015 09:43:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4B9hHBC043138; Mon, 11 May 2015 09:43:17 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4B9hHTS043137; Mon, 11 May 2015 09:43:17 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505110943.t4B9hHTS043137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 11 May 2015 09:43:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282765 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 09:43:17 -0000 Author: avg Date: Mon May 11 09:43:16 2015 New Revision: 282765 URL: https://svnweb.freebsd.org/changeset/base/282765 Log: MFC r282131: replace a comment about zfs recv -F corner case with a longer one Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon May 11 09:43:03 2015 (r282764) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Mon May 11 09:43:16 2015 (r282765) @@ -1319,15 +1319,25 @@ zfs_rezget(znode_t *zp) } /* - * XXXPJD: Not sure how is that possible, but under heavy - * zfs recv -F load it happens that z_gen is the same, but - * vnode type is different than znode type. This would mean - * that for example regular file was replaced with directory - * which has the same object number. + * It is highly improbable but still quite possible that two + * objects in different datasets are created with the same + * object numbers and in transaction groups with the same + * numbers. znodes corresponding to those objects would + * have the same z_id and z_gen, but their other attributes + * may be different. + * zfs recv -F may replace one of such objects with the other. + * As a result file properties recorded in the replaced + * object's vnode may no longer match the received object's + * properties. At present the only cached property is the + * files type recorded in v_type. + * So, handle this case by leaving the old vnode and znode + * disassociated from the actual object. A new vnode and a + * znode will be created if the object is accessed + * (e.g. via a look-up). The old vnode and znode will be + * recycled when the last vnode reference is dropped. */ vp = ZTOV(zp); - if (vp != NULL && - vp->v_type != IFTOVT((mode_t)zp->z_mode)) { + if (vp != NULL && vp->v_type != IFTOVT((mode_t)zp->z_mode)) { zfs_znode_dmu_fini(zp); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); return (EIO); From owner-svn-src-stable@FreeBSD.ORG Mon May 11 20:26:36 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6F69DFD; Mon, 11 May 2015 20:26:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 94D171760; Mon, 11 May 2015 20:26:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4BKQaLR064578; Mon, 11 May 2015 20:26:36 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4BKQZEh064574; Mon, 11 May 2015 20:26:35 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201505112026.t4BKQZEh064574@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 11 May 2015 20:26: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: r282781 - in stable/10: share/man/man9 sys/sys 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 20:26:36 -0000 Author: hiren Date: Mon May 11 20:26:35 2015 New Revision: 282781 URL: https://svnweb.freebsd.org/changeset/base/282781 Log: r281955 removed M_FLOWID which could cause problems for old drivers still using the field. It cannot be removed from stable/10 so restore it. Change M_HASHTYPE_GET() and M_HASHTYPE_SET() to do the right thing when M_FLOWID exists. Also bumping the FreeBSD version to note the fact that M_FLOWID is brought back in stable/10. (Just a note that M_FLOWID has been removed from -head.) Spotted by: np Suggested by: hans Reviewed by: hans, tuexen (earlier version) Helped by: jhb, delphij, gjb Sponsored by: Limelight Networks Modified: stable/10/share/man/man9/netisr.9 stable/10/sys/sys/mbuf.h stable/10/sys/sys/param.h Modified: stable/10/share/man/man9/netisr.9 ============================================================================== --- stable/10/share/man/man9/netisr.9 Mon May 11 19:55:01 2015 (r282780) +++ stable/10/share/man/man9/netisr.9 Mon May 11 20:26:35 2015 (r282781) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 11, 2015 +.Dd May 11, 2015 .Dt NETISR 9 .Os .Sh NAME @@ -126,13 +126,13 @@ MIB names, so should not contain whitesp Protocol handler function that will be invoked on each packet received for the protocol. .It Vt netisr_m2flow_t Va nh_m2flow -Optional protocol function to generate a flow ID and set a valid -hashtype for packets that enter the +Optional protocol function to generate a flow ID and set +.Dv M_FLOWID +for packets that do not enter .Nm with -.Dv M_HASHTYPE_GET(m) -equal to -.Dv M_HASHTYPE_NONE . +.Dv M_FLOWID +defined. Will be used only with .Dv NETISR_POLICY_FLOW . .It Vt netisr_m2cpuid_t Va nh_m2cpuid Modified: stable/10/sys/sys/mbuf.h ============================================================================== --- stable/10/sys/sys/mbuf.h Mon May 11 19:55:01 2015 (r282780) +++ stable/10/sys/sys/mbuf.h Mon May 11 20:26:35 2015 (r282781) @@ -230,7 +230,7 @@ struct mbuf { #define M_MCAST 0x00000020 /* send/received as link-level multicast */ #define M_PROMISC 0x00000040 /* packet was not for us */ #define M_VLANTAG 0x00000080 /* ether_vtag is valid */ -#define M_UNUSED_8 0x00000100 /* --available-- */ +#define M_FLOWID 0x00000100 /* deprecated: flowid is valid */ #define M_NOFREE 0x00000200 /* do not free mbuf, embedded in cluster */ #define M_PROTO1 0x00001000 /* protocol-specific */ @@ -257,7 +257,7 @@ struct mbuf { * Flags preserved when copying m_pkthdr. */ #define M_COPYFLAGS \ - (M_PKTHDR|M_EOR|M_RDONLY|M_BCAST|M_MCAST|M_PROMISC|M_VLANTAG| \ + (M_PKTHDR|M_EOR|M_RDONLY|M_BCAST|M_MCAST|M_PROMISC|M_VLANTAG|M_FLOWID| \ M_PROTOFLAGS) /* @@ -265,7 +265,7 @@ struct mbuf { */ #define M_FLAG_BITS \ "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY\5M_BCAST\6M_MCAST" \ - "\7M_PROMISC\10M_VLANTAG" + "\7M_PROMISC\10M_VLANTAG\11M_FLOWID" #define M_FLAG_PROTOBITS \ "\15M_PROTO1\16M_PROTO2\17M_PROTO3\20M_PROTO4\21M_PROTO5" \ "\22M_PROTO6\23M_PROTO7\24M_PROTO8\25M_PROTO9\26M_PROTO10" \ @@ -297,8 +297,16 @@ struct mbuf { #define M_HASHTYPE_OPAQUE 255 /* ordering, not affinity */ #define M_HASHTYPE_CLEAR(m) ((m)->m_pkthdr.rsstype = 0) -#define M_HASHTYPE_GET(m) ((m)->m_pkthdr.rsstype) -#define M_HASHTYPE_SET(m, v) ((m)->m_pkthdr.rsstype = (v)) +/* + * Handle M_FLOWID for legacy drivers still using them. + */ +#define M_HASHTYPE_GET(m) ((m->m_flags & M_FLOWID) ? M_HASHTYPE_OPAQUE \ + : (m)->m_pkthdr.rsstype) +#define M_HASHTYPE_SET(m, v) do { \ + if ((v) != M_HASHTYPE_NONE) \ + m->m_flags |= M_FLOWID; \ + (m)->m_pkthdr.rsstype = (v); \ +} while (0) #define M_HASHTYPE_TEST(m, v) (M_HASHTYPE_GET(m) == (v)) /* Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Mon May 11 19:55:01 2015 (r282780) +++ stable/10/sys/sys/param.h Mon May 11 20:26:35 2015 (r282781) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1001514 /* Master, propagated to newvers */ +#define __FreeBSD_version 1001515 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Tue May 12 00:27:21 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F8D57BC; Tue, 12 May 2015 00:27:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 6DC1B12C6; Tue, 12 May 2015 00:27:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C0RL8e082927; Tue, 12 May 2015 00:27:21 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C0RL4T082926; Tue, 12 May 2015 00:27:21 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201505120027.t4C0RL4T082926@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Tue, 12 May 2015 00:27:21 +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: r282786 - stable/10/sys/sys 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2015 00:27:21 -0000 Author: hiren Date: Tue May 12 00:27:20 2015 New Revision: 282786 URL: https://svnweb.freebsd.org/changeset/base/282786 Log: Fix r282781: We should return OPAQUE from M_HASHTYPE_GET() if M_FLOWID is there and rsstype is not set. Submitted by: hans Modified: stable/10/sys/sys/mbuf.h Modified: stable/10/sys/sys/mbuf.h ============================================================================== --- stable/10/sys/sys/mbuf.h Mon May 11 22:14:03 2015 (r282785) +++ stable/10/sys/sys/mbuf.h Tue May 12 00:27:20 2015 (r282786) @@ -300,8 +300,9 @@ struct mbuf { /* * Handle M_FLOWID for legacy drivers still using them. */ -#define M_HASHTYPE_GET(m) ((m->m_flags & M_FLOWID) ? M_HASHTYPE_OPAQUE \ - : (m)->m_pkthdr.rsstype) +#define M_HASHTYPE_GET(m) (((m->m_flags & M_FLOWID) && \ + (m)->m_pkthdr.rsstype == M_HASHTYPE_NONE) ? M_HASHTYPE_OPAQUE : \ + (m)->m_pkthdr.rsstype) #define M_HASHTYPE_SET(m, v) do { \ if ((v) != M_HASHTYPE_NONE) \ m->m_flags |= M_FLOWID; \ From owner-svn-src-stable@FreeBSD.ORG Tue May 12 03:49:19 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 040051DF; Tue, 12 May 2015 03:49:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 E60711943; Tue, 12 May 2015 03:49:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C3nIoN081819; Tue, 12 May 2015 03:49:18 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C3nI03081818; Tue, 12 May 2015 03:49:18 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201505120349.t4C3nI03081818@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Tue, 12 May 2015 03:49:18 +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: r282807 - stable/10/sys/netinet6 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2015 03:49:19 -0000 Author: hrs Date: Tue May 12 03:49:18 2015 New Revision: 282807 URL: https://svnweb.freebsd.org/changeset/base/282807 Log: MFC r274223 (by glebius): Remove VNET_SYSCTL_ARG(). The generic sysctl(9) code handles that. A panic could occur by "sysctl -a" when using VIMAGE-enabled stable/10 kernel after r262734 because of this missing MFC. Modified: stable/10/sys/netinet6/in6_proto.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6_proto.c ============================================================================== --- stable/10/sys/netinet6/in6_proto.c Tue May 12 03:35:45 2015 (r282806) +++ stable/10/sys/netinet6/in6_proto.c Tue May 12 03:49:18 2015 (r282807) @@ -474,8 +474,6 @@ sysctl_ip6_temppltime(SYSCTL_HANDLER_ARG int error = 0; int old; - VNET_SYSCTL_ARG(req, arg1); - error = SYSCTL_OUT(req, arg1, sizeof(int)); if (error || !req->newptr) return (error); @@ -495,8 +493,6 @@ sysctl_ip6_tempvltime(SYSCTL_HANDLER_ARG int error = 0; int old; - VNET_SYSCTL_ARG(req, arg1); - error = SYSCTL_OUT(req, arg1, sizeof(int)); if (error || !req->newptr) return (error); From owner-svn-src-stable@FreeBSD.ORG Tue May 12 08:52:51 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B656195; Tue, 12 May 2015 08:52:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2968A1D62; Tue, 12 May 2015 08:52:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C8qpXw031249; Tue, 12 May 2015 08:52:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C8qpXb031248; Tue, 12 May 2015 08:52:51 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505120852.t4C8qpXb031248@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 12 May 2015 08:52:51 +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: r282811 - stable/10/sys/amd64/amd64 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2015 08:52:51 -0000 Author: kib Date: Tue May 12 08:52:50 2015 New Revision: 282811 URL: https://svnweb.freebsd.org/changeset/base/282811 Log: MFC r282680: Remove unused define. Modified: stable/10/sys/amd64/amd64/apic_vector.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/apic_vector.S ============================================================================== --- stable/10/sys/amd64/amd64/apic_vector.S Tue May 12 08:08:16 2015 (r282810) +++ stable/10/sys/amd64/amd64/apic_vector.S Tue May 12 08:52:50 2015 (r282811) @@ -156,8 +156,6 @@ IDTVEC(xen_intr_upcall) */ .text -#define NAKE_INTR_CS 24 - SUPERALIGN_TEXT invltlb_ret: movq lapic, %rax From owner-svn-src-stable@FreeBSD.ORG Tue May 12 09:25:17 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEA86CA9; Tue, 12 May 2015 09:25:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 BC4A010E6; Tue, 12 May 2015 09:25:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C9PHEe046731; Tue, 12 May 2015 09:25:17 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C9PHXN046730; Tue, 12 May 2015 09:25:17 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201505120925.t4C9PHXN046730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Tue, 12 May 2015 09:25: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: r282813 - 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2015 09:25:18 -0000 Author: smh Date: Tue May 12 09:25:16 2015 New Revision: 282813 URL: https://svnweb.freebsd.org/changeset/base/282813 Log: MFC r282205: Fix misuse of input argument in traverse_visitbp Obtained from: zfsonlinux (a585f2f844ed3d4270221fed88f5e494eb55d932 Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Tue May 12 08:53:54 2015 (r282812) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Tue May 12 09:25:16 2015 (r282813) @@ -306,21 +306,22 @@ traverse_visitbp(traverse_data_t *td, co arc_flags_t flags = ARC_FLAG_WAIT; int i; int epb = BP_GET_LSIZE(bp) >> DNODE_SHIFT; + dnode_phys_t *cdnp; err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err != 0) goto post; - dnp = buf->b_data; + cdnp = buf->b_data; for (i = 0; i < epb; i++) { - prefetch_dnode_metadata(td, &dnp[i], zb->zb_objset, + prefetch_dnode_metadata(td, &cdnp[i], zb->zb_objset, zb->zb_blkid * epb + i); } /* recursively visitbp() blocks below this */ for (i = 0; i < epb; i++) { - err = traverse_dnode(td, &dnp[i], zb->zb_objset, + err = traverse_dnode(td, &cdnp[i], zb->zb_objset, zb->zb_blkid * epb + i); if (err != 0) break; @@ -328,7 +329,7 @@ traverse_visitbp(traverse_data_t *td, co } else if (BP_GET_TYPE(bp) == DMU_OT_OBJSET) { arc_flags_t flags = ARC_FLAG_WAIT; objset_phys_t *osp; - dnode_phys_t *dnp; + dnode_phys_t *mdnp, *gdnp, *udnp; err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); @@ -336,26 +337,27 @@ traverse_visitbp(traverse_data_t *td, co goto post; osp = buf->b_data; - dnp = &osp->os_meta_dnode; - prefetch_dnode_metadata(td, dnp, zb->zb_objset, + mdnp = &osp->os_meta_dnode; + gdnp = &osp->os_groupused_dnode; + udnp = &osp->os_userused_dnode; + + prefetch_dnode_metadata(td, mdnp, zb->zb_objset, DMU_META_DNODE_OBJECT); if (arc_buf_size(buf) >= sizeof (objset_phys_t)) { - prefetch_dnode_metadata(td, &osp->os_groupused_dnode, - zb->zb_objset, DMU_GROUPUSED_OBJECT); - prefetch_dnode_metadata(td, &osp->os_userused_dnode, - zb->zb_objset, DMU_USERUSED_OBJECT); + prefetch_dnode_metadata(td, gdnp, zb->zb_objset, + DMU_GROUPUSED_OBJECT); + prefetch_dnode_metadata(td, udnp, zb->zb_objset, + DMU_USERUSED_OBJECT); } - err = traverse_dnode(td, dnp, zb->zb_objset, + err = traverse_dnode(td, mdnp, zb->zb_objset, DMU_META_DNODE_OBJECT); if (err == 0 && arc_buf_size(buf) >= sizeof (objset_phys_t)) { - dnp = &osp->os_groupused_dnode; - err = traverse_dnode(td, dnp, zb->zb_objset, + err = traverse_dnode(td, gdnp, zb->zb_objset, DMU_GROUPUSED_OBJECT); } if (err == 0 && arc_buf_size(buf) >= sizeof (objset_phys_t)) { - dnp = &osp->os_userused_dnode; - err = traverse_dnode(td, dnp, zb->zb_objset, + err = traverse_dnode(td, udnp, zb->zb_objset, DMU_USERUSED_OBJECT); } } From owner-svn-src-stable@FreeBSD.ORG Tue May 12 09:30:30 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14B5B13F; Tue, 12 May 2015 09:30:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 02DE711E8; Tue, 12 May 2015 09:30:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C9UTWG047511; Tue, 12 May 2015 09:30:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C9UT14047510; Tue, 12 May 2015 09:30:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505120930.t4C9UT14047510@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 12 May 2015 09:30:29 +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: r282814 - stable/10/sys/modules 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2015 09:30:30 -0000 Author: avg Date: Tue May 12 09:30:29 2015 New Revision: 282814 URL: https://svnweb.freebsd.org/changeset/base/282814 Log: followup to r282748: remove another instance of cyclic in sys/modules/Makefile Those lines were not present in head and thus were not removed by the original commit and its merge. Modified: stable/10/sys/modules/Makefile Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Tue May 12 09:25:16 2015 (r282813) +++ stable/10/sys/modules/Makefile Tue May 12 09:30:29 2015 (r282814) @@ -672,9 +672,6 @@ _ciss= ciss _coretemp= coretemp _cpuctl= cpuctl _cpufreq= cpufreq -.if ${MK_CDDL} != "no" || defined(ALL_MODULES) -_cyclic= cyclic -.endif _dpms= dpms _drm= drm _drm2= drm2 From owner-svn-src-stable@FreeBSD.ORG Tue May 12 09:35:51 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 419FE384; Tue, 12 May 2015 09:35:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 15D79122F; Tue, 12 May 2015 09:35:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4C9Zoul051768; Tue, 12 May 2015 09:35:50 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4C9ZoWT051767; Tue, 12 May 2015 09:35:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201505120935.t4C9ZoWT051767@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 12 May 2015 09:35:50 +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: r282815 - stable/10/sys/modules/cyclic 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2015 09:35:51 -0000 Author: avg Date: Tue May 12 09:35:50 2015 New Revision: 282815 URL: https://svnweb.freebsd.org/changeset/base/282815 Log: followup to r282748: sys/modules/cyclic was not removed by svn merge This directory and its content were removed by the original commit but somehow the merge did not remove the directory. Spotted by: smh Deleted: stable/10/sys/modules/cyclic/ From owner-svn-src-stable@FreeBSD.ORG Tue May 12 15:21:20 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4FEEBA2; Tue, 12 May 2015 15:21:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 A28B01BDE; Tue, 12 May 2015 15:21:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CFLKYi024185; Tue, 12 May 2015 15:21:20 GMT (envelope-from garga@FreeBSD.org) Received: (from garga@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CFLKGH024183; Tue, 12 May 2015 15:21:20 GMT (envelope-from garga@FreeBSD.org) Message-Id: <201505121521.t4CFLKGH024183@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: garga set sender to garga@FreeBSD.org using -f From: Renato Botelho Date: Tue, 12 May 2015 15:21: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: r282818 - in stable/10/sys/dev/usb: . serial 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2015 15:21:20 -0000 Author: garga (ports committer) Date: Tue May 12 15:21:19 2015 New Revision: 282818 URL: https://svnweb.freebsd.org/changeset/base/282818 Log: MFC r282469: Add support for Sierra MC7354 card Author: Jeremy Porter Differential Revision: https://reviews.freebsd.org/D2444 Reviewed by: gnn, hselasky Sponsored by: Netgate Modified: stable/10/sys/dev/usb/serial/u3g.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/10/sys/dev/usb/serial/u3g.c Tue May 12 11:52:34 2015 (r282817) +++ stable/10/sys/dev/usb/serial/u3g.c Tue May 12 15:21:19 2015 (r282818) @@ -521,6 +521,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(SIERRA, MC5727, 0), U3G_DEV(SIERRA, MC5727_2, 0), U3G_DEV(SIERRA, MC5728, 0), + U3G_DEV(SIERRA, MC7354, 0), U3G_DEV(SIERRA, MC8700, 0), U3G_DEV(SIERRA, MC8755, 0), U3G_DEV(SIERRA, MC8755_2, 0), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Tue May 12 11:52:34 2015 (r282817) +++ stable/10/sys/dev/usb/usbdevs Tue May 12 15:21:19 2015 (r282818) @@ -4003,6 +4003,7 @@ product SIERRA C22 0x6891 C22 product SIERRA E6892 0x6892 E6892 product SIERRA E6893 0x6893 E6893 product SIERRA MC8700 0x68A3 MC8700 +product SIERRA MC7354 0x6820 MC7354 product SIERRA AIRCARD875 0x6820 Aircard 875 HSDPA product SIERRA AC313U 0x68aa Sierra Wireless AirCard 313U product SIERRA TRUINSTALL 0x0fff Aircard Tru Installer From owner-svn-src-stable@FreeBSD.ORG Tue May 12 16:36:55 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27398BF; Tue, 12 May 2015 16:36:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 F0A931591; Tue, 12 May 2015 16:36:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CGas4G059218; Tue, 12 May 2015 16:36:54 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CGasXG059217; Tue, 12 May 2015 16:36:54 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201505121636.t4CGasXG059217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 12 May 2015 16:36:54 +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: r282819 - stable/10/sys/dev/ixgbe 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2015 16:36:55 -0000 Author: araujo (ports committer) Date: Tue May 12 16:36:54 2015 New Revision: 282819 URL: https://svnweb.freebsd.org/changeset/base/282819 Log: Fix the media detected for copper cables NIC based on chipsest X540T. Requested by: hiren@ MFH: 279803 Modified: stable/10/sys/dev/ixgbe/ixgbe.c Modified: stable/10/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.c Tue May 12 15:21:19 2015 (r282818) +++ stable/10/sys/dev/ixgbe/ixgbe.c Tue May 12 16:36:54 2015 (r282819) @@ -1673,6 +1673,7 @@ static void ixgbe_media_status(struct ifnet * ifp, struct ifmediareq * ifmr) { struct adapter *adapter = ifp->if_softc; + struct ixgbe_hw *hw = &adapter->hw; INIT_DEBUGOUT("ixgbe_media_status: begin"); IXGBE_CORE_LOCK(adapter); @@ -1688,17 +1689,28 @@ ixgbe_media_status(struct ifnet * ifp, s ifmr->ifm_status |= IFM_ACTIVE; - switch (adapter->link_speed) { - case IXGBE_LINK_SPEED_100_FULL: - ifmr->ifm_active |= IFM_100_TX | IFM_FDX; - break; - case IXGBE_LINK_SPEED_1GB_FULL: - ifmr->ifm_active |= IFM_1000_SX | IFM_FDX; - break; - case IXGBE_LINK_SPEED_10GB_FULL: - ifmr->ifm_active |= adapter->optics | IFM_FDX; - break; - } + /* + * Not all NIC are 1000baseSX as an example X540T. + * We must set properly the media based on NIC model. + */ + switch (hw->device_id) { + case IXGBE_DEV_ID_X540T: + if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) + ifmr->ifm_active |= IFM_100_TX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) + ifmr->ifm_active |= IFM_1000_T | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) + ifmr->ifm_active |= adapter->optics | IFM_FDX; + break; + default: + if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) + ifmr->ifm_active |= IFM_100_TX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) + ifmr->ifm_active |= IFM_1000_SX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) + ifmr->ifm_active |= adapter->optics | IFM_FDX; + break; + } IXGBE_CORE_UNLOCK(adapter); From owner-svn-src-stable@FreeBSD.ORG Tue May 12 18:08:08 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3A4A722; Tue, 12 May 2015 18:08:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 777AD1117; Tue, 12 May 2015 18:08:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CI88LB004632; Tue, 12 May 2015 18:08:08 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CI88PP004631; Tue, 12 May 2015 18:08:08 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505121808.t4CI88PP004631@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 12 May 2015 18:08: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: r282822 - stable/10/sys/dev/vt/hw/fb 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2015 18:08:08 -0000 Author: emaste Date: Tue May 12 18:08:07 2015 New Revision: 282822 URL: https://svnweb.freebsd.org/changeset/base/282822 Log: MFC r282247: vt: fix vt_fb_bitblt_bitmap mask corruption Previously the mask wrapped when one or more of the mask bytes extended past the right edge of the window. Simplify the logic and use the same byte offset and bit in both the pattern and mask. PR: 199648 Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Tue May 12 17:53:22 2015 (r282821) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Tue May 12 18:08:07 2015 (r282822) @@ -250,43 +250,37 @@ vt_fb_bitblt_bitmap(struct vt_device *vd { struct fb_info *info; uint32_t fgc, bgc, cc, o; - int c, l, bpp, bpl; - u_long line; - uint8_t b, m; - const uint8_t *ch; + int bpp, bpl, xi, yi; + int bit, byte; info = vd->vd_softc; bpp = FBTYPE_GET_BYTESPP(info); fgc = info->fb_cmap[fg]; bgc = info->fb_cmap[bg]; - b = m = 0; - bpl = (width + 7) >> 3; /* Bytes per source line. */ + bpl = (width + 7) / 8; /* Bytes per source line. */ KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); - line = (info->fb_stride * y) + (x * bpp); - for (l = 0; - l < height && y + l < vw->vw_draw_area.tr_end.tp_row; - l++) { - ch = pattern; - for (c = 0; - c < width && x + c < vw->vw_draw_area.tr_end.tp_col; - c++) { - if (c % 8 == 0) - b = *ch++; - else - b <<= 1; - if (mask != NULL) { - if (c % 8 == 0) - m = *mask++; - else - m <<= 1; - /* Skip pixel write, if mask has no bit set. */ - if ((m & 0x80) == 0) - continue; - } - o = line + (c * bpp); - cc = b & 0x80 ? fgc : bgc; + /* Bound by right and bottom edges. */ + if (y + height > vw->vw_draw_area.tr_end.tp_row) { + if (y >= vw->vw_draw_area.tr_end.tp_row) + return; + height = vw->vw_draw_area.tr_end.tp_row - y; + } + if (x + width > vw->vw_draw_area.tr_end.tp_col) { + if (x >= vw->vw_draw_area.tr_end.tp_col) + return; + width = vw->vw_draw_area.tr_end.tp_col - x; + } + for (yi = 0; yi < height; yi++) { + for (xi = 0; xi < width; xi++) { + byte = yi * bpl + xi / 8; + bit = 0x80 >> (xi % 8); + /* Skip pixel write, if mask bit not set. */ + if (mask != NULL && (mask[byte] & bit) == 0) + continue; + o = (y + yi) * info->fb_stride + (x + xi) * bpp; + cc = pattern[byte] & bit ? fgc : bgc; switch(bpp) { case 1: @@ -309,8 +303,6 @@ vt_fb_bitblt_bitmap(struct vt_device *vd break; } } - line += info->fb_stride; - pattern += bpl; } } From owner-svn-src-stable@FreeBSD.ORG Tue May 12 18:09:55 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB0D48C2; Tue, 12 May 2015 18:09:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B879A1132; Tue, 12 May 2015 18:09:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4CI9t4x004928; Tue, 12 May 2015 18:09:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4CI9t0T004927; Tue, 12 May 2015 18:09:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505121809.t4CI9t0T004927@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 12 May 2015 18:09: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: r282823 - stable/10/sys/dev/vt 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2015 18:09:55 -0000 Author: emaste Date: Tue May 12 18:09:54 2015 New Revision: 282823 URL: https://svnweb.freebsd.org/changeset/base/282823 Log: MFC r281944: vt(4): Simplify mouse area detection vt_is_cursor_in_area needs to return true if any part of the mouse cursor is visible in the rectangle area. Replace the existing test with a simpler version of a test for overlapping rectangles. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Tue May 12 18:08:07 2015 (r282822) +++ stable/10/sys/dev/vt/vt_core.c Tue May 12 18:09:54 2015 (r282823) @@ -1018,7 +1018,7 @@ vt_determine_colors(term_char_t c, int c int vt_is_cursor_in_area(const struct vt_device *vd, const term_rect_t *area) { - unsigned int mx, my, x1, y1, x2, y2; + unsigned int mx, my; /* * We use the cursor position saved during the current refresh, @@ -1027,18 +1027,12 @@ vt_is_cursor_in_area(const struct vt_dev mx = vd->vd_mx_drawn + vd->vd_curwindow->vw_draw_area.tr_begin.tp_col; my = vd->vd_my_drawn + vd->vd_curwindow->vw_draw_area.tr_begin.tp_row; - x1 = area->tr_begin.tp_col; - y1 = area->tr_begin.tp_row; - x2 = area->tr_end.tp_col; - y2 = area->tr_end.tp_row; - - if (((mx >= x1 && x2 - 1 >= mx) || - (mx < x1 && mx + vd->vd_mcursor->width >= x1)) && - ((my >= y1 && y2 - 1 >= my) || - (my < y1 && my + vd->vd_mcursor->height >= y1))) - return (1); - - return (0); + if (mx >= area->tr_end.tp_col || + mx + vd->vd_mcursor->width <= area->tr_begin.tp_col || + my >= area->tr_end.tp_row || + my + vd->vd_mcursor->height <= area->tr_begin.tp_row) + return (0); + return (1); } static void From owner-svn-src-stable@FreeBSD.ORG Wed May 13 00:28:38 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52C14825; Wed, 13 May 2015 00:28:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 267951C82; Wed, 13 May 2015 00:28:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4D0SckV093696; Wed, 13 May 2015 00:28:38 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4D0SbK7093688; Wed, 13 May 2015 00:28:37 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201505130028.t4D0SbK7093688@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 13 May 2015 00:28:37 +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: r282826 - in stable/10/sys: conf netinet 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 00:28:38 -0000 Author: gnn Date: Wed May 13 00:28:36 2015 New Revision: 282826 URL: https://svnweb.freebsd.org/changeset/base/282826 Log: MFC: 282215 Make it possible to statically link SIFTR into the kernel as a new option. Reviewed by: bz Discussed with: lstewart Modified: stable/10/sys/conf/files stable/10/sys/conf/options stable/10/sys/netinet/tcp_timewait.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Tue May 12 20:42:42 2015 (r282825) +++ stable/10/sys/conf/files Wed May 13 00:28:36 2015 (r282826) @@ -3426,6 +3426,7 @@ netinet/sctp_sysctl.c optional inet sct netinet/sctp_timer.c optional inet sctp | inet6 sctp netinet/sctp_usrreq.c optional inet sctp | inet6 sctp netinet/sctputil.c optional inet sctp | inet6 sctp +netinet/siftr.c optional inet siftr alq | inet6 siftr alq netinet/tcp_debug.c optional tcpdebug netinet/tcp_hostcache.c optional inet | inet6 netinet/tcp_input.c optional inet | inet6 Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Tue May 12 20:42:42 2015 (r282825) +++ stable/10/sys/conf/options Wed May 13 00:28:36 2015 (r282826) @@ -439,6 +439,7 @@ RADIX_MPATH opt_mpath.h ROUTETABLES opt_route.h SLIP_IFF_OPTS opt_slip.h TCPDEBUG +SIFTR TCP_OFFLOAD opt_inet.h # Enable code to dispatch TCP offloading TCP_SIGNATURE opt_inet.h VLAN_ARRAY opt_vlan.h Modified: stable/10/sys/netinet/tcp_timewait.c ============================================================================== --- stable/10/sys/netinet/tcp_timewait.c Tue May 12 20:42:42 2015 (r282825) +++ stable/10/sys/netinet/tcp_timewait.c Wed May 13 00:28:36 2015 (r282826) @@ -250,6 +250,13 @@ tcp_twstart(struct tcpcb *tp) } } + + /* + * For use only by DTrace. We do not reference the state + * after this point so modifying it in place is not a problem. + */ + tcp_state_change(tp, TCPS_TIME_WAIT); + tw = uma_zalloc(V_tcptw_zone, M_NOWAIT); if (tw == NULL) { /* From owner-svn-src-stable@FreeBSD.ORG Wed May 13 07:39:17 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04E9F501; Wed, 13 May 2015 07:39:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 E73821B2D; Wed, 13 May 2015 07:39:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4D7dGjq007460; Wed, 13 May 2015 07:39:16 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4D7dG3J007459; Wed, 13 May 2015 07:39:16 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201505130739.t4D7dG3J007459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Wed, 13 May 2015 07:39:16 +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: r282831 - stable/10/sys/dev/e1000 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 07:39:17 -0000 Author: hiren Date: Wed May 13 07:39:16 2015 New Revision: 282831 URL: https://svnweb.freebsd.org/changeset/base/282831 Log: Partial MFC r281838: For igb(4), when we are doing multiqueue, we are all setup to have full 32bit RSS hash from the card. Expose that so others like lagg(4) can use that and avoid hashing the traffic by themselves. Setting hashtype as OPAQUE because FreeBSD 10 doesn't have RSS support. Sponsored by: Limelight Networks Modified: stable/10/sys/dev/e1000/if_igb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/e1000/if_igb.c ============================================================================== --- stable/10/sys/dev/e1000/if_igb.c Wed May 13 05:46:04 2015 (r282830) +++ stable/10/sys/dev/e1000/if_igb.c Wed May 13 07:39:16 2015 (r282831) @@ -4970,10 +4970,27 @@ igb_rxeof(struct igb_queue *que, int cou rxr->fmp->m_pkthdr.ether_vtag = vtag; rxr->fmp->m_flags |= M_VLANTAG; } + + /* + * In case of multiqueue, we have RXCSUM.PCSD bit set + * and never cleared. This means we have RSS hash + * available to be used. + */ + if (adapter->num_queues > 1) { + rxr->fmp->m_pkthdr.flowid = + le32toh(cur->wb.lower.hi_dword.rss); + /* + * Full RSS support is not avilable in + * FreeBSD 10 so setting the hash type to + * OPAQUE. + */ + M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE); + } else { #ifndef IGB_LEGACY_TX - rxr->fmp->m_pkthdr.flowid = que->msix; - M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE); + rxr->fmp->m_pkthdr.flowid = que->msix; + M_HASHTYPE_SET(rxr->fmp, M_HASHTYPE_OPAQUE); #endif + } sendmp = rxr->fmp; /* Make sure to set M_PKTHDR. */ sendmp->m_flags |= M_PKTHDR; From owner-svn-src-stable@FreeBSD.ORG Wed May 13 08:04:51 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3006EBC8; Wed, 13 May 2015 08:04:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 0478A1E77; Wed, 13 May 2015 08:04:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4D84oFI021575; Wed, 13 May 2015 08:04:50 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4D84oCO021574; Wed, 13 May 2015 08:04:50 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201505130804.t4D84oCO021574@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Wed, 13 May 2015 08:04:50 +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: r282832 - stable/10/sys/net 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 08:04:51 -0000 Author: hiren Date: Wed May 13 08:04:50 2015 New Revision: 282832 URL: https://svnweb.freebsd.org/changeset/base/282832 Log: MFC r281984: Currently there is no easy way to specify net.isr.maxthreads = all cpus. We need to specify exact number of cpus in loader.conf which get annoying when you have mix of machines which don't have equal number of total cpus. I propose "-1" as that value. When loader.conf has net.isr.maxthreads = -1, netisr will use all available cpus. Sponsored by: Limelight Networks Modified: stable/10/sys/net/netisr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/netisr.c ============================================================================== --- stable/10/sys/net/netisr.c Wed May 13 07:39:16 2015 (r282831) +++ stable/10/sys/net/netisr.c Wed May 13 08:04:50 2015 (r282832) @@ -156,10 +156,13 @@ SYSCTL_PROC(_net_isr, OID_AUTO, dispatch /* * Allow the administrator to limit the number of threads (CPUs) to use for * netisr. We don't check netisr_maxthreads before creating the thread for - * CPU 0, so in practice we ignore values <= 1. This must be set at boot. - * We will create at most one thread per CPU. + * CPU 0. This must be set at boot. We will create at most one thread per CPU. + * By default we initialize this to 1 which would assign just 1 cpu (cpu0) and + * therefore only 1 workstream. If set to -1, netisr would use all cpus + * (mp_ncpus) and therefore would have those many workstreams. One workstream + * per thread (CPU). */ -static int netisr_maxthreads = -1; /* Max number of threads. */ +static int netisr_maxthreads = 1; /* Max number of threads. */ TUNABLE_INT("net.isr.maxthreads", &netisr_maxthreads); SYSCTL_INT(_net_isr, OID_AUTO, maxthreads, CTLFLAG_RDTUN, &netisr_maxthreads, 0, @@ -1128,8 +1131,10 @@ netisr_init(void *arg) KASSERT(curcpu == 0, ("%s: not on CPU 0", __func__)); NETISR_LOCK_INIT(); - if (netisr_maxthreads < 1) - netisr_maxthreads = 1; + if (netisr_maxthreads == 0 || netisr_maxthreads < -1 ) + netisr_maxthreads = 1; /* default behavior */ + else if (netisr_maxthreads == -1) + netisr_maxthreads = mp_ncpus; /* use max cpus */ if (netisr_maxthreads > mp_ncpus) { printf("netisr_init: forcing maxthreads from %d to %d\n", netisr_maxthreads, mp_ncpus); From owner-svn-src-stable@FreeBSD.ORG Wed May 13 08:58:06 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBADE885; Wed, 13 May 2015 08:58:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 ACBB314E7; Wed, 13 May 2015 08:58:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4D8w6hu046623; Wed, 13 May 2015 08:58:06 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4D8w6CY046622; Wed, 13 May 2015 08:58:06 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201505130858.t4D8w6CY046622@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Wed, 13 May 2015 08:58: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: r282833 - stable/10/sys/dev/ixgbe 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 08:58:07 -0000 Author: araujo (ports committer) Date: Wed May 13 08:58:06 2015 New Revision: 282833 URL: https://svnweb.freebsd.org/changeset/base/282833 Log: Convert space to tabs in the bits that I changed in my last commit. No functional change. Reported by: jmallet@ Modified: stable/10/sys/dev/ixgbe/ixgbe.c Modified: stable/10/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.c Wed May 13 08:04:50 2015 (r282832) +++ stable/10/sys/dev/ixgbe/ixgbe.c Wed May 13 08:58:06 2015 (r282833) @@ -1673,7 +1673,7 @@ static void ixgbe_media_status(struct ifnet * ifp, struct ifmediareq * ifmr) { struct adapter *adapter = ifp->if_softc; - struct ixgbe_hw *hw = &adapter->hw; + struct ixgbe_hw *hw = &adapter->hw; INIT_DEBUGOUT("ixgbe_media_status: begin"); IXGBE_CORE_LOCK(adapter); @@ -1689,28 +1689,28 @@ ixgbe_media_status(struct ifnet * ifp, s ifmr->ifm_status |= IFM_ACTIVE; - /* - * Not all NIC are 1000baseSX as an example X540T. - * We must set properly the media based on NIC model. - */ - switch (hw->device_id) { - case IXGBE_DEV_ID_X540T: - if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) - ifmr->ifm_active |= IFM_100_TX | IFM_FDX; - else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) - ifmr->ifm_active |= IFM_1000_T | IFM_FDX; - else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) - ifmr->ifm_active |= adapter->optics | IFM_FDX; - break; - default: - if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) - ifmr->ifm_active |= IFM_100_TX | IFM_FDX; - else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) - ifmr->ifm_active |= IFM_1000_SX | IFM_FDX; - else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) - ifmr->ifm_active |= adapter->optics | IFM_FDX; - break; - } + /* + * Not all NIC are 1000baseSX as an example X540T. + * We must set properly the media based on NIC model. + */ + switch (hw->device_id) { + case IXGBE_DEV_ID_X540T: + if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) + ifmr->ifm_active |= IFM_100_TX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) + ifmr->ifm_active |= IFM_1000_T | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) + ifmr->ifm_active |= adapter->optics | IFM_FDX; + break; + default: + if (adapter->link_speed == IXGBE_LINK_SPEED_100_FULL) + ifmr->ifm_active |= IFM_100_TX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_1GB_FULL) + ifmr->ifm_active |= IFM_1000_SX | IFM_FDX; + else if (adapter->link_speed == IXGBE_LINK_SPEED_10GB_FULL) + ifmr->ifm_active |= adapter->optics | IFM_FDX; + break; + } IXGBE_CORE_UNLOCK(adapter); From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:03:22 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07D525D8; Wed, 13 May 2015 10:03:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 E9FEB1DAD; Wed, 13 May 2015 10:03:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DA3LG8080179; Wed, 13 May 2015 10:03:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DA3LHR080177; Wed, 13 May 2015 10:03:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131003.t4DA3LHR080177@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:03:21 +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: r282834 - stable/10/lib/libc/tests/db 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:03:22 -0000 Author: ngie Date: Wed May 13 10:03:21 2015 New Revision: 282834 URL: https://svnweb.freebsd.org/changeset/base/282834 Log: MFC r281967: Assuming a system has /bin/csh on it is a bad idea (especially it being optional on FreeBSD). Look for /bin/cat instead Modified: stable/10/lib/libc/tests/db/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/db/Makefile ============================================================================== --- stable/10/lib/libc/tests/db/Makefile Wed May 13 08:58:06 2015 (r282833) +++ stable/10/lib/libc/tests/db/Makefile Wed May 13 10:03:21 2015 (r282834) @@ -11,6 +11,7 @@ FILESDIR= ${TESTSDIR} FILES= README NETBSD_ATF_TESTS_SH+= db_test +ATF_TESTS_SH_SED_db_test= -e 's,/bin/csh,/bin/cat,g' .include "../Makefile.netbsd-tests" From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:07:50 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D848E7C5; Wed, 13 May 2015 10:07:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 C65A71DEC; Wed, 13 May 2015 10:07:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DA7ofI080825; Wed, 13 May 2015 10:07:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DA7oF9080824; Wed, 13 May 2015 10:07:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131007.t4DA7oF9080824@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:07:50 +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: r282835 - stable/10/usr.sbin/bluetooth 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:07:51 -0000 Author: ngie Date: Wed May 13 10:07:50 2015 New Revision: 282835 URL: https://svnweb.freebsd.org/changeset/base/282835 Log: MFC r282054: ath3kfw, bcmfw, bthidcontrol, bthidd all require usb(4); build them conditionally if MK_USB != no Modified: stable/10/usr.sbin/bluetooth/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bluetooth/Makefile ============================================================================== --- stable/10/usr.sbin/bluetooth/Makefile Wed May 13 10:03:21 2015 (r282834) +++ stable/10/usr.sbin/bluetooth/Makefile Wed May 13 10:07:50 2015 (r282835) @@ -1,12 +1,10 @@ # $Id: Makefile,v 1.5 2003/09/08 02:28:35 max Exp $ # $FreeBSD$ +.include + SUBDIR= \ - ath3kfw \ - bcmfw \ bt3cfw \ - bthidcontrol \ - bthidd \ btpand \ hccontrol \ hcsecd \ @@ -17,5 +15,12 @@ SUBDIR= \ sdpcontrol \ sdpd +.if ${MK_USB} != "no" +SUBDIR+= ath3kfw +SUBDIR+= bcmfw +SUBDIR+= bthidcontrol +SUBDIR+= bthidd +.endif + .include From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:12:17 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8094961; Wed, 13 May 2015 10:12:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B5B991EB8; Wed, 13 May 2015 10:12:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DACHqL085086; Wed, 13 May 2015 10:12:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DACHEQ085085; Wed, 13 May 2015 10:12:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131012.t4DACHEQ085085@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:12: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: r282836 - stable/10/contrib/netbsd-tests/lib/libm 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:12:17 -0000 Author: ngie Date: Wed May 13 10:12:16 2015 New Revision: 282836 URL: https://svnweb.freebsd.org/changeset/base/282836 Log: MFC r282056: The fmodl compat shims on arm/mips/powerpc aren't complete Disable the test code for now on those architectures PR: 199422 Modified: stable/10/contrib/netbsd-tests/lib/libm/t_fmod.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libm/t_fmod.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libm/t_fmod.c Wed May 13 10:07:50 2015 (r282835) +++ stable/10/contrib/netbsd-tests/lib/libm/t_fmod.c Wed May 13 10:12:16 2015 (r282836) @@ -43,15 +43,21 @@ ATF_TC_BODY(fmod, tc) { ATF_CHECK(fmodf(2.0, 1.0) == 0); ATF_CHECK(fmod(2.0, 1.0) == 0); +#if !defined(__FreeBSD__) || LDBL_PREC != 53 ATF_CHECK(fmodl(2.0, 1.0) == 0); +#endif ATF_CHECK(fmodf(2.0, 0.5) == 0); ATF_CHECK(fmod(2.0, 0.5) == 0); +#if !defined(__FreeBSD__) || LDBL_PREC != 53 ATF_CHECK(fmodl(2.0, 0.5) == 0); +#endif ATF_CHECK(fabsf(fmodf(1.0, 0.1) - 0.1f) <= 55 * FLT_EPSILON); ATF_CHECK(fabs(fmod(1.0, 0.1) - 0.1) <= 55 * DBL_EPSILON); +#if !defined(__FreeBSD__) || LDBL_PREC != 53 ATF_CHECK(fabsl(fmodl(1.0, 0.1L) - 0.1L) <= 55 * LDBL_EPSILON); +#endif } ATF_TP_ADD_TCS(tp) From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:15:27 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 617C5B3E; Wed, 13 May 2015 10:15:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 34EFA1EF4; Wed, 13 May 2015 10:15:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAFRlr085634; Wed, 13 May 2015 10:15:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAFRxF085633; Wed, 13 May 2015 10:15:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131015.t4DAFRxF085633@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:15:27 +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: r282837 - stable/10/tools/regression/gaithrstress 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:15:27 -0000 Author: ngie Date: Wed May 13 10:15:26 2015 New Revision: 282837 URL: https://svnweb.freebsd.org/changeset/base/282837 Log: MFC r282062: Fix -Wformat warnings by using proper format string qualifiers for long and unsigned[ long] types Modified: stable/10/tools/regression/gaithrstress/gaithrstress.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/gaithrstress/gaithrstress.c ============================================================================== --- stable/10/tools/regression/gaithrstress/gaithrstress.c Wed May 13 10:12:16 2015 (r282836) +++ stable/10/tools/regression/gaithrstress/gaithrstress.c Wed May 13 10:15:26 2015 (r282837) @@ -230,7 +230,7 @@ usage: err(1, "reading word file %s", wordfile); if (nrandwords < 1) errx(1, "word file %s did not have >0 words", wordfile); - printf("Read %u random words from %s.\n", nrandwords, wordfile); + printf("Read %zu random words from %s.\n", nrandwords, wordfile); workers = calloc(nworkers, sizeof(*workers)); if (workers == NULL) err(1, "allocating workers"); @@ -242,8 +242,8 @@ usage: for (i = 0; i < nworkers; i++) { if (pthread_create(&workers[i].w_thread, NULL, work, &workers[i]) != 0) - err(1, "creating worker %u", i); - printf("%u%s", i, i == nworkers - 1 ? ".\n" : ", "); + err(1, "creating worker %zu", i); + printf("%zu%s", i, i == nworkers - 1 ? ".\n" : ", "); fflush(stdout); } @@ -255,7 +255,7 @@ usage: fflush(stdout); for (i = 0; i < nworkers; i++) { pthread_join(workers[i].w_thread, NULL); - printf("%u%s", i, i == nworkers - 1 ? ".\n" : ", "); + printf("%zu%s", i, i == nworkers - 1 ? ".\n" : ", "); fflush(stdout); } @@ -264,7 +264,7 @@ usage: printf("%-10s%-20s%-20s%-29s\n", "------", "--------------", "----------", "---------------------------"); for (i = 0; i < nworkers; i++) { - printf("%-10u%-20ju%-20ju%u:%s%.2f\n", i, + printf("%-10zu%-20ju%-20ju%ld:%s%.2f\n", i, workers[i].w_lookup_success, workers[i].w_lookup_failure, workers[i].w_max_lookup_time.tv_sec / 60, workers[i].w_max_lookup_time.tv_sec % 60 < 10 ? "0" : "", From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:17:35 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8533CCDC; Wed, 13 May 2015 10:17:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 58A311F13; Wed, 13 May 2015 10:17:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAHZ2v085964; Wed, 13 May 2015 10:17:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAHZvU085963; Wed, 13 May 2015 10:17:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131017.t4DAHZvU085963@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:17:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282838 - stable/9/tools/regression/gaithrstress X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:17:35 -0000 Author: ngie Date: Wed May 13 10:17:34 2015 New Revision: 282838 URL: https://svnweb.freebsd.org/changeset/base/282838 Log: MFC r282062: Fix -Wformat warnings by using proper format string qualifiers for long and unsigned[ long] types Modified: stable/9/tools/regression/gaithrstress/gaithrstress.c Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) Modified: stable/9/tools/regression/gaithrstress/gaithrstress.c ============================================================================== --- stable/9/tools/regression/gaithrstress/gaithrstress.c Wed May 13 10:15:26 2015 (r282837) +++ stable/9/tools/regression/gaithrstress/gaithrstress.c Wed May 13 10:17:34 2015 (r282838) @@ -230,7 +230,7 @@ usage: err(1, "reading word file %s", wordfile); if (nrandwords < 1) errx(1, "word file %s did not have >0 words", wordfile); - printf("Read %u random words from %s.\n", nrandwords, wordfile); + printf("Read %zu random words from %s.\n", nrandwords, wordfile); workers = calloc(nworkers, sizeof(*workers)); if (workers == NULL) err(1, "allocating workers"); @@ -242,8 +242,8 @@ usage: for (i = 0; i < nworkers; i++) { if (pthread_create(&workers[i].w_thread, NULL, work, &workers[i]) != 0) - err(1, "creating worker %u", i); - printf("%u%s", i, i == nworkers - 1 ? ".\n" : ", "); + err(1, "creating worker %zu", i); + printf("%zu%s", i, i == nworkers - 1 ? ".\n" : ", "); fflush(stdout); } @@ -255,7 +255,7 @@ usage: fflush(stdout); for (i = 0; i < nworkers; i++) { pthread_join(workers[i].w_thread, NULL); - printf("%u%s", i, i == nworkers - 1 ? ".\n" : ", "); + printf("%zu%s", i, i == nworkers - 1 ? ".\n" : ", "); fflush(stdout); } @@ -264,7 +264,7 @@ usage: printf("%-10s%-20s%-20s%-29s\n", "------", "--------------", "----------", "---------------------------"); for (i = 0; i < nworkers; i++) { - printf("%-10u%-20ju%-20ju%u:%s%.2f\n", i, + printf("%-10zu%-20ju%-20ju%ld:%s%.2f\n", i, workers[i].w_lookup_success, workers[i].w_lookup_failure, workers[i].w_max_lookup_time.tv_sec / 60, workers[i].w_max_lookup_time.tv_sec % 60 < 10 ? "0" : "", From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:18:45 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4FE7E3A; Wed, 13 May 2015 10:18:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 88D3E1F28; Wed, 13 May 2015 10:18:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAIjvI086321; Wed, 13 May 2015 10:18:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAIjE8086320; Wed, 13 May 2015 10:18:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505131018.t4DAIjE8086320@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 May 2015 10:18:45 +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: r282839 - stable/10/usr.sbin/bhyve 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:18:45 -0000 Author: mav Date: Wed May 13 10:18:44 2015 New Revision: 282839 URL: https://svnweb.freebsd.org/changeset/base/282839 Log: MFC r281764, r282563: Disable RX/TX queues notifications when not needed. This reduces CPU load and doubles iperf throughput, reaching 2-3Gbit/s. Sponsored by: iXsystems, Inc. Modified: stable/10/usr.sbin/bhyve/pci_virtio_net.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_virtio_net.c Wed May 13 10:17:34 2015 (r282838) +++ stable/10/usr.sbin/bhyve/pci_virtio_net.c Wed May 13 10:18:44 2015 (r282839) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -393,6 +394,7 @@ pci_vtnet_ping_rxq(void *vsc, struct vqu */ if (sc->vsc_rx_ready == 0) { sc->vsc_rx_ready = 1; + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; } } @@ -438,6 +440,7 @@ pci_vtnet_ping_txq(void *vsc, struct vqu /* Signal the tx thread for processing */ pthread_mutex_lock(&sc->tx_mtx); + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; if (sc->tx_in_progress == 0) pthread_cond_signal(&sc->tx_cond); pthread_mutex_unlock(&sc->tx_mtx); @@ -451,7 +454,7 @@ pci_vtnet_tx_thread(void *param) { struct pci_vtnet_softc *sc = param; struct vqueue_info *vq; - int have_work, error; + int error; vq = &sc->vsc_queues[VTNET_TXQ]; @@ -465,19 +468,17 @@ pci_vtnet_tx_thread(void *param) for (;;) { /* note - tx mutex is locked here */ - do { - if (sc->resetting) - have_work = 0; - else - have_work = vq_has_descs(vq); - - if (!have_work) { - sc->tx_in_progress = 0; - error = pthread_cond_wait(&sc->tx_cond, - &sc->tx_mtx); - assert(error == 0); - } - } while (!have_work); + while (sc->resetting || !vq_has_descs(vq)) { + vq->vq_used->vu_flags &= ~VRING_USED_F_NO_NOTIFY; + mb(); + if (!sc->resetting && vq_has_descs(vq)) + break; + + sc->tx_in_progress = 0; + error = pthread_cond_wait(&sc->tx_cond, &sc->tx_mtx); + assert(error == 0); + } + vq->vq_used->vu_flags |= VRING_USED_F_NO_NOTIFY; sc->tx_in_progress = 1; pthread_mutex_unlock(&sc->tx_mtx); From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:21:01 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E59F162; Wed, 13 May 2015 10:21:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 5C0991002; Wed, 13 May 2015 10:21:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAL1kn087857; Wed, 13 May 2015 10:21:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAL1fj087856; Wed, 13 May 2015 10:21:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505131021.t4DAL1fj087856@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 May 2015 10:21:01 +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: r282840 - stable/10/usr.sbin/bhyve 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:21:01 -0000 Author: mav Date: Wed May 13 10:21:00 2015 New Revision: 282840 URL: https://svnweb.freebsd.org/changeset/base/282840 Log: MFC r281766, r281767: Report link as up only if we managed to open tap device. It would be cool to report tap device status, but it has no such API. Modified: stable/10/usr.sbin/bhyve/pci_virtio_net.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_virtio_net.c Wed May 13 10:18:44 2015 (r282839) +++ stable/10/usr.sbin/bhyve/pci_virtio_net.c Wed May 13 10:21:00 2015 (r282840) @@ -643,8 +643,8 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_lintr_request(pi); - /* link always up */ - sc->vsc_config.status = 1; + /* Link is up if we managed to open tap device. */ + sc->vsc_config.status = (opts == NULL || sc->vsc_tapfd >= 0); /* use BAR 1 to map MSI-X table and PBA, if we're using MSI-X */ if (vi_intr_init(&sc->vsc_vs, 1, fbsdrun_virtio_msix())) From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:21:15 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0A7C293; Wed, 13 May 2015 10:21:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 DD8201009; Wed, 13 May 2015 10:21:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DALEkO089309; Wed, 13 May 2015 10:21:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DALE87088941; Wed, 13 May 2015 10:21:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131021.t4DALE87088941@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:21: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: r282841 - in stable/10: etc/mtree tests/sys tests/sys/kqueue tools/regression/kqueue 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:21:15 -0000 Author: ngie Date: Wed May 13 10:21:13 2015 New Revision: 282841 URL: https://svnweb.freebsd.org/changeset/base/282841 Log: MFC r282063: Integrate tools/regression/kqueue into the FreeBSD test suite as tests/sys/kqueue Added: stable/10/tests/sys/kqueue/ - copied from r282063, head/tests/sys/kqueue/ Deleted: stable/10/tools/regression/kqueue/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Wed May 13 10:21:00 2015 (r282840) +++ stable/10/etc/mtree/BSD.tests.dist Wed May 13 10:21:13 2015 (r282841) @@ -180,6 +180,8 @@ sys kern .. + kqueue + .. netinet .. pjdfstest Modified: stable/10/tests/sys/Makefile ============================================================================== --- stable/10/tests/sys/Makefile Wed May 13 10:21:00 2015 (r282840) +++ stable/10/tests/sys/Makefile Wed May 13 10:21:13 2015 (r282841) @@ -5,6 +5,7 @@ TESTSDIR= ${TESTSBASE}/sys TESTS_SUBDIRS+= kern +TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= netinet # Items not integrated into kyua runs by default From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:24:24 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33E3D416; Wed, 13 May 2015 10:24:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 1FDD91033; Wed, 13 May 2015 10:24:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAONjV090963; Wed, 13 May 2015 10:24:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAON7A090958; Wed, 13 May 2015 10:24:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131024.t4DAON7A090958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:24:23 +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: r282842 - in stable/10: etc/mtree tests/sys tests/sys/fifo tests/sys/file tools/regression/fifo tools/regression/file/dup tools/regression/file/fcntlflags tools/regression/file/flock to... 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:24:24 -0000 Author: ngie Date: Wed May 13 10:24:23 2015 New Revision: 282842 URL: https://svnweb.freebsd.org/changeset/base/282842 Log: MFC r282067: Integrate tools/regression/fifo into the FreeBSD test suite as tests/sys/fifo and tools/regression/file into the FreeBSD test suite as tests/sys/file Added: stable/10/tests/sys/fifo/ - copied from r282067, head/tests/sys/fifo/ stable/10/tests/sys/file/ - copied from r282067, head/tests/sys/file/ Deleted: stable/10/tools/regression/fifo/ stable/10/tools/regression/file/dup/ stable/10/tools/regression/file/fcntlflags/ stable/10/tools/regression/file/flock/ stable/10/tools/regression/file/ftruncate/ stable/10/tools/regression/file/newfileops_on_fork/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Wed May 13 10:21:13 2015 (r282841) +++ stable/10/etc/mtree/BSD.tests.dist Wed May 13 10:24:23 2015 (r282842) @@ -178,6 +178,10 @@ .. .. sys + fifo + .. + file + .. kern .. kqueue Modified: stable/10/tests/sys/Makefile ============================================================================== --- stable/10/tests/sys/Makefile Wed May 13 10:21:13 2015 (r282841) +++ stable/10/tests/sys/Makefile Wed May 13 10:24:23 2015 (r282842) @@ -4,6 +4,8 @@ TESTSDIR= ${TESTSBASE}/sys +TESTS_SUBDIRS+= fifo +TESTS_SUBDIRS+= file TESTS_SUBDIRS+= kern TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= netinet From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:29:03 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E99F5BB; Wed, 13 May 2015 10:29:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 6B5751060; Wed, 13 May 2015 10:29:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAT34J091651; Wed, 13 May 2015 10:29:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAT3Rs091648; Wed, 13 May 2015 10:29:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131029.t4DAT3Rs091648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:29:03 +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: r282843 - stable/10/tools/regression/aio/aiop 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:29:03 -0000 Author: ngie Date: Wed May 13 10:29:02 2015 New Revision: 282843 URL: https://svnweb.freebsd.org/changeset/base/282843 Log: MFC r282073: - Fix style(9) a bit -- Fix whitespace -- Use err/errx -- Remove superfluous braces - Be a bit more defensive with input from the end-user - Don't throw a floating point exception by dividing by 0 when processing a zero-byte file Modified: stable/10/tools/regression/aio/aiop/Makefile stable/10/tools/regression/aio/aiop/aiop.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/aio/aiop/Makefile ============================================================================== --- stable/10/tools/regression/aio/aiop/Makefile Wed May 13 10:24:23 2015 (r282842) +++ stable/10/tools/regression/aio/aiop/Makefile Wed May 13 10:29:02 2015 (r282843) @@ -3,4 +3,6 @@ PROG= aiop MAN= +WARNS= 6 + .include Modified: stable/10/tools/regression/aio/aiop/aiop.c ============================================================================== --- stable/10/tools/regression/aio/aiop/aiop.c Wed May 13 10:24:23 2015 (r282842) +++ stable/10/tools/regression/aio/aiop/aiop.c Wed May 13 10:29:02 2015 (r282843) @@ -39,21 +39,22 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include -#include #include -#include -#include -#include #include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include #include -#include -#include +#include +#include /* * This is a bit of a quick hack to do parallel IO testing through POSIX AIO. @@ -84,14 +85,12 @@ disk_getsize(int fd) { off_t mediasize; - if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) < 0) { - perror("ioctl(DIOCGMEDIASIZE)"); - exit(1); - } - return mediasize; + if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) < 0) + err(1, "ioctl(DIOCGMEDIASIZE)"); + return (mediasize); } -iot_t +static iot_t choose_aio(iot_t iomask) { /* choose a random read or write event, limited by the mask */ @@ -102,7 +101,7 @@ choose_aio(iot_t iomask) return (random() & 0x01 ? IOT_READ : IOT_WRITE); } -void +static void set_aio(struct aiocb *a, iot_t iot, int fd, off_t offset, int size, char *buf) { int r; @@ -115,10 +114,8 @@ set_aio(struct aiocb *a, iot_t iot, int r = aio_read(a); else r = aio_write(a); - if (r != 0) { - perror("set_aio"); - exit(1); - } + if (r != 0) + err(1, "set_aio call failed"); } int @@ -134,30 +131,35 @@ main(int argc, char *argv[]) off_t file_size, offset; struct aiocb *a; int i, n; - struct timeval st, et, rt; - float f_rt; + struct timeval st, et, rt; + float f_rt; iot_t iowhat; if (argc < 6) { - printf("Usage: %s \n", argv[0]); + printf("Usage: %s \n", + argv[0]); exit(1); } fn = argv[1]; io_size = atoi(argv[2]); + if (io_size <= 0) + errx(1, "the I/O size must be >0"); nrun = atoi(argv[3]); + if (nrun <= 0) + errx(1, "the number of runs must be >0"); aio_len = atoi(argv[4]); - if (strcmp(argv[5], "ro") == 0) { + if (aio_len <= 0) + errx(1, "AIO concurrency must be >0"); + if (strcmp(argv[5], "ro") == 0) iowhat = IOT_READ; - } else if (strcmp(argv[5], "rw") == 0) { + else if (strcmp(argv[5], "rw") == 0) iowhat = IOT_READ | IOT_WRITE; - } else if (strcmp(argv[5], "wo") == 0) { + else if (strcmp(argv[5], "wo") == 0) iowhat = IOT_WRITE; - } else { - fprintf(stderr, "needs to be ro, rw, wo!\n"); - exit(1); - } + else + errx(1, "the I/O type needs to be \"ro\", \"rw\", or \"wo\"!\n"); /* * Random returns values between 0 and (2^32)-1; only good for 4 gig. @@ -171,35 +173,31 @@ main(int argc, char *argv[]) else fd = open(fn, O_RDWR | O_DIRECT); - if (fd < 0) { - perror("open"); - exit(1); - } - if (fstat(fd, &sb) < 0) { - perror("fstat"); - exit(1); - } + if (fd < 0) + err(1, "open failed"); + if (fstat(fd, &sb) < 0) + err(1, "fstat failed"); if (S_ISREG(sb.st_mode)) { file_size = sb.st_size; } else if (S_ISBLK(sb.st_mode) || S_ISCHR(sb.st_mode)) { file_size = disk_getsize(fd); - } else { - perror("unknown file type\n"); - exit(1); - } + } else + errx(1, "unknown file type"); + if (file_size <= 0) + errx(1, "path provided too small"); + printf("File: %s; File size %jd bytes\n", fn, (intmax_t)file_size); aio = calloc(aio_len, sizeof(struct aiocb)); abuf = calloc(aio_len, sizeof(char *)); - for (i = 0; i < aio_len; i++) { + for (i = 0; i < aio_len; i++) abuf[i] = calloc(1, io_size * sizeof(char)); - } /* Fill with the initial contents */ - gettimeofday(&st, NULL); + gettimeofday(&st, NULL); for (i = 0; i < aio_len; i++) { - offset = random() % (file_size / io_size); - offset *= io_size; + offset = random() % (file_size / io_size); + offset *= io_size; set_aio(aio + i, choose_aio(iowhat), fd, offset, io_size, abuf[i]); } @@ -208,18 +206,18 @@ main(int argc, char *argv[]) n = a - aio; assert(n < aio_len); assert(n >= 0); - offset = random() % (file_size / io_size); - offset *= io_size; + offset = random() % (file_size / io_size); + offset *= io_size; set_aio(aio + n, choose_aio(iowhat), fd, offset, io_size, abuf[n]); } - gettimeofday(&et, NULL); - timersub(&et, &st, &rt); - f_rt = ((float) (rt.tv_usec)) / 1000000.0; - f_rt += (float) (rt.tv_sec); - printf("Runtime: %.2f seconds, ", f_rt); - printf("Op rate: %.2f ops/sec, ", ((float) (nrun)) / f_rt); - printf("Avg transfer rate: %.2f bytes/sec\n", ((float) (nrun)) * ((float)io_size) / f_rt); + gettimeofday(&et, NULL); + timersub(&et, &st, &rt); + f_rt = ((float) (rt.tv_usec)) / 1000000.0; + f_rt += (float) (rt.tv_sec); + printf("Runtime: %.2f seconds, ", f_rt); + printf("Op rate: %.2f ops/sec, ", ((float) (nrun)) / f_rt); + printf("Avg transfer rate: %.2f bytes/sec\n", ((float) (nrun)) * ((float)io_size) / f_rt); From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:29:46 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BFC770D; Wed, 13 May 2015 10:29:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 59B43106A; Wed, 13 May 2015 10:29:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DATkSl091792; Wed, 13 May 2015 10:29:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DATkCv091791; Wed, 13 May 2015 10:29:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505131029.t4DATkCv091791@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 May 2015 10:29: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: r282844 - stable/10/usr.sbin/bhyve 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:29:46 -0000 Author: mav Date: Wed May 13 10:29:45 2015 New Revision: 282844 URL: https://svnweb.freebsd.org/changeset/base/282844 Log: MFC r282344: Handle ATA_SEND_FPDMA_QUEUED as NCQ in ahci_port_stop(). Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Wed May 13 10:29:02 2015 (r282843) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Wed May 13 10:29:45 2015 (r282844) @@ -418,7 +418,8 @@ ahci_port_stop(struct ahci_port *p) slot = aior->slot; cfis = aior->cfis; if (cfis[2] == ATA_WRITE_FPDMA_QUEUED || - cfis[2] == ATA_READ_FPDMA_QUEUED) + cfis[2] == ATA_READ_FPDMA_QUEUED || + cfis[2] == ATA_SEND_FPDMA_QUEUED) ncq = 1; if (ncq) From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:30:54 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35485863; Wed, 13 May 2015 10:30:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 22EF3108C; Wed, 13 May 2015 10:30:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAUsn7093259; Wed, 13 May 2015 10:30:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAUsmW093258; Wed, 13 May 2015 10:30:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505131030.t4DAUsmW093258@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 May 2015 10: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: r282845 - stable/10/usr.sbin/bhyve 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:30:54 -0000 Author: mav Date: Wed May 13 10:30:53 2015 New Revision: 282845 URL: https://svnweb.freebsd.org/changeset/base/282845 Log: MFC r282345: Initialize PxCMD on reset and make its read-only bits such. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Wed May 13 10:29:45 2015 (r282844) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Wed May 13 10:30:53 2015 (r282845) @@ -490,6 +490,9 @@ ahci_reset(struct pci_ahci_softc *sc) for (i = 0; i < sc->ports; i++) { sc->port[i].ie = 0; sc->port[i].is = 0; + sc->port[i].cmd = (AHCI_P_CMD_SUD | AHCI_P_CMD_POD); + if (sc->port[i].bctx) + sc->port[i].cmd |= AHCI_P_CMD_CPS; sc->port[i].sctl = 0; ahci_port_reset(&sc->port[i]); } @@ -1941,8 +1944,15 @@ pci_ahci_port_write(struct pci_ahci_soft break; case AHCI_P_CMD: { - p->cmd = value; - + p->cmd &= ~(AHCI_P_CMD_ST | AHCI_P_CMD_SUD | AHCI_P_CMD_POD | + AHCI_P_CMD_CLO | AHCI_P_CMD_FRE | AHCI_P_CMD_APSTE | + AHCI_P_CMD_ATAPI | AHCI_P_CMD_DLAE | AHCI_P_CMD_ALPE | + AHCI_P_CMD_ASP | AHCI_P_CMD_ICC_MASK); + p->cmd |= (AHCI_P_CMD_ST | AHCI_P_CMD_SUD | AHCI_P_CMD_POD | + AHCI_P_CMD_CLO | AHCI_P_CMD_FRE | AHCI_P_CMD_APSTE | + AHCI_P_CMD_ATAPI | AHCI_P_CMD_DLAE | AHCI_P_CMD_ALPE | + AHCI_P_CMD_ASP | AHCI_P_CMD_ICC_MASK) & value; + if (!(value & AHCI_P_CMD_ST)) { ahci_port_stop(p); } else { @@ -1970,6 +1980,10 @@ pci_ahci_port_write(struct pci_ahci_soft p->cmd &= ~AHCI_P_CMD_CLO; } + if (value & AHCI_P_CMD_ICC_MASK) { + p->cmd &= ~AHCI_P_CMD_ICC_MASK; + } + ahci_handle_port(p); break; } From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:35:34 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1D2CA7B; Wed, 13 May 2015 10:35:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 CF28D11C9; Wed, 13 May 2015 10:35:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAZYed096396; Wed, 13 May 2015 10:35:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAZYlI096395; Wed, 13 May 2015 10:35:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505131035.t4DAZYlI096395@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 May 2015 10:35:34 +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: r282846 - stable/10/usr.sbin/bhyve 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:35:35 -0000 Author: mav Date: Wed May 13 10:35:34 2015 New Revision: 282846 URL: https://svnweb.freebsd.org/changeset/base/282846 Log: MFC r282364, r282429, r282524: Implement BSY reporting and in-order execution of non-NCQ commands. Block command queue on BSY or DRQ bits set or device error reported. This can be a performance penalization for non-NCQ commands, but it is required for proper error recovery and standard compliance. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Wed May 13 10:30:53 2015 (r282845) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Wed May 13 10:35:34 2015 (r282846) @@ -135,11 +135,13 @@ struct ahci_port { char ident[20 + 1]; int atapi; int reset; + int waitforclear; int mult_sectors; uint8_t xfermode; uint8_t err_cfis[20]; uint8_t sense_key; uint8_t asc; + u_int ccs; uint32_t pending; uint32_t clb; @@ -204,6 +206,8 @@ struct pci_ahci_softc { }; #define ahci_ctx(sc) ((sc)->asc_pi->pi_vmctx) +static void ahci_handle_port(struct ahci_port *p); + static inline void lba_to_msf(uint8_t *buf, int lba) { lba += 150; @@ -269,22 +273,26 @@ ahci_write_fis(struct ahci_port *p, enum case FIS_TYPE_REGD2H: offset = 0x40; len = 20; - irq = AHCI_P_IX_DHR; + irq = (fis[1] & (1 << 6)) ? AHCI_P_IX_DHR : 0; break; case FIS_TYPE_SETDEVBITS: offset = 0x58; len = 8; - irq = AHCI_P_IX_SDB; + irq = (fis[1] & (1 << 6)) ? AHCI_P_IX_SDB : 0; break; case FIS_TYPE_PIOSETUP: offset = 0x20; len = 20; - irq = 0; + irq = (fis[1] & (1 << 6)) ? AHCI_P_IX_PS : 0; break; default: WPRINTF("unsupported fis type %d\n", ft); return; } + if (fis[2] & ATA_S_ERROR) { + p->waitforclear = 1; + irq |= AHCI_P_IX_TFE; + } memcpy(p->rfis + offset, fis, len); if (irq) { p->is |= irq; @@ -309,22 +317,23 @@ ahci_write_fis_sdb(struct ahci_port *p, uint8_t error; error = (tfd >> 8) & 0xff; + tfd &= 0x77; memset(fis, 0, sizeof(fis)); fis[0] = FIS_TYPE_SETDEVBITS; fis[1] = (1 << 6); - fis[2] = tfd & 0x77; + fis[2] = tfd; fis[3] = error; if (fis[2] & ATA_S_ERROR) { - p->is |= AHCI_P_IX_TFE; p->err_cfis[0] = slot; - p->err_cfis[2] = tfd & 0x77; + p->err_cfis[2] = tfd; p->err_cfis[3] = error; memcpy(&p->err_cfis[4], cfis + 4, 16); } else { *(uint32_t *)(fis + 4) = (1 << slot); p->sact &= ~(1 << slot); } - p->tfd = tfd; + p->tfd &= ~0x77; + p->tfd |= tfd; ahci_write_fis(p, FIS_TYPE_SETDEVBITS, fis); } @@ -351,7 +360,6 @@ ahci_write_fis_d2h(struct ahci_port *p, fis[12] = cfis[12]; fis[13] = cfis[13]; if (fis[2] & ATA_S_ERROR) { - p->is |= AHCI_P_IX_TFE; p->err_cfis[0] = 0x80; p->err_cfis[2] = tfd & 0xff; p->err_cfis[3] = error; @@ -363,6 +371,21 @@ ahci_write_fis_d2h(struct ahci_port *p, } static void +ahci_write_fis_d2h_ncq(struct ahci_port *p, int slot) +{ + uint8_t fis[20]; + + p->tfd = ATA_S_READY | ATA_S_DSC; + memset(fis, 0, sizeof(fis)); + fis[0] = FIS_TYPE_REGD2H; + fis[1] = 0; /* No interrupt */ + fis[2] = p->tfd; /* Status */ + fis[3] = 0; /* No error */ + p->ci &= ~(1 << slot); + ahci_write_fis(p, FIS_TYPE_REGD2H, fis); +} + +static void ahci_write_reset_fis_d2h(struct ahci_port *p) { uint8_t fis[20]; @@ -389,9 +412,11 @@ ahci_check_stopped(struct ahci_port *p) */ if (!(p->cmd & AHCI_P_CMD_ST)) { if (p->pending == 0) { + p->ccs = 0; p->cmd &= ~(AHCI_P_CMD_CR | AHCI_P_CMD_CCS_MASK); p->ci = 0; p->sact = 0; + p->waitforclear = 0; } } } @@ -589,12 +614,13 @@ ahci_handle_rw(struct ahci_port *p, int struct ahci_cmd_hdr *hdr; uint64_t lba; uint32_t len; - int err, ncq, readop; + int err, first, ncq, readop; prdt = (struct ahci_prdt_entry *)(cfis + 0x80); hdr = (struct ahci_cmd_hdr *)(p->cmd_lst + slot * AHCI_CL_SIZE); ncq = 0; readop = 1; + first = (done == 0); if (cfis[2] == ATA_WRITE || cfis[2] == ATA_WRITE48 || cfis[2] == ATA_WRITE_MUL || cfis[2] == ATA_WRITE_MUL48 || @@ -655,14 +681,14 @@ ahci_handle_rw(struct ahci_port *p, int /* Stuff request onto busy list. */ TAILQ_INSERT_HEAD(&p->iobhd, aior, io_blist); + if (ncq && first) + ahci_write_fis_d2h_ncq(p, slot); + if (readop) err = blockif_read(p->bctx, breq); else err = blockif_write(p->bctx, breq); assert(err == 0); - - if (ncq) - p->ci &= ~(1 << slot); } static void @@ -735,15 +761,18 @@ ahci_handle_dsm_trim(struct ahci_port *p uint8_t *entry; uint64_t elba; uint32_t len, elen; - int err; + int err, first, ncq; uint8_t buf[512]; + first = (done == 0); if (cfis[2] == ATA_DATA_SET_MANAGEMENT) { len = (uint16_t)cfis[13] << 8 | cfis[12]; len *= 512; + ncq = 0; } else { /* ATA_SEND_FPDMA_QUEUED */ len = (uint16_t)cfis[11] << 8 | cfis[3]; len *= 512; + ncq = 1; } read_prdt(p, slot, cfis, buf, sizeof(buf)); @@ -762,6 +791,8 @@ next: ahci_write_fis_d2h(p, slot, cfis, ATA_S_READY | ATA_S_DSC); p->pending &= ~(1 << slot); ahci_check_stopped(p); + if (!first) + ahci_handle_port(p); return; } goto next; @@ -793,6 +824,9 @@ next: */ TAILQ_INSERT_HEAD(&p->iobhd, aior, io_blist); + if (ncq && first) + ahci_write_fis_d2h_ncq(p, slot); + err = blockif_delete(p->bctx, breq); assert(err == 0); } @@ -1548,6 +1582,7 @@ static void ahci_handle_cmd(struct ahci_port *p, int slot, uint8_t *cfis) { + p->tfd |= ATA_S_BUSY; switch (cfis[2]) { case ATA_ATA_IDENTIFY: handle_identify(p, slot, cfis); @@ -1729,20 +1764,23 @@ ahci_handle_slot(struct ahci_port *p, in static void ahci_handle_port(struct ahci_port *p) { - int i; if (!(p->cmd & AHCI_P_CMD_ST)) return; /* * Search for any new commands to issue ignoring those that - * are already in-flight. + * are already in-flight. Stop if device is busy or in error. */ - for (i = 0; (i < 32) && p->ci; i++) { - if ((p->ci & (1 << i)) && !(p->pending & (1 << i))) { + for (; (p->ci & ~p->pending) != 0; p->ccs = ((p->ccs + 1) & 31)) { + if ((p->tfd & (ATA_S_BUSY | ATA_S_DRQ)) != 0) + break; + if (p->waitforclear) + break; + if ((p->ci & ~p->pending & (1 << p->ccs)) != 0) { p->cmd &= ~AHCI_P_CMD_CCS_MASK; - p->cmd |= i << AHCI_P_CMD_CCS_SHIFT; - ahci_handle_slot(p, i); + p->cmd |= p->ccs << AHCI_P_CMD_CCS_SHIFT; + ahci_handle_slot(p, p->ccs); } } } @@ -1819,6 +1857,7 @@ ata_ioreq_cb(struct blockif_req *br, int p->pending &= ~(1 << slot); ahci_check_stopped(p); + ahci_handle_port(p); out: pthread_mutex_unlock(&sc->mtx); DPRINTF("%s exit\n", __func__); @@ -1880,6 +1919,7 @@ atapi_ioreq_cb(struct blockif_req *br, i p->pending &= ~(1 << slot); ahci_check_stopped(p); + ahci_handle_port(p); out: pthread_mutex_unlock(&sc->mtx); DPRINTF("%s exit\n", __func__); @@ -1976,7 +2016,7 @@ pci_ahci_port_write(struct pci_ahci_soft } if (value & AHCI_P_CMD_CLO) { - p->tfd = 0; + p->tfd &= ~(ATA_S_BUSY | ATA_S_DRQ); p->cmd &= ~AHCI_P_CMD_CLO; } From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:43:51 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E884DE40; Wed, 13 May 2015 10:43:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 D598B12E7; Wed, 13 May 2015 10:43:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAhoQY001448; Wed, 13 May 2015 10:43:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAhoqA001446; Wed, 13 May 2015 10:43:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131043.t4DAhoqA001446@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:43:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282847 - in stable/9/sys: dev/ixgbe sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:43:51 -0000 Author: ngie Date: Wed May 13 10:43:49 2015 New Revision: 282847 URL: https://svnweb.freebsd.org/changeset/base/282847 Log: MFstable/10 r281951,r281954: r281951: Backport MHSIZE/MPKTHSIZE equivalents from head These macros are equivalent to the ones on head, except they are only exposed when _KERNEL is defined, i.e. to kernel code, whereas the code on head is exposed to userland as well This is for improved forwards compatibility with mbuf(9) macros in head@r277203+, and is required for a clean MFC of r279393 This is a direct commit to stable/10 Differential Revision: https://reviews.freebsd.org/D2126 Reviewed by: glebius, rwatson Sponsored by: EMC / Isilon Storage Division r281954: MFC r279393: Pad RX copy alignment calculation to avoid illegal memory accesses The optimization made in r239940 is valid for struct mbuf's current structure and size in FreeBSD, but hardcodes assumptions about sizes of struct mbuf, which are unfortunately broken if additional data is added to the beginning of struct mbuf X-MFC note (discussed with rwatson): This change requires the MPKTHSIZE definition, which is only available after head@r277203 and will not be MFCed as it breaks mbuf(9) KPI. A direct commit to stable/10 and merges to other branches to add the necessary definitions to work with the code as-is will be done to facilitate this MFC PR: 194314 Approved/Reviewed by: erj, jfv Sponsored by: EMC / Isilon Storage Division Modified: stable/9/sys/dev/ixgbe/ixgbe.h stable/9/sys/sys/mbuf.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/dev/ixgbe/ixgbe.h ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.h Wed May 13 10:35:34 2015 (r282846) +++ stable/9/sys/dev/ixgbe/ixgbe.h Wed May 13 10:43:49 2015 (r282847) @@ -160,8 +160,9 @@ * modern Intel CPUs, results in 40 bytes wasted and a significant drop * in observed efficiency of the optimization, 97.9% -> 81.8%. */ -#define IXGBE_RX_COPY_LEN 160 -#define IXGBE_RX_COPY_ALIGN (MHLEN - IXGBE_RX_COPY_LEN) +#define IXGBE_RX_COPY_HDR_PADDED ((((MPKTHSIZE - 1) / 32) + 1) * 32) +#define IXGBE_RX_COPY_LEN (MSIZE - IXGBE_RX_COPY_HDR_PADDED) +#define IXGBE_RX_COPY_ALIGN (IXGBE_RX_COPY_HDR_PADDED - MPKTHSIZE) /* Keep older OS drivers building... */ #if !defined(SYSCTL_ADD_UQUAD) Modified: stable/9/sys/sys/mbuf.h ============================================================================== --- stable/9/sys/sys/mbuf.h Wed May 13 10:35:34 2015 (r282846) +++ stable/9/sys/sys/mbuf.h Wed May 13 10:43:49 2015 (r282847) @@ -174,6 +174,16 @@ struct mbuf { #define m_pktdat M_dat.MH.MH_dat.MH_databuf #define m_dat M_dat.M_databuf +/* + * NOTE: forwards compatibility definitions for mbuf(9) + * + * These aren't 1:1 with the macros in r277203; in particular they're exposed + * to both userland and kernel, whereas this is exposed to just _KERNEL -- to + * avoid disruption with existing KBI/KPIs + */ +#define MHSIZE offsetof(struct mbuf, m_dat) +#define MPKTHSIZE offsetof(struct mbuf, m_pktdat) + /* * mbuf flags. */ From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:53:17 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4645D16E; Wed, 13 May 2015 10:53:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 346FA1465; Wed, 13 May 2015 10:53:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DArHCf006325; Wed, 13 May 2015 10:53:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DArH4Y006324; Wed, 13 May 2015 10:53:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131053.t4DArH4Y006324@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:53: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: r282848 - stable/10 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:53:17 -0000 Author: ngie Date: Wed May 13 10:53:16 2015 New Revision: 282848 URL: https://svnweb.freebsd.org/changeset/base/282848 Log: MFC r281618,r281823: r281618: Defeat race with MK_KERBEROS == yes introduced with bootstrap-tools parallelization work done in r279197 - kerberos5/lib/libroken requires kerberos5/tools/make-roken to build - kerberos5/tools/asn1_compile, kerberos5/tools/slc, and usr.bin/compile_et require kerberos5/lib/libroken and kerberos5/lib/libvers This race is incredibly evident when cross-building sparc64 on ref10-amd64.freebsd.org Pointyhat to: ngie r281823: Serialize all of _kerberos5_bootstrap_tools to avoid build failures involving make bootstrap-tools On the plus side, this also greatly reduces complexity Pointyhat to: ngie Reported by: Willem Jan Withagen Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Wed May 13 10:43:49 2015 (r282847) +++ stable/10/Makefile.inc1 Wed May 13 10:53:16 2015 (r282848) @@ -1328,8 +1328,7 @@ _kerberos5_bootstrap_tools= \ kerberos5/tools/slc \ usr.bin/compile_et -${_bt}-kerberos5/tools/slc: ${_bt}-kerberos5/lib/libroken -${_bt}-kerberos5/tools/asn1_compile: ${_bt}-kerberos5/lib/libroken +.ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g} .endif .if ${_BOOTSTRAP_MAKEINFO} != "no" From owner-svn-src-stable@FreeBSD.ORG Wed May 13 10:56:36 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7ED33316; Wed, 13 May 2015 10:56:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 6C17B14A6; Wed, 13 May 2015 10:56:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DAuaPt006895; Wed, 13 May 2015 10:56:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DAuaS4006894; Wed, 13 May 2015 10:56:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131056.t4DAuaS4006894@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 10:56:36 +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: r282849 - stable/10/contrib/netbsd-tests/lib/libpthread 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 10:56:36 -0000 Author: ngie Date: Wed May 13 10:56:35 2015 New Revision: 282849 URL: https://svnweb.freebsd.org/changeset/base/282849 Log: MFC r281966: Add #include sys/types.h for register_t for mips Modified: stable/10/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Wed May 13 10:53:16 2015 (r282848) +++ stable/10/contrib/netbsd-tests/lib/libpthread/t_swapcontext.c Wed May 13 10:56:35 2015 (r282849) @@ -28,6 +28,9 @@ #include __RCSID("$NetBSD"); +#ifdef __FreeBSD__ +#include +#endif #include #include #include From owner-svn-src-stable@FreeBSD.ORG Wed May 13 11:01:50 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01E5959C; Wed, 13 May 2015 11:01:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 C9BD015D6; Wed, 13 May 2015 11:01:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DB1nLT008901; Wed, 13 May 2015 11:01:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DB1ndf008898; Wed, 13 May 2015 11:01:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131101.t4DB1ndf008898@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 11:01: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: r282850 - stable/10/tests/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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 11:01:50 -0000 Author: ngie Date: Wed May 13 11:01:48 2015 New Revision: 282850 URL: https://svnweb.freebsd.org/changeset/base/282850 Log: MFC r262526,r262730: r262526 (by pho): Added a regression test for r234131. Discussed with: asomers Sponsored by: EMC / Isilon storage division r262730 (by pho): Changed name of test case to a more descriptive one and moved comment to the "descr" property. Suggested by: jmmv Sponsored by: EMC / Isilon storage division Added: stable/10/tests/sys/kern/kern_descrip_test.c - copied, changed from r262526, head/tests/sys/kern/kern_descrip_test.c Modified: stable/10/tests/sys/kern/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/kern/Makefile ============================================================================== --- stable/10/tests/sys/kern/Makefile Wed May 13 10:56:35 2015 (r282849) +++ stable/10/tests/sys/kern/Makefile Wed May 13 11:01:48 2015 (r282850) @@ -2,7 +2,8 @@ TESTSDIR= ${TESTSBASE}/sys/kern -ATF_TESTS_C= unix_seqpacket_test +ATF_TESTS_C+= kern_descrip_test +ATF_TESTS_C+= unix_seqpacket_test TEST_METADATA.unix_seqpacket_test+= timeout="15" LDADD.unix_seqpacket_test+= -lpthread Copied and modified: stable/10/tests/sys/kern/kern_descrip_test.c (from r262526, head/tests/sys/kern/kern_descrip_test.c) ============================================================================== --- head/tests/sys/kern/kern_descrip_test.c Wed Feb 26 09:08:25 2014 (r262526, copy source) +++ stable/10/tests/sys/kern/kern_descrip_test.c Wed May 13 11:01:48 2015 (r282850) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 EMC Corp. + * Copyright (c) 2014 EMC Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -52,14 +52,12 @@ ATF_TC_BODY(dup2_simple, tc) ATF_REQUIRE(bcmp(&sb1, &sb2, sizeof(sb1)) == 0); } -/* - Regression test for r234131: - Return EBADF instead of EMFILE from dup2 when the second argument is - outside the range of valid file descriptors - */ - -ATF_TC_WITHOUT_HEAD(dup2_r234131); -ATF_TC_BODY(dup2_r234131, tc) +ATF_TC(dup2__ebadf_when_2nd_arg_out_of_range); +ATF_TC_HEAD(dup2__ebadf_when_2nd_arg_out_of_range, tc) +{ + atf_tc_set_md_var(tc, "descr", "Regression test for r234131"); +} +ATF_TC_BODY(dup2__ebadf_when_2nd_arg_out_of_range, tc) { int fd1, fd2, ret; @@ -74,7 +72,7 @@ ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, dup2_simple); - ATF_TP_ADD_TC(tp, dup2_r234131); + ATF_TP_ADD_TC(tp, dup2__ebadf_when_2nd_arg_out_of_range); return atf_no_error(); } From owner-svn-src-stable@FreeBSD.ORG Wed May 13 11:06:13 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7539A733; Wed, 13 May 2015 11:06:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 55AC9160B; Wed, 13 May 2015 11:06:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DB6D8F011966; Wed, 13 May 2015 11:06:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DB6Dkb011965; Wed, 13 May 2015 11:06:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131106.t4DB6Dkb011965@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 11:06:13 +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: r282851 - stable/10/tools/regression/mmap 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 11:06:13 -0000 Author: ngie Date: Wed May 13 11:06:12 2015 New Revision: 282851 URL: https://svnweb.freebsd.org/changeset/base/282851 Log: MFC r282075: Convert this testcase over to a TAP format testcase Modified: stable/10/tools/regression/mmap/mmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/mmap/mmap.c ============================================================================== --- stable/10/tools/regression/mmap/mmap.c Wed May 13 11:01:48 2015 (r282850) +++ stable/10/tools/regression/mmap/mmap.c Wed May 13 11:06:12 2015 (r282851) @@ -31,10 +31,11 @@ #include #include +#include #include -#include +#include -const struct tests { +static const struct { void *addr; int ok[2]; /* Depending on security.bsd.map_at_zero {0, !=0}. */ } tests[] = { @@ -49,6 +50,8 @@ const struct tests { { (void *)(0x1000 * PAGE_SIZE), { 1, 1 } }, }; +#define MAP_AT_ZERO "security.bsd.map_at_zero" + int main(void) { @@ -60,37 +63,43 @@ main(void) /* Get the current sysctl value of security.bsd.map_at_zero. */ len = sizeof(mib) / sizeof(*mib); - if (sysctlnametomib("security.bsd.map_at_zero", mib, &len) == -1) - err(1, "sysctlnametomib(security.bsd.map_at_zero)"); + if (sysctlnametomib(MAP_AT_ZERO, mib, &len) == -1) { + printf("1..0 # SKIP: sysctlnametomib(\"%s\") failed: %s\n", + MAP_AT_ZERO, strerror(errno)); + return (0); + } len = sizeof(map_at_zero); - if (sysctl(mib, 3, &map_at_zero, &len, NULL, 0) == -1) - err(1, "sysctl(security.bsd.map_at_zero)"); + if (sysctl(mib, 3, &map_at_zero, &len, NULL, 0) == -1) { + printf("1..0 # SKIP: sysctl for %s failed: %s\n", MAP_AT_ZERO, + strerror(errno)); + return (0); + } /* Normalize to 0 or 1 for array access. */ map_at_zero = !!map_at_zero; - for (i=0; i < (sizeof(tests) / sizeof(*tests)); i++) { + printf("1..%zu\n", nitems(tests)); + for (i = 0; i < (int)nitems(tests); i++) { p = mmap((void *)tests[i].addr, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_FIXED, -1, 0); if (p == MAP_FAILED) { if (tests[i].ok[map_at_zero] != 0) error++; - warnx("%s: mmap(%p, ...) failed.", - (tests[i].ok[map_at_zero] == 0) ? "OK " : "ERR", - tests[i].addr); + printf("%sok %d # mmap(%p, ...) failed\n", + tests[i].ok[map_at_zero] == 0 ? "" : "not ", + i + 1, + tests[i].addr); } else { if (tests[i].ok[map_at_zero] != 1) error++; - warnx("%s: mmap(%p, ...) succeeded: p=%p", - (tests[i].ok[map_at_zero] == 1) ? "OK " : "ERR", + printf("%sok %d # mmap(%p, ...) succeeded: p=%p\n", + tests[i].ok[map_at_zero] == 1 ? "" : "not ", + i + 1, tests[i].addr, p); } } - if (error) - err(1, "---\nERROR: %d unexpected results.", error); - return (error != 0); } From owner-svn-src-stable@FreeBSD.ORG Wed May 13 11:07:41 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4338914; Wed, 13 May 2015 11:07:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 85184162A; Wed, 13 May 2015 11:07:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DB7fBl012224; Wed, 13 May 2015 11:07:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DB7f1w012222; Wed, 13 May 2015 11:07:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131107.t4DB7f1w012222@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 11:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282852 - stable/9/tools/regression/mmap X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 11:07:41 -0000 Author: ngie Date: Wed May 13 11:07:40 2015 New Revision: 282852 URL: https://svnweb.freebsd.org/changeset/base/282852 Log: MFstable/10 r282851: MFC r282075: Convert this testcase over to a TAP format testcase Modified: stable/9/tools/regression/mmap/mmap.c Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) Modified: stable/9/tools/regression/mmap/mmap.c ============================================================================== --- stable/9/tools/regression/mmap/mmap.c Wed May 13 11:06:12 2015 (r282851) +++ stable/9/tools/regression/mmap/mmap.c Wed May 13 11:07:40 2015 (r282852) @@ -31,10 +31,11 @@ #include #include +#include #include -#include +#include -const struct tests { +static const struct { void *addr; int ok[2]; /* Depending on security.bsd.map_at_zero {0, !=0}. */ } tests[] = { @@ -49,6 +50,8 @@ const struct tests { { (void *)(0x1000 * PAGE_SIZE), { 1, 1 } }, }; +#define MAP_AT_ZERO "security.bsd.map_at_zero" + int main(void) { @@ -60,37 +63,43 @@ main(void) /* Get the current sysctl value of security.bsd.map_at_zero. */ len = sizeof(mib) / sizeof(*mib); - if (sysctlnametomib("security.bsd.map_at_zero", mib, &len) == -1) - err(1, "sysctlnametomib(security.bsd.map_at_zero)"); + if (sysctlnametomib(MAP_AT_ZERO, mib, &len) == -1) { + printf("1..0 # SKIP: sysctlnametomib(\"%s\") failed: %s\n", + MAP_AT_ZERO, strerror(errno)); + return (0); + } len = sizeof(map_at_zero); - if (sysctl(mib, 3, &map_at_zero, &len, NULL, 0) == -1) - err(1, "sysctl(security.bsd.map_at_zero)"); + if (sysctl(mib, 3, &map_at_zero, &len, NULL, 0) == -1) { + printf("1..0 # SKIP: sysctl for %s failed: %s\n", MAP_AT_ZERO, + strerror(errno)); + return (0); + } /* Normalize to 0 or 1 for array access. */ map_at_zero = !!map_at_zero; - for (i=0; i < (sizeof(tests) / sizeof(*tests)); i++) { + printf("1..%zu\n", nitems(tests)); + for (i = 0; i < (int)nitems(tests); i++) { p = mmap((void *)tests[i].addr, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_FIXED, -1, 0); if (p == MAP_FAILED) { if (tests[i].ok[map_at_zero] != 0) error++; - warnx("%s: mmap(%p, ...) failed.", - (tests[i].ok[map_at_zero] == 0) ? "OK " : "ERR", - tests[i].addr); + printf("%sok %d # mmap(%p, ...) failed\n", + tests[i].ok[map_at_zero] == 0 ? "" : "not ", + i + 1, + tests[i].addr); } else { if (tests[i].ok[map_at_zero] != 1) error++; - warnx("%s: mmap(%p, ...) succeeded: p=%p", - (tests[i].ok[map_at_zero] == 1) ? "OK " : "ERR", + printf("%sok %d # mmap(%p, ...) succeeded: p=%p\n", + tests[i].ok[map_at_zero] == 1 ? "" : "not ", + i + 1, tests[i].addr, p); } } - if (error) - err(1, "---\nERROR: %d unexpected results.", error); - return (error != 0); } From owner-svn-src-stable@FreeBSD.ORG Wed May 13 11:12:07 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5454B47; Wed, 13 May 2015 11:12:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B1A181701; Wed, 13 May 2015 11:12:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DBC7Zd016492; Wed, 13 May 2015 11:12:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DBC7mH016490; Wed, 13 May 2015 11:12:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131112.t4DBC7mH016490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 11:12:07 +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: r282853 - in stable/10: etc/mtree tests/sys tests/sys/vm tools/regression/mmap 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 11:12:07 -0000 Author: ngie Date: Wed May 13 11:12:06 2015 New Revision: 282853 URL: https://svnweb.freebsd.org/changeset/base/282853 Log: MFC r282076,r282104: r282076: Integrate tools/regression/mmap into the FreeBSD test suite as tests/sys/kern/mmap_test r282104: Move tests/sys/kern/mmap_test to tests/sys/vm/mmap_test As jhb noted, the actual mmap(2) implementation is under sys/vm, not sys/kern/, so the correct logical place is tests/sys/vm/, not tests/sys/kern/ Added: stable/10/tests/sys/vm/ - copied from r282104, head/tests/sys/vm/ Deleted: stable/10/tools/regression/mmap/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Wed May 13 11:07:40 2015 (r282852) +++ stable/10/etc/mtree/BSD.tests.dist Wed May 13 11:12:06 2015 (r282853) @@ -220,6 +220,8 @@ unlink .. .. + vm + .. .. usr.bin apply Modified: stable/10/tests/sys/Makefile ============================================================================== --- stable/10/tests/sys/Makefile Wed May 13 11:07:40 2015 (r282852) +++ stable/10/tests/sys/Makefile Wed May 13 11:12:06 2015 (r282853) @@ -9,6 +9,7 @@ TESTS_SUBDIRS+= file TESTS_SUBDIRS+= kern TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= netinet +TESTS_SUBDIRS+= vm # Items not integrated into kyua runs by default SUBDIR+= pjdfstest From owner-svn-src-stable@FreeBSD.ORG Wed May 13 11:32:57 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 838A3104; Wed, 13 May 2015 11:32:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 7078919A4; Wed, 13 May 2015 11:32:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DBWvEf026255; Wed, 13 May 2015 11:32:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DBWuNB026247; Wed, 13 May 2015 11:32:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131132.t4DBWuNB026247@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 11:32:56 +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: r282854 - in stable/10/lib: libc librt libthr msun msun/tests 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 11:32:57 -0000 Author: ngie Date: Wed May 13 11:32:55 2015 New Revision: 282854 URL: https://svnweb.freebsd.org/changeset/base/282854 Log: MFC r282057,r282092,r282106: r282057: Build/install libc, librt, libthr, and msun NetBSD test suites on all architectures r282092 (by andrew): Correct the spelling of MACHINE_CPUARCH, MACHINE_CPU is not set on arm64. r282106: Remove per-architecture checks for enabling HAVE_FENV_H The conditional came from NetBSD, where only select architectures have this header/support All architectures on FreeBSD have the necessary support though, so the conditional's completely unnecessary make tinderbox done on all architectures (including arm64, where the issue occurred before) this time Deleted: stable/10/lib/libc/Makefile.amd64 stable/10/lib/libc/Makefile.i386 stable/10/lib/librt/Makefile.amd64 stable/10/lib/librt/Makefile.i386 stable/10/lib/libthr/Makefile.amd64 stable/10/lib/libthr/Makefile.i386 stable/10/lib/msun/Makefile.amd64 stable/10/lib/msun/Makefile.i386 Modified: stable/10/lib/libc/Makefile stable/10/lib/librt/Makefile stable/10/lib/libthr/Makefile stable/10/lib/msun/Makefile stable/10/lib/msun/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/Makefile ============================================================================== --- stable/10/lib/libc/Makefile Wed May 13 11:12:06 2015 (r282853) +++ stable/10/lib/libc/Makefile Wed May 13 11:32:55 2015 (r282854) @@ -160,7 +160,9 @@ libkern.${LIBC_ARCH}:: ${KMSRCS} CFLAGS+=-DSYSCALL_COMPAT .endif -.include +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/10/lib/librt/Makefile ============================================================================== --- stable/10/lib/librt/Makefile Wed May 13 11:12:06 2015 (r282853) +++ stable/10/lib/librt/Makefile Wed May 13 11:32:55 2015 (r282854) @@ -20,6 +20,8 @@ PRECIOUSLIB= VERSION_MAP= ${.CURDIR}/Version.map -.include +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/10/lib/libthr/Makefile ============================================================================== --- stable/10/lib/libthr/Makefile Wed May 13 11:12:06 2015 (r282853) +++ stable/10/lib/libthr/Makefile Wed May 13 11:32:55 2015 (r282854) @@ -63,6 +63,8 @@ SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpth CFLAGS+=-DSYSCALL_COMPAT .endif -.include +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/10/lib/msun/Makefile ============================================================================== --- stable/10/lib/msun/Makefile Wed May 13 11:12:06 2015 (r282853) +++ stable/10/lib/msun/Makefile Wed May 13 11:32:55 2015 (r282854) @@ -219,6 +219,8 @@ MLINKS+=trunc.3 truncf.3 trunc.3 truncl. .include -.include +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/10/lib/msun/tests/Makefile ============================================================================== --- stable/10/lib/msun/tests/Makefile Wed May 13 11:12:06 2015 (r282853) +++ stable/10/lib/msun/tests/Makefile Wed May 13 11:32:55 2015 (r282854) @@ -6,11 +6,8 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/ TESTSDIR= ${TESTSBASE}/lib/msun -.if ${MACHINE} == "sparc" || ${MACHINE} == "i386" \ - || ${MACHINE} == "amd64" || ${MACHINE_CPU} == "arm" \ - || ${MACHINE} == "sparc64" +# All architectures on FreeBSD have fenv.h CFLAGS+= -DHAVE_FENV_H -.endif .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" CFLAGS+= -D__HAVE_LONG_DOUBLE From owner-svn-src-stable@FreeBSD.ORG Wed May 13 11:49:39 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7DB3565; Wed, 13 May 2015 11:49:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B96F11B83; Wed, 13 May 2015 11:49:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DBndCw032012; Wed, 13 May 2015 11:49:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DBncLm032008; Wed, 13 May 2015 11:49:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131149.t4DBncLm032008@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 11:49:38 +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: r282855 - in stable/10/tools/regression/aio/kqueue: . lio 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 11:49:40 -0000 Author: ngie Date: Wed May 13 11:49:38 2015 New Revision: 282855 URL: https://svnweb.freebsd.org/changeset/base/282855 Log: MFC r280894,r280895: r280894: Minor cleanup before converting to ATF testcases - Remove blank (tab-only) lines. - Fix -Wunused warnings. - Bump up to WARNS= 6 r280895: - Fix -Wsign issue - Bump up to WARNS=6 Modified: stable/10/tools/regression/aio/kqueue/Makefile stable/10/tools/regression/aio/kqueue/aio_kqueue.c stable/10/tools/regression/aio/kqueue/lio/Makefile stable/10/tools/regression/aio/kqueue/lio/lio_kqueue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/aio/kqueue/Makefile ============================================================================== --- stable/10/tools/regression/aio/kqueue/Makefile Wed May 13 11:32:55 2015 (r282854) +++ stable/10/tools/regression/aio/kqueue/Makefile Wed May 13 11:49:38 2015 (r282855) @@ -3,4 +3,8 @@ PROG= aio_kqueue MAN= +WARNS?= 6 + +SUBDIR+= lio + .include Modified: stable/10/tools/regression/aio/kqueue/aio_kqueue.c ============================================================================== --- stable/10/tools/regression/aio/kqueue/aio_kqueue.c Wed May 13 11:32:55 2015 (r282854) +++ stable/10/tools/regression/aio/kqueue/aio_kqueue.c Wed May 13 11:49:38 2015 (r282855) @@ -177,7 +177,7 @@ main (int argc, char *argv[]) #endif if (result != sizeof(buffer)) { printf("FAIL: run %d, operation %d, result %d " - " (errno=%d) should be %d\n", run, pending, + " (errno=%d) should be %zu\n", run, pending, result, errno, sizeof(buffer)); failed++; } else Modified: stable/10/tools/regression/aio/kqueue/lio/Makefile ============================================================================== --- stable/10/tools/regression/aio/kqueue/lio/Makefile Wed May 13 11:32:55 2015 (r282854) +++ stable/10/tools/regression/aio/kqueue/lio/Makefile Wed May 13 11:49:38 2015 (r282855) @@ -3,4 +3,6 @@ PROG= lio_kqueue MAN= +WARNS?= 6 + .include Modified: stable/10/tools/regression/aio/kqueue/lio/lio_kqueue.c ============================================================================== --- stable/10/tools/regression/aio/kqueue/lio/lio_kqueue.c Wed May 13 11:32:55 2015 (r282854) +++ stable/10/tools/regression/aio/kqueue/lio/lio_kqueue.c Wed May 13 11:49:38 2015 (r282855) @@ -37,13 +37,15 @@ * http://www.ambrisko.com/doug/listio_kqueue/listio_kqueue.patch */ -#include -#include -#include -#include #include #include #include +#include +#include +#include +#include +#include +#include #include #define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX" @@ -52,9 +54,10 @@ #define MAX LIO_MAX * 16 #define MAX_RUNS 300 +int main(int argc, char *argv[]){ int fd; - struct aiocb *iocb[MAX], *kq_iocb; + struct aiocb *iocb[MAX]; struct aiocb **lio[LIO_MAX], **lio_element, **kq_lio; int i, result, run, error, j, k; char buffer[32768]; @@ -65,7 +68,7 @@ main(int argc, char *argv[]){ time_t time1, time2; char *file, pathname[sizeof(PATH_TEMPLATE)-1]; int tmp_file = 0, failed = 0; - + if (kq < 0) { perror("No kqeueue\n"); exit(1); @@ -89,7 +92,7 @@ main(int argc, char *argv[]){ #ifdef DEBUG printf("Hello kq %d fd %d\n", kq, fd); #endif - + for (run = 0; run < MAX_RUNS; run++){ #ifdef DEBUG printf("Run %d\n", run); @@ -137,13 +140,13 @@ main(int argc, char *argv[]){ printf("write %d is at %p\n", j, lio[j]); #endif } - + for(i = 0; i < LIO_MAX; i++) { for(j = LIO_MAX - 1; j >=0; j--) { if (lio[j]) break; } - + for(;;) { bzero(&ke, sizeof(ke)); bzero(&kq_returned, sizeof(ke)); @@ -169,18 +172,18 @@ main(int argc, char *argv[]){ kq_returned.udata, lio[j]); #endif - + if(kq_lio) break; #ifdef DEBUG printf("Try again\n"); #endif - } - + } + #ifdef DEBUG printf("lio %p\n", lio); #endif - + for (j = 0; j < LIO_MAX; j++) { if (lio[j] == kq_lio) { break; @@ -201,12 +204,12 @@ main(int argc, char *argv[]){ printf("PASS: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result); } for(k = 0; k < MAX / LIO_MAX; k++){ - result = aio_return(kq_lio[k]); + result = aio_return(kq_lio[k]); #ifdef DEBUG printf("Return Resulto for %d %d is %d\n", j, k, result); #endif if (result != sizeof(buffer)) { - printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %d\n", + printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %zu\n", run, LIO_MAX - i -1, k, result, errno, sizeof(buffer)); } else { printf("PASS: run %d, operation %d sub-opt %d result %d\n", @@ -216,13 +219,13 @@ main(int argc, char *argv[]){ #ifdef DEBUG printf("\n"); #endif - + for(k = 0; k < MAX / LIO_MAX; k++) { free(lio[j][k]); } free(lio[j]); lio[j] = NULL; - } + } } #ifdef DEBUG printf("Done\n"); From owner-svn-src-stable@FreeBSD.ORG Wed May 13 12:09:05 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9529EFFB; Wed, 13 May 2015 12:09:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 802461E17; Wed, 13 May 2015 12:09:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DC95ws042248; Wed, 13 May 2015 12:09:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DC92BL042214; Wed, 13 May 2015 12:09:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131209.t4DC92BL042214@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 12:09:01 +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: r282858 - in stable/10: etc/mtree tests/freebsd_test_suite tests/sys tests/sys/aio tests/sys/mqueue tools/regression/aio/aiotest tools/regression/aio/kqueue tools/regression/mqueue 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 12:09:05 -0000 Author: ngie Date: Wed May 13 12:09:01 2015 New Revision: 282858 URL: https://svnweb.freebsd.org/changeset/base/282858 Log: MFC r281593,r282071,r282074,r282133,r282134,r282135,r282136,r282137,r282138: r282071: Integrate tools/regression/mqueue into the FreeBSD test suite as tests/sys/mqueue r282074: Integrate tools/regression/aio/aiotest and tools/regression/aio/kqueue into the FreeBSD test suite as tests/sys/aio r282133: Fill in the copyright boilerplate for the test program r282134: Add initial (unpolished) macros for interfacing with the FreeBSD test suite This is very rough, but will be replaced/redesigned some time soon after I fix the Jenkins breakage I introduced r282135: Use ATF_REQUIRE_KERNEL_MODULE instead of aio_available function r282136: - Use ATF_REQUIRE_KERNEL_MDOULE to require aio(4) - Don't use /tmp as a basis for temporary files as it's outside of the ATF sandbox - Don't override MAX macro in sys/param.h r282137: Use PLAIN_REQUIRE_KERNEL_MODULE to require "mqueuefs" r282138: Adjust CFLAGS to find freebsd_test_suite/macros.h Added: stable/10/tests/freebsd_test_suite/ - copied from r282134, head/tests/freebsd_test_suite/ stable/10/tests/sys/aio/ - copied from r282074, head/tests/sys/aio/ stable/10/tests/sys/mqueue/ - copied from r282071, head/tests/sys/mqueue/ Deleted: stable/10/tools/regression/aio/aiotest/ stable/10/tools/regression/aio/kqueue/ stable/10/tools/regression/mqueue/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/Makefile stable/10/tests/sys/aio/Makefile stable/10/tests/sys/aio/aio_kqueue_test.c stable/10/tests/sys/aio/aio_test.c stable/10/tests/sys/aio/lio_kqueue_test.c stable/10/tests/sys/mqueue/Makefile stable/10/tests/sys/mqueue/mqtest1.c stable/10/tests/sys/mqueue/mqtest2.c stable/10/tests/sys/mqueue/mqtest3.c stable/10/tests/sys/mqueue/mqtest4.c stable/10/tests/sys/mqueue/mqtest5.c stable/10/tests/sys/mqueue/mqueue_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Wed May 13 12:02:51 2015 (r282857) +++ stable/10/etc/mtree/BSD.tests.dist Wed May 13 12:09:01 2015 (r282858) @@ -178,6 +178,8 @@ .. .. sys + aio + .. fifo .. file @@ -186,6 +188,8 @@ .. kqueue .. + mqueue + .. netinet .. pjdfstest Modified: stable/10/tests/sys/Makefile ============================================================================== --- stable/10/tests/sys/Makefile Wed May 13 12:02:51 2015 (r282857) +++ stable/10/tests/sys/Makefile Wed May 13 12:09:01 2015 (r282858) @@ -4,10 +4,12 @@ TESTSDIR= ${TESTSBASE}/sys +TESTS_SUBDIRS+= aio TESTS_SUBDIRS+= fifo TESTS_SUBDIRS+= file TESTS_SUBDIRS+= kern TESTS_SUBDIRS+= kqueue +TESTS_SUBDIRS+= mqueue TESTS_SUBDIRS+= netinet TESTS_SUBDIRS+= vm Modified: stable/10/tests/sys/aio/Makefile ============================================================================== --- head/tests/sys/aio/Makefile Mon Apr 27 08:51:40 2015 (r282074) +++ stable/10/tests/sys/aio/Makefile Wed May 13 12:09:01 2015 (r282858) @@ -9,6 +9,8 @@ ATF_TESTS_C+= aio_test DPADD.aio_test+= ${LIBUTIL} LDADD.aio_test+= -lutil +CFLAGS+= -I${.CURDIR:H:H} + WARNS?= 6 .include Modified: stable/10/tests/sys/aio/aio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/aio_kqueue_test.c Mon Apr 27 08:51:40 2015 (r282074) +++ stable/10/tests/sys/aio/aio_kqueue_test.c Wed May 13 12:09:01 2015 (r282858) @@ -46,25 +46,29 @@ #include #include -#define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX" +#include "freebsd_test_suite/macros.h" -#define MAX 128 +#define PATH_TEMPLATE "aio.XXXXXXXXXX" + +#define MAX_IOCBS 128 #define MAX_RUNS 300 /* #define DEBUG */ int main (int argc, char *argv[]) { - int fd; - struct aiocb *iocb[MAX], *kq_iocb; - int i, result, run, error, j; - char buffer[32768]; - int kq = kqueue(); + struct aiocb *iocb[MAX_IOCBS], *kq_iocb; + char *file, pathname[sizeof(PATH_TEMPLATE)+1]; struct kevent ke, kq_returned; struct timespec ts; - int cancel, pending, tmp_file = 0, failed = 0; - char *file, pathname[sizeof(PATH_TEMPLATE)+1]; + char buffer[32768]; + int cancel, error, failed = 0, fd, kq, pending, result, run; + int tmp_file = 0; + unsigned i, j; + + PLAIN_REQUIRE_KERNEL_MODULE("aio", 0); + kq = kqueue(); if (kq < 0) { perror("No kqeueue\n"); exit(1); @@ -86,7 +90,7 @@ main (int argc, char *argv[]) #ifdef DEBUG printf("Run %d\n", run); #endif - for (i = 0; i < MAX; i++) { + for (i = 0; i < nitems(iocb); i++) { iocb[i] = (struct aiocb *)calloc(1, sizeof(struct aiocb)); if (iocb[i] == NULL) @@ -94,7 +98,7 @@ main (int argc, char *argv[]) } pending = 0; - for (i = 0; i < MAX; i++) { + for (i = 0; i < nitems(iocb); i++) { pending++; iocb[i]->aio_nbytes = sizeof(buffer); iocb[i]->aio_buf = buffer; @@ -129,8 +133,8 @@ main (int argc, char *argv[]) } } } - cancel = MAX - pending; - + cancel = nitems(iocb) - pending; + i = 0; while (pending) { @@ -159,11 +163,11 @@ main (int argc, char *argv[]) break; #ifdef DEBUG printf("Try again left %d out of %d %d\n", - pending, MAX, cancel); + pending, nitems(iocb), cancel); #endif } - for (j = 0; j < MAX && iocb[j] != kq_iocb; + for (j = 0; j < nitems(iocb) && iocb[j] != kq_iocb; j++) ; #ifdef DEBUG printf("kq_iocb %p\n", kq_iocb); @@ -190,7 +194,7 @@ main (int argc, char *argv[]) i++; } - for (i = 0; i < MAX; i++) + for (i = 0; i < nitems(iocb); i++) free(iocb[i]); } Modified: stable/10/tests/sys/aio/aio_test.c ============================================================================== --- head/tests/sys/aio/aio_test.c Mon Apr 27 08:51:40 2015 (r282074) +++ stable/10/tests/sys/aio/aio_test.c Wed May 13 12:09:01 2015 (r282858) @@ -59,6 +59,8 @@ #include +#include "freebsd_test_suite/macros.h" + #define PATH_TEMPLATE "aio.XXXXXXXXXX" /* @@ -82,15 +84,6 @@ struct aio_context { static int aio_timedout; -static void -aio_available(void) -{ - - if (modfind("aio") == -1) - atf_tc_skip("aio support not available in the kernel; " - "skipping testcases"); -} - /* * Each test run specifies a timeout in seconds. Use the somewhat obsoleted * signal(3) and alarm(3) APIs to set this up. @@ -211,7 +204,7 @@ aio_write_test(struct aio_context *ac) struct aiocb aio, *aiop; ssize_t len; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); bzero(&aio, sizeof(aio)); aio.aio_buf = ac->ac_buffer; @@ -263,7 +256,7 @@ aio_read_test(struct aio_context *ac) struct aiocb aio, *aiop; ssize_t len; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); bzero(ac->ac_buffer, ac->ac_buflen); bzero(&aio, sizeof(aio)); @@ -346,7 +339,7 @@ ATF_TC_BODY(aio_file_test, tc) struct aio_context ac; int fd; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); strcpy(pathname, PATH_TEMPLATE); fd = mkstemp(pathname); @@ -392,7 +385,7 @@ ATF_TC_BODY(aio_fifo_test, tc) char pathname[PATH_MAX]; struct aio_context ac; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); /* * In theory, mkstemp() can return a name that is then collided with. @@ -461,7 +454,7 @@ ATF_TC_BODY(aio_unix_socketpair_test, tc struct aio_context ac; int sockets[2]; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); ATF_REQUIRE_MSG(socketpair(PF_UNIX, SOCK_STREAM, 0, sockets) != -1, "socketpair failed: %s", strerror(errno)); @@ -503,7 +496,7 @@ ATF_TC_BODY(aio_pty_test, tc) struct termios ts; int error; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); ATF_REQUIRE_MSG(openpty(&read_fd, &write_fd, NULL, NULL, NULL) == 0, "openpty failed: %s", strerror(errno)); @@ -550,7 +543,7 @@ ATF_TC_BODY(aio_pipe_test, tc) struct aio_context ac; int pipes[2]; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); ATF_REQUIRE_MSG(pipe(pipes) != -1, "pipe failed: %s", strerror(errno)); @@ -613,7 +606,7 @@ ATF_TC_BODY(aio_md_test, tc) struct aio_context ac; struct md_ioctl mdio; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0); ATF_REQUIRE_MSG(mdctl_fd != -1, Modified: stable/10/tests/sys/aio/lio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/lio_kqueue_test.c Mon Apr 27 08:51:40 2015 (r282074) +++ stable/10/tests/sys/aio/lio_kqueue_test.c Wed May 13 12:09:01 2015 (r282858) @@ -48,16 +48,18 @@ #include #include -#define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX" +#include "freebsd_test_suite/macros.h" + +#define PATH_TEMPLATE "aio.XXXXXXXXXX" #define LIO_MAX 5 -#define MAX LIO_MAX * 16 +#define MAX_IOCBS LIO_MAX * 16 #define MAX_RUNS 300 int main(int argc, char *argv[]){ int fd; - struct aiocb *iocb[MAX]; + struct aiocb *iocb[MAX_IOCBS]; struct aiocb **lio[LIO_MAX], **lio_element, **kq_lio; int i, result, run, error, j, k; char buffer[32768]; @@ -69,6 +71,8 @@ main(int argc, char *argv[]){ char *file, pathname[sizeof(PATH_TEMPLATE)-1]; int tmp_file = 0, failed = 0; + PLAIN_REQUIRE_KERNEL_MODULE("aio", 0); + if (kq < 0) { perror("No kqeueue\n"); exit(1); @@ -99,9 +103,9 @@ main(int argc, char *argv[]){ #endif for (j = 0; j < LIO_MAX; j++) { lio[j] = (struct aiocb **) - malloc(sizeof(struct aiocb *) * MAX/LIO_MAX); - for(i = 0; i < MAX / LIO_MAX; i++) { - k = (MAX / LIO_MAX * j) + i; + malloc(sizeof(struct aiocb *) * MAX_IOCBS/LIO_MAX); + for(i = 0; i < MAX_IOCBS / LIO_MAX; i++) { + k = (MAX_IOCBS / LIO_MAX * j) + i; lio_element = lio[j]; lio[j][i] = iocb[k] = (struct aiocb *) malloc(sizeof(struct aiocb)); @@ -123,7 +127,7 @@ main(int argc, char *argv[]){ sig.sigev_notify = SIGEV_KEVENT; time(&time1); result = lio_listio(LIO_NOWAIT, lio[j], - MAX / LIO_MAX, &sig); + MAX_IOCBS / LIO_MAX, &sig); error = errno; time(&time2); #ifdef DEBUG @@ -203,7 +207,7 @@ main(int argc, char *argv[]){ } else { printf("PASS: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result); } - for(k = 0; k < MAX / LIO_MAX; k++){ + for(k = 0; k < MAX_IOCBS / LIO_MAX; k++){ result = aio_return(kq_lio[k]); #ifdef DEBUG printf("Return Resulto for %d %d is %d\n", j, k, result); @@ -220,7 +224,7 @@ main(int argc, char *argv[]){ printf("\n"); #endif - for(k = 0; k < MAX / LIO_MAX; k++) { + for(k = 0; k < MAX_IOCBS / LIO_MAX; k++) { free(lio[j][k]); } free(lio[j]); Modified: stable/10/tests/sys/mqueue/Makefile ============================================================================== --- head/tests/sys/mqueue/Makefile Mon Apr 27 08:31:43 2015 (r282071) +++ stable/10/tests/sys/mqueue/Makefile Wed May 13 12:09:01 2015 (r282858) @@ -6,6 +6,8 @@ ATF_TESTS_SH= mqueue_test BINDIR= ${TESTSDIR} +CFLAGS+= -I${.CURDIR:H:H} + PROGS+= mqtest1 PROGS+= mqtest2 PROGS+= mqtest3 Modified: stable/10/tests/sys/mqueue/mqtest1.c ============================================================================== --- head/tests/sys/mqueue/mqtest1.c Mon Apr 27 08:31:43 2015 (r282071) +++ stable/10/tests/sys/mqueue/mqtest1.c Wed May 13 12:09:01 2015 (r282858) @@ -7,6 +7,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue1" int @@ -17,6 +19,8 @@ main(void) mqd_t mq; int status; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + attr.mq_maxmsg = 2; attr.mq_msgsize = 100; mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr); Modified: stable/10/tests/sys/mqueue/mqtest2.c ============================================================================== --- head/tests/sys/mqueue/mqtest2.c Mon Apr 27 08:31:43 2015 (r282071) +++ stable/10/tests/sys/mqueue/mqtest2.c Wed May 13 12:09:01 2015 (r282858) @@ -10,6 +10,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue2" #define LOOPS 1000 #define PRIO 10 @@ -29,6 +31,8 @@ main(void) int status; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); attr.mq_maxmsg = 5; Modified: stable/10/tests/sys/mqueue/mqtest3.c ============================================================================== --- head/tests/sys/mqueue/mqtest3.c Mon Apr 27 08:31:43 2015 (r282071) +++ stable/10/tests/sys/mqueue/mqtest3.c Wed May 13 12:09:01 2015 (r282858) @@ -11,6 +11,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue3" #define LOOPS 1000 #define PRIO 10 @@ -31,6 +33,8 @@ main(void) mqd_t mq; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); attr.mq_maxmsg = 5; Modified: stable/10/tests/sys/mqueue/mqtest4.c ============================================================================== --- head/tests/sys/mqueue/mqtest4.c Mon Apr 27 08:31:43 2015 (r282071) +++ stable/10/tests/sys/mqueue/mqtest4.c Wed May 13 12:09:01 2015 (r282858) @@ -12,6 +12,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue4" #define LOOPS 1000 #define PRIO 10 @@ -32,6 +34,8 @@ main(void) int kq, status; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); attr.mq_maxmsg = 5; Modified: stable/10/tests/sys/mqueue/mqtest5.c ============================================================================== --- head/tests/sys/mqueue/mqtest5.c Mon Apr 27 08:31:43 2015 (r282071) +++ stable/10/tests/sys/mqueue/mqtest5.c Wed May 13 12:09:01 2015 (r282858) @@ -12,6 +12,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue5" #define LOOPS 1000 #define PRIO 10 @@ -34,6 +36,8 @@ main(void) mqd_t mq; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); sigemptyset(&set); Modified: stable/10/tests/sys/mqueue/mqueue_test.sh ============================================================================== --- head/tests/sys/mqueue/mqueue_test.sh Mon Apr 27 08:31:43 2015 (r282071) +++ stable/10/tests/sys/mqueue/mqueue_test.sh Wed May 13 12:09:01 2015 (r282858) @@ -1,3 +1,30 @@ +# +# Copyright (c) 2015 EMC / Isilon Storage Division +# 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 AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# mqtest1_head() { From owner-svn-src-stable@FreeBSD.ORG Wed May 13 12:13:19 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38D35320; Wed, 13 May 2015 12:13:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 0C1C21EFD; Wed, 13 May 2015 12:13:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DCDIbu046594; Wed, 13 May 2015 12:13:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DCDITE046593; Wed, 13 May 2015 12:13:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131213.t4DCDITE046593@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 12:13:18 +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: r282859 - stable/10/tests/freebsd_test_suite 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 12:13:19 -0000 Author: ngie Date: Wed May 13 12:13:18 2015 New Revision: 282859 URL: https://svnweb.freebsd.org/changeset/base/282859 Log: MFC r282211,r282244: r282211: ATF_REQUIRE_KERNEL_MODULE: use atf_skip, not ATF_REQUIRE_MSG so the testcase no longer bombs out PLAIN_REQUIRE_KERNEL_MODULE: use printf + _exit, no err so the testcase no longer bombs out if it prints to stderr r282244: Fix typo. It should have been atf_tc_skip, not atf_skip Reported by: many, Jenkins Pointyhat to: ngie Modified: stable/10/tests/freebsd_test_suite/macros.h Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/freebsd_test_suite/macros.h ============================================================================== --- stable/10/tests/freebsd_test_suite/macros.h Wed May 13 12:09:01 2015 (r282858) +++ stable/10/tests/freebsd_test_suite/macros.h Wed May 13 12:13:18 2015 (r282859) @@ -32,21 +32,24 @@ #include #include #include -#include #include +#include +#include #include #define ATF_REQUIRE_KERNEL_MODULE(_mod_name) do { \ - ATF_REQUIRE_MSG(modfind(_mod_name) != -1, \ - "module %s could not be resolved: %s", \ - _mod_name, strerror(errno)); \ + if (modfind(_mod_name) == -1) { \ + atf_tc_skip("module %s could not be resolved: %s", \ + _mod_name, strerror(errno)); \ + } \ } while(0) -#define PLAIN_REQUIRE_KERNEL_MODULE(_mod_name, _exit_code) do { \ +#define PLAIN_REQUIRE_KERNEL_MODULE(_mod_name, _exit_code) do { \ if (modfind(_mod_name) == -1) { \ - err(_exit_code, "module %s could not be resolved", \ - _mod_name); \ + printf("module %s could not be resolved: %s\n", \ + _mod_name, strerror(errno)); \ + _exit(_exit_code); \ } \ } while(0) From owner-svn-src-stable@FreeBSD.ORG Wed May 13 12:17:01 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2BAC599; Wed, 13 May 2015 12:17:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 C35F41F38; Wed, 13 May 2015 12:17:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DCH1Wd047175; Wed, 13 May 2015 12:17:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DCH16m047174; Wed, 13 May 2015 12:17:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505131217.t4DCH16m047174@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 13 May 2015 12:17:01 +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: r282860 - stable/10/tests/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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 12:17:02 -0000 Author: ngie Date: Wed May 13 12:17:01 2015 New Revision: 282860 URL: https://svnweb.freebsd.org/changeset/base/282860 Log: MFC r262781,r263336: r262781 (by pho): Preserve naming consistency for test cases. Pointed out by: jmmv Sponsored by: EMC / Isilon storage division r263336 (by pho): Added sysctl kern.maxfiles increase test, do not use /etc/passwd for tests and use volatile sig_atomic_t for signal handler variable. Reviewed by: asomers (previous version) Sponsored by: EMC / Isilon storage division Modified: stable/10/tests/sys/kern/kern_descrip_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/kern/kern_descrip_test.c ============================================================================== --- stable/10/tests/sys/kern/kern_descrip_test.c Wed May 13 12:13:18 2015 (r282859) +++ stable/10/tests/sys/kern/kern_descrip_test.c Wed May 13 12:17:01 2015 (r282860) @@ -29,22 +29,31 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include #include +#include #include #include -ATF_TC_WITHOUT_HEAD(dup2_simple); -ATF_TC_BODY(dup2_simple, tc) +static volatile sig_atomic_t done; + +#define AFILE "afile" +#define EXPANDBY 1000 +#define PARALLEL 4 +#define RENDEZVOUS "rendezvous" +#define VALUE "value" + +ATF_TC_WITHOUT_HEAD(dup2__simple); +ATF_TC_BODY(dup2__simple, tc) { int fd1, fd2; struct stat sb1, sb2; - fd1 = open("/etc/passwd", O_RDONLY); - ATF_REQUIRE(fd1 >= 0); + ATF_REQUIRE((fd1 = open(AFILE, O_CREAT, 0644)) != -1); fd2 = 27; ATF_REQUIRE(dup2(fd1, fd2) != -1); ATF_REQUIRE(fstat(fd1, &sb1) != -1); @@ -57,22 +66,125 @@ ATF_TC_HEAD(dup2__ebadf_when_2nd_arg_out { atf_tc_set_md_var(tc, "descr", "Regression test for r234131"); } + ATF_TC_BODY(dup2__ebadf_when_2nd_arg_out_of_range, tc) { int fd1, fd2, ret; - fd1 = open("/etc/passwd", O_RDONLY); + ATF_REQUIRE((fd1 = open(AFILE, O_CREAT, 0644)) != -1); fd2 = INT_MAX; ret = dup2(fd1, fd2); ATF_CHECK_EQ(-1, ret); ATF_CHECK_EQ(EBADF, errno); } +static void +handler(int s __unused) +{ + done++; +} + +static void +openfiles2(size_t n) +{ + size_t i; + int r; + + errno = 0; + for (i = 0; i < n; i++) + ATF_REQUIRE((r = open(AFILE, O_RDONLY)) != -1); + kill(getppid(), SIGUSR1); + + for (;;) { + if (access(RENDEZVOUS, R_OK) != 0) + break; + usleep(1000); + } + _exit(0); +} + +static void +openfiles(size_t n) +{ + int i, fd; + + signal(SIGUSR1, handler); + ATF_REQUIRE((fd = open(AFILE, O_CREAT, 0644)) != -1); + close(fd); + ATF_REQUIRE((fd = open(RENDEZVOUS, O_CREAT, 0644)) != -1); + close(fd); + done = 0; + for (i = 0; i < PARALLEL; i++) + if (fork() == 0) + openfiles2(n / PARALLEL); + while (done != PARALLEL) + usleep(1000); + unlink(RENDEZVOUS); + usleep(40000); +} + +ATF_TC_WITH_CLEANUP(kern_maxfiles__increase); +ATF_TC_HEAD(kern_maxfiles__increase, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); + atf_tc_set_md_var(tc, "require.config", "allow_sysctl_side_effects"); + atf_tc_set_md_var(tc, "descr", + "Check kern.maxfiles expansion"); +} + +ATF_TC_BODY(kern_maxfiles__increase, tc) +{ + size_t oldlen; + int maxfiles, oldmaxfiles, current; + char buf[80]; + + oldlen = sizeof(maxfiles); + if (sysctlbyname("kern.maxfiles", &maxfiles, &oldlen, NULL, 0) == -1) + atf_tc_fail("getsysctlbyname(%s): %s", "kern.maxfiles", + strerror(errno)); + if (sysctlbyname("kern.openfiles", ¤t, &oldlen, NULL, 0) == -1) + atf_tc_fail("getsysctlbyname(%s): %s", "kern.openfiles", + strerror(errno)); + + oldmaxfiles = maxfiles; + + /* Store old kern.maxfiles in a symlink for cleanup */ + snprintf(buf, sizeof(buf), "%d", oldmaxfiles); + if (symlink(buf, VALUE) == 1) + atf_tc_fail("symlink(%s, %s): %s", buf, VALUE, + strerror(errno)); + + maxfiles += EXPANDBY; + if (sysctlbyname("kern.maxfiles", NULL, 0, &maxfiles, oldlen) == -1) + atf_tc_fail("getsysctlbyname(%s): %s", "kern.maxfiles", + strerror(errno)); + + openfiles(oldmaxfiles - current + 1); + (void)unlink(VALUE); +} + +ATF_TC_CLEANUP(kern_maxfiles__increase, tc) +{ + size_t oldlen; + int n, oldmaxfiles; + char buf[80]; + + if ((n = readlink(VALUE, buf, sizeof(buf))) > 0) { + buf[n] = '\0'; + if (sscanf(buf, "%d", &oldmaxfiles) == 1) { + oldlen = sizeof(oldmaxfiles); + (void) sysctlbyname("kern.maxfiles", NULL, 0, + &oldmaxfiles, oldlen); + } + } +} + ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, dup2_simple); - ATF_TP_ADD_TC(tp, dup2__ebadf_when_2nd_arg_out_of_range); + ATF_TP_ADD_TC(tp, dup2__simple); + ATF_TP_ADD_TC(tp, dup2__ebadf_when_2nd_arg_out_of_range); + ATF_TP_ADD_TC(tp, kern_maxfiles__increase); - return atf_no_error(); + return (atf_no_error()); } From owner-svn-src-stable@FreeBSD.ORG Wed May 13 14:05:55 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63EA4452; Wed, 13 May 2015 14:05:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 4624D1E02; Wed, 13 May 2015 14:05:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DE5thK000975; Wed, 13 May 2015 14:05:55 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DE5sHu000972; Wed, 13 May 2015 14:05:54 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505131405.t4DE5sHu000972@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 13 May 2015 14:05:54 +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: r282861 - in stable/10: sbin/geom/class/part sys/geom/part sys/sys 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 14:05:55 -0000 Author: ae Date: Wed May 13 14:05:53 2015 New Revision: 282861 URL: https://svnweb.freebsd.org/changeset/base/282861 Log: MFC r282465: Add apple-boot, apple-hfs and apple-ufs aliases to MBR scheme. Sort DOSPTYP_* entries in diskmbr.h by value. Document these scheme-specific types in gpart(8). Modified: stable/10/sbin/geom/class/part/gpart.8 stable/10/sys/geom/part/g_part_mbr.c stable/10/sys/sys/diskmbr.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/geom/class/part/gpart.8 ============================================================================== --- stable/10/sbin/geom/class/part/gpart.8 Wed May 13 12:17:01 2015 (r282860) +++ stable/10/sbin/geom/class/part/gpart.8 Wed May 13 14:05:53 2015 (r282861) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 12, 2015 +.Dd May 5, 2015 .Dt GPART 8 .Os .Sh NAME @@ -668,6 +668,8 @@ for GPT. .It Cm apple-hfs An Apple Mac OS X partition that contains a HFS or HFS+ filesystem. The scheme-specific types are +.Qq Li "!175" +for MBR, .Qq Li "!Apple_HFS" for APM and .Qq Li "!48465300-0000-11aa-aa11-00306543ecac" @@ -696,6 +698,8 @@ for GPT. .It Cm apple-ufs An Apple Mac OS X partition that contains a UFS filesystem. The scheme-specific types are +.Qq Li "!168" +for MBR, .Qq Li "!Apple_UNIX_SVR2" for APM and .Qq Li "!55465300-0000-11aa-aa11-00306543ecac" Modified: stable/10/sys/geom/part/g_part_mbr.c ============================================================================== --- stable/10/sys/geom/part/g_part_mbr.c Wed May 13 12:17:01 2015 (r282860) +++ stable/10/sys/geom/part/g_part_mbr.c Wed May 13 14:05:53 2015 (r282861) @@ -138,6 +138,9 @@ static struct g_part_mbr_alias { { DOSPTYP_PPCBOOT, G_PART_ALIAS_PREP_BOOT }, { DOSPTYP_VMFS, G_PART_ALIAS_VMFS }, { DOSPTYP_VMKDIAG, G_PART_ALIAS_VMKDIAG }, + { DOSPTYP_APPLE_UFS, G_PART_ALIAS_APPLE_UFS }, + { DOSPTYP_APPLE_BOOT, G_PART_ALIAS_APPLE_BOOT }, + { DOSPTYP_HFS, G_PART_ALIAS_APPLE_HFS }, }; static int Modified: stable/10/sys/sys/diskmbr.h ============================================================================== --- stable/10/sys/sys/diskmbr.h Wed May 13 12:17:01 2015 (r282860) +++ stable/10/sys/sys/diskmbr.h Wed May 13 14:05:53 2015 (r282861) @@ -51,11 +51,13 @@ #define DOSPTYP_EXTLBA 0x0f /* DOS extended partition */ #define DOSPTYP_PPCBOOT 0x41 /* PReP/CHRP boot partition */ #define DOSPTYP_LDM 0x42 /* Win2k dynamic extended partition */ -#define DOSPTYP_386BSD 0xa5 /* 386BSD partition type */ -#define DOSPTYP_HFS 0xaf /* HFS/HFS+ partition type */ #define DOSPTYP_LINSWP 0x82 /* Linux swap partition */ #define DOSPTYP_LINUX 0x83 /* Linux partition */ #define DOSPTYP_LINLVM 0x8e /* Linux LVM partition */ +#define DOSPTYP_386BSD 0xa5 /* 386BSD partition type */ +#define DOSPTYP_APPLE_UFS 0xa8 /* Apple Mac OS X boot */ +#define DOSPTYP_APPLE_BOOT 0xab /* Apple Mac OS X UFS */ +#define DOSPTYP_HFS 0xaf /* HFS/HFS+ partition type */ #define DOSPTYP_PMBR 0xee /* GPT Protective MBR */ #define DOSPTYP_VMFS 0xfb /* VMware VMFS partition */ #define DOSPTYP_VMKDIAG 0xfc /* VMware vmkDiagnostic partition */ From owner-svn-src-stable@FreeBSD.ORG Wed May 13 15:23:54 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCA407C7; Wed, 13 May 2015 15:23:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 AA9D61A8F; Wed, 13 May 2015 15:23:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DFNscD040784; Wed, 13 May 2015 15:23:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DFNstS040783; Wed, 13 May 2015 15:23:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505131523.t4DFNstS040783@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 13 May 2015 15:23:54 +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: r282862 - stable/10/sys/cam/ctl 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 15:23:54 -0000 Author: mav Date: Wed May 13 15:23:53 2015 New Revision: 282862 URL: https://svnweb.freebsd.org/changeset/base/282862 Log: MFC r282565: Handle EDQUOT backend storage errors same as ENOSPC. Modified: stable/10/sys/cam/ctl/ctl_backend_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Wed May 13 14:05:53 2015 (r282861) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Wed May 13 15:23:53 2015 (r282862) @@ -524,7 +524,7 @@ ctl_be_block_biodone(struct bio *bio) if (beio->num_errors > 0) { if (error == EOPNOTSUPP) { ctl_set_invalid_opcode(&io->scsiio); - } else if (error == ENOSPC) { + } else if (error == ENOSPC || error == EDQUOT) { ctl_set_space_alloc_fail(&io->scsiio); } else if (beio->bio_cmd == BIO_FLUSH) { /* XXX KDM is there is a better error here? */ @@ -741,7 +741,7 @@ ctl_be_block_dispatch_file(struct ctl_be ctl_scsi_path_string(io, path_str, sizeof(path_str)); printf("%s%s command returned errno %d\n", path_str, (beio->bio_cmd == BIO_READ) ? "READ" : "WRITE", error); - if (error == ENOSPC) { + if (error == ENOSPC || error == EDQUOT) { ctl_set_space_alloc_fail(&io->scsiio); } else ctl_set_medium_error(&io->scsiio); @@ -898,7 +898,7 @@ ctl_be_block_dispatch_zvol(struct ctl_be * return the I/O to the user. */ if (error != 0) { - if (error == ENOSPC) { + if (error == ENOSPC || error == EDQUOT) { ctl_set_space_alloc_fail(&io->scsiio); } else ctl_set_medium_error(&io->scsiio); From owner-svn-src-stable@FreeBSD.ORG Wed May 13 22:36:01 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D74A2D7; Wed, 13 May 2015 22:36:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2FE961045; Wed, 13 May 2015 22:36:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DMa1LY058995; Wed, 13 May 2015 22:36:01 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DMa0d1058992; Wed, 13 May 2015 22:36:00 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505132236.t4DMa0d1058992@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 13 May 2015 22:36: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: r282870 - stable/10/usr.sbin/freebsd-update 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 22:36:01 -0000 Author: delphij Date: Wed May 13 22:36:00 2015 New Revision: 282870 URL: https://svnweb.freebsd.org/changeset/base/282870 Log: MFC r279571,281563 (allanjude): Add a new safetly belt to freebsd-update to prevent a user doing a minor update (-pX) while having an unfinished major upgrade (9.x to 9.y) Safetly belt can be disabled with the -F flag Additionally, add the --not-running-from-cron flag they bypasses the TTY requirement, and allows freebsd-update to be invoked by orchestration frameworks, scripts, or otherwise. PR: 196760 Relnotes: yes Sponsored by: ScaleEngine Inc. Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.8 stable/10/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- stable/10/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 21:38:39 2015 (r282869) +++ stable/10/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:36:00 2015 (r282870) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2010 +.Dd March 2, 2015 .Dt FREEBSD-UPDATE 8 .Os FreeBSD .Sh NAME @@ -36,10 +36,12 @@ .Op Fl b Ar basedir .Op Fl d Ar workdir .Op Fl f Ar conffile +.Op Fl F .Op Fl k Ar KEY .Op Fl r Ar newrelease .Op Fl s Ar server .Op Fl t Ar address +.Op Fl -not-running-from-cron .Cm command ... .Sh DESCRIPTION The @@ -54,16 +56,16 @@ by the .Fx Release Engineering Team, e.g., .Fx -7.3-RELEASE and +9.3-RELEASE and .Fx -8.0-RELEASE, but not +10.1-RELEASE, but not .Fx -6.3-STABLE or +9.3-STABLE or .Fx -9.0-CURRENT. +11-CURRENT. .Sh OPTIONS The following options are supported: -.Bl -tag -width "-f conffile" +.Bl -tag -width "-r newrelease" .It Fl b Ar basedir Operate on a system mounted at .Ar basedir . @@ -81,6 +83,10 @@ Read configuration options from .Ar conffile . (default: .Pa /etc/freebsd-update.conf ) +.It Fl F +Force +.Nm Cm fetch +to proceed where it normally would not, such as an unfinished upgrade .It Fl k Ar KEY Trust an RSA key with SHA256 of .Ar KEY . @@ -98,12 +104,21 @@ Mail output of command, if any, to .Ar address . (default: root, or as given in the configuration file.) +.It Fl -not-running-from-cron +Force +.Nm Cm fetch +to proceed when there is no controlling tty. +This is for use by automated scripts and orchestration tools. +Please do not run +.Nm Cm fetch +from crontab or similar using this flag, see: +.Nm Cm cron .El .Sh COMMANDS The .Cm command can be any one of the following: -.Bl -tag -width "-f conffile" +.Bl -tag -width "rollback" .It Cm fetch Based on the currently installed world and the configuration options set, fetch all available binary updates. Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 21:38:39 2015 (r282869) +++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:36:00 2015 (r282870) @@ -43,12 +43,15 @@ Options: (default: /var/db/freebsd-update/) -f conffile -- Read configuration options from conffile (default: /etc/freebsd-update.conf) + -F -- Force a fetch operation to proceed -k KEY -- Trust an RSA key with SHA256 hash of KEY -r release -- Target for upgrade (e.g., 6.2-RELEASE) -s server -- Server from which to fetch updates (default: update.FreeBSD.org) -t address -- Mail output of cron command, if any, to address (default: root) + --not-running-from-cron + -- Run without a tty, for use by automated tools Commands: fetch -- Fetch updates from server cron -- Sleep rand(3600) seconds, fetch updates, and send an @@ -399,6 +402,12 @@ init_params () { # No commands specified yet COMMANDS="" + + # Force fetch to proceed + FORCEFETCH=0 + + # Run without a TTY + NOTTYOK=0 } # Parse the command line @@ -411,6 +420,12 @@ parse_cmdline () { if [ ! -z "${CONFFILE}" ]; then usage; fi shift; CONFFILE="$1" ;; + -F) + FORCEFETCH=1 + ;; + --not-running-from-cron) + NOTTYOK=1 + ;; # Configuration file equivalents -b) @@ -665,6 +680,14 @@ fetch_check_params () { echo "(Did you mean 'upgrade' instead?)" exit 1 fi + + # Check that we have updates ready to install + if [ -f ${BDHASH}-install/kerneldone -a $FORCEFETCH -eq 0 ]; then + echo "You have a partially completed upgrade pending" + echo "Run '$0 install' first." + echo "Run '$0 fetch -F' to proceed anyway." + exit 1 + fi } # Perform sanity checks etc. before fetching upgrades. @@ -3202,7 +3225,7 @@ get_params () { # Fetch command. Make sure that we're being called # interactively, then run fetch_check_params and fetch_run cmd_fetch () { - if [ ! -t 0 ]; then + if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then echo -n "`basename $0` fetch should not " echo "be run non-interactively." echo "Run `basename $0` cron instead." From owner-svn-src-stable@FreeBSD.ORG Wed May 13 22:36:53 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86E5B427; Wed, 13 May 2015 22:36:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 68757105A; Wed, 13 May 2015 22:36:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DMarmT059189; Wed, 13 May 2015 22:36:53 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DMaqgD059187; Wed, 13 May 2015 22:36:52 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505132236.t4DMaqgD059187@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 13 May 2015 22:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282871 - stable/9/usr.sbin/freebsd-update X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 22:36:53 -0000 Author: delphij Date: Wed May 13 22:36:52 2015 New Revision: 282871 URL: https://svnweb.freebsd.org/changeset/base/282871 Log: MFC r279571,281563 (allanjude): Add a new safetly belt to freebsd-update to prevent a user doing a minor update (-pX) while having an unfinished major upgrade (9.x to 9.y) Safetly belt can be disabled with the -F flag Additionally, add the --not-running-from-cron flag they bypasses the TTY requirement, and allows freebsd-update to be invoked by orchestration frameworks, scripts, or otherwise. PR: 196760 Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.8 stable/9/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/9/usr.sbin/freebsd-update/ (props changed) Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- stable/9/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:36:00 2015 (r282870) +++ stable/9/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:36:52 2015 (r282871) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2010 +.Dd March 2, 2015 .Dt FREEBSD-UPDATE 8 .Os FreeBSD .Sh NAME @@ -36,10 +36,12 @@ .Op Fl b Ar basedir .Op Fl d Ar workdir .Op Fl f Ar conffile +.Op Fl F .Op Fl k Ar KEY .Op Fl r Ar newrelease .Op Fl s Ar server .Op Fl t Ar address +.Op Fl -not-running-from-cron .Cm command ... .Sh DESCRIPTION The @@ -54,16 +56,16 @@ by the .Fx Release Engineering Team, e.g., .Fx -7.3-RELEASE and +9.3-RELEASE and .Fx -8.0-RELEASE, but not +10.1-RELEASE, but not .Fx -6.3-STABLE or +9.3-STABLE or .Fx -9.0-CURRENT. +11-CURRENT. .Sh OPTIONS The following options are supported: -.Bl -tag -width "-f conffile" +.Bl -tag -width "-r newrelease" .It Fl b Ar basedir Operate on a system mounted at .Ar basedir . @@ -81,6 +83,10 @@ Read configuration options from .Ar conffile . (default: .Pa /etc/freebsd-update.conf ) +.It Fl F +Force +.Nm Cm fetch +to proceed where it normally would not, such as an unfinished upgrade .It Fl k Ar KEY Trust an RSA key with SHA256 of .Ar KEY . @@ -98,12 +104,21 @@ Mail output of command, if any, to .Ar address . (default: root, or as given in the configuration file.) +.It Fl -not-running-from-cron +Force +.Nm Cm fetch +to proceed when there is no controlling tty. +This is for use by automated scripts and orchestration tools. +Please do not run +.Nm Cm fetch +from crontab or similar using this flag, see: +.Nm Cm cron .El .Sh COMMANDS The .Cm command can be any one of the following: -.Bl -tag -width "-f conffile" +.Bl -tag -width "rollback" .It Cm fetch Based on the currently installed world and the configuration options set, fetch all available binary updates. Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/9/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:36:00 2015 (r282870) +++ stable/9/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:36:52 2015 (r282871) @@ -43,12 +43,15 @@ Options: (default: /var/db/freebsd-update/) -f conffile -- Read configuration options from conffile (default: /etc/freebsd-update.conf) + -F -- Force a fetch operation to proceed -k KEY -- Trust an RSA key with SHA256 hash of KEY -r release -- Target for upgrade (e.g., 6.2-RELEASE) -s server -- Server from which to fetch updates (default: update.FreeBSD.org) -t address -- Mail output of cron command, if any, to address (default: root) + --not-running-from-cron + -- Run without a tty, for use by automated tools Commands: fetch -- Fetch updates from server cron -- Sleep rand(3600) seconds, fetch updates, and send an @@ -399,6 +402,12 @@ init_params () { # No commands specified yet COMMANDS="" + + # Force fetch to proceed + FORCEFETCH=0 + + # Run without a TTY + NOTTYOK=0 } # Parse the command line @@ -411,6 +420,12 @@ parse_cmdline () { if [ ! -z "${CONFFILE}" ]; then usage; fi shift; CONFFILE="$1" ;; + -F) + FORCEFETCH=1 + ;; + --not-running-from-cron) + NOTTYOK=1 + ;; # Configuration file equivalents -b) @@ -665,6 +680,14 @@ fetch_check_params () { echo "(Did you mean 'upgrade' instead?)" exit 1 fi + + # Check that we have updates ready to install + if [ -f ${BDHASH}-install/kerneldone -a $FORCEFETCH -eq 0 ]; then + echo "You have a partially completed upgrade pending" + echo "Run '$0 install' first." + echo "Run '$0 fetch -F' to proceed anyway." + exit 1 + fi } # Perform sanity checks etc. before fetching upgrades. @@ -3202,7 +3225,7 @@ get_params () { # Fetch command. Make sure that we're being called # interactively, then run fetch_check_params and fetch_run cmd_fetch () { - if [ ! -t 0 ]; then + if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then echo -n "`basename $0` fetch should not " echo "be run non-interactively." echo "Run `basename $0` cron instead." From owner-svn-src-stable@FreeBSD.ORG Wed May 13 22:39:31 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30A1359A; Wed, 13 May 2015 22:39:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 1DFB0107A; Wed, 13 May 2015 22:39:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4DMdUO0059632; Wed, 13 May 2015 22:39:30 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4DMdUCN059630; Wed, 13 May 2015 22:39:30 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505132239.t4DMdUCN059630@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 13 May 2015 22:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r282872 - stable/8/usr.sbin/freebsd-update X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2015 22:39:31 -0000 Author: delphij Date: Wed May 13 22:39:29 2015 New Revision: 282872 URL: https://svnweb.freebsd.org/changeset/base/282872 Log: MFC: Sync freebsd-update with -HEAD. Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.8 stable/8/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/8/usr.sbin/freebsd-update/ (props changed) Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- stable/8/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:36:52 2015 (r282871) +++ stable/8/usr.sbin/freebsd-update/freebsd-update.8 Wed May 13 22:39:29 2015 (r282872) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2010 +.Dd March 2, 2015 .Dt FREEBSD-UPDATE 8 .Os FreeBSD .Sh NAME @@ -36,10 +36,12 @@ .Op Fl b Ar basedir .Op Fl d Ar workdir .Op Fl f Ar conffile +.Op Fl F .Op Fl k Ar KEY .Op Fl r Ar newrelease .Op Fl s Ar server .Op Fl t Ar address +.Op Fl -not-running-from-cron .Cm command ... .Sh DESCRIPTION The @@ -49,21 +51,21 @@ updates to the FreeBSD base system. Note that updates are only available if they are being built for the FreeBSD release and architecture being used; in particular, the .Fx -Security Team only builds updates for releases shipped in binary form +Security Team only builds updates for releases shipped in binary form by the .Fx Release Engineering Team, e.g., .Fx -7.3-RELEASE and +9.3-RELEASE and .Fx -8.0, but not +10.1-RELEASE, but not .Fx -6.3-STABLE or +9.3-STABLE or .Fx -9.0-CURRENT. +11-CURRENT. .Sh OPTIONS The following options are supported: -.Bl -tag -width "-f conffile" +.Bl -tag -width "-r newrelease" .It Fl b Ar basedir Operate on a system mounted at .Ar basedir . @@ -81,6 +83,10 @@ Read configuration options from .Ar conffile . (default: .Pa /etc/freebsd-update.conf ) +.It Fl F +Force +.Nm Cm fetch +to proceed where it normally would not, such as an unfinished upgrade .It Fl k Ar KEY Trust an RSA key with SHA256 of .Ar KEY . @@ -98,13 +104,21 @@ Mail output of command, if any, to .Ar address . (default: root, or as given in the configuration file.) +.It Fl -not-running-from-cron +Force +.Nm Cm fetch +to proceed when there is no controlling tty. +This is for use by automated scripts and orchestration tools. +Please do not run +.Nm Cm fetch +from crontab or similar using this flag, see: +.Nm Cm cron .El .Sh COMMANDS The .Cm command can be any one of the following: -.Pp -.Bl -tag -width "-f conffile" +.Bl -tag -width "rollback" .It Cm fetch Based on the currently installed world and the configuration options set, fetch all available binary updates. @@ -128,6 +142,11 @@ Fetch files necessary for upgrading to a Before using this command, make sure that you read the announcement and release notes for the new release in case there are any special steps needed for upgrading. +Note that this command may require up to 500 MB of space in +.Ar workdir +depending on which components of the +.Fx +base system are installed. .It Cm install Install the most recently fetched updates or upgrade. .It Cm rollback @@ -149,7 +168,7 @@ other than 3AM, to avoid overly imposing on the server(s) hosting the updates. .It In spite of its name, -.Cm +.Nm IDS should not be relied upon as an "Intrusion Detection System", since if the system has been tampered with it cannot be trusted to operate correctly. @@ -158,11 +177,11 @@ purposes, make sure you boot from a secu .El .Sh FILES .Bl -tag -width "/etc/freebsd-update.conf" -.It /etc/freebsd-update.conf +.It Pa /etc/freebsd-update.conf Default location of the .Nm configuration file. -.It /var/db/freebsd-update/ +.It Pa /var/db/freebsd-update/ Default location where .Nm stores temporary files and downloaded updates. @@ -170,4 +189,4 @@ stores temporary files and downloaded up .Sh SEE ALSO .Xr freebsd-update.conf 5 .Sh AUTHORS -.An Colin Percival Aq cperciva@FreeBSD.org +.An Colin Percival Aq Mt cperciva@FreeBSD.org Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/8/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:36:52 2015 (r282871) +++ stable/8/usr.sbin/freebsd-update/freebsd-update.sh Wed May 13 22:39:29 2015 (r282872) @@ -43,12 +43,15 @@ Options: (default: /var/db/freebsd-update/) -f conffile -- Read configuration options from conffile (default: /etc/freebsd-update.conf) + -F -- Force a fetch operation to proceed -k KEY -- Trust an RSA key with SHA256 hash of KEY -r release -- Target for upgrade (e.g., 6.2-RELEASE) -s server -- Server from which to fetch updates (default: update.FreeBSD.org) -t address -- Mail output of cron command, if any, to address (default: root) + --not-running-from-cron + -- Run without a tty, for use by automated tools Commands: fetch -- Fetch updates from server cron -- Sleep rand(3600) seconds, fetch updates, and send an @@ -284,6 +287,9 @@ config_TargetRelease () { else return 1 fi + if echo ${TARGETRELEASE} | grep -qE '^[0-9.]+$'; then + TARGETRELEASE="${TARGETRELEASE}-RELEASE" + fi } # Define what happens to output of utilities @@ -396,6 +402,12 @@ init_params () { # No commands specified yet COMMANDS="" + + # Force fetch to proceed + FORCEFETCH=0 + + # Run without a TTY + NOTTYOK=0 } # Parse the command line @@ -408,6 +420,12 @@ parse_cmdline () { if [ ! -z "${CONFFILE}" ]; then usage; fi shift; CONFFILE="$1" ;; + -F) + FORCEFETCH=1 + ;; + --not-running-from-cron) + NOTTYOK=1 + ;; # Configuration file equivalents -b) @@ -569,7 +587,7 @@ fetch_setup_verboselevel () { # running *-p[0-9]+, strip off the last part; if the # user is running -SECURITY, call it -RELEASE. Chdir # into the working directory. -fetch_check_params () { +fetchupgrade_check_params () { export HTTP_USER_AGENT="freebsd-update (${COMMAND}, `uname -r`)" _SERVERNAME_z=\ @@ -577,6 +595,7 @@ fetch_check_params () { _KEYPRINT_z="Key must be given via -k option or configuration file." _KEYPRINT_bad="Invalid key fingerprint: " _WORKDIR_bad="Directory does not exist or is not writable: " + _WORKDIR_bad2="Directory is not on a persistent filesystem: " if [ -z "${SERVERNAME}" ]; then echo -n "`basename $0`: " @@ -600,6 +619,13 @@ fetch_check_params () { echo ${WORKDIR} exit 1 fi + case `df -T ${WORKDIR}` in */dev/md[0-9]* | *tmpfs*) + echo -n "`basename $0`: " + echo -n "${_WORKDIR_bad2}" + echo ${WORKDIR} + exit 1 + ;; + esac chmod 700 ${WORKDIR} cd ${WORKDIR} || exit 1 @@ -652,9 +678,29 @@ fetch_check_params () { BDHASH=`echo ${BASEDIR} | sha256 -q` } +# Perform sanity checks etc. before fetching updates. +fetch_check_params () { + fetchupgrade_check_params + + if ! [ -z "${TARGETRELEASE}" ]; then + echo -n "`basename $0`: " + echo -n "-r option is meaningless with 'fetch' command. " + echo "(Did you mean 'upgrade' instead?)" + exit 1 + fi + + # Check that we have updates ready to install + if [ -f ${BDHASH}-install/kerneldone -a $FORCEFETCH -eq 0 ]; then + echo "You have a partially completed upgrade pending" + echo "Run '$0 install' first." + echo "Run '$0 fetch -F' to proceed anyway." + exit 1 + fi +} + # Perform sanity checks etc. before fetching upgrades. upgrade_check_params () { - fetch_check_params + fetchupgrade_check_params # Unless set otherwise, we're upgrading to the same kernel config. NKERNCONF=${KERNCONF} @@ -1185,7 +1231,7 @@ fetch_metadata_sanity () { # Some aliases to save space later: ${P} is a character which can # appear in a path; ${M} is the four numeric metadata fields; and # ${H} is a sha256 hash. - P="[-+./:=%@_[~[:alnum:]]" + P="[-+./:=,%@_[~[:alnum:]]" M="[0-9]+\|[0-9]+\|[0-9]+\|[0-9]+" H="[0-9a-f]{64}" @@ -1456,7 +1502,7 @@ fetch_inspect_system () { sort -k 3,3 -t '|' > $2.tmp rm filelist - # Check if an error occured during system inspection + # Check if an error occurred during system inspection if [ -f .err ]; then return 1 fi @@ -2240,6 +2286,19 @@ upgrade_oldall_to_oldnew () { mv $2 $3 } +# Helper for upgrade_merge: Return zero true iff the two files differ only +# in the contents of their RCS tags. +samef () { + X=`sed -E 's/\\$FreeBSD.*\\$/\$FreeBSD\$/' < $1 | ${SHA256}` + Y=`sed -E 's/\\$FreeBSD.*\\$/\$FreeBSD\$/' < $2 | ${SHA256}` + + if [ $X = $Y ]; then + return 0; + else + return 1; + fi +} + # From the list of "old" files in $1, merge changes in $2 with those in $3, # and update $3 to reflect the hashes of merged files. upgrade_merge () { @@ -2323,6 +2382,14 @@ upgrade_merge () { # Ask the user to handle any files which didn't merge. while read F; do + # If the installed file differs from the version in + # the old release only due to RCS tag expansion + # then just use the version in the new release. + if samef merge/old/${F} merge/${OLDRELNUM}/${F}; then + cp merge/${RELNUM}/${F} merge/new/${F} + continue + fi + cat <<-EOF The following file could not be merged automatically: ${F} @@ -2337,9 +2404,18 @@ manually... # Ask the user to confirm that he likes how the result # of merging files. while read F; do - # Skip files which haven't changed. - if [ -f merge/new/${F} ] && - cmp -s merge/old/${F} merge/new/${F}; then + # Skip files which haven't changed except possibly + # in their RCS tags. + if [ -f merge/old/${F} ] && [ -f merge/new/${F} ] && + samef merge/old/${F} merge/new/${F}; then + continue + fi + + # Skip files where the installed file differs from + # the old file only due to RCS tags. + if [ -f merge/old/${F} ] && + [ -f merge/${OLDRELNUM}/${F} ] && + samef merge/old/${F} merge/${OLDRELNUM}/${F}; then continue fi @@ -2526,6 +2602,10 @@ upgrade_run () { # Leave a note behind to tell the "install" command that the kernel # needs to be installed before the world. touch ${BDHASH}-install/kernelfirst + + # Remind the user that they need to run "freebsd-update install" + # to install the downloaded bits, in case they didn't RTFM. + echo "To install the downloaded upgrades, run \"$0 install\"." } # Make sure that all the file hashes mentioned in $@ have corresponding @@ -2577,14 +2657,14 @@ backup_kernel_finddir () { while true ; do # Pathname does not exist, so it is OK use that name # for backup directory. - if [ ! -e $BACKUPKERNELDIR ]; then + if [ ! -e $BASEDIR/$BACKUPKERNELDIR ]; then return 0 fi # If directory do exist, we only use if it has our # marker file. - if [ -d $BACKUPKERNELDIR -a \ - -e $BACKUPKERNELDIR/.freebsd-update ]; then + if [ -d $BASEDIR/$BACKUPKERNELDIR -a \ + -e $BASEDIR/$BACKUPKERNELDIR/.freebsd-update ]; then return 0 fi @@ -2592,7 +2672,7 @@ backup_kernel_finddir () { # the end and try again. CNT=$((CNT + 1)) if [ $CNT -gt 9 ]; then - echo "Could not find valid backup dir ($BACKUPKERNELDIR)" + echo "Could not find valid backup dir ($BASEDIR/$BACKUPKERNELDIR)" exit 1 fi BACKUPKERNELDIR="`echo $BACKUPKERNELDIR | sed -Ee 's/[0-9]\$//'`" @@ -2619,17 +2699,17 @@ backup_kernel () { # Remove old kernel backup files. If $BACKUPKERNELDIR was # "not ours", backup_kernel_finddir would have exited, so # deleting the directory content is as safe as we can make it. - if [ -d $BACKUPKERNELDIR ]; then - rm -fr $BACKUPKERNELDIR + if [ -d $BASEDIR/$BACKUPKERNELDIR ]; then + rm -fr $BASEDIR/$BACKUPKERNELDIR fi # Create directories for backup. - mkdir -p $BACKUPKERNELDIR - mtree -cdn -p "${KERNELDIR}" | \ - mtree -Ue -p "${BACKUPKERNELDIR}" > /dev/null + mkdir -p $BASEDIR/$BACKUPKERNELDIR + mtree -cdn -p "${BASEDIR}/${KERNELDIR}" | \ + mtree -Ue -p "${BASEDIR}/${BACKUPKERNELDIR}" > /dev/null # Mark the directory as having been created by freebsd-update. - touch $BACKUPKERNELDIR/.freebsd-update + touch $BASEDIR/$BACKUPKERNELDIR/.freebsd-update if [ $? -ne 0 ]; then echo "Could not create kernel backup directory" exit 1 @@ -2647,8 +2727,8 @@ backup_kernel () { fi # Backup all the kernel files using hardlinks. - (cd $KERNELDIR && find . -type f $FINDFILTER -exec \ - cp -pl '{}' ${BACKUPKERNELDIR}/'{}' \;) + (cd ${BASEDIR}/${KERNELDIR} && find . -type f $FINDFILTER -exec \ + cp -pl '{}' ${BASEDIR}/${BACKUPKERNELDIR}/'{}' \;) # Re-enable patchname expansion. set +f @@ -2746,7 +2826,7 @@ install_files () { # Update linker.hints if necessary if [ -s INDEX-OLD -o -s INDEX-NEW ]; then - kldxref -R /boot/ 2>/dev/null + kldxref -R ${BASEDIR}/boot/ 2>/dev/null fi # We've finished updating the kernel. @@ -2797,14 +2877,14 @@ Kernel updates have been installed. Ple install_delete INDEX-OLD INDEX-NEW || return 1 # Rebuild /etc/spwd.db and /etc/pwd.db if necessary. - if [ /etc/master.passwd -nt /etc/spwd.db ] || - [ /etc/master.passwd -nt /etc/pwd.db ]; then - pwd_mkdb /etc/master.passwd + if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] || + [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/pwd.db ]; then + pwd_mkdb -d ${BASEDIR}/etc ${BASEDIR}/etc/master.passwd fi # Rebuild /etc/login.conf.db if necessary. - if [ /etc/login.conf -nt /etc/login.conf.db ]; then - cap_mkdb /etc/login.conf + if [ ${BASEDIR}/etc/login.conf -nt ${BASEDIR}/etc/login.conf.db ]; then + cap_mkdb ${BASEDIR}/etc/login.conf fi # We've finished installing the world and deleting old files @@ -3011,21 +3091,8 @@ IDS_compare () { mv INDEX-NOTMATCHING.tmp INDEX-NOTMATCHING # Go through the lines and print warnings. - while read LINE; do - FPATH=`echo "${LINE}" | cut -f 1 -d '|'` - TYPE=`echo "${LINE}" | cut -f 2 -d '|'` - OWNER=`echo "${LINE}" | cut -f 3 -d '|'` - GROUP=`echo "${LINE}" | cut -f 4 -d '|'` - PERM=`echo "${LINE}" | cut -f 5 -d '|'` - HASH=`echo "${LINE}" | cut -f 6 -d '|'` - LINK=`echo "${LINE}" | cut -f 7 -d '|'` - P_TYPE=`echo "${LINE}" | cut -f 8 -d '|'` - P_OWNER=`echo "${LINE}" | cut -f 9 -d '|'` - P_GROUP=`echo "${LINE}" | cut -f 10 -d '|'` - P_PERM=`echo "${LINE}" | cut -f 11 -d '|'` - P_HASH=`echo "${LINE}" | cut -f 12 -d '|'` - P_LINK=`echo "${LINE}" | cut -f 13 -d '|'` - + local IFS='|' + while read FPATH TYPE OWNER GROUP PERM HASH LINK P_TYPE P_OWNER P_GROUP P_PERM P_HASH P_LINK; do # Warn about different object types. if ! [ "${TYPE}" = "${P_TYPE}" ]; then echo -n "${FPATH} is a " @@ -3153,7 +3220,7 @@ get_params () { # Fetch command. Make sure that we're being called # interactively, then run fetch_check_params and fetch_run cmd_fetch () { - if [ ! -t 0 ]; then + if [ ! -t 0 -a $NOTTYOK -eq 0 ]; then echo -n "`basename $0` fetch should not " echo "be run non-interactively." echo "Run `basename $0` cron instead." From owner-svn-src-stable@FreeBSD.ORG Thu May 14 04:05:35 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04518E9B; Thu, 14 May 2015 04:05:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 E560A1572; Thu, 14 May 2015 04:05:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4E45YUB023079; Thu, 14 May 2015 04:05:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4E45Y74023078; Thu, 14 May 2015 04:05:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505140405.t4E45Y74023078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 14 May 2015 04:05:34 +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: r282875 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 04:05:35 -0000 Author: gjb Date: Thu May 14 04:05:34 2015 New Revision: 282875 URL: https://svnweb.freebsd.org/changeset/base/282875 Log: Document EN-15:04 and EN-15:05. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/errata.xml Changes in other areas also in this revision: Modified: stable/8/release/doc/share/xml/errata.xml stable/9/release/doc/share/xml/errata.xml Modified: stable/10/release/doc/share/xml/errata.xml ============================================================================== --- stable/10/release/doc/share/xml/errata.xml Wed May 13 22:52:51 2015 (r282874) +++ stable/10/release/doc/share/xml/errata.xml Thu May 14 04:05:34 2015 (r282875) @@ -48,6 +48,22 @@ &man.freebsd-update.8; updates libraries in suboptimal order + + + FreeBSD-EN-15:04.freebsd-update + 13 May 2015 + &man.freebsd-update.8; does not ensure the + previous upgrade has completed + + + + FreeBSD-EN-15:05.ufs + 13 May 2015 + Deadlock on reboot with UFS tuned with + SU+J + From owner-svn-src-stable@FreeBSD.ORG Thu May 14 04:05:35 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98618E9C; Thu, 14 May 2015 04:05:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 85AAA1574; Thu, 14 May 2015 04:05:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4E45ZB6023085; Thu, 14 May 2015 04:05:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4E45Zjm023084; Thu, 14 May 2015 04:05:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505140405.t4E45Zjm023084@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 14 May 2015 04:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r282875 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 04:05:35 -0000 Author: gjb Date: Thu May 14 04:05:34 2015 New Revision: 282875 URL: https://svnweb.freebsd.org/changeset/base/282875 Log: Document EN-15:04 and EN-15:05. Sponsored by: The FreeBSD Foundation Modified: stable/8/release/doc/share/xml/errata.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/errata.xml stable/9/release/doc/share/xml/errata.xml Modified: stable/8/release/doc/share/xml/errata.xml ============================================================================== --- stable/8/release/doc/share/xml/errata.xml Wed May 13 22:52:51 2015 (r282874) +++ stable/8/release/doc/share/xml/errata.xml Thu May 14 04:05:34 2015 (r282875) @@ -126,6 +126,14 @@ &man.freebsd-update.8; updates libraries in suboptimal order + + + FreeBSD-EN-15:04.freebsd-update + 13 May 2015 + &man.freebsd-update.8; does not ensure the + previous upgrade has completed + From owner-svn-src-stable@FreeBSD.ORG Thu May 14 04:05:36 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D024E9D; Thu, 14 May 2015 04:05:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2AF311575; Thu, 14 May 2015 04:05:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4E45at3023091; Thu, 14 May 2015 04:05:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4E45asG023090; Thu, 14 May 2015 04:05:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505140405.t4E45asG023090@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 14 May 2015 04:05:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282875 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 04:05:36 -0000 Author: gjb Date: Thu May 14 04:05:34 2015 New Revision: 282875 URL: https://svnweb.freebsd.org/changeset/base/282875 Log: Document EN-15:04 and EN-15:05. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/share/xml/errata.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/errata.xml stable/8/release/doc/share/xml/errata.xml Modified: stable/9/release/doc/share/xml/errata.xml ============================================================================== --- stable/9/release/doc/share/xml/errata.xml Wed May 13 22:52:51 2015 (r282874) +++ stable/9/release/doc/share/xml/errata.xml Thu May 14 04:05:34 2015 (r282875) @@ -71,6 +71,14 @@ &man.freebsd-update.8; updates libraries in suboptimal order + + + FreeBSD-EN-15:04.freebsd-update + 13 May 2015 + &man.freebsd-update.8; does not ensure the + previous upgrade has completed + From owner-svn-src-stable@FreeBSD.ORG Thu May 14 04:21:05 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2D5A4E6; Thu, 14 May 2015 04:21:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 A13521724; Thu, 14 May 2015 04:21:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4E4L5hX030514; Thu, 14 May 2015 04:21:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4E4L53f030513; Thu, 14 May 2015 04:21:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505140421.t4E4L53f030513@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 14 May 2015 04:21:05 +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: r282877 - stable/10/release/tools 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 04:21:05 -0000 Author: gjb Date: Thu May 14 04:21:04 2015 New Revision: 282877 URL: https://svnweb.freebsd.org/changeset/base/282877 Log: MFC r282772: Fix virtual machine disk format creating by passing VMFORMAT to mkimg(1) PR: 200068 Sponsored by: The FreeBSD Foundation Modified: stable/10/release/tools/vmimage.subr Modified: stable/10/release/tools/vmimage.subr ============================================================================== --- stable/10/release/tools/vmimage.subr Thu May 14 04:17:58 2015 (r282876) +++ stable/10/release/tools/vmimage.subr Thu May 14 04:21:04 2015 (r282877) @@ -23,14 +23,15 @@ write_partition_layout() { case "${TARGET}:${TARGET_ARCH}" in amd64:amd64 | i386:i386) - mkimg -s gpt -b ${BOOTFILES}/i386/pmbr/pmbr \ + mkimg -s gpt -f ${VMFORMAT} \ + -b ${BOOTFILES}/i386/pmbr/pmbr \ -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot \ ${SWAPOPT} \ -p freebsd-ufs/rootfs:=${VMBASE} \ -o ${VMIMAGE} ;; powerpc:powerpc*) - mkimg -s apm \ + mkimg -s apm -f ${VMFORMAT} \ -p apple-boot/bootfs:=${BOOTFILES}/powerpc/boot1.chrp/boot1.hfs \ ${SWAPOPT} \ -p freebsd-ufs/rootfs:=${VMBASE} \ From owner-svn-src-stable@FreeBSD.ORG Thu May 14 05:10:43 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6172A8B9; Thu, 14 May 2015 05:10:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 4ED2B1BF3; Thu, 14 May 2015 05:10:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4E5AhBs053584; Thu, 14 May 2015 05:10:43 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4E5Ah7U053583; Thu, 14 May 2015 05:10:43 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201505140510.t4E5Ah7U053583@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 14 May 2015 05:10: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: r282878 - stable/10/sys/dev/mii 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 05:10:43 -0000 Author: yongari Date: Thu May 14 05:10:42 2015 New Revision: 282878 URL: https://svnweb.freebsd.org/changeset/base/282878 Log: MFC r281877: Add another variant of BCM5708S controller to IBM HS21 workaround list. PR: 118238 Modified: stable/10/sys/dev/mii/brgphy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mii/brgphy.c ============================================================================== --- stable/10/sys/dev/mii/brgphy.c Thu May 14 04:21:04 2015 (r282877) +++ stable/10/sys/dev/mii/brgphy.c Thu May 14 05:10:42 2015 (r282878) @@ -158,25 +158,33 @@ static const struct mii_phy_funcs brgphy brgphy_reset }; -#define HS21_PRODUCT_ID "IBM eServer BladeCenter HS21" -#define HS21_BCM_CHIPID 0x57081021 +static const struct hs21_type { + const uint32_t id; + const char *prod; +} hs21_type_lists[] = { + { 0x57081021, "IBM eServer BladeCenter HS21" }, + { 0x57081011, "IBM eServer BladeCenter HS21 -[8853PAU]-" }, +}; static int detect_hs21(struct bce_softc *bce_sc) { char *sysenv; - int found; + int found, i; found = 0; - if (bce_sc->bce_chipid == HS21_BCM_CHIPID) { - sysenv = getenv("smbios.system.product"); - if (sysenv != NULL) { - if (strncmp(sysenv, HS21_PRODUCT_ID, - strlen(HS21_PRODUCT_ID)) == 0) - found = 1; - freeenv(sysenv); + sysenv = getenv("smbios.system.product"); + if (sysenv == NULL) + return (found); + for (i = 0; i < nitems(hs21_type_lists); i++) { + if (bce_sc->bce_chipid == hs21_type_lists[i].id && + strncmp(sysenv, hs21_type_lists[i].prod, + strlen(hs21_type_lists[i].prod)) == 0) { + found++; + break; } } + freeenv(sysenv); return (found); } From owner-svn-src-stable@FreeBSD.ORG Thu May 14 05:19:30 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB4CAA6E; Thu, 14 May 2015 05:19:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 A94401C2A; Thu, 14 May 2015 05:19:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4E5JU7i057797; Thu, 14 May 2015 05:19:30 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4E5JUNg057796; Thu, 14 May 2015 05:19:30 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201505140519.t4E5JUNg057796@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 14 May 2015 05:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282879 - stable/9/sys/dev/mii X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 05:19:30 -0000 Author: yongari Date: Thu May 14 05:19:29 2015 New Revision: 282879 URL: https://svnweb.freebsd.org/changeset/base/282879 Log: MFC r281877: Add another variant of BCM5708S controller to IBM HS21 workaround list. PR: 118238 Modified: stable/9/sys/dev/mii/brgphy.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/mii/brgphy.c ============================================================================== --- stable/9/sys/dev/mii/brgphy.c Thu May 14 05:10:42 2015 (r282878) +++ stable/9/sys/dev/mii/brgphy.c Thu May 14 05:19:29 2015 (r282879) @@ -158,25 +158,33 @@ static const struct mii_phy_funcs brgphy brgphy_reset }; -#define HS21_PRODUCT_ID "IBM eServer BladeCenter HS21" -#define HS21_BCM_CHIPID 0x57081021 +static const struct hs21_type { + const uint32_t id; + const char *prod; +} hs21_type_lists[] = { + { 0x57081021, "IBM eServer BladeCenter HS21" }, + { 0x57081011, "IBM eServer BladeCenter HS21 -[8853PAU]-" }, +}; static int detect_hs21(struct bce_softc *bce_sc) { char *sysenv; - int found; + int found, i; found = 0; - if (bce_sc->bce_chipid == HS21_BCM_CHIPID) { - sysenv = getenv("smbios.system.product"); - if (sysenv != NULL) { - if (strncmp(sysenv, HS21_PRODUCT_ID, - strlen(HS21_PRODUCT_ID)) == 0) - found = 1; - freeenv(sysenv); + sysenv = getenv("smbios.system.product"); + if (sysenv == NULL) + return (found); + for (i = 0; i < nitems(hs21_type_lists); i++) { + if (bce_sc->bce_chipid == hs21_type_lists[i].id && + strncmp(sysenv, hs21_type_lists[i].prod, + strlen(hs21_type_lists[i].prod)) == 0) { + found++; + break; } } + freeenv(sysenv); return (found); } From owner-svn-src-stable@FreeBSD.ORG Thu May 14 10:46:21 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7DC82BD0; Thu, 14 May 2015 10:46:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 53BB01166; Thu, 14 May 2015 10:46:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EAkLWO045103; Thu, 14 May 2015 10:46:21 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EAkLCr045100; Thu, 14 May 2015 10:46:21 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201505141046.t4EAkLCr045100@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 14 May 2015 10:46:21 +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: r282890 - stable/10/bin/cp 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 10:46:21 -0000 Author: jilles Date: Thu May 14 10:46:20 2015 New Revision: 282890 URL: https://svnweb.freebsd.org/changeset/base/282890 Log: MFC r282482: cp: Remove fts sorting. In an attempt to improve performance, cp reordered directories first (although the comment says directories last). This is not effective with new UFS layout policies. The sorting reorders multiple arguments passed to cp, which may be undesirable. Additionally, the comparison function does not induce a total order. Per POSIX, this causes undefined behaviour in qsort(). NetBSD removed the sorting in 2009. On filesystems that return directory entries in hash/btree order, sorting by d_fileno before statting improves performance on large directories. However, this can only be implemented in fts(3). PR: 53475 Reviewed by: bde (in 2004) Modified: stable/10/bin/cp/cp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/cp/cp.c ============================================================================== --- stable/10/bin/cp/cp.c Thu May 14 10:33:51 2015 (r282889) +++ stable/10/bin/cp/cp.c Thu May 14 10:46:20 2015 (r282890) @@ -90,7 +90,6 @@ volatile sig_atomic_t info; enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; static int copy(char *[], enum op, int); -static int mastercmp(const FTSENT * const *, const FTSENT * const *); static void siginfo(int __unused); int @@ -274,7 +273,7 @@ copy(char *argv[], enum op type, int fts mask = ~umask(0777); umask(~mask); - if ((ftsp = fts_open(argv, fts_options, mastercmp)) == NULL) + if ((ftsp = fts_open(argv, fts_options, NULL)) == NULL) err(1, "fts_open"); for (badcp = rval = 0; (curr = fts_read(ftsp)) != NULL; badcp = 0) { switch (curr->fts_info) { @@ -488,32 +487,6 @@ copy(char *argv[], enum op type, int fts return (rval); } -/* - * mastercmp -- - * The comparison function for the copy order. The order is to copy - * non-directory files before directory files. The reason for this - * is because files tend to be in the same cylinder group as their - * parent directory, whereas directories tend not to be. Copying the - * files first reduces seeking. - */ -static int -mastercmp(const FTSENT * const *a, const FTSENT * const *b) -{ - int a_info, b_info; - - a_info = (*a)->fts_info; - if (a_info == FTS_ERR || a_info == FTS_NS || a_info == FTS_DNR) - return (0); - b_info = (*b)->fts_info; - if (b_info == FTS_ERR || b_info == FTS_NS || b_info == FTS_DNR) - return (0); - if (a_info == FTS_D) - return (-1); - if (b_info == FTS_D) - return (1); - return (0); -} - static void siginfo(int sig __unused) { From owner-svn-src-stable@FreeBSD.ORG Thu May 14 11:47:18 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECDD573F; Thu, 14 May 2015 11:47:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 DB53618AA; Thu, 14 May 2015 11:47:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EBlIuN075839; Thu, 14 May 2015 11:47:18 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EBlI2j075838; Thu, 14 May 2015 11:47:18 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505141147.t4EBlI2j075838@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 14 May 2015 11:47:18 +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: r282894 - stable/10/sys/netinet6 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 11:47:19 -0000 Author: ae Date: Thu May 14 11:47:18 2015 New Revision: 282894 URL: https://svnweb.freebsd.org/changeset/base/282894 Log: MFC r282578: Mark data checksum as valid for multicast packets, that we send back to myself via simloop. Also remove duplicate check under #ifdef DIAGNOSTIC. PR: 180065 Modified: stable/10/sys/netinet6/ip6_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/ip6_output.c ============================================================================== --- stable/10/sys/netinet6/ip6_output.c Thu May 14 11:37:36 2015 (r282893) +++ stable/10/sys/netinet6/ip6_output.c Thu May 14 11:47:18 2015 (r282894) @@ -2816,14 +2816,6 @@ ip6_mloopback(struct ifnet *ifp, struct if (copym == NULL) return; } - -#ifdef DIAGNOSTIC - if (copym->m_len < sizeof(*ip6)) { - m_freem(copym); - return; - } -#endif - ip6 = mtod(copym, struct ip6_hdr *); /* * clear embedded scope identifiers if necessary. @@ -2831,7 +2823,11 @@ ip6_mloopback(struct ifnet *ifp, struct */ in6_clearscope(&ip6->ip6_src); in6_clearscope(&ip6->ip6_dst); - + if (copym->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { + copym->m_pkthdr.csum_flags |= CSUM_DATA_VALID_IPV6 | + CSUM_PSEUDO_HDR; + copym->m_pkthdr.csum_data = 0xffff; + } (void)if_simloop(ifp, copym, dst->sin6_family, 0); } From owner-svn-src-stable@FreeBSD.ORG Thu May 14 11:52:27 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB15BA9D; Thu, 14 May 2015 11:52:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 D9CD9199A; Thu, 14 May 2015 11:52:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EBqRcb080208; Thu, 14 May 2015 11:52:27 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EBqRfR080206; Thu, 14 May 2015 11:52:27 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201505141152.t4EBqRfR080206@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 14 May 2015 11:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282895 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 11:52:28 -0000 Author: ae Date: Thu May 14 11:52:27 2015 New Revision: 282895 URL: https://svnweb.freebsd.org/changeset/base/282895 Log: MFC r282578: Mark data checksum as valid for multicast packets, that we send back to myself via simloop. Also remove duplicate check under #ifdef DIAGNOSTIC. PR: 180065 Modified: stable/9/sys/netinet6/ip6_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/ip6_output.c ============================================================================== --- stable/9/sys/netinet6/ip6_output.c Thu May 14 11:47:18 2015 (r282894) +++ stable/9/sys/netinet6/ip6_output.c Thu May 14 11:52:27 2015 (r282895) @@ -3005,14 +3005,6 @@ ip6_mloopback(struct ifnet *ifp, struct if (copym == NULL) return; } - -#ifdef DIAGNOSTIC - if (copym->m_len < sizeof(*ip6)) { - m_freem(copym); - return; - } -#endif - ip6 = mtod(copym, struct ip6_hdr *); /* * clear embedded scope identifiers if necessary. @@ -3020,7 +3012,11 @@ ip6_mloopback(struct ifnet *ifp, struct */ in6_clearscope(&ip6->ip6_src); in6_clearscope(&ip6->ip6_dst); - + if (copym->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { + copym->m_pkthdr.csum_flags |= CSUM_DATA_VALID_IPV6 | + CSUM_PSEUDO_HDR; + copym->m_pkthdr.csum_data = 0xffff; + } (void)if_simloop(ifp, copym, dst->sin6_family, 0); } From owner-svn-src-stable@FreeBSD.ORG Thu May 14 18:15:22 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C39EB303; Thu, 14 May 2015 18:15:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B11A31F03; Thu, 14 May 2015 18:15:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EIFMTJ068508; Thu, 14 May 2015 18:15:22 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EIFMYi068507; Thu, 14 May 2015 18:15:22 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201505141815.t4EIFMYi068507@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 14 May 2015 18:15: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: r282915 - stable/10/usr.sbin/mountd 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 18:15:22 -0000 Author: sjg Date: Thu May 14 18:15:21 2015 New Revision: 282915 URL: https://svnweb.freebsd.org/changeset/base/282915 Log: No need to delete export from filesystems which are not exported. Modified: stable/10/usr.sbin/mountd/mountd.c Modified: stable/10/usr.sbin/mountd/mountd.c ============================================================================== --- stable/10/usr.sbin/mountd/mountd.c Thu May 14 18:09:56 2015 (r282914) +++ stable/10/usr.sbin/mountd/mountd.c Thu May 14 18:15:21 2015 (r282915) @@ -1732,6 +1732,12 @@ get_exportlist(void) } /* + * We do not need to delete "export" flag from + * filesystems that do not have it set. + */ + if (!(fsp->f_flags & MNT_EXPORTED)) + continue; + /* * Do not delete export for network filesystem by * passing "export" arg to nmount(). * It only makes sense to do this for local filesystems. From owner-svn-src-stable@FreeBSD.ORG Thu May 14 19:32:14 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E9E9910; Thu, 14 May 2015 19:32:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 234B71872; Thu, 14 May 2015 19:32:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EJWEAd007979; Thu, 14 May 2015 19:32:14 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EJWDIn007978; Thu, 14 May 2015 19:32:13 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201505141932.t4EJWDIn007978@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 14 May 2015 19:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282917 - stable/9/bin/cp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 19:32:14 -0000 Author: jilles Date: Thu May 14 19:32:13 2015 New Revision: 282917 URL: https://svnweb.freebsd.org/changeset/base/282917 Log: MFC r282482: cp: Remove fts sorting. In an attempt to improve performance, cp reordered directories first (although the comment says directories last). This is not effective with new UFS layout policies. The sorting reorders multiple arguments passed to cp, which may be undesirable. Additionally, the comparison function does not induce a total order. Per POSIX, this causes undefined behaviour in qsort(). NetBSD removed the sorting in 2009. On filesystems that return directory entries in hash/btree order, sorting by d_fileno before statting improves performance on large directories. However, this can only be implemented in fts(3). PR: 53475 Reviewed by: bde (in 2004) Modified: stable/9/bin/cp/cp.c Directory Properties: stable/9/bin/cp/ (props changed) Modified: stable/9/bin/cp/cp.c ============================================================================== --- stable/9/bin/cp/cp.c Thu May 14 18:29:05 2015 (r282916) +++ stable/9/bin/cp/cp.c Thu May 14 19:32:13 2015 (r282917) @@ -90,7 +90,6 @@ volatile sig_atomic_t info; enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; static int copy(char *[], enum op, int); -static int mastercmp(const FTSENT * const *, const FTSENT * const *); static void siginfo(int __unused); int @@ -274,7 +273,7 @@ copy(char *argv[], enum op type, int fts mask = ~umask(0777); umask(~mask); - if ((ftsp = fts_open(argv, fts_options, mastercmp)) == NULL) + if ((ftsp = fts_open(argv, fts_options, NULL)) == NULL) err(1, "fts_open"); for (badcp = rval = 0; (curr = fts_read(ftsp)) != NULL; badcp = 0) { switch (curr->fts_info) { @@ -488,32 +487,6 @@ copy(char *argv[], enum op type, int fts return (rval); } -/* - * mastercmp -- - * The comparison function for the copy order. The order is to copy - * non-directory files before directory files. The reason for this - * is because files tend to be in the same cylinder group as their - * parent directory, whereas directories tend not to be. Copying the - * files first reduces seeking. - */ -static int -mastercmp(const FTSENT * const *a, const FTSENT * const *b) -{ - int a_info, b_info; - - a_info = (*a)->fts_info; - if (a_info == FTS_ERR || a_info == FTS_NS || a_info == FTS_DNR) - return (0); - b_info = (*b)->fts_info; - if (b_info == FTS_ERR || b_info == FTS_NS || b_info == FTS_DNR) - return (0); - if (a_info == FTS_D) - return (-1); - if (b_info == FTS_D) - return (1); - return (0); -} - static void siginfo(int sig __unused) { From owner-svn-src-stable@FreeBSD.ORG Thu May 14 21:27:32 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69F9DC82; Thu, 14 May 2015 21:27:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 57CDE15FE; Thu, 14 May 2015 21:27:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ELRWnN063431; Thu, 14 May 2015 21:27:32 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ELRWIb063430; Thu, 14 May 2015 21:27:32 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201505142127.t4ELRWIb063430@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Thu, 14 May 2015 21:27: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: r282923 - stable/10/sys/dev/nvme 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 21:27:32 -0000 Author: jimharris Date: Thu May 14 21:27:31 2015 New Revision: 282923 URL: https://svnweb.freebsd.org/changeset/base/282923 Log: MFC r281280: nvme: fall back to a smaller MSI-X vector allocation if necessary Previously, if per-CPU MSI-X vectors could not be allocated, nvme(4) would fall back to INTx with a single I/O queue pair. This change will still fall back to a single I/O queue pair, but allocate MSI-X vectors instead of reverting to INTx. Sponsored by: Intel Modified: stable/10/sys/dev/nvme/nvme_ctrlr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_ctrlr.c Thu May 14 21:08:48 2015 (r282922) +++ stable/10/sys/dev/nvme/nvme_ctrlr.c Thu May 14 21:27:31 2015 (r282923) @@ -1144,9 +1144,17 @@ nvme_ctrlr_construct(struct nvme_control /* One vector per IO queue, plus one vector for admin queue. */ num_vectors = ctrlr->num_io_queues + 1; - if (pci_msix_count(dev) < num_vectors) { + /* + * If we cannot even allocate 2 vectors (one for admin, one for + * I/O), then revert to INTx. + */ + if (pci_msix_count(dev) < 2) { ctrlr->msix_enabled = 0; goto intx; + } else if (pci_msix_count(dev) < num_vectors) { + ctrlr->per_cpu_io_queues = FALSE; + ctrlr->num_io_queues = 1; + num_vectors = 2; /* one for admin, one for I/O */ } if (pci_alloc_msix(dev, &num_vectors) != 0) { From owner-svn-src-stable@FreeBSD.ORG Thu May 14 21:28:47 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C700EC5; Thu, 14 May 2015 21:28:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 3DE141615; Thu, 14 May 2015 21:28:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ELSllp063845; Thu, 14 May 2015 21:28:47 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ELSkkA063843; Thu, 14 May 2015 21:28:46 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201505142128.t4ELSkkA063843@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Thu, 14 May 2015 21:28: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: r282924 - stable/10/sys/dev/nvme 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 21:28:47 -0000 Author: jimharris Date: Thu May 14 21:28:46 2015 New Revision: 282924 URL: https://svnweb.freebsd.org/changeset/base/282924 Log: MFC r281281, r281285: nvme: create separate DMA tag for non-payload DMA buffers Submission and completion queue memory need to use a separate DMA tag for mappings than payload buffers, to ensure mappings remain contiguous even with DMAR enabled. Sponsored by: Intel Modified: stable/10/sys/dev/nvme/nvme_private.h stable/10/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/10/sys/dev/nvme/nvme_private.h Thu May 14 21:27:31 2015 (r282923) +++ stable/10/sys/dev/nvme/nvme_private.h Thu May 14 21:28:46 2015 (r282924) @@ -211,6 +211,7 @@ struct nvme_qpair { struct nvme_completion *cpl; bus_dma_tag_t dma_tag; + bus_dma_tag_t dma_tag_payload; bus_dmamap_t cmd_dma_map; uint64_t cmd_bus_addr; @@ -491,6 +492,8 @@ nvme_single_map(void *arg, bus_dma_segme { uint64_t *bus_addr = (uint64_t *)arg; + if (error != 0) + printf("nvme_single_map err %d\n", error); *bus_addr = seg[0].ds_addr; } Modified: stable/10/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_qpair.c Thu May 14 21:27:31 2015 (r282923) +++ stable/10/sys/dev/nvme/nvme_qpair.c Thu May 14 21:28:46 2015 (r282924) @@ -294,7 +294,7 @@ nvme_qpair_construct_tracker(struct nvme uint16_t cid) { - bus_dmamap_create(qpair->dma_tag, 0, &tr->payload_dma_map); + bus_dmamap_create(qpair->dma_tag_payload, 0, &tr->payload_dma_map); bus_dmamap_create(qpair->dma_tag, 0, &tr->prp_dma_map); bus_dmamap_load(qpair->dma_tag, tr->prp_dma_map, tr->prp, @@ -337,7 +337,7 @@ nvme_qpair_complete_tracker(struct nvme_ nvme_qpair_submit_tracker(qpair, tr); } else { if (req->type != NVME_REQUEST_NULL) - bus_dmamap_unload(qpair->dma_tag, + bus_dmamap_unload(qpair->dma_tag_payload, tr->payload_dma_map); nvme_free_request(req); @@ -464,6 +464,7 @@ nvme_qpair_construct(struct nvme_qpair * { struct nvme_tracker *tr; uint32_t i; + int err; qpair->id = id; qpair->vector = vector; @@ -497,11 +498,20 @@ nvme_qpair_construct(struct nvme_qpair * mtx_init(&qpair->lock, "nvme qpair lock", NULL, MTX_DEF); /* Note: NVMe PRP format is restricted to 4-byte alignment. */ - bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), + err = bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), 4, PAGE_SIZE, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, NVME_MAX_XFER_SIZE, (NVME_MAX_XFER_SIZE/PAGE_SIZE)+1, PAGE_SIZE, 0, + NULL, NULL, &qpair->dma_tag_payload); + if (err != 0) + nvme_printf(ctrlr, "payload tag create failed %d\n", err); + + err = bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), + 4, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, + BUS_SPACE_MAXSIZE, 1, BUS_SPACE_MAXSIZE, 0, NULL, NULL, &qpair->dma_tag); + if (err != 0) + nvme_printf(ctrlr, "tag create failed %d\n", err); qpair->num_cmds = 0; qpair->num_intr_handler_calls = 0; @@ -513,8 +523,13 @@ nvme_qpair_construct(struct nvme_qpair * sizeof(struct nvme_completion), M_NVME, M_ZERO, 0, BUS_SPACE_MAXADDR, PAGE_SIZE, 0); - bus_dmamap_create(qpair->dma_tag, 0, &qpair->cmd_dma_map); - bus_dmamap_create(qpair->dma_tag, 0, &qpair->cpl_dma_map); + err = bus_dmamap_create(qpair->dma_tag, 0, &qpair->cmd_dma_map); + if (err != 0) + nvme_printf(ctrlr, "cmd_dma_map create failed %d\n", err); + + err = bus_dmamap_create(qpair->dma_tag, 0, &qpair->cpl_dma_map); + if (err != 0) + nvme_printf(ctrlr, "cpl_dma_map create failed %d\n", err); bus_dmamap_load(qpair->dma_tag, qpair->cmd_dma_map, qpair->cmd, qpair->num_entries * sizeof(struct nvme_command), @@ -570,6 +585,9 @@ nvme_qpair_destroy(struct nvme_qpair *qp if (qpair->dma_tag) bus_dma_tag_destroy(qpair->dma_tag); + if (qpair->dma_tag_payload) + bus_dma_tag_destroy(qpair->dma_tag_payload); + if (qpair->act_tr) free(qpair->act_tr, M_NVME); @@ -707,8 +725,11 @@ nvme_payload_map(void *arg, bus_dma_segm * is responsible for detecting the error status and failing the * tracker manually. */ - if (error != 0) + if (error != 0) { + nvme_printf(tr->qpair->ctrlr, + "nvme_payload_map err %d\n", error); return; + } /* * Note that we specified PAGE_SIZE for alignment and max @@ -728,6 +749,13 @@ nvme_payload_map(void *arg, bus_dma_segm (uint64_t)seg[cur_nseg].ds_addr; cur_nseg++; } + } else { + /* + * prp2 should not be used by the controller + * since there is only one segment, but set + * to 0 just to be safe. + */ + tr->req->cmd.prp2 = 0; } nvme_qpair_submit_tracker(tr->qpair, tr); @@ -780,8 +808,9 @@ _nvme_qpair_submit_request(struct nvme_q KASSERT(req->payload_size <= qpair->ctrlr->max_xfer_size, ("payload_size (%d) exceeds max_xfer_size (%d)\n", req->payload_size, qpair->ctrlr->max_xfer_size)); - err = bus_dmamap_load(tr->qpair->dma_tag, tr->payload_dma_map, - req->u.payload, req->payload_size, nvme_payload_map, tr, 0); + err = bus_dmamap_load(tr->qpair->dma_tag_payload, + tr->payload_dma_map, req->u.payload, req->payload_size, + nvme_payload_map, tr, 0); if (err != 0) nvme_printf(qpair->ctrlr, "bus_dmamap_load returned 0x%x!\n", err); @@ -795,7 +824,7 @@ _nvme_qpair_submit_request(struct nvme_q ("bio->bio_bcount (%jd) exceeds max_xfer_size (%d)\n", (intmax_t)req->u.bio->bio_bcount, qpair->ctrlr->max_xfer_size)); - err = bus_dmamap_load_bio(tr->qpair->dma_tag, + err = bus_dmamap_load_bio(tr->qpair->dma_tag_payload, tr->payload_dma_map, req->u.bio, nvme_payload_map, tr, 0); if (err != 0) nvme_printf(qpair->ctrlr, From owner-svn-src-stable@FreeBSD.ORG Thu May 14 21:29:42 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5A6280; Thu, 14 May 2015 21:29:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 A9E50161E; Thu, 14 May 2015 21:29:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ELTg0Q064026; Thu, 14 May 2015 21:29:42 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ELTgsf064025; Thu, 14 May 2015 21:29:42 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201505142129.t4ELTgsf064025@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Thu, 14 May 2015 21:29:42 +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: r282925 - stable/10/sys/dev/nvme 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 21:29:43 -0000 Author: jimharris Date: Thu May 14 21:29:42 2015 New Revision: 282925 URL: https://svnweb.freebsd.org/changeset/base/282925 Log: MFC r281282: nvme: add device strings for Intel DC series NVMe SSDs Sponsored by: Intel Modified: stable/10/sys/dev/nvme/nvme.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvme/nvme.c ============================================================================== --- stable/10/sys/dev/nvme/nvme.c Thu May 14 21:28:46 2015 (r282924) +++ stable/10/sys/dev/nvme/nvme.c Thu May 14 21:29:42 2015 (r282925) @@ -81,27 +81,55 @@ MODULE_VERSION(nvme, 1); static struct _pcsid { - u_int32_t type; - const char *desc; + uint32_t devid; + int match_subdevice; + uint16_t subdevice; + const char *desc; } pci_ids[] = { - { 0x01118086, "NVMe Controller" }, - { CHATHAM_PCI_ID, "Chatham Prototype NVMe Controller" }, - { IDT32_PCI_ID, "IDT NVMe Controller (32 channel)" }, - { IDT8_PCI_ID, "IDT NVMe Controller (8 channel)" }, - { 0x00000000, NULL } + { 0x01118086, 0, 0, "NVMe Controller" }, + { CHATHAM_PCI_ID, 0, 0, "Chatham Prototype NVMe Controller" }, + { IDT32_PCI_ID, 0, 0, "IDT NVMe Controller (32 channel)" }, + { IDT8_PCI_ID, 0, 0, "IDT NVMe Controller (8 channel)" }, + { 0x09538086, 1, 0x3702, "DC P3700 SSD" }, + { 0x09538086, 1, 0x3703, "DC P3700 SSD [2.5\" SFF]" }, + { 0x09538086, 1, 0x3704, "DC P3500 SSD [Add-in Card]" }, + { 0x09538086, 1, 0x3705, "DC P3500 SSD [2.5\" SFF]" }, + { 0x09538086, 1, 0x3709, "DC P3600 SSD [Add-in Card]" }, + { 0x09538086, 1, 0x370a, "DC P3600 SSD [2.5\" SFF]" }, + { 0x00000000, 0, 0, NULL } }; static int +nvme_match(uint32_t devid, uint16_t subdevice, struct _pcsid *ep) +{ + if (devid != ep->devid) + return 0; + + if (!ep->match_subdevice) + return 1; + + if (subdevice == ep->subdevice) + return 1; + else + return 0; +} + +static int nvme_probe (device_t device) { struct _pcsid *ep; - u_int32_t type; + uint32_t devid; + uint16_t subdevice; - type = pci_get_devid(device); + devid = pci_get_devid(device); + subdevice = pci_get_subdevice(device); ep = pci_ids; - while (ep->type && ep->type != type) + while (ep->devid) { + if (nvme_match(devid, subdevice, ep)) + break; ++ep; + } if (ep->desc) { device_set_desc(device, ep->desc); From owner-svn-src-stable@FreeBSD.ORG Thu May 14 21:30:38 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43E671DB; Thu, 14 May 2015 21:30:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 30F48162B; Thu, 14 May 2015 21:30:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4ELUctR065294; Thu, 14 May 2015 21:30:38 GMT (envelope-from jimharris@FreeBSD.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4ELUaYU065286; Thu, 14 May 2015 21:30:36 GMT (envelope-from jimharris@FreeBSD.org) Message-Id: <201505142130.t4ELUaYU065286@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jimharris set sender to jimharris@FreeBSD.org using -f From: Jim Harris Date: Thu, 14 May 2015 21:30:36 +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: r282926 - stable/10/sys/dev/nvme 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 21:30:38 -0000 Author: jimharris Date: Thu May 14 21:30:36 2015 New Revision: 282926 URL: https://svnweb.freebsd.org/changeset/base/282926 Log: MFC r281283: nvme: remove CHATHAM related code Chatham was an internal NVMe prototype board used for early driver development. Sponsored by: Intel Modified: stable/10/sys/dev/nvme/nvme.c stable/10/sys/dev/nvme/nvme_ctrlr.c stable/10/sys/dev/nvme/nvme_ns.c stable/10/sys/dev/nvme/nvme_private.h stable/10/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nvme/nvme.c ============================================================================== --- stable/10/sys/dev/nvme/nvme.c Thu May 14 21:29:42 2015 (r282925) +++ stable/10/sys/dev/nvme/nvme.c Thu May 14 21:30:36 2015 (r282926) @@ -87,7 +87,6 @@ static struct _pcsid const char *desc; } pci_ids[] = { { 0x01118086, 0, 0, "NVMe Controller" }, - { CHATHAM_PCI_ID, 0, 0, "Chatham Prototype NVMe Controller" }, { IDT32_PCI_ID, 0, 0, "IDT NVMe Controller (32 channel)" }, { IDT8_PCI_ID, 0, 0, "IDT NVMe Controller (8 channel)" }, { 0x09538086, 1, 0x3702, "DC P3700 SSD" }, Modified: stable/10/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_ctrlr.c Thu May 14 21:29:42 2015 (r282925) +++ stable/10/sys/dev/nvme/nvme_ctrlr.c Thu May 14 21:30:36 2015 (r282926) @@ -49,11 +49,7 @@ static int nvme_ctrlr_allocate_bar(struct nvme_controller *ctrlr) { - /* Chatham puts the NVMe MMRs behind BAR 2/3, not BAR 0/1. */ - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - ctrlr->resource_id = PCIR_BAR(2); - else - ctrlr->resource_id = PCIR_BAR(0); + ctrlr->resource_id = PCIR_BAR(0); ctrlr->resource = bus_alloc_resource(ctrlr->dev, SYS_RES_MEMORY, &ctrlr->resource_id, 0, ~0, 1, RF_ACTIVE); @@ -81,117 +77,6 @@ nvme_ctrlr_allocate_bar(struct nvme_cont return (0); } -#ifdef CHATHAM2 -static int -nvme_ctrlr_allocate_chatham_bar(struct nvme_controller *ctrlr) -{ - - ctrlr->chatham_resource_id = PCIR_BAR(CHATHAM_CONTROL_BAR); - ctrlr->chatham_resource = bus_alloc_resource(ctrlr->dev, - SYS_RES_MEMORY, &ctrlr->chatham_resource_id, 0, ~0, 1, - RF_ACTIVE); - - if(ctrlr->chatham_resource == NULL) { - nvme_printf(ctrlr, "unable to alloc pci resource\n"); - return (ENOMEM); - } - - ctrlr->chatham_bus_tag = rman_get_bustag(ctrlr->chatham_resource); - ctrlr->chatham_bus_handle = - rman_get_bushandle(ctrlr->chatham_resource); - - return (0); -} - -static void -nvme_ctrlr_setup_chatham(struct nvme_controller *ctrlr) -{ - uint64_t reg1, reg2, reg3; - uint64_t temp1, temp2; - uint32_t temp3; - uint32_t use_flash_timings = 0; - - DELAY(10000); - - temp3 = chatham_read_4(ctrlr, 0x8080); - - device_printf(ctrlr->dev, "Chatham version: 0x%x\n", temp3); - - ctrlr->chatham_lbas = chatham_read_4(ctrlr, 0x8068) - 0x110; - ctrlr->chatham_size = ctrlr->chatham_lbas * 512; - - device_printf(ctrlr->dev, "Chatham size: %jd\n", - (intmax_t)ctrlr->chatham_size); - - reg1 = reg2 = reg3 = ctrlr->chatham_size - 1; - - TUNABLE_INT_FETCH("hw.nvme.use_flash_timings", &use_flash_timings); - if (use_flash_timings) { - device_printf(ctrlr->dev, "Chatham: using flash timings\n"); - temp1 = 0x00001b58000007d0LL; - temp2 = 0x000000cb00000131LL; - } else { - device_printf(ctrlr->dev, "Chatham: using DDR timings\n"); - temp1 = temp2 = 0x0LL; - } - - chatham_write_8(ctrlr, 0x8000, reg1); - chatham_write_8(ctrlr, 0x8008, reg2); - chatham_write_8(ctrlr, 0x8010, reg3); - - chatham_write_8(ctrlr, 0x8020, temp1); - temp3 = chatham_read_4(ctrlr, 0x8020); - - chatham_write_8(ctrlr, 0x8028, temp2); - temp3 = chatham_read_4(ctrlr, 0x8028); - - chatham_write_8(ctrlr, 0x8030, temp1); - chatham_write_8(ctrlr, 0x8038, temp2); - chatham_write_8(ctrlr, 0x8040, temp1); - chatham_write_8(ctrlr, 0x8048, temp2); - chatham_write_8(ctrlr, 0x8050, temp1); - chatham_write_8(ctrlr, 0x8058, temp2); - - DELAY(10000); -} - -static void -nvme_chatham_populate_cdata(struct nvme_controller *ctrlr) -{ - struct nvme_controller_data *cdata; - - cdata = &ctrlr->cdata; - - cdata->vid = 0x8086; - cdata->ssvid = 0x2011; - - /* - * Chatham2 puts garbage data in these fields when we - * invoke IDENTIFY_CONTROLLER, so we need to re-zero - * the fields before calling bcopy(). - */ - memset(cdata->sn, 0, sizeof(cdata->sn)); - memcpy(cdata->sn, "2012", strlen("2012")); - memset(cdata->mn, 0, sizeof(cdata->mn)); - memcpy(cdata->mn, "CHATHAM2", strlen("CHATHAM2")); - memset(cdata->fr, 0, sizeof(cdata->fr)); - memcpy(cdata->fr, "0", strlen("0")); - cdata->rab = 8; - cdata->aerl = 3; - cdata->lpa.ns_smart = 1; - cdata->sqes.min = 6; - cdata->sqes.max = 6; - cdata->cqes.min = 4; - cdata->cqes.max = 4; - cdata->nn = 1; - - /* Chatham2 doesn't support DSM command */ - cdata->oncs.dsm = 0; - - cdata->vwc.present = 1; -} -#endif /* CHATHAM2 */ - static void nvme_ctrlr_construct_admin_qpair(struct nvme_controller *ctrlr) { @@ -461,11 +346,6 @@ nvme_ctrlr_identify(struct nvme_controll return (ENXIO); } -#ifdef CHATHAM2 - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - nvme_chatham_populate_cdata(ctrlr); -#endif - /* * Use MDTS to ensure our default max_xfer_size doesn't exceed what the * controller supports. @@ -779,10 +659,6 @@ nvme_ctrlr_configure_aer(struct nvme_con /* aerl is a zero-based value, so we need to add 1 here. */ ctrlr->num_aers = min(NVME_MAX_ASYNC_EVENTS, (ctrlr->cdata.aerl+1)); - /* Chatham doesn't support AERs. */ - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - ctrlr->num_aers = 0; - for (i = 0; i < ctrlr->num_aers; i++) { aer = &ctrlr->aer[i]; nvme_ctrlr_construct_and_submit_aer(ctrlr, aer); @@ -1034,27 +910,6 @@ nvme_ctrlr_ioctl(struct cdev *cdev, u_lo break; case NVME_PASSTHROUGH_CMD: pt = (struct nvme_pt_command *)arg; -#ifdef CHATHAM2 - /* - * Chatham IDENTIFY data is spoofed, so copy the spoofed data - * rather than issuing the command to the Chatham controller. - */ - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID && - pt->cmd.opc == NVME_OPC_IDENTIFY) { - if (pt->cmd.cdw10 == 1) { - if (pt->len != sizeof(ctrlr->cdata)) - return (EINVAL); - return (copyout(&ctrlr->cdata, pt->buf, - pt->len)); - } else { - if (pt->len != sizeof(ctrlr->ns[0].data) || - pt->cmd.nsid != 1) - return (EINVAL); - return (copyout(&ctrlr->ns[0].data, pt->buf, - pt->len)); - } - } -#endif return (nvme_ctrlr_passthrough_cmd(ctrlr, pt, pt->cmd.nsid, 1 /* is_user_buffer */, 1 /* is_admin_cmd */)); default: @@ -1087,15 +942,6 @@ nvme_ctrlr_construct(struct nvme_control if (status != 0) return (status); -#ifdef CHATHAM2 - if (pci_get_devid(dev) == CHATHAM_PCI_ID) { - status = nvme_ctrlr_allocate_chatham_bar(ctrlr); - if (status != 0) - return (status); - nvme_ctrlr_setup_chatham(ctrlr); - } -#endif - /* * Software emulators may set the doorbell stride to something * other than zero, but this driver is not set up to handle that. @@ -1244,14 +1090,8 @@ nvme_ctrlr_destruct(struct nvme_controll * during shutdown). This ensures the controller receives a * shutdown notification in case the system is shutdown before * reloading the driver. - * - * Chatham does not let you re-enable the controller after shutdown - * notification has been received, so do not send it in this case. - * This is OK because Chatham does not depend on the shutdown - * notification anyways. */ - if (pci_get_devid(ctrlr->dev) != CHATHAM_PCI_ID) - nvme_ctrlr_shutdown(ctrlr); + nvme_ctrlr_shutdown(ctrlr); nvme_ctrlr_disable(ctrlr); taskqueue_free(ctrlr->taskqueue); @@ -1280,13 +1120,6 @@ nvme_ctrlr_destruct(struct nvme_controll ctrlr->bar4_resource_id, ctrlr->bar4_resource); } -#ifdef CHATHAM2 - if (ctrlr->chatham_resource != NULL) { - bus_release_resource(dev, SYS_RES_MEMORY, - ctrlr->chatham_resource_id, ctrlr->chatham_resource); - } -#endif - if (ctrlr->tag) bus_teardown_intr(ctrlr->dev, ctrlr->res, ctrlr->tag); Modified: stable/10/sys/dev/nvme/nvme_ns.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_ns.c Thu May 14 21:29:42 2015 (r282925) +++ stable/10/sys/dev/nvme/nvme_ns.c Thu May 14 21:30:36 2015 (r282926) @@ -465,28 +465,6 @@ nvme_ns_bio_process(struct nvme_namespac return (err); } -#ifdef CHATHAM2 -static void -nvme_ns_populate_chatham_data(struct nvme_namespace *ns) -{ - struct nvme_controller *ctrlr; - struct nvme_namespace_data *nsdata; - - ctrlr = ns->ctrlr; - nsdata = &ns->data; - - nsdata->nsze = ctrlr->chatham_lbas; - nsdata->ncap = ctrlr->chatham_lbas; - nsdata->nuse = ctrlr->chatham_lbas; - - /* Chatham2 doesn't support thin provisioning. */ - nsdata->nsfeat.thin_prov = 0; - - /* Set LBA size to 512 bytes. */ - nsdata->lbaf[0].lbads = 9; -} -#endif /* CHATHAM2 */ - int nvme_ns_construct(struct nvme_namespace *ns, uint16_t id, struct nvme_controller *ctrlr) @@ -513,23 +491,15 @@ nvme_ns_construct(struct nvme_namespace if (!mtx_initialized(&ns->lock)) mtx_init(&ns->lock, "nvme ns lock", NULL, MTX_DEF); -#ifdef CHATHAM2 - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - nvme_ns_populate_chatham_data(ns); - else { -#endif - status.done = FALSE; - nvme_ctrlr_cmd_identify_namespace(ctrlr, id, &ns->data, - nvme_completion_poll_cb, &status); - while (status.done == FALSE) - DELAY(5); - if (nvme_completion_is_error(&status.cpl)) { - nvme_printf(ctrlr, "nvme_identify_namespace failed\n"); - return (ENXIO); - } -#ifdef CHATHAM2 + status.done = FALSE; + nvme_ctrlr_cmd_identify_namespace(ctrlr, id, &ns->data, + nvme_completion_poll_cb, &status); + while (status.done == FALSE) + DELAY(5); + if (nvme_completion_is_error(&status.cpl)) { + nvme_printf(ctrlr, "nvme_identify_namespace failed\n"); + return (ENXIO); } -#endif /* * Note: format is a 0-based value, so > is appropriate here, Modified: stable/10/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/10/sys/dev/nvme/nvme_private.h Thu May 14 21:29:42 2015 (r282925) +++ stable/10/sys/dev/nvme/nvme_private.h Thu May 14 21:30:36 2015 (r282926) @@ -50,13 +50,6 @@ MALLOC_DECLARE(M_NVME); -#define CHATHAM2 - -#ifdef CHATHAM2 -#define CHATHAM_PCI_ID 0x20118086 -#define CHATHAM_CONTROL_BAR 0 -#endif - #define IDT32_PCI_ID 0x80d0111d /* 32 channel board */ #define IDT8_PCI_ID 0x80d2111d /* 8 channel board */ @@ -267,13 +260,6 @@ struct nvme_controller { int bar4_resource_id; struct resource *bar4_resource; -#ifdef CHATHAM2 - bus_space_tag_t chatham_bus_tag; - bus_space_handle_t chatham_bus_handle; - int chatham_resource_id; - struct resource *chatham_resource; -#endif - uint32_t msix_enabled; uint32_t force_intx; uint32_t enable_aborts; @@ -339,11 +325,6 @@ struct nvme_controller { boolean_t is_failed; STAILQ_HEAD(, nvme_request) fail_req; - -#ifdef CHATHAM2 - uint64_t chatham_size; - uint64_t chatham_lbas; -#endif }; #define nvme_mmio_offsetof(reg) \ @@ -366,22 +347,6 @@ struct nvme_controller { (val & 0xFFFFFFFF00000000UL) >> 32); \ } while (0); -#ifdef CHATHAM2 -#define chatham_read_4(softc, reg) \ - bus_space_read_4((softc)->chatham_bus_tag, \ - (softc)->chatham_bus_handle, reg) - -#define chatham_write_8(sc, reg, val) \ - do { \ - bus_space_write_4((sc)->chatham_bus_tag, \ - (sc)->chatham_bus_handle, reg, val & 0xffffffff); \ - bus_space_write_4((sc)->chatham_bus_tag, \ - (sc)->chatham_bus_handle, reg+4, \ - (val & 0xFFFFFFFF00000000UL) >> 32); \ - } while (0); - -#endif /* CHATHAM2 */ - #if __FreeBSD_version < 800054 #define wmb() __asm volatile("sfence" ::: "memory") #define mb() __asm volatile("mfence" ::: "memory") Modified: stable/10/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/10/sys/dev/nvme/nvme_qpair.c Thu May 14 21:29:42 2015 (r282925) +++ stable/10/sys/dev/nvme/nvme_qpair.c Thu May 14 21:30:36 2015 (r282926) @@ -469,15 +469,6 @@ nvme_qpair_construct(struct nvme_qpair * qpair->id = id; qpair->vector = vector; qpair->num_entries = num_entries; -#ifdef CHATHAM2 - /* - * Chatham prototype board starts having issues at higher queue - * depths. So use a conservative estimate here of no more than 64 - * outstanding I/O per queue at any one point. - */ - if (pci_get_devid(ctrlr->dev) == CHATHAM_PCI_ID) - num_trackers = min(num_trackers, 64); -#endif qpair->num_trackers = num_trackers; qpair->ctrlr = ctrlr; From owner-svn-src-stable@FreeBSD.ORG Thu May 14 22:50:09 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6773C33C; Thu, 14 May 2015 22:50:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 498E01E73; Thu, 14 May 2015 22:50:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EMo9fo003907; Thu, 14 May 2015 22:50:09 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EMo8of003902; Thu, 14 May 2015 22:50:08 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201505142250.t4EMo8of003902@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 14 May 2015 22:50: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: r282933 - in stable/10/sys: fs/nfs fs/nfsclient kern sys 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 22:50:09 -0000 Author: rmacklem Date: Thu May 14 22:50:07 2015 New Revision: 282933 URL: https://svnweb.freebsd.org/changeset/base/282933 Log: MFC: r281960 MAXBSIZE defines both the largest UFS block size and the largest size for a buffer in the buffer cache. This patch defines a new constant MAXBCACHEBUF, which is the largest size for a buffer in the buffer cache. Having a separate constant allows MAXBCACHEBUF to be set larger than MAXBSIZE on a per-architecture basis, so that NFS can do larger read/writes for these architectures. It modifies sys/param.h so that BKVASIZE can also be set on a per-architecture basis. A couple of cases where NFS used MAXBSIZE instead of NFS_MAXBSIZE is fixed as well. Modified: stable/10/sys/fs/nfs/nfsport.h stable/10/sys/fs/nfsclient/nfs_clvfsops.c stable/10/sys/kern/vfs_bio.c stable/10/sys/sys/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfsport.h ============================================================================== --- stable/10/sys/fs/nfs/nfsport.h Thu May 14 22:35:26 2015 (r282932) +++ stable/10/sys/fs/nfs/nfsport.h Thu May 14 22:50:07 2015 (r282933) @@ -967,7 +967,7 @@ struct nfsreq { }; #ifndef NFS_MAXBSIZE -#define NFS_MAXBSIZE MAXBSIZE +#define NFS_MAXBSIZE MAXBCACHEBUF #endif /* Modified: stable/10/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvfsops.c Thu May 14 22:35:26 2015 (r282932) +++ stable/10/sys/fs/nfsclient/nfs_clvfsops.c Thu May 14 22:50:07 2015 (r282933) @@ -196,16 +196,16 @@ newnfs_iosize(struct nfsmount *nmp) } if (nmp->nm_rsize > maxio || nmp->nm_rsize == 0) nmp->nm_rsize = maxio; - if (nmp->nm_rsize > MAXBSIZE) - nmp->nm_rsize = MAXBSIZE; + if (nmp->nm_rsize > NFS_MAXBSIZE) + nmp->nm_rsize = NFS_MAXBSIZE; if (nmp->nm_readdirsize > maxio || nmp->nm_readdirsize == 0) nmp->nm_readdirsize = maxio; if (nmp->nm_readdirsize > nmp->nm_rsize) nmp->nm_readdirsize = nmp->nm_rsize; if (nmp->nm_wsize > maxio || nmp->nm_wsize == 0) nmp->nm_wsize = maxio; - if (nmp->nm_wsize > MAXBSIZE) - nmp->nm_wsize = MAXBSIZE; + if (nmp->nm_wsize > NFS_MAXBSIZE) + nmp->nm_wsize = NFS_MAXBSIZE; /* * Calculate the size used for io buffers. Use the larger Modified: stable/10/sys/kern/vfs_bio.c ============================================================================== --- stable/10/sys/kern/vfs_bio.c Thu May 14 22:35:26 2015 (r282932) +++ stable/10/sys/kern/vfs_bio.c Thu May 14 22:50:07 2015 (r282933) @@ -774,6 +774,7 @@ bufinit(void) struct buf *bp; int i; + CTASSERT(MAXBCACHEBUF >= MAXBSIZE); mtx_init(&bqclean, "bufq clean lock", NULL, MTX_DEF); mtx_init(&bqdirty, "bufq dirty lock", NULL, MTX_DEF); mtx_init(&rbreqlock, "runningbufspace lock", NULL, MTX_DEF); @@ -815,8 +816,8 @@ bufinit(void) * by the system. */ maxbufspace = (long)nbuf * BKVASIZE; - hibufspace = lmax(3 * maxbufspace / 4, maxbufspace - MAXBSIZE * 10); - lobufspace = hibufspace - MAXBSIZE; + hibufspace = lmax(3 * maxbufspace / 4, maxbufspace - MAXBCACHEBUF * 10); + lobufspace = hibufspace - MAXBCACHEBUF; /* * Note: The 16 MiB upper limit for hirunningspace was chosen @@ -826,9 +827,9 @@ bufinit(void) * The lower 1 MiB limit is the historical upper limit for * hirunningspace. */ - hirunningspace = lmax(lmin(roundup(hibufspace / 64, MAXBSIZE), + hirunningspace = lmax(lmin(roundup(hibufspace / 64, MAXBCACHEBUF), 16 * 1024 * 1024), 1024 * 1024); - lorunningspace = roundup((hirunningspace * 2) / 3, MAXBSIZE); + lorunningspace = roundup((hirunningspace * 2) / 3, MAXBCACHEBUF); /* * Limit the amount of malloc memory since it is wired permanently into @@ -3076,8 +3077,9 @@ getblk(struct vnode *vp, daddr_t blkno, KASSERT((flags & (GB_UNMAPPED | GB_KVAALLOC)) != GB_KVAALLOC, ("GB_KVAALLOC only makes sense with GB_UNMAPPED")); ASSERT_VOP_LOCKED(vp, "getblk"); - if (size > MAXBSIZE) - panic("getblk: size(%d) > MAXBSIZE(%d)\n", size, MAXBSIZE); + if (size > MAXBCACHEBUF) + panic("getblk: size(%d) > MAXBCACHEBUF(%d)\n", size, + MAXBCACHEBUF); if (!unmapped_buf_allowed) flags &= ~(GB_UNMAPPED | GB_KVAALLOC); Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Thu May 14 22:35:26 2015 (r282932) +++ stable/10/sys/sys/param.h Thu May 14 22:50:07 2015 (r282933) @@ -232,10 +232,19 @@ * and may be made smaller at the risk of not being able to use * filesystems which require a block size exceeding MAXBSIZE. * + * MAXBCACHEBUF - Maximum size of a buffer in the buffer cache. This must + * be >= MAXBSIZE and can be set differently for different + * architectures by defining it in . + * Making this larger allows NFS to do larger reads/writes. + * * BKVASIZE - Nominal buffer space per buffer, in bytes. BKVASIZE is the * minimum KVM memory reservation the kernel is willing to make. * Filesystems can of course request smaller chunks. Actual * backing memory uses a chunk size of a page (PAGE_SIZE). + * The default value here can be overridden on a per-architecture + * basis by defining it in . This should + * probably be done to increase its value, when MAXBCACHEBUF is + * defined as a larger value in . * * If you make BKVASIZE too small you risk seriously fragmenting * the buffer KVM map which may slow things down a bit. If you @@ -247,7 +256,12 @@ * normal UFS filesystem. */ #define MAXBSIZE 65536 /* must be power of 2 */ +#ifndef MAXBCACHEBUF +#define MAXBCACHEBUF MAXBSIZE /* must be a power of 2 >= MAXBSIZE */ +#endif +#ifndef BKVASIZE #define BKVASIZE 16384 /* must be power of 2 */ +#endif #define BKVAMASK (BKVASIZE-1) /* From owner-svn-src-stable@FreeBSD.ORG Fri May 15 06:28:10 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id CEB7FBFB; Fri, 15 May 2015 06:28:10 +0000 (UTC) Date: Fri, 15 May 2015 06:28:10 +0000 From: Alexey Dokuchaev To: Jilles Tjoelker Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r282917 - stable/9/bin/cp Message-ID: <20150515062810.GA76007@FreeBSD.org> References: <201505141932.t4EJWDIn007978@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201505141932.t4EJWDIn007978@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 06:28:10 -0000 On Thu, May 14, 2015 at 07:32:13PM +0000, Jilles Tjoelker wrote: > Author: jilles > Date: Thu May 14 19:32:13 2015 > New Revision: 282917 > URL: https://svnweb.freebsd.org/changeset/base/282917 > > Log: > MFC r282482: cp: Remove fts sorting. > > [...] Could (if should) it be MFCed to stable/8 as well? ./danfe From owner-svn-src-stable@FreeBSD.ORG Fri May 15 07:07:38 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54DD172D; Fri, 15 May 2015 07:07:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 42E0C1FFF; Fri, 15 May 2015 07:07:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F77cJZ052599; Fri, 15 May 2015 07:07:38 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F77cLh052598; Fri, 15 May 2015 07:07:38 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201505150707.t4F77cLh052598@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Fri, 15 May 2015 07:07:38 +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: r282943 - stable/10/sys/dev/ixl 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 07:07:38 -0000 Author: araujo (ports committer) Date: Fri May 15 07:07:37 2015 New Revision: 282943 URL: https://svnweb.freebsd.org/changeset/base/282943 Log: MFC r282939: Free vsi->queues after use. Modified: stable/10/sys/dev/ixl/if_ixlv.c Modified: stable/10/sys/dev/ixl/if_ixlv.c ============================================================================== --- stable/10/sys/dev/ixl/if_ixlv.c Fri May 15 06:50:59 2015 (r282942) +++ stable/10/sys/dev/ixl/if_ixlv.c Fri May 15 07:07:37 2015 (r282943) @@ -1646,7 +1646,6 @@ ixlv_setup_queues(struct ixlv_sc *sc) return (0); fail: - free(vsi->queues, M_DEVBUF); for (int i = 0; i < vsi->num_queues; i++) { que = &vsi->queues[i]; rxr = &que->rxr; @@ -1656,6 +1655,7 @@ fail: if (txr->base) i40e_free_dma_mem(&sc->hw, &txr->dma); } + free(vsi->queues, M_DEVBUF); early: return (error); From owner-svn-src-stable@FreeBSD.ORG Fri May 15 08:45:57 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5E862F5; Fri, 15 May 2015 08:45:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 C33301C43; Fri, 15 May 2015 08:45:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F8juqP002809; Fri, 15 May 2015 08:45:56 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F8juRd002806; Fri, 15 May 2015 08:45:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505150845.t4F8juRd002806@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 15 May 2015 08:45:56 +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: r282949 - stable/10/usr.bin/col 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 08:45:57 -0000 Author: bapt Date: Fri May 15 08:45:55 2015 New Revision: 282949 URL: https://svnweb.freebsd.org/changeset/base/282949 Log: MFC: r282305, r282309, r282342, r282669, r282722 r282305: col: fixing 25 year old bug Makes col(1) respect POSIX again for escape sequences as decribed in its manpage The bug was introduced in CSRG in 1990 r282309: Use defines to improve clarity r282342: Capsicumize col(1) r282669: Fix about ten integer overflows and underflows and a handful of logic errors in line number handling. Submitted by: schwarze at OpenBSD Discussed with: schwarze at OpenBSD Obtained from: OpenBSD r282722: For half and reverse line feeds, recognize both SUSv2-style escape-digit and BSD-style escape-control-char sequences in the input stream. Submitted by: schwarze at OpenBSD Discussed with: schwarze at OpenBSD Obtained from: OpenBSD Modified: stable/10/usr.bin/col/col.1 stable/10/usr.bin/col/col.c Modified: stable/10/usr.bin/col/col.1 ============================================================================== --- stable/10/usr.bin/col/col.1 Fri May 15 08:40:17 2015 (r282948) +++ stable/10/usr.bin/col/col.1 Fri May 15 08:45:55 2015 (r282949) @@ -31,7 +31,7 @@ .\" @(#)col.1 8.1 (Berkeley) 6/29/93 .\" $FreeBSD$ .\" -.Dd August 4, 2004 +.Dd May 10, 2015 .Dt COL 1 .Os .Sh NAME @@ -82,18 +82,33 @@ recognized and interpreted by itself, wh Output multiple spaces instead of tabs. .El .Pp -The control sequences for carriage motion that +In the input stream, .Nm -understands and their decimal values are listed in the following -table: +understands both the escape sequences of the form escape-digit +mandated by +.St -susv2 +and the traditional +.Bx +format escape-control-character. +The control sequences for carriage motion and their ASCII values +are as follows: .Pp .Bl -tag -width "carriage return" -compact +.It ESC\-BELL +reverse line feed (escape then bell). .It ESC\-7 -reverse line feed (escape then 7) +reverse line feed (escape then 7). +.It ESC\-BACKSPACE +half reverse line feed (escape then backspace). .It ESC\-8 -half reverse line feed (escape then 8) +half reverse line feed (escape then 8). +.It ESC\-TAB +half forward line feed (escape than tab). .It ESC\-9 -half forward line feed (escape then 9) +half forward line feed (escape then 9). +In +.Fl f +mode, this sequence may also occur in the output stream. .It backspace moves back one column (8); ignored in the first column .It carriage return Modified: stable/10/usr.bin/col/col.c ============================================================================== --- stable/10/usr.bin/col/col.c Fri May 15 08:40:17 2015 (r282948) +++ stable/10/usr.bin/col/col.c Fri May 15 08:45:55 2015 (r282949) @@ -45,11 +45,15 @@ static char sccsid[] = "@(#)col.c 8.5 (B #include __FBSDID("$FreeBSD$"); +#include + #include +#include #include #include #include #include +#include #include #include #include @@ -63,9 +67,9 @@ __FBSDID("$FreeBSD$"); #define SI '\017' /* shift in to normal character set */ #define SO '\016' /* shift out to alternate character set */ #define VT '\013' /* vertical tab (aka reverse line feed) */ -#define RLF '\007' /* ESC-07 reverse line feed */ -#define RHLF '\010' /* ESC-010 reverse half-line feed */ -#define FHLF '\011' /* ESC-011 forward half-line feed */ +#define RLF '7' /* ESC-7 reverse line feed */ +#define RHLF '8' /* ESC-8 reverse half-line feed */ +#define FHLF '9' /* ESC-9 forward half-line feed */ /* build up at least this many lines before flushing them out */ #define BUFFER_MARGIN 32 @@ -92,6 +96,7 @@ struct line_str { int l_max_col; /* max column in the line */ }; +static void addto_lineno(int *, int); static LINE *alloc_line(void); static void dowarn(int); static void flush_line(LINE *); @@ -104,7 +109,7 @@ static CSET last_set; /* char_set of la static LINE *lines; static int compress_spaces; /* if doing space -> tab conversion */ static int fine; /* if `fine' resolution (half lines) */ -static int max_bufd_lines; /* max # lines to keep in memory */ +static int max_bufd_lines; /* max # of half lines to keep in memory */ static int nblank_lines; /* # blanks after last flushed line */ static int no_backspaces; /* if not to output any backspaces */ static int pass_unknown_seqs; /* pass unknown control sequences */ @@ -129,10 +134,26 @@ main(int argc, char **argv) int this_line; /* line l points to */ int nflushd_lines; /* number of lines that were flushed */ int adjust, opt, warned, width; + const char *errstr; + cap_rights_t rights; + unsigned long cmd; (void)setlocale(LC_CTYPE, ""); - max_bufd_lines = 128; + cap_rights_init(&rights, CAP_FSTAT, CAP_READ); + if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for stdin"); + cap_rights_init(&rights, CAP_FSTAT, CAP_WRITE, CAP_IOCTL); + if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for stdout"); + cmd = TIOCGETA; /* required by isatty(3) in printf(3) */ + if (cap_ioctls_limit(STDOUT_FILENO, &cmd, 1) < 0 && errno != ENOSYS) + err(1, "unable to limit ioctls for stdout"); + + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "unable to enter capability mode"); + + max_bufd_lines = 256; compress_spaces = 1; /* compress spaces into tabs */ while ((opt = getopt(argc, argv, "bfhl:px")) != -1) switch (opt) { @@ -146,8 +167,11 @@ main(int argc, char **argv) compress_spaces = 1; break; case 'l': /* buffered line count */ - if ((max_bufd_lines = atoi(optarg)) <= 0) - errx(1, "bad -l argument %s", optarg); + max_bufd_lines = strtonum(optarg, 1, + (INT_MAX - BUFFER_MARGIN) / 2, &errstr) * 2; + if (errstr != NULL) + errx(1, "bad -l argument, %s: %s", errstr, + optarg); break; case 'p': /* pass unknown control sequences */ pass_unknown_seqs = 1; @@ -163,9 +187,6 @@ main(int argc, char **argv) if (optind != argc) usage(); - /* this value is in half lines */ - max_bufd_lines *= 2; - adjust = cur_col = extra_lines = warned = 0; cur_line = max_line = nflushd_lines = this_line = 0; cur_set = last_set = CS_NORMAL; @@ -184,20 +205,31 @@ main(int argc, char **argv) continue; case ESC: /* just ignore EOF */ switch(getwchar()) { + /* + * In the input stream, accept both the + * XPG5 sequences ESC-digit and the + * traditional BSD sequences ESC-ctrl. + */ + case '\007': + /* FALLTHROUGH */ case RLF: - cur_line -= 2; + addto_lineno(&cur_line, -2); break; + case '\010': + /* FALLTHROUGH */ case RHLF: - cur_line--; + addto_lineno(&cur_line, -1); break; + case '\011': + /* FALLTHROUGH */ case FHLF: - cur_line++; + addto_lineno(&cur_line, 1); if (cur_line > max_line) max_line = cur_line; } continue; case NL: - cur_line += 2; + addto_lineno(&cur_line, 2); if (cur_line > max_line) max_line = cur_line; cur_col = 0; @@ -216,7 +248,7 @@ main(int argc, char **argv) ++cur_col; continue; case VT: - cur_line -= 2; + addto_lineno(&cur_line, -2); continue; } if (iswspace(ch)) { @@ -229,58 +261,61 @@ main(int argc, char **argv) } /* Must stuff ch in a line - are we at the right one? */ - if (cur_line != this_line - adjust) { + if (cur_line + adjust != this_line) { LINE *lnew; - int nmove; - adjust = 0; - nmove = cur_line - this_line; - if (!fine) { - /* round up to next line */ - if (cur_line & 1) { - adjust = 1; - nmove++; - } - } - if (nmove < 0) { - for (; nmove < 0 && l->l_prev; nmove++) + /* round up to next line */ + adjust = !fine && (cur_line & 1); + + if (cur_line + adjust < this_line) { + while (cur_line + adjust < this_line && + l->l_prev != NULL) { l = l->l_prev; - if (nmove) { + this_line--; + } + if (cur_line + adjust < this_line) { if (nflushd_lines == 0) { /* * Allow backup past first * line if nothing has been * flushed yet. */ - for (; nmove < 0; nmove++) { + while (cur_line + adjust + < this_line) { lnew = alloc_line(); l->l_prev = lnew; lnew->l_next = l; l = lines = lnew; extra_lines++; + this_line--; } } else { if (!warned++) dowarn(cur_line); - cur_line -= nmove; + cur_line = this_line - adjust; } } } else { /* may need to allocate here */ - for (; nmove > 0 && l->l_next; nmove--) + while (cur_line + adjust > this_line) { + if (l->l_next == NULL) { + l->l_next = alloc_line(); + l->l_next->l_prev = l; + } l = l->l_next; - for (; nmove > 0; nmove--) { - lnew = alloc_line(); - lnew->l_prev = l; - l->l_next = lnew; - l = lnew; + this_line++; } } - this_line = cur_line + adjust; - nmove = this_line - nflushd_lines; - if (nmove >= max_bufd_lines + BUFFER_MARGIN) { - nflushd_lines += nmove - max_bufd_lines; - flush_lines(nmove - max_bufd_lines); + if (this_line > nflushd_lines && + this_line - nflushd_lines >= + max_bufd_lines + BUFFER_MARGIN) { + if (extra_lines) { + flush_lines(extra_lines); + extra_lines = 0; + } + flush_lines(this_line - nflushd_lines - + max_bufd_lines); + nflushd_lines = this_line - max_bufd_lines; } } /* grow line's buffer? */ @@ -311,25 +346,23 @@ main(int argc, char **argv) } if (ferror(stdin)) err(1, NULL); - if (max_line == 0) - exit(0); /* no lines, so just exit */ + if (extra_lines) + flush_lines(extra_lines); /* goto the last line that had a character on it */ for (; l->l_next; l = l->l_next) this_line++; - flush_lines(this_line - nflushd_lines + extra_lines + 1); + flush_lines(this_line - nflushd_lines + 1); /* make sure we leave things in a sane state */ if (last_set != CS_NORMAL) - PUTC('\017'); + PUTC(SI); /* flush out the last few blank lines */ - nblank_lines = max_line - this_line; + if (max_line > this_line) + nblank_lines = max_line - this_line; if (max_line & 1) nblank_lines++; - else if (!nblank_lines) - /* missing a \n on the last line? */ - nblank_lines = 2; flush_blanks(); exit(0); } @@ -346,7 +379,8 @@ flush_lines(int nflush) flush_blanks(); flush_line(l); } - nblank_lines++; + if (l->l_line || l->l_next) + nblank_lines++; if (l->l_line) (void)free(l->l_line); free_line(l); @@ -377,8 +411,8 @@ flush_blanks(void) for (i = nb; --i >= 0;) PUTC('\n'); if (half) { - PUTC('\033'); - PUTC('9'); + PUTC(ESC); + PUTC(FHLF); if (!nb) PUTC('\r'); } @@ -480,10 +514,10 @@ flush_line(LINE *l) if (c->c_set != last_set) { switch (c->c_set) { case CS_NORMAL: - PUTC('\017'); + PUTC(SI); break; case CS_ALTERNATE: - PUTC('\016'); + PUTC(SO); } last_set = c->c_set; } @@ -498,6 +532,23 @@ flush_line(LINE *l) } } +/* + * Increment or decrement a line number, checking for overflow. + * Stop one below INT_MAX such that the adjust variable is safe. + */ +void +addto_lineno(int *lno, int offset) +{ + if (offset > 0) { + if (*lno >= INT_MAX - offset) + errx(1, "too many lines"); + } else { + if (*lno < INT_MIN - offset) + errx(1, "too many reverse line feeds"); + } + *lno += offset; +} + #define NALLOC 64 static LINE *line_freelist; From owner-svn-src-stable@FreeBSD.ORG Fri May 15 08:53:54 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2992F50E; Fri, 15 May 2015 08:53:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 16B2C1D44; Fri, 15 May 2015 08:53:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F8rsCe007449; Fri, 15 May 2015 08:53:54 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F8rqOI007444; Fri, 15 May 2015 08:53:52 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505150853.t4F8rqOI007444@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 15 May 2015 08:53:52 +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: r282950 - stable/10/usr.bin/vgrind 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 08:53:54 -0000 Author: bapt Date: Fri May 15 08:53:52 2015 New Revision: 282950 URL: https://svnweb.freebsd.org/changeset/base/282950 Log: MFC: r282449, r282450, r282451, r282452, r282453, r282454, r282455, r282457, r282459, r282460, r282461 Modernize code: ansification, use c99 features Improve style(9) Better memory checking Modified: stable/10/usr.bin/vgrind/Makefile stable/10/usr.bin/vgrind/extern.h stable/10/usr.bin/vgrind/regexp.c stable/10/usr.bin/vgrind/vfontedpr.c stable/10/usr.bin/vgrind/vgrindefs.c Modified: stable/10/usr.bin/vgrind/Makefile ============================================================================== --- stable/10/usr.bin/vgrind/Makefile Fri May 15 08:45:55 2015 (r282949) +++ stable/10/usr.bin/vgrind/Makefile Fri May 15 08:53:52 2015 (r282950) @@ -11,7 +11,7 @@ FILESDIR= ${SHAREDIR}/misc FILESDIR_tmac.vgrind= ${SHAREDIR}/tmac MAN= vgrind.1 vgrindefs.5 -WARNS?= 2 +WARNS?= 3 BINDIR= /usr/libexec SCRIPTSDIR=/usr/bin Modified: stable/10/usr.bin/vgrind/extern.h ============================================================================== --- stable/10/usr.bin/vgrind/extern.h Fri May 15 08:45:55 2015 (r282949) +++ stable/10/usr.bin/vgrind/extern.h Fri May 15 08:53:52 2015 (r282950) @@ -31,9 +31,7 @@ * $FreeBSD$ */ -typedef int boolean; - -extern boolean _escaped; /* if last character was an escape */ +extern bool _escaped; /* if last character was an escape */ extern char *s_start; /* start of the current string */ extern char *l_acmbeg; /* string introducing a comment */ extern char *l_acmend; /* string ending a comment */ @@ -45,11 +43,11 @@ extern char *l_combeg; / extern char *l_comend; /* string ending a comment */ extern char l_escape; /* character used to escape characters */ extern char *l_keywds[]; /* keyword table address */ -extern boolean l_onecase; /* upper and lower case are equivalent */ +extern bool l_onecase; /* upper and lower case are equivalent */ extern char *l_prcbeg; /* regular expr for procedure begin */ extern char *l_strbeg; /* delimiter for string constant */ extern char *l_strend; /* delimiter for string constant */ -extern boolean l_toplex; /* procedures only defined at top lex level */ +extern bool l_toplex; /* procedures only defined at top lex level */ extern const char *language; /* the language indicator */ #include Modified: stable/10/usr.bin/vgrind/regexp.c ============================================================================== --- stable/10/usr.bin/vgrind/regexp.c Fri May 15 08:45:55 2015 (r282949) +++ stable/10/usr.bin/vgrind/regexp.c Fri May 15 08:53:52 2015 (r282950) @@ -44,19 +44,16 @@ static const char sccsid[] = "@(#)regexp #include #include +#include #include #include "extern.h" -#define FALSE 0 -#define TRUE !(FALSE) -#define NIL 0 - static void expconv(void); -boolean _escaped; /* true if we are currently _escaped */ +bool _escaped; /* true if we are currently x_escaped */ char *s_start; /* start of string */ -boolean l_onecase; /* true if upper and lower equivalent */ +bool l_onecase; /* true if upper and lower equivalent */ #define makelower(c) (isupper((c)) ? tolower((c)) : (c)) @@ -66,9 +63,7 @@ boolean l_onecase; /* true if upper and */ int -STRNCMP(s1, s2, len) - register char *s1,*s2; - register int len; +STRNCMP(register char *s1, register char *s2, register int len) { if (l_onecase) { do @@ -147,18 +142,18 @@ STRNCMP(s1, s2, len) static char *ccre; /* pointer to current position in converted exp*/ static char *ure; /* pointer current position in unconverted exp */ +/* re: unconverted irregular expression */ char * -convexp(re) - char *re; /* unconverted irregular expression */ +convexp(char *re) { register char *cre; /* pointer to converted regular expression */ /* allocate room for the converted expression */ - if (re == NIL) - return (NIL); + if (re == NULL) + return (NULL); if (*re == '\0') - return (NIL); - cre = malloc (4 * strlen(re) + 3); + return (NULL); + cre = malloc(4 * strlen(re) + 3); ccre = cre; ure = re; @@ -182,9 +177,9 @@ expconv() register int temp; /* let the conversion begin */ - acs = NIL; - cs = NIL; - while (*ure != NIL) { + acs = NULL; + cs = NULL; + while (*ure) { switch (c = *ure++) { case '\\': @@ -192,7 +187,7 @@ expconv() /* escaped characters are just characters */ default: - if (cs == NIL || (*cs & STR) == 0) { + if (cs == NULL || (*cs & STR) == 0) { cs = ccre; *cs = STR; SCNT(cs) = 1; @@ -207,13 +202,13 @@ expconv() case 'd': case 'e': case 'p': - if (acs != NIL && acs != cs) { + if (acs != NULL && acs != cs) { do { temp = OCNT(acs); OCNT(acs) = ccre - acs; acs -= temp; } while (temp != 0); - acs = NIL; + acs = NULL; } cs = ccre; *cs = META; @@ -226,13 +221,13 @@ expconv() /* just put the symbol in */ case '^': case '$': - if (acs != NIL && acs != cs) { + if (acs != NULL && acs != cs) { do { temp = OCNT(acs); OCNT(acs) = ccre - acs; acs -= temp; } while (temp != 0); - acs = NIL; + acs = NULL; } cs = ccre; *cs = META; @@ -248,31 +243,31 @@ expconv() /* recurse and define a subexpression */ case '(': - if (acs != NIL && acs != cs) { + if (acs != NULL && acs != cs) { do { temp = OCNT(acs); OCNT(acs) = ccre - acs; acs -= temp; } while (temp != 0); - acs = NIL; + acs = NULL; } cs = ccre; *cs = OPER; OSYM(cs) = '('; ccre = ONEXT(cs); - expconv (); + expconv(); OCNT(cs) = ccre - cs; /* offset to next symbol */ break; /* return from a recursion */ case ')': - if (acs != NIL) { + if (acs != NULL) { do { temp = OCNT(acs); OCNT(acs) = ccre - acs; acs -= temp; } while (temp != 0); - acs = NIL; + acs = NULL; } cs = ccre; *cs = META; @@ -284,7 +279,7 @@ expconv() /* the third byte will contain an offset to jump over the */ /* alternate match in case the first did not fail */ case '|': - if (acs != NIL && acs != cs) + if (acs != NULL && acs != cs) OCNT(ccre) = ccre - acs; /* make a back pointer */ else OCNT(ccre) = 0; @@ -298,7 +293,7 @@ expconv() /* if its not a metasymbol just build a scharacter string */ default: - if (cs == NIL || (*cs & STR) == 0) { + if (cs == NULL || (*cs & STR) == 0) { cs = ccre; *cs = STR; SCNT(cs) = 1; @@ -309,13 +304,13 @@ expconv() break; } } - if (acs != NIL) { + if (acs != NULL) { do { temp = OCNT(acs); OCNT(acs) = ccre - acs; acs -= temp; } while (temp != 0); - acs = NIL; + acs = NULL; } return; } @@ -344,21 +339,23 @@ expconv() * character matched. */ +/* + * s: string to check for a match in + * re: a converted irregular expression + * mstring: where to put whatever matches a \p + */ char * -expmatch (s, re, mstring) - register char *s; /* string to check for a match in */ - register char *re; /* a converted irregular expression */ - register char *mstring; /* where to put whatever matches a \p */ +expmatch (register char *s, register char *re, register char *mstring) { register char *cs; /* the current symbol */ register char *ptr,*s1; /* temporary pointer */ - boolean matched; /* a temporary boolean */ + bool matched; /* a temporary bool */ /* initial conditions */ - if (re == NIL) - return (NIL); + if (re == NULL) + return (NULL); cs = re; - matched = FALSE; + matched = false; /* loop till expression string is exhausted (or at least pretty tired) */ while (*cs) { @@ -384,7 +381,7 @@ expmatch (s, re, mstring) } else { /* no match, error return */ - return (NIL); + return (NULL); } break; @@ -406,8 +403,8 @@ expmatch (s, re, mstring) /* this is a grouping, recurse */ case '(': - ptr = expmatch (s, ONEXT(cs), mstring); - if (ptr != NIL) { + ptr = expmatch(s, ONEXT(cs), mstring); + if (ptr != NULL) { /* the subexpression matched */ matched = 1; @@ -423,7 +420,7 @@ expmatch (s, re, mstring) } else { /* no match, error return */ - return (NIL); + return (NULL); } cs = OPTR(cs); break; @@ -443,35 +440,35 @@ expmatch (s, re, mstring) */ s1 = s; do { - ptr = expmatch (s1, MNEXT(cs), mstring); - if (ptr != NIL && s1 != s) { + ptr = expmatch(s1, MNEXT(cs), mstring); + if (ptr != NULL && s1 != s) { /* we have a match, remember the match */ strncpy (mstring, s, s1 - s); mstring[s1 - s] = '\0'; return (ptr); - } else if (ptr != NIL && (*cs & OPT)) { + } else if (ptr != NULL && (*cs & OPT)) { /* it was aoptional so no match is ok */ return (ptr); - } else if (ptr != NIL) { + } else if (ptr != NULL) { /* not optional and we still matched */ - return (NIL); + return (NULL); } if (!(isalnum(*s1) || *s1 == '_' || /* C++ destructor */ *s1 == '~' || /* C++ scope operator */ (strlen(s1) > 1 && *s1 == ':' && s1[1] == ':' && - (s1++, TRUE)))) - return (NIL); + (s1++, true)))) + return (NULL); if (*s1 == '\\') - _escaped = _escaped ? FALSE : TRUE; + _escaped = _escaped ? false : true; else - _escaped = FALSE; + _escaped = false; } while (*s1++); - return (NIL); + return (NULL); /* try to match anything */ case 'a': @@ -482,31 +479,31 @@ expmatch (s, re, mstring) */ s1 = s; do { - ptr = expmatch (s1, MNEXT(cs), mstring); - if (ptr != NIL && s1 != s) { + ptr = expmatch(s1, MNEXT(cs), mstring); + if (ptr != NULL && s1 != s) { /* we have a match */ return (ptr); - } else if (ptr != NIL && (*cs & OPT)) { + } else if (ptr != NULL && (*cs & OPT)) { /* it was aoptional so no match is ok */ return (ptr); - } else if (ptr != NIL) { + } else if (ptr != NULL) { /* not optional and we still matched */ - return (NIL); + return (NULL); } if (*s1 == '\\') - _escaped = _escaped ? FALSE : TRUE; + _escaped = _escaped ? false : true; else - _escaped = FALSE; + _escaped = false; } while (*s1++); - return (NIL); + return (NULL); /* fail if we are currently _escaped */ case 'e': if (_escaped) - return(NIL); + return(NULL); cs = MNEXT(cs); break; @@ -538,7 +535,7 @@ expmatch (s, re, mstring) } else /* no match, error return */ - return (NIL); + return (NULL); break; /* check for end of line */ @@ -562,7 +559,7 @@ expmatch (s, re, mstring) } else /* no match, error return */ - return (NIL); + return (NULL); break; /* check for start of line */ @@ -585,7 +582,7 @@ expmatch (s, re, mstring) } else /* no match, error return */ - return (NIL); + return (NULL); break; /* end of a subexpression, return success */ Modified: stable/10/usr.bin/vgrind/vfontedpr.c ============================================================================== --- stable/10/usr.bin/vgrind/vfontedpr.c Fri May 15 08:45:55 2015 (r282949) +++ stable/10/usr.bin/vgrind/vfontedpr.c Fri May 15 08:53:52 2015 (r282950) @@ -47,14 +47,12 @@ static const char sccsid[] = "@(#)vfonte #include #include #include +#include #include #include #include "pathnames.h" #include "extern.h" -#define FALSE 0 -#define TRUE !(FALSE) -#define NIL 0 #define STANDARD 0 #define ALTERNATE 1 @@ -70,8 +68,8 @@ static const char sccsid[] = "@(#)vfonte #define PSMAX 20 /* size of procedure name stacking */ static int iskw(char *); -static boolean isproc(char *); -static void putKcp(char *, char *, boolean); +static bool isproc(char *); +static void putKcp(char *, char *, bool); static void putScp(char *); static void putcp(int); static int tabs(char *, char *); @@ -81,13 +79,13 @@ static int width(char *, char *); * The state variables */ -static boolean filter = FALSE; /* act as a filter (like eqn) */ -static boolean inchr; /* in a string constant */ -static boolean incomm; /* in a comment of the primary type */ -static boolean idx = FALSE; /* form an index */ -static boolean instr; /* in a string constant */ -static boolean nokeyw = FALSE; /* no keywords being flagged */ -static boolean pass = FALSE; /* +static bool filter = false; /* act as a filter (like eqn) */ +static bool inchr; /* in a string constant */ +static bool incomm; /* in a comment of the primary type */ +static bool idx = false; /* form an index */ +static bool instr; /* in a string constant */ +static bool nokeyw = false; /* no keywords being flagged */ +static bool pass = false; /* * when acting as a filter, pass indicates * whether we are currently processing * input. @@ -100,7 +98,7 @@ static char * defsfile[2] = { _PATH_VGRI static int margin; static int plstack[PSMAX]; /* the procedure nesting level stack */ static char pname[BUFSIZ+1]; -static boolean prccont; /* continue last procedure */ +static bool prccont; /* continue last procedure */ static int psptr; /* the stack index of the current procedure */ static char pstack[PSMAX][PNAMELEN+1]; /* the procedure name stack */ @@ -122,15 +120,15 @@ char *l_nocom; /* regexp for non-commen char *l_prcbeg; /* regular expr for procedure begin */ char *l_strbeg; /* delimiter for string constant */ char *l_strend; /* delimiter for string constant */ -boolean l_toplex; /* procedures only defined at top lex level */ +bool l_toplex; /* procedures only defined at top lex level */ const char *language = "c"; /* the language indicator */ #define ps(x) printf("%s", x) +static char minus[] = "-"; +static char minusn[] = "-n"; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char **argv) { const char *fname = ""; struct stat stbuf; @@ -160,9 +158,9 @@ main(argc, argv) /* act as a filter like eqn */ if (!strcmp(argv[0], "-f")) { - filter++; + filter = true; argv[0] = argv[argc-1]; - argv[argc-1] = strdup("-"); + argv[argc-1] = minus; continue; } @@ -174,13 +172,13 @@ main(argc, argv) /* build an index */ if (!strcmp(argv[0], "-x")) { - idx++; - argv[0] = strdup("-n"); + idx = true; + argv[0] = minusn; } /* indicate no keywords */ if (!strcmp(argv[0], "-n")) { - nokeyw++; + nokeyw = true; argc--, argv++; continue; } @@ -227,17 +225,17 @@ main(argc, argv) i = cgetent(&defs, defsfile, language); if (i == -1) { fprintf (stderr, "no entry for language %s\n", language); - exit (0); + exit(0); } else if (i == -2) { fprintf(stderr, "cannot find vgrindefs file %s\n", defsfile[0]); - exit (0); + exit(0); } else if (i == -3) { fprintf(stderr, "potential reference loop detected in vgrindefs file %s\n", defsfile[0]); exit(0); } if (cgetustr(defs, "kw", &cp) == -1) - nokeyw = TRUE; + nokeyw = true; else { char **cpp; @@ -250,7 +248,7 @@ main(argc, argv) while (*cp != ' ' && *cp != '\t' && *cp) cp++; } - *cpp = NIL; + *cpp = NULL; } cgetustr(defs, "pb", &cp); l_prcbeg = convexp(cp); @@ -282,10 +280,10 @@ main(argc, argv) /* initialize the program */ - incomm = FALSE; - instr = FALSE; - inchr = FALSE; - _escaped = FALSE; + incomm = false; + instr = false; + inchr = false; + _escaped = false; blklevel = 0; for (psptr=0; psptr 0 /* sanity */) blklevel--; @@ -465,13 +462,13 @@ skip: /* end of current procedure */ if (s != os) - ps ("\\c"); - ps ("\\c\n'-F\n"); + ps("\\c"); + ps("\\c\n'-F\n"); blklevel = plstack[psptr]; /* see if we should print the last proc name */ if (--psptr >= 0) - prccont = TRUE; + prccont = true; else psptr = -1; } @@ -480,8 +477,8 @@ skip: } /* start of a lexical block */ - if (blksptr != NIL) { - putKcp (s, blksptr - 1, FALSE); + if (blksptr != NULL) { + putKcp(s, blksptr - 1, false); s = blksptr; blklevel++; continue; @@ -489,64 +486,66 @@ skip: /* check for end of comment */ } else if (incomm) { - comptr = expmatch (s, l_comend, dummy); - acmptr = expmatch (s, l_acmend, dummy); - if (((comtype == STANDARD) && (comptr != NIL)) || - ((comtype == ALTERNATE) && (acmptr != NIL))) { + comptr = expmatch(s, l_comend, dummy); + acmptr = expmatch(s, l_acmend, dummy); + if (((comtype == STANDARD) && (comptr != NULL)) || + ((comtype == ALTERNATE) && (acmptr != NULL))) { if (comtype == STANDARD) { - putKcp (s, comptr-1, TRUE); + putKcp(s, comptr-1, true); s = comptr; } else { - putKcp (s, acmptr-1, TRUE); + putKcp(s, acmptr-1, true); s = acmptr; } - incomm = FALSE; + incomm = false; ps("\\c\n'-C\n"); continue; } else { - putKcp (s, s + strlen(s) -1, TRUE); + putKcp(s, s + strlen(s) -1, true); s = s + strlen(s); continue; } /* check for end of string */ } else if (instr) { - if ((strptr = expmatch (s, l_strend, dummy)) != NIL) { - putKcp (s, strptr-1, TRUE); + if ((strptr = expmatch(s, l_strend, dummy)) != NULL) { + putKcp(s, strptr-1, true); s = strptr; - instr = FALSE; + instr = false; continue; } else { - putKcp (s, s+strlen(s)-1, TRUE); + putKcp(s, s+strlen(s)-1, true); s = s + strlen(s); continue; } /* check for end of character string */ } else if (inchr) { - if ((chrptr = expmatch (s, l_chrend, dummy)) != NIL) { - putKcp (s, chrptr-1, TRUE); + if ((chrptr = expmatch(s, l_chrend, dummy)) != NULL) { + putKcp(s, chrptr-1, true); s = chrptr; - inchr = FALSE; + inchr = false; continue; } else { - putKcp (s, s+strlen(s)-1, TRUE); + putKcp(s, s+strlen(s)-1, true); s = s + strlen(s); continue; } } /* print out the line */ - putKcp (s, s + strlen(s) -1, FALSE); + putKcp(s, s + strlen(s) -1, false); s = s + strlen(s); } while (*s); } +/* + * start: start of string to write + * end: end of string to write + * force: true if we should force nokeyw + */ static void -putKcp (start, end, force) - char *start; /* start of string to write */ - char *end; /* end of string to write */ - boolean force; /* true if we should force nokeyw */ +putKcp(char *start, char *end, bool force) { int i; int xfld = 0; @@ -587,22 +586,20 @@ putKcp (start, end, force) } } - putcp ((unsigned char)*start++); + putcp((unsigned char)*start++); } } static int -tabs(s, os) - char *s, *os; +tabs(char *s, char *os) { return (width(s, os) / 8); } static int -width(s, os) - register char *s, *os; +width(register char *s, register char *os) { register int i = 0; @@ -622,8 +619,7 @@ width(s, os) } static void -putcp(c) - register int c; +putcp(register int c) { switch(c) { @@ -689,16 +685,15 @@ putcp(c) /* * look for a process beginning on this line */ -static boolean -isproc(s) - char *s; +static bool +isproc(char *s) { pname[0] = '\0'; if (!l_toplex || blklevel == 0) - if (expmatch (s, l_prcbeg, pname) != NIL) { - return (TRUE); + if (expmatch(s, l_prcbeg, pname) != NULL) { + return (true); } - return (FALSE); + return (false); } @@ -706,8 +701,7 @@ isproc(s) */ static int -iskw(s) - register char *s; +iskw(register char *s) { register char **ss = l_keywds; register int i = 1; @@ -720,4 +714,3 @@ iskw(s) return (i); return (0); } - Modified: stable/10/usr.bin/vgrind/vgrindefs.c ============================================================================== --- stable/10/usr.bin/vgrind/vgrindefs.c Fri May 15 08:45:55 2015 (r282949) +++ stable/10/usr.bin/vgrind/vgrindefs.c Fri May 15 08:53:52 2015 (r282950) @@ -55,30 +55,30 @@ __FBSDID("$FreeBSD$"); static char *tbuf; static char *filename; static int hopcount; /* detect infinite loops in termcap, init 0 */ -char *tskip(); -char *tgetstr(); -char *tdecode(); -char *getenv(); + +static int tnchktc(void); +static int tnamatch(char *); +static char *tskip(register char *); +static char *tdecode(register char *, char **); /* * Get an entry for terminal name in buffer bp, * from the termcap file. Parse is very rudimentary; * we just notice escaped newlines. */ -tgetent(bp, name, file) - char *bp, *name, *file; +int +tgetent(char *bp, char *name, char *file) { register char *cp; register int c; register int i = 0, cnt = 0; char ibuf[BUFSIZ]; - char *cp2; int tf; tbuf = bp; tf = 0; filename = file; - tf = open(filename, 0); + tf = open(filename, O_RDONLY); if (tf < 0) return (-1); for (;;) { @@ -125,7 +125,8 @@ tgetent(bp, name, file) * entries to say "like an HP2621 but doesn't turn on the labels". * Note that this works because of the left to right scan. */ -tnchktc() +static int +tnchktc(void) { register char *p, *q; char tcname[16]; /* name of similar terminal */ @@ -143,7 +144,7 @@ tnchktc() /* p now points to beginning of last field */ if (p[0] != 't' || p[1] != 'c') return(1); - strcpy(tcname,p+3); + strlcpy(tcname, p+3, 16); q = tcname; while (q && *q != ':') q++; @@ -161,7 +162,7 @@ tnchktc() write(STDERR_FILENO, "Vgrind entry too long\n", 23); q[BUFSIZ - (p-tbuf)] = 0; } - strcpy(p, q+1); + strlcpy(p, q+1, BUFSIZ - (p - holdtbuf)); tbuf = holdtbuf; return(1); } @@ -172,8 +173,8 @@ tnchktc() * against each such name. The normal : terminator after the last * name (before the first field) stops us. */ -tnamatch(np) - char *np; +static int +tnamatch(char *np) { register char *Np, *Bp; @@ -199,8 +200,7 @@ tnamatch(np) * into the termcap file in octal. */ static char * -tskip(bp) - register char *bp; +tskip(register char *bp) { while (*bp && *bp != ':') @@ -218,8 +218,8 @@ tskip(bp) * a # character. If the option is not found we return -1. * Note that we handle octal numbers beginning with 0. */ -tgetnum(id) - char *id; +int +tgetnum(char *id) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri May 15 09:00:21 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6CD6754; Fri, 15 May 2015 09:00:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 9305E1D70; Fri, 15 May 2015 09:00:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F90L7U008547; Fri, 15 May 2015 09:00:21 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F90LBa008545; Fri, 15 May 2015 09:00:21 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505150900.t4F90LBa008545@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 15 May 2015 09:00:21 +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: r282951 - stable/10/usr.bin/checknr 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 09:00:21 -0000 Author: bapt Date: Fri May 15 09:00:20 2015 New Revision: 282951 URL: https://svnweb.freebsd.org/changeset/base/282951 Log: MFC: r282437, r282438, r282439, r282462, r282463, r282464, r282466, r282467, r282468, r282609 Update the list of known roff commands (both from NetBSD and heirloom doctools) Improve memory checking Remove limitation on input lines by using getline(3) Modified: stable/10/usr.bin/checknr/checknr.1 stable/10/usr.bin/checknr/checknr.c Modified: stable/10/usr.bin/checknr/checknr.1 ============================================================================== --- stable/10/usr.bin/checknr/checknr.1 Fri May 15 08:53:52 2015 (r282950) +++ stable/10/usr.bin/checknr/checknr.1 Fri May 15 09:00:20 2015 (r282951) @@ -28,7 +28,7 @@ .\" @(#)checknr.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 26, 2005 +.Dd May 5, 2015 .Dt CHECKNR 1 .Os .Sh NAME @@ -157,7 +157,3 @@ There is no way to define a 1 character .Pp Does not correctly recognize certain reasonable constructs, such as conditionals. -.Pp -Input lines are limited to -.Dv LINE_MAX -(2048) bytes in length. Modified: stable/10/usr.bin/checknr/checknr.c ============================================================================== --- stable/10/usr.bin/checknr/checknr.c Fri May 15 08:53:52 2015 (r282950) +++ stable/10/usr.bin/checknr/checknr.c Fri May 15 09:00:20 2015 (r282951) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); * structured typesetting. */ #include +#define _WITH_GETLINE #include #include #include @@ -57,7 +58,7 @@ __FBSDID("$FreeBSD$"); #define MAXSTK 100 /* Stack size */ #define MAXBR 100 /* Max number of bracket pairs known */ -#define MAXCMDS 500 /* Max number of commands known */ +#define MAXCMDS 600 /* Max number of commands known */ static void addcmd(char *); static void addmac(const char *); @@ -133,6 +134,19 @@ static struct brstr { {"(q", ")q"}, {"(x", ")x"}, {"(z", ")z"}, + /* The -mdoc package */ + {"Ao", "Ac"}, + {"Bd", "Ed"}, + {"Bk", "Ek"}, + {"Bo", "Bc"}, + {"Do", "Dc"}, + {"Fo", "Fc"}, + {"Oo", "Oc"}, + {"Po", "Pc"}, + {"Qo", "Qc"}, + {"Rs", "Re"}, + {"So", "Sc"}, + {"Xo", "Xc"}, /* Things needed by preprocessors */ {"EQ", "EN"}, {"TS", "TE"}, @@ -146,37 +160,47 @@ static struct brstr { * Used so we can complain about unrecognized commands. */ static const char *knowncmds[MAXCMDS] = { -"$c", "$f", "$h", "$p", "$s", "(b", "(c", "(d", "(f", "(l", "(q", "(t", -"(x", "(z", ")b", ")c", ")d", ")f", ")l", ")q", ")t", ")x", ")z", "++", -"+c", "1C", "1c", "2C", "2c", "@(", "@)", "@C", "@D", "@F", "@I", "@M", -"@c", "@e", "@f", "@h", "@m", "@n", "@o", "@p", "@r", "@t", "@z", "AB", -"AE", "AF", "AI", "AL", "AM", "AS", "AT", "AU", "AX", "B", "B1", "B2", -"BD", "BE", "BG", "BL", "BS", "BT", "BX", "C1", "C2", "CD", "CM", "CT", -"D", "DA", "DE", "DF", "DL", "DS", "DT", "EC", "EF", "EG", "EH", "EM", -"EN", "EQ", "EX", "FA", "FD", "FE", "FG", "FJ", "FK", "FL", "FN", "FO", -"FQ", "FS", "FV", "FX", "H", "HC", "HD", "HM", "HO", "HU", "I", "ID", -"IE", "IH", "IM", "IP", "IX", "IZ", "KD", "KE", "KF", "KQ", "KS", "LB", -"LC", "LD", "LE", "LG", "LI", "LP", "MC", "ME", "MF", "MH", "ML", "MR", -"MT", "ND", "NE", "NH", "NL", "NP", "NS", "OF", "OH", "OK", "OP", "P", -"P1", "PF", "PH", "PP", "PT", "PX", "PY", "QE", "QP", "QS", "R", "RA", -"RC", "RE", "RL", "RP", "RQ", "RS", "RT", "S", "S0", "S2", "S3", "SA", -"SG", "SH", "SK", "SM", "SP", "SY", "T&", "TA", "TB", "TC", "TD", "TE", -"TH", "TL", "TM", "TP", "TQ", "TR", "TS", "TX", "UL", "US", "UX", "VL", -"WC", "WH", "XA", "XD", "XE", "XF", "XK", "XP", "XS", "[", "[-", "[0", -"[1", "[2", "[3", "[4", "[5", "[<", "[>", "[]", "]", "]-", "]<", "]>", -"][", "ab", "ac", "ad", "af", "am", "ar", "as", "b", "ba", "bc", "bd", -"bi", "bl", "bp", "br", "bx", "c.", "c2", "cc", "ce", "cf", "ch", "cs", -"ct", "cu", "da", "de", "di", "dl", "dn", "ds", "dt", "dw", "dy", "ec", -"ef", "eh", "el", "em", "eo", "ep", "ev", "ex", "fc", "fi", "fl", "fo", -"fp", "ft", "fz", "hc", "he", "hl", "hp", "ht", "hw", "hx", "hy", "i", -"ie", "if", "ig", "in", "ip", "it", "ix", "lc", "lg", "li", "ll", "ln", -"lo", "lp", "ls", "lt", "m1", "m2", "m3", "m4", "mc", "mk", "mo", "n1", -"n2", "na", "ne", "nf", "nh", "nl", "nm", "nn", "np", "nr", "ns", "nx", -"of", "oh", "os", "pa", "pc", "pi", "pl", "pm", "pn", "po", "pp", "ps", -"q", "r", "rb", "rd", "re", "rm", "rn", "ro", "rr", "rs", "rt", "sb", -"sc", "sh", "sk", "so", "sp", "ss", "st", "sv", "sz", "ta", "tc", "th", -"ti", "tl", "tm", "tp", "tr", "u", "uf", "uh", "ul", "vs", "wh", "xp", -"yr", 0 +"$c", "$f", "$h", "$p", "$s", "%A", "%B", "%C", "%D", "%I", "%J", "%N", "%O", +"%P", "%Q", "%R", "%T", "%V", "(b", "(c", "(d", "(f", "(l", "(q", "(t", "(x", +"(z", ")b", ")c", ")d", ")f", ")l", ")q", ")t", ")x", ")z", "++", "+c", "1C", +"1c", "2C", "2c", "@(", "@)", "@C", "@D", "@F", "@I", "@M", "@c", "@e", "@f", +"@h", "@m", "@n", "@o", "@p", "@r", "@t", "@z", "AB", "AE", "AF", "AI", "AL", +"AM", "AS", "AT", "AU", "AX", "Ac", "Ad", "An", "Ao", "Ap", "Aq", "Ar", "At", +"B", "B" , "B1", "B2", "BD", "BE", "BG", "BL", "BS", "BT", "BX", "Bc", "Bd", +"Bf", "Bk", "Bl", "Bo", "Bq", "Bsx", "Bx", "C1", "C2", "CD", "CM", "CT", "Cd", +"Cm", "D", "D" , "D1", "DA", "DE", "DF", "DL", "DS", "DT", "Db", "Dc", "Dd", +"Dl", "Do", "Dq", "Dt", "Dv", "EC", "EF", "EG", "EH", "EM", "EN", "EQ", "EX", +"Ec", "Ed", "Ef", "Ek", "El", "Em", "Eo", "Er", "Ev", "FA", "FD", "FE", "FG", +"FJ", "FK", "FL", "FN", "FO", "FQ", "FS", "FV", "FX", "Fa", "Fc", "Fd", "Fl", +"Fn", "Fo", "Ft", "Fx", "H", "H" , "HC", "HD", "HM", "HO", "HU", "I", "I" , +"ID", "IE", "IH", "IM", "IP", "IX", "IZ", "Ic", "In", "It", "KD", "KE", "KF", +"KQ", "KS", "LB", "LC", "LD", "LE", "LG", "LI", "LP", "Lb", "Li", "MC", "ME", +"MF", "MH", "ML", "MR", "MT", "ND", "NE", "NH", "NL", "NP", "NS", "Nd", "Nm", +"No", "Ns", "Nx", "OF", "OH", "OK", "OP", "Oc", "Oo", "Op", "Os", "Ot", "Ox", +"P", "P" , "P1", "PF", "PH", "PP", "PT", "PX", "PY", "Pa", "Pc", "Pf", "Po", +"Pp", "Pq", "QE", "QP", "QS", "Qc", "Ql", "Qo", "Qq", "R", "R" , "RA", "RC", +"RE", "RL", "RP", "RQ", "RS", "RT", "Re", "Rs", "S", "S" , "S0", "S2", "S3", +"SA", "SG", "SH", "SK", "SM", "SP", "SY", "Sc", "Sh", "Sm", "So", "Sq", "Ss", +"St", "Sx", "Sy", "T&", "TA", "TB", "TC", "TD", "TE", "TH", "TL", "TM", "TP", +"TQ", "TR", "TS", "TX", "Tn", "UL", "US", "UX", "Ud", "Ux", "VL", "Va", "Vt", +"WC", "WH", "XA", "XD", "XE", "XF", "XK", "XP", "XS", "Xc", "Xo", "Xr", "[", +"[" , "[-", "[0", "[1", "[2", "[3", "[4", "[5", "[<", "[>", "[]", "\\{", "\\}", +"]", "]" , "]-", "]<", "]>", "][", "ab", "ac", "ad", "af", "am", "ar", "as", +"b", "b" , "ba", "bc", "bd", "bi", "bl", "bp", "br", "bx", "c.", "c2", "cc", +"ce", "cf", "ch", "chop", "cs", "ct", "cu", "da", "de", "di", "dl", "dn", "do", +"ds", "dt", "dw", "dy", "ec", "ef", "eh", "el", "em", "eo", "ep", "ev", "evc", +"ex", "fallback", "fc", "feature", "fi", "fl", "flig", "fo", "fp", "ft", "ftr", +"fz", "fzoom", "hc", "he", "hidechar", "hl", "hp", "ht", "hw", "hx", "hy", +"hylang", "i", "i" , "ie", "if", "ig", "in", "ip", "it", "ix", "kern", +"kernafter", "kernbefore", "kernpair", "lc", "lc_ctype", "lg", "lhang", "li", +"ll", "ln", "lo", "lp", "ls", "lt", "m1", "m2", "m3", "m4", "mc", "mk", "mo", +"n1", "n2", "na", "ne", "nf", "nh", "nl", "nm", "nn", "np", "nr", "ns", "nx", +"of", "oh", "os", "pa", "papersize", "pc", "pi", "pl", "pm", "pn", "po", "pp", +"ps", "q", "q" , "r", "r" , "rb", "rd", "re", "recursionlimit", "return", +"rhang", "rm", "rn", "ro", "rr", "rs", "rt", "sb", "sc", "sh", "shift", "sk", +"so", "sp", "ss", "st", "sv", "sz", "ta", "tc", "th", "ti", "tl", "tm", "tp", +"tr", "track", "u", "uf", "uh", "ul", "vs", "wh", "xflag", "xp", "yr", +0 }; static int lineno; /* current line number in input file */ @@ -210,8 +234,18 @@ main(int argc, char **argv) for (i=0; br[i].opbr; i++) ; for (cp=argv[1]+3; cp[-1]; cp += 6) { - br[i].opbr = strncpy(malloc(3), cp, 2); - br[i].clbr = strncpy(malloc(3), cp+3, 2); + char *tmp; + + if (i >= MAXBR) + errx(1, "too many pairs"); + if ((tmp = malloc(3)) == NULL) + err(1, "malloc"); + strlcpy(tmp, cp, 3); + br[i].opbr = tmp; + if ((tmp = malloc(3)) == NULL) + err(1, "malloc"); + strlcpy(tmp, cp+3, 3); + br[i].clbr = tmp; addmac(br[i].opbr); /* knows pairs are also known cmds */ addmac(br[i].clbr); i++; @@ -250,7 +284,7 @@ main(int argc, char **argv) nfiles = argc - 1; if (nfiles > 0) { - for (i=1; i 0; lineno++) { if (line[0] == '.') { /* * find and isolate the macro/command name. @@ -320,9 +357,9 @@ process(FILE *f) * At this point we process the line looking * for \s and \f. */ - for (i=0; line[i]; i++) - if (line[i]=='\\' && (i==0 || line[i-1]!='\\')) { - if (!sflag && line[++i]=='s') { + for (i = 0; line[i]; i++) + if (line[i] == '\\' && (i == 0 || line[i-1] != '\\')) { + if (!sflag && line[++i] == 's') { pl = line[++i]; if (isdigit(pl)) { n = pl - '0'; @@ -333,7 +370,8 @@ process(FILE *f) n = 10 * n + line[i] - '0'; i--; if (n == 0) { - if (stk[stktop].opno == SZ) { + if (stktop >= 0 && + stk[stktop].opno == SZ) { stktop--; } else { pe(lineno); @@ -345,10 +383,11 @@ process(FILE *f) stk[stktop].parm = n; stk[stktop].lno = lineno; } - } else if (!fflag && line[i]=='f') { + } else if (!fflag && line[i] == 'f') { n = line[++i]; if (n == 'P') { - if (stk[stktop].opno == FT) { + if (stktop >= 0 && + stk[stktop].opno == FT) { stktop--; } else { pe(lineno); @@ -363,11 +402,12 @@ process(FILE *f) } } } + free(line); /* * We've hit the end and look at all this stuff that hasn't been * matched yet! Complain, complain. */ - for (i=stktop; i>=0; i--) { + for (i = stktop; i >= 0; i--) { complain(i); } } @@ -395,7 +435,8 @@ prop(int i) break; default: printf("Bug: stk[%d].opno = %d = .%s, .%s", - i, stk[i].opno, br[stk[i].opno].opbr, br[stk[i].opno].clbr); + i, stk[i].opno, br[stk[i].opno].opbr, + br[stk[i].opno].clbr); } } @@ -557,17 +598,20 @@ addmac(const char *mac) } /* binsrch sets slot as a side effect */ #ifdef DEBUG -printf("binsrch(%s) -> %d\n", mac, slot); + printf("binsrch(%s) -> %d\n", mac, slot); #endif loc = &knowncmds[slot]; src = &knowncmds[ncmds-1]; dest = src+1; while (dest > loc) *dest-- = *src--; - *loc = strcpy(malloc(3), mac); + if ((*loc = strdup(mac)) == NULL) + err(1, "strdup"); ncmds++; #ifdef DEBUG -printf("after: %s %s %s %s %s, %d cmds\n", knowncmds[slot-2], knowncmds[slot-1], knowncmds[slot], knowncmds[slot+1], knowncmds[slot+2], ncmds); + printf("after: %s %s %s %s %s, %d cmds\n", + knowncmds[slot-2], knowncmds[slot-1], knowncmds[slot], + knowncmds[slot+1], knowncmds[slot+2], ncmds); #endif } @@ -592,12 +636,12 @@ binsrch(const char *mac) if (d == 0) d = p[1] - mac[1]; if (d == 0) - return mid; + return (mid); if (d < 0) bot = mid + 1; else top = mid - 1; } slot = bot; /* place it would have gone */ - return -1; + return (-1); } From owner-svn-src-stable@FreeBSD.ORG Fri May 15 09:57:01 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B37CEA3; Fri, 15 May 2015 09:57:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 ED17113A1; Fri, 15 May 2015 09:57:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4F9v047037283; Fri, 15 May 2015 09:57:00 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4F9v0I5037280; Fri, 15 May 2015 09:57:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505150957.t4F9v0I5037280@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 09:57: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: r282952 - in stable/10: usr.bin/man usr.sbin/bhyve 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 09:57:01 -0000 Author: trasz Date: Fri May 15 09:56:59 2015 New Revision: 282952 URL: https://svnweb.freebsd.org/changeset/base/282952 Log: MFC r274720: Fix improper .Fx macro usage. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/man/man.1 stable/10/usr.sbin/bhyve/bhyve.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/man/man.1 ============================================================================== --- stable/10/usr.bin/man/man.1 Fri May 15 09:00:20 2015 (r282951) +++ stable/10/usr.bin/man/man.1 Fri May 15 09:56:59 2015 (r282952) @@ -61,23 +61,32 @@ restricts the search to the specific sec The sections of the manual are: .Bl -enum -offset indent -compact .It -.Fx General Commands Manual +.Fx +General Commands Manual .It -.Fx System Calls Manual +.Fx +System Calls Manual .It -.Fx Library Functions Manual +.Fx +Library Functions Manual .It -.Fx Kernel Interfaces Manual +.Fx +Kernel Interfaces Manual .It -.Fx File Formats Manual +.Fx +File Formats Manual .It -.Fx Games Manual +.Fx +Games Manual .It -.Fx Miscellaneous Information Manual +.Fx +Miscellaneous Information Manual .It -.Fx System Manager's Manual +.Fx +System Manager's Manual .It -.Fx Kernel Developer's Manual +.Fx +Kernel Developer's Manual .El .Pp Options that Modified: stable/10/usr.sbin/bhyve/bhyve.8 ============================================================================== --- stable/10/usr.sbin/bhyve/bhyve.8 Fri May 15 09:00:20 2015 (r282951) +++ stable/10/usr.sbin/bhyve/bhyve.8 Fri May 15 09:56:59 2015 (r282952) @@ -70,7 +70,8 @@ Required for guests. .It Fl b Enable a low-level console device supported by -.Fx kernels compiled with +.Fx +kernels compiled with .Cd "device bvmconsole" . This option will be deprecated in a future version. .It Fl c Ar numcpus From owner-svn-src-stable@FreeBSD.ORG Fri May 15 10:42:50 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7FD371A; Fri, 15 May 2015 10:42:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 D59E0188D; Fri, 15 May 2015 10:42:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FAgnLM061452; Fri, 15 May 2015 10:42:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FAgn6S061450; Fri, 15 May 2015 10:42:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151042.t4FAgn6S061450@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 10: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: r282953 - in stable/10: sbin/devd sys/geom 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 10:42:50 -0000 Author: trasz Date: Fri May 15 10:42:48 2015 New Revision: 282953 URL: https://svnweb.freebsd.org/changeset/base/282953 Log: MFC r277170: Add devd(8) notifications for creation and destruction of GEOM devices. Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/devd/devd.conf.5 stable/10/sys/geom/geom_dev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/devd/devd.conf.5 ============================================================================== --- stable/10/sbin/devd/devd.conf.5 Fri May 15 09:56:59 2015 (r282952) +++ stable/10/sbin/devd/devd.conf.5 Fri May 15 10:42:48 2015 (r282953) @@ -41,7 +41,7 @@ .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS .\" SOFTWARE. .\" -.Dd February 22, 2013 +.Dd January 14, 2015 .Dt DEVD.CONF 5 .Os .Sh NAME @@ -370,6 +370,33 @@ node is destroyed. .El .El .Pp +.It Li GEOM +Events related to the +.Xr geom 4 +framework. +The difference compared to +.Li DEVFS +is that +.Li GEOM +only includes disk-like devices. +.Bl -tag -width ".Sy Subsystem" -compact +.It Sy Subsystem +.It Li DEV +.Bl -tag -width ".Li MEDIACHANGE" -compact +.It Sy Type +.It Li CREATE +A +.Xr geom 4 +device node is created. +.It Li DESTROY +A +.Xr geom 4 +device node is destroyed. +.It Li MEDIACHANGE +Physical media has changed. +.El +.El +.Pp .It Li USB Events related to the USB subsystem. .Bl -tag -width ".Sy Subsystem" -compact Modified: stable/10/sys/geom/geom_dev.c ============================================================================== --- stable/10/sys/geom/geom_dev.c Fri May 15 09:56:59 2015 (r282952) +++ stable/10/sys/geom/geom_dev.c Fri May 15 10:42:48 2015 (r282953) @@ -169,12 +169,15 @@ g_dev_destroy(void *arg, int flags __unu struct g_consumer *cp; struct g_geom *gp; struct g_dev_softc *sc; + char buf[SPECNAMELEN + 6]; g_topology_assert(); cp = arg; gp = cp->geom; sc = cp->private; g_trace(G_T_TOPOLOGY, "g_dev_destroy(%p(%s))", cp, gp->name); + snprintf(buf, sizeof(buf), "cdev=%s", gp->name); + devctl_notify_f("GEOM", "DEV", "DESTROY", buf, M_WAITOK); if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) g_access(cp, -cp->acr, -cp->acw, -cp->ace); g_detach(cp); @@ -209,11 +212,14 @@ g_dev_attrchanged(struct g_consumer *cp, dev = sc->sc_dev; snprintf(buf, sizeof(buf), "cdev=%s", dev->si_name); devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, M_WAITOK); + devctl_notify_f("GEOM", "DEV", "MEDIACHANGE", buf, M_WAITOK); dev = sc->sc_alias; if (dev != NULL) { snprintf(buf, sizeof(buf), "cdev=%s", dev->si_name); devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, M_WAITOK); + devctl_notify_f("GEOM", "DEV", "MEDIACHANGE", buf, + M_WAITOK); } return; } @@ -269,7 +275,7 @@ g_dev_taste(struct g_class *mp, struct g struct g_dev_softc *sc; int error, len; struct cdev *dev, *adev; - char buf[64], *val; + char buf[SPECNAMELEN + 6], *val; g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); @@ -324,6 +330,8 @@ g_dev_taste(struct g_class *mp, struct g } g_dev_attrchanged(cp, "GEOM::physpath"); + snprintf(buf, sizeof(buf), "cdev=%s", gp->name); + devctl_notify_f("GEOM", "DEV", "CREATE", buf, M_WAITOK); return (gp); } From owner-svn-src-stable@FreeBSD.ORG Fri May 15 10:47:26 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E877A32; Fri, 15 May 2015 10:47:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 5D09318C7; Fri, 15 May 2015 10:47:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FAlQLU062304; Fri, 15 May 2015 10:47:26 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FAlQDF062303; Fri, 15 May 2015 10:47:26 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151047.t4FAlQDF062303@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 10:47:26 +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: r282954 - stable/10/sys/dev/iscsi 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 10:47:26 -0000 Author: trasz Date: Fri May 15 10:47:25 2015 New Revision: 282954 URL: https://svnweb.freebsd.org/changeset/base/282954 Log: MFC r278233: Fix error handling. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Fri May 15 10:42:48 2015 (r282953) +++ stable/10/sys/dev/iscsi/iscsi.c Fri May 15 10:47:25 2015 (r282954) @@ -1754,15 +1754,17 @@ iscsi_ioctl_session_add(struct iscsi_sof arc4rand(&is->is_isid[1], 5, 0); is->is_tsih = 0; callout_init(&is->is_callout, 1); - callout_reset(&is->is_callout, 1 * hz, iscsi_callout, is); - TAILQ_INSERT_TAIL(&sc->sc_sessions, is, is_next); error = kthread_add(iscsi_maintenance_thread, is, NULL, NULL, 0, 0, "iscsimt"); if (error != 0) { ISCSI_SESSION_WARN(is, "kthread_add(9) failed with error %d", error); + sx_xunlock(&sc->sc_lock); return (error); } + callout_reset(&is->is_callout, 1 * hz, iscsi_callout, is); + TAILQ_INSERT_TAIL(&sc->sc_sessions, is, is_next); + /* * Trigger immediate reconnection. */ From owner-svn-src-stable@FreeBSD.ORG Fri May 15 10:50:59 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 845A7BD6; Fri, 15 May 2015 10:50:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 731CF1984; Fri, 15 May 2015 10:50:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FAoxi3066382; Fri, 15 May 2015 10:50:59 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FAoxxr066381; Fri, 15 May 2015 10:50:59 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151050.t4FAoxxr066381@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 10:50: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: r282955 - stable/10/sys/dev/iscsi 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 10:50:59 -0000 Author: trasz Date: Fri May 15 10:50:58 2015 New Revision: 282955 URL: https://svnweb.freebsd.org/changeset/base/282955 Log: MFC r278237: Don't call callout_drain() with iscsi mutex held; this fixes a warning that was introduced recently. While here, don't try to access is_terminating without lock. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Fri May 15 10:47:25 2015 (r282954) +++ stable/10/sys/dev/iscsi/iscsi.c Fri May 15 10:50:58 2015 (r282955) @@ -425,6 +425,7 @@ iscsi_maintenance_thread_terminate(struc sx_xunlock(&sc->sc_lock); icl_conn_close(is->is_conn); + callout_drain(&is->is_callout); ISCSI_SESSION_LOCK(is); @@ -438,8 +439,6 @@ iscsi_maintenance_thread_terminate(struc cv_signal(&is->is_login_cv); #endif - callout_drain(&is->is_callout); - iscsi_session_cleanup(is, true); KASSERT(TAILQ_EMPTY(&is->is_outstanding), @@ -515,6 +514,7 @@ iscsi_session_reconnect(struct iscsi_ses static void iscsi_session_terminate(struct iscsi_session *is) { + if (is->is_terminating) return; @@ -536,12 +536,14 @@ iscsi_callout(void *context) is = context; - if (is->is_terminating) + ISCSI_SESSION_LOCK(is); + if (is->is_terminating) { + ISCSI_SESSION_UNLOCK(is); return; + } callout_schedule(&is->is_callout, 1 * hz); - ISCSI_SESSION_LOCK(is); is->is_timeout++; if (is->is_waiting_for_iscsid) { From owner-svn-src-stable@FreeBSD.ORG Fri May 15 10:53:07 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A454D3E; Fri, 15 May 2015 10:53:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 5920B19E6; Fri, 15 May 2015 10:53:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FAr7op066721; Fri, 15 May 2015 10:53:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FAr7jc066720; Fri, 15 May 2015 10:53:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151053.t4FAr7jc066720@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 10:53:07 +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: r282956 - stable/10/usr.sbin/ctladm 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 10:53:07 -0000 Author: trasz Date: Fri May 15 10:53:06 2015 New Revision: 282956 URL: https://svnweb.freebsd.org/changeset/base/282956 Log: MFC r278316: Make "ctladm islist" ignore unknown elements, so the old version continues to work with newer kernel. Other ctladm(8) "*list" subcommands seem to already handle it in a reasonable way. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/ctladm/ctladm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.c Fri May 15 10:50:58 2015 (r282955) +++ stable/10/usr.sbin/ctladm/ctladm.c Fri May 15 10:53:06 2015 (r282956) @@ -3559,8 +3559,12 @@ cctl_islist_end_element(void *user_data, } else if (strcmp(name, "connection") == 0) { islist->cur_conn = NULL; } else if (strcmp(name, "ctlislist") == 0) { - } else - errx(1, "unknown element %s", name); + /* Nothing. */ + } else { + /* + * Unknown element; ignore it for forward compatiblity. + */ + } free(str); } From owner-svn-src-stable@FreeBSD.ORG Fri May 15 10:54:41 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DB57F59; Fri, 15 May 2015 10:54:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2C2E019F7; Fri, 15 May 2015 10:54:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FAsfDK067099; Fri, 15 May 2015 10:54:41 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FAsf03067098; Fri, 15 May 2015 10:54:41 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151054.t4FAsf03067098@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 10:54:41 +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: r282957 - stable/10/lib/libc/sys 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 10:54:41 -0000 Author: trasz Date: Fri May 15 10:54:40 2015 New Revision: 282957 URL: https://svnweb.freebsd.org/changeset/base/282957 Log: MFC r278352: Remove useless comment. Sponsored by: The FreeBSD Foundation Modified: stable/10/lib/libc/sys/setresuid.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/setresuid.2 ============================================================================== --- stable/10/lib/libc/sys/setresuid.2 Fri May 15 10:53:06 2015 (r282956) +++ stable/10/lib/libc/sys/setresuid.2 Fri May 15 10:54:40 2015 (r282957) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 13, 2001 +.Dd February 7, 2015 .Dt SETRESUID 2 .Os .Sh NAME @@ -90,10 +90,5 @@ was invalid. .Xr setregid 2 , .Xr setreuid 2 , .Xr setuid 2 -.Sh STANDARDS -These system calls are not available on many platforms. -They exist in -.Fx -to support Linux binaries linked against GNU libc2. .Sh HISTORY These functions first appeared in HP-UX. From owner-svn-src-stable@FreeBSD.ORG Fri May 15 10:56:23 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1F93175; Fri, 15 May 2015 10:56:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B013C1A0D; Fri, 15 May 2015 10:56:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FAuNJs067432; Fri, 15 May 2015 10:56:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FAuNSa067429; Fri, 15 May 2015 10:56:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151056.t4FAuNSa067429@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 10:56:23 +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: r282958 - in stable/10/usr.sbin/bluetooth: hccontrol sdpcontrol 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 10:56:23 -0000 Author: trasz Date: Fri May 15 10:56:22 2015 New Revision: 282958 URL: https://svnweb.freebsd.org/changeset/base/282958 Log: MFC r278360: Make hccontrol(8) and sdpcontrol(8) appear in "man -k bluetooth" output. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/bluetooth/hccontrol/hccontrol.8 stable/10/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bluetooth/hccontrol/hccontrol.8 ============================================================================== --- stable/10/usr.sbin/bluetooth/hccontrol/hccontrol.8 Fri May 15 10:54:40 2015 (r282957) +++ stable/10/usr.sbin/bluetooth/hccontrol/hccontrol.8 Fri May 15 10:56:22 2015 (r282958) @@ -25,12 +25,12 @@ .\" $Id: hccontrol.8,v 1.6 2003/08/06 21:26:38 max Exp $ .\" $FreeBSD$ .\" -.Dd June 14, 2002 +.Dd February 7, 2015 .Dt HCCONTROL 8 .Os .Sh NAME .Nm hccontrol -.Nd HCI configuration utility +.Nd Bluetooth HCI configuration utility .Sh SYNOPSIS .Nm .Op Fl hN Modified: stable/10/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8 ============================================================================== --- stable/10/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8 Fri May 15 10:54:40 2015 (r282957) +++ stable/10/usr.sbin/bluetooth/sdpcontrol/sdpcontrol.8 Fri May 15 10:56:22 2015 (r282958) @@ -25,12 +25,12 @@ .\" $Id: sdpcontrol.8,v 1.1 2003/09/08 02:27:27 max Exp $ .\" $FreeBSD$ .\" -.Dd September 7, 2003 +.Dd February 7, 2015 .Dt SDPCONTROL 8 .Os .Sh NAME .Nm sdpcontrol -.Nd SDP query utility +.Nd Bluetooth Service Discovery Protocol query utility .Sh SYNOPSIS .Nm .Fl h From owner-svn-src-stable@FreeBSD.ORG Fri May 15 11:00:13 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30C1A304; Fri, 15 May 2015 11:00:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 1F5411A3E; Fri, 15 May 2015 11:00:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FB0C8w068100; Fri, 15 May 2015 11:00:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FB0C8k068099; Fri, 15 May 2015 11:00:12 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151100.t4FB0C8k068099@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 11:00: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: r282959 - stable/10/sbin/mount_fusefs 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 11:00:13 -0000 Author: trasz Date: Fri May 15 11:00:12 2015 New Revision: 282959 URL: https://svnweb.freebsd.org/changeset/base/282959 Log: MFC r279489: Make the "automounted" flag work for FUSE filesystems. PR: 192852 Submitted by: taku at tackymt.homeip.net (earlier version) Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mount_fusefs/mount_fusefs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount_fusefs/mount_fusefs.c ============================================================================== --- stable/10/sbin/mount_fusefs/mount_fusefs.c Fri May 15 10:56:22 2015 (r282958) +++ stable/10/sbin/mount_fusefs/mount_fusefs.c Fri May 15 11:00:12 2015 (r282959) @@ -73,6 +73,13 @@ static struct mntopt mopts[] = { { "subtype=", 0, ALTF_SUBTYPE, 1 }, #define ALTF_SYNC_UNMOUNT 0x80 { "sync_unmount", 0, ALTF_SYNC_UNMOUNT, 1 }, + /* + * MOPT_AUTOMOUNTED, included by MOPT_STDOPTS, does not fit into + * the 'flags' argument to nmount(2). We have to abuse altflags + * to pass it, as string, via iovec. + */ + #define ALTF_AUTOMOUNTED 0x100 + { "automounted", 0, ALTF_AUTOMOUNTED, 1 }, /* Linux specific options, we silently ignore them */ { "fsname=", 0, 0x00, 1 }, { "fd=", 0, 0x00, 1 }, From owner-svn-src-stable@FreeBSD.ORG Fri May 15 11:03:20 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8872471; Fri, 15 May 2015 11:03:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 8A7071B01; Fri, 15 May 2015 11:03:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FB3KTX072116; Fri, 15 May 2015 11:03:20 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FB3JeS072113; Fri, 15 May 2015 11:03:19 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151103.t4FB3JeS072113@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 11:03: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: r282960 - stable/10/sys/fs/fuse 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 11:03:20 -0000 Author: trasz Date: Fri May 15 11:03:19 2015 New Revision: 282960 URL: https://svnweb.freebsd.org/changeset/base/282960 Log: MFC r279536: Make fuse(4) respect FOPEN_DIRECT_IO. This is required for correct operation of GlusterFS. PR: 192701 Submitted by: harsha at harshavardhana.net Reviewed by: kib@ Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/fuse/fuse_node.c stable/10/sys/fs/fuse/fuse_node.h stable/10/sys/fs/fuse/fuse_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/fuse/fuse_node.c ============================================================================== --- stable/10/sys/fs/fuse/fuse_node.c Fri May 15 11:00:12 2015 (r282959) +++ stable/10/sys/fs/fuse/fuse_node.c Fri May 15 11:03:19 2015 (r282960) @@ -273,8 +273,26 @@ fuse_vnode_open(struct vnode *vp, int32_ * Funcation is called for every vnode open. * Merge fuse_open_flags it may be 0 * - * XXXIP: Handle FOPEN_DIRECT_IO and FOPEN_KEEP_CACHE + * XXXIP: Handle FOPEN_KEEP_CACHE */ + /* + * Ideally speaking, direct io should be enabled on + * fd's but do not see of any way of providing that + * this implementation. + + * Also cannot think of a reason why would two + * different fd's on same vnode would like + * have DIRECT_IO turned on and off. But linux + * based implementation works on an fd not an + * inode and provides such a feature. + * + * XXXIP: Handle fd based DIRECT_IO + */ + if (fuse_open_flags & FOPEN_DIRECT_IO) { + VTOFUD(vp)->flag |= FN_DIRECTIO; + } else { + VTOFUD(vp)->flag &= ~FN_DIRECTIO; + } if (vnode_vtype(vp) == VREG) { /* XXXIP prevent getattr, by using cached node size */ Modified: stable/10/sys/fs/fuse/fuse_node.h ============================================================================== --- stable/10/sys/fs/fuse/fuse_node.h Fri May 15 11:00:12 2015 (r282959) +++ stable/10/sys/fs/fuse/fuse_node.h Fri May 15 11:03:19 2015 (r282960) @@ -67,6 +67,7 @@ #define FN_FLUSHINPROG 0x00000040 #define FN_FLUSHWANT 0x00000080 #define FN_SIZECHANGE 0x00000100 +#define FN_DIRECTIO 0x00000200 struct fuse_vnode_data { /** self **/ Modified: stable/10/sys/fs/fuse/fuse_vnops.c ============================================================================== --- stable/10/sys/fs/fuse/fuse_vnops.c Fri May 15 11:00:12 2015 (r282959) +++ stable/10/sys/fs/fuse/fuse_vnops.c Fri May 15 11:03:19 2015 (r282960) @@ -1173,6 +1173,11 @@ fuse_vnop_read(struct vop_read_args *ap) if (fuse_isdeadfs(vp)) { return ENXIO; } + + if (VTOFUD(vp)->flag & FN_DIRECTIO) { + ioflag |= IO_DIRECT; + } + return fuse_io_dispatch(vp, uio, ioflag, cred); } @@ -1712,6 +1717,10 @@ fuse_vnop_write(struct vop_write_args *a } fuse_vnode_refreshsize(vp, cred); + if (VTOFUD(vp)->flag & FN_DIRECTIO) { + ioflag |= IO_DIRECT; + } + return fuse_io_dispatch(vp, uio, ioflag, cred); } From owner-svn-src-stable@FreeBSD.ORG Fri May 15 11:06:11 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AEB6606; Fri, 15 May 2015 11:06:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 198791B29; Fri, 15 May 2015 11:06:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FB6A6g072577; Fri, 15 May 2015 11:06:10 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FB6AXG072576; Fri, 15 May 2015 11:06:10 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151106.t4FB6AXG072576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 11:06: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: r282961 - stable/10/etc/autofs 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 11:06:11 -0000 Author: trasz Date: Fri May 15 11:06:10 2015 New Revision: 282961 URL: https://svnweb.freebsd.org/changeset/base/282961 Log: MFC r280321: Make the autofs LDAP script cope with server returning entries with ENTRY_ATTRIBUTE (eg cn) after the VALUE_ATTRIBUTE (eg automountInformation), instead of before. PR: 198557 Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/autofs/include_ldap Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/autofs/include_ldap ============================================================================== --- stable/10/etc/autofs/include_ldap Fri May 15 11:03:19 2015 (r282960) +++ stable/10/etc/autofs/include_ldap Fri May 15 11:06:10 2015 (r282961) @@ -15,24 +15,41 @@ $1 == "'$ENTRY_ATTRIBUTE':" { key = $2 } -$1 == "'$VALUE_ATTRIBUTE':" && key { - printf "%s%s", key, OFS - key = "" - for (i=2; i 0 { printf "%s%s", key, OFS - key = "" - for (i=2; i Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A39F753; Fri, 15 May 2015 11:07:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 08FDD1B40; Fri, 15 May 2015 11:07:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FB7nWd072847; Fri, 15 May 2015 11:07:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FB7nS6072846; Fri, 15 May 2015 11:07:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151107.t4FB7nS6072846@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 11:07: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: r282962 - stable/10/lib/libc/sys 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 11:07:50 -0000 Author: trasz Date: Fri May 15 11:07:49 2015 New Revision: 282962 URL: https://svnweb.freebsd.org/changeset/base/282962 Log: MFC r280983: Update open(2) to make it more obvious that O_NOCTTY and O_TTY_INIT are ignored. Sponsored by: The FreeBSD Foundation Modified: stable/10/lib/libc/sys/open.2 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/open.2 ============================================================================== --- stable/10/lib/libc/sys/open.2 Fri May 15 11:06:10 2015 (r282961) +++ stable/10/lib/libc/sys/open.2 Fri May 15 11:07:49 2015 (r282962) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd February 7, 2013 +.Dd April 2, 2015 .Dt OPEN 2 .Os .Sh NAME @@ -115,8 +115,8 @@ O_DIRECT eliminate or reduce cache effec O_FSYNC synchronous writes O_SYNC synchronous writes O_NOFOLLOW do not follow symlinks -O_NOCTTY don't assign controlling terminal -O_TTY_INIT restore default terminal attributes +O_NOCTTY ignored +O_TTY_INIT ignored O_DIRECTORY error if file is not a directory O_CLOEXEC set FD_CLOEXEC upon open .Ed From owner-svn-src-stable@FreeBSD.ORG Fri May 15 11:10:02 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D70C8C7; Fri, 15 May 2015 11:10:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 F028C1B78; Fri, 15 May 2015 11:10:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FBA1pr073248; Fri, 15 May 2015 11:10:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FBA1Jt073247; Fri, 15 May 2015 11:10:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151110.t4FBA1Jt073247@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 11:10:01 +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: r282963 - stable/10/share/man/man4 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 11:10:02 -0000 Author: trasz Date: Fri May 15 11:10:01 2015 New Revision: 282963 URL: https://svnweb.freebsd.org/changeset/base/282963 Log: MFC r281265: Add a hint that "device ctl" kind of depends on "device iscsi". It actually doesn't - "device ctl" automatically pulls in ICL, which would normally be a part of iscsi.ko. However, doing it that way makes iscsi.ko unloadable, and building ctl.ko without iscsi.ko (using MODULES_OVERRIDE) results in ctl.ko that is unloadable, due to missing symbols that would be resolved to iscsi.ko. And since the symbols are named "icl_whatever", it's not obvious that it's iscsi.ko that's required. If there is a better way - let me know. Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man4/ctl.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/ctl.4 ============================================================================== --- stable/10/share/man/man4/ctl.4 Fri May 15 11:07:49 2015 (r282962) +++ stable/10/share/man/man4/ctl.4 Fri May 15 11:10:01 2015 (r282963) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd October 23, 2014 +.Dd April 8, 2015 .Dt CTL 4 .Os .Sh NAME @@ -34,6 +34,7 @@ To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent +.Cd "device iscsi" .Cd "device ctl" .Ed .Pp From owner-svn-src-stable@FreeBSD.ORG Fri May 15 12:07:45 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C77C5F2; Fri, 15 May 2015 12:07:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 3A280121C; Fri, 15 May 2015 12:07:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FC7jK5002455; Fri, 15 May 2015 12:07:45 GMT (envelope-from jch@FreeBSD.org) Received: (from jch@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FC7iEH002451; Fri, 15 May 2015 12:07:44 GMT (envelope-from jch@FreeBSD.org) Message-Id: <201505151207.t4FC7iEH002451@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jch set sender to jch@FreeBSD.org using -f From: Julien Charbon Date: Fri, 15 May 2015 12:07: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: r282964 - stable/10/sys/netinet 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 12:07:45 -0000 Author: jch Date: Fri May 15 12:07:43 2015 New Revision: 282964 URL: https://svnweb.freebsd.org/changeset/base/282964 Log: MFC: r280904, r280990, r281599 r280904: Use appropriate timeout_t* instead of void* in tcp_timer_activate() Suggested by: imp Differential Revision: https://reviews.freebsd.org/D2154 Reviewed by: imp, jhb Approved by: jhb r280990: Provide better debugging information in tcp_timer_activate() and tcp_timer_active() Differential Revision: https://reviews.freebsd.org/D2179 Suggested by: bz Reviewed by: jhb Approved by: jhb r281599: Fix an old and well-documented use-after-free race condition in TCP timers: - Add a reference from tcpcb to its inpcb - Defer tcpcb deletion until TCP timers have finished Differential Revision: https://reviews.freebsd.org/D2079 Submitted by: jch, Marc De La Gueronniere Reviewed by: imp, rrs, adrian, jhb, bz Approved by: jhb Sponsored by: Verisign, Inc. Modified: stable/10/sys/netinet/tcp_subr.c stable/10/sys/netinet/tcp_timer.c stable/10/sys/netinet/tcp_timer.h stable/10/sys/netinet/tcp_var.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_subr.c ============================================================================== --- stable/10/sys/netinet/tcp_subr.c Fri May 15 11:10:01 2015 (r282963) +++ stable/10/sys/netinet/tcp_subr.c Fri May 15 12:07:43 2015 (r282964) @@ -230,6 +230,7 @@ static struct inpcb *tcp_notify(struct i static struct inpcb *tcp_mtudisc_notify(struct inpcb *, int); static char * tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, const void *ip6hdr); +static void tcp_timer_discard(struct tcpcb *, uint32_t); /* * Target size of TCP PCB hash tables. Must be a power of two. @@ -790,7 +791,13 @@ tcp_newtcpcb(struct inpcb *inp) if (V_tcp_do_sack) tp->t_flags |= TF_SACK_PERMIT; TAILQ_INIT(&tp->snd_holes); - tp->t_inpcb = inp; /* XXX */ + /* + * The tcpcb will hold a reference on its inpcb until tcp_discardcb() + * is called. + */ + in_pcbref(inp); /* Reference for tcpcb */ + tp->t_inpcb = inp; + /* * Init srtt to TCPTV_SRTTBASE (0), so we can tell that we have no * rtt estimate. Set rttvar so that srtt + 4 * rttvar gives @@ -909,6 +916,7 @@ tcp_discardcb(struct tcpcb *tp) #ifdef INET6 int isipv6 = (inp->inp_vflag & INP_IPV6) != 0; #endif /* INET6 */ + int released; INP_WLOCK_ASSERT(inp); @@ -916,22 +924,15 @@ tcp_discardcb(struct tcpcb *tp) * Make sure that all of our timers are stopped before we delete the * PCB. * - * XXXRW: Really, we would like to use callout_drain() here in order - * to avoid races experienced in tcp_timer.c where a timer is already - * executing at this point. However, we can't, both because we're - * running in a context where we can't sleep, and also because we - * hold locks required by the timers. What we instead need to do is - * test to see if callout_drain() is required, and if so, defer some - * portion of the remainder of tcp_discardcb() to an asynchronous - * context that can callout_drain() and then continue. Some care - * will be required to ensure that no further processing takes place - * on the tcpcb, even though it hasn't been freed (a flag?). - */ - callout_stop(&tp->t_timers->tt_rexmt); - callout_stop(&tp->t_timers->tt_persist); - callout_stop(&tp->t_timers->tt_keep); - callout_stop(&tp->t_timers->tt_2msl); - callout_stop(&tp->t_timers->tt_delack); + * If stopping a timer fails, we schedule a discard function in same + * callout, and the last discard function called will take care of + * deleting the tcpcb. + */ + tcp_timer_stop(tp, TT_REXMT); + tcp_timer_stop(tp, TT_PERSIST); + tcp_timer_stop(tp, TT_KEEP); + tcp_timer_stop(tp, TT_2MSL); + tcp_timer_stop(tp, TT_DELACK); /* * If we got enough samples through the srtt filter, @@ -1008,8 +1009,80 @@ tcp_discardcb(struct tcpcb *tp) CC_ALGO(tp) = NULL; inp->inp_ppcb = NULL; - tp->t_inpcb = NULL; - uma_zfree(V_tcpcb_zone, tp); + if ((tp->t_timers->tt_flags & TT_MASK) == 0) { + /* We own the last reference on tcpcb, let's free it. */ + tp->t_inpcb = NULL; + uma_zfree(V_tcpcb_zone, tp); + released = in_pcbrele_wlocked(inp); + KASSERT(!released, ("%s: inp %p should not have been released " + "here", __func__, inp)); + } +} + +void +tcp_timer_2msl_discard(void *xtp) +{ + + tcp_timer_discard((struct tcpcb *)xtp, TT_2MSL); +} + +void +tcp_timer_keep_discard(void *xtp) +{ + + tcp_timer_discard((struct tcpcb *)xtp, TT_KEEP); +} + +void +tcp_timer_persist_discard(void *xtp) +{ + + tcp_timer_discard((struct tcpcb *)xtp, TT_PERSIST); +} + +void +tcp_timer_rexmt_discard(void *xtp) +{ + + tcp_timer_discard((struct tcpcb *)xtp, TT_REXMT); +} + +void +tcp_timer_delack_discard(void *xtp) +{ + + tcp_timer_discard((struct tcpcb *)xtp, TT_DELACK); +} + +void +tcp_timer_discard(struct tcpcb *tp, uint32_t timer_type) +{ + struct inpcb *inp; + + CURVNET_SET(tp->t_vnet); + INP_INFO_WLOCK(&V_tcbinfo); + inp = tp->t_inpcb; + KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", + __func__, tp)); + INP_WLOCK(inp); + KASSERT((tp->t_timers->tt_flags & TT_STOPPED) != 0, + ("%s: tcpcb has to be stopped here", __func__)); + KASSERT((tp->t_timers->tt_flags & timer_type) != 0, + ("%s: discard callout should be running", __func__)); + tp->t_timers->tt_flags &= ~timer_type; + if ((tp->t_timers->tt_flags & TT_MASK) == 0) { + /* We own the last reference on this tcpcb, let's free it. */ + tp->t_inpcb = NULL; + uma_zfree(V_tcpcb_zone, tp); + if (in_pcbrele_wlocked(inp)) { + INP_INFO_WUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); + return; + } + } + INP_WUNLOCK(inp); + INP_INFO_WUNLOCK(&V_tcbinfo); + CURVNET_RESTORE(); } /* Modified: stable/10/sys/netinet/tcp_timer.c ============================================================================== --- stable/10/sys/netinet/tcp_timer.c Fri May 15 11:10:01 2015 (r282963) +++ stable/10/sys/netinet/tcp_timer.c Fri May 15 12:07:43 2015 (r282964) @@ -209,10 +209,6 @@ int tcp_backoff[TCP_MAXRXTSHIFT + 1] = static int tcp_totbackoff = 2559; /* sum of tcp_backoff[] */ -static int tcp_timer_race; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, timer_race, CTLFLAG_RD, &tcp_timer_race, - 0, "Count of t_inpcb races on tcp_discardcb"); - /* * TCP timer processing. */ @@ -225,18 +221,7 @@ tcp_timer_delack(void *xtp) CURVNET_SET(tp->t_vnet); inp = tp->t_inpcb; - /* - * XXXRW: While this assert is in fact correct, bugs in the tcpcb - * tear-down mean we need it as a work-around for races between - * timers and tcp_discardcb(). - * - * KASSERT(inp != NULL, ("tcp_timer_delack: inp == NULL")); - */ - if (inp == NULL) { - tcp_timer_race++; - CURVNET_RESTORE(); - return; - } + KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", __func__, tp)); INP_WLOCK(inp); if (callout_pending(&tp->t_timers->tt_delack) || !callout_active(&tp->t_timers->tt_delack)) { @@ -250,6 +235,10 @@ tcp_timer_delack(void *xtp) CURVNET_RESTORE(); return; } + KASSERT((tp->t_timers->tt_flags & TT_STOPPED) == 0, + ("%s: tp %p tcpcb can't be stopped here", __func__, tp)); + KASSERT((tp->t_timers->tt_flags & TT_DELACK) != 0, + ("%s: tp %p delack callout should be running", __func__, tp)); tp->t_flags |= TF_ACKNOW; TCPSTAT_INC(tcps_delack); @@ -269,24 +258,9 @@ tcp_timer_2msl(void *xtp) ostate = tp->t_state; #endif - /* - * XXXRW: Does this actually happen? - */ INP_INFO_WLOCK(&V_tcbinfo); inp = tp->t_inpcb; - /* - * XXXRW: While this assert is in fact correct, bugs in the tcpcb - * tear-down mean we need it as a work-around for races between - * timers and tcp_discardcb(). - * - * KASSERT(inp != NULL, ("tcp_timer_2msl: inp == NULL")); - */ - if (inp == NULL) { - tcp_timer_race++; - INP_INFO_WUNLOCK(&V_tcbinfo); - CURVNET_RESTORE(); - return; - } + KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", __func__, tp)); INP_WLOCK(inp); tcp_free_sackholes(tp); if (callout_pending(&tp->t_timers->tt_2msl) || @@ -303,6 +277,10 @@ tcp_timer_2msl(void *xtp) CURVNET_RESTORE(); return; } + KASSERT((tp->t_timers->tt_flags & TT_STOPPED) == 0, + ("%s: tp %p tcpcb can't be stopped here", __func__, tp)); + KASSERT((tp->t_timers->tt_flags & TT_2MSL) != 0, + ("%s: tp %p 2msl callout should be running", __func__, tp)); /* * 2 MSL timeout in shutdown went off. If we're closed but * still waiting for peer to close and connection has been idle @@ -352,19 +330,7 @@ tcp_timer_keep(void *xtp) #endif INP_INFO_WLOCK(&V_tcbinfo); inp = tp->t_inpcb; - /* - * XXXRW: While this assert is in fact correct, bugs in the tcpcb - * tear-down mean we need it as a work-around for races between - * timers and tcp_discardcb(). - * - * KASSERT(inp != NULL, ("tcp_timer_keep: inp == NULL")); - */ - if (inp == NULL) { - tcp_timer_race++; - INP_INFO_WUNLOCK(&V_tcbinfo); - CURVNET_RESTORE(); - return; - } + KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", __func__, tp)); INP_WLOCK(inp); if (callout_pending(&tp->t_timers->tt_keep) || !callout_active(&tp->t_timers->tt_keep)) { @@ -380,6 +346,10 @@ tcp_timer_keep(void *xtp) CURVNET_RESTORE(); return; } + KASSERT((tp->t_timers->tt_flags & TT_STOPPED) == 0, + ("%s: tp %p tcpcb can't be stopped here", __func__, tp)); + KASSERT((tp->t_timers->tt_flags & TT_KEEP) != 0, + ("%s: tp %p keep callout should be running", __func__, tp)); /* * Keep-alive timer went off; send something * or drop connection if idle for too long. @@ -455,19 +425,7 @@ tcp_timer_persist(void *xtp) #endif INP_INFO_WLOCK(&V_tcbinfo); inp = tp->t_inpcb; - /* - * XXXRW: While this assert is in fact correct, bugs in the tcpcb - * tear-down mean we need it as a work-around for races between - * timers and tcp_discardcb(). - * - * KASSERT(inp != NULL, ("tcp_timer_persist: inp == NULL")); - */ - if (inp == NULL) { - tcp_timer_race++; - INP_INFO_WUNLOCK(&V_tcbinfo); - CURVNET_RESTORE(); - return; - } + KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", __func__, tp)); INP_WLOCK(inp); if (callout_pending(&tp->t_timers->tt_persist) || !callout_active(&tp->t_timers->tt_persist)) { @@ -483,6 +441,10 @@ tcp_timer_persist(void *xtp) CURVNET_RESTORE(); return; } + KASSERT((tp->t_timers->tt_flags & TT_STOPPED) == 0, + ("%s: tp %p tcpcb can't be stopped here", __func__, tp)); + KASSERT((tp->t_timers->tt_flags & TT_PERSIST) != 0, + ("%s: tp %p persist callout should be running", __func__, tp)); /* * Persistance timer into zero window. * Force a byte to be output, if possible. @@ -544,19 +506,7 @@ tcp_timer_rexmt(void * xtp) INP_INFO_RLOCK(&V_tcbinfo); inp = tp->t_inpcb; - /* - * XXXRW: While this assert is in fact correct, bugs in the tcpcb - * tear-down mean we need it as a work-around for races between - * timers and tcp_discardcb(). - * - * KASSERT(inp != NULL, ("tcp_timer_rexmt: inp == NULL")); - */ - if (inp == NULL) { - tcp_timer_race++; - INP_INFO_RUNLOCK(&V_tcbinfo); - CURVNET_RESTORE(); - return; - } + KASSERT(inp != NULL, ("%s: tp %p tp->t_inpcb == NULL", __func__, tp)); INP_WLOCK(inp); if (callout_pending(&tp->t_timers->tt_rexmt) || !callout_active(&tp->t_timers->tt_rexmt)) { @@ -572,6 +522,10 @@ tcp_timer_rexmt(void * xtp) CURVNET_RESTORE(); return; } + KASSERT((tp->t_timers->tt_flags & TT_STOPPED) == 0, + ("%s: tp %p tcpcb can't be stopped here", __func__, tp)); + KASSERT((tp->t_timers->tt_flags & TT_REXMT) != 0, + ("%s: tp %p rexmt callout should be running", __func__, tp)); tcp_free_sackholes(tp); /* * Retransmission timer went off. Message has not @@ -800,10 +754,10 @@ out: } void -tcp_timer_activate(struct tcpcb *tp, int timer_type, u_int delta) +tcp_timer_activate(struct tcpcb *tp, uint32_t timer_type, u_int delta) { struct callout *t_callout; - void *f_callout; + timeout_t *f_callout; struct inpcb *inp = tp->t_inpcb; int cpu = INP_CPU(inp); @@ -812,6 +766,9 @@ tcp_timer_activate(struct tcpcb *tp, int return; #endif + if (tp->t_timers->tt_flags & TT_STOPPED) + return; + switch (timer_type) { case TT_DELACK: t_callout = &tp->t_timers->tt_delack; @@ -834,17 +791,26 @@ tcp_timer_activate(struct tcpcb *tp, int f_callout = tcp_timer_2msl; break; default: - panic("bad timer_type"); + panic("tp %p bad timer_type %#x", tp, timer_type); } if (delta == 0) { - callout_stop(t_callout); + if ((tp->t_timers->tt_flags & timer_type) && + callout_stop(t_callout)) { + tp->t_timers->tt_flags &= ~timer_type; + } } else { - callout_reset_on(t_callout, delta, f_callout, tp, cpu); + if ((tp->t_timers->tt_flags & timer_type) == 0) { + tp->t_timers->tt_flags |= timer_type; + callout_reset_on(t_callout, delta, f_callout, tp, cpu); + } else { + /* Reset already running callout on the same CPU. */ + callout_reset(t_callout, delta, f_callout, tp); + } } } int -tcp_timer_active(struct tcpcb *tp, int timer_type) +tcp_timer_active(struct tcpcb *tp, uint32_t timer_type) { struct callout *t_callout; @@ -865,11 +831,63 @@ tcp_timer_active(struct tcpcb *tp, int t t_callout = &tp->t_timers->tt_2msl; break; default: - panic("bad timer_type"); + panic("tp %p bad timer_type %#x", tp, timer_type); } return callout_active(t_callout); } +void +tcp_timer_stop(struct tcpcb *tp, uint32_t timer_type) +{ + struct callout *t_callout; + timeout_t *f_callout; + + tp->t_timers->tt_flags |= TT_STOPPED; + + switch (timer_type) { + case TT_DELACK: + t_callout = &tp->t_timers->tt_delack; + f_callout = tcp_timer_delack_discard; + break; + case TT_REXMT: + t_callout = &tp->t_timers->tt_rexmt; + f_callout = tcp_timer_rexmt_discard; + break; + case TT_PERSIST: + t_callout = &tp->t_timers->tt_persist; + f_callout = tcp_timer_persist_discard; + break; + case TT_KEEP: + t_callout = &tp->t_timers->tt_keep; + f_callout = tcp_timer_keep_discard; + break; + case TT_2MSL: + t_callout = &tp->t_timers->tt_2msl; + f_callout = tcp_timer_2msl_discard; + break; + default: + panic("tp %p bad timer_type %#x", tp, timer_type); + } + + if (tp->t_timers->tt_flags & timer_type) { + if (callout_stop(t_callout)) { + tp->t_timers->tt_flags &= ~timer_type; + } else { + /* + * Can't stop the callout, defer tcpcb actual deletion + * to the last tcp timer discard callout. + * The TT_STOPPED flag will ensure that no tcp timer + * callouts can be restarted on our behalf, and + * past this point currently running callouts waiting + * on inp lock will return right away after the + * classical check for callout reset/stop events: + * callout_pending() || !callout_active() + */ + callout_reset(t_callout, 1, f_callout, tp); + } + } +} + #define ticks_to_msecs(t) (1000*(t) / hz) void Modified: stable/10/sys/netinet/tcp_timer.h ============================================================================== --- stable/10/sys/netinet/tcp_timer.h Fri May 15 11:10:01 2015 (r282963) +++ stable/10/sys/netinet/tcp_timer.h Fri May 15 12:07:43 2015 (r282964) @@ -146,12 +146,21 @@ struct tcp_timer { struct callout tt_keep; /* keepalive */ struct callout tt_2msl; /* 2*msl TIME_WAIT timer */ struct callout tt_delack; /* delayed ACK timer */ + uint32_t tt_flags; /* Timers flags */ + uint32_t tt_spare; /* TDB */ }; -#define TT_DELACK 0x01 -#define TT_REXMT 0x02 -#define TT_PERSIST 0x04 -#define TT_KEEP 0x08 -#define TT_2MSL 0x10 + +/* + * Flags for the tt_flags field. + */ +#define TT_DELACK 0x0001 +#define TT_REXMT 0x0002 +#define TT_PERSIST 0x0004 +#define TT_KEEP 0x0008 +#define TT_2MSL 0x0010 +#define TT_MASK (TT_DELACK|TT_REXMT|TT_PERSIST|TT_KEEP|TT_2MSL) + +#define TT_STOPPED 0x00010000 #define TP_KEEPINIT(tp) ((tp)->t_keepinit ? (tp)->t_keepinit : tcp_keepinit) #define TP_KEEPIDLE(tp) ((tp)->t_keepidle ? (tp)->t_keepidle : tcp_keepidle) @@ -183,6 +192,11 @@ void tcp_timer_keep(void *xtp); void tcp_timer_persist(void *xtp); void tcp_timer_rexmt(void *xtp); void tcp_timer_delack(void *xtp); +void tcp_timer_2msl_discard(void *xtp); +void tcp_timer_keep_discard(void *xtp); +void tcp_timer_persist_discard(void *xtp); +void tcp_timer_rexmt_discard(void *xtp); +void tcp_timer_delack_discard(void *xtp); void tcp_timer_to_xtimer(struct tcpcb *tp, struct tcp_timer *timer, struct xtcp_timer *xtimer); Modified: stable/10/sys/netinet/tcp_var.h ============================================================================== --- stable/10/sys/netinet/tcp_var.h Fri May 15 11:10:01 2015 (r282963) +++ stable/10/sys/netinet/tcp_var.h Fri May 15 12:07:43 2015 (r282964) @@ -718,8 +718,9 @@ void tcp_slowtimo(void); struct tcptemp * tcpip_maketemplate(struct inpcb *); void tcpip_fillheaders(struct inpcb *, void *, void *); -void tcp_timer_activate(struct tcpcb *, int, u_int); -int tcp_timer_active(struct tcpcb *, int); +void tcp_timer_activate(struct tcpcb *, uint32_t, u_int); +int tcp_timer_active(struct tcpcb *, uint32_t); +void tcp_timer_stop(struct tcpcb *, uint32_t); void tcp_trace(short, short, struct tcpcb *, void *, struct tcphdr *, int); /* * All tcp_hc_* functions are IPv4 and IPv6 (via in_conninfo) From owner-svn-src-stable@FreeBSD.ORG Fri May 15 12:35:19 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46AFD1BC; Fri, 15 May 2015 12:35:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 3516315C2; Fri, 15 May 2015 12:35:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FCZJOr017696; Fri, 15 May 2015 12:35:19 GMT (envelope-from jch@FreeBSD.org) Received: (from jch@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FCZJTw017695; Fri, 15 May 2015 12:35:19 GMT (envelope-from jch@FreeBSD.org) Message-Id: <201505151235.t4FCZJTw017695@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jch set sender to jch@FreeBSD.org using -f From: Julien Charbon Date: Fri, 15 May 2015 12:35: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: r282968 - stable/10/sys/netinet 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 12:35:19 -0000 Author: jch Date: Fri May 15 12:35:18 2015 New Revision: 282968 URL: https://svnweb.freebsd.org/changeset/base/282968 Log: MFC r279821: In TCP, connect() can return incorrect error code EINVAL instead of EADDRINUSE or ECONNREFUSED PR: 196035 Differential Revision: https://reviews.freebsd.org/D1982 Reported by: Mark Nunberg Submitted by: Harrison Grundy Reviewed by: adrian, jch, glebius, gnn Approved by: jhb Modified: stable/10/sys/netinet/tcp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_usrreq.c ============================================================================== --- stable/10/sys/netinet/tcp_usrreq.c Fri May 15 12:32:17 2015 (r282967) +++ stable/10/sys/netinet/tcp_usrreq.c Fri May 15 12:35:18 2015 (r282968) @@ -475,8 +475,12 @@ tcp_usr_connect(struct socket *so, struc inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_connect: inp == NULL")); INP_WLOCK(inp); - if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { - error = EINVAL; + if (inp->inp_flags & INP_TIMEWAIT) { + error = EADDRINUSE; + goto out; + } + if (inp->inp_flags & INP_DROPPED) { + error = ECONNREFUSED; goto out; } tp = intotcpcb(inp); @@ -522,8 +526,12 @@ tcp6_usr_connect(struct socket *so, stru inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp6_usr_connect: inp == NULL")); INP_WLOCK(inp); - if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { - error = EINVAL; + if (inp->inp_flags & INP_TIMEWAIT) { + error = EADDRINUSE; + goto out; + } + if (inp->inp_flags & INP_DROPPED) { + error = ECONNREFUSED; goto out; } tp = intotcpcb(inp); From owner-svn-src-stable@FreeBSD.ORG Fri May 15 15:08:38 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 360B1D0E; Fri, 15 May 2015 15:08:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2306117D2; Fri, 15 May 2015 15:08:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FF8c33092659; Fri, 15 May 2015 15:08:38 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FF8cED092658; Fri, 15 May 2015 15:08:38 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151508.t4FF8cED092658@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 15:08:37 +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: r282974 - in stable/10/usr.sbin: . uefisign 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 15:08:38 -0000 Author: trasz Date: Fri May 15 15:08:37 2015 New Revision: 282974 URL: https://svnweb.freebsd.org/changeset/base/282974 Log: MFC r279315: Add uefisign(8), UEFI Secure Boot signing utility. Relnotes: yes Sponsored by: The FreeBSD Foundation Added: stable/10/usr.sbin/uefisign/ - copied from r279315, head/usr.sbin/uefisign/ Modified: stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Fri May 15 14:22:33 2015 (r282973) +++ stable/10/usr.sbin/Makefile Fri May 15 15:08:37 2015 (r282974) @@ -86,6 +86,7 @@ SUBDIR= adduser \ traceroute \ trpt \ tzsetup \ + uefisign \ ugidfw \ vipw \ wake \ From owner-svn-src-stable@FreeBSD.ORG Fri May 15 15:10:35 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 285D0E73; Fri, 15 May 2015 15:10:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 14C2617F8; Fri, 15 May 2015 15:10:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FFAYKd094038; Fri, 15 May 2015 15:10:34 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FFAYFX094036; Fri, 15 May 2015 15:10:34 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151510.t4FFAYFX094036@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 15:10:34 +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: r282975 - in stable/10: etc/mtree share/examples share/examples/uefisign 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 15:10:35 -0000 Author: trasz Date: Fri May 15 15:10:34 2015 New Revision: 282975 URL: https://svnweb.freebsd.org/changeset/base/282975 Log: MFC r279317: Add key/cert generation script for uefisign(8). Sponsored by: The FreeBSD Foundation Added: stable/10/share/examples/uefisign/ - copied from r279317, head/share/examples/uefisign/ Modified: stable/10/etc/mtree/BSD.usr.dist stable/10/share/examples/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.usr.dist ============================================================================== --- stable/10/etc/mtree/BSD.usr.dist Fri May 15 15:08:37 2015 (r282974) +++ stable/10/etc/mtree/BSD.usr.dist Fri May 15 15:10:34 2015 (r282975) @@ -409,6 +409,8 @@ .. tcsh .. + uefisign + .. .. games fortune Modified: stable/10/share/examples/Makefile ============================================================================== --- stable/10/share/examples/Makefile Fri May 15 15:08:37 2015 (r282974) +++ stable/10/share/examples/Makefile Fri May 15 15:10:34 2015 (r282975) @@ -27,7 +27,8 @@ LDIRS= BSD_daemon \ printing \ ses \ scsi_target \ - sunrpc + sunrpc \ + uefisign XFILES= BSD_daemon/FreeBSD.pfa \ BSD_daemon/README \ @@ -181,7 +182,8 @@ XFILES= BSD_daemon/FreeBSD.pfa \ sunrpc/sort/Makefile \ sunrpc/sort/rsort.c \ sunrpc/sort/sort.x \ - sunrpc/sort/sort_proc.c + sunrpc/sort/sort_proc.c \ + uefisign/uefikeys BINDIR= ${SHAREDIR}/examples From owner-svn-src-stable@FreeBSD.ORG Fri May 15 15:12:13 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA298FC3; Fri, 15 May 2015 15:12:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 ADBFA18BB; Fri, 15 May 2015 15:12:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FFCD0m096965; Fri, 15 May 2015 15:12:13 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FFCDsV096964; Fri, 15 May 2015 15:12:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151512.t4FFCDsV096964@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 15:12:13 +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: r282976 - stable/10/share/examples/uefisign 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 15:12:14 -0000 Author: trasz Date: Fri May 15 15:12:12 2015 New Revision: 282976 URL: https://svnweb.freebsd.org/changeset/base/282976 Log: MFC r279321: Make the uefikeys script output slightly more obvious. Sponsored by: The FreeBSD Foundation Modified: stable/10/share/examples/uefisign/uefikeys Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/uefisign/uefikeys ============================================================================== --- stable/10/share/examples/uefisign/uefikeys Fri May 15 15:10:34 2015 (r282975) +++ stable/10/share/examples/uefisign/uefikeys Fri May 15 15:12:12 2015 (r282976) @@ -18,7 +18,6 @@ fi certfile="${1}.pem" efifile="${1}.cer" keyfile="${1}.key" -p12file="${1}.p12" # XXX: Set this to ten years; we don't want system to suddenly stop booting # due to certificate expiration. Better way would be to use Authenticode # Timestamp. That said, the rumor is UEFI implementations ignore it anyway. @@ -28,13 +27,11 @@ subj="/CN=${1}" [ ! -e "${certfile}" ] || die "${certfile} already exists" [ ! -e "${efifile}" ] || die "${efifile} already exists" [ ! -e "${keyfile}" ] || die "${keyfile} already exists" -[ ! -e "${p12file}" ] || die "${p12file} already exists" umask 077 || die "umask 077 failed" openssl genrsa -out "${keyfile}" 2048 2> /dev/null || die "openssl genrsa failed" openssl req -new -x509 -sha256 -days "${days}" -subj "${subj}" -key "${keyfile}" -out "${certfile}" || die "openssl req failed" openssl x509 -inform PEM -outform DER -in "${certfile}" -out "${efifile}" || die "openssl x509 failed" -openssl pkcs12 -export -out "${p12file}" -inkey "${keyfile}" -in "${certfile}" -password 'pass:' || die "openssl pkcs12 failed" -echo "certificate: ${certfile}; private key: ${keyfile}; UEFI public key: ${efifile}; private key with empty password for pesign: ${p12file}" +echo "certificate: ${certfile}; private key: ${keyfile}; certificate to enroll in UEFI: ${efifile}" From owner-svn-src-stable@FreeBSD.ORG Fri May 15 15:13:52 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67AB626A; Fri, 15 May 2015 15:13:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 54CEB18C8; Fri, 15 May 2015 15:13:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FFDqqO097359; Fri, 15 May 2015 15:13:52 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FFDqmd097358; Fri, 15 May 2015 15:13:52 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505151513.t4FFDqmd097358@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 15 May 2015 15:13:52 +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: r282977 - stable/10/share/man/man8 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 15:13:52 -0000 Author: trasz Date: Fri May 15 15:13:51 2015 New Revision: 282977 URL: https://svnweb.freebsd.org/changeset/base/282977 Log: MFC r279316: Add uefisign(8) reference to uefi(8) manual page. Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man8/uefi.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man8/uefi.8 ============================================================================== --- stable/10/share/man/man8/uefi.8 Fri May 15 15:12:12 2015 (r282976) +++ stable/10/share/man/man8/uefi.8 Fri May 15 15:13:51 2015 (r282977) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2014 +.Dd February 26, 2015 .Dt UEFI 8 .Os .Sh NAME @@ -114,7 +114,8 @@ typical non-default kernel (optional) .Xr vt 4 , .Xr msdosfs 5 , .Xr boot 8 , -.Xr gpart 8 +.Xr gpart 8 , +.Xr uefisign 8 .Sh HISTORY .Nm boot support first appeared in From owner-svn-src-stable@FreeBSD.ORG Fri May 15 15:49:26 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AD14357; Fri, 15 May 2015 15:49:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 86EAB1CE2; Fri, 15 May 2015 15:49:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FFnQhH014255; Fri, 15 May 2015 15:49:26 GMT (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FFnPfS014249; Fri, 15 May 2015 15:49:25 GMT (envelope-from julian@FreeBSD.org) Message-Id: <201505151549.t4FFnPfS014249@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: julian set sender to julian@FreeBSD.org using -f From: Julian Elischer Date: Fri, 15 May 2015 15:49: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: r282979 - stable/10/lib/libc/gen 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 15:49:26 -0000 Author: julian Date: Fri May 15 15:49:24 2015 New Revision: 282979 URL: https://svnweb.freebsd.org/changeset/base/282979 Log: MFH: r282485 Tweak seekdir, telldir and readdir so that when htere are deletes going on, as seek to teh last location saved will still work. This is needed for Samba to be able to correctly handle delete requests from windows. This does not completely fix seekdir when deletes are present but fixes the worst of the problems. The real solution must involve some changes to the API for eh VFS and getdirentries(2). Obtained from: Panzura inc MFH: r282550 (jhb@) A few style fixes and expand the comment a bit on what _fixtelldir() is doing. MFH: r282560 (jhb@) Tweak the comment here some more. In particular, the previous opening sentence was a bit confusing. Noted by: kib Modified: stable/10/lib/libc/gen/directory.3 stable/10/lib/libc/gen/readdir.c stable/10/lib/libc/gen/rewinddir.c stable/10/lib/libc/gen/telldir.c stable/10/lib/libc/gen/telldir.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/directory.3 ============================================================================== --- stable/10/lib/libc/gen/directory.3 Fri May 15 15:36:57 2015 (r282978) +++ stable/10/lib/libc/gen/directory.3 Fri May 15 15:49:24 2015 (r282979) @@ -267,4 +267,27 @@ The invalidation of .Fn telldir tokens when calling .Fn seekdir -is non-standard. +is non-standard. This is a compile time option. +.Pp +The behaviour of +.Fn telldir +and +.Fn seekdir +is likely to be wrong if there are parallel unlinks happening +and the directory is larger than one page. +There is code to ensure that a +.Fn seekdir +to the location given by a +.Fn telldir +immediately before the last +.Fn readdir +will always set the correct location to return the same value as that last +.Fn readdir +performed. +This is enough for some applications which want to "push back the last entry read" E.g. Samba. +Seeks back to any other location, +other than the beginning of the directory, +may result in unexpected behaviour if deletes are present. +It is hoped that this situation will be resolved with changes to +.Fn getdirentries +and the VFS. Modified: stable/10/lib/libc/gen/readdir.c ============================================================================== --- stable/10/lib/libc/gen/readdir.c Fri May 15 15:36:57 2015 (r282978) +++ stable/10/lib/libc/gen/readdir.c Fri May 15 15:49:24 2015 (r282979) @@ -54,19 +54,25 @@ _readdir_unlocked(dirp, skip) int skip; { struct dirent *dp; + long initial_seek; + long initial_loc = 0; for (;;) { if (dirp->dd_loc >= dirp->dd_size) { if (dirp->dd_flags & __DTF_READALL) return (NULL); + initial_loc = dirp->dd_loc; + dirp->dd_flags &= ~__DTF_SKIPREAD; dirp->dd_loc = 0; } if (dirp->dd_loc == 0 && !(dirp->dd_flags & (__DTF_READALL | __DTF_SKIPREAD))) { + initial_seek = dirp->dd_seek; dirp->dd_size = _getdirentries(dirp->dd_fd, dirp->dd_buf, dirp->dd_len, &dirp->dd_seek); if (dirp->dd_size <= 0) return (NULL); + _fixtelldir(dirp, initial_seek, initial_loc); } dirp->dd_flags &= ~__DTF_SKIPREAD; dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); Modified: stable/10/lib/libc/gen/rewinddir.c ============================================================================== --- stable/10/lib/libc/gen/rewinddir.c Fri May 15 15:36:57 2015 (r282978) +++ stable/10/lib/libc/gen/rewinddir.c Fri May 15 15:49:24 2015 (r282979) @@ -51,6 +51,7 @@ rewinddir(dirp) if (__isthreaded) _pthread_mutex_lock(&dirp->dd_lock); + dirp->dd_flags &= ~__DTF_SKIPREAD; /* current contents are invalid */ if (dirp->dd_flags & __DTF_READALL) _filldir(dirp, false); else { Modified: stable/10/lib/libc/gen/telldir.c ============================================================================== --- stable/10/lib/libc/gen/telldir.c Fri May 15 15:36:57 2015 (r282978) +++ stable/10/lib/libc/gen/telldir.c Fri May 15 15:49:24 2015 (r282979) @@ -101,9 +101,22 @@ _seekdir(dirp, loc) return; if (lp->loc_loc == dirp->dd_loc && lp->loc_seek == dirp->dd_seek) return; + + /* If it's within the same chunk of data, don't bother reloading. */ + if (lp->loc_seek == dirp->dd_seek) { + /* + * If we go back to 0 don't make the next readdir + * trigger a call to getdirentries(). + */ + if (lp->loc_loc == 0) + dirp->dd_flags |= __DTF_SKIPREAD; + dirp->dd_loc = lp->loc_loc; + return; + } (void) lseek(dirp->dd_fd, (off_t)lp->loc_seek, SEEK_SET); dirp->dd_seek = lp->loc_seek; dirp->dd_loc = 0; + dirp->dd_flags &= ~__DTF_SKIPREAD; /* current contents are invalid */ while (dirp->dd_loc < lp->loc_loc) { dp = _readdir_unlocked(dirp, 0); if (dp == NULL) @@ -112,6 +125,30 @@ _seekdir(dirp, loc) } /* + * After readdir returns the last entry in a block, a call to telldir + * returns a location that is after the end of that last entry. + * However, that location doesn't refer to a valid directory entry. + * Ideally, the call to telldir would return a location that refers to + * the first entry in the next block. That location is not known + * until the next block is read, so readdir calls this function after + * fetching a new block to fix any such telldir locations. + */ +void +_fixtelldir(DIR *dirp, long oldseek, long oldloc) +{ + struct ddloc *lp; + + lp = LIST_FIRST(&dirp->dd_td->td_locq); + if (lp != NULL) { + if (lp->loc_loc == oldloc && + lp->loc_seek == oldseek) { + lp->loc_seek = dirp->dd_seek; + lp->loc_loc = dirp->dd_loc; + } + } +} + +/* * Reclaim memory for telldir cookies which weren't used. */ void Modified: stable/10/lib/libc/gen/telldir.h ============================================================================== --- stable/10/lib/libc/gen/telldir.h Fri May 15 15:36:57 2015 (r282978) +++ stable/10/lib/libc/gen/telldir.h Fri May 15 15:49:24 2015 (r282979) @@ -64,5 +64,6 @@ bool _filldir(DIR *, bool); struct dirent *_readdir_unlocked(DIR *, int); void _reclaim_telldir(DIR *); void _seekdir(DIR *, long); +void _fixtelldir(DIR *dirp, long oldseek, long oldloc); #endif From owner-svn-src-stable@FreeBSD.ORG Fri May 15 22:13:12 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D71E266F; Fri, 15 May 2015 22:13:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B901F1B55; Fri, 15 May 2015 22:13:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FMDCZF017334; Fri, 15 May 2015 22:13:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FMDBA4017329; Fri, 15 May 2015 22:13:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505152213.t4FMDBA4017329@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 15 May 2015 22:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282992 - in stable/9/tools/regression/aio/kqueue: . lio X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 22:13:13 -0000 Author: ngie Date: Fri May 15 22:13:11 2015 New Revision: 282992 URL: https://svnweb.freebsd.org/changeset/base/282992 Log: MFC r280893,r280894,r280895: r280893: Cleanup and do minor refactoring before converting testcases to ATF - Convert errx(-1, ..) to errx(1, ..) - Move the aio(4) checks to a single function (aio_available); use modfind(2) instead of depending on SIGSYS (doesn't work when aio(4) support is missing, not documented in the aio syscall manpages). - Use aio_available liberally in the testcase functions - Use mkstemp(3) + unlink(2) instead of mktemp(3) - Fix some -Wunused warnings - Bump WARNS to 6 Submitted by: mjohnston [*] Sponsored by: EMC / Isilon Storage Division r280894: Minor cleanup before converting to ATF testcases - Remove blank (tab-only) lines. - Fix -Wunused warnings. - Bump up to WARNS= 6 r280895: - Fix -Wsign issue - Bump up to WARNS=6 Modified: stable/9/tools/regression/aio/kqueue/Makefile stable/9/tools/regression/aio/kqueue/aio_kqueue.c stable/9/tools/regression/aio/kqueue/lio/Makefile stable/9/tools/regression/aio/kqueue/lio/lio_kqueue.c Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) stable/9/tools/regression/aio/aiotest/ (props changed) Modified: stable/9/tools/regression/aio/kqueue/Makefile ============================================================================== --- stable/9/tools/regression/aio/kqueue/Makefile Fri May 15 21:33:19 2015 (r282991) +++ stable/9/tools/regression/aio/kqueue/Makefile Fri May 15 22:13:11 2015 (r282992) @@ -3,4 +3,8 @@ PROG= aio_kqueue NO_MAN= +WARNS?= 6 + +SUBDIR+= lio + .include Modified: stable/9/tools/regression/aio/kqueue/aio_kqueue.c ============================================================================== --- stable/9/tools/regression/aio/kqueue/aio_kqueue.c Fri May 15 21:33:19 2015 (r282991) +++ stable/9/tools/regression/aio/kqueue/aio_kqueue.c Fri May 15 22:13:11 2015 (r282992) @@ -177,7 +177,7 @@ main (int argc, char *argv[]) #endif if (result != sizeof(buffer)) { printf("FAIL: run %d, operation %d, result %d " - " (errno=%d) should be %d\n", run, pending, + " (errno=%d) should be %zu\n", run, pending, result, errno, sizeof(buffer)); failed++; } else Modified: stable/9/tools/regression/aio/kqueue/lio/Makefile ============================================================================== --- stable/9/tools/regression/aio/kqueue/lio/Makefile Fri May 15 21:33:19 2015 (r282991) +++ stable/9/tools/regression/aio/kqueue/lio/Makefile Fri May 15 22:13:11 2015 (r282992) @@ -3,4 +3,6 @@ PROG= lio_kqueue NO_MAN= +WARNS?= 6 + .include Modified: stable/9/tools/regression/aio/kqueue/lio/lio_kqueue.c ============================================================================== --- stable/9/tools/regression/aio/kqueue/lio/lio_kqueue.c Fri May 15 21:33:19 2015 (r282991) +++ stable/9/tools/regression/aio/kqueue/lio/lio_kqueue.c Fri May 15 22:13:11 2015 (r282992) @@ -37,13 +37,15 @@ * http://www.ambrisko.com/doug/listio_kqueue/listio_kqueue.patch */ -#include -#include -#include -#include #include #include #include +#include +#include +#include +#include +#include +#include #include #define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX" @@ -52,9 +54,10 @@ #define MAX LIO_MAX * 16 #define MAX_RUNS 300 +int main(int argc, char *argv[]){ int fd; - struct aiocb *iocb[MAX], *kq_iocb; + struct aiocb *iocb[MAX]; struct aiocb **lio[LIO_MAX], **lio_element, **kq_lio; int i, result, run, error, j, k; char buffer[32768]; @@ -65,7 +68,7 @@ main(int argc, char *argv[]){ time_t time1, time2; char *file, pathname[sizeof(PATH_TEMPLATE)-1]; int tmp_file = 0, failed = 0; - + if (kq < 0) { perror("No kqeueue\n"); exit(1); @@ -89,7 +92,7 @@ main(int argc, char *argv[]){ #ifdef DEBUG printf("Hello kq %d fd %d\n", kq, fd); #endif - + for (run = 0; run < MAX_RUNS; run++){ #ifdef DEBUG printf("Run %d\n", run); @@ -137,13 +140,13 @@ main(int argc, char *argv[]){ printf("write %d is at %p\n", j, lio[j]); #endif } - + for(i = 0; i < LIO_MAX; i++) { for(j = LIO_MAX - 1; j >=0; j--) { if (lio[j]) break; } - + for(;;) { bzero(&ke, sizeof(ke)); bzero(&kq_returned, sizeof(ke)); @@ -169,18 +172,18 @@ main(int argc, char *argv[]){ kq_returned.udata, lio[j]); #endif - + if(kq_lio) break; #ifdef DEBUG printf("Try again\n"); #endif - } - + } + #ifdef DEBUG printf("lio %p\n", lio); #endif - + for (j = 0; j < LIO_MAX; j++) { if (lio[j] == kq_lio) { break; @@ -201,12 +204,12 @@ main(int argc, char *argv[]){ printf("PASS: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result); } for(k = 0; k < MAX / LIO_MAX; k++){ - result = aio_return(kq_lio[k]); + result = aio_return(kq_lio[k]); #ifdef DEBUG printf("Return Resulto for %d %d is %d\n", j, k, result); #endif if (result != sizeof(buffer)) { - printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %d\n", + printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %zu\n", run, LIO_MAX - i -1, k, result, errno, sizeof(buffer)); } else { printf("PASS: run %d, operation %d sub-opt %d result %d\n", @@ -216,13 +219,13 @@ main(int argc, char *argv[]){ #ifdef DEBUG printf("\n"); #endif - + for(k = 0; k < MAX / LIO_MAX; k++) { free(lio[j][k]); } free(lio[j]); lio[j] = NULL; - } + } } #ifdef DEBUG printf("Done\n"); From owner-svn-src-stable@FreeBSD.ORG Fri May 15 22:14:43 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F1857B9; Fri, 15 May 2015 22:14:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 34A811B6F; Fri, 15 May 2015 22:14:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4FMEhWa017739; Fri, 15 May 2015 22:14:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4FMEhbO017738; Fri, 15 May 2015 22:14:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505152214.t4FMEhbO017738@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 15 May 2015 22:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r282993 - stable/9/tools/regression/aio/aiotest X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 22:14:43 -0000 Author: ngie Date: Fri May 15 22:14:42 2015 New Revision: 282993 URL: https://svnweb.freebsd.org/changeset/base/282993 Log: Remove mergeinfo for r280893 It wasn't actually committed to stable/9 in r282992 Modified: Directory Properties: stable/9/tools/regression/aio/aiotest/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Fri May 15 22:15:58 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7ED38F9; Fri, 15 May 2015 22:15:57 +0000 (UTC) Received: from mail-ie0-x232.google.com (mail-ie0-x232.google.com [IPv6:2607:f8b0:4001:c03::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB7821B7C; Fri, 15 May 2015 22:15:57 +0000 (UTC) Received: by ieczm2 with SMTP id zm2so60280010iec.1; Fri, 15 May 2015 15:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=o59CIXkaoYExbQfTBPdMwESWDU7Iw9EIklEesU/BiqE=; b=zN6YgKvmevSUfs0XJ/x4NsjSC+ZxKCgnBeh2scTwCGHODuhzKrBBhiPKVez1yum1Y/ K/noNBkTkVj8UV1e7ECt2JmxvSEbSfEOAiUJ5DAcPjB/G/0inNfqs8lMAfWbsBgUpE+b cZQ6bWx026kqpJYISR7eXuw2cINWkh7kvqMsjmLjkzhrm1733CXq6W6JTCmt52QIUmCz KI8XBuSUQTpsc184cnBMtede3jpuQkRBMPxmSNIMWQN+tmMZa7mexLgKd5WQNGY+HbYo jat9b4EHVWaqObYKZZigd2i1OO6QgSxJblu+s1WvCI47W8w82Ch73kWtu6bJUvkpo6s6 9MsA== X-Received: by 10.68.186.1 with SMTP id fg1mr22264363pbc.147.1431728157161; Fri, 15 May 2015 15:15:57 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:10d2:46bc:67b9:c8b3? ([2601:8:ab80:7d6:10d2:46bc:67b9:c8b3]) by mx.google.com with ESMTPSA id ld1sm2833767pbc.26.2015.05.15.15.15.55 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 May 2015 15:15:56 -0700 (PDT) Subject: Re: svn commit: r282992 - in stable/9/tools/regression/aio/kqueue: . lio Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E707D0D5-567F-4694-9911-7C8CB52F4DED"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <201505152213.t4FMDBA4017329@svn.freebsd.org> Date: Fri, 15 May 2015 15:15:53 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Message-Id: <7E44829A-A926-4076-A3DD-AD7A8F3E3B16@gmail.com> References: <201505152213.t4FMDBA4017329@svn.freebsd.org> To: Garrett Cooper X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 22:15:58 -0000 --Apple-Mail=_E707D0D5-567F-4694-9911-7C8CB52F4DED Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On May 15, 2015, at 15:13, Garrett Cooper wrote: > Author: ngie > Date: Fri May 15 22:13:11 2015 > New Revision: 282992 > URL: https://svnweb.freebsd.org/changeset/base/282992 >=20 > Log: > MFC r280893,r280894,r280895: >=20 > r280893: >=20 > Cleanup and do minor refactoring before converting testcases to ATF >=20 > - Convert errx(-1, ..) to errx(1, ..) > - Move the aio(4) checks to a single function (aio_available); use = modfind(2) > instead of depending on SIGSYS (doesn't work when aio(4) support is = missing, > not documented in the aio syscall manpages). > - Use aio_available liberally in the testcase functions > - Use mkstemp(3) + unlink(2) instead of mktemp(3) > - Fix some -Wunused warnings > - Bump WARNS to 6 >=20 > Submitted by: mjohnston [*] > Sponsored by: EMC / Isilon Storage Division I forgot to remove this portion of the commit (fixed in r282993) -- I = ran into conflicts and couldn=92t do a simple merge. Will retry after I = figure out what revisions are missing from stable/10 and head=85 -NGie --Apple-Mail=_E707D0D5-567F-4694-9911-7C8CB52F4DED Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVVnAaAAoJEMZr5QU6S73eJN0H/0+suNX1Ant0JiFqFAvKbYzx tESKzalYF36V9es8vApR/jq0X3qHBcJ2J7NCde8rM/QjgmU5AKjcMr5BzvuU2fU7 3jMXH9e8PvSxk8nQcnSQlsUCCBQJYFgd94KpjCsUY1mhbqU5SW3d21mlYwER8eTi DcoP3QJCewkuabCAWEoHiMRvAkW8Ez+orH1dlHZR0ZhrzQuEgNA8YWSvUpo+FxNz UR+tk8+gMC4x+QqRt6BCGEu2bPJ52IEBX8aqtIssQzAyB+tAaPSf+9P4DjcIGbkv 1y4BX3DE5xwyiwR9GQE066VaiQaoPCFJtwqL2A1Q7/zziZcYqegVAYOQPjkffYE= =ThDT -----END PGP SIGNATURE----- --Apple-Mail=_E707D0D5-567F-4694-9911-7C8CB52F4DED-- From owner-svn-src-stable@FreeBSD.ORG Sat May 16 01:13:38 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8681C9FC; Sat, 16 May 2015 01:13:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 7366A1E70; Sat, 16 May 2015 01:13:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4G1Dc6H008041; Sat, 16 May 2015 01:13:38 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4G1DcAO008040; Sat, 16 May 2015 01:13:38 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201505160113.t4G1DcAO008040@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sat, 16 May 2015 01:13:38 +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: r282995 - 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 01:13:38 -0000 Author: smh Date: Sat May 16 01:13:37 2015 New Revision: 282995 URL: https://svnweb.freebsd.org/changeset/base/282995 Log: MFC r282880: Add copyright info missing from r282205 Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Fri May 15 22:19:35 2015 (r282994) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Sat May 16 01:13:37 2015 (r282995) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2015 Chunwei Chen. All rights reserved. */ #include From owner-svn-src-stable@FreeBSD.ORG Sat May 16 09:13:56 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBB918BC; Sat, 16 May 2015 09:13:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 D979D1DE5; Sat, 16 May 2015 09:13:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4G9DuUK044002; Sat, 16 May 2015 09:13:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4G9DuKi044001; Sat, 16 May 2015 09:13:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201505160913.t4G9DuKi044001@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 16 May 2015 09:13:56 +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: r283004 - 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 09:13:57 -0000 Author: kib Date: Sat May 16 09:13:56 2015 New Revision: 283004 URL: https://svnweb.freebsd.org/changeset/base/283004 Log: MFC r282679: Do not return from thread_single(SINGLE_BOUNDARY) until all stopped thread are guarenteed to be removed from the processors. Modified: stable/10/sys/kern/kern_thread.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_thread.c ============================================================================== --- stable/10/sys/kern/kern_thread.c Sat May 16 08:12:00 2015 (r283003) +++ stable/10/sys/kern/kern_thread.c Sat May 16 09:13:56 2015 (r283004) @@ -758,6 +758,29 @@ stopme: PROC_LOCK(p); PROC_SLOCK(p); } + } else if (mode == SINGLE_BOUNDARY) { + /* + * Wait until all suspended threads are removed from + * the processors. The thread_suspend_check() + * increments p_boundary_count while it is still + * running, which makes it possible for the execve() + * to destroy vmspace while our other threads are + * still using the address space. + * + * We lock the thread, which is only allowed to + * succeed after context switch code finished using + * the address space. + */ + FOREACH_THREAD_IN_PROC(p, td2) { + if (td2 == td) + continue; + thread_lock(td2); + KASSERT((td2->td_flags & TDF_BOUNDARY) != 0, + ("td %p not on boundary", td2)); + KASSERT(TD_IS_SUSPENDED(td2), + ("td %p is not suspended", td2)); + thread_unlock(td2); + } } PROC_SUNLOCK(p); return (0); From owner-svn-src-stable@FreeBSD.ORG Sat May 16 15:44:15 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D27F3176; Sat, 16 May 2015 15:44:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 BBB6E13C1; Sat, 16 May 2015 15:44:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GFiFj7039750; Sat, 16 May 2015 15:44:15 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GFiEfq039738; Sat, 16 May 2015 15:44:14 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505161544.t4GFiEfq039738@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 16 May 2015 15:44: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: r283010 - in stable/10: contrib/gcclibs/libgomp contrib/gcclibs/libgomp/config/bsd contrib/gcclibs/libgomp/config/linux contrib/gcclibs/libgomp/config/mingw32 contrib/gcclibs/libgomp/co... 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 15:44:15 -0000 Author: pfg Date: Sat May 16 15:44:13 2015 New Revision: 283010 URL: https://svnweb.freebsd.org/changeset/base/283010 Log: MFC r282115, r282152, r282201 MFV r282150 libgomp: Update to version 4.3.5. bring initial BSD support from upstream. This was not meant to be MFC'd at first but the original OMP support for FreeBSD was in very poor shape. The effect of this change should be minimal as all ports are already using the version of libgomp that comes with the gcc ports. The local libgomp is planned to be disabled for platforms that are not using older gcc by default so this version of libgomp will not be shipped in tier-1 platform releases. Discussed with: emaste Added: stable/10/contrib/gcclibs/libgomp/ChangeLog.gcc44 - copied unchanged from r282201, head/contrib/gcclibs/libgomp/ChangeLog.gcc44 stable/10/contrib/gcclibs/libgomp/config/bsd/ - copied from r282201, head/contrib/gcclibs/libgomp/config/bsd/ stable/10/contrib/gcclibs/libgomp/config/linux/affinity.c - copied unchanged from r282152, head/contrib/gcclibs/libgomp/config/linux/affinity.c stable/10/contrib/gcclibs/libgomp/config/linux/proc.c - copied unchanged from r282152, head/contrib/gcclibs/libgomp/config/linux/proc.c stable/10/contrib/gcclibs/libgomp/config/mingw32/proc.c - copied unchanged from r282152, head/contrib/gcclibs/libgomp/config/mingw32/proc.c stable/10/contrib/gcclibs/libgomp/config/posix/affinity.c - copied unchanged from r282152, head/contrib/gcclibs/libgomp/config/posix/affinity.c Modified: stable/10/contrib/gcclibs/libgomp/ChangeLog stable/10/contrib/gcclibs/libgomp/Makefile.am stable/10/contrib/gcclibs/libgomp/Makefile.in stable/10/contrib/gcclibs/libgomp/aclocal.m4 stable/10/contrib/gcclibs/libgomp/config.h.in stable/10/contrib/gcclibs/libgomp/configure stable/10/contrib/gcclibs/libgomp/configure.ac stable/10/contrib/gcclibs/libgomp/configure.tgt stable/10/contrib/gcclibs/libgomp/env.c stable/10/contrib/gcclibs/libgomp/iter.c stable/10/contrib/gcclibs/libgomp/libgomp.h stable/10/contrib/gcclibs/libgomp/libgomp.texi stable/10/contrib/gcclibs/libgomp/omp.h.in stable/10/contrib/gcclibs/libgomp/omp_lib.h.in stable/10/contrib/gcclibs/libgomp/team.c stable/10/gnu/lib/libgomp/Makefile stable/10/gnu/lib/libgomp/config.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/gcclibs/libgomp/ChangeLog ============================================================================== --- stable/10/contrib/gcclibs/libgomp/ChangeLog Sat May 16 13:11:35 2015 (r283009) +++ stable/10/contrib/gcclibs/libgomp/ChangeLog Sat May 16 15:44:13 2015 (r283010) @@ -1,6 +1,223 @@ -2007-07-19 Release Manager +2010-05-22 Release Manager - * GCC 4.2.1 released. + * GCC 4.3.5 released. + +2010-05-06 Ralf Wildenhues + + PR other/43620 + * configure.ac (AM_INIT_AUTOMAKE): Add no-dist. + * configure: Regenerate. + * aclocal.m4: Regenerate. + * config.h.in: Regenerate. + * Makefile.in: Regenerate. + * testsuite/Makefile.in: Regenerate. + +2009-08-19 Tobias Burnus + + PR fortran/41102 + omp_lib.h.in: Fix -std=f95 errors. + +2009-08-14 Uros Bizjak + + Backport from mainline: + 2008-12-26 Uros Bizjak + + * testsuite/libgomp.c/atomic-6.c: Add -mieee for alpha*-*-* targets. + +2009-08-04 Release Manager + + * GCC 4.3.4 released. + +2009-01-24 Release Manager + + * GCC 4.3.3 released. + +2008-12-05 Janis Johnson + + Backport from mainline: + 2008-05-15 Janis Johnson + + * testsuite/lib/libgomp.exp: Load new torture support. + +2008-12-02 Janis Johnson + + Backport from mainline: + 2008-11-26 Janis Johnson + + PR testsuite/28870 + * testsuite/lib/libgomp.exp: Include new timeout library files. + (libgomp_target_compile): Set timeout value from new proc. + +2008-08-27 Release Manager + + * GCC 4.3.2 released. + +2008-06-12 Jakub Jelinek + + PR middle-end/36506 + * testsuite/libgomp.c/reduction-5.c: New test. + +2008-06-06 Release Manager + + * GCC 4.3.1 released. + +2008-05-23 Jakub Jelinek + + PR c++/36308 + * testsuite/libgomp.c++/ctor-11.C: New test. + * testsuite/libgomp.c++/ctor-12.C: New test. + +2008-05-07 Jakub Jelinek + + PR middle-end/36106 + * testsuite/libgomp.c/atomic-5.c: New test. + * testsuite/libgomp.c/atomic-6.c: New test. + * testsuite/libgomp.c/autopar-1.c: New test. + +2008-03-18 Jakub Jelinek + + PR middle-end/35611 + * testsuite/libgomp.c/atomic-4.c: New test. + + PR libgomp/35625 + * iter.c (gomp_iter_guided_next_locked): If q > n, set end to ws->end. + (gomp_iter_guided_next): Likewise. + * testsuite/libgomp.c/pr35625.c: New test. + +2008-03-13 Jakub Jelinek + + PR middle-end/35185 + * testsuite/libgomp.c++/pr35185.C: New test. + +2008-03-12 Jakub Jelinek + + PR middle-end/35549 + * testsuite/libgomp.c/pr35549.c: New test. + +2008-03-06 Jakub Jelinek + + * testsuite/libgomp.c/atomic-3.c: New test. + +2008-03-05 Release Manager + + * GCC 4.3.0 released. + +2008-02-15 Jakub Jelinek + + PR middle-end/35196 + * testsuite/libgomp.c/pr35196.c: New test. + + PR middle-end/35130 + * testsuite/libgomp.fortran/pr35130.f90: New test. + * testsuite/libgomp.c/pr35130.c: New test. + +2008-01-25 Jakub Jelinek + + PR middle-end/33880 + * testsuite/libgomp.c/pr33880.c: New test. + * testsuite/libgomp.fortran/pr33880.f90: New test. + +2008-01-24 David Edelsohn + + * configure: Regenerate. + +2008-01-08 Jakub Jelinek + + * configure.ac: Move futex checking into ../config/futex.m4. + * configure: Rebuilt. + * aclocal.m4: Rebuilt. + * Makefile.in: Rebuilt. + + * configure.tgt: Rename have_tls to gcc_cv_have_tls to match + 2007-10-15 ../config/tls.m4 change. + +2007-12-19 Jakub Jelinek + + PR c++/34513 + * testsuite/libgomp.c/pr34513.c: New test. + * testsuite/libgomp.c++/pr34513.C: New test. + +2007-12-17 Jack Howarth + + PR target/32765 + * testsuite/libgomp.fortran/crayptr2.f90: Move dg-options for darwin. + +2007-12-04 Jakub Jelinek + + * omp.h.in (__GOMP_NOTHROW): Define. Use it on omp_* prototypes. + +2007-12-03 Jakub Jelinek + + * testsuite/libgomp.c/private-1.c: New test. + +2007-11-29 Andris Pavenis + Paolo Bonzini + + * Makefile.am: Use space as vpath separator. Use 'vpath %' + instead of 'VPATH ='. + * Makefile.in: Regenerate. + +2007-11-23 Matthias Klose + + * configure.ac: Adjust makeinfo version check. + * configure: Regenerate. + +2007-11-10 Jakub Jelinek + + PR fortran/34020 + * testsuite/libgomp.fortran/pr34020.f90: New test. + +2007-11-06 Jakub Jelinek + + PR c++/33894 + * testsuite/libgomp.c++/atomic-1.C: New test. + +2007-10-25 Jakub Jelinek + + PR libgomp/33275 + * testsuite/libgomp.fortran/omp_parse3.f90 (test_threadprivate): + Make x and y integers rather than (implicit) reals. Add private (j) + clause to the last omp parallel. + +2007-10-15 Maciej W. Rozycki + + * configure: Regenerate following changes to ../config/tls.m4. + +2007-09-28 Jakub Jelinek + + * testsuite/libgomp.fortran/stack.f90: New test. + +2007-09-10 Danny Smith + + * config/mingw32/proc.c: New file. + +2007-09-05 Uros Bizjak + + * testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets. + (main): Use __get_cpuid to get i386 target fetaures. + * testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets. + (main): Use __get_cpuid to get x86_64 target fetaures. + +2007-08-15 Jack Howarth + + PR target/32765 + * testsuite/libgomp.fortran/pr32550.f90: Use -static-libgcc on Darwin. + * testsuite/libgomp.fortran/crayptr2.f90: Likwise. + +2007-07-12 Jakub Jelinek + + PR fortran/32550 + * testsuite/libgomp.fortran/pr32550.f90: New test. + * testsuite/libgomp.fortran/crayptr2.f90: New test. + +2007-07-05 H.J. Lu + + * aclocal.m4: Regenerated. + +2007-07-05 Tobias Burnus + + PR fortran/32359 + * testsuite/libgomp.fortran/pr32359.f90: New. 2007-07-02 Jakub Jelinek @@ -21,9 +238,117 @@ * testsuite/libgomp.c/pr32362-2.c: New test. * testsuite/libgomp.c/pr32362-3.c: New test. -2007-05-13 Release Manager +2007-06-07 Jakub Jelinek + + * team.c (gomp_team_start): Fix setting up thread_attr + stack size. + +2007-06-02 Paolo Bonzini + + * configure: Regenerate. + +2007-05-23 Steve Ellcey + + * Makefile.in: Regenerate. + * configure: Regenerate. + * aclocal.m4: Regenerate. + * testsuite/Makefile.in: Regenerate. + +2007-05-04 Jakub Jelinek + + * config/linux/proc.c: New file. + + PR libgomp/28482 + * configure.tgt: Don't link with -Wl,-z,nodlopen even on Linux. + +2007-04-19 Daniel Franke + + * libgomp.texi (GOMP_CPU_AFFINITY): Updated. - * GCC 4.2.0 released. +2007-04-16 Matthias Klose + + * configure.tgt (i[456]86-*-linux*): Only add ia32 specific + flags if not building with -m64. + * testsuite/lib/libgomp-dg.exp (libgomp_init): Don't add -march + flag for i?86-*-* targets, if current target matches -m64. + +2007-04-14 Steve Ellcey + + * Makefile.am: Add -I .. to ACLOCAL_AMFLAGS. + * Makefile.in: Regenerate. + +2007-04-07 John David Anglin + + PR testsuite/31369 + * testsuite/libgomp.c++/c++.exp: Don't use concat when setting + ld_library_path. + * testsuite/libgomp.fortran/fortran.exp: Likewise. + +2007-04-04 Jakub Jelinek + + * libgomp.h (gomp_cpu_affinity, gomp_cpu_affinity_len): New extern + decls. + (gomp_init_affinity, gomp_init_thread_affinity): New prototypes. + * env.c (gomp_cpu_affinity, gomp_cpu_affinity_len): New variables. + (parse_affinity): New function. + (initialize_env): Call it and gomp_init_affinity. + * team.c (gomp_team_start): If gomp_cpu_affinity != NULL, + create new pthread_attr_t and call gomp_init_thread_affinity + on it for each thread before passing the attribute to pthread_create. + * config/linux/affinity.c: New file. + * config/posix/affinity.c: New file. + * configure.ac (HAVE_PTHREAD_AFFINITY_NP): New test. + * configure: Rebuilt. + * config.h.in: Rebuilt. + * Makefile.am (libgomp_la_SOURCES): Add affinity.c. + * Makefile.in: Rebuilt. + +2007-03-23 Andreas Tobler + + * testsuite/lib/libgomp.exp (libgomp_init): Add -shared-libgcc for + *-*-darwin*. + * testsuite/libgomp.c++/c++.exp: Look for shared libstdc++ library + and use it if found. + +2007-03-18 Uros Bizjak + + * testsuite/config/default.exp: New file. + * testsuite/lib/libgomp.exp: New file. + * testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init, + libgomp_target_compile, libgomp_option_help, libgomp_option_proc, + load_lib *, load_gcc_lib *): Move to libgomp.exp. + (libgomp_load): Remove. + * testsuite/lib/libgomp.exp (libgomp_init): Compute + always_ld_library_path, not ld_library_path. Set additional_flags + to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets. + (target_compile): Do not call libgomp_init. Append lang_library_path + and lang_link_flags to options. + * testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2. Set + ld_library_path from always_ld_library_path. Set LD_LIBRARY_PATH + here. + * testsuite/libgomp.c++/c++.exp: Set ld_library_path from + always_ld_library_path. Set LD_LIBRARY_PATH here. + * testsuite/libgomp.fortran/fortran.exp: Ditto. + * testsuite/libgomp.c/atomic-1.c: Set dg-options to + "-O2 -march=pentium" for ilp32 x86 targets. Simplify check for + CX8 flag. + * testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for + lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3. + * testsuite/libgomp.c/pr29947-1.c: Remove default dg-options. + * testsuite/libgomp.c/pr29947-1.c: Ditto. + * testsuite/libgomp.c/atomic-10.c: Ditto. + +2007-03-21 Jakub Jelinek + + * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: Add + dg-final cleanup-modules line. + * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Likewise. + * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: Likewise. + * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: Likewise. + * testsuite/libgomp.fortran/threadprivate2.f90: Likewise. + * testsuite/libgomp.fortran/reduction5.f90: Likewise. + * testsuite/libgomp.fortran/threadprivate3.f90: Likewise. + * testsuite/libgomp.fortran/threadprivate1.f90: Likewise. 2007-03-18 Andreas Schwab @@ -31,15 +356,32 @@ extraction. * configure: Regenerate. +2007-03-01 Brooks Moses + + * Makefile.am: Add install-pdf target as copied from + automake v1.10 rules. + * Makefile.in: Regenerate + 2007-02-07 Jakub Jelinek + PR libgomp/28486 + * configure: Regenerate. + PR c++/30703 * testsuite/libgomp.c++/pr30703.C: New test. -2007-02-07 Daniel Franke +2007-02-02 Jakub Jelinek - Backport from mainline: - 2007-01-31 Daniel Franke + Revert: + 2006-07-05 Eric Christopher + * configure.ac: Depend addition of -pthread on host OS. + * configure: Regenerate. + +2007-01-31 Ralf Wildenhues + + * libgomp.texi: Fix spacing after abbreviations. + +2007-01-31 Daniel Franke PR libgomp/30546 * configure.ac: Add check for makeinfo @@ -50,74 +392,47 @@ * Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. -2007-02-07 Daniel Franke - - Backport from mainline: - 2007-01-31 Ralf Wildenhues - - * libgomp.texi: Fix spacing after abbreviations. - - Backport from mainline: - 2007-01-29 Daniel Franke +2007-01-29 Daniel Franke PR libgomp/30540 * libgomp.texi: More about implementation-dependent settings. -2007-02-06 Roger Sayle +2007-01-26 Tobias Burnus - PR libgomp/28296 - Backport from mainline. - Revert: - 2006-07-05 Eric Christopher - * configure.ac: Depend addition of -pthread on host OS. - * configure: Regenerate. + * testsuite/libgomp.fortran/fortran.exp: Support .f03 extension. -2007-01-30 Tobias Burnus +2007-01-24 Jakub Jelinek - Backport from mainline. - 2007-01-26 Tobias Burnus + PR middle-end/30494 + * testsuite/libgomp.c/pr30494.c: New test. - * testsuite/libgomp.fortran/fortran.exp: Support .f03 extension. +2007-01-15 Tom Tromey -2007-01-25 Daniel Franke + * configure: Rebuilt. + * configure.ac: Fixed comment. - Backport from mainline: - 2006-12-21 Daniel Franke +2007-01-14 Daniel Franke + + * libgomp.texi: Document implementation specific default values of + environment variables. + +2006-12-21 Daniel Franke PR libgomp/28209 * libgomp.texi: New file. * configure.ac: Add --enable-generated-files-in-srcdir option. - * Makefile.am: Add info, dvi, pdf, html targets. On request, - copy files to srcdir. + * Makefile.am: Add info, dvi, pdf, html targets. On request, copy + files to srcdir. * Makefile.in: Regenerated. + * config.h.in: Regenerated. * testsuite/Makefile.in: Regenerated. * NOTES: Removed. - Backport from mainline: - 2007-01-14 Daniel Franke - * libgomp.texi: Document implementation specific default values of - environment variables. - -2007-01-24 Jakub Jelinek - - PR middle-end/30494 - * testsuite/libgomp.c/pr30494.c: New test. - -2006-12-18 Daniel Franke - - Backport from mainline: - 2006-12-04 Daniel Franke +2006-12-04 Daniel Franke PR libgomp/29949 * env.c (omp_set_num_threads): Set illegal thread count to 1. - Backport from mainline: - 2006-11-09 Uros Bizjak - - * env.c (parse_schedule): Reject out of range values. - (parse_unsigned_long): Reject out of range, negative - or zero values. - 2006-12-04 Eric Botcazou * configure: Regenerate. @@ -135,6 +450,15 @@ * configure.tgt: Force initial-exec TLS model on Linux only. +2006-11-13 Daniel Jacobowitz + + * configure: Regenerated. + +2006-11-09 Uros Bizjak + + * env.c (parse_schedule): Reject out of range values. + (parse_unsigned_long): Reject out of range, negative or zero values. + 2006-10-29 Jakub Jelinek PR fortran/29629 Copied: stable/10/contrib/gcclibs/libgomp/ChangeLog.gcc44 (from r282201, head/contrib/gcclibs/libgomp/ChangeLog.gcc44) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/gcclibs/libgomp/ChangeLog.gcc44 Sat May 16 15:44:13 2015 (r283010, copy of r282201, head/contrib/gcclibs/libgomp/ChangeLog.gcc44) @@ -0,0 +1,8 @@ +2008-09-19 Jakub Jelinek (r140497) + Andreas Tobler + + * config/bsd/proc.c: New file. + * configure.tgt (*-*-darwin*): Use config_path "darwin posix". + * configure.ac: Check for header + * configure: Regenerate. + * config.h.in: Likewise. Modified: stable/10/contrib/gcclibs/libgomp/Makefile.am ============================================================================== --- stable/10/contrib/gcclibs/libgomp/Makefile.am Sat May 16 13:11:35 2015 (r283009) +++ stable/10/contrib/gcclibs/libgomp/Makefile.am Sat May 16 15:44:13 2015 (r283010) @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -ACLOCAL_AMFLAGS = -I ../config +ACLOCAL_AMFLAGS = -I .. -I ../config SUBDIRS = testsuite ## May be used by toolexeclibdir. @@ -12,9 +12,7 @@ search_path = $(addprefix $(top_srcdir)/ fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include -empty = -space = $(empty) $(empty) -VPATH = $(subst $(space),:,$(strip $(search_path))) +vpath % $(strip $(search_path)) AM_CPPFLAGS = $(addprefix -I, $(search_path)) AM_CFLAGS = $(XCFLAGS) @@ -33,7 +31,7 @@ libgomp_la_LDFLAGS = $(libgomp_version_i libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \ loop.c ordered.c parallel.c sections.c single.c team.c work.c \ - lock.c mutex.c proc.c sem.c bar.c time.c fortran.c + lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c nodist_noinst_HEADERS = libgomp_f.h nodist_libsubinclude_HEADERS = omp.h @@ -51,10 +49,19 @@ env.lo: libgomp_f.h env.o: libgomp_f.h -# No install-html target -.PHONY: install-html +# No install-html or install-pdf support in automake yet +.PHONY: install-html install-pdf install-html: +install-pdf: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ + done # Automake Documentation: # If your package has Texinfo files in many directories, you can use the Modified: stable/10/contrib/gcclibs/libgomp/Makefile.in ============================================================================== --- stable/10/contrib/gcclibs/libgomp/Makefile.in Sat May 16 13:11:35 2015 (r283009) +++ stable/10/contrib/gcclibs/libgomp/Makefile.in Sat May 16 15:44:13 2015 (r283010) @@ -17,6 +17,7 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -37,24 +38,27 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(am__configure_deps) $(srcdir)/../config.guess \ - $(srcdir)/../config.sub $(srcdir)/../depcomp \ - $(srcdir)/../install-sh $(srcdir)/../ltmain.sh \ - $(srcdir)/../missing $(srcdir)/../mkinstalldirs \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(srcdir)/libgomp.spec.in \ - $(srcdir)/libgomp_f.h.in $(srcdir)/omp.h.in \ - $(srcdir)/omp_lib.f90.in $(srcdir)/omp_lib.h.in \ - $(top_srcdir)/configure ChangeLog +DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub \ + ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in $(srcdir)/../mkinstalldirs \ + $(srcdir)/omp.h.in $(srcdir)/omp_lib.h.in \ + $(srcdir)/omp_lib.f90.in $(srcdir)/libgomp_f.h.in \ + $(srcdir)/libgomp.spec.in $(srcdir)/../depcomp \ + $(srcdir)/../ltmain.sh $(srcdir)/../config.guess \ + $(srcdir)/../config.sub subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/enable.m4 \ + $(top_srcdir)/../config/futex.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/multi.m4 \ $(top_srcdir)/../config/stdint.m4 \ - $(top_srcdir)/../config/tls.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../ltoptions.m4 \ + $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ + $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -79,21 +83,20 @@ libgomp_la_LIBADD = am_libgomp_la_OBJECTS = alloc.lo barrier.lo critical.lo env.lo \ error.lo iter.lo loop.lo ordered.lo parallel.lo sections.lo \ single.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo \ - bar.lo time.lo fortran.lo + bar.lo time.lo fortran.lo affinity.lo libgomp_la_OBJECTS = $(am_libgomp_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/../depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libgomp_la_SOURCES) -DIST_SOURCES = $(libgomp_la_SOURCES) MULTISRCTOP = MULTIBUILDTOP = MULTIDIRS = @@ -126,18 +129,6 @@ HEADERS = $(nodist_finclude_HEADERS) $(n ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -VPATH = $(subst $(space),:,$(strip $(search_path))) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ @@ -157,6 +148,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ @@ -164,12 +156,15 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FC = @FC@ FCFLAGS = @FCFLAGS@ +FGREP = @FGREP@ GENINSRC_FALSE = @GENINSRC_FALSE@ GENINSRC_TRUE = @GENINSRC_TRUE@ +GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE = @LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@ LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE = @LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ @@ -182,6 +177,7 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +NM = @NM@ OBJEXT = @OBJEXT@ OMP_LOCK_ALIGN = @OMP_LOCK_ALIGN@ OMP_LOCK_KIND = @OMP_LOCK_KIND@ @@ -200,6 +196,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ SECTION_LDFLAGS = @SECTION_LDFLAGS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -210,6 +207,7 @@ XCFLAGS = @XCFLAGS@ XLDFLAGS = @XLDFLAGS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_FC = @ac_ct_FC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ @@ -244,6 +242,7 @@ libexecdir = @libexecdir@ libtool_VERSION = @libtool_VERSION@ link_gomp = @link_gomp@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ multi_basedir = @multi_basedir@ @@ -260,14 +259,12 @@ target_os = @target_os@ target_vendor = @target_vendor@ toolexecdir = @toolexecdir@ toolexeclibdir = @toolexeclibdir@ -ACLOCAL_AMFLAGS = -I ../config +ACLOCAL_AMFLAGS = -I .. -I ../config SUBDIRS = testsuite gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir) fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include -empty = -space = $(empty) $(empty) AM_CPPFLAGS = $(addprefix -I, $(search_path)) AM_CFLAGS = $(XCFLAGS) AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS) @@ -279,7 +276,7 @@ libgomp_version_info = -version-info $(l libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \ loop.c ordered.c parallel.c sections.c single.c team.c work.c \ - lock.c mutex.c proc.c sem.c bar.c time.c fortran.c + lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c nodist_noinst_HEADERS = libgomp_f.h nodist_libsubinclude_HEADERS = omp.h @@ -406,6 +403,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/affinity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/barrier.Plo@am__quote@ @@ -733,152 +731,6 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/. $(distdir)/.. $(distdir)/../config - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-info - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(INFO_DEPS) $(LTLIBRARIES) all-multi $(HEADERS) \ @@ -1011,16 +863,13 @@ uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-local \ all-multi am--refresh check check-am clean clean-generic \ clean-libtool clean-multi clean-recursive \ - clean-toolexeclibLTLIBRARIES ctags ctags-recursive dist \ - dist-all dist-bzip2 dist-gzip dist-info dist-shar dist-tarZ \ - dist-zip distcheck distclean distclean-compile \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-multi distclean-recursive distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-multi \ - install-nodist_fincludeHEADERS \ + clean-toolexeclibLTLIBRARIES ctags ctags-recursive dist-info \ + distclean distclean-compile distclean-generic distclean-hdr \ + distclean-libtool distclean-multi distclean-recursive \ + distclean-tags dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-multi install-nodist_fincludeHEADERS \ install-nodist_libsubincludeHEADERS \ install-nodist_toolexeclibHEADERS install-strip \ install-toolexeclibLTLIBRARIES installcheck installcheck-am \ @@ -1036,6 +885,8 @@ uninstall-info: uninstall-info-recursive uninstall-toolexeclibLTLIBRARIES +vpath % $(strip $(search_path)) + omp_lib_kinds.mod: omp_lib.mod : omp_lib.mod: omp_lib.f90 @@ -1045,10 +896,20 @@ fortran.o: libgomp_f.h env.lo: libgomp_f.h env.o: libgomp_f.h -# No install-html target -.PHONY: install-html +# No install-html or install-pdf support in automake yet +.PHONY: install-html install-pdf install-html: +install-pdf: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ + done + all-local: $(STAMP_GENINSRC) stamp-geninsrc: libgomp.info Modified: stable/10/contrib/gcclibs/libgomp/aclocal.m4 ============================================================================== --- stable/10/contrib/gcclibs/libgomp/aclocal.m4 Sat May 16 13:11:35 2015 (r283009) +++ stable/10/contrib/gcclibs/libgomp/aclocal.m4 Sat May 16 15:44:13 2015 (r283010) @@ -859,8 +859,13 @@ AC_SUBST([am__untar]) m4_include([../config/acx.m4]) m4_include([../config/depstand.m4]) m4_include([../config/enable.m4]) +m4_include([../config/futex.m4]) m4_include([../config/lead-dot.m4]) m4_include([../config/multi.m4]) m4_include([../config/stdint.m4]) m4_include([../config/tls.m4]) +m4_include([../ltoptions.m4]) +m4_include([../ltsugar.m4]) +m4_include([../ltversion.m4]) +m4_include([../lt~obsolete.m4]) m4_include([acinclude.m4]) Modified: stable/10/contrib/gcclibs/libgomp/config.h.in ============================================================================== --- stable/10/contrib/gcclibs/libgomp/config.h.in Sat May 16 13:11:35 2015 (r283009) +++ stable/10/contrib/gcclibs/libgomp/config.h.in Sat May 16 15:44:13 2015 (r283010) @@ -12,9 +12,15 @@ /* Define if the POSIX Semaphores do not work on your system. */ #undef HAVE_BROKEN_POSIX_SEMAPHORES +/* Define to 1 if the target assembler supports thread-local storage. */ +#undef HAVE_CC_TLS + /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + /* Define to 1 if you have the `getloadavg' function. */ #undef HAVE_GETLOADAVG @@ -24,6 +30,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define if pthread_{,attr_}{g,s}etaffinity_np is supported. */ +#undef HAVE_PTHREAD_AFFINITY_NP + /* Define to 1 if you have the header file. */ #undef HAVE_SEMAPHORE_H @@ -48,6 +57,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSCTL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 16 22:06:42 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70769BDE; Sat, 16 May 2015 22:06:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 5DDA91A0C; Sat, 16 May 2015 22:06:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GM6grE031614; Sat, 16 May 2015 22:06:42 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GM6fLw031597; Sat, 16 May 2015 22:06:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201505162206.t4GM6fLw031597@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 May 2015 22:06:41 +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: r283015 - stable/10/contrib/llvm/patches 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 22:06:42 -0000 Author: dim Date: Sat May 16 22:06:40 2015 New Revision: 283015 URL: https://svnweb.freebsd.org/changeset/base/283015 Log: Bring the contrib/llvm/patches directory up-to-date. MFC r263892: Add the llvm/clang patch for r263891. MFC r264350: Update the llvm/clang patch for r264345. MFC r266675: Add the clang patch for r266674. MFC r275651: Add llvm patch corresponding to r275633. MFC r275747: Update llvm patches for r274286 and r275633 so all the tests will pass. MFC r275760: Add clang patch corresponding to r275759. MFC r275772: Update clang patch for r275759 to use correct test cases. Additionally: * Remove the clang patch corresponding to r263619, as ARM EABI hard-float support was never MFC'd. * Add clang patch corresponding to r279302. Added: stable/10/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff - copied unchanged from r264350, head/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff stable/10/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff - copied unchanged from r266675, head/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff stable/10/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff - copied, changed from r275651, head/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff stable/10/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff - copied, changed from r275760, head/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff stable/10/contrib/llvm/patches/patch-r279302-clang-r211785-add-fuse-ld.diff Deleted: stable/10/contrib/llvm/patches/patch-r263619-clang-r201662-arm-gnueabihf.diff Modified: stable/10/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff Directory Properties: stable/10/ (props changed) Copied: stable/10/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff (from r264350, head/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff Sat May 16 22:06:40 2015 (r283015, copy of r264350, head/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff) @@ -0,0 +1,20 @@ +This patch makes clang default to DWARF2 debug info format for FreeBSD. + +Introduced here: http://svnweb.freebsd.org/changeset/base/264345 + +Index: tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- tools/clang/lib/Driver/Tools.cpp ++++ tools/clang/lib/Driver/Tools.cpp +@@ -2627,8 +2635,9 @@ void Clang::ConstructJob(Compilation &C, const Job + CmdArgs.push_back("-gdwarf-4"); + else if (!A->getOption().matches(options::OPT_g0) && + !A->getOption().matches(options::OPT_ggdb0)) { +- // Default is dwarf-2 for darwin. +- if (getToolChain().getTriple().isOSDarwin()) ++ // Default is dwarf-2 for darwin and FreeBSD. ++ const llvm::Triple &Triple = getToolChain().getTriple(); ++ if (Triple.isOSDarwin() || Triple.getOS() == llvm::Triple::FreeBSD) + CmdArgs.push_back("-gdwarf-2"); + else + CmdArgs.push_back("-g"); Copied: stable/10/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff (from r266675, head/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff Sat May 16 22:06:40 2015 (r283015, copy of r266675, head/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff) @@ -0,0 +1,49 @@ +Pull in r209489 from upstream clang trunk (by Akira Hatanaka): + + Fix a bug in xmmintrin.h. + + The last step of _mm_cvtps_pi16 should use _mm_packs_pi32, which is a function + that reads two __m64 values and packs four 32-bit values into four 16-bit + values. + + + +Pull in r209559 from upstream clang trunk (by Akira Hatanaka): + + Recommit r209532 with -ffreestanding. + + This is a test case for r209489. + +Introduced here: http://svnweb.freebsd.org/changeset/base/266674 + +Index: tools/clang/lib/Headers/xmmintrin.h +=================================================================== +--- tools/clang/lib/Headers/xmmintrin.h ++++ tools/clang/lib/Headers/xmmintrin.h +@@ -903,7 +903,7 @@ _mm_cvtps_pi16(__m128 __a) + __a = _mm_movehl_ps(__a, __a); + __c = _mm_cvtps_pi32(__a); + +- return _mm_packs_pi16(__b, __c); ++ return _mm_packs_pi32(__b, __c); + } + + static __inline__ __m64 __attribute__((__always_inline__, __nodebug__)) +Index: tools/clang/test/Headers/xmmintrin.c +=================================================================== +--- tools/clang/test/Headers/xmmintrin.c ++++ tools/clang/test/Headers/xmmintrin.c +@@ -0,0 +1,13 @@ ++// RUN: %clang_cc1 %s -ffreestanding -triple x86_64-apple-macosx10.9.0 -emit-llvm -o - | FileCheck %s ++ ++#include ++ ++// Make sure the last step of _mm_cvtps_pi16 converts <4 x i32> to <4 x i16> by ++// checking that clang emits PACKSSDW instead of PACKSSWB. ++ ++// CHECK: define i64 @test_mm_cvtps_pi16 ++// CHECK: call x86_mmx @llvm.x86.mmx.packssdw ++ ++__m64 test_mm_cvtps_pi16(__m128 a) { ++ return _mm_cvtps_pi16(a); ++} Modified: stable/10/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff ============================================================================== --- stable/10/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff Sat May 16 21:24:32 2015 (r283014) +++ stable/10/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff Sat May 16 22:06:40 2015 (r283015) @@ -1,3 +1,14 @@ +Pull in r200383 from upstream llvm trunk (by David Majnemer): + + MC: Reorganize macro MC test along dialect lines + + This commit seeks to do two things: + - Run the surfeit of tests under the Darwin dialect. This ends up + affecting tests which assumed that spaces could deliminate arguments. + - The GAS dialect tests should limit their surface area to things that + could plausibly work under GAS. For example, Darwin style arguments + have no business being in such a test. + Pull in r201784 from upstream llvm trunk (by Benjamin Kramer): AsmParser: Disable Darwin-style macro argument expansion on non-darwin targets. @@ -53,3 +64,208 @@ Index: test/MC/AsmParser/exprs.s .macro check_expr .if ($0) != ($1) +Index: test/MC/AsmParser/macros.s (deleted) +=================================================================== +Index: test/MC/AsmParser/macros-darwin.s +=================================================================== +--- test/MC/AsmParser/macros-darwin.s ++++ test/MC/AsmParser/macros-darwin.s +@@ -1,9 +1,97 @@ +-// RUN: llvm-mc -triple i386-apple-darwin10 %s | FileCheck %s ++// RUN: not llvm-mc -triple i386-apple-darwin10 %s 2> %t.err | FileCheck %s ++// RUN: FileCheck --check-prefix=CHECK-ERRORS %s < %t.err + +-.macro test1 ++.macro .test0 ++.macrobody0 ++.endmacro ++.macro .test1 ++.test0 ++.endmacro ++ ++.test1 ++// CHECK-ERRORS: :1:1: error: unknown directive ++// CHECK-ERRORS-NEXT: macrobody0 ++// CHECK-ERRORS-NEXT: ^ ++// CHECK-ERRORS: :1:1: note: while in macro instantiation ++// CHECK-ERRORS-NEXT: .test0 ++// CHECK-ERRORS-NEXT: ^ ++// CHECK-ERRORS: 11:1: note: while in macro instantiation ++// CHECK-ERRORS-NEXT: .test1 ++// CHECK-ERRORS-NEXT: ^ ++ ++.macro test2 ++.byte $0 ++.endmacro ++// CHECK: .byte 10 ++test2 10 ++ ++.macro test3 + .globl "$0 $1 $2 $$3 $n" + .endmacro + + // CHECK: .globl "1 23 $3 2" +-test1 1, 2 3 ++test3 1, 2 3 + ++// CHECK: .globl "1 (23) $3 2" ++test3 1, (2 3) ++ ++// CHECK: .globl "12 $3 1" ++test3 1 2 ++ ++.macro test4 ++.globl "$0 -- $1" ++.endmacro ++ ++// CHECK: .globl "(ab)(,)) -- (cd)" ++test4 (a b)(,)),(cd) ++ ++// CHECK: .globl "(ab)(,)) -- (cd)" ++test4 (a b)(,)),(cd) ++ ++.macro test5 _a ++.globl "\_a" ++.endm ++ ++// CHECK: .globl zed1 ++test5 zed1 ++ ++.macro test6 $a ++.globl "\$a" ++.endm ++ ++// CHECK: .globl zed2 ++test6 zed2 ++ ++.macro test7 .a ++.globl "\.a" ++.endm ++ ++// CHECK: .globl zed3 ++test7 zed3 ++ ++.macro test8 _a, _b, _c ++.globl "\_a,\_b,\_c" ++.endmacro ++ ++.macro test9 _a _b _c ++.globl "\_a \_b \_c" ++.endmacro ++ ++// CHECK: .globl "a,b,c" ++test8 a, b, c ++// CHECK: .globl "%1,%2,%3" ++test8 %1, %2, %3 #a comment ++// CHECK: .globl "x-y,z,1" ++test8 x - y, z, 1 ++// CHECK: .globl "1 2 3" ++test9 1, 2,3 ++ ++test8 1,2 3 ++// CHECK-ERRORS: error: macro argument '_c' is missing ++// CHECK-ERRORS-NEXT: test8 1,2 3 ++// CHECK-ERRORS-NEXT: ^ ++ ++test8 1 2, 3 ++// CHECK-ERRORS: error: macro argument '_c' is missing ++// CHECK-ERRORS-NEXT:test8 1 2, 3 ++// CHECK-ERRORS-NEXT: ^ +Index: test/MC/AsmParser/macros-gas.s +=================================================================== +--- test/MC/AsmParser/macros-gas.s ++++ test/MC/AsmParser/macros-gas.s +@@ -0,0 +1,93 @@ ++// RUN: not llvm-mc -triple i386-linux-gnu %s 2> %t.err | FileCheck %s ++// RUN: FileCheck --check-prefix=CHECK-ERRORS %s < %t.err ++ ++.macro .test0 ++.macrobody0 ++.endm ++.macro .test1 ++.test0 ++.endm ++ ++.test1 ++// CHECK-ERRORS: :1:1: error: unknown directive ++// CHECK-ERRORS-NEXT: macrobody0 ++// CHECK-ERRORS-NEXT: ^ ++// CHECK-ERRORS: :1:1: note: while in macro instantiation ++// CHECK-ERRORS-NEXT: .test0 ++// CHECK-ERRORS-NEXT: ^ ++// CHECK-ERRORS: 11:1: note: while in macro instantiation ++// CHECK-ERRORS-NEXT: .test1 ++// CHECK-ERRORS-NEXT: ^ ++ ++.macro test2 _a ++.byte \_a ++.endm ++// CHECK: .byte 10 ++test2 10 ++ ++.macro test3 _a _b _c ++.ascii "\_a \_b \_c \\_c" ++.endm ++ ++// CHECK: .ascii "1 2 3 \003" ++test3 1, 2, 3 ++ ++// FIXME: test3 1, 2 3 should be treated like test 1, 2, 3 ++ ++// FIXME: remove the n argument from the remaining test3 examples ++// CHECK: .ascii "1 (23) n \n" ++test3 1, (2 3), n ++ ++// CHECK: .ascii "1 (23) n \n" ++test3 1 (2 3) n ++ ++// CHECK: .ascii "1 2 n \n" ++test3 1 2 n ++ ++.macro test5 _a ++.globl \_a ++.endm ++ ++// CHECK: .globl zed1 ++test5 zed1 ++ ++.macro test6 $a ++.globl \$a ++.endm ++ ++// CHECK: .globl zed2 ++test6 zed2 ++ ++.macro test7 .a ++.globl \.a ++.endm ++ ++// CHECK: .globl zed3 ++test7 zed3 ++ ++.macro test8 _a, _b, _c ++.ascii "\_a,\_b,\_c" ++.endm ++ ++.macro test9 _a _b _c ++.ascii "\_a \_b \_c" ++.endm ++ ++// CHECK: .ascii "a,b,c" ++test8 a, b, c ++// CHECK: .ascii "%1,%2,%3" ++test8 %1 %2 %3 #a comment ++// CHECK: .ascii "x-y,z,1" ++test8 x - y z 1 ++// CHECK: .ascii "1 2 3" ++test9 1, 2,3 ++ ++test8 1,2 3 ++// CHECK-ERRORS: error: macro argument '_c' is missing ++// CHECK-ERRORS-NEXT: test8 1,2 3 ++// CHECK-ERRORS-NEXT: ^ ++ ++test8 1 2, 3 ++// CHECK-ERRORS: error: expected ' ' for macro argument separator ++// CHECK-ERRORS-NEXT:test8 1 2, 3 ++// CHECK-ERRORS-NEXT: ^ Copied and modified: stable/10/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff (from r275651, head/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff) ============================================================================== --- head/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff Tue Dec 9 20:04:26 2014 (r275651, copy source) +++ stable/10/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff Sat May 16 22:06:40 2015 (r283015) @@ -1,3 +1,11 @@ +Pull in r223170 from upstream llvm trunk (by Michael Zolotukhin): + + Apply loop-rotate to several vectorizer tests. + + Such loops shouldn't be vectorized due to the loops form. + After applying loop-rotate (+simplifycfg) the tests again start to check + what they are intended to check. + Pull in r223171 from upstream llvm trunk (by Michael Zolotukhin): PR21302. Vectorize only bottom-tested loops. @@ -16,8 +24,8 @@ Introduced here: http://svnweb.freebsd.o Index: lib/Transforms/Vectorize/LoopVectorize.cpp =================================================================== ---- lib/Transforms/Vectorize/LoopVectorize.cpp (revision 21) -+++ lib/Transforms/Vectorize/LoopVectorize.cpp (revision 22) +--- lib/Transforms/Vectorize/LoopVectorize.cpp ++++ lib/Transforms/Vectorize/LoopVectorize.cpp @@ -2864,6 +2864,14 @@ bool LoopVectorizationLegality::canVectorize() { if (!TheLoop->getExitingBlock()) return false; @@ -35,11 +43,11 @@ Index: lib/Transforms/Vectorize/LoopVect TheLoop->getHeader()->getName() << '\n'); Index: test/Transforms/LoopVectorize/loop-form.ll =================================================================== ---- test/Transforms/LoopVectorize/loop-form.ll (revision 0) -+++ test/Transforms/LoopVectorize/loop-form.ll (revision 22) +--- test/Transforms/LoopVectorize/loop-form.ll ++++ test/Transforms/LoopVectorize/loop-form.ll @@ -0,0 +1,31 @@ +; RUN: opt -S -loop-vectorize < %s | FileCheck %s -+target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" ++target datalayout = "e-i64:64-f80:128-n8:16:32:64-S128" + +; Check that we vectorize only bottom-tested loops. +; This is a reduced testcase from PR21302. @@ -69,3 +77,453 @@ Index: test/Transforms/LoopVectorize/loo +if.end: + ret void +} +Index: test/Transforms/LoopVectorize/runtime-check-address-space.ll +=================================================================== +--- test/Transforms/LoopVectorize/runtime-check-address-space.ll ++++ test/Transforms/LoopVectorize/runtime-check-address-space.ll +@@ -31,25 +31,23 @@ define void @foo(i32 addrspace(1)* %a, i32 addrspa + ; CHECK: ret + + entry: +- br label %for.cond ++ %cmp1 = icmp slt i32 0, %n ++ br i1 %cmp1, label %for.body, label %for.end + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp slt i32 %i.0, %n +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %idxprom = sext i32 %i.0 to i64 ++for.body: ; preds = %entry, %for.body ++ %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] ++ %idxprom = sext i32 %i.02 to i64 + %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %idxprom + %0 = load i32 addrspace(1)* %arrayidx, align 4 + %mul = mul nsw i32 %0, 3 +- %idxprom1 = sext i32 %i.0 to i64 ++ %idxprom1 = sext i32 %i.02 to i64 + %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %idxprom1 + store i32 %mul, i32 addrspace(1)* %arrayidx2, align 4 +- %inc = add nsw i32 %i.0, 1 +- br label %for.cond ++ %inc = add nsw i32 %i.02, 1 ++ %cmp = icmp slt i32 %inc, %n ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body, %entry + ret void + } + +@@ -60,25 +58,23 @@ define void @bar0(i32* %a, i32 addrspace(1)* %b, i + ; CHECK: ret + + entry: +- br label %for.cond ++ %cmp1 = icmp slt i32 0, %n ++ br i1 %cmp1, label %for.body, label %for.end + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp slt i32 %i.0, %n +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %idxprom = sext i32 %i.0 to i64 ++for.body: ; preds = %entry, %for.body ++ %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] ++ %idxprom = sext i32 %i.02 to i64 + %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %idxprom + %0 = load i32 addrspace(1)* %arrayidx, align 4 + %mul = mul nsw i32 %0, 3 +- %idxprom1 = sext i32 %i.0 to i64 ++ %idxprom1 = sext i32 %i.02 to i64 + %arrayidx2 = getelementptr inbounds i32* %a, i64 %idxprom1 + store i32 %mul, i32* %arrayidx2, align 4 +- %inc = add nsw i32 %i.0, 1 +- br label %for.cond ++ %inc = add nsw i32 %i.02, 1 ++ %cmp = icmp slt i32 %inc, %n ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body, %entry + ret void + } + +@@ -89,25 +85,23 @@ define void @bar1(i32 addrspace(1)* %a, i32* %b, i + ; CHECK: ret + + entry: +- br label %for.cond ++ %cmp1 = icmp slt i32 0, %n ++ br i1 %cmp1, label %for.body, label %for.end + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp slt i32 %i.0, %n +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %idxprom = sext i32 %i.0 to i64 ++for.body: ; preds = %entry, %for.body ++ %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] ++ %idxprom = sext i32 %i.02 to i64 + %arrayidx = getelementptr inbounds i32* %b, i64 %idxprom + %0 = load i32* %arrayidx, align 4 + %mul = mul nsw i32 %0, 3 +- %idxprom1 = sext i32 %i.0 to i64 ++ %idxprom1 = sext i32 %i.02 to i64 + %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %idxprom1 + store i32 %mul, i32 addrspace(1)* %arrayidx2, align 4 +- %inc = add nsw i32 %i.0, 1 +- br label %for.cond ++ %inc = add nsw i32 %i.02, 1 ++ %cmp = icmp slt i32 %inc, %n ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body, %entry + ret void + } + +@@ -119,25 +113,23 @@ define void @bar2(i32* noalias %a, i32 addrspace(1 + ; CHECK: ret + + entry: +- br label %for.cond ++ %cmp1 = icmp slt i32 0, %n ++ br i1 %cmp1, label %for.body, label %for.end + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp slt i32 %i.0, %n +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %idxprom = sext i32 %i.0 to i64 ++for.body: ; preds = %entry, %for.body ++ %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] ++ %idxprom = sext i32 %i.02 to i64 + %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %idxprom + %0 = load i32 addrspace(1)* %arrayidx, align 4 + %mul = mul nsw i32 %0, 3 +- %idxprom1 = sext i32 %i.0 to i64 ++ %idxprom1 = sext i32 %i.02 to i64 + %arrayidx2 = getelementptr inbounds i32* %a, i64 %idxprom1 + store i32 %mul, i32* %arrayidx2, align 4 +- %inc = add nsw i32 %i.0, 1 +- br label %for.cond ++ %inc = add nsw i32 %i.02, 1 ++ %cmp = icmp slt i32 %inc, %n ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body, %entry + ret void + } + +@@ -149,25 +141,23 @@ define void @arst0(i32* %b, i32 %n) #0 { + ; CHECK: ret + + entry: +- br label %for.cond ++ %cmp1 = icmp slt i32 0, %n ++ br i1 %cmp1, label %for.body, label %for.end + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp slt i32 %i.0, %n +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %idxprom = sext i32 %i.0 to i64 ++for.body: ; preds = %entry, %for.body ++ %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] ++ %idxprom = sext i32 %i.02 to i64 + %arrayidx = getelementptr inbounds i32* %b, i64 %idxprom + %0 = load i32* %arrayidx, align 4 + %mul = mul nsw i32 %0, 3 +- %idxprom1 = sext i32 %i.0 to i64 ++ %idxprom1 = sext i32 %i.02 to i64 + %arrayidx2 = getelementptr inbounds [1024 x i32] addrspace(1)* @g_as1, i64 0, i64 %idxprom1 + store i32 %mul, i32 addrspace(1)* %arrayidx2, align 4 +- %inc = add nsw i32 %i.0, 1 +- br label %for.cond ++ %inc = add nsw i32 %i.02, 1 ++ %cmp = icmp slt i32 %inc, %n ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body, %entry + ret void + } + +@@ -180,25 +170,23 @@ define void @arst1(i32* %b, i32 %n) #0 { + ; CHECK: ret + + entry: +- br label %for.cond ++ %cmp1 = icmp slt i32 0, %n ++ br i1 %cmp1, label %for.body, label %for.end + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp slt i32 %i.0, %n +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %idxprom = sext i32 %i.0 to i64 ++for.body: ; preds = %entry, %for.body ++ %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] ++ %idxprom = sext i32 %i.02 to i64 + %arrayidx = getelementptr inbounds [1024 x i32] addrspace(1)* @g_as1, i64 0, i64 %idxprom + %0 = load i32 addrspace(1)* %arrayidx, align 4 + %mul = mul nsw i32 %0, 3 +- %idxprom1 = sext i32 %i.0 to i64 ++ %idxprom1 = sext i32 %i.02 to i64 + %arrayidx2 = getelementptr inbounds i32* %b, i64 %idxprom1 + store i32 %mul, i32* %arrayidx2, align 4 +- %inc = add nsw i32 %i.0, 1 +- br label %for.cond ++ %inc = add nsw i32 %i.02, 1 ++ %cmp = icmp slt i32 %inc, %n ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body, %entry + ret void + } + +@@ -210,25 +198,23 @@ define void @aoeu(i32 %n) #0 { + ; CHECK: ret + + entry: +- br label %for.cond ++ %cmp1 = icmp slt i32 0, %n ++ br i1 %cmp1, label %for.body, label %for.end + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i32 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp slt i32 %i.0, %n +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %idxprom = sext i32 %i.0 to i64 ++for.body: ; preds = %entry, %for.body ++ %i.02 = phi i32 [ %inc, %for.body ], [ 0, %entry ] ++ %idxprom = sext i32 %i.02 to i64 + %arrayidx = getelementptr inbounds [1024 x i32] addrspace(2)* @q_as2, i64 0, i64 %idxprom + %0 = load i32 addrspace(2)* %arrayidx, align 4 + %mul = mul nsw i32 %0, 3 +- %idxprom1 = sext i32 %i.0 to i64 ++ %idxprom1 = sext i32 %i.02 to i64 + %arrayidx2 = getelementptr inbounds [1024 x i32] addrspace(1)* @g_as1, i64 0, i64 %idxprom1 + store i32 %mul, i32 addrspace(1)* %arrayidx2, align 4 +- %inc = add nsw i32 %i.0, 1 +- br label %for.cond ++ %inc = add nsw i32 %i.02, 1 ++ %cmp = icmp slt i32 %inc, %n ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body, %entry + ret void + } + +Index: test/Transforms/LoopVectorize/runtime-check-readonly-address-space.ll +=================================================================== +--- test/Transforms/LoopVectorize/runtime-check-readonly-address-space.ll ++++ test/Transforms/LoopVectorize/runtime-check-readonly-address-space.ll +@@ -8,26 +8,24 @@ define void @add_ints_1_1_1(i32 addrspace(1)* %a, + ; CHECK-LABEL: @add_ints_1_1_1( + ; CHECK: <4 x i32> + ; CHECK: ret ++ + entry: +- br label %for.cond ++ br label %for.body + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp ult i64 %i.0, 200 +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.0 ++for.body: ; preds = %entry, %for.body ++ %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] ++ %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.01 + %0 = load i32 addrspace(1)* %arrayidx, align 4 +- %arrayidx1 = getelementptr inbounds i32 addrspace(1)* %c, i64 %i.0 ++ %arrayidx1 = getelementptr inbounds i32 addrspace(1)* %c, i64 %i.01 + %1 = load i32 addrspace(1)* %arrayidx1, align 4 + %add = add nsw i32 %0, %1 +- %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %i.0 ++ %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %i.01 + store i32 %add, i32 addrspace(1)* %arrayidx2, align 4 +- %inc = add i64 %i.0, 1 +- br label %for.cond ++ %inc = add i64 %i.01, 1 ++ %cmp = icmp ult i64 %inc, 200 ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body + ret void + } + +@@ -35,26 +33,24 @@ define void @add_ints_as_1_0_0(i32 addrspace(1)* % + ; CHECK-LABEL: @add_ints_as_1_0_0( + ; CHECK-NOT: <4 x i32> + ; CHECK: ret ++ + entry: +- br label %for.cond ++ br label %for.body + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp ult i64 %i.0, 200 +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %arrayidx = getelementptr inbounds i32* %b, i64 %i.0 ++for.body: ; preds = %entry, %for.body ++ %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] ++ %arrayidx = getelementptr inbounds i32* %b, i64 %i.01 + %0 = load i32* %arrayidx, align 4 +- %arrayidx1 = getelementptr inbounds i32* %c, i64 %i.0 ++ %arrayidx1 = getelementptr inbounds i32* %c, i64 %i.01 + %1 = load i32* %arrayidx1, align 4 + %add = add nsw i32 %0, %1 +- %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %i.0 ++ %arrayidx2 = getelementptr inbounds i32 addrspace(1)* %a, i64 %i.01 + store i32 %add, i32 addrspace(1)* %arrayidx2, align 4 +- %inc = add i64 %i.0, 1 +- br label %for.cond ++ %inc = add i64 %i.01, 1 ++ %cmp = icmp ult i64 %inc, 200 ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body + ret void + } + +@@ -62,26 +58,24 @@ define void @add_ints_as_0_1_0(i32* %a, i32 addrsp + ; CHECK-LABEL: @add_ints_as_0_1_0( + ; CHECK-NOT: <4 x i32> + ; CHECK: ret ++ + entry: +- br label %for.cond ++ br label %for.body + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp ult i64 %i.0, 200 +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.0 ++for.body: ; preds = %entry, %for.body ++ %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] ++ %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.01 + %0 = load i32 addrspace(1)* %arrayidx, align 4 +- %arrayidx1 = getelementptr inbounds i32* %c, i64 %i.0 ++ %arrayidx1 = getelementptr inbounds i32* %c, i64 %i.01 + %1 = load i32* %arrayidx1, align 4 + %add = add nsw i32 %0, %1 +- %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.0 ++ %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.01 + store i32 %add, i32* %arrayidx2, align 4 +- %inc = add i64 %i.0, 1 +- br label %for.cond ++ %inc = add i64 %i.01, 1 ++ %cmp = icmp ult i64 %inc, 200 ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body + ret void + } + +@@ -89,26 +83,24 @@ define void @add_ints_as_0_1_1(i32* %a, i32 addrsp + ; CHECK-LABEL: @add_ints_as_0_1_1( + ; CHECK-NOT: <4 x i32> + ; CHECK: ret ++ + entry: +- br label %for.cond ++ br label %for.body + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp ult i64 %i.0, 200 +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.0 ++for.body: ; preds = %entry, %for.body ++ %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] ++ %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.01 + %0 = load i32 addrspace(1)* %arrayidx, align 4 +- %arrayidx1 = getelementptr inbounds i32 addrspace(1)* %c, i64 %i.0 ++ %arrayidx1 = getelementptr inbounds i32 addrspace(1)* %c, i64 %i.01 + %1 = load i32 addrspace(1)* %arrayidx1, align 4 + %add = add nsw i32 %0, %1 +- %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.0 ++ %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.01 + store i32 %add, i32* %arrayidx2, align 4 +- %inc = add i64 %i.0, 1 +- br label %for.cond ++ %inc = add i64 %i.01, 1 ++ %cmp = icmp ult i64 %inc, 200 ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body + ret void + } + +@@ -116,26 +108,24 @@ define void @add_ints_as_0_1_2(i32* %a, i32 addrsp + ; CHECK-LABEL: @add_ints_as_0_1_2( + ; CHECK-NOT: <4 x i32> + ; CHECK: ret ++ + entry: +- br label %for.cond ++ br label %for.body + +-for.cond: ; preds = %for.body, %entry +- %i.0 = phi i64 [ 0, %entry ], [ %inc, %for.body ] +- %cmp = icmp ult i64 %i.0, 200 +- br i1 %cmp, label %for.body, label %for.end +- +-for.body: ; preds = %for.cond +- %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.0 ++for.body: ; preds = %entry, %for.body ++ %i.01 = phi i64 [ 0, %entry ], [ %inc, %for.body ] ++ %arrayidx = getelementptr inbounds i32 addrspace(1)* %b, i64 %i.01 + %0 = load i32 addrspace(1)* %arrayidx, align 4 +- %arrayidx1 = getelementptr inbounds i32 addrspace(2)* %c, i64 %i.0 ++ %arrayidx1 = getelementptr inbounds i32 addrspace(2)* %c, i64 %i.01 + %1 = load i32 addrspace(2)* %arrayidx1, align 4 + %add = add nsw i32 %0, %1 +- %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.0 ++ %arrayidx2 = getelementptr inbounds i32* %a, i64 %i.01 + store i32 %add, i32* %arrayidx2, align 4 +- %inc = add i64 %i.0, 1 +- br label %for.cond ++ %inc = add i64 %i.01, 1 ++ %cmp = icmp ult i64 %inc, 200 ++ br i1 %cmp, label %for.body, label %for.end + +-for.end: ; preds = %for.cond ++for.end: ; preds = %for.body + ret void + } + Copied and modified: stable/10/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff (from r275760, head/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff) ============================================================================== --- head/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff Sun Dec 14 13:40:42 2014 (r275760, copy source) +++ stable/10/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff Sat May 16 22:06:40 2015 (r283015) @@ -3,6 +3,18 @@ Pull in r221170 from upstream clang trun Implement vaarg lowering for ppc32. Lowering of scalars and aggregates is supported. Complex numbers are not. +Pull in r221174 from upstream clang trunk (by Roman Divacky): + + Require asserts to unbreak the buildbots. + +Pull in r221284 from upstream clang trunk (by Roman Divacky): + + Rewrite the test to not require asserts. + +Pull in r221285 from upstream clang trunk (by Roman Divacky): + + Since the file has both ppc and ppc64 tests in it rename it. + This adds va_args support for PowerPC (32 bit) to clang. Introduced here: http://svnweb.freebsd.org/changeset/base/275759 @@ -136,106 +148,151 @@ Index: tools/clang/test/CodeGen/ppc64-va =================================================================== --- tools/clang/test/CodeGen/ppc64-varargs-struct.c +++ tools/clang/test/CodeGen/ppc64-varargs-struct.c -@@ -1,5 +1,6 @@ - // REQUIRES: ppc64-registered-target - // RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s +@@ -1,30 +0,0 @@ +-// REQUIRES: ppc64-registered-target +-// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s +- +-#include +- +-struct x { +- long a; +- double b; +-}; +- +-void testva (int n, ...) +-{ +- va_list ap; +- +- struct x t = va_arg (ap, struct x); +-// CHECK: bitcast i8* %{{[a-z.0-9]*}} to %struct.x* +-// CHECK: bitcast %struct.x* %t to i8* +-// CHECK: bitcast %struct.x* %{{[0-9]+}} to i8* +-// CHECK: call void @llvm.memcpy +- +- int v = va_arg (ap, int); +-// CHECK: ptrtoint i8* %{{[a-z.0-9]*}} to i64 +-// CHECK: add i64 %{{[0-9]+}}, 4 +-// CHECK: inttoptr i64 %{{[0-9]+}} to i8* +-// CHECK: bitcast i8* %{{[0-9]+}} to i32* +- +- __int128_t u = va_arg (ap, __int128_t); +-// CHECK: bitcast i8* %{{[a-z.0-9]+}} to i128* +-// CHECK-NEXT: load i128* %{{[0-9]+}} +-} +Index: tools/clang/test/CodeGen/ppc-varargs-struct.c +=================================================================== +--- tools/clang/test/CodeGen/ppc-varargs-struct.c ++++ tools/clang/test/CodeGen/ppc-varargs-struct.c +@@ -0,0 +1,112 @@ ++// REQUIRES: ppc64-registered-target ++// REQUIRES: asserts ++// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-PPC - - #include - -@@ -17,6 +18,46 @@ void testva (int n, ...) - // CHECK: bitcast %struct.x* %t to i8* - // CHECK: bitcast %struct.x* %{{[0-9]+}} to i8* - // CHECK: call void @llvm.memcpy -+// CHECK-PPC: %arraydecay = getelementptr inbounds [1 x %struct.__va_list_tag]* %ap, i32 0, i32 0 -+// CHECK-PPC-NEXT: %gprptr = bitcast %struct.__va_list_tag* %arraydecay to i8* -+// CHECK-PPC-NEXT: %0 = ptrtoint i8* %gprptr to i32 -+// CHECK-PPC-NEXT: %1 = add i32 %0, 1 -+// CHECK-PPC-NEXT: %2 = inttoptr i32 %1 to i8* -+// CHECK-PPC-NEXT: %3 = add i32 %1, 3 -+// CHECK-PPC-NEXT: %4 = inttoptr i32 %3 to i8** -+// CHECK-PPC-NEXT: %5 = add i32 %3, 4 -+// CHECK-PPC-NEXT: %6 = inttoptr i32 %5 to i8** -+// CHECK-PPC-NEXT: %gpr = load i8* %gprptr -+// CHECK-PPC-NEXT: %fpr = load i8* %2 -+// CHECK-PPC-NEXT: %overflow_area = load i8** %4 -+// CHECK-PPC-NEXT: %7 = ptrtoint i8* %overflow_area to i32 -+// CHECK-PPC-NEXT: %regsave_area = load i8** %6 -+// CHECK-PPC-NEXT: %8 = ptrtoint i8* %regsave_area to i32 -+// CHECK-PPC-NEXT: %cond = icmp ult i8 %gpr, 8 -+// CHECK-PPC-NEXT: %9 = mul i8 %gpr, 4 -+// CHECK-PPC-NEXT: %10 = sext i8 %9 to i32 -+// CHECK-PPC-NEXT: %11 = add i32 %8, %10 -+// CHECK-PPC-NEXT: br i1 %cond, label %using_regs, label %using_overflow -+// -+// CHECK-PPC-LABEL:using_regs: ; preds = %entry -+// CHECK-PPC-NEXT: %12 = inttoptr i32 %11 to %struct.x* -+// CHECK-PPC-NEXT: %13 = add i8 %gpr, 1 -+// CHECK-PPC-NEXT: store i8 %13, i8* %gprptr -+// CHECK-PPC-NEXT: br label %cont -+// -+// CHECK-PPC-LABEL:using_overflow: ; preds = %entry -+// CHECK-PPC-NEXT: %14 = inttoptr i32 %7 to %struct.x* -+// CHECK-PPC-NEXT: %15 = add i32 %7, 4 -+// CHECK-PPC-NEXT: %16 = inttoptr i32 %15 to i8* -+// CHECK-PPC-NEXT: store i8* %16, i8** %4 -+// CHECK-PPC-NEXT: br label %cont -+// -+// CHECK-PPC-LABEL:cont: ; preds = %using_overflow, %using_regs -+// CHECK-PPC-NEXT: %vaarg.addr = phi %struct.x* [ %12, %using_regs ], [ %14, %using_overflow ] -+// CHECK-PPC-NEXT: %aggrptr = bitcast %struct.x* %vaarg.addr to i8** -+// CHECK-PPC-NEXT: %aggr = load i8** %aggrptr -+// CHECK-PPC-NEXT: %17 = bitcast %struct.x* %t to i8* -+// CHECK-PPC-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %17, i8* %aggr, i32 16, i32 8, i1 false) - - int v = va_arg (ap, int); - // CHECK: ptrtoint i8* %{{[a-z.0-9]*}} to i64 -@@ -23,8 +64,48 @@ void testva (int n, ...) - // CHECK: add i64 %{{[0-9]+}}, 4 - // CHECK: inttoptr i64 %{{[0-9]+}} to i8* - // CHECK: bitcast i8* %{{[0-9]+}} to i32* -+// CHECK-PPC: %arraydecay1 = getelementptr inbounds [1 x %struct.__va_list_tag]* %ap, i32 0, i32 0 -+// CHECK-PPC-NEXT: %gprptr2 = bitcast %struct.__va_list_tag* %arraydecay1 to i8* -+// CHECK-PPC-NEXT: %18 = ptrtoint i8* %gprptr2 to i32 -+// CHECK-PPC-NEXT: %19 = add i32 %18, 1 -+// CHECK-PPC-NEXT: %20 = inttoptr i32 %19 to i8* -+// CHECK-PPC-NEXT: %21 = add i32 %19, 3 -+// CHECK-PPC-NEXT: %22 = inttoptr i32 %21 to i8** -+// CHECK-PPC-NEXT: %23 = add i32 %21, 4 -+// CHECK-PPC-NEXT: %24 = inttoptr i32 %23 to i8** -+// CHECK-PPC-NEXT: %gpr3 = load i8* %gprptr2 -+// CHECK-PPC-NEXT: %fpr4 = load i8* %20 -+// CHECK-PPC-NEXT: %overflow_area5 = load i8** %22 -+// CHECK-PPC-NEXT: %25 = ptrtoint i8* %overflow_area5 to i32 -+// CHECK-PPC-NEXT: %regsave_area6 = load i8** %24 -+// CHECK-PPC-NEXT: %26 = ptrtoint i8* %regsave_area6 to i32 -+// CHECK-PPC-NEXT: %cond7 = icmp ult i8 %gpr3, 8 -+// CHECK-PPC-NEXT: %27 = mul i8 %gpr3, 4 -+// CHECK-PPC-NEXT: %28 = sext i8 %27 to i32 -+// CHECK-PPC-NEXT: %29 = add i32 %26, %28 -+// CHECK-PPC-NEXT: br i1 %cond7, label %using_regs8, label %using_overflow9 -+// -+// CHECK-PPC-LABEL:using_regs8: ; preds = %cont -+// CHECK-PPC-NEXT: %30 = inttoptr i32 %29 to i32* -+// CHECK-PPC-NEXT: %31 = add i8 %gpr3, 1 -+// CHECK-PPC-NEXT: store i8 %31, i8* %gprptr2 -+// CHECK-PPC-NEXT: br label %cont10 -+// -+// CHECK-PPC-LABEL:using_overflow9: ; preds = %cont -+// CHECK-PPC-NEXT: %32 = inttoptr i32 %25 to i32* -+// CHECK-PPC-NEXT: %33 = add i32 %25, 4 -+// CHECK-PPC-NEXT: %34 = inttoptr i32 %33 to i8* -+// CHECK-PPC-NEXT: store i8* %34, i8** %22 -+// CHECK-PPC-NEXT: br label %cont10 -+// -+// CHECK-PPC-LABEL:cont10: ; preds = %using_overflow9, %using_regs8 -+// CHECK-PPC-NEXT: %vaarg.addr11 = phi i32* [ %30, %using_regs8 ], [ %32, %using_overflow9 ] -+// CHECK-PPC-NEXT: %35 = load i32* %vaarg.addr11 -+// CHECK-PPC-NEXT: store i32 %35, i32* %v, align 4 - ++ ++#include ++ ++struct x { ++ long a; ++ double b; ++}; ++ ++void testva (int n, ...) ++{ ++ va_list ap; ++ ++ struct x t = va_arg (ap, struct x); ++// CHECK: bitcast i8* %{{[a-z.0-9]*}} to %struct.x* ++// CHECK: bitcast %struct.x* %t to i8* ++// CHECK: bitcast %struct.x* %{{[0-9]+}} to i8* ++// CHECK: call void @llvm.memcpy ++// CHECK-PPC: [[ARRAYDECAY:%[a-z0-9]+]] = getelementptr inbounds [1 x %struct.__va_list_tag]* %ap, i32 0, i32 0 ++// CHECK-PPC-NEXT: [[GPRPTR:%[a-z0-9]+]] = bitcast %struct.__va_list_tag* [[ARRAYDECAY]] to i8* ++// CHECK-PPC-NEXT: [[ZERO:%[0-9]+]] = ptrtoint i8* [[GPRPTR]] to i32 ++// CHECK-PPC-NEXT: [[ONE:%[0-9]+]] = add i32 [[ZERO]], 1 ++// CHECK-PPC-NEXT: [[TWO:%[0-9]+]] = inttoptr i32 [[ONE]] to i8* ++// CHECK-PPC-NEXT: [[THREE:%[0-9]+]] = add i32 [[ONE]], 3 ++// CHECK-PPC-NEXT: [[FOUR:%[0-9]+]] = inttoptr i32 [[THREE]] to i8** ++// CHECK-PPC-NEXT: [[FIVE:%[0-9]+]] = add i32 [[THREE]], 4 ++// CHECK-PPC-NEXT: [[SIX:%[0-9]+]] = inttoptr i32 [[FIVE]] to i8** ++// CHECK-PPC-NEXT: [[GPR:%[a-z0-9]+]] = load i8* [[GPRPTR]] ++// CHECK-PPC-NEXT: [[FPR:%[a-z0-9]+]] = load i8* [[TWO]] ++// CHECK-PPC-NEXT: [[OVERFLOW_AREA:%[a-z_0-9]+]] = load i8** [[FOUR]] ++// CHECK-PPC-NEXT: [[SEVEN:%[0-9]+]] = ptrtoint i8* [[OVERFLOW_AREA]] to i32 ++// CHECK-PPC-NEXT: [[REGSAVE_AREA:%[a-z_0-9]+]] = load i8** [[SIX]] ++// CHECK-PPC-NEXT: [[EIGHT:%[0-9]+]] = ptrtoint i8* [[REGSAVE_AREA]] to i32 ++// CHECK-PPC-NEXT: [[COND:%[a-z0-9]+]] = icmp ult i8 [[GPR]], 8 ++// CHECK-PPC-NEXT: [[NINE:%[0-9]+]] = mul i8 [[GPR]], 4 ++// CHECK-PPC-NEXT: [[TEN:%[0-9]+]] = sext i8 [[NINE]] to i32 ++// CHECK-PPC-NEXT: [[ELEVEN:%[0-9]+]] = add i32 [[EIGHT]], [[TEN]] ++// CHECK-PPC-NEXT: br i1 [[COND]], label [[USING_REGS:%[a-z_0-9]+]], label [[USING_OVERFLOW:%[a-z_0-9]+]] ++// ++// CHECK-PPC1:[[USING_REGS]] ++// CHECK-PPC: [[TWELVE:%[0-9]+]] = inttoptr i32 [[ELEVEN]] to %struct.x* ++// CHECK-PPC-NEXT: [[THIRTEEN:%[0-9]+]] = add i8 [[GPR]], 1 ++// CHECK-PPC-NEXT: store i8 [[THIRTEEN]], i8* [[GPRPTR]] ++// CHECK-PPC-NEXT: br label [[CONT:%[a-z0-9]+]] ++// *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 16 22:36:20 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01D0011A; Sat, 16 May 2015 22:36:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 E49421CD4; Sat, 16 May 2015 22:36:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GMaJjT046406; Sat, 16 May 2015 22:36:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GMaJQs046405; Sat, 16 May 2015 22:36:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505162236.t4GMaJQs046405@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 16 May 2015 22:36: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: r283016 - stable/10/sbin/ifconfig 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 22:36:20 -0000 Author: ngie Date: Sat May 16 22:36:19 2015 New Revision: 283016 URL: https://svnweb.freebsd.org/changeset/base/283016 Log: MFC r282747: Use MIN from sys/param.h instead of handrolling the macro Replace sys/types.h with sys/param.h per-style(9) Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sbin/ifconfig/af_inet.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/af_inet.c ============================================================================== --- stable/10/sbin/ifconfig/af_inet.c Sat May 16 22:06:40 2015 (r283015) +++ stable/10/sbin/ifconfig/af_inet.c Sat May 16 22:36:19 2015 (r283016) @@ -32,7 +32,7 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ -#include +#include #include #include #include @@ -101,7 +101,6 @@ static struct sockaddr_in *sintab[] = { static void in_getaddr(const char *s, int which) { -#define MIN(a,b) ((a)<(b)?(a):(b)) struct sockaddr_in *sin = sintab[which]; struct hostent *hp; struct netent *np; @@ -142,7 +141,6 @@ in_getaddr(const char *s, int which) sin->sin_addr = inet_makeaddr(np->n_net, INADDR_ANY); else errx(1, "%s: bad value", s); -#undef MIN } static void From owner-svn-src-stable@FreeBSD.ORG Sat May 16 22:38:17 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE648263; Sat, 16 May 2015 22:38:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 AD7C41CE8; Sat, 16 May 2015 22:38:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GMcHlJ046744; Sat, 16 May 2015 22:38:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GMcHgX046743; Sat, 16 May 2015 22:38:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505162238.t4GMcHgX046743@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 16 May 2015 22:38:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283017 - stable/9/sbin/ifconfig X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 22:38:17 -0000 Author: ngie Date: Sat May 16 22:38:16 2015 New Revision: 283017 URL: https://svnweb.freebsd.org/changeset/base/283017 Log: MFstable/10 r283016: MFC r282747: Use MIN from sys/param.h instead of handrolling the macro Replace sys/types.h with sys/param.h per-style(9) Sponsored by: EMC / Isilon Storage Division Modified: stable/9/sbin/ifconfig/af_inet.c Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/ifconfig/ (props changed) Modified: stable/9/sbin/ifconfig/af_inet.c ============================================================================== --- stable/9/sbin/ifconfig/af_inet.c Sat May 16 22:36:19 2015 (r283016) +++ stable/9/sbin/ifconfig/af_inet.c Sat May 16 22:38:16 2015 (r283017) @@ -32,7 +32,7 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* not lint */ -#include +#include #include #include #include @@ -98,7 +98,6 @@ static struct sockaddr_in *sintab[] = { static void in_getaddr(const char *s, int which) { -#define MIN(a,b) ((a)<(b)?(a):(b)) struct sockaddr_in *sin = sintab[which]; struct hostent *hp; struct netent *np; @@ -139,7 +138,6 @@ in_getaddr(const char *s, int which) sin->sin_addr = inet_makeaddr(np->n_net, INADDR_ANY); else errx(1, "%s: bad value", s); -#undef MIN } static void From owner-svn-src-stable@FreeBSD.ORG Sat May 16 23:00:07 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DEB8729; Sat, 16 May 2015 23:00:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 2A2EB1EC8; Sat, 16 May 2015 23:00:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GN07UF057765; Sat, 16 May 2015 23:00:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GN04OD057735; Sat, 16 May 2015 23:00:04 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201505162300.t4GN04OD057735@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 May 2015 23:00:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283019 - in stable/9/contrib/llvm: include/llvm lib/CodeGen/AsmPrinter lib/Target/ARM tools/clang/include/clang/Driver tools/clang/include/clang/Frontend tools/clang/lib/CodeGen tools/... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 23:00:07 -0000 Author: dim Date: Sat May 16 23:00:03 2015 New Revision: 283019 URL: https://svnweb.freebsd.org/changeset/base/283019 Log: Bring clang 3.4.1 in stable/9 in sync with the version in stable/10. MFC r252503 (by andrew): Work around an ARM EABI issue where clang would sometimes incorrectly align the stack in a leaf function that uses TLS. The issue is, when using TLS, the function is no longer a leaf as it calls __aeabi_read_tp. With statically linked programs this is not an issue as it doesn't make use of the stack, however with dynamically linked applications we enter rtld which does use the stack and makes assumptions about it's alignment. This is only a temporary fix until a better patch can be made and submitted upstream. MFC r264826 (by emaste): Merge LLVM r202188: Debug info: Support variadic functions. Variadic functions have an unspecified parameter tag after the last argument. In IR this is represented as an unspecified parameter in the subroutine type. Paired commit with CFE r202185. rdar://problem/13690847 This re-applies r202184 + a bugfix in DwarfDebug's argument handling. This merge includes a change to use the LLVM 3.4 API in lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp: DwarfUnit -> CompileUnit Sponsored by: DARPA, AFRL MFC r264827 (by emaste): Merge Clang r202185: Debug info: Generate debug info for variadic functions. Paired commit with LLVM. rdar://problem/13690847 This merege includes changes to use the Clang 3.4 API (revisions 199686 and 200082) in lib/CodeGen/CGDebugInfo.cpp: getParamType -> getArgType getNumParams -> getNumArgs getReturnType -> getResultType Sponsored by: DARPA, AFRL MFC r265477 (by emaste): Merge -fstandalone-debug from Clang r198655: Implement a new -fstandalone-debug option. rdar://problem/15685848 It controls everything that -flimit-debug-info used to, plus the vtable type optimization. The old -fno-limit-debug-info option is now an alias to -fstandalone-debug and vice versa. Standalone is the default on Darwin until dtrace is updated to work with non-standalone debug info (rdar://problem/15758808). Note: I kept the LimitedDebugInfo name in CodeGenOptions::DebugInfoKind because NoStandaloneDebugInfo sounded even more confusing. MFC r269387 (by andrew): Update the ARMv6 core clang targets to be an arm1176jzf-s. This brings us in line with gcc in base as this makes llvm generate code for the armv6k variant of the instruction set. Modified: stable/9/contrib/llvm/include/llvm/DIBuilder.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h stable/9/contrib/llvm/tools/clang/include/clang/Driver/Options.td stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/include/llvm/DIBuilder.h ============================================================================== --- stable/9/contrib/llvm/include/llvm/DIBuilder.h Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/include/llvm/DIBuilder.h Sat May 16 23:00:03 2015 (r283019) @@ -439,7 +439,7 @@ namespace llvm { /// through debug info anchors. void retainType(DIType T); - /// createUnspecifiedParameter - Create unspeicified type descriptor + /// createUnspecifiedParameter - Create unspecified type descriptor /// for a subroutine type. DIDescriptor createUnspecifiedParameter(); Modified: stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Sat May 16 23:00:03 2015 (r283019) @@ -1116,6 +1116,22 @@ void CompileUnit::constructTypeDIE(DIE & addSourceLine(&Buffer, DTy); } +/// constructSubprogramArguments - Construct function argument DIEs. +void CompileUnit::constructSubprogramArguments(DIE &Buffer, DIArray Args) { + for (unsigned i = 1, N = Args.getNumElements(); i < N; ++i) { + DIDescriptor Ty = Args.getElement(i); + if (Ty.isUnspecifiedParameter()) { + assert(i == N-1 && "ellipsis must be the last argument"); + createAndAddDIE(dwarf::DW_TAG_unspecified_parameters, Buffer); + } else { + DIE *Arg = createAndAddDIE(dwarf::DW_TAG_formal_parameter, Buffer); + addType(Arg, DIType(Ty)); + if (DIType(Ty).isArtificial()) + addFlag(Arg, dwarf::DW_AT_artificial); + } + } +} + /// Return true if the type is appropriately scoped to be contained inside /// its own type unit. static bool isTypeUnitScoped(DIType Ty, const DwarfDebug *DD) { @@ -1170,19 +1186,12 @@ void CompileUnit::constructTypeDIE(DIE & addType(&Buffer, RTy); bool isPrototyped = true; - // Add arguments. - for (unsigned i = 1, N = Elements.getNumElements(); i < N; ++i) { - DIDescriptor Ty = Elements.getElement(i); - if (Ty.isUnspecifiedParameter()) { - createAndAddDIE(dwarf::DW_TAG_unspecified_parameters, Buffer); - isPrototyped = false; - } else { - DIE *Arg = createAndAddDIE(dwarf::DW_TAG_formal_parameter, Buffer); - addType(Arg, DIType(Ty)); - if (DIType(Ty).isArtificial()) - addFlag(Arg, dwarf::DW_AT_artificial); - } - } + if (Elements.getNumElements() == 2 && + Elements.getElement(1).isUnspecifiedParameter()) + isPrototyped = false; + + constructSubprogramArguments(Buffer, Elements); + // Add prototype flag if we're dealing with a C language and the // function has been prototyped. uint16_t Language = getLanguage(); @@ -1475,13 +1484,7 @@ DIE *CompileUnit::getOrCreateSubprogramD // Add arguments. Do not add arguments for subprogram definition. They will // be handled while processing variables. - for (unsigned i = 1, N = Args.getNumElements(); i < N; ++i) { - DIE *Arg = createAndAddDIE(dwarf::DW_TAG_formal_parameter, *SPDie); - DIType ATy(Args.getElement(i)); - addType(Arg, ATy); - if (ATy.isArtificial()) - addFlag(Arg, dwarf::DW_AT_artificial); - } + constructSubprogramArguments(*SPDie, Args); } if (SP.isArtificial()) Modified: stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Sat May 16 23:00:03 2015 (r283019) @@ -342,6 +342,9 @@ public: void emitHeader(const MCSection *ASection, const MCSymbol *ASectionSym); private: + /// constructSubprogramArguments - Construct function argument DIEs. + void constructSubprogramArguments(DIE &Buffer, DIArray Args); + /// constructTypeDIE - Construct basic type die from DIBasicType. void constructTypeDIE(DIE &Buffer, DIBasicType BTy); Modified: stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Sat May 16 23:00:03 2015 (r283019) @@ -404,15 +404,21 @@ DIE *DwarfDebug::updateSubprogramScopeDI DIArray Args = SPTy.getTypeArray(); uint16_t SPTag = SPTy.getTag(); if (SPTag == dwarf::DW_TAG_subroutine_type) + // FIXME: Use DwarfUnit::constructSubprogramArguments() here. for (unsigned i = 1, N = Args.getNumElements(); i < N; ++i) { - DIE *Arg = - SPCU->createAndAddDIE(dwarf::DW_TAG_formal_parameter, *SPDie); DIType ATy(Args.getElement(i)); - SPCU->addType(Arg, ATy); - if (ATy.isArtificial()) - SPCU->addFlag(Arg, dwarf::DW_AT_artificial); - if (ATy.isObjectPointer()) - SPCU->addDIEEntry(SPDie, dwarf::DW_AT_object_pointer, Arg); + if (ATy.isUnspecifiedParameter()) { + assert(i == N-1 && "ellipsis must be the last argument"); + SPCU->createAndAddDIE(dwarf::DW_TAG_unspecified_parameters, *SPDie); + } else { + DIE *Arg = + SPCU->createAndAddDIE(dwarf::DW_TAG_formal_parameter, *SPDie); + SPCU->addType(Arg, ATy); + if (ATy.isArtificial()) + SPCU->addFlag(Arg, dwarf::DW_AT_artificial); + if (ATy.isObjectPointer()) + SPCU->addDIEEntry(SPDie, dwarf::DW_AT_object_pointer, Arg); + } } DIE *SPDeclDie = SPDie; SPDie = @@ -579,7 +585,7 @@ DIE *DwarfDebug::createScopeChildrenDIE( DIE *ObjectPointer = NULL; // Collect arguments for current function. - if (LScopes.isCurrentFunctionScope(Scope)) + if (LScopes.isCurrentFunctionScope(Scope)) { for (unsigned i = 0, N = CurrentFnArguments.size(); i < N; ++i) if (DbgVariable *ArgDV = CurrentFnArguments[i]) if (DIE *Arg = @@ -588,6 +594,16 @@ DIE *DwarfDebug::createScopeChildrenDIE( if (ArgDV->isObjectPointer()) ObjectPointer = Arg; } + // Create the unspecified parameter that marks a function as variadic. + DISubprogram SP(Scope->getScopeNode()); + assert(SP.Verify()); + DIArray FnArgs = SP.getType().getTypeArray(); + if (FnArgs.getElement(FnArgs.getNumElements()-1).isUnspecifiedParameter()) { + DIE *Ellipsis = new DIE(dwarf::DW_TAG_unspecified_parameters); + Children.push_back(Ellipsis); + } + } + // Collect lexical scope children first. const SmallVectorImpl &Variables =ScopeVariables.lookup(Scope); for (unsigned i = 0, N = Variables.size(); i < N; ++i) Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h Sat May 16 23:00:03 2015 (r283019) @@ -27,7 +27,7 @@ protected: public: explicit ARMFrameLowering(const ARMSubtarget &sti) - : TargetFrameLowering(StackGrowsDown, sti.getStackAlignment(), 0, 4), + : TargetFrameLowering(StackGrowsDown, sti.getStackAlignment(), 0, 8), STI(sti) { } Modified: stable/9/contrib/llvm/tools/clang/include/clang/Driver/Options.td ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Driver/Options.td Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/tools/clang/include/clang/Driver/Options.td Sat May 16 23:00:03 2015 (r283019) @@ -549,8 +549,6 @@ def finstrument_functions : Flag<["-"], def fkeep_inline_functions : Flag<["-"], "fkeep-inline-functions">, Group; def flat__namespace : Flag<["-"], "flat_namespace">; def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group; -def flimit_debug_info : Flag<["-"], "flimit-debug-info">, Group, Flags<[CC1Option]>, - HelpText<"Limit debug information produced to reduce size of debug binary">; def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group; def flto : Flag<["-"], "flto">, Group; def fno_lto : Flag<["-"], "fno-lto">, Group; @@ -645,8 +643,6 @@ def fno_inline : Flag<["-"], "fno-inline def fno_keep_inline_functions : Flag<["-"], "fno-keep-inline-functions">, Group; def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group, HelpText<"Disallow implicit conversions between vectors with a different number of elements or different element types">, Flags<[CC1Option]>; -def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, Group, Flags<[CC1Option]>, - HelpText<"Do not limit debug information produced to reduce size of debug binary">; def fno_merge_all_constants : Flag<["-"], "fno-merge-all-constants">, Group, Flags<[CC1Option]>, HelpText<"Disallow merging of constants">; def fno_modules : Flag <["-"], "fno-modules">, Group, @@ -774,6 +770,12 @@ def fno_signed_char : Flag<["-"], "fno-s def fsplit_stack : Flag<["-"], "fsplit-stack">, Group; def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group; def fstack_protector : Flag<["-"], "fstack-protector">, Group; +def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group, Flags<[CC1Option]>, + HelpText<"Emit full debug info for all types used by the program">; +def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group, Flags<[CC1Option]>, + HelpText<"Limit debug information produced to reduce size of debug binary">; +def flimit_debug_info : Flag<["-"], "flimit-debug-info">, Alias; +def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, Alias; def fstrict_aliasing : Flag<["-"], "fstrict-aliasing">, Group; def fstrict_enums : Flag<["-"], "fstrict-enums">, Group, Flags<[CC1Option]>, HelpText<"Enable optimizations based on the strict definition of an enum's " Modified: stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h Sat May 16 23:00:03 2015 (r283019) @@ -50,12 +50,20 @@ public: }; enum DebugInfoKind { - NoDebugInfo, // Don't generate debug info. - DebugLineTablesOnly, // Emit only debug info necessary for generating - // line number tables (-gline-tables-only). - LimitedDebugInfo, // Limit generated debug info to reduce size - // (-flimit-debug-info). - FullDebugInfo // Generate complete debug info. + NoDebugInfo, /// Don't generate debug info. + + DebugLineTablesOnly, /// Emit only debug info necessary for generating + /// line number tables (-gline-tables-only). + + LimitedDebugInfo, /// Limit generated debug info to reduce size + /// (-fno-standalone-debug). This emits + /// forward decls for types that could be + /// replaced with forward decls in the source + /// code. For dynamic C++ classes type info + /// is only emitted int the module that + /// contains the classe's vtable. + + FullDebugInfo /// Generate complete debug info. }; enum TLSModel { Modified: stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp Sat May 16 23:00:03 2015 (r283019) @@ -37,7 +37,7 @@ #include "llvm/IR/Module.h" #include "llvm/Support/Dwarf.h" #include "llvm/Support/FileSystem.h" -#include "llvm/Support/Path.h" +#include "llvm/Support/Path.h" using namespace clang; using namespace clang::CodeGen; @@ -342,9 +342,9 @@ void CGDebugInfo::CreateCompileUnit() { if (const FileEntry *MainFile = SM.getFileEntryForID(SM.getMainFileID())) { MainFileDir = MainFile->getDir()->getName(); if (MainFileDir != ".") { - llvm::SmallString<1024> MainFileDirSS(MainFileDir); - llvm::sys::path::append(MainFileDirSS, MainFileName); - MainFileName = MainFileDirSS.str(); + llvm::SmallString<1024> MainFileDirSS(MainFileDir); + llvm::sys::path::append(MainFileDirSS, MainFileName); + MainFileName = MainFileDirSS.str(); } } @@ -760,6 +760,8 @@ llvm::DIType CGDebugInfo::CreateType(con else if (const FunctionProtoType *FPT = dyn_cast(Ty)) { for (unsigned i = 0, e = FPT->getNumArgs(); i != e; ++i) EltTys.push_back(getOrCreateType(FPT->getArgType(i), Unit)); + if (FPT->isVariadic()) + EltTys.push_back(DBuilder.createUnspecifiedParameter()); } llvm::DIArray EltTypeArray = DBuilder.getOrCreateArray(EltTys); @@ -1454,13 +1456,13 @@ llvm::DIType CGDebugInfo::CreateType(con // declaration. The completeType, completeRequiredType, and completeClassData // callbacks will handle promoting the declaration to a definition. if (T || + // Under -flimit-debug-info: (DebugKind <= CodeGenOptions::LimitedDebugInfo && - // Under -flimit-debug-info, emit only a declaration unless the type is - // required to be complete. - !RD->isCompleteDefinitionRequired() && CGM.getLangOpts().CPlusPlus) || - // If the class is dynamic, only emit a declaration. A definition will be - // emitted whenever the vtable is emitted. - (CXXDecl && CXXDecl->hasDefinition() && CXXDecl->isDynamicClass()) || T) { + // Emit only a forward declaration unless the type is required. + ((!RD->isCompleteDefinitionRequired() && CGM.getLangOpts().CPlusPlus) || + // If the class is dynamic, only emit a declaration. A definition will be + // emitted whenever the vtable is emitted. + (CXXDecl && CXXDecl->hasDefinition() && CXXDecl->isDynamicClass())))) { llvm::DIDescriptor FDContext = getContextDescriptor(cast(RD->getDeclContext())); if (!T) @@ -2421,6 +2423,20 @@ llvm::DICompositeType CGDebugInfo::getOr llvm::DIArray EltTypeArray = DBuilder.getOrCreateArray(Elts); return DBuilder.createSubroutineType(F, EltTypeArray); } + + // Variadic function. + if (const FunctionDecl *FD = dyn_cast(D)) + if (FD->isVariadic()) { + SmallVector EltTys; + EltTys.push_back(getOrCreateType(FD->getResultType(), F)); + if (const FunctionProtoType *FPT = dyn_cast(FnType)) + for (unsigned i = 0, e = FPT->getNumArgs(); i != e; ++i) + EltTys.push_back(getOrCreateType(FPT->getArgType(i), F)); + EltTys.push_back(DBuilder.createUnspecifiedParameter()); + llvm::DIArray EltTypeArray = DBuilder.getOrCreateArray(EltTys); + return DBuilder.createSubroutineType(F, EltTypeArray); + } + return llvm::DICompositeType(getOrCreateType(FnType, F)); } Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp Sat May 16 23:00:03 2015 (r283019) @@ -208,7 +208,8 @@ static const char *getARMTargetCPU(const MArch = Triple.getArchName(); } - if (Triple.getOS() == llvm::Triple::NetBSD) { + if (Triple.getOS() == llvm::Triple::NetBSD || + Triple.getOS() == llvm::Triple::FreeBSD) { if (MArch == "armv6") return "arm1176jzf-s"; } Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Sat May 16 23:00:03 2015 (r283019) @@ -499,7 +499,8 @@ static std::string getARMTargetCPU(const MArch = Triple.getArchName(); } - if (Triple.getOS() == llvm::Triple::NetBSD) { + if (Triple.getOS() == llvm::Triple::NetBSD || + Triple.getOS() == llvm::Triple::FreeBSD) { if (MArch == "armv6") return "arm1176jzf-s"; } @@ -2988,8 +2989,8 @@ void Clang::ConstructJob(Compilation &C, Args.AddLastArg(CmdArgs, options::OPT_femit_all_decls); Args.AddLastArg(CmdArgs, options::OPT_fformat_extensions); Args.AddLastArg(CmdArgs, options::OPT_fheinous_gnu_extensions); - Args.AddLastArg(CmdArgs, options::OPT_flimit_debug_info); - Args.AddLastArg(CmdArgs, options::OPT_fno_limit_debug_info); + Args.AddLastArg(CmdArgs, options::OPT_fstandalone_debug); + Args.AddLastArg(CmdArgs, options::OPT_fno_standalone_debug); Args.AddLastArg(CmdArgs, options::OPT_fno_operator_names); // AltiVec language extensions aren't relevant for assembling. if (!isa(JA) || Modified: stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp Sat May 16 22:53:26 2015 (r283018) +++ stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp Sat May 16 23:00:03 2015 (r283019) @@ -295,7 +295,8 @@ static void ParseCommentArgs(CommentOpti } static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, - DiagnosticsEngine &Diags) { + DiagnosticsEngine &Diags, + const TargetOptions &TargetOpts) { using namespace options; bool Success = true; @@ -322,10 +323,16 @@ static bool ParseCodeGenArgs(CodeGenOpti Opts.setDebugInfo(CodeGenOptions::DebugLineTablesOnly); } else if (Args.hasArg(OPT_g_Flag) || Args.hasArg(OPT_gdwarf_2) || Args.hasArg(OPT_gdwarf_3) || Args.hasArg(OPT_gdwarf_4)) { - if (Args.hasFlag(OPT_flimit_debug_info, OPT_fno_limit_debug_info, true)) - Opts.setDebugInfo(CodeGenOptions::LimitedDebugInfo); - else + bool Default = false; + // Until dtrace (via CTF) can deal with distributed debug info, + // Darwin defaults to standalone/full debug info. + if (llvm::Triple(TargetOpts.Triple).isOSDarwin()) + Default = true; + + if (Args.hasFlag(OPT_fstandalone_debug, OPT_fno_standalone_debug, Default)) Opts.setDebugInfo(CodeGenOptions::FullDebugInfo); + else + Opts.setDebugInfo(CodeGenOptions::LimitedDebugInfo); } Opts.DebugColumnInfo = Args.hasArg(OPT_dwarf_column_info); Opts.SplitDwarfFile = Args.getLastArgValue(OPT_split_dwarf_file); @@ -1657,8 +1664,9 @@ bool CompilerInvocation::CreateFromArgs( ParseFileSystemArgs(Res.getFileSystemOpts(), *Args); // FIXME: We shouldn't have to pass the DashX option around here InputKind DashX = ParseFrontendArgs(Res.getFrontendOpts(), *Args, Diags); - Success = ParseCodeGenArgs(Res.getCodeGenOpts(), *Args, DashX, Diags) - && Success; + ParseTargetArgs(Res.getTargetOpts(), *Args); + Success = ParseCodeGenArgs(Res.getCodeGenOpts(), *Args, DashX, Diags, + Res.getTargetOpts()) && Success; ParseHeaderSearchArgs(Res.getHeaderSearchOpts(), *Args); if (DashX != IK_AST && DashX != IK_LLVM_IR) { ParseLangArgs(*Res.getLangOpts(), *Args, DashX, Diags); @@ -1673,8 +1681,6 @@ bool CompilerInvocation::CreateFromArgs( ParsePreprocessorArgs(Res.getPreprocessorOpts(), *Args, FileMgr, Diags); ParsePreprocessorOutputArgs(Res.getPreprocessorOutputOpts(), *Args, Res.getFrontendOpts().ProgramAction); - ParseTargetArgs(Res.getTargetOpts(), *Args); - return Success; } From owner-svn-src-stable@FreeBSD.ORG Sat May 16 23:18:56 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E78B6953; Sat, 16 May 2015 23:18:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 D3A721087; Sat, 16 May 2015 23:18:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GNIurB067014; Sat, 16 May 2015 23:18:56 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GNIU2W066843; Sat, 16 May 2015 23:18:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201505162318.t4GNIU2W066843@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 16 May 2015 23:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r283020 - stable/9/contrib/llvm/patches X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 23:18:57 -0000 Author: dim Date: Sat May 16 23:18:30 2015 New Revision: 283020 URL: https://svnweb.freebsd.org/changeset/base/283020 Log: Bring the contrib/llvm/patches directory up-to-date for stable/9. MFC r263892: Add the llvm/clang patch for r263891. MFC r264350: Update the llvm/clang patch for r264345. MFC r264828: Add patches corresponding to r264826 and r264827 MFC r266630: Add the clang patch for r265477. While here, add a description to the patch for r263619, and unify all the URLs to point to svnweb. MFC r266675: Add the clang patch for r266674. MFC r275651: Add llvm patch corresponding to r275633. MFC r275747: Update llvm patches for r274286 and r275633 so all the tests will pass. MFC r275760: Add clang patch corresponding to r275759. MFC r275772: Update clang patch for r275759 to use correct test cases. MFC r283015: Bring the contrib/llvm/patches directory up-to-date. MFC r263892: Add the llvm/clang patch for r263891. MFC r264350: Update the llvm/clang patch for r264345. MFC r266675: Add the clang patch for r266674. MFC r275651: Add llvm patch corresponding to r275633. MFC r275747: Update llvm patches for r274286 and r275633 so all the tests will pass. MFC r275760: Add clang patch corresponding to r275759. MFC r275772: Update clang patch for r275759 to use correct test cases. Partially merge r283015 from stable/10: Additionally: * Remove the clang patch corresponding to r263619, as ARM EABI hard-float support was never MFC'd. * Add clang patch corresponding to r279302. Added: stable/9/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff - copied unchanged from r264350, head/contrib/llvm/patches/patch-r264345-dwarf2-freebsd10.diff stable/9/contrib/llvm/patches/patch-r264826-llvm-r202188-variadic-fn-debug-info.diff - copied, changed from r264828, head/contrib/llvm/patches/patch-r264826-llvm-r202188-variadic-fn-debug-info.diff stable/9/contrib/llvm/patches/patch-r264827-clang-r202185-variadic-fn-debug-info.diff - copied, changed from r264828, head/contrib/llvm/patches/patch-r264827-clang-r202185-variadic-fn-debug-info.diff stable/9/contrib/llvm/patches/patch-r265477-clang-r198655-standalone-debug.diff - copied unchanged from r266630, head/contrib/llvm/patches/patch-r265477-clang-r198655-standalone-debug.diff stable/9/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff - copied unchanged from r266675, head/contrib/llvm/patches/patch-r266674-clang-r209489-fix-xmmintrin.diff stable/9/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff - copied, changed from r275651, head/contrib/llvm/patches/patch-r275633-llvm-r223171-fix-vectorizer.diff stable/9/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff - copied, changed from r275760, head/contrib/llvm/patches/patch-r275759-clang-r221170-ppc-vaarg.diff stable/9/contrib/llvm/patches/patch-r279302-clang-r211785-add-fuse-ld.diff - copied unchanged from r283015, stable/10/contrib/llvm/patches/patch-r279302-clang-r211785-add-fuse-ld.diff Modified: stable/9/contrib/llvm/patches/patch-r208961-clang-version-include.diff stable/9/contrib/llvm/patches/patch-r208987-format-extensions.diff stable/9/contrib/llvm/patches/patch-r209107-clang-vendor-suffix.diff stable/9/contrib/llvm/patches/patch-r213492-amd64-multi-os-dot.diff stable/9/contrib/llvm/patches/patch-r221503-default-target-triple.diff stable/9/contrib/llvm/patches/patch-r243830-arm-disable-clear-cache.diff stable/9/contrib/llvm/patches/patch-r252503-arm-transient-stack-alignment.diff stable/9/contrib/llvm/patches/patch-r257109-add-CC-aliases.diff stable/9/contrib/llvm/patches/patch-r259053-gcc-installation-detector.diff stable/9/contrib/llvm/patches/patch-r259498-add-fxsave.diff stable/9/contrib/llvm/patches/patch-r261680-clang-r200899-fix-security-quantis.diff stable/9/contrib/llvm/patches/patch-r261991-llvm-r195391-fix-dwarf2.diff stable/9/contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff stable/9/contrib/llvm/patches/patch-r261991-llvm-r198389-fix-dwarf2.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198028-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198029-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198030-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198145-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198149-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198157-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198280-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198281-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198286-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198480-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198484-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198533-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198565-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198567-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198580-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198591-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198592-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198658-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198681-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198738-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198739-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198740-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198893-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198909-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r198910-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199014-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199024-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199028-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199031-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199033-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199061-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199186-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199187-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199775-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199781-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199786-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199940-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199974-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199975-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r199977-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200103-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200104-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200112-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200130-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200131-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200141-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200282-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200368-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200373-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200376-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200509-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200617-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200960-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200961-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200962-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200963-sparc.diff stable/9/contrib/llvm/patches/patch-r262261-llvm-r200965-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r198311-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r198312-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r198911-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r198912-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r198918-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r198923-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r199012-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r199034-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r199037-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r199188-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r199399-sparc.diff stable/9/contrib/llvm/patches/patch-r262262-clang-r200452-sparc.diff stable/9/contrib/llvm/patches/patch-r262264-llvm-r200453-sparc.diff stable/9/contrib/llvm/patches/patch-r262265-llvm-r201718-sparc.diff stable/9/contrib/llvm/patches/patch-r262303-enable-ppc-integrated-as.diff stable/9/contrib/llvm/patches/patch-r262415-llvm-r201994-sparc.diff stable/9/contrib/llvm/patches/patch-r262460-llvm-r202059-sparc.diff stable/9/contrib/llvm/patches/patch-r262535-clang-r202177-sparc.diff stable/9/contrib/llvm/patches/patch-r262536-clang-r202179-sparc.diff stable/9/contrib/llvm/patches/patch-r262582-llvm-r202422-sparc.diff stable/9/contrib/llvm/patches/patch-r262611-llvm-r196874-fix-invalid-pwd-crash.diff stable/9/contrib/llvm/patches/patch-r263048-clang-r203624-fix-CC-aliases.diff stable/9/contrib/llvm/patches/patch-r263312-llvm-r169939-inline-asm-with-realign.diff stable/9/contrib/llvm/patches/patch-r263312-llvm-r196940-update-inline-asm-test.diff stable/9/contrib/llvm/patches/patch-r263312-llvm-r196986-allow-realign-alloca.diff stable/9/contrib/llvm/patches/patch-r263312-llvm-r202930-fix-alloca-esi-clobber.diff stable/9/contrib/llvm/patches/patch-r263313-llvm-r203311-fix-sse1-oom.diff stable/9/contrib/llvm/patches/patch-r274286-llvm-r201784-asm-dollar.diff Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/llvm/ (props changed) Modified: stable/9/contrib/llvm/patches/patch-r208961-clang-version-include.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r208961-clang-version-include.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r208961-clang-version-include.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,7 +1,7 @@ This patch adjusts clang's default include paths to add FreeBSD-specific directories. -Introduced here: http://svn.freebsd.org/changeset/base/208961 +Introduced here: http://svnweb.freebsd.org/changeset/base/208961 Index: tools/clang/lib/Frontend/InitHeaderSearch.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r208987-format-extensions.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r208987-format-extensions.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r208987-format-extensions.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,7 +1,7 @@ This patch adds support for the FreeBSD-specific -fformat-extension option, which enables additional printf modifiers for the kernel. -Introduced here: http://svn.freebsd.org/changeset/base/208987 +Introduced here: http://svnweb.freebsd.org/changeset/base/208987 Index: tools/clang/lib/Frontend/CompilerInvocation.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r209107-clang-vendor-suffix.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r209107-clang-vendor-suffix.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r209107-clang-vendor-suffix.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ This patch adds a FreeBSD-specific suffi usually of the form "(yyyyddmm)", representing the date when the compiler was last updated. -Introduced here: http://svn.freebsd.org/changeset/base/209107 +Introduced here: http://svnweb.freebsd.org/changeset/base/209107 Index: tools/clang/lib/Basic/Version.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r213492-amd64-multi-os-dot.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r213492-amd64-multi-os-dot.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r213492-amd64-multi-os-dot.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,7 +1,7 @@ This patch makes "clang -print-multi-os-directory" print "." on amd64, which is required by certain ports. -Introduced here: http://svn.freebsd.org/changeset/base/213492 +Introduced here: http://svnweb.freebsd.org/changeset/base/213492 Index: tools/clang/lib/Driver/Driver.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r221503-default-target-triple.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r221503-default-target-triple.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r221503-default-target-triple.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,7 +1,7 @@ This patch ensures the target triple that is passed during the compiler build is respected, instead of mangling it. -Introduced here: http://svn.freebsd.org/changeset/base/221503 +Introduced here: http://svnweb.freebsd.org/changeset/base/221503 Index: lib/Support/Unix/Host.inc =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r243830-arm-disable-clear-cache.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r243830-arm-disable-clear-cache.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r243830-arm-disable-clear-cache.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ This patch ensures __clear_cache is not clang, this special builtin was emitted as a function call, leading to link errors. -Introduced here: http://svn.freebsd.org/changeset/base/243830 +Introduced here: http://svnweb.freebsd.org/changeset/base/243830 Index: lib/Support/Unix/Memory.inc =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r252503-arm-transient-stack-alignment.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r252503-arm-transient-stack-alignment.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r252503-arm-transient-stack-alignment.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,7 +1,7 @@ This patch applies a workaround for an ARM EABI issue, where clang would sometimes incorrectly align the stack in a leaf function that uses TLS. -Introduced here: http://svn.freebsd.org/changeset/base/252503 +Introduced here: http://svnweb.freebsd.org/changeset/base/252503 Index: test/CodeGen/Thumb2/large-stack.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r257109-add-CC-aliases.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r257109-add-CC-aliases.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r257109-add-CC-aliases.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,7 +1,7 @@ This patch adds "CC" and "clang-CC" to the list of program name aliases which invoke the C++ compiler. -Introduced here: http://svn.freebsd.org/changeset/base/257109 +Introduced here: http://svnweb.freebsd.org/changeset/base/257109 Index: tools/clang/tools/driver/driver.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r259053-gcc-installation-detector.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r259053-gcc-installation-detector.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r259053-gcc-installation-detector.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,7 +1,7 @@ This patch eliminates the unnecessary search for various gcc installation directories during each startup of clang. -Introduced here: http://svn.freebsd.org/changeset/base/259053 +Introduced here: http://svnweb.freebsd.org/changeset/base/259053 Index: tools/clang/lib/Driver/ToolChains.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r259498-add-fxsave.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r259498-add-fxsave.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r259498-add-fxsave.diff Sat May 16 23:18:30 2015 (r283020) @@ -1,6 +1,6 @@ This patch adds the alias bit_FXSAVE for bit_FXSR to cpuid.h. -Introduced here: http://svn.freebsd.org/changeset/base/259498 +Introduced here: http://svnweb.freebsd.org/changeset/base/259498 Index: tools/clang/lib/Headers/cpuid.h =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r261680-clang-r200899-fix-security-quantis.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r261680-clang-r200899-fix-security-quantis.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r261680-clang-r200899-fix-security-quantis.diff Sat May 16 23:18:30 2015 (r283020) @@ -15,7 +15,7 @@ Pull in r200899 from upstream clang trun Differential Revision: http://llvm-reviews.chandlerc.com/D2688 -Introduced here: http://svn.freebsd.org/changeset/base/261680 +Introduced here: http://svnweb.freebsd.org/changeset/base/261680 Index: tools/clang/test/SemaCXX/c99-variable-length-array.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r261991-llvm-r195391-fix-dwarf2.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r261991-llvm-r195391-fix-dwarf2.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r261991-llvm-r195391-fix-dwarf2.diff Sat May 16 23:18:30 2015 (r283020) @@ -18,7 +18,7 @@ Pull in r195391 from upstream llvm trunk Patch (slightly modified) by Keith Walker! -Introduced here: http://svn.freebsd.org/changeset/base/261991 +Introduced here: http://svnweb.freebsd.org/changeset/base/261991 Index: lib/CodeGen/AsmPrinter/DIE.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r261991-llvm-r198385-fix-dwarf2.diff Sat May 16 23:18:30 2015 (r283020) @@ -5,7 +5,7 @@ Pull in r198385 from upstream llvm trunk Apologies for the noise - we're seeing some Go failures with cgo interacting with Clang's debug info due to this change. -Introduced here: http://svn.freebsd.org/changeset/base/261991 +Introduced here: http://svnweb.freebsd.org/changeset/base/261991 Index: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r261991-llvm-r198389-fix-dwarf2.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r261991-llvm-r198389-fix-dwarf2.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r261991-llvm-r198389-fix-dwarf2.diff Sat May 16 23:18:30 2015 (r283020) @@ -8,7 +8,7 @@ Pull in r198389 from upstream llvm trunk This reverts commit r198385. -Introduced here: http://svn.freebsd.org/changeset/base/261991 +Introduced here: http://svnweb.freebsd.org/changeset/base/261991 Index: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198028-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198028-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198028-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198028 from upstream llvm trunk [Sparc] Add MCInstPrinter implementation for SPARC. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/InstPrinter/LLVMBuild.txt =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198029-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198029-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198029-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198029 from upstream llvm trunk [Sparc] Add target specific MCExpr class to handle sparc specific modifiers like %hi, %lo, etc., -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198030-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198030-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198030-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198030 from upstream llvm trunk [Sparc] Lower and MachineInstr to MC and print assembly using MCInstPrinter. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcTargetStreamer.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198145-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198145-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198145-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r198145 from upstream llvm trunk [SparcV9]: Implement lowering of long double (fp128) arguments in Sparc64 ABI. Also, pass fp128 arguments to varargs through integer registers if necessary. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/64abi.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198149-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198149-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198149-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r198149 from upstream llvm trunk [SparcV9] For codegen generated library calls that return float, set inreg flag manually in LowerCall(). This makes the sparc backend to generate Sparc64 ABI compliant code. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198157-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198157-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198157-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r198157 from upstream llvm trunk [SparcV9] Use separate instruction patterns for 64 bit arithmetic instructions instead of reusing 32 bit instruction patterns. This is done to avoid spilling the result of the 64-bit instructions to a 4-byte slot. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcAsmPrinter.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198280-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198280-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198280-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198280 from upstream llvm trunk [SparcV9]: Use SRL instead of SLL to clear top 32-bits in ctpop:i32. SLL does not clear top 32 bit, only SRL does. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstrInfo.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198281-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198281-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198281-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198281 from upstream llvm trunk [SparcV9]: Custom lower UMULO/SMULO so that the arguments are send to __multi3() in correct order. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198286-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198286-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198286-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198286 from upstream llvm trunk [Sparc] Handle atomic loads/stores in sparc backend. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstrInfo.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198480-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198480-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198480-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198480 from upstream llvm trunk [SparcV9]: Implement RETURNADDR and FRAMEADDR lowering in SPARC64. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198484-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198484-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198484-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198484 from upstream llvm trunk [Sparc] Add the initial implementation of an asm parser for sparc/sparcv9. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198533-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198533-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198533-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198533 from upstream llvm trunk [Sparc] Add initial implementation of MC Code emitter for sparc. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstrInfo.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198565-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198565-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198565-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198565 from upstream llvm trunk ELF relocation types for sparc. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: include/llvm/Support/ELF.h =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198567-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198567-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198567-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198567 from upstream llvm trunk SPARC: Make helper function static. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcAsmPrinter.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198580-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198580-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198580-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198580 from upstream llvm trunk [Sparc] Add ELF Object Writer for Sparc. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198591-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198591-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198591-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198591 from upstream llvm trunk [Sparc] Add initial implementation of disassembler for sparc -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstrFormats.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198592-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198592-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198592-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198592 from upstream llvm trunk [Sparc] Explicitly cast -1 to unsigned to fix buildbot errors. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/Disassembler/SparcDisassembler.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198658-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198658-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198658-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198658 from upstream llvm trunk [Sparc] Add support for parsing memory operands in sparc AsmParser. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/MC/Sparc/sparc-ctrl-instructions.s =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198681-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198681-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198681-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r198681 from upstream llvm trunk [Sparc] Add support for parsing sparc asm modifiers such as %hi, %lo etc., Also, correct the offsets for FixupsKindInfo. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198738-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198738-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198738-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198738 from upstream llvm trunk [Sparc] Add support for parsing branch instructions and conditional moves. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/MC/Disassembler/Sparc/sparc.txt =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198739-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198739-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198739-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198739 from upstream llvm trunk [Sparc] Correct the mask for fixup_sparc_br19. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198740-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198740-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198740-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198740 from upstream llvm trunk [SparcV9] Rename operands in some sparc64 instructions so that TableGen can encode them correctly. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/MC/Sparc/sparc64-alu-instructions.s =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198893-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198893-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198893-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198893 from upstream llvm trunk [Sparc] Multiclass for loads/stores. No functionality change intended. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstr64Bit.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198909-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198909-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198909-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198909 from upstream llvm trunk [Sparc] Add support for parsing jmpl instruction and make indirect call and jmp instructions as aliases to jmpl. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/AsmParser/SparcAsmParser.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r198910-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r198910-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r198910-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198910 from upstream llvm trunk [Sparc] Emit retl/ret instead of jmp instruction. It improves the readability of the assembly generated. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/ctpop.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199014-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199014-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199014-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199014 from upstream llvm trunk [Sparc] Bundle instruction with delay slow and its filler. Now, we can use -verify-machineinstrs with SPARC backend. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/DelaySlotFiller.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199024-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199024-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199024-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199024 from upstream llvm trunk [Sparc] Add missing processor types: v7 and niagara -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/Sparc.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199028-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199028-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199028-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -13,7 +13,7 @@ Pull in r199028 from upstream llvm trunk 'inreg' flag on the return value, so that behavior is unchanged. This also happens when returning a float _Complex. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/64abi.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199031-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199031-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199031-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199031 from upstream llvm trunk [Sparc] Replace (unsigned)-1 with ~OU as suggested by Reid Kleckner. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/Disassembler/SparcDisassembler.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199033-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199033-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199033-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199033 from upstream llvm trunk [Sparc] Add support for parsing floating point instructions. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstrInfo.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199061-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199061-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199061-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -8,7 +8,7 @@ Pull in r199061 from upstream llvm trunk Teach isBlockOnlyReachableByFallthrough to find any MBB operands on bundled terminators so SPARC doesn't need to specialize this function. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/missinglabel.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199186-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199186-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199186-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -11,7 +11,7 @@ Pull in r199186 from upstream llvm trunk The allocation order for DPair begins with the QPR registers, so register allocation is unlikely to change much. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/ARM/ARMISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199187-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199187-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199187-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -19,7 +19,7 @@ Pull in r199187 from upstream llvm trunk This fixes a problem where InstrEmitter was picking 32-bit register classes for 64-bit values on SPARC. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/spillsize.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199775-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199775-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199775-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r199775 from upstream llvm trunk [Sparc] Do not add PC to _GLOBAL_OFFSET_TABLE_ address to access GOT in absolute code. Fixes PR#18521 -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcAsmPrinter.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199781-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199781-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199781-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199781 from upstream llvm trunk [Sparc] Add support for inline assembly constraint 'I'. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/inlineasm.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199786-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199786-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199786-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199786 from upstream llvm trunk [Sparc] Add support for inline assembly constraints which specify registers by their aliases. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199940-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199940-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199940-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -4,7 +4,7 @@ Pull in r199940 from upstream llvm trunk code this looks correct, but could use review. The previous was definitely not correct. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/AsmParser/SparcAsmParser.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199974-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199974-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199974-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r199974 from upstream llvm trunk [Sparc] Correct quad register list in the asm parser. Add test cases to check parsing of v9 double registers and their aliased quad registers. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/MC/Disassembler/Sparc/sparc-fp.txt =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199975-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199975-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199975-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -4,7 +4,7 @@ Pull in r199975 from upstream llvm trunk These all use the compare-and-swap CASA/CASXA instructions. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/atomics.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r199977-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r199977-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r199977-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r199977 from upstream llvm trunk [SparcV9] Add support for JIT in Sparc64. With this change, all supported tests in test/ExecutionEngine pass in sparcv9. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcJITInfo.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200103-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200103-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200103-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200103 from upstream llvm trunk Missing ELF relocations for Sparc. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: include/llvm/Support/ELF.h =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200104-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200104-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200104-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200104 from upstream llvm trunk removing duplicate enum value -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: include/llvm/Support/ELF.h =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200112-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200112-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200112-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200112 from upstream llvm trunk [Sparc] Add support for sparc relocation types in ELF object file. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/MC/Sparc/sparc-relocations.s =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200130-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200130-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200130-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -4,7 +4,7 @@ Pull in r200130 from upstream llvm trunk Found by SingleSource/UnitTests/AtomicOps.c -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200131-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200131-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200131-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -5,7 +5,7 @@ Pull in r200131 from upstream llvm trunk The popc instruction is defined in the SPARCv9 instruction set architecture, but it was emulated on CPUs older than Niagara 2. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200141-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200141-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200141-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200141 from upstream llvm trunk Clean up the Legal/Expand logic for SPARC popc. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcSubtarget.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200282-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200282-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200282-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -5,7 +5,7 @@ Pull in r200282 from upstream llvm trunk Also emit the stubs that were generated for references to typeinfo symbols. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcAsmPrinter.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200368-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200368-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200368-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull r200368 from upstream llvm trunk (b [SparcV9] Use correct register class (I64RegClass) to hold the address of _GLOBAL_OFFSET_TABLE_ in sparcv9. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstrInfo.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200373-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200373-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200373-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -6,7 +6,7 @@ Pull in r200373 from upstream llvm trunk combines symbols in different segments". This is because MC computes pc_rel entries with subtract expression between labels from different sections. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcTargetObjectFile.h =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200376-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200376-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200376-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -4,7 +4,7 @@ Pull in r200376 from upstream llvm trunk This makes MCAsmInfo::getExprForFDESymbol() a virtual function and overrides it in SparcMCAsmInfo. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200509-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200509-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200509-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200509 from upstream llvm trunk [Sparc] Save and restore float registers that may be used for parameter passing. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcJITInfo.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200617-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200617-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200617-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200617 from upstream llvm trunk [Sparc] Set %o7 as the return address register instead of %i7 in MCRegisterInfo. Also, add CFI instructions to initialize the frame correctly. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200960-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200960-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200960-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200960 from upstream llvm trunk [Sparc] Use SparcMCExpr::VariantKind itself as MachineOperand's target flags. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200961-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200961-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200961-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200961 from upstream llvm trunk [Sparc] Emit correct relocations for PIC code when integrated assembler is used. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/CodeGen/SPARC/obj-relocs.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200962-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200962-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200962-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200962 from upstream llvm trunk [Sparc] Emit relocations for Thread Local Storage (TLS) when integrated assembler is used. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200963-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200963-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200963-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200963 from upstream llvm trunk [Sparc] Emit correct encoding for atomic instructions. Also, add support for parsing CAS instructions to test the CAS encoding. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: test/MC/Sparc/sparc-atomic-instructions.s =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262261-llvm-r200965-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262261-llvm-r200965-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262261-llvm-r200965-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r200965 from upstream llvm trunk [Sparc] Add support for parsing synthetic instruction 'mov'. -Introduced here: http://svn.freebsd.org/changeset/base/262261 +Introduced here: http://svnweb.freebsd.org/changeset/base/262261 Index: lib/Target/Sparc/SparcInstrAliases.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r198311-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r198311-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r198311-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -3,7 +3,7 @@ Pull in r198311 from upstream clang trun In the FreeBSD assembler driver, inform the sparc assembler that we're producing PIC code. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Driver/Tools.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r198312-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r198312-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r198312-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198312 from upstream clang trun Remove a tab that snuck in. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Driver/Tools.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r198911-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r198911-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r198911-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198911 from upstream clang trun Pass -32/-64 to the assembler when building for sparc/sparc64. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/test/Driver/linux-as.c =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r198912-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r198912-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r198912-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198912 from upstream clang trun Give the linker the right ELF type for SPARC targets. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Driver/Tools.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r198918-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r198918-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r198918-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198918 from upstream clang trun Locate GCC installations on SPARC systems. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Driver/ToolChains.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r198923-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r198923-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r198923-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r198923 from upstream clang trun Use the right dynamic linker for SPARC Linux executables. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Driver/Tools.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r199012-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r199012-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r199012-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199012 from upstream clang trun Select the UltraSPARC instruction set when invoking the assembler. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Driver/Tools.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r199034-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r199034-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r199034-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199034 from upstream clang trun MIPS and SPARC assemblers both take the -KPIC flag. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Driver/Tools.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r199037-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r199037-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r199037-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199037 from upstream clang trun SPARC passes non-trivial C++ objects indirectly like everybody else. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/CodeGen/TargetInfo.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r199188-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r199188-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r199188-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -5,7 +5,7 @@ Pull in r199188 from upstream clang trun Pad these structs up so they are sret-returned even on that architecture. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/test/CodeGen/sret.c =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r199399-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r199399-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r199399-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r199399 from upstream clang trun SPARCv9 implements long double as an IEEE quad. -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/test/CodeGen/sparcv9-abi.c =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262262-clang-r200452-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262262-clang-r200452-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262262-clang-r200452-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -4,7 +4,7 @@ Pull in r200452 from upstream clang trun Patch by Roman Divacky! -Introduced here: http://svn.freebsd.org/changeset/base/262262 +Introduced here: http://svnweb.freebsd.org/changeset/base/262262 Index: tools/clang/lib/Basic/Targets.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262264-llvm-r200453-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262264-llvm-r200453-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262264-llvm-r200453-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -6,7 +6,7 @@ Pull in r200453 from upstream llvm trunk atomic swap can be implemented in terms of CASX, like the other atomic rmw primitives. -Introduced here: http://svn.freebsd.org/changeset/base/262264 +Introduced here: http://svnweb.freebsd.org/changeset/base/262264 Index: lib/Target/Sparc/SparcInstr64Bit.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262265-llvm-r201718-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262265-llvm-r201718-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262265-llvm-r201718-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r201718 from upstream llvm trunk Expand 64bit {SHL,SHR,SRA}_PARTS on sparcv9. -Introduced here: http://svn.freebsd.org/changeset/base/262265 +Introduced here: http://svnweb.freebsd.org/changeset/base/262265 Index: test/CodeGen/SPARC/parts.ll =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262303-enable-ppc-integrated-as.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262303-enable-ppc-integrated-as.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262303-enable-ppc-integrated-as.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r197521 from upstream clang trun Use the integrated assembler by default on FreeBSD/ppc and ppc64. -Introduced here: http://svn.freebsd.org/changeset/base/262303 +Introduced here: http://svnweb.freebsd.org/changeset/base/262303 Index: tools/clang/lib/Driver/ToolChains.h =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262415-llvm-r201994-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262415-llvm-r201994-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262415-llvm-r201994-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r201994 from upstream llvm trunk SPARC: Implement TRAP lowering. Matches what GCC emits. -Introduced here: http://svn.freebsd.org/changeset/base/262415 +Introduced here: http://svnweb.freebsd.org/changeset/base/262415 Index: lib/Target/Sparc/SparcInstrInfo.td =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262460-llvm-r202059-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262460-llvm-r202059-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262460-llvm-r202059-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r202059 from upstream clang trun Implement getDwarfEHStackPointer() and initDwarfEHRegSizeTable() for sparcv9. -Introduced here: http://svn.freebsd.org/changeset/base/262460 +Introduced here: http://svnweb.freebsd.org/changeset/base/262460 Index: tools/clang/lib/CodeGen/TargetInfo.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262535-clang-r202177-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262535-clang-r202177-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262535-clang-r202177-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -4,7 +4,7 @@ Pull in r202177 from upstream clang trun -march which doesnt exist on sparc gcc to -mcpu. While here adjust a few tests to not write an unused temporary file. -Introduced here: http://svn.freebsd.org/changeset/base/262535 +Introduced here: http://svnweb.freebsd.org/changeset/base/262535 Index: tools/clang/lib/Basic/Targets.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262536-clang-r202179-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262536-clang-r202179-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262536-clang-r202179-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -2,7 +2,7 @@ Pull in r202179 from upstream clang trun Pass the sparc architecture variant to the assembler. -Introduced here: http://svn.freebsd.org/changeset/base/262536 +Introduced here: http://svnweb.freebsd.org/changeset/base/262536 Index: tools/clang/lib/Driver/Tools.cpp =================================================================== Modified: stable/9/contrib/llvm/patches/patch-r262582-llvm-r202422-sparc.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r262582-llvm-r202422-sparc.diff Sat May 16 23:00:03 2015 (r283019) +++ stable/9/contrib/llvm/patches/patch-r262582-llvm-r202422-sparc.diff Sat May 16 23:18:30 2015 (r283020) @@ -4,7 +4,7 @@ Pull in r202422 from upstream llvm trunk expensive libcall. Also, Qp_neg is not implemented on at least FreeBSD. This is also what gcc is doing. -Introduced here: http://svn.freebsd.org/changeset/base/262582 +Introduced here: http://svnweb.freebsd.org/changeset/base/262582 Index: lib/Target/Sparc/SparcISelLowering.cpp =================================================================== *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat May 16 23:39:55 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D7BBF3F; Sat, 16 May 2015 23:39:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 3AE981298; Sat, 16 May 2015 23:39:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GNdtP7077204; Sat, 16 May 2015 23:39:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4GNdsa9077201; Sat, 16 May 2015 23:39:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201505162339.t4GNdsa9077201@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 16 May 2015 23:39:54 +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: r283021 - in stable/10: etc/mtree tests/sys/kern tests/sys/kern/execve 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@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 23:39:55 -0000 Author: ngie Date: Sat May 16 23:39:54 2015 New Revision: 283021 URL: https://svnweb.freebsd.org/changeset/base/283021 Log: MFC r282061: Integrate tools/regression/execve into the FreeBSD test suite as tests/sys/kern/execve Added: stable/10/tests/sys/kern/execve/ - copied from r282061, head/tests/sys/kern/execve/ Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/tests/sys/kern/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sat May 16 23:18:30 2015 (r283020) +++ stable/10/etc/mtree/BSD.tests.dist Sat May 16 23:39:54 2015 (r283021) @@ -185,6 +185,8 @@ file .. kern + execve + .. .. kqueue .. Modified: stable/10/tests/sys/kern/Makefile ============================================================================== --- stable/10/tests/sys/kern/Makefile Sat May 16 23:18:30 2015 (r283020) +++ stable/10/tests/sys/kern/Makefile Sat May 16 23:39:54 2015 (r283021) @@ -10,4 +10,6 @@ LDADD.unix_seqpacket_test+= -lpthread WARNS?= 5 +TESTS_SUBDIRS+= execve + .include