From owner-svn-src-stable@FreeBSD.ORG Sun Oct 5 02:52:55 2014 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 8487A513; Sun, 5 Oct 2014 02:52: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 66820378; Sun, 5 Oct 2014 02:52: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 s952qt6B090729; Sun, 5 Oct 2014 02:52:55 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s952qt7V090727; Sun, 5 Oct 2014 02:52:55 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201410050252.s952qt7V090727@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sun, 5 Oct 2014 02:52: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: r272549 - stable/10/bin/pkill/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.18-1 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, 05 Oct 2014 02:52:55 -0000 Author: rodrigc Date: Sun Oct 5 02:52:54 2014 New Revision: 272549 URL: https://svnweb.freebsd.org/changeset/base/272549 Log: MFC r272305 Fix pkill unit test. Modified: stable/10/bin/pkill/tests/pgrep-j_test.sh stable/10/bin/pkill/tests/pkill-j_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/pkill/tests/pgrep-j_test.sh ============================================================================== --- stable/10/bin/pkill/tests/pgrep-j_test.sh Sun Oct 5 02:37:01 2014 (r272548) +++ stable/10/bin/pkill/tests/pgrep-j_test.sh Sun Oct 5 02:52:54 2014 (r272549) @@ -1,7 +1,23 @@ #!/bin/sh # $FreeBSD$ -base=`basename $0` +jail_name_to_jid() +{ + local check_name="$1" + ( + line="$(jls -n 2> /dev/null | grep name=$check_name )" + for nv in $line; do + local name="${nv%=*}" + if [ "${name}" = "jid" ]; then + eval $nv + echo $jid + break + fi + done + ) +} + +base=pgrep_j_test echo "1..3" @@ -9,21 +25,25 @@ name="pgrep -j " if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - jail / $base-1 127.0.0.1 $sleep 5 & - chpid=$! - jail / $base-2 127.0.0.1 $sleep 5 & - chpid2=$! - $sleep 5 & - chpid3=$! - sleep 0.5 - jid=`jls | awk "/127\\.0\\.0\\.1.*${base}-1/ {print \$1}"` - pid=`pgrep -f -j $jid $sleep` - if [ "$pid" = "$chpid" ]; then + jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_1.pid $sleep 5 & + + jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_2.pid $sleep 5 & + + jid1=$(jail_name_to_jid ${base}_1_1) + jid2=$(jail_name_to_jid ${base}_1_2) + jid="${jid1},${jid2}" + pid1="$(pgrep -f -x -j $jid "$sleep 5" | sort)" + pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_1_1.pid)" \ + $(cat ${PWD}/${base}_1_2.pid) | sort) + if [ "$pid1" = "$pid2" ]; then echo "ok 1 - $name" else echo "not ok 1 - $name" fi - kill $chpid $chpid2 $chpid3 + [ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid) + [ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) rm -f $sleep else echo "ok 1 - $name # skip Test needs uid 0." @@ -33,21 +53,23 @@ name="pgrep -j any" if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - jail / $base-1 127.0.0.1 $sleep 5 & - chpid=$! - jail / $base-2 127.0.0.1 $sleep 5 & - chpid2=$! - $sleep 5 & - chpid3=$! - sleep 0.5 - pids=`pgrep -f -j any $sleep | sort` - refpids=`{ echo $chpid; echo $chpid2; } | sort` - if [ "$pids" = "$refpids" ]; then + jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_1.pid $sleep 5 & + + jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_2.pid $sleep 5 & + + sleep 2 + pid1="$(pgrep -f -x -j any "$sleep 5" | sort)" + pid2=$(printf "%s\n%s" "$(cat ${PWD}/${base}_2_1.pid)" \ + $(cat ${PWD}/${base}_2_2.pid) | sort) + if [ "$pid1" = "$pid2" ]; then echo "ok 2 - $name" else echo "not ok 2 - $name" fi - kill $chpid $chpid2 $chpid3 + [ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid) + [ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) rm -f $sleep else echo "ok 2 - $name # skip Test needs uid 0." @@ -57,19 +79,19 @@ name="pgrep -j none" if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - $sleep 5 & - chpid=$! - jail / $base 127.0.0.1 $sleep 5 & - chpid2=$! - sleep 0.5 - pid=`pgrep -f -j none $sleep` - if [ "$pid" = "$chpid" ]; then + daemon -p ${PWD}/${base}_3_1.pid $sleep 5 & + jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_3_2.pid $sleep 5 & + sleep 2 + pid="$(pgrep -f -x -j none "$sleep 5")" + if [ "$pid" = "$(cat ${PWD}/${base}_3_1.pid)" ]; then echo "ok 3 - $name" else echo "not ok 3 - $name" fi - kill $chpid $chpid2 rm -f $sleep + [ -f ${PWD}/${base}_3_1.pid ] && kill $(cat $PWD/${base}_3_1.pid) + [ -f ${PWD}/${base}_3_2.pid ] && kill $(cat $PWD/${base}_3_2.pid) else echo "ok 3 - $name # skip Test needs uid 0." fi Modified: stable/10/bin/pkill/tests/pkill-j_test.sh ============================================================================== --- stable/10/bin/pkill/tests/pkill-j_test.sh Sun Oct 5 02:37:01 2014 (r272548) +++ stable/10/bin/pkill/tests/pkill-j_test.sh Sun Oct 5 02:52:54 2014 (r272549) @@ -1,7 +1,23 @@ #!/bin/sh # $FreeBSD$ -base=`basename $0` +jail_name_to_jid() +{ + local check_name="$1" + ( + line="$(jls -n 2> /dev/null | grep name=$check_name )" + for nv in $line; do + local name="${nv%=*}" + if [ "${name}" = "jid" ]; then + eval $nv + echo $jid + break + fi + done + ) +} + +base=pkill_j_test echo "1..3" @@ -9,21 +25,28 @@ name="pkill -j " if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - jail / $base-1 127.0.0.1 $sleep 5 & - chpid=$! - jail / $base-2 127.0.0.1 $sleep 5 & - chpid2=$! + jail -c path=/ name=${base}_1_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_1.pid $sleep 5 & + + jail -c path=/ name=${base}_1_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_1_2.pid $sleep 5 & + $sleep 5 & - chpid3=$! sleep 0.5 - jid=`jls | awk "/127\\.0\\.0\\.1.*${base}-1/ {print \$1}"` - if pkill -f -j $jid $sleep && sleep 0.5 && - ! kill $chpid && kill $chpid2 $chpid3; then + jid1=$(jail_name_to_jid ${base}_1_1) + jid2=$(jail_name_to_jid ${base}_1_2) + jid="${jid1},${jid2}" + if pkill -f -j "$jid" $sleep && sleep 0.5 && + ! -f ${PWD}/${base}_1_1.pid && + ! -f ${PWD}/${base}_1_2.pid ; then echo "ok 1 - $name" else echo "not ok 1 - $name" fi 2>/dev/null rm -f $sleep + [ -f ${PWD}/${base}_1_1.pid ] && kill $(cat ${PWD}/${base}_1_1.pid) + [ -f ${PWD}/${base}_1_2.pid ] && kill $(cat ${PWD}/${base}_1_2.pid) + wait else echo "ok 1 - $name # skip Test needs uid 0." fi @@ -32,20 +55,26 @@ name="pkill -j any" if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - jail / $base-1 127.0.0.1 $sleep 5 & - chpid=$! - jail / $base-2 127.0.0.1 $sleep 5 & - chpid2=$! + jail -c path=/ name=${base}_2_1 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_1.pid $sleep 5 & + + jail -c path=/ name=${base}_2_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_2_2.pid $sleep 5 & + $sleep 5 & - chpid3=$! sleep 0.5 + chpid3=$! if pkill -f -j any $sleep && sleep 0.5 && - ! kill $chpid && ! kill $chpid2 && kill $chpid3; then + [ ! -f ${PWD}/${base}_2_1.pid -a + ! -f ${PWD}/${base}_2_2.pid ] && kill $chpid3; then echo "ok 2 - $name" else echo "not ok 2 - $name" fi 2>/dev/null rm -f $sleep + [ -f ${PWD}/${base}_2_1.pid ] && kill $(cat ${PWD}/${base}_2_1.pid) + [ -f ${PWD}/${base}_2_2.pid ] && kill $(cat ${PWD}/${base}_2_2.pid) + wait else echo "ok 2 - $name # skip Test needs uid 0." fi @@ -54,18 +83,20 @@ name="pkill -j none" if [ `id -u` -eq 0 ]; then sleep=$(pwd)/sleep.txt ln -sf /bin/sleep $sleep - $sleep 5 & - chpid=$! - jail / $base 127.0.0.1 $sleep 5 & - chpid2=$! - sleep 0.5 - if pkill -f -j none $sleep && sleep 0.5 && - ! kill $chpid && kill $chpid2; then + daemon -p ${PWD}/${base}_3_1.pid $sleep 5 + jail -c path=/ name=${base}_3_2 ip4.addr=127.0.0.1 \ + command=daemon -p ${PWD}/${base}_3_2.pid $sleep 5 & + sleep 1 + if pkill -f -j none "$sleep 5" && sleep 1 && + [ ! -f ${PWD}/${base}_3_1.pid -a -f ${PWD}/${base}_3_2.pid ] ; then echo "ok 3 - $name" else + ls ${PWD}/*.pid echo "not ok 3 - $name" fi 2>/dev/null rm -f $sleep + [ -f ${PWD}/${base}_3_1.pid ] && kill $(cat ${base}_3_1.pid) + [ -f ${PWD}/${base}_3_2.pid ] && kill $(cat ${base}_3_2.pid) else echo "ok 3 - $name # skip Test needs uid 0." fi From owner-svn-src-stable@FreeBSD.ORG Sun Oct 5 23:32:59 2014 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 D3322A42; Sun, 5 Oct 2014 23:32: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 BEA0DB52; Sun, 5 Oct 2014 23:32: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 s95NWxmE084620; Sun, 5 Oct 2014 23:32:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s95NWwjY084616; Sun, 5 Oct 2014 23:32:58 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410052332.s95NWwjY084616@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 5 Oct 2014 23:32: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: r272577 - in stable/10: etc etc/defaults share/man/man5 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.18-1 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, 05 Oct 2014 23:32:59 -0000 Author: bdrewery Date: Sun Oct 5 23:32:58 2014 New Revision: 272577 URL: https://svnweb.freebsd.org/changeset/base/272577 Log: MFC r271424: - Add $netif_ipexpand_max to specify the upper limit for the number of addresses generated by an address range specification. The default value is 2048. This can be increased by setting $netif_ipexpand_max in rc.conf. PR: 186841 Modified: stable/10/etc/defaults/rc.conf stable/10/etc/network.subr stable/10/share/man/man5/rc.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/rc.conf ============================================================================== --- stable/10/etc/defaults/rc.conf Sun Oct 5 22:13:13 2014 (r272576) +++ stable/10/etc/defaults/rc.conf Sun Oct 5 23:32:58 2014 (r272577) @@ -110,6 +110,7 @@ synchronous_dhclient="NO" # Start dhclie # interfaces during startup. defaultroute_delay="30" # Time to wait for a default route on a DHCP interface. defaultroute_carrier_delay="5" # Time to wait for carrier while waiting for a default route. +netif_ipexpand_max="2048" # Maximum number of IP addrs in a range spec. wpa_supplicant_program="/usr/sbin/wpa_supplicant" wpa_supplicant_flags="-s" # Extra flags to pass to wpa_supplicant wpa_supplicant_conf_file="/etc/wpa_supplicant.conf" Modified: stable/10/etc/network.subr ============================================================================== --- stable/10/etc/network.subr Sun Oct 5 22:13:13 2014 (r272576) +++ stable/10/etc/network.subr Sun Oct 5 23:32:58 2014 (r272577) @@ -25,9 +25,7 @@ # $FreeBSD$ # IFCONFIG_CMD="/sbin/ifconfig" - -# Maximum number of addresses expanded from a address range specification. -_IPEXPANDMAX=31 +: ${netif_ipexpand_max:=2048} # # Subroutines commonly used from network startup scripts. @@ -888,8 +886,8 @@ ifalias_expand_addr_inet() _ipcount=$_iplow while [ "$_ipcount" -le "$_iphigh" ]; do _retstr="${_retstr} ${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail}${_plen:+/}${_plen}" - if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ]; then - warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed." + if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ]; then + warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed. Increase \$netif_ipexpand_max in rc.conf." break else _ipcount=$(($_ipcount + 1)) @@ -978,9 +976,9 @@ ifalias_expand_addr_inet6() $_ipleft $_ipcount $_ipright \ ${_plen:+/}$_plen` _retstr="$_retstr $_r" - if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ] + if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ] then - warn "Range specification is too large $(printf '(%s:%04x%s-%s:%04x%s)' $_ipleft $_iplow $_ipright $_ipleft $_iphigh $_ipright). $(printf '%s:%04x%s-%s:%04x%s' $_ipleft $_iplow $_ipright $_ipleft $_ipcount $_ipright) was processed." + warn "Range specification is too large $(printf '(%s:%x%s-%s:%x%s)' "$_ipleft" "$_iplow" "$_ipright" "$_ipleft" "$_iphigh" "$_ipright"). $(printf '%s:%x%s-%s:%x%s' "$_ipleft" "$_iplow" "$_ipright" "$_ipleft" "$_ipcount" "$_ipright") was processed. Increase \$netif_ipexpand_max in rc.conf." break else _ipcount=$(($_ipcount + 1)) Modified: stable/10/share/man/man5/rc.conf.5 ============================================================================== --- stable/10/share/man/man5/rc.conf.5 Sun Oct 5 22:13:13 2014 (r272576) +++ stable/10/share/man/man5/rc.conf.5 Sun Oct 5 23:32:58 2014 (r272577) @@ -1159,6 +1159,19 @@ or .Li inet6 2001:db8:1-f::1/64 . This notation allows address and prefix length part only, not the other address modifiers. +Note that the maximum number of the generated addresses from a range +specification is limited to an integer value specified in +.Va netif_ipexpand_max +in +.Xr rc.conf 5 +because a small typo can unexpectedly generate a large number of addresses. +The default value is +.Li 2048 . +It can be increased by adding the following line into +.Xr rc.conf 5 : +.Bd -literal +netif_ipexpand_max="4096" +.Ed .Pp In the case of .Li 192.0.2.5-23/24 , From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 00:27:09 2014 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 3EFA74C4; Mon, 6 Oct 2014 00:27: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 2B5E38; Mon, 6 Oct 2014 00:27: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 s960R98S010033; Mon, 6 Oct 2014 00:27:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s960R9hF010032; Mon, 6 Oct 2014 00:27:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410060027.s960R9hF010032@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 6 Oct 2014 00:27:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272580 - stable/10/share/man/man5 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.18-1 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, 06 Oct 2014 00:27:09 -0000 Author: bdrewery Date: Mon Oct 6 00:27:08 2014 New Revision: 272580 URL: https://svnweb.freebsd.org/changeset/base/272580 Log: MFC r272579: Bump .Dd missed in r271424 Modified: stable/10/share/man/man5/rc.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/rc.conf.5 ============================================================================== --- stable/10/share/man/man5/rc.conf.5 Mon Oct 6 00:25:10 2014 (r272579) +++ stable/10/share/man/man5/rc.conf.5 Mon Oct 6 00:27:08 2014 (r272580) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 27, 2014 +.Dd September 11, 2014 .Dt RC.CONF 5 .Os .Sh NAME From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 00:31:33 2014 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 18FD364C; Mon, 6 Oct 2014 00:31:33 +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 EE754BE; Mon, 6 Oct 2014 00:31: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 s960VWbO013662; Mon, 6 Oct 2014 00:31:32 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s960VWjc013625; Mon, 6 Oct 2014 00:31:32 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410060031.s960VWjc013625@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 6 Oct 2014 00:31:32 +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: r272581 - in stable/9: etc etc/defaults share/man/man5 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.18-1 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, 06 Oct 2014 00:31:33 -0000 Author: bdrewery Date: Mon Oct 6 00:31:31 2014 New Revision: 272581 URL: https://svnweb.freebsd.org/changeset/base/272581 Log: MFC r271424,r272579: - Add $netif_ipexpand_max to specify the upper limit for the number of addresses generated by an address range specification. The default value is 2048. This can be increased by setting $netif_ipexpand_max in rc.conf. - Bump .Dd missed in r271424 Modified: stable/9/etc/defaults/rc.conf stable/9/etc/network.subr stable/9/share/man/man5/rc.conf.5 Directory Properties: stable/9/etc/ (props changed) stable/9/share/man/man5/ (props changed) Modified: stable/9/etc/defaults/rc.conf ============================================================================== --- stable/9/etc/defaults/rc.conf Mon Oct 6 00:27:08 2014 (r272580) +++ stable/9/etc/defaults/rc.conf Mon Oct 6 00:31:31 2014 (r272581) @@ -114,6 +114,7 @@ synchronous_dhclient="NO" # Start dhclie # interfaces during startup. defaultroute_delay="30" # Time to wait for a default route on a DHCP interface. defaultroute_carrier_delay="5" # Time to wait for carrier while waiting for a default route. +netif_ipexpand_max="2048" # Maximum number of IP addrs in a range spec. wpa_supplicant_program="/usr/sbin/wpa_supplicant" wpa_supplicant_flags="-s" # Extra flags to pass to wpa_supplicant wpa_supplicant_conf_file="/etc/wpa_supplicant.conf" Modified: stable/9/etc/network.subr ============================================================================== --- stable/9/etc/network.subr Mon Oct 6 00:27:08 2014 (r272580) +++ stable/9/etc/network.subr Mon Oct 6 00:31:31 2014 (r272581) @@ -25,9 +25,7 @@ # $FreeBSD$ # IFCONFIG_CMD="/sbin/ifconfig" - -# Maximum number of addresses expanded from a address range specification. -_IPEXPANDMAX=31 +: ${netif_ipexpand_max:=2048} # # Subroutines commonly used from network startup scripts. @@ -820,8 +818,8 @@ ifalias_expand_addr_inet() _ipcount=$_iplow while [ "$_ipcount" -le "$_iphigh" ]; do _retstr="${_retstr} ${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail}${_plen:+/}${_plen}" - if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ]; then - warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed." + if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ]; then + warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed. Increase \$netif_ipexpand_max in rc.conf." break else _ipcount=$(($_ipcount + 1)) @@ -910,9 +908,9 @@ ifalias_expand_addr_inet6() $_ipleft $_ipcount $_ipright \ ${_plen:+/}$_plen` _retstr="$_retstr $_r" - if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ] + if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ] then - warn "Range specification is too large $(printf '(%s:%04x%s-%s:%04x%s)' $_ipleft $_iplow $_ipright $_ipleft $_iphigh $_ipright). $(printf '%s:%04x%s-%s:%04x%s' $_ipleft $_iplow $_ipright $_ipleft $_ipcount $_ipright) was processed." + warn "Range specification is too large $(printf '(%s:%x%s-%s:%x%s)' "$_ipleft" "$_iplow" "$_ipright" "$_ipleft" "$_iphigh" "$_ipright"). $(printf '%s:%x%s-%s:%x%s' "$_ipleft" "$_iplow" "$_ipright" "$_ipleft" "$_ipcount" "$_ipright") was processed. Increase \$netif_ipexpand_max in rc.conf." break else _ipcount=$(($_ipcount + 1)) Modified: stable/9/share/man/man5/rc.conf.5 ============================================================================== --- stable/9/share/man/man5/rc.conf.5 Mon Oct 6 00:27:08 2014 (r272580) +++ stable/9/share/man/man5/rc.conf.5 Mon Oct 6 00:31:31 2014 (r272581) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 13, 2014 +.Dd September 11, 2014 .Dt RC.CONF 5 .Os .Sh NAME @@ -1137,6 +1137,19 @@ or .Li inet6 2001:db8:1-f::1/64 . This notation allows address and prefix length part only, not the other address modifiers. +Note that the maximum number of the generated addresses from a range +specification is limited to an integer value specified in +.Va netif_ipexpand_max +in +.Xr rc.conf 5 +because a small typo can unexpectedly generate a large number of addresses. +The default value is +.Li 2048 . +It can be increased by adding the following line into +.Xr rc.conf 5 : +.Bd -literal +netif_ipexpand_max="4096" +.Ed .Pp In the case of .Li 192.0.2.5-23/24 , From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 05:58:17 2014 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 AC1FD8BE; Mon, 6 Oct 2014 05:58: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 8E2D514A; Mon, 6 Oct 2014 05:58: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 s965wHEb065662; Mon, 6 Oct 2014 05:58:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s965wHV3065660; Mon, 6 Oct 2014 05:58:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410060558.s965wHV3065660@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 6 Oct 2014 05:58: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: r272586 - stable/9/sys/dev/usb/controller 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.18-1 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, 06 Oct 2014 05:58:17 -0000 Author: hselasky Date: Mon Oct 6 05:58:16 2014 New Revision: 272586 URL: https://svnweb.freebsd.org/changeset/base/272586 Log: MFC r272349, r272422 and r272479: - Fix XHCI driver for devices which have more than 15 physical root HUB ports. The current bitmap array was too small to hold more than 16 bits and would at some point toggle the context size, which then would trigger an enumeration fault and cause a fallback to the EHCI companion controller, if any. - Make sure we always set the maximum number of valid contexts. - Set default cycle state in case of early interrupts. Modified: stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/controller/xhci.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Mon Oct 6 05:54:39 2014 (r272585) +++ stable/9/sys/dev/usb/controller/xhci.c Mon Oct 6 05:58:16 2014 (r272586) @@ -593,6 +593,10 @@ xhci_init(struct xhci_softc *sc, device_ sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = XHCI_MAX_DEVICES; + /* set default cycle state in case of early interrupts */ + sc->sc_event_ccs = 1; + sc->sc_command_ccs = 1; + /* setup command queue mutex and condition varible */ cv_init(&sc->sc_cmd_cv, "CMDQ"); sx_init(&sc->sc_cmd_sx, "CMDQ lock"); @@ -2236,14 +2240,17 @@ xhci_configure_mask(struct usb_device *u /* adjust */ x--; - /* figure out maximum */ - if (x > sc->sc_hw.devs[index].context_num) { + /* figure out the maximum number of contexts */ + if (x > sc->sc_hw.devs[index].context_num) sc->sc_hw.devs[index].context_num = x; - temp = xhci_ctx_get_le32(sc, &pinp->ctx_slot.dwSctx0); - temp &= ~XHCI_SCTX_0_CTX_NUM_SET(31); - temp |= XHCI_SCTX_0_CTX_NUM_SET(x + 1); - xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx0, temp); - } + else + x = sc->sc_hw.devs[index].context_num; + + /* update number of contexts */ + temp = xhci_ctx_get_le32(sc, &pinp->ctx_slot.dwSctx0); + temp &= ~XHCI_SCTX_0_CTX_NUM_SET(31); + temp |= XHCI_SCTX_0_CTX_NUM_SET(x + 1); + xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx0, temp); } return (0); } Modified: stable/9/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.h Mon Oct 6 05:54:39 2014 (r272585) +++ stable/9/sys/dev/usb/controller/xhci.h Mon Oct 6 05:58:16 2014 (r272586) @@ -482,7 +482,8 @@ struct xhci_softc { uint8_t sc_noscratch; /* root HUB device configuration */ uint8_t sc_conf; - uint8_t sc_hub_idata[2]; + /* root HUB port event bitmap, max 256 ports */ + uint8_t sc_hub_idata[32]; /* size of context */ uint8_t sc_ctx_is_64_byte; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 06:00:07 2014 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 94F599FC; Mon, 6 Oct 2014 06: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 760D2154; Mon, 6 Oct 2014 06: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 s96607RU066126; Mon, 6 Oct 2014 06:00:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96607pJ066124; Mon, 6 Oct 2014 06:00:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410060600.s96607pJ066124@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 6 Oct 2014 06:00:07 +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: r272587 - stable/8/sys/dev/usb/controller 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.18-1 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, 06 Oct 2014 06:00:07 -0000 Author: hselasky Date: Mon Oct 6 06:00:06 2014 New Revision: 272587 URL: https://svnweb.freebsd.org/changeset/base/272587 Log: MFC r272349, r272422 and r272479: - Fix XHCI driver for devices which have more than 15 physical root HUB ports. The current bitmap array was too small to hold more than 16 bits and would at some point toggle the context size, which then would trigger an enumeration fault and cause a fallback to the EHCI companion controller, if any. - Make sure we always set the maximum number of valid contexts. - Set default cycle state in case of early interrupts. Modified: stable/8/sys/dev/usb/controller/xhci.c stable/8/sys/dev/usb/controller/xhci.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Mon Oct 6 05:58:16 2014 (r272586) +++ stable/8/sys/dev/usb/controller/xhci.c Mon Oct 6 06:00:06 2014 (r272587) @@ -593,6 +593,10 @@ xhci_init(struct xhci_softc *sc, device_ sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = XHCI_MAX_DEVICES; + /* set default cycle state in case of early interrupts */ + sc->sc_event_ccs = 1; + sc->sc_command_ccs = 1; + /* setup command queue mutex and condition varible */ cv_init(&sc->sc_cmd_cv, "CMDQ"); sx_init(&sc->sc_cmd_sx, "CMDQ lock"); @@ -2236,14 +2240,17 @@ xhci_configure_mask(struct usb_device *u /* adjust */ x--; - /* figure out maximum */ - if (x > sc->sc_hw.devs[index].context_num) { + /* figure out the maximum number of contexts */ + if (x > sc->sc_hw.devs[index].context_num) sc->sc_hw.devs[index].context_num = x; - temp = xhci_ctx_get_le32(sc, &pinp->ctx_slot.dwSctx0); - temp &= ~XHCI_SCTX_0_CTX_NUM_SET(31); - temp |= XHCI_SCTX_0_CTX_NUM_SET(x + 1); - xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx0, temp); - } + else + x = sc->sc_hw.devs[index].context_num; + + /* update number of contexts */ + temp = xhci_ctx_get_le32(sc, &pinp->ctx_slot.dwSctx0); + temp &= ~XHCI_SCTX_0_CTX_NUM_SET(31); + temp |= XHCI_SCTX_0_CTX_NUM_SET(x + 1); + xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx0, temp); } return (0); } Modified: stable/8/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.h Mon Oct 6 05:58:16 2014 (r272586) +++ stable/8/sys/dev/usb/controller/xhci.h Mon Oct 6 06:00:06 2014 (r272587) @@ -482,7 +482,8 @@ struct xhci_softc { uint8_t sc_noscratch; /* root HUB device configuration */ uint8_t sc_conf; - uint8_t sc_hub_idata[2]; + /* root HUB port event bitmap, max 256 ports */ + uint8_t sc_hub_idata[32]; /* size of context */ uint8_t sc_ctx_is_64_byte; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 06:01:47 2014 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 5C5E5C64; Mon, 6 Oct 2014 06:01: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 3D3F7171; Mon, 6 Oct 2014 06:01: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 s9661lPO069790; Mon, 6 Oct 2014 06:01:47 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9661kW2069785; Mon, 6 Oct 2014 06:01:46 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410060601.s9661kW2069785@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 6 Oct 2014 06:01: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: r272589 - stable/10/sys/dev/usb/controller 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.18-1 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, 06 Oct 2014 06:01:47 -0000 Author: hselasky Date: Mon Oct 6 06:01:46 2014 New Revision: 272589 URL: https://svnweb.freebsd.org/changeset/base/272589 Log: MFC r272349, r272422 and r272479: - Fix XHCI driver for devices which have more than 15 physical root HUB ports. The current bitmap array was too small to hold more than 16 bits and would at some point toggle the context size, which then would trigger an enumeration fault and cause a fallback to the EHCI companion controller, if any. - Make sure we always set the maximum number of valid contexts. - Set default cycle state in case of early interrupts. Modified: stable/10/sys/dev/usb/controller/xhci.c stable/10/sys/dev/usb/controller/xhci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Mon Oct 6 06:00:50 2014 (r272588) +++ stable/10/sys/dev/usb/controller/xhci.c Mon Oct 6 06:01:46 2014 (r272589) @@ -618,6 +618,10 @@ xhci_init(struct xhci_softc *sc, device_ sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = XHCI_MAX_DEVICES; + /* set default cycle state in case of early interrupts */ + sc->sc_event_ccs = 1; + sc->sc_command_ccs = 1; + /* setup command queue mutex and condition varible */ cv_init(&sc->sc_cmd_cv, "CMDQ"); sx_init(&sc->sc_cmd_sx, "CMDQ lock"); @@ -2271,14 +2275,17 @@ xhci_configure_mask(struct usb_device *u /* adjust */ x--; - /* figure out maximum */ - if (x > sc->sc_hw.devs[index].context_num) { + /* figure out the maximum number of contexts */ + if (x > sc->sc_hw.devs[index].context_num) sc->sc_hw.devs[index].context_num = x; - temp = xhci_ctx_get_le32(sc, &pinp->ctx_slot.dwSctx0); - temp &= ~XHCI_SCTX_0_CTX_NUM_SET(31); - temp |= XHCI_SCTX_0_CTX_NUM_SET(x + 1); - xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx0, temp); - } + else + x = sc->sc_hw.devs[index].context_num; + + /* update number of contexts */ + temp = xhci_ctx_get_le32(sc, &pinp->ctx_slot.dwSctx0); + temp &= ~XHCI_SCTX_0_CTX_NUM_SET(31); + temp |= XHCI_SCTX_0_CTX_NUM_SET(x + 1); + xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx0, temp); } return (0); } Modified: stable/10/sys/dev/usb/controller/xhci.h ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.h Mon Oct 6 06:00:50 2014 (r272588) +++ stable/10/sys/dev/usb/controller/xhci.h Mon Oct 6 06:01:46 2014 (r272589) @@ -493,7 +493,8 @@ struct xhci_softc { uint8_t sc_noscratch; /* root HUB device configuration */ uint8_t sc_conf; - uint8_t sc_hub_idata[2]; + /* root HUB port event bitmap, max 256 ports */ + uint8_t sc_hub_idata[32]; /* size of context */ uint8_t sc_ctx_is_64_byte; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 06:03:27 2014 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 2AB01DB0; Mon, 6 Oct 2014 06:03: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 F037D208; Mon, 6 Oct 2014 06:03: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 s9663QLV070064; Mon, 6 Oct 2014 06:03:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9663Q0H070061; Mon, 6 Oct 2014 06:03:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410060603.s9663Q0H070061@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 6 Oct 2014 06:03: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: r272590 - in stable/10: share/man/man4 sys/dev/usb sys/dev/usb/wlan 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.18-1 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, 06 Oct 2014 06:03:27 -0000 Author: hselasky Date: Mon Oct 6 06:03:25 2014 New Revision: 272590 URL: https://svnweb.freebsd.org/changeset/base/272590 Log: MFC r272410: Add new USB ID. PR: 194091 Modified: stable/10/share/man/man4/urtwn.4 stable/10/sys/dev/usb/usbdevs stable/10/sys/dev/usb/wlan/if_urtwn.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/urtwn.4 ============================================================================== --- stable/10/share/man/man4/urtwn.4 Mon Oct 6 06:01:46 2014 (r272589) +++ stable/10/share/man/man4/urtwn.4 Mon Oct 6 06:03:25 2014 (r272590) @@ -19,7 +19,7 @@ .Os .Sh NAME .Nm urtwn -.Nd Realtek RTL8188CU/RTL8188EU/RTL8192CU USB IEEE 802.11b/g/n wireless network device +.Nd Realtek RTL8188CU/RTL8188RU/RTL8188EU/RTL8192CU USB IEEE 802.11b/g/n wireless network device .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -82,10 +82,11 @@ firmware license .Sh HARDWARE The .Nm -driver supports Realtek RTL8188CU/RTL8188EU/RTL8192CU based USB +driver supports Realtek RTL8188CU/RTL8188RU/RTL8188EU/RTL8192CU based USB IEEE 802.11b/g/n wireless network adapters, including: .Pp .Bl -tag -width Ds -offset indent -compact +.It Alfa AWUS036NHR v2 .It ASUS USB-N10 NANO .It Belkin F7D1102 Surf Wireless Micro .It D-Link DWA-125 rev D1 Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Mon Oct 6 06:01:46 2014 (r272589) +++ stable/10/sys/dev/usb/usbdevs Mon Oct 6 06:03:25 2014 (r272590) @@ -3709,6 +3709,7 @@ product REALTEK RTL8191CU 0x8177 RTL8191 product REALTEK RTL8192CU 0x8178 RTL8192CU product REALTEK RTL8192CE 0x817c RTL8192CE product REALTEK RTL8188RU_1 0x817d RTL8188RU +product REALTEK RTL8188RU_3 0x817f RTL8188RU product REALTEK RTL8712 0x8712 RTL8712 product REALTEK RTL8713 0x8712 RTL8713 product REALTEK RTL8188RU_2 0x317f RTL8188RU Modified: stable/10/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- stable/10/sys/dev/usb/wlan/if_urtwn.c Mon Oct 6 06:01:46 2014 (r272589) +++ stable/10/sys/dev/usb/wlan/if_urtwn.c Mon Oct 6 06:03:25 2014 (r272590) @@ -140,6 +140,7 @@ static const STRUCT_USB_HOST_ID urtwn_de URTWN_DEV(REALTEK, RTL8188CUS), URTWN_DEV(REALTEK, RTL8188RU_1), URTWN_DEV(REALTEK, RTL8188RU_2), + URTWN_DEV(REALTEK, RTL8188RU_3), URTWN_DEV(REALTEK, RTL8191CU), URTWN_DEV(REALTEK, RTL8192CE), URTWN_DEV(REALTEK, RTL8192CU), From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 06:05:44 2014 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 37991CB; Mon, 6 Oct 2014 06:05:44 +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 0A3FA21C; Mon, 6 Oct 2014 06:05:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9665hvo070478; Mon, 6 Oct 2014 06:05:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9665hOw070477; Mon, 6 Oct 2014 06:05:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410060605.s9665hOw070477@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 6 Oct 2014 06:05: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: r272592 - stable/10/sys/dev/usb 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.18-1 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, 06 Oct 2014 06:05:44 -0000 Author: hselasky Date: Mon Oct 6 06:05:43 2014 New Revision: 272592 URL: https://svnweb.freebsd.org/changeset/base/272592 Log: MFC r272480: When we fail to get a USB reference we should just return, because there are no more references held. Modified: stable/10/sys/dev/usb/usb_dev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_dev.c ============================================================================== --- stable/10/sys/dev/usb/usb_dev.c Mon Oct 6 06:04:10 2014 (r272591) +++ stable/10/sys/dev/usb/usb_dev.c Mon Oct 6 06:05:43 2014 (r272592) @@ -299,6 +299,10 @@ error: } mtx_unlock(&usb_ref_lock); DPRINTFN(2, "fail\n"); + + /* clear all refs */ + memset(crd, 0, sizeof(*crd)); + return (USB_ERR_INVAL); } @@ -1094,8 +1098,8 @@ usb_ioctl(struct cdev *dev, u_long cmd, goto done; if (usb_usb_ref_device(cpd, &refs)) { - err = ENXIO; - goto done; + /* we lost the reference */ + return (ENXIO); } err = (f->methods->f_ioctl_post) (f, cmd, addr, fflags); @@ -1118,9 +1122,8 @@ usb_ioctl(struct cdev *dev, u_long cmd, while (usb_ref_device(cpd, &refs, 1 /* need uref */)) { if (usb_ref_device(cpd, &refs, 0)) { - /* device no longer exits */ - err = ENXIO; - goto done; + /* device no longer exists */ + return (ENXIO); } usb_unref_device(cpd, &refs); usb_pause_mtx(NULL, hz / 128); @@ -1412,9 +1415,9 @@ usb_read(struct cdev *dev, struct uio *u return (err); err = usb_ref_device(cpd, &refs, 0 /* no uref */ ); - if (err) { + if (err) return (ENXIO); - } + fflags = cpd->fflags; f = refs.rxfifo; @@ -1538,9 +1541,9 @@ usb_write(struct cdev *dev, struct uio * return (err); err = usb_ref_device(cpd, &refs, 0 /* no uref */ ); - if (err) { + if (err) return (ENXIO); - } + fflags = cpd->fflags; f = refs.txfifo; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 06:07:03 2014 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 918DC201; Mon, 6 Oct 2014 06:07: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 6319922D; Mon, 6 Oct 2014 06:07: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 s96673J4070704; Mon, 6 Oct 2014 06:07:03 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96673AE070703; Mon, 6 Oct 2014 06:07:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410060607.s96673AE070703@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 6 Oct 2014 06:07:03 +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: r272593 - stable/9/sys/dev/usb 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.18-1 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, 06 Oct 2014 06:07:03 -0000 Author: hselasky Date: Mon Oct 6 06:07:02 2014 New Revision: 272593 URL: https://svnweb.freebsd.org/changeset/base/272593 Log: MFC r272480: When we fail to get a USB reference we should just return, because there are no more references held. Modified: stable/9/sys/dev/usb/usb_dev.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usb_dev.c ============================================================================== --- stable/9/sys/dev/usb/usb_dev.c Mon Oct 6 06:05:43 2014 (r272592) +++ stable/9/sys/dev/usb/usb_dev.c Mon Oct 6 06:07:02 2014 (r272593) @@ -295,6 +295,10 @@ error: } mtx_unlock(&usb_ref_lock); DPRINTFN(2, "fail\n"); + + /* clear all refs */ + memset(crd, 0, sizeof(*crd)); + return (USB_ERR_INVAL); } @@ -1090,8 +1094,8 @@ usb_ioctl(struct cdev *dev, u_long cmd, goto done; if (usb_usb_ref_device(cpd, &refs)) { - err = ENXIO; - goto done; + /* we lost the reference */ + return (ENXIO); } err = (f->methods->f_ioctl_post) (f, cmd, addr, fflags); @@ -1114,9 +1118,8 @@ usb_ioctl(struct cdev *dev, u_long cmd, while (usb_ref_device(cpd, &refs, 1 /* need uref */)) { if (usb_ref_device(cpd, &refs, 0)) { - /* device no longer exits */ - err = ENXIO; - goto done; + /* device no longer exists */ + return (ENXIO); } usb_unref_device(cpd, &refs); usb_pause_mtx(NULL, hz / 128); @@ -1408,9 +1411,9 @@ usb_read(struct cdev *dev, struct uio *u return (err); err = usb_ref_device(cpd, &refs, 0 /* no uref */ ); - if (err) { + if (err) return (ENXIO); - } + fflags = cpd->fflags; f = refs.rxfifo; @@ -1534,9 +1537,9 @@ usb_write(struct cdev *dev, struct uio * return (err); err = usb_ref_device(cpd, &refs, 0 /* no uref */ ); - if (err) { + if (err) return (ENXIO); - } + fflags = cpd->fflags; f = refs.txfifo; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 06:08:30 2014 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 951FB425; Mon, 6 Oct 2014 06:08: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 6693923C; Mon, 6 Oct 2014 06:08: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 s9668UjR070963; Mon, 6 Oct 2014 06:08:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9668UgL070962; Mon, 6 Oct 2014 06:08:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410060608.s9668UgL070962@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 6 Oct 2014 06:08: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: r272594 - stable/8/sys/dev/usb 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.18-1 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, 06 Oct 2014 06:08:30 -0000 Author: hselasky Date: Mon Oct 6 06:08:29 2014 New Revision: 272594 URL: https://svnweb.freebsd.org/changeset/base/272594 Log: MFC r272480: When we fail to get a USB reference we should just return, because there are no more references held. Modified: stable/8/sys/dev/usb/usb_dev.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/usb_dev.c ============================================================================== --- stable/8/sys/dev/usb/usb_dev.c Mon Oct 6 06:07:02 2014 (r272593) +++ stable/8/sys/dev/usb/usb_dev.c Mon Oct 6 06:08:29 2014 (r272594) @@ -293,6 +293,10 @@ error: } mtx_unlock(&usb_ref_lock); DPRINTFN(2, "fail\n"); + + /* clear all refs */ + memset(crd, 0, sizeof(*crd)); + return (USB_ERR_INVAL); } @@ -1079,8 +1083,8 @@ usb_ioctl(struct cdev *dev, u_long cmd, goto done; if (usb_usb_ref_device(cpd, &refs)) { - err = ENXIO; - goto done; + /* we lost the reference */ + return (ENXIO); } err = (f->methods->f_ioctl_post) (f, cmd, addr, fflags); @@ -1103,9 +1107,8 @@ usb_ioctl(struct cdev *dev, u_long cmd, while (usb_ref_device(cpd, &refs, 1 /* need uref */)) { if (usb_ref_device(cpd, &refs, 0)) { - /* device no longer exits */ - err = ENXIO; - goto done; + /* device no longer exists */ + return (ENXIO); } usb_unref_device(cpd, &refs); usb_pause_mtx(NULL, hz / 128); @@ -1241,9 +1244,9 @@ usb_read(struct cdev *dev, struct uio *u return (err); err = usb_ref_device(cpd, &refs, 0 /* no uref */ ); - if (err) { + if (err) return (ENXIO); - } + fflags = cpd->fflags; f = refs.rxfifo; @@ -1367,9 +1370,9 @@ usb_write(struct cdev *dev, struct uio * return (err); err = usb_ref_device(cpd, &refs, 0 /* no uref */ ); - if (err) { + if (err) return (ENXIO); - } + fflags = cpd->fflags; f = refs.txfifo; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 09:15:10 2014 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 4B01B30A; Mon, 6 Oct 2014 09:15:10 +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 37E66AA7; Mon, 6 Oct 2014 09:15:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s969FA8H060053; Mon, 6 Oct 2014 09:15:10 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s969FAxx060052; Mon, 6 Oct 2014 09:15:10 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201410060915.s969FAxx060052@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Mon, 6 Oct 2014 09:15: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: r272603 - stable/10/usr.bin/sort X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 06 Oct 2014 09:15:10 -0000 Author: bapt Date: Mon Oct 6 09:15:09 2014 New Revision: 272603 URL: https://svnweb.freebsd.org/changeset/base/272603 Log: MFC: r272398 Make sure to not skip any argument when converting from deprecated +POS1, -POS2 to -kPOS1,POS2, so that sort +0n gets translated to sort -k1,1n as it is expected PR: 193994 Submitted by: rodrigo MFC after: 3 days Modified: stable/10/usr.bin/sort/sort.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/sort/sort.c ============================================================================== --- stable/10/usr.bin/sort/sort.c Mon Oct 6 09:00:53 2014 (r272602) +++ stable/10/usr.bin/sort/sort.c Mon Oct 6 09:15:09 2014 (r272603) @@ -897,7 +897,7 @@ fix_obsolete_keys(int *argc, char **argv } } } - sprintf(sopt, "-k%d.%d", f1, c1); + sprintf(sopt, "-k%d.%d%s", f1, c1, sopts1); argv[i] = sort_strdup(sopt); } } From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 09:46:22 2014 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 AB2B1B9E; Mon, 6 Oct 2014 09:46: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 981ACDD6; Mon, 6 Oct 2014 09:46: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 s969kMa9074395; Mon, 6 Oct 2014 09:46:22 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s969kMiO074394; Mon, 6 Oct 2014 09:46:22 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201410060946.s969kMiO074394@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Mon, 6 Oct 2014 09:46: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: r272604 - stable/10/sys/dev/netmap 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.18-1 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, 06 Oct 2014 09:46:22 -0000 Author: luigi Date: Mon Oct 6 09:46:21 2014 New Revision: 272604 URL: https://svnweb.freebsd.org/changeset/base/272604 Log: MFC r272111 fix a panic when passing ifioctl from a netmap file descriptor to the underlying device. This needs to be merged to 10.1 Modified: stable/10/sys/dev/netmap/netmap.c Modified: stable/10/sys/dev/netmap/netmap.c ============================================================================== --- stable/10/sys/dev/netmap/netmap.c Mon Oct 6 09:15:09 2014 (r272603) +++ stable/10/sys/dev/netmap/netmap.c Mon Oct 6 09:46:21 2014 (r272604) @@ -2222,23 +2222,18 @@ netmap_ioctl(struct cdev *dev, u_long cm default: /* allow device-specific ioctls */ { - struct socket so; - struct ifnet *ifp; - - bzero(&so, sizeof(so)); - NMG_LOCK(); - error = netmap_get_na(nmr, &na, 0 /* don't create */); /* keep reference */ - if (error) { - netmap_adapter_put(na); - NMG_UNLOCK(); - break; + struct ifnet *ifp = ifunit_ref(nmr->nr_name); + if (ifp == NULL) { + error = ENXIO; + } else { + struct socket so; + + bzero(&so, sizeof(so)); + so.so_vnet = ifp->if_vnet; + // so->so_proto not null. + error = ifioctl(&so, cmd, data, td); + if_rele(ifp); } - ifp = na->ifp; - so.so_vnet = ifp->if_vnet; - // so->so_proto not null. - error = ifioctl(&so, cmd, data, td); - netmap_adapter_put(na); - NMG_UNLOCK(); break; } From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 12:31:52 2014 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 B9A8FB1F; Mon, 6 Oct 2014 12:31: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 A45B5241; Mon, 6 Oct 2014 12:31: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 s96CVqNm054607; Mon, 6 Oct 2014 12:31:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96CVqmW054606; Mon, 6 Oct 2014 12:31:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061231.s96CVqmW054606@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 12:31: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: r272615 - 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.18-1 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, 06 Oct 2014 12:31:52 -0000 Author: mav Date: Mon Oct 6 12:31:51 2014 New Revision: 272615 URL: https://svnweb.freebsd.org/changeset/base/272615 Log: MFC r271308: Make ZVOL writes in device mode support IO_SYNC flag. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Oct 6 12:29:06 2014 (r272614) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Oct 6 12:31:51 2014 (r272615) @@ -1634,7 +1634,7 @@ zvol_write(struct cdev *dev, struct uio #ifdef sun sync = !(zv->zv_flags & ZVOL_WCE) || #else - sync = + sync = (ioflag & IO_SYNC) || #endif (zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS); From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 12:35:43 2014 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 15202D85; Mon, 6 Oct 2014 12:35: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 F3F83327; Mon, 6 Oct 2014 12:35: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 s96CZgqN055343; Mon, 6 Oct 2014 12:35:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96CZfUq055336; Mon, 6 Oct 2014 12:35:41 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061235.s96CZfUq055336@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 12:35: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: r272616 - 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.18-1 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, 06 Oct 2014 12:35:43 -0000 Author: mav Date: Mon Oct 6 12:35:41 2014 New Revision: 272616 URL: https://svnweb.freebsd.org/changeset/base/272616 Log: MFC r271309: Improve cache control support, including DPO/FUA flags and the mode page. At this moment it works only for files and ZVOLs in device mode since BIOs have no respective respective cache control flags (DPO/FUA). Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl.h stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_io.h stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:31:51 2014 (r272615) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:35:41 2014 (r272616) @@ -263,7 +263,7 @@ static struct scsi_caching_page caching_ static struct scsi_caching_page caching_page_changeable = { /*page_code*/SMS_CACHING_PAGE, /*page_length*/sizeof(struct scsi_caching_page) - 2, - /*flags1*/ 0, + /*flags1*/ SCP_WCE | SCP_RCD, /*ret_priority*/ 0, /*disable_pf_transfer_len*/ {0, 0}, /*min_prefetch*/ {0, 0}, @@ -6265,6 +6265,53 @@ ctl_control_page_handler(struct ctl_scsi } int +ctl_caching_sp_handler(struct ctl_scsiio *ctsio, + struct ctl_page_index *page_index, uint8_t *page_ptr) +{ + struct scsi_caching_page *current_cp, *saved_cp, *user_cp; + struct ctl_lun *lun; + int set_ua; + uint32_t initidx; + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + initidx = ctl_get_initindex(&ctsio->io_hdr.nexus); + set_ua = 0; + + user_cp = (struct scsi_caching_page *)page_ptr; + current_cp = (struct scsi_caching_page *) + (page_index->page_data + (page_index->page_len * + CTL_PAGE_CURRENT)); + saved_cp = (struct scsi_caching_page *) + (page_index->page_data + (page_index->page_len * + CTL_PAGE_SAVED)); + + mtx_lock(&lun->lun_lock); + if ((current_cp->flags1 & (SCP_WCE | SCP_RCD)) != + (user_cp->flags1 & (SCP_WCE | SCP_RCD))) + set_ua = 1; + current_cp->flags1 &= ~(SCP_WCE | SCP_RCD); + current_cp->flags1 |= user_cp->flags1 & (SCP_WCE | SCP_RCD); + saved_cp->flags1 &= ~(SCP_WCE | SCP_RCD); + saved_cp->flags1 |= user_cp->flags1 & (SCP_WCE | SCP_RCD); + if (set_ua != 0) { + int i; + /* + * Let other initiators know that the mode + * parameters for this LUN have changed. + */ + for (i = 0; i < CTL_MAX_INITIATORS; i++) { + if (i == initidx) + continue; + + lun->pending_ua[i] |= CTL_UA_MODE_CHANGE; + } + } + mtx_unlock(&lun->lun_lock); + + return (0); +} + +int ctl_power_sp_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, uint8_t *page_ptr) { @@ -8992,17 +9039,14 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct ctl_lba_len_flags *lbalen; uint64_t lba; uint32_t num_blocks; - int fua, dpo; - int retval; + int flags, retval; int isread; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; CTL_DEBUG_PRINT(("ctl_read_write: command: %#x\n", ctsio->cdb[0])); - fua = 0; - dpo = 0; - + flags = 0; retval = CTL_RETVAL_COMPLETE; isread = ctsio->cdb[0] == READ_6 || ctsio->cdb[0] == READ_10 @@ -9048,12 +9092,10 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct scsi_rw_10 *cdb; cdb = (struct scsi_rw_10 *)ctsio->cdb; - if (cdb->byte2 & SRW10_FUA) - fua = 1; + flags |= CTL_LLF_FUA; if (cdb->byte2 & SRW10_DPO) - dpo = 1; - + flags |= CTL_LLF_DPO; lba = scsi_4btoul(cdb->addr); num_blocks = scsi_2btoul(cdb->length); break; @@ -9062,17 +9104,9 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct scsi_write_verify_10 *cdb; cdb = (struct scsi_write_verify_10 *)ctsio->cdb; - - /* - * XXX KDM we should do actual write verify support at some - * point. This is obviously fake, we're just translating - * things to a write. So we don't even bother checking the - * BYTCHK field, since we don't do any verification. If - * the user asks for it, we'll just pretend we did it. - */ + flags |= CTL_LLF_FUA; if (cdb->byte2 & SWV_DPO) - dpo = 1; - + flags |= CTL_LLF_DPO; lba = scsi_4btoul(cdb->addr); num_blocks = scsi_2btoul(cdb->length); break; @@ -9082,11 +9116,10 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct scsi_rw_12 *cdb; cdb = (struct scsi_rw_12 *)ctsio->cdb; - if (cdb->byte2 & SRW12_FUA) - fua = 1; + flags |= CTL_LLF_FUA; if (cdb->byte2 & SRW12_DPO) - dpo = 1; + flags |= CTL_LLF_DPO; lba = scsi_4btoul(cdb->addr); num_blocks = scsi_4btoul(cdb->length); break; @@ -9095,13 +9128,11 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct scsi_write_verify_12 *cdb; cdb = (struct scsi_write_verify_12 *)ctsio->cdb; - + flags |= CTL_LLF_FUA; if (cdb->byte2 & SWV_DPO) - dpo = 1; - + flags |= CTL_LLF_DPO; lba = scsi_4btoul(cdb->addr); num_blocks = scsi_4btoul(cdb->length); - break; } case READ_16: @@ -9109,12 +9140,10 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct scsi_rw_16 *cdb; cdb = (struct scsi_rw_16 *)ctsio->cdb; - if (cdb->byte2 & SRW12_FUA) - fua = 1; + flags |= CTL_LLF_FUA; if (cdb->byte2 & SRW12_DPO) - dpo = 1; - + flags |= CTL_LLF_DPO; lba = scsi_8btou64(cdb->addr); num_blocks = scsi_4btoul(cdb->length); break; @@ -9123,10 +9152,9 @@ ctl_read_write(struct ctl_scsiio *ctsio) struct scsi_write_verify_16 *cdb; cdb = (struct scsi_write_verify_16 *)ctsio->cdb; - + flags |= CTL_LLF_FUA; if (cdb->byte2 & SWV_DPO) - dpo = 1; - + flags |= CTL_LLF_DPO; lba = scsi_8btou64(cdb->addr); num_blocks = scsi_4btoul(cdb->length); break; @@ -9144,13 +9172,6 @@ ctl_read_write(struct ctl_scsiio *ctsio) } /* - * XXX KDM what do we do with the DPO and FUA bits? FUA might be - * interesting for us, but if RAIDCore is in write-back mode, - * getting it to do write-through for a particular transaction may - * not be possible. - */ - - /* * The first check is to make sure we're in bounds, the second * check is to catch wrap-around problems. If the lba + num blocks * is less than the lba, then we've wrapped around and the block @@ -9174,11 +9195,22 @@ ctl_read_write(struct ctl_scsiio *ctsio) return (CTL_RETVAL_COMPLETE); } + /* Set FUA and/or DPO if caches are disabled. */ + if (isread) { + if ((lun->mode_pages.caching_page[CTL_PAGE_CURRENT].flags1 & + SCP_RCD) != 0) + flags |= CTL_LLF_FUA | CTL_LLF_DPO; + } else { + if ((lun->mode_pages.caching_page[CTL_PAGE_CURRENT].flags1 & + SCP_WCE) == 0) + flags |= CTL_LLF_FUA; + } + lbalen = (struct ctl_lba_len_flags *) &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; lbalen->lba = lba; lbalen->len = num_blocks; - lbalen->flags = isread ? CTL_LLF_READ : CTL_LLF_WRITE; + lbalen->flags = (isread ? CTL_LLF_READ : CTL_LLF_WRITE) | flags; ctsio->kern_total_len = num_blocks * lun->be_lun->blocksize; ctsio->kern_rel_offset = 0; @@ -9204,7 +9236,8 @@ ctl_cnw_cont(union ctl_io *io) lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; lbalen = (struct ctl_lba_len_flags *) &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; - lbalen->flags = CTL_LLF_WRITE; + lbalen->flags &= ~CTL_LLF_COMPARE; + lbalen->flags |= CTL_LLF_WRITE; CTL_DEBUG_PRINT(("ctl_cnw_cont: calling data_submit()\n")); retval = lun->backend->data_submit((union ctl_io *)ctsio); @@ -9218,16 +9251,13 @@ ctl_cnw(struct ctl_scsiio *ctsio) struct ctl_lba_len_flags *lbalen; uint64_t lba; uint32_t num_blocks; - int fua, dpo; - int retval; + int flags, retval; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; CTL_DEBUG_PRINT(("ctl_cnw: command: %#x\n", ctsio->cdb[0])); - fua = 0; - dpo = 0; - + flags = 0; retval = CTL_RETVAL_COMPLETE; switch (ctsio->cdb[0]) { @@ -9235,11 +9265,10 @@ ctl_cnw(struct ctl_scsiio *ctsio) struct scsi_compare_and_write *cdb; cdb = (struct scsi_compare_and_write *)ctsio->cdb; - if (cdb->byte2 & SRW10_FUA) - fua = 1; + flags |= CTL_LLF_FUA; if (cdb->byte2 & SRW10_DPO) - dpo = 1; + flags |= CTL_LLF_DPO; lba = scsi_8btou64(cdb->addr); num_blocks = cdb->length; break; @@ -9257,13 +9286,6 @@ ctl_cnw(struct ctl_scsiio *ctsio) } /* - * XXX KDM what do we do with the DPO and FUA bits? FUA might be - * interesting for us, but if RAIDCore is in write-back mode, - * getting it to do write-through for a particular transaction may - * not be possible. - */ - - /* * The first check is to make sure we're in bounds, the second * check is to catch wrap-around problems. If the lba + num blocks * is less than the lba, then we've wrapped around and the block @@ -9285,6 +9307,11 @@ ctl_cnw(struct ctl_scsiio *ctsio) return (CTL_RETVAL_COMPLETE); } + /* Set FUA if write cache is disabled. */ + if ((lun->mode_pages.caching_page[CTL_PAGE_CURRENT].flags1 & + SCP_WCE) == 0) + flags |= CTL_LLF_FUA; + ctsio->kern_total_len = 2 * num_blocks * lun->be_lun->blocksize; ctsio->kern_rel_offset = 0; @@ -9300,7 +9327,7 @@ ctl_cnw(struct ctl_scsiio *ctsio) &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; lbalen->lba = lba; lbalen->len = num_blocks; - lbalen->flags = CTL_LLF_COMPARE; + lbalen->flags = CTL_LLF_COMPARE | flags; CTL_DEBUG_PRINT(("ctl_cnw: calling data_submit()\n")); retval = lun->backend->data_submit((union ctl_io *)ctsio); @@ -9314,7 +9341,7 @@ ctl_verify(struct ctl_scsiio *ctsio) struct ctl_lba_len_flags *lbalen; uint64_t lba; uint32_t num_blocks; - int bytchk, dpo; + int bytchk, flags; int retval; lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; @@ -9322,7 +9349,7 @@ ctl_verify(struct ctl_scsiio *ctsio) CTL_DEBUG_PRINT(("ctl_verify: command: %#x\n", ctsio->cdb[0])); bytchk = 0; - dpo = 0; + flags = CTL_LLF_FUA; retval = CTL_RETVAL_COMPLETE; switch (ctsio->cdb[0]) { @@ -9333,7 +9360,7 @@ ctl_verify(struct ctl_scsiio *ctsio) if (cdb->byte2 & SVFY_BYTCHK) bytchk = 1; if (cdb->byte2 & SVFY_DPO) - dpo = 1; + flags |= CTL_LLF_DPO; lba = scsi_4btoul(cdb->addr); num_blocks = scsi_2btoul(cdb->length); break; @@ -9345,7 +9372,7 @@ ctl_verify(struct ctl_scsiio *ctsio) if (cdb->byte2 & SVFY_BYTCHK) bytchk = 1; if (cdb->byte2 & SVFY_DPO) - dpo = 1; + flags |= CTL_LLF_DPO; lba = scsi_4btoul(cdb->addr); num_blocks = scsi_4btoul(cdb->length); break; @@ -9357,7 +9384,7 @@ ctl_verify(struct ctl_scsiio *ctsio) if (cdb->byte2 & SVFY_BYTCHK) bytchk = 1; if (cdb->byte2 & SVFY_DPO) - dpo = 1; + flags |= CTL_LLF_DPO; lba = scsi_8btou64(cdb->addr); num_blocks = scsi_4btoul(cdb->length); break; @@ -9399,10 +9426,10 @@ ctl_verify(struct ctl_scsiio *ctsio) lbalen->lba = lba; lbalen->len = num_blocks; if (bytchk) { - lbalen->flags = CTL_LLF_COMPARE; + lbalen->flags = CTL_LLF_COMPARE | flags; ctsio->kern_total_len = num_blocks * lun->be_lun->blocksize; } else { - lbalen->flags = CTL_LLF_VERIFY; + lbalen->flags = CTL_LLF_VERIFY | flags; ctsio->kern_total_len = 0; } ctsio->kern_rel_offset = 0; Modified: stable/10/sys/cam/ctl/ctl.h ============================================================================== --- stable/10/sys/cam/ctl/ctl.h Mon Oct 6 12:31:51 2014 (r272615) +++ stable/10/sys/cam/ctl/ctl.h Mon Oct 6 12:35:41 2014 (r272616) @@ -162,6 +162,8 @@ int ctl_ffz(uint32_t *mask, uint32_t siz int ctl_set_mask(uint32_t *mask, uint32_t bit); int ctl_clear_mask(uint32_t *mask, uint32_t bit); int ctl_is_set(uint32_t *mask, uint32_t bit); +int ctl_caching_sp_handler(struct ctl_scsiio *ctsio, + struct ctl_page_index *page_index, uint8_t *page_ptr); int ctl_control_page_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, uint8_t *page_ptr); Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 6 12:31:51 2014 (r272615) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 6 12:35:41 2014 (r272616) @@ -205,7 +205,6 @@ struct ctl_be_block_io { struct ctl_sg_entry sg_segs[CTLBLK_MAX_SEGS]; struct iovec xiovecs[CTLBLK_MAX_SEGS]; int bio_cmd; - int bio_flags; int num_segs; int num_bios_sent; int num_bios_done; @@ -602,7 +601,11 @@ ctl_be_block_dispatch_file(struct ctl_be file_data = &be_lun->backend.file; io = beio->io; - flags = beio->bio_flags; + flags = 0; + if (ARGS(io)->flags & CTL_LLF_DPO) + flags |= IO_DIRECT; + if (beio->bio_cmd == BIO_WRITE && ARGS(io)->flags & CTL_LLF_FUA) + flags |= IO_SYNC; bzero(&xuio, sizeof(xuio)); if (beio->bio_cmd == BIO_READ) { @@ -652,8 +655,7 @@ ctl_be_block_dispatch_file(struct ctl_be * So, to attempt to provide some barrier semantics in the * BIO_ORDERED case, set both IO_DIRECT and IO_SYNC. */ - error = VOP_READ(be_lun->vn, &xuio, (flags & BIO_ORDERED) ? - (IO_DIRECT|IO_SYNC) : 0, file_data->cred); + error = VOP_READ(be_lun->vn, &xuio, flags, file_data->cred); VOP_UNLOCK(be_lun->vn, 0); SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); @@ -690,8 +692,7 @@ ctl_be_block_dispatch_file(struct ctl_be * So if we've got the BIO_ORDERED flag set, we want * IO_SYNC in either the UFS or ZFS case. */ - error = VOP_WRITE(be_lun->vn, &xuio, (flags & BIO_ORDERED) ? - IO_SYNC : 0, file_data->cred); + error = VOP_WRITE(be_lun->vn, &xuio, flags, file_data->cred); VOP_UNLOCK(be_lun->vn, 0); vn_finished_write(mountpoint); @@ -755,7 +756,11 @@ ctl_be_block_dispatch_zvol(struct ctl_be dev_data = &be_lun->backend.dev; io = beio->io; - flags = beio->bio_flags; + flags = 0; + if (ARGS(io)->flags & CTL_LLF_DPO) + flags |= IO_DIRECT; + if (beio->bio_cmd == BIO_WRITE && ARGS(io)->flags & CTL_LLF_FUA) + flags |= IO_SYNC; bzero(&xuio, sizeof(xuio)); if (beio->bio_cmd == BIO_READ) { @@ -783,10 +788,10 @@ ctl_be_block_dispatch_zvol(struct ctl_be mtx_unlock(&be_lun->io_lock); if (beio->bio_cmd == BIO_READ) { - error = (*dev_data->csw->d_read)(dev_data->cdev, &xuio, 0); + error = (*dev_data->csw->d_read)(dev_data->cdev, &xuio, flags); SDT_PROBE(cbb, kernel, read, file_done, 0, 0, 0, 0, 0); } else { - error = (*dev_data->csw->d_write)(dev_data->cdev, &xuio, 0); + error = (*dev_data->csw->d_write)(dev_data->cdev, &xuio, flags); SDT_PROBE(cbb, kernel, write, file_done, 0, 0, 0, 0, 0); } @@ -877,7 +882,6 @@ ctl_be_block_unmap_dev_range(struct ctl_ while (len > 0) { bio = g_alloc_bio(); bio->bio_cmd = BIO_DELETE; - bio->bio_flags |= beio->bio_flags; bio->bio_dev = dev_data->cdev; bio->bio_offset = off; bio->bio_length = MIN(len, maxlen); @@ -976,7 +980,6 @@ ctl_be_block_dispatch_dev(struct ctl_be_ KASSERT(bio != NULL, ("g_alloc_bio() failed!\n")); bio->bio_cmd = beio->bio_cmd; - bio->bio_flags |= beio->bio_flags; bio->bio_dev = dev_data->cdev; bio->bio_caller1 = beio; bio->bio_length = min(cur_size, max_iosize); @@ -1055,15 +1058,6 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b return; } - /* - * If the I/O came down with an ordered or head of queue tag, set - * the BIO_ORDERED attribute. For head of queue tags, that's - * pretty much the best we can do. - */ - if ((io->scsiio.tag_type == CTL_TAG_ORDERED) - || (io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE)) - beio->bio_flags = BIO_ORDERED; - switch (io->scsiio.tag_type) { case CTL_TAG_ORDERED: beio->ds_tag_type = DEVSTAT_TAG_ORDERED; @@ -1161,15 +1155,6 @@ ctl_be_block_cw_dispatch_unmap(struct ct return; } - /* - * If the I/O came down with an ordered or head of queue tag, set - * the BIO_ORDERED attribute. For head of queue tags, that's - * pretty much the best we can do. - */ - if ((io->scsiio.tag_type == CTL_TAG_ORDERED) - || (io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE)) - beio->bio_flags = BIO_ORDERED; - switch (io->scsiio.tag_type) { case CTL_TAG_ORDERED: beio->ds_tag_type = DEVSTAT_TAG_ORDERED; @@ -1308,20 +1293,6 @@ ctl_be_block_dispatch(struct ctl_be_bloc bptrlen = PRIV(io); bptrlen->ptr = (void *)beio; - /* - * If the I/O came down with an ordered or head of queue tag, set - * the BIO_ORDERED attribute. For head of queue tags, that's - * pretty much the best we can do. - * - * XXX KDM we don't have a great way to easily know about the FUA - * bit right now (it is decoded in ctl_read_write(), but we don't - * pass that knowledge to the backend), and in any case we would - * need to determine how to handle it. - */ - if ((io->scsiio.tag_type == CTL_TAG_ORDERED) - || (io->scsiio.tag_type == CTL_TAG_HEAD_OF_QUEUE)) - beio->bio_flags = BIO_ORDERED; - switch (io->scsiio.tag_type) { case CTL_TAG_ORDERED: beio->ds_tag_type = DEVSTAT_TAG_ORDERED; Modified: stable/10/sys/cam/ctl/ctl_io.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_io.h Mon Oct 6 12:31:51 2014 (r272615) +++ stable/10/sys/cam/ctl/ctl_io.h Mon Oct 6 12:35:41 2014 (r272616) @@ -139,6 +139,8 @@ struct ctl_lba_len_flags { uint64_t lba; uint32_t len; uint32_t flags; +#define CTL_LLF_FUA 0x04000000 +#define CTL_LLF_DPO 0x08000000 #define CTL_LLF_READ 0x10000000 #define CTL_LLF_WRITE 0x20000000 #define CTL_LLF_VERIFY 0x40000000 Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 6 12:31:51 2014 (r272615) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 6 12:35:41 2014 (r272616) @@ -304,7 +304,7 @@ static const struct ctl_page_index page_ {SMS_RIGID_DISK_PAGE, 0, sizeof(struct scsi_rigid_disk_page), NULL, CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL}, {SMS_CACHING_PAGE, 0, sizeof(struct scsi_caching_page), NULL, - CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL}, + CTL_PAGE_FLAG_DISK_ONLY, NULL, ctl_caching_sp_handler}, {SMS_CONTROL_MODE_PAGE, 0, sizeof(struct scsi_control_page), NULL, CTL_PAGE_FLAG_NONE, NULL, ctl_control_page_handler}, {SMS_VENDOR_SPECIFIC_PAGE | SMPH_SPF, PWR_SUBPAGE_CODE, From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 12:36:43 2014 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 4FAFAF56; Mon, 6 Oct 2014 12:36: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 3ACEA33F; Mon, 6 Oct 2014 12:36: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 s96Cah3j055528; Mon, 6 Oct 2014 12:36:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96Cahp1055527; Mon, 6 Oct 2014 12:36:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061236.s96Cahp1055527@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 12:36: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: r272617 - 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.18-1 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, 06 Oct 2014 12:36:43 -0000 Author: mav Date: Mon Oct 6 12:36:42 2014 New Revision: 272617 URL: https://svnweb.freebsd.org/changeset/base/272617 Log: MFC r271311: Add support for Mode Page Policy (0x87) VPD page. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:35:41 2014 (r272616) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:36:42 2014 (r272617) @@ -322,10 +322,11 @@ SYSCTL_INT(_kern_cam_ctl, OID_AUTO, verb /* * Supported pages (0x00), Serial number (0x80), Device ID (0x83), + * Mode Page Policy (0x87), * SCSI Ports (0x88), Third-party Copy (0x8F), Block limits (0xB0), * Block Device Characteristics (0xB1) and Logical Block Provisioning (0xB2) */ -#define SCSI_EVPD_NUM_SUPPORTED_PAGES 8 +#define SCSI_EVPD_NUM_SUPPORTED_PAGES 9 static void ctl_isc_event_handler(ctl_ha_channel chanel, ctl_ha_event event, int param); @@ -381,6 +382,7 @@ static void ctl_hndl_per_res_out_on_othe static int ctl_inquiry_evpd_supported(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_serial(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len); +static int ctl_inquiry_evpd_mpp(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_scsi_ports(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_block_limits(struct ctl_scsiio *ctsio, @@ -9844,16 +9846,18 @@ ctl_inquiry_evpd_supported(struct ctl_sc pages->page_list[1] = SVPD_UNIT_SERIAL_NUMBER; /* Device Identification */ pages->page_list[2] = SVPD_DEVICE_ID; + /* Mode Page Policy */ + pages->page_list[3] = SVPD_MODE_PAGE_POLICY; /* SCSI Ports */ - pages->page_list[3] = SVPD_SCSI_PORTS; + pages->page_list[4] = SVPD_SCSI_PORTS; /* Third-party Copy */ - pages->page_list[4] = SVPD_SCSI_TPC; + pages->page_list[5] = SVPD_SCSI_TPC; /* Block limits */ - pages->page_list[5] = SVPD_BLOCK_LIMITS; + pages->page_list[6] = SVPD_BLOCK_LIMITS; /* Block Device Characteristics */ - pages->page_list[6] = SVPD_BDC; + pages->page_list[7] = SVPD_BDC; /* Logical Block Provisioning */ - pages->page_list[7] = SVPD_LBP; + pages->page_list[8] = SVPD_LBP; ctsio->scsi_status = SCSI_STATUS_OK; @@ -9922,6 +9926,58 @@ ctl_inquiry_evpd_serial(struct ctl_scsii static int +ctl_inquiry_evpd_mpp(struct ctl_scsiio *ctsio, int alloc_len) +{ + struct scsi_vpd_mode_page_policy *mpp_ptr; + struct ctl_lun *lun; + int data_len; + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + + data_len = sizeof(struct scsi_vpd_mode_page_policy) + + sizeof(struct scsi_vpd_mode_page_policy_descr); + + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); + mpp_ptr = (struct scsi_vpd_mode_page_policy *)ctsio->kern_data_ptr; + ctsio->kern_sg_entries = 0; + + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + + /* + * The control device is always connected. The disk device, on the + * other hand, may not be online all the time. + */ + if (lun != NULL) + mpp_ptr->device = (SID_QUAL_LU_CONNECTED << 5) | + lun->be_lun->lun_type; + else + mpp_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; + mpp_ptr->page_code = SVPD_MODE_PAGE_POLICY; + scsi_ulto2b(data_len - 4, mpp_ptr->page_length); + mpp_ptr->descr[0].page_code = 0x3f; + mpp_ptr->descr[0].subpage_code = 0xff; + mpp_ptr->descr[0].policy = SVPD_MPP_SHARED; + + ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); +} + +static int ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len) { struct scsi_vpd_device_id *devid_ptr; @@ -10351,6 +10407,9 @@ ctl_inquiry_evpd(struct ctl_scsiio *ctsi case SVPD_DEVICE_ID: retval = ctl_inquiry_evpd_devid(ctsio, alloc_len); break; + case SVPD_MODE_PAGE_POLICY: + retval = ctl_inquiry_evpd_mpp(ctsio, alloc_len); + break; case SVPD_SCSI_PORTS: retval = ctl_inquiry_evpd_scsi_ports(ctsio, alloc_len); break; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 12:37:36 2014 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 6D912112; Mon, 6 Oct 2014 12:37: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 5937634A; Mon, 6 Oct 2014 12:37: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 s96Cba3f055697; Mon, 6 Oct 2014 12:37:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96Cba5f055696; Mon, 6 Oct 2014 12:37:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061237.s96Cba5f055696@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 12:37: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: r272618 - 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.18-1 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, 06 Oct 2014 12:37:36 -0000 Author: mav Date: Mon Oct 6 12:37:35 2014 New Revision: 272618 URL: https://svnweb.freebsd.org/changeset/base/272618 Log: MFC r271316: Report that DPO and FUA bits are supported after r271311. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:36:42 2014 (r272617) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:37:35 2014 (r272618) @@ -7073,7 +7073,8 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) header = (struct scsi_mode_hdr_6 *)ctsio->kern_data_ptr; header->datalen = ctl_min(total_len - 1, 254); - + if (control_dev == 0) + header->dev_specific = 0x10; /* DPOFUA */ if (dbd) header->block_descr_len = 0; else @@ -7090,6 +7091,8 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) datalen = ctl_min(total_len - 2, 65533); scsi_ulto2b(datalen, header->datalen); + if (control_dev == 0) + header->dev_specific = 0x10; /* DPOFUA */ if (dbd) scsi_ulto2b(0, header->block_descr_len); else From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 12:38:36 2014 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 875CA410; Mon, 6 Oct 2014 12:38: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 7285D373; Mon, 6 Oct 2014 12:38: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 s96Cca4b056020; Mon, 6 Oct 2014 12:38:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96Cca4F056019; Mon, 6 Oct 2014 12:38:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061238.s96Cca4F056019@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 12:38: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: r272619 - 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.18-1 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, 06 Oct 2014 12:38:36 -0000 Author: mav Date: Mon Oct 6 12:38:35 2014 New Revision: 272619 URL: https://svnweb.freebsd.org/changeset/base/272619 Log: MFC r271352: Fix minor buffer overflow reported by Coverity. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:37:35 2014 (r272618) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:38:35 2014 (r272619) @@ -10597,24 +10597,28 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio */ if (lun == NULL || (val = ctl_get_opt(&lun->be_lun->options, "vendor")) == NULL) { - strcpy(inq_ptr->vendor, CTL_VENDOR); + strncpy(inq_ptr->vendor, CTL_VENDOR, sizeof(inq_ptr->vendor)); } else { memset(inq_ptr->vendor, ' ', sizeof(inq_ptr->vendor)); strncpy(inq_ptr->vendor, val, min(sizeof(inq_ptr->vendor), strlen(val))); } if (lun == NULL) { - strcpy(inq_ptr->product, CTL_DIRECT_PRODUCT); + strncpy(inq_ptr->product, CTL_DIRECT_PRODUCT, + sizeof(inq_ptr->product)); } else if ((val = ctl_get_opt(&lun->be_lun->options, "product")) == NULL) { switch (lun->be_lun->lun_type) { case T_DIRECT: - strcpy(inq_ptr->product, CTL_DIRECT_PRODUCT); + strncpy(inq_ptr->product, CTL_DIRECT_PRODUCT, + sizeof(inq_ptr->product)); break; case T_PROCESSOR: - strcpy(inq_ptr->product, CTL_PROCESSOR_PRODUCT); + strncpy(inq_ptr->product, CTL_PROCESSOR_PRODUCT, + sizeof(inq_ptr->product)); break; default: - strcpy(inq_ptr->product, CTL_UNKNOWN_PRODUCT); + strncpy(inq_ptr->product, CTL_UNKNOWN_PRODUCT, + sizeof(inq_ptr->product)); break; } } else { From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 12:39:26 2014 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 6A13F54F; Mon, 6 Oct 2014 12:39: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 4CE3D384; Mon, 6 Oct 2014 12:39: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 s96CdQwL056192; Mon, 6 Oct 2014 12:39:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96CdQSU056191; Mon, 6 Oct 2014 12:39:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061239.s96CdQSU056191@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 12:39: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: r272620 - 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.18-1 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, 06 Oct 2014 12:39:26 -0000 Author: mav Date: Mon Oct 6 12:39:25 2014 New Revision: 272620 URL: https://svnweb.freebsd.org/changeset/base/272620 Log: MFC r271353: Fix memory leak on error, reported by Coverity. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:38:35 2014 (r272619) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:39:25 2014 (r272620) @@ -2901,6 +2901,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, lun = softc->ctl_luns[err_desc->lun_id]; if (lun == NULL) { mtx_unlock(&softc->ctl_lock); + free(new_err_desc, M_CTL); printf("%s: CTL_ERROR_INJECT: invalid LUN %ju\n", __func__, (uintmax_t)err_desc->lun_id); retval = EINVAL; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 12:40:16 2014 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 74491689; Mon, 6 Oct 2014 12:40:16 +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 5FB99391; Mon, 6 Oct 2014 12:40: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 s96CeG4l056424; Mon, 6 Oct 2014 12:40:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96CeGRw056422; Mon, 6 Oct 2014 12:40:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061240.s96CeGRw056422@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 12:40: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: r272621 - 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.18-1 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, 06 Oct 2014 12:40:16 -0000 Author: mav Date: Mon Oct 6 12:40:15 2014 New Revision: 272621 URL: https://svnweb.freebsd.org/changeset/base/272621 Log: MFC r271354: Fix couple off-by-one range check errors, reported by Coverity. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:39:25 2014 (r272620) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:40:15 2014 (r272621) @@ -2545,7 +2545,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, mtx_lock(&softc->ctl_lock); if (((ooa_hdr->flags & CTL_OOA_FLAG_ALL_LUNS) == 0) - && ((ooa_hdr->lun_num > CTL_MAX_LUNS) + && ((ooa_hdr->lun_num >= CTL_MAX_LUNS) || (softc->ctl_luns[ooa_hdr->lun_num] == NULL))) { mtx_unlock(&softc->ctl_lock); free(entries, M_CTL); @@ -2740,7 +2740,7 @@ ctl_ioctl(struct cdev *dev, u_long cmd, #ifdef CTL_IO_DELAY mtx_lock(&softc->ctl_lock); - if ((delay_info->lun_id > CTL_MAX_LUNS) + if ((delay_info->lun_id >= CTL_MAX_LUNS) || (softc->ctl_luns[delay_info->lun_id] == NULL)) { delay_info->status = CTL_DELAY_STATUS_INVALID_LUN; } else { From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 12:41:08 2014 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 54E187D0; Mon, 6 Oct 2014 12:41: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 402EA612; Mon, 6 Oct 2014 12:41: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 s96Cf8L1059467; Mon, 6 Oct 2014 12:41:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96Cf8M9059466; Mon, 6 Oct 2014 12:41:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061241.s96Cf8M9059466@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 12:41: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: r272622 - 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.18-1 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, 06 Oct 2014 12:41:08 -0000 Author: mav Date: Mon Oct 6 12:41:07 2014 New Revision: 272622 URL: https://svnweb.freebsd.org/changeset/base/272622 Log: MFC r271358: Fix array overrun, reported by Coverity. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:40:15 2014 (r272621) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:41:07 2014 (r272622) @@ -7979,7 +7979,8 @@ retry: scsi_ulto2b(i / CTL_MAX_INIT_PER_PORT, res_desc->rel_trgt_port_id); len = 0; - port = softc->ctl_ports[i / CTL_MAX_INIT_PER_PORT]; + port = softc->ctl_ports[ + ctl_port_idx(i / CTL_MAX_INIT_PER_PORT)]; if (port != NULL) len = ctl_create_iid(port, i % CTL_MAX_INIT_PER_PORT, From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 12:42:07 2014 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 10C69914; Mon, 6 Oct 2014 12:42: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 F04D162C; Mon, 6 Oct 2014 12:42: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 s96Cg6KN060207; Mon, 6 Oct 2014 12:42:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96Cg6Qx060206; Mon, 6 Oct 2014 12:42:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061242.s96Cg6Qx060206@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 12:42: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: r272623 - 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.18-1 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, 06 Oct 2014 12:42:07 -0000 Author: mav Date: Mon Oct 6 12:42:06 2014 New Revision: 272623 URL: https://svnweb.freebsd.org/changeset/base/272623 Log: MFC r271360: Remove uninitialized and unused variable, reported by Coverity. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:41:07 2014 (r272622) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:42:06 2014 (r272623) @@ -12032,12 +12032,11 @@ ctl_lun_reset(struct ctl_lun *lun, union return (0); } -static int +static void ctl_abort_tasks_lun(struct ctl_lun *lun, uint32_t targ_port, uint32_t init_id, int other_sc) { union ctl_io *xio; - int found; mtx_assert(&lun->lun_lock, MA_OWNED); @@ -12059,7 +12058,6 @@ ctl_abort_tasks_lun(struct ctl_lun *lun, init_id != xio->io_hdr.nexus.initid.id) xio->io_hdr.flags |= CTL_FLAG_ABORT_STATUS; xio->io_hdr.flags |= CTL_FLAG_ABORT; - found = 1; if (!other_sc && !(lun->flags & CTL_LUN_PRIMARY_SC)) { union ctl_ha_msg msg_info; @@ -12075,7 +12073,6 @@ ctl_abort_tasks_lun(struct ctl_lun *lun, } } } - return (found); } static int From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 12:48:11 2014 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 2902DC32; Mon, 6 Oct 2014 12:48: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 144D1679; Mon, 6 Oct 2014 12:48: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 s96CmAq2061240; Mon, 6 Oct 2014 12:48:10 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96CmA69061239; Mon, 6 Oct 2014 12:48:10 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061248.s96CmA69061239@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 12:48: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: r272624 - stable/10/sys/cam/scsi 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.18-1 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, 06 Oct 2014 12:48:11 -0000 Author: mav Date: Mon Oct 6 12:48:10 2014 New Revision: 272624 URL: https://svnweb.freebsd.org/changeset/base/272624 Log: MFC r271313: Oops, missed piece of r271311. Modified: stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Mon Oct 6 12:42:06 2014 (r272623) +++ stable/10/sys/cam/scsi/scsi_all.h Mon Oct 6 12:48:10 2014 (r272624) @@ -2110,6 +2110,27 @@ struct scsi_service_action_in uint8_t control; }; +struct scsi_vpd_mode_page_policy_descr +{ + uint8_t page_code; + uint8_t subpage_code; + uint8_t policy; +#define SVPD_MPP_SHARED 0x00 +#define SVPD_MPP_PORT 0x01 +#define SVPD_MPP_I_T 0x03 +#define SVPD_MPP_MLUS 0x80 + uint8_t reserved; +}; + +struct scsi_vpd_mode_page_policy +{ + uint8_t device; + uint8_t page_code; +#define SVPD_MODE_PAGE_POLICY 0x87 + uint8_t page_length[2]; + struct scsi_vpd_mode_page_policy_descr descr[0]; +}; + struct scsi_diag_page { uint8_t page_code; uint8_t page_specific_flags; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 12:49:08 2014 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 1C618D81; Mon, 6 Oct 2014 12:49: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 0756A688; Mon, 6 Oct 2014 12:49: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 s96Cn79t061423; Mon, 6 Oct 2014 12:49:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96Cn71A061420; Mon, 6 Oct 2014 12:49:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061249.s96Cn71A061420@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 12:49: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: r272625 - in stable/10/sys/cam: ctl scsi 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.18-1 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, 06 Oct 2014 12:49:08 -0000 Author: mav Date: Mon Oct 6 12:49:07 2014 New Revision: 272625 URL: https://svnweb.freebsd.org/changeset/base/272625 Log: MFC r271443: Add support for Extended INQUIRY Data (0x86) VPD page. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:48:10 2014 (r272624) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:49:07 2014 (r272625) @@ -322,11 +322,11 @@ SYSCTL_INT(_kern_cam_ctl, OID_AUTO, verb /* * Supported pages (0x00), Serial number (0x80), Device ID (0x83), - * Mode Page Policy (0x87), + * Extended INQUIRY Data (0x86), Mode Page Policy (0x87), * SCSI Ports (0x88), Third-party Copy (0x8F), Block limits (0xB0), * Block Device Characteristics (0xB1) and Logical Block Provisioning (0xB2) */ -#define SCSI_EVPD_NUM_SUPPORTED_PAGES 9 +#define SCSI_EVPD_NUM_SUPPORTED_PAGES 10 static void ctl_isc_event_handler(ctl_ha_channel chanel, ctl_ha_event event, int param); @@ -382,6 +382,7 @@ static void ctl_hndl_per_res_out_on_othe static int ctl_inquiry_evpd_supported(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_serial(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len); +static int ctl_inquiry_evpd_eid(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_mpp(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_scsi_ports(struct ctl_scsiio *ctsio, int alloc_len); @@ -9851,18 +9852,20 @@ ctl_inquiry_evpd_supported(struct ctl_sc pages->page_list[1] = SVPD_UNIT_SERIAL_NUMBER; /* Device Identification */ pages->page_list[2] = SVPD_DEVICE_ID; + /* Extended INQUIRY Data */ + pages->page_list[3] = SVPD_EXTENDED_INQUIRY_DATA; /* Mode Page Policy */ - pages->page_list[3] = SVPD_MODE_PAGE_POLICY; + pages->page_list[4] = SVPD_MODE_PAGE_POLICY; /* SCSI Ports */ - pages->page_list[4] = SVPD_SCSI_PORTS; + pages->page_list[5] = SVPD_SCSI_PORTS; /* Third-party Copy */ - pages->page_list[5] = SVPD_SCSI_TPC; + pages->page_list[6] = SVPD_SCSI_TPC; /* Block limits */ - pages->page_list[6] = SVPD_BLOCK_LIMITS; + pages->page_list[7] = SVPD_BLOCK_LIMITS; /* Block Device Characteristics */ - pages->page_list[7] = SVPD_BDC; + pages->page_list[8] = SVPD_BDC; /* Logical Block Provisioning */ - pages->page_list[8] = SVPD_LBP; + pages->page_list[9] = SVPD_LBP; ctsio->scsi_status = SCSI_STATUS_OK; @@ -9931,6 +9934,57 @@ ctl_inquiry_evpd_serial(struct ctl_scsii static int +ctl_inquiry_evpd_eid(struct ctl_scsiio *ctsio, int alloc_len) +{ + struct scsi_vpd_extended_inquiry_data *eid_ptr; + struct ctl_lun *lun; + int data_len; + + lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; + + data_len = sizeof(struct scsi_vpd_mode_page_policy) + + sizeof(struct scsi_vpd_mode_page_policy_descr); + + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); + eid_ptr = (struct scsi_vpd_extended_inquiry_data *)ctsio->kern_data_ptr; + ctsio->kern_sg_entries = 0; + + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; + } else { + ctsio->residual = 0; + ctsio->kern_data_len = alloc_len; + ctsio->kern_total_len = alloc_len; + } + ctsio->kern_data_resid = 0; + ctsio->kern_rel_offset = 0; + ctsio->kern_sg_entries = 0; + + /* + * The control device is always connected. The disk device, on the + * other hand, may not be online all the time. + */ + if (lun != NULL) + eid_ptr->device = (SID_QUAL_LU_CONNECTED << 5) | + lun->be_lun->lun_type; + else + eid_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; + eid_ptr->page_code = SVPD_EXTENDED_INQUIRY_DATA; + eid_ptr->page_length = data_len - 4; + eid_ptr->flags2 = SVPD_EID_HEADSUP | SVPD_EID_ORDSUP | SVPD_EID_SIMPSUP; + eid_ptr->flags3 = SVPD_EID_V_SUP; + + ctsio->scsi_status = SCSI_STATUS_OK; + ctsio->io_hdr.flags |= CTL_FLAG_ALLOCATED; + ctsio->be_move_done = ctl_config_move_done; + ctl_datamove((union ctl_io *)ctsio); + + return (CTL_RETVAL_COMPLETE); +} + +static int ctl_inquiry_evpd_mpp(struct ctl_scsiio *ctsio, int alloc_len) { struct scsi_vpd_mode_page_policy *mpp_ptr; @@ -10412,6 +10466,9 @@ ctl_inquiry_evpd(struct ctl_scsiio *ctsi case SVPD_DEVICE_ID: retval = ctl_inquiry_evpd_devid(ctsio, alloc_len); break; + case SVPD_EXTENDED_INQUIRY_DATA: + retval = ctl_inquiry_evpd_eid(ctsio, alloc_len); + break; case SVPD_MODE_PAGE_POLICY: retval = ctl_inquiry_evpd_mpp(ctsio, alloc_len); break; Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Mon Oct 6 12:48:10 2014 (r272624) +++ stable/10/sys/cam/scsi/scsi_all.h Mon Oct 6 12:49:07 2014 (r272625) @@ -2110,6 +2110,55 @@ struct scsi_service_action_in uint8_t control; }; +struct scsi_vpd_extended_inquiry_data +{ + uint8_t device; + uint8_t page_code; +#define SVPD_EXTENDED_INQUIRY_DATA 0x86 + uint8_t reserved; + uint8_t page_length; + uint8_t flags1; +#define SVPD_EID_AM 0xC0 +#define SVPD_EID_SPT 0x38 +#define SVPD_EID_SPT_1 0x00 +#define SVPD_EID_SPT_12 0x08 +#define SVPD_EID_SPT_2 0x10 +#define SVPD_EID_SPT_13 0x18 +#define SVPD_EID_SPT_3 0x20 +#define SVPD_EID_SPT_23 0x28 +#define SVPD_EID_SPT_123 0x38 +#define SVPD_EID_GRD_CHK 0x04 +#define SVPD_EID_APP_CHK 0x02 +#define SVPD_EID_REF_CHK 0x01 + uint8_t flags2; +#define SVPD_EID_UASK_SUP 0x20 +#define SVPD_EID_GROUP_SUP 0x10 +#define SVPD_EID_PRIOR_SUP 0x08 +#define SVPD_EID_HEADSUP 0x04 +#define SVPD_EID_ORDSUP 0x02 +#define SVPD_EID_SIMPSUP 0x01 + uint8_t flags3; +#define SVPD_EID_WU_SUP 0x08 +#define SVPD_EID_CRD_SUP 0x04 +#define SVPD_EID_NV_SUP 0x02 +#define SVPD_EID_V_SUP 0x01 + uint8_t flags4; +#define SVPD_EID_P_I_I_SUP 0x10 +#define SVPD_EID_LUICLT 0x01 + uint8_t flags5; +#define SVPD_EID_R_SUP 0x10 +#define SVPD_EID_CBCS 0x01 + uint8_t flags6; +#define SVPD_EID_MULTI_I_T_FW 0x0F + uint8_t est[2]; + uint8_t flags7; +#define SVPD_EID_POA_SUP 0x80 +#define SVPD_EID_HRA_SUP 0x80 +#define SVPD_EID_VSA_SUP 0x80 + uint8_t max_sense_length; + uint8_t reserved2[50]; +}; + struct scsi_vpd_mode_page_policy_descr { uint8_t page_code; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 12:54:07 2014 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 62E40243; Mon, 6 Oct 2014 12:54: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 4D1F27B4; Mon, 6 Oct 2014 12:54: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 s96Cs7Qm065883; Mon, 6 Oct 2014 12:54:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96Cs6KX065881; Mon, 6 Oct 2014 12:54:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061254.s96Cs6KX065881@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 12:54: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: r272626 - 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.18-1 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, 06 Oct 2014 12:54:07 -0000 Author: mav Date: Mon Oct 6 12:54:06 2014 New Revision: 272626 URL: https://svnweb.freebsd.org/changeset/base/272626 Log: MFC r271503: Implement range checks between UNMAP and READ/WRITE commands. Before this change UNMAP completely blocked other I/Os while running. Now it blocks only colliding ones, slowing down others only due to ZFS locks collisions. Sponsored by: iXsystems, Inc. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_ser_table.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:49:07 2014 (r272625) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:54:06 2014 (r272626) @@ -392,7 +392,7 @@ static int ctl_inquiry_evpd_bdc(struct c static int ctl_inquiry_evpd_lbp(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd(struct ctl_scsiio *ctsio); static int ctl_inquiry_std(struct ctl_scsiio *ctsio); -static int ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint32_t *len); +static int ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint64_t *len); static ctl_action ctl_extent_check(union ctl_io *io1, union ctl_io *io2); static ctl_action ctl_check_for_blockage(union ctl_io *pending_io, union ctl_io *ooa_io); @@ -5261,6 +5261,8 @@ ctl_data_submit_done(union ctl_io *io) void ctl_config_write_done(union ctl_io *io) { + uint8_t *buf; + /* * If the IO_CONT flag is set, we need to call the supplied * function to continue processing the I/O, instead of completing @@ -5280,9 +5282,13 @@ ctl_config_write_done(union ctl_io *io) * have data allocated, like write buffer, and commands that have * no data, like start/stop unit, we need to check here. */ - if ((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT) - free(io->scsiio.kern_data_ptr, M_CTL); + if (io->io_hdr.flags & CTL_FLAG_ALLOCATED) + buf = io->scsiio.kern_data_ptr; + else + buf = NULL; ctl_done(io); + if (buf) + free(buf, M_CTL); } /* @@ -6121,11 +6127,14 @@ ctl_unmap(struct ctl_scsiio *ctsio) return (CTL_RETVAL_COMPLETE); } + mtx_lock(&lun->lun_lock); ptrlen = (struct ctl_ptr_len_flags *) &ctsio->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; ptrlen->ptr = (void *)buf; ptrlen->len = len; ptrlen->flags = byte2; + ctl_check_blocked(lun); + mtx_unlock(&lun->lun_lock); retval = lun->backend->config_write((union ctl_io *)ctsio); return (retval); @@ -10808,7 +10817,7 @@ ctl_inquiry(struct ctl_scsiio *ctsio) * For known CDB types, parse the LBA and length. */ static int -ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint32_t *len) +ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint64_t *len) { if (io->io_hdr.io_type != CTL_IO_SCSI) return (1); @@ -10938,6 +10947,11 @@ ctl_get_lba_len(union ctl_io *io, uint64 *len = scsi_4btoul(cdb->length); break; } + case UNMAP: { + *lba = 0; + *len = UINT64_MAX; + break; + } default: return (1); break; /* NOTREACHED */ @@ -10947,7 +10961,7 @@ ctl_get_lba_len(union ctl_io *io, uint64 } static ctl_action -ctl_extent_check_lba(uint64_t lba1, uint32_t len1, uint64_t lba2, uint32_t len2) +ctl_extent_check_lba(uint64_t lba1, uint64_t len1, uint64_t lba2, uint64_t len2) { uint64_t endlba1, endlba2; @@ -10961,19 +10975,53 @@ ctl_extent_check_lba(uint64_t lba1, uint return (CTL_ACTION_BLOCK); } +static int +ctl_extent_check_unmap(union ctl_io *io, uint64_t lba2, uint64_t len2) +{ + struct ctl_ptr_len_flags *ptrlen; + struct scsi_unmap_desc *buf, *end, *range; + uint64_t lba; + uint32_t len; + + /* If not UNMAP -- go other way. */ + if (io->io_hdr.io_type != CTL_IO_SCSI || + io->scsiio.cdb[0] != UNMAP) + return (CTL_ACTION_ERROR); + + /* If UNMAP without data -- block and wait for data. */ + ptrlen = (struct ctl_ptr_len_flags *) + &io->io_hdr.ctl_private[CTL_PRIV_LBA_LEN]; + if ((io->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0 || + ptrlen->ptr == NULL) + return (CTL_ACTION_BLOCK); + + /* UNMAP with data -- check for collision. */ + buf = (struct scsi_unmap_desc *)ptrlen->ptr; + end = buf + ptrlen->len / sizeof(*buf); + for (range = buf; range < end; range++) { + lba = scsi_8btou64(range->lba); + len = scsi_4btoul(range->length); + if ((lba < lba2 + len2) && (lba + len > lba2)) + return (CTL_ACTION_BLOCK); + } + return (CTL_ACTION_PASS); +} + static ctl_action ctl_extent_check(union ctl_io *io1, union ctl_io *io2) { uint64_t lba1, lba2; - uint32_t len1, len2; + uint64_t len1, len2; int retval; - retval = ctl_get_lba_len(io1, &lba1, &len1); - if (retval != 0) + if (ctl_get_lba_len(io1, &lba1, &len1) != 0) return (CTL_ACTION_ERROR); - retval = ctl_get_lba_len(io2, &lba2, &len2); - if (retval != 0) + retval = ctl_extent_check_unmap(io2, lba1, len1); + if (retval != CTL_ACTION_ERROR) + return (retval); + + if (ctl_get_lba_len(io2, &lba2, &len2) != 0) return (CTL_ACTION_ERROR); return (ctl_extent_check_lba(lba1, len1, lba2, len2)); @@ -12582,7 +12630,7 @@ ctl_cmd_pattern_match(struct ctl_scsiio */ if (filtered_pattern & CTL_LUN_PAT_RANGE) { uint64_t lba1; - uint32_t len1; + uint64_t len1; ctl_action action; int retval; Modified: stable/10/sys/cam/ctl/ctl_ser_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_ser_table.c Mon Oct 6 12:49:07 2014 (r272625) +++ stable/10/sys/cam/ctl/ctl_ser_table.c Mon Oct 6 12:54:06 2014 (r272626) @@ -64,7 +64,7 @@ ctl_serialize_table[CTL_SERIDX_COUNT][CT /*TUR */{ pS, pS, pS, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, /*READ */{ pS, pS, xT, bK, bK, bK, bK, pS, pS, bK, pS, bK, bK}, /*WRITE */{ pS, xT, xT, bK, bK, bK, bK, pS, pS, bK, pS, bK, bK}, -/*UNMAP */{ pS, bK, bK, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, +/*UNMAP */{ pS, xT, xT, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, /*MD_SNS */{ bK, bK, bK, bK, pS, bK, bK, pS, pS, bK, pS, bK, bK}, /*MD_SEL */{ bK, bK, bK, bK, bK, bK, bK, pS, pS, bK, pS, bK, bK}, /*RQ_SNS */{ pS, pS, pS, pS, pS, pS, bK, pS, pS, bK, pS, bK, bK}, From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:12:04 2014 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 E0C1CA71; Mon, 6 Oct 2014 13:12: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 CBEDF9BA; Mon, 6 Oct 2014 13:12: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 s96DC41o076011; Mon, 6 Oct 2014 13:12:04 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DC4j9076010; Mon, 6 Oct 2014 13:12:04 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410061312.s96DC4j9076010@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 6 Oct 2014 13:12: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: r272627 - 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.18-1 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, 06 Oct 2014 13:12:05 -0000 Author: tuexen Date: Mon Oct 6 13:12:04 2014 New Revision: 272627 URL: https://svnweb.freebsd.org/changeset/base/272627 Log: MFC r272263: Checksum coverage values larger than 65535 for UDPLite are invalid. Check for this when the user calls setsockopt using UDPLITE_{SEND,RECV}CSCOV. Modified: stable/10/sys/netinet/udp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/udp_usrreq.c ============================================================================== --- stable/10/sys/netinet/udp_usrreq.c Mon Oct 6 12:54:06 2014 (r272626) +++ stable/10/sys/netinet/udp_usrreq.c Mon Oct 6 13:12:04 2014 (r272627) @@ -1006,7 +1006,7 @@ udp_ctloutput(struct socket *so, struct INP_WLOCK(inp); up = intoudpcb(inp); KASSERT(up != NULL, ("%s: up == NULL", __func__)); - if (optval != 0 && optval < 8) { + if ((optval != 0 && optval < 8) || (optval > 65535)) { INP_WUNLOCK(inp); error = EINVAL; break; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:16:38 2014 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 414D4BE7; Mon, 6 Oct 2014 13:16: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 2BF879F5; Mon, 6 Oct 2014 13:16: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 s96DGcfE076650; Mon, 6 Oct 2014 13:16:38 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DGcFq076649; Mon, 6 Oct 2014 13:16:38 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410061316.s96DGcFq076649@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 6 Oct 2014 13:16: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: r272628 - 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.18-1 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, 06 Oct 2014 13:16:38 -0000 Author: tuexen Date: Mon Oct 6 13:16:37 2014 New Revision: 272628 URL: https://svnweb.freebsd.org/changeset/base/272628 Log: MFC r272296: When plen != ulen, it should only be checked when this is UDP. The commit is from kevlo and he agreed that I MFC it as part of the UDPLite fixes. Modified: stable/10/sys/netinet6/udp6_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 13:12:04 2014 (r272627) +++ stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 13:16:37 2014 (r272628) @@ -230,7 +230,7 @@ udp6_input(struct mbuf **mp, int *offp, ulen = plen; cscov_partial = 0; } - if (plen != ulen) { + if (nxt == IPPROTO_UDP && plen != ulen) { UDPSTAT_INC(udps_badlen); goto badunlocked; } From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:18:30 2014 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 07F9FE13; Mon, 6 Oct 2014 13:18: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 E6128A0D; Mon, 6 Oct 2014 13:18:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s96DIT17077226; Mon, 6 Oct 2014 13:18:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DITEF077221; Mon, 6 Oct 2014 13:18:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061318.s96DITEF077221@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:18: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: r272629 - in stable/10: sys/cam/ctl 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.18-1 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, 06 Oct 2014 13:18:30 -0000 Author: mav Date: Mon Oct 6 13:18:28 2014 New Revision: 272629 URL: https://svnweb.freebsd.org/changeset/base/272629 Log: MFC r271505: Add "readcache" and "writecache" LUN options to control default behavior. Default values are "on". Disabling requires backend to support IO_DIRECT and IO_SYNC flags respectively, or some alternatives. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/usr.sbin/ctladm/ctladm.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:16:37 2014 (r272628) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:18:28 2014 (r272629) @@ -4097,6 +4097,7 @@ ctl_init_page_index(struct ctl_lun *lun) int i; struct ctl_page_index *page_index; struct ctl_softc *softc; + const char *value; memcpy(&lun->mode_pages.index, page_index_template, sizeof(page_index_template)); @@ -4246,26 +4247,31 @@ ctl_init_page_index(struct ctl_lun *lun) break; } case SMS_CACHING_PAGE: { + struct scsi_caching_page *caching_page; if (page_index->subpage != SMS_SUBPAGE_PAGE_0) panic("invalid subpage value %d", page_index->subpage); - /* - * Defaults should be okay here, no calculations - * needed. - */ - memcpy(&lun->mode_pages.caching_page[CTL_PAGE_CURRENT], + memcpy(&lun->mode_pages.caching_page[CTL_PAGE_DEFAULT], &caching_page_default, sizeof(caching_page_default)); memcpy(&lun->mode_pages.caching_page[ CTL_PAGE_CHANGEABLE], &caching_page_changeable, sizeof(caching_page_changeable)); - memcpy(&lun->mode_pages.caching_page[CTL_PAGE_DEFAULT], - &caching_page_default, - sizeof(caching_page_default)); memcpy(&lun->mode_pages.caching_page[CTL_PAGE_SAVED], &caching_page_default, sizeof(caching_page_default)); + caching_page = &lun->mode_pages.caching_page[ + CTL_PAGE_SAVED]; + value = ctl_get_opt(&lun->be_lun->options, "writecache"); + if (value != NULL && strcmp(value, "off") == 0) + caching_page->flags1 &= ~SCP_WCE; + value = ctl_get_opt(&lun->be_lun->options, "readcache"); + if (value != NULL && strcmp(value, "off") == 0) + caching_page->flags1 |= SCP_RCD; + memcpy(&lun->mode_pages.caching_page[CTL_PAGE_CURRENT], + &lun->mode_pages.caching_page[CTL_PAGE_SAVED], + sizeof(caching_page_default)); page_index->page_data = (uint8_t *)lun->mode_pages.caching_page; break; Modified: stable/10/usr.sbin/ctladm/ctladm.8 ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.8 Mon Oct 6 13:16:37 2014 (r272628) +++ stable/10/usr.sbin/ctladm/ctladm.8 Mon Oct 6 13:18:28 2014 (r272629) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd July 9, 2014 +.Dd September 13, 2014 .Dt CTLADM 8 .Os .Sh NAME @@ -959,8 +959,12 @@ Setting to "on" allows EXTENDED COPY com other LUNs on this host, not accessible otherwise. This allows to offload copying between different iSCSI targets residing on the same host in trusted environments. +.It Va readcache +Set to "off", disables read caching for the LUN, if supported by the backend. .It Va unmap -Set to "on", enables UNMAP support for the LUN. +Set to "on", enables UNMAP support for the LUN, if supported by the backend. +.It Va writecache +Set to "off", disables write caching for the LUN, if supported by the backend. .El .Pp Options specific for block backend: From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:19:22 2014 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 9BDC6F48; Mon, 6 Oct 2014 13:19: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 7BD6FA17; Mon, 6 Oct 2014 13:19: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 s96DJMC0077400; Mon, 6 Oct 2014 13:19:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DJLPt077394; Mon, 6 Oct 2014 13:19:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061319.s96DJLPt077394@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:19: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: r272630 - in stable/10: sys/cam/ctl 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.18-1 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, 06 Oct 2014 13:19:22 -0000 Author: mav Date: Mon Oct 6 13:19:20 2014 New Revision: 272630 URL: https://svnweb.freebsd.org/changeset/base/272630 Log: MFC r271507: Implement control over command reordering via options and control mode page. It allows to bypass range checks between UNMAP and READ/WRITE commands, which may introduce additional delays while waiting for UNMAP parameters. READ and WRITE commands are always processed in safe order since their range checks are almost free. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_private.h stable/10/sys/cam/ctl/ctl_ser_table.c stable/10/usr.sbin/ctladm/ctladm.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:18:28 2014 (r272629) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:19:20 2014 (r272630) @@ -280,7 +280,7 @@ static struct scsi_control_page control_ /*page_code*/SMS_CONTROL_MODE_PAGE, /*page_length*/sizeof(struct scsi_control_page) - 2, /*rlec*/0, - /*queue_flags*/0, + /*queue_flags*/SCP_QUEUE_ALG_RESTRICTED, /*eca_and_aen*/0, /*flags4*/SCP_TAS, /*aen_holdoff_period*/{0, 0}, @@ -292,7 +292,7 @@ static struct scsi_control_page control_ /*page_code*/SMS_CONTROL_MODE_PAGE, /*page_length*/sizeof(struct scsi_control_page) - 2, /*rlec*/SCP_DSENSE, - /*queue_flags*/0, + /*queue_flags*/SCP_QUEUE_ALG_MASK, /*eca_and_aen*/0, /*flags4*/0, /*aen_holdoff_period*/{0, 0}, @@ -394,8 +394,8 @@ static int ctl_inquiry_evpd(struct ctl_s static int ctl_inquiry_std(struct ctl_scsiio *ctsio); static int ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint64_t *len); static ctl_action ctl_extent_check(union ctl_io *io1, union ctl_io *io2); -static ctl_action ctl_check_for_blockage(union ctl_io *pending_io, - union ctl_io *ooa_io); +static ctl_action ctl_check_for_blockage(struct ctl_lun *lun, + union ctl_io *pending_io, union ctl_io *ooa_io); static ctl_action ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io, union ctl_io *starting_io); static int ctl_check_blocked(struct ctl_lun *lun); @@ -4277,27 +4277,31 @@ ctl_init_page_index(struct ctl_lun *lun) break; } case SMS_CONTROL_MODE_PAGE: { + struct scsi_control_page *control_page; if (page_index->subpage != SMS_SUBPAGE_PAGE_0) panic("invalid subpage value %d", page_index->subpage); - /* - * Defaults should be okay here, no calculations - * needed. - */ - memcpy(&lun->mode_pages.control_page[CTL_PAGE_CURRENT], + memcpy(&lun->mode_pages.control_page[CTL_PAGE_DEFAULT], &control_page_default, sizeof(control_page_default)); memcpy(&lun->mode_pages.control_page[ CTL_PAGE_CHANGEABLE], &control_page_changeable, sizeof(control_page_changeable)); - memcpy(&lun->mode_pages.control_page[CTL_PAGE_DEFAULT], - &control_page_default, - sizeof(control_page_default)); memcpy(&lun->mode_pages.control_page[CTL_PAGE_SAVED], &control_page_default, sizeof(control_page_default)); + control_page = &lun->mode_pages.control_page[ + CTL_PAGE_SAVED]; + value = ctl_get_opt(&lun->be_lun->options, "reordering"); + if (value != NULL && strcmp(value, "unrestricted") == 0) { + control_page->queue_flags &= ~SCP_QUEUE_ALG_MASK; + control_page->queue_flags |= SCP_QUEUE_ALG_UNRESTRICTED; + } + memcpy(&lun->mode_pages.control_page[CTL_PAGE_CURRENT], + &lun->mode_pages.control_page[CTL_PAGE_SAVED], + sizeof(control_page_default)); page_index->page_data = (uint8_t *)lun->mode_pages.control_page; break; @@ -6205,65 +6209,13 @@ ctl_control_page_handler(struct ctl_scsi lun->flags &= ~CTL_LUN_SENSE_DESC; set_ua = 1; } - if (current_cp->queue_flags & SCP_QUEUE_DQUE) { - if (user_cp->queue_flags & SCP_QUEUE_DQUE) { -#ifdef NEEDTOPORT - csevent_log(CSC_CTL | CSC_SHELF_SW | - CTL_UNTAG_TO_UNTAG, - csevent_LogType_Trace, - csevent_Severity_Information, - csevent_AlertLevel_Green, - csevent_FRU_Firmware, - csevent_FRU_Unknown, - "Received untagged to untagged transition"); -#endif /* NEEDTOPORT */ - } else { -#ifdef NEEDTOPORT - csevent_log(CSC_CTL | CSC_SHELF_SW | - CTL_UNTAG_TO_TAG, - csevent_LogType_ConfigChange, - csevent_Severity_Information, - csevent_AlertLevel_Green, - csevent_FRU_Firmware, - csevent_FRU_Unknown, - "Received untagged to tagged " - "queueing transition"); -#endif /* NEEDTOPORT */ - - current_cp->queue_flags &= ~SCP_QUEUE_DQUE; - saved_cp->queue_flags &= ~SCP_QUEUE_DQUE; - set_ua = 1; - } - } else { - if (user_cp->queue_flags & SCP_QUEUE_DQUE) { -#ifdef NEEDTOPORT - csevent_log(CSC_CTL | CSC_SHELF_SW | - CTL_TAG_TO_UNTAG, - csevent_LogType_ConfigChange, - csevent_Severity_Warning, - csevent_AlertLevel_Yellow, - csevent_FRU_Firmware, - csevent_FRU_Unknown, - "Received tagged queueing to untagged " - "transition"); -#endif /* NEEDTOPORT */ - - current_cp->queue_flags |= SCP_QUEUE_DQUE; - saved_cp->queue_flags |= SCP_QUEUE_DQUE; - set_ua = 1; - } else { -#ifdef NEEDTOPORT - csevent_log(CSC_CTL | CSC_SHELF_SW | - CTL_TAG_TO_TAG, - csevent_LogType_Trace, - csevent_Severity_Information, - csevent_AlertLevel_Green, - csevent_FRU_Firmware, - csevent_FRU_Unknown, - "Received tagged queueing to tagged " - "queueing transition"); -#endif /* NEEDTOPORT */ - } + if ((current_cp->queue_flags & SCP_QUEUE_ALG_MASK) != + (user_cp->queue_flags & SCP_QUEUE_ALG_MASK)) { + current_cp->queue_flags &= ~SCP_QUEUE_ALG_MASK; + current_cp->queue_flags |= user_cp->queue_flags & SCP_QUEUE_ALG_MASK; + saved_cp->queue_flags &= ~SCP_QUEUE_ALG_MASK; + saved_cp->queue_flags |= user_cp->queue_flags & SCP_QUEUE_ALG_MASK; + set_ua = 1; } if (set_ua != 0) { int i; @@ -6306,12 +6258,13 @@ ctl_caching_sp_handler(struct ctl_scsiio mtx_lock(&lun->lun_lock); if ((current_cp->flags1 & (SCP_WCE | SCP_RCD)) != - (user_cp->flags1 & (SCP_WCE | SCP_RCD))) + (user_cp->flags1 & (SCP_WCE | SCP_RCD))) { + current_cp->flags1 &= ~(SCP_WCE | SCP_RCD); + current_cp->flags1 |= user_cp->flags1 & (SCP_WCE | SCP_RCD); + saved_cp->flags1 &= ~(SCP_WCE | SCP_RCD); + saved_cp->flags1 |= user_cp->flags1 & (SCP_WCE | SCP_RCD); set_ua = 1; - current_cp->flags1 &= ~(SCP_WCE | SCP_RCD); - current_cp->flags1 |= user_cp->flags1 & (SCP_WCE | SCP_RCD); - saved_cp->flags1 &= ~(SCP_WCE | SCP_RCD); - saved_cp->flags1 |= user_cp->flags1 & (SCP_WCE | SCP_RCD); + } if (set_ua != 0) { int i; /* @@ -11034,7 +10987,8 @@ ctl_extent_check(union ctl_io *io1, unio } static ctl_action -ctl_check_for_blockage(union ctl_io *pending_io, union ctl_io *ooa_io) +ctl_check_for_blockage(struct ctl_lun *lun, union ctl_io *pending_io, + union ctl_io *ooa_io) { const struct ctl_cmd_entry *pending_entry, *ooa_entry; ctl_serialize_action *serialize_row; @@ -11117,20 +11071,25 @@ ctl_check_for_blockage(union ctl_io *pen switch (serialize_row[pending_entry->seridx]) { case CTL_SER_BLOCK: return (CTL_ACTION_BLOCK); - break; /* NOTREACHED */ case CTL_SER_EXTENT: return (ctl_extent_check(pending_io, ooa_io)); - break; /* NOTREACHED */ + case CTL_SER_EXTENTOPT: + if ((lun->mode_pages.control_page[CTL_PAGE_CURRENT].queue_flags + & SCP_QUEUE_ALG_MASK) != SCP_QUEUE_ALG_UNRESTRICTED) + return (ctl_extent_check(pending_io, ooa_io)); + /* FALLTHROUGH */ case CTL_SER_PASS: return (CTL_ACTION_PASS); - break; /* NOTREACHED */ + case CTL_SER_BLOCKOPT: + if ((lun->mode_pages.control_page[CTL_PAGE_CURRENT].queue_flags + & SCP_QUEUE_ALG_MASK) != SCP_QUEUE_ALG_UNRESTRICTED) + return (CTL_ACTION_BLOCK); + return (CTL_ACTION_PASS); case CTL_SER_SKIP: return (CTL_ACTION_SKIP); - break; default: panic("invalid serialization value %d", serialize_row[pending_entry->seridx]); - break; /* NOTREACHED */ } return (CTL_ACTION_ERROR); @@ -11167,7 +11126,7 @@ ctl_check_ooa(struct ctl_lun *lun, union * of it in the queue. It doesn't queue/dequeue * cur_blocked. */ - action = ctl_check_for_blockage(pending_io, ooa_io); + action = ctl_check_for_blockage(lun, pending_io, ooa_io); switch (action) { case CTL_ACTION_BLOCK: case CTL_ACTION_OVERLAP: Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 6 13:18:28 2014 (r272629) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 6 13:19:20 2014 (r272630) @@ -115,7 +115,9 @@ struct ctl_ioctl_info { typedef enum { CTL_SER_BLOCK, + CTL_SER_BLOCKOPT, CTL_SER_EXTENT, + CTL_SER_EXTENTOPT, CTL_SER_PASS, CTL_SER_SKIP } ctl_serialize_action; Modified: stable/10/sys/cam/ctl/ctl_ser_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_ser_table.c Mon Oct 6 13:18:28 2014 (r272629) +++ stable/10/sys/cam/ctl/ctl_ser_table.c Mon Oct 6 13:19:20 2014 (r272630) @@ -54,17 +54,19 @@ /****************************************************************************/ #define sK CTL_SER_SKIP /* Skip */ -#define pS CTL_SER_PASS /* pS */ +#define pS CTL_SER_PASS /* Pass */ #define bK CTL_SER_BLOCK /* Blocked */ +#define bO CTL_SER_BLOCKOPT /* Optional block */ #define xT CTL_SER_EXTENT /* Extent check */ +#define xO CTL_SER_EXTENTOPT /* Optional extent check */ static ctl_serialize_action ctl_serialize_table[CTL_SERIDX_COUNT][CTL_SERIDX_COUNT] = { /**>IDX_ :: 2nd:TUR RD WRT UNM MDSN MDSL RQSN INQ RDCP RES LSNS FMT STR*/ /*TUR */{ pS, pS, pS, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, -/*READ */{ pS, pS, xT, bK, bK, bK, bK, pS, pS, bK, pS, bK, bK}, -/*WRITE */{ pS, xT, xT, bK, bK, bK, bK, pS, pS, bK, pS, bK, bK}, -/*UNMAP */{ pS, xT, xT, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, +/*READ */{ pS, pS, xT, bO, bK, bK, bK, pS, pS, bK, pS, bK, bK}, +/*WRITE */{ pS, xT, xT, bO, bK, bK, bK, pS, pS, bK, pS, bK, bK}, +/*UNMAP */{ pS, xO, xO, pS, bK, bK, bK, pS, pS, bK, pS, bK, bK}, /*MD_SNS */{ bK, bK, bK, bK, pS, bK, bK, pS, pS, bK, pS, bK, bK}, /*MD_SEL */{ bK, bK, bK, bK, bK, bK, bK, pS, pS, bK, pS, bK, bK}, /*RQ_SNS */{ pS, pS, pS, pS, pS, pS, bK, pS, pS, bK, pS, bK, bK}, Modified: stable/10/usr.sbin/ctladm/ctladm.8 ============================================================================== --- stable/10/usr.sbin/ctladm/ctladm.8 Mon Oct 6 13:18:28 2014 (r272629) +++ stable/10/usr.sbin/ctladm/ctladm.8 Mon Oct 6 13:19:20 2014 (r272630) @@ -961,6 +961,13 @@ This allows to offload copying between d on the same host in trusted environments. .It Va readcache Set to "off", disables read caching for the LUN, if supported by the backend. +.It Va reordering +Set to "unrestricted", allows target to process commands with SIMPLE task +attribute in arbitrary order. Any data integrity exposures related to +command sequence order shall be explicitly handled by the application +client through the selection of appropriate commands and task attributes. +The default value is "restricted". It improves data integrity, but may +introduce some additional delays. .It Va unmap Set to "on", enables UNMAP support for the LUN, if supported by the backend. .It Va writecache From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:20:19 2014 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 3BF90110; Mon, 6 Oct 2014 13:20: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 26772A25; Mon, 6 Oct 2014 13:20: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 s96DKJtd079481; Mon, 6 Oct 2014 13:20:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DKJpV079480; Mon, 6 Oct 2014 13:20:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061320.s96DKJpV079480@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:20: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: r272631 - 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.18-1 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, 06 Oct 2014 13:20:19 -0000 Author: mav Date: Mon Oct 6 13:20:18 2014 New Revision: 272631 URL: https://svnweb.freebsd.org/changeset/base/272631 Log: MFC r271606: Always report that we support REPORT TARGET PORT GROUPS command. Without clustering support we any way have only one group of permanently active ports, but that gives us one more supported VMWare feature. ;) Solaris' Comstar also reports it even when only one port is present. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:19:20 2014 (r272630) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:20:18 2014 (r272631) @@ -10597,9 +10597,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio CTL_DEBUG_PRINT(("additional_length = %d\n", inq_ptr->additional_length)); - inq_ptr->spc3_flags = SPC3_SID_3PC; - if (!ctl_is_single) - inq_ptr->spc3_flags |= SPC3_SID_TPGS_IMPLICIT; + inq_ptr->spc3_flags = SPC3_SID_3PC | SPC3_SID_TPGS_IMPLICIT; /* 16 bit addressing */ if (port_type == CTL_PORT_SCSI) inq_ptr->spc2_flags = SPC2_SID_ADDR16; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:21:15 2014 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 8E148324; Mon, 6 Oct 2014 13:21: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 78924AB3; Mon, 6 Oct 2014 13:21: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 s96DLFUv079801; Mon, 6 Oct 2014 13:21:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DLEmP079794; Mon, 6 Oct 2014 13:21:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061321.s96DLEmP079794@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13: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: r272632 - in stable/10/sys/cam: ctl scsi 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.18-1 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, 06 Oct 2014 13:21:15 -0000 Author: mav Date: Mon Oct 6 13:21:13 2014 New Revision: 272632 URL: https://svnweb.freebsd.org/changeset/base/272632 Log: MFC r271839: Add support for "no Data-Out Buffer" (NDOB) flag of WRITE SAME (16) command. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_backend_block.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:20:18 2014 (r272631) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:21:13 2014 (r272632) @@ -5995,6 +5995,14 @@ ctl_write_same(struct ctl_scsiio *ctsio) break; /* NOTREACHED */ } + /* NDOB flag can be used only together with UNMAP */ + if ((byte2 & (SWS_NDOB | SWS_UNMAP)) == SWS_NDOB) { + ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, + /*command*/ 1, /*field*/ 1, /*bit_valid*/ 1, /*bit*/ 0); + ctl_done((union ctl_io *)ctsio); + return (CTL_RETVAL_COMPLETE); + } + /* * The first check is to make sure we're in bounds, the second * check is to catch wrap-around problems. If the lba + num blocks @@ -6029,7 +6037,8 @@ ctl_write_same(struct ctl_scsiio *ctsio) * If we've got a kernel request that hasn't been malloced yet, * malloc it and tell the caller the data buffer is here. */ - if ((ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0) { + if ((byte2 & SWS_NDOB) == 0 && + (ctsio->io_hdr.flags & CTL_FLAG_ALLOCATED) == 0) { ctsio->kern_data_ptr = malloc(len, M_CTL, M_WAITOK);; ctsio->kern_data_len = len; ctsio->kern_total_len = len; Modified: stable/10/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 6 13:20:18 2014 (r272631) +++ stable/10/sys/cam/ctl/ctl_backend_block.c Mon Oct 6 13:21:13 2014 (r272632) @@ -1045,7 +1045,7 @@ ctl_be_block_cw_dispatch_ws(struct ctl_b softc = be_lun->softc; lbalen = ARGS(beio->io); - if (lbalen->flags & ~(SWS_LBDATA | SWS_UNMAP | SWS_ANCHOR) || + if (lbalen->flags & ~(SWS_LBDATA | SWS_UNMAP | SWS_ANCHOR | SWS_NDOB) || (lbalen->flags & (SWS_UNMAP | SWS_ANCHOR) && be_lun->unmap == NULL)) { ctl_free_beio(beio); ctl_set_invalid_field(&io->scsiio, Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 6 13:20:18 2014 (r272631) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 6 13:21:13 2014 (r272632) @@ -1085,7 +1085,7 @@ const struct ctl_cmd_entry ctl_cmd_table {ctl_write_same, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN | CTL_FLAG_DATA_OUT, CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE, - 16, {0x1a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 16, {0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 94 */ Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Mon Oct 6 13:20:18 2014 (r272631) +++ stable/10/sys/cam/scsi/scsi_all.h Mon Oct 6 13:21:13 2014 (r272632) @@ -1030,6 +1030,7 @@ struct scsi_write_same_16 { uint8_t opcode; uint8_t byte2; +#define SWS_NDOB 0x01 uint8_t addr[8]; uint8_t length[4]; uint8_t group; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:22:06 2014 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 4EDA946A; Mon, 6 Oct 2014 13:22: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 37E6AACA; Mon, 6 Oct 2014 13:22: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 s96DM6JR081500; Mon, 6 Oct 2014 13:22:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DM5oZ081497; Mon, 6 Oct 2014 13:22:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061322.s96DM5oZ081497@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:22: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: r272633 - in stable/10/sys/cam: ctl scsi 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.18-1 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, 06 Oct 2014 13:22:06 -0000 Author: mav Date: Mon Oct 6 13:22:05 2014 New Revision: 272633 URL: https://svnweb.freebsd.org/changeset/base/272633 Log: MFC r271845: Allow more commands to pass persistent reservation according to SPC-4 r37. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_cmd_table.c stable/10/sys/cam/scsi/scsi_all.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:21:13 2014 (r272632) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:22:05 2014 (r272633) @@ -7904,7 +7904,7 @@ retry: res_cap = (struct scsi_per_res_cap *)ctsio->kern_data_ptr; scsi_ulto2b(sizeof(*res_cap), res_cap->length); - res_cap->flags2 |= SPRI_TMV | SPRI_ALLOW_3; + res_cap->flags2 |= SPRI_TMV | SPRI_ALLOW_5; type_mask = SPRI_TM_WR_EX_AR | SPRI_TM_EX_AC_RO | SPRI_TM_WR_EX_RO | Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 6 13:21:13 2014 (r272632) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 6 13:22:05 2014 (r272633) @@ -304,7 +304,8 @@ const struct ctl_cmd_entry ctl_cmd_table /* 00 RECEIVE COPY STATUS (LID1) */ {ctl_receive_copy_status_lid1, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_BOTH | - CTL_FLAG_DATA_IN, + CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, 16, {0x00, 0xff, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, @@ -320,14 +321,16 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_CMD_FLAG_OK_ON_STOPPED | CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_CMD_FLAG_OK_ON_SECONDARY | - CTL_FLAG_DATA_IN, + CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, 16, {0x03, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 04 RECEIVE COPY FAILURE DETAILS (LID1) */ {ctl_receive_copy_failure_details, CTL_SERIDX_RD_CAP, CTL_CMD_FLAG_OK_ON_BOTH | - CTL_FLAG_DATA_IN, + CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, 16, {0x04, 0xff, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, @@ -470,7 +473,8 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_CMD_FLAG_OK_ON_STOPPED | CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_CMD_FLAG_OK_ON_SECONDARY | - CTL_FLAG_DATA_IN, + CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, 12, {0x0c, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, @@ -479,7 +483,8 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_CMD_FLAG_OK_ON_STOPPED | CTL_CMD_FLAG_OK_ON_INOPERABLE | CTL_CMD_FLAG_OK_ON_SECONDARY | - CTL_FLAG_DATA_IN, + CTL_FLAG_DATA_IN | + CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_NONE, 12, {0x0d, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Mon Oct 6 13:21:13 2014 (r272632) +++ stable/10/sys/cam/scsi/scsi_all.h Mon Oct 6 13:22:05 2014 (r272633) @@ -317,6 +317,7 @@ struct scsi_per_res_cap #define SPRI_ALLOW_2 0x20 #define SPRI_ALLOW_3 0x30 #define SPRI_ALLOW_4 0x40 +#define SPRI_ALLOW_5 0x50 #define SPRI_PTPL_A 0x01 uint8_t type_mask[2]; #define SPRI_TM_WR_EX_AR 0x8000 From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:22:54 2014 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 84E1259C; Mon, 6 Oct 2014 13:22: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 6FD80AD2; Mon, 6 Oct 2014 13:22: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 s96DMsTT081646; Mon, 6 Oct 2014 13:22:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DMsgR081645; Mon, 6 Oct 2014 13:22:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061322.s96DMsgR081645@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:22: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: r272634 - 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.18-1 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, 06 Oct 2014 13:22:54 -0000 Author: mav Date: Mon Oct 6 13:22:53 2014 New Revision: 272634 URL: https://svnweb.freebsd.org/changeset/base/272634 Log: MFC r271869: Fix inverted expression to report block size in mode page block descriptor. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:22:05 2014 (r272633) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:22:53 2014 (r272634) @@ -7090,7 +7090,7 @@ ctl_mode_sense(struct ctl_scsiio *ctsio) * descriptor. Otherwise, just set it to 0. */ if (dbd == 0) { - if (control_dev != 0) + if (control_dev == 0) scsi_ulto3b(lun->be_lun->blocksize, block_desc->block_len); else From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:23:38 2014 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 A43396CA; Mon, 6 Oct 2014 13:23: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 8EF21AD7; Mon, 6 Oct 2014 13:23: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 s96DNcNK081823; Mon, 6 Oct 2014 13:23:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DNcUV081822; Mon, 6 Oct 2014 13:23:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061323.s96DNcUV081822@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:23: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: r272635 - 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.18-1 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, 06 Oct 2014 13:23:38 -0000 Author: mav Date: Mon Oct 6 13:23:37 2014 New Revision: 272635 URL: https://svnweb.freebsd.org/changeset/base/272635 Log: MFC r271930: Allow SUBPAGE CODE field in MODE SENSE commands. Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 6 13:22:53 2014 (r272634) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 6 13:23:37 2014 (r272635) @@ -636,7 +636,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_CMD_FLAG_OK_ON_SECONDARY | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, - CTL_LUN_PAT_NONE, 6, {0x08, 0xff, 0, 0xff, 0x07}}, + CTL_LUN_PAT_NONE, 6, {0x08, 0xff, 0xff, 0xff, 0x07}}, /* 1B START STOP UNIT */ {ctl_start_stop, CTL_SERIDX_START, CTL_CMD_FLAG_OK_ON_SLUN | @@ -890,7 +890,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_CMD_FLAG_OK_ON_SECONDARY | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, - CTL_LUN_PAT_NONE, 10, {0x18, 0xff, 0, 0, 0, 0, 0xff, 0xff, 0x07} }, + CTL_LUN_PAT_NONE, 10, {0x18, 0xff, 0xff, 0, 0, 0, 0xff, 0xff, 0x07} }, /* 5B CLOSE TRACK/SESSION */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:24:26 2014 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 081C4813; Mon, 6 Oct 2014 13:24: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 CCBFCAE1; Mon, 6 Oct 2014 13:24:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s96DOPND081993; Mon, 6 Oct 2014 13:24:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DOPME081992; Mon, 6 Oct 2014 13:24:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061324.s96DOPME081992@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:24: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: r272636 - 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.18-1 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, 06 Oct 2014 13:24:26 -0000 Author: mav Date: Mon Oct 6 13:24:25 2014 New Revision: 272636 URL: https://svnweb.freebsd.org/changeset/base/272636 Log: MFC r271940: Polish INQUIRY command fields validation. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:23:37 2014 (r272635) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:24:25 2014 (r272636) @@ -10736,45 +10736,23 @@ ctl_inquiry(struct ctl_scsiio *ctsio) struct scsi_inquiry *cdb; int retval; - cdb = (struct scsi_inquiry *)ctsio->cdb; - - retval = 0; - CTL_DEBUG_PRINT(("ctl_inquiry\n")); - /* - * Right now, we don't support the CmdDt inquiry information. - * This would be nice to support in the future. When we do - * support it, we should change this test so that it checks to make - * sure SI_EVPD and SI_CMDDT aren't both set at the same time. - */ -#ifdef notyet - if (((cdb->byte2 & SI_EVPD) - && (cdb->byte2 & SI_CMDDT))) -#endif - if (cdb->byte2 & SI_CMDDT) { - /* - * Point to the SI_CMDDT bit. We might change this - * when we support SI_CMDDT, but since both bits would be - * "wrong", this should probably just stay as-is then. - */ + cdb = (struct scsi_inquiry *)ctsio->cdb; + if (cdb->byte2 & SI_EVPD) + retval = ctl_inquiry_evpd(ctsio); + else if (cdb->page_code == 0) + retval = ctl_inquiry_std(ctsio); + else { ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, - /*field*/ 1, - /*bit_valid*/ 1, - /*bit*/ 1); + /*field*/ 2, + /*bit_valid*/ 0, + /*bit*/ 0); ctl_done((union ctl_io *)ctsio); return (CTL_RETVAL_COMPLETE); } - if (cdb->byte2 & SI_EVPD) - retval = ctl_inquiry_evpd(ctsio); -#ifdef notyet - else if (cdb->byte2 & SI_CMDDT) - retval = ctl_inquiry_cmddt(ctsio); -#endif - else - retval = ctl_inquiry_std(ctsio); return (retval); } From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:25:37 2014 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 5A0B9986; Mon, 6 Oct 2014 13:25: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 447E2AF8; Mon, 6 Oct 2014 13:25: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 s96DPbJ3082235; Mon, 6 Oct 2014 13:25:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DPb6e082234; Mon, 6 Oct 2014 13:25:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061325.s96DPb6e082234@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:25: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: r272637 - 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.18-1 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, 06 Oct 2014 13:25:37 -0000 Author: mav Date: Mon Oct 6 13:25:36 2014 New Revision: 272637 URL: https://svnweb.freebsd.org/changeset/base/272637 Log: MFC r271941: Report proper errors codes for unsupported SERVICE ACTION values. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:24:25 2014 (r272636) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:25:36 2014 (r272637) @@ -442,7 +442,7 @@ static void ctl_enqueue_rtr(union ctl_io static void ctl_enqueue_done(union ctl_io *io); static void ctl_enqueue_isc(union ctl_io *io); static const struct ctl_cmd_entry * - ctl_get_cmd_entry(struct ctl_scsiio *ctsio); + ctl_get_cmd_entry(struct ctl_scsiio *ctsio, int *sa); static const struct ctl_cmd_entry * ctl_validate_command(struct ctl_scsiio *ctsio); static int ctl_cmd_applicable(uint8_t lun_type, @@ -646,7 +646,7 @@ ctl_isc_event_handler(ctl_ha_channel cha if (ctl_softc->ha_mode == CTL_HA_MODE_XFER) { const struct ctl_cmd_entry *entry; - entry = ctl_get_cmd_entry(&io->scsiio); + entry = ctl_get_cmd_entry(&io->scsiio, NULL); io->io_hdr.flags &= ~CTL_FLAG_DATA_MASK; io->io_hdr.flags |= entry->flags & CTL_FLAG_DATA_MASK; @@ -11048,8 +11048,8 @@ ctl_check_for_blockage(struct ctl_lun *l || (ooa_io->scsiio.tag_type == CTL_TAG_ORDERED))) return (CTL_ACTION_BLOCK); - pending_entry = ctl_get_cmd_entry(&pending_io->scsiio); - ooa_entry = ctl_get_cmd_entry(&ooa_io->scsiio); + pending_entry = ctl_get_cmd_entry(&pending_io->scsiio, NULL); + ooa_entry = ctl_get_cmd_entry(&ooa_io->scsiio, NULL); serialize_row = ctl_serialize_table[ooa_entry->seridx]; @@ -11222,7 +11222,7 @@ ctl_check_blocked(struct ctl_lun *lun) } break; } - entry = ctl_get_cmd_entry(&cur_blocked->scsiio); + entry = ctl_get_cmd_entry(&cur_blocked->scsiio, NULL); softc = control_softc; initidx = ctl_get_initindex(&cur_blocked->io_hdr.nexus); @@ -11871,12 +11871,14 @@ ctl_scsiio_precheck(struct ctl_softc *ct } const struct ctl_cmd_entry * -ctl_get_cmd_entry(struct ctl_scsiio *ctsio) +ctl_get_cmd_entry(struct ctl_scsiio *ctsio, int *sa) { const struct ctl_cmd_entry *entry; int service_action; entry = &ctl_cmd_table[ctsio->cdb[0]]; + if (sa) + *sa = ((entry->flags & CTL_CMD_FLAG_SA5) != 0); if (entry->flags & CTL_CMD_FLAG_SA5) { service_action = ctsio->cdb[1] & SERVICE_ACTION_MASK; entry = &((const struct ctl_cmd_entry *) @@ -11889,12 +11891,20 @@ const struct ctl_cmd_entry * ctl_validate_command(struct ctl_scsiio *ctsio) { const struct ctl_cmd_entry *entry; - int i; + int i, sa; uint8_t diff; - entry = ctl_get_cmd_entry(ctsio); + entry = ctl_get_cmd_entry(ctsio, &sa); if (entry->execute == NULL) { - ctl_set_invalid_opcode(ctsio); + if (sa) + ctl_set_invalid_field(ctsio, + /*sks_valid*/ 1, + /*command*/ 1, + /*field*/ 1, + /*bit_valid*/ 1, + /*bit*/ 4); + else + ctl_set_invalid_opcode(ctsio); ctl_done((union ctl_io *)ctsio); return (NULL); } @@ -11948,7 +11958,7 @@ ctl_scsiio(struct ctl_scsiio *ctsio) CTL_DEBUG_PRINT(("ctl_scsiio cdb[0]=%02X\n", ctsio->cdb[0])); - entry = ctl_get_cmd_entry(ctsio); + entry = ctl_get_cmd_entry(ctsio, NULL); /* * If this I/O has been aborted, just send it straight to @@ -12478,7 +12488,7 @@ ctl_handle_isc(union ctl_io *io) * This is only used in SER_ONLY mode. */ free_io = 0; - entry = ctl_get_cmd_entry(&io->scsiio); + entry = ctl_get_cmd_entry(&io->scsiio, NULL); mtx_lock(&lun->lun_lock); if (ctl_scsiio_lun_check(ctl_softc, lun, entry, (struct ctl_scsiio *)io) != 0) { @@ -12558,7 +12568,7 @@ ctl_cmd_pattern_match(struct ctl_scsiio if ((pattern & CTL_LUN_PAT_MASK) == CTL_LUN_PAT_ANY) return (CTL_LUN_PAT_ANY); - entry = ctl_get_cmd_entry(ctsio); + entry = ctl_get_cmd_entry(ctsio, NULL); filtered_pattern = entry->pattern & pattern; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:26:27 2014 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 D6D41AD7; Mon, 6 Oct 2014 13:26: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 B753DB09; Mon, 6 Oct 2014 13:26: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 s96DQQ9r082403; Mon, 6 Oct 2014 13:26:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DQQuD082402; Mon, 6 Oct 2014 13:26:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061326.s96DQQuD082402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:26: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: r272638 - 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.18-1 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, 06 Oct 2014 13:26:27 -0000 Author: mav Date: Mon Oct 6 13:26:26 2014 New Revision: 272638 URL: https://svnweb.freebsd.org/changeset/base/272638 Log: MFC r271942: Don't report unsupported FUA_NV bit set in READ/WRITE commands as error. While this bit is obsolete in SBC-3, SBC-2 allowed to silently ignore it. Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 6 13:25:36 2014 (r272637) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 6 13:26:26 2014 (r272638) @@ -694,7 +694,7 @@ const struct ctl_cmd_entry ctl_cmd_table CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE, - 10, {0x18, 0xff, 0xff, 0xff, 0xff, 0, 0xff, 0xff, 0x07}}, + 10, {0x1a, 0xff, 0xff, 0xff, 0xff, 0, 0xff, 0xff, 0x07}}, /* 29 READ GENERATION */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, @@ -702,7 +702,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 2A WRITE(10) */ {ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT, CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE, - 10, {0x18, 0xff, 0xff, 0xff, 0xff, 0, 0xff, 0xff, 0x07}}, + 10, {0x1a, 0xff, 0xff, 0xff, 0xff, 0, 0xff, 0xff, 0x07}}, /* 2B SEEK(10) */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, @@ -1035,7 +1035,7 @@ const struct ctl_cmd_entry ctl_cmd_table {ctl_read_write, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_SLUN | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE, - 16, {0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 16, {0x1a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 89 COMPARE AND WRITE */ @@ -1047,7 +1047,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 8A WRITE(16) */ {ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT, CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE, - 16, {0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 16, {0x1a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 8B */ @@ -1169,7 +1169,7 @@ const struct ctl_cmd_entry ctl_cmd_table {ctl_read_write, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_SLUN | CTL_FLAG_DATA_IN | CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_LUN_PAT_READ | CTL_LUN_PAT_RANGE, - 12, {0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, + 12, {0x1a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* A9 PLAY TRACK RELATIVE(12) */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, @@ -1177,7 +1177,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* AA WRITE(12) */ {ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT, CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE, - 12, {0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, + 12, {0x1a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* AB SERVICE ACTION IN(12) */ {NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE}, From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:27:19 2014 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 3AD95C1C; Mon, 6 Oct 2014 13:27: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 1B1F7B1E; Mon, 6 Oct 2014 13:27: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 s96DRIDg082569; Mon, 6 Oct 2014 13:27:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DRI5b082567; Mon, 6 Oct 2014 13:27:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061327.s96DRI5b082567@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:27: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: r272639 - 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.18-1 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, 06 Oct 2014 13:27:19 -0000 Author: mav Date: Mon Oct 6 13:27:18 2014 New Revision: 272639 URL: https://svnweb.freebsd.org/changeset/base/272639 Log: MFC r271945: Simplify legacy reservation handling. Drop it on I_T nexus loss. Modified: stable/10/sys/cam/ctl/ctl.c stable/10/sys/cam/ctl/ctl_private.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:26:26 2014 (r272638) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:27:18 2014 (r272639) @@ -5310,12 +5310,14 @@ ctl_scsi_release(struct ctl_scsiio *ctsi int length, longid, thirdparty_id, resv_id; struct ctl_softc *ctl_softc; struct ctl_lun *lun; + uint32_t residx; length = 0; resv_id = 0; CTL_DEBUG_PRINT(("ctl_scsi_release\n")); + residx = ctl_get_resindex(&ctsio->io_hdr.nexus); lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; ctl_softc = control_softc; @@ -5373,14 +5375,8 @@ ctl_scsi_release(struct ctl_scsiio *ctsi * released, though, by the initiator who made it or by one of * several reset type events. */ - if (lun->flags & CTL_LUN_RESERVED) { - if ((ctsio->io_hdr.nexus.initid.id == lun->rsv_nexus.initid.id) - && (ctsio->io_hdr.nexus.targ_port == lun->rsv_nexus.targ_port) - && (ctsio->io_hdr.nexus.targ_target.id == - lun->rsv_nexus.targ_target.id)) { + if ((lun->flags & CTL_LUN_RESERVED) && (lun->res_idx == residx)) lun->flags &= ~CTL_LUN_RESERVED; - } - } mtx_unlock(&lun->lun_lock); @@ -5404,6 +5400,7 @@ ctl_scsi_reserve(struct ctl_scsiio *ctsi uint64_t thirdparty_id; struct ctl_softc *ctl_softc; struct ctl_lun *lun; + uint32_t residx; extent = 0; thirdparty = 0; @@ -5414,6 +5411,7 @@ ctl_scsi_reserve(struct ctl_scsiio *ctsi CTL_DEBUG_PRINT(("ctl_reserve\n")); + residx = ctl_get_resindex(&ctsio->io_hdr.nexus); lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; ctl_softc = control_softc; @@ -5462,19 +5460,14 @@ ctl_scsi_reserve(struct ctl_scsiio *ctsi thirdparty_id = scsi_8btou64(ctsio->kern_data_ptr); mtx_lock(&lun->lun_lock); - if (lun->flags & CTL_LUN_RESERVED) { - if ((ctsio->io_hdr.nexus.initid.id != lun->rsv_nexus.initid.id) - || (ctsio->io_hdr.nexus.targ_port != lun->rsv_nexus.targ_port) - || (ctsio->io_hdr.nexus.targ_target.id != - lun->rsv_nexus.targ_target.id)) { - ctsio->scsi_status = SCSI_STATUS_RESERV_CONFLICT; - ctsio->io_hdr.status = CTL_SCSI_ERROR; - goto bailout; - } + if ((lun->flags & CTL_LUN_RESERVED) && (lun->res_idx != residx)) { + ctsio->scsi_status = SCSI_STATUS_RESERV_CONFLICT; + ctsio->io_hdr.status = CTL_SCSI_ERROR; + goto bailout; } lun->flags |= CTL_LUN_RESERVED; - lun->rsv_nexus = ctsio->io_hdr.nexus; + lun->res_idx = residx; ctsio->scsi_status = SCSI_STATUS_OK; ctsio->io_hdr.status = CTL_SUCCESS; @@ -11273,6 +11266,7 @@ ctl_scsiio_lun_check(struct ctl_softc *c const struct ctl_cmd_entry *entry, struct ctl_scsiio *ctsio) { int retval; + uint32_t residx; retval = 0; @@ -11297,12 +11291,10 @@ ctl_scsiio_lun_check(struct ctl_softc *c * even on reserved LUNs, and if this initiator isn't the one who * reserved us, reject the command with a reservation conflict. */ + residx = ctl_get_resindex(&ctsio->io_hdr.nexus); if ((lun->flags & CTL_LUN_RESERVED) && ((entry->flags & CTL_CMD_FLAG_ALLOW_ON_RESV) == 0)) { - if ((ctsio->io_hdr.nexus.initid.id != lun->rsv_nexus.initid.id) - || (ctsio->io_hdr.nexus.targ_port != lun->rsv_nexus.targ_port) - || (ctsio->io_hdr.nexus.targ_target.id != - lun->rsv_nexus.targ_target.id)) { + if (lun->res_idx != residx) { ctsio->scsi_status = SCSI_STATUS_RESERV_CONFLICT; ctsio->io_hdr.status = CTL_SCSI_ERROR; retval = 1; @@ -11310,11 +11302,8 @@ ctl_scsiio_lun_check(struct ctl_softc *c } } - if ( (lun->flags & CTL_LUN_PR_RESERVED) + if ((lun->flags & CTL_LUN_PR_RESERVED) && ((entry->flags & CTL_CMD_FLAG_ALLOW_ON_PR_RESV) == 0)) { - uint32_t residx; - - residx = ctl_get_resindex(&ctsio->io_hdr.nexus); /* * if we aren't registered or it's a res holder type * reservation and this isn't the res holder then set a @@ -12178,9 +12167,10 @@ ctl_i_t_nexus_reset(union ctl_io *io) { struct ctl_softc *softc = control_softc; struct ctl_lun *lun; - uint32_t initindex; + uint32_t initindex, residx; initindex = ctl_get_initindex(&io->io_hdr.nexus); + residx = ctl_get_resindex(&io->io_hdr.nexus); mtx_lock(&softc->ctl_lock); STAILQ_FOREACH(lun, &softc->lun_list, links) { mtx_lock(&lun->lun_lock); @@ -12190,6 +12180,8 @@ ctl_i_t_nexus_reset(union ctl_io *io) #ifdef CTL_WITH_CA ctl_clear_mask(lun->have_ca, initindex); #endif + if ((lun->flags & CTL_LUN_RESERVED) && (lun->res_idx == residx)) + lun->flags &= ~CTL_LUN_RESERVED; lun->pending_ua[initindex] |= CTL_UA_I_T_NEXUS_LOSS; mtx_unlock(&lun->lun_lock); } Modified: stable/10/sys/cam/ctl/ctl_private.h ============================================================================== --- stable/10/sys/cam/ctl/ctl_private.h Mon Oct 6 13:26:26 2014 (r272638) +++ stable/10/sys/cam/ctl/ctl_private.h Mon Oct 6 13:27:18 2014 (r272639) @@ -389,7 +389,6 @@ struct ctl_lun { TAILQ_HEAD(ctl_blockq,ctl_io_hdr) blocked_queue; STAILQ_ENTRY(ctl_lun) links; STAILQ_ENTRY(ctl_lun) run_links; - struct ctl_nexus rsv_nexus; #ifdef CTL_WITH_CA uint32_t have_ca[CTL_MAX_INITIATORS >> 5]; struct scsi_sense_data pending_sense[CTL_MAX_INITIATORS]; @@ -397,6 +396,7 @@ struct ctl_lun { ctl_ua_type pending_ua[CTL_MAX_INITIATORS]; struct ctl_mode_pages mode_pages; struct ctl_lun_io_stats stats; + uint32_t res_idx; struct ctl_per_res_info per_res[2*CTL_MAX_INITIATORS]; unsigned int PRGeneration; int pr_key_count; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:28:18 2014 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 38662D67; Mon, 6 Oct 2014 13:28: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 1A769B39; Mon, 6 Oct 2014 13:28: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 s96DSHHO082764; Mon, 6 Oct 2014 13:28:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DSHnR082763; Mon, 6 Oct 2014 13:28:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061328.s96DSHnR082763@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:28: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: r272640 - 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.18-1 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, 06 Oct 2014 13:28:18 -0000 Author: mav Date: Mon Oct 6 13:28:17 2014 New Revision: 272640 URL: https://svnweb.freebsd.org/changeset/base/272640 Log: MFC r271951: Don't try to continue aborted commands if status was not set. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:27:18 2014 (r272639) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:28:17 2014 (r272640) @@ -5281,9 +5281,10 @@ ctl_config_write_done(union ctl_io *io) * If there is an error, though, we don't want to keep processing. * Instead, just send status back to the initiator. */ - if ((io->io_hdr.flags & CTL_FLAG_IO_CONT) - && (((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE) - || ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS))) { + if ((io->io_hdr.flags & CTL_FLAG_IO_CONT) && + (io->io_hdr.flags & CTL_FLAG_ABORT) == 0 && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { io->scsiio.io_cont(io); return; } From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:29:16 2014 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 7EAE6EA5; Mon, 6 Oct 2014 13:29:16 +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 69A0BB50; Mon, 6 Oct 2014 13:29: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 s96DTG0W082954; Mon, 6 Oct 2014 13:29:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DTG41082953; Mon, 6 Oct 2014 13:29:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061329.s96DTG41082953@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:29: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: r272641 - 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.18-1 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, 06 Oct 2014 13:29:16 -0000 Author: mav Date: Mon Oct 6 13:29:15 2014 New Revision: 272641 URL: https://svnweb.freebsd.org/changeset/base/272641 Log: MFC r271954: Deny ANCHOR flag set without UNMAP flag set in WRITE SAME commands. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:28:17 2014 (r272640) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:29:15 2014 (r272641) @@ -5989,8 +5989,9 @@ ctl_write_same(struct ctl_scsiio *ctsio) break; /* NOTREACHED */ } - /* NDOB flag can be used only together with UNMAP */ - if ((byte2 & (SWS_NDOB | SWS_UNMAP)) == SWS_NDOB) { + /* NDOB and ANCHOR flags can be used only together with UNMAP */ + if ((byte2 & SWS_UNMAP) == 0 && + (byte2 & (SWS_NDOB | SWS_ANCHOR)) != 0) { ctl_set_invalid_field(ctsio, /*sks_valid*/ 1, /*command*/ 1, /*field*/ 1, /*bit_valid*/ 1, /*bit*/ 0); ctl_done((union ctl_io *)ctsio); From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:30:06 2014 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 CEDA7151; Mon, 6 Oct 2014 13:30: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 9FD14B67; Mon, 6 Oct 2014 13:30: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 s96DU6ZF083414; Mon, 6 Oct 2014 13:30:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DU6Y8083413; Mon, 6 Oct 2014 13:30:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061330.s96DU6Y8083413@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:30: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: r272642 - 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.18-1 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, 06 Oct 2014 13:30:06 -0000 Author: mav Date: Mon Oct 6 13:30:06 2014 New Revision: 272642 URL: https://svnweb.freebsd.org/changeset/base/272642 Log: MFC r271959: Pretend that we support BYTCHK=1 in WRITE AND VERIFY command. Technically that is not true, but since we don't implement VERIFY there at all, doing only WRITE part, this is a minor sin. Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_cmd_table.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 6 13:29:15 2014 (r272641) +++ stable/10/sys/cam/ctl/ctl_cmd_table.c Mon Oct 6 13:30:06 2014 (r272642) @@ -716,7 +716,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 2E WRITE AND VERIFY(10) */ {ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT, CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE, - 10, {0x10, 0xff, 0xff, 0xff, 0xff, 0, 0xff, 0xff, 0x07}}, + 10, {0x12, 0xff, 0xff, 0xff, 0xff, 0, 0xff, 0xff, 0x07}}, /* 2F VERIFY(10) */ {ctl_verify, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_SLUN | @@ -1062,7 +1062,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* 8E WRITE AND VERIFY(16) */ {ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT, CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE, - 16, {0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 16, {0x12, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* 8F VERIFY(16) */ @@ -1191,7 +1191,7 @@ const struct ctl_cmd_entry ctl_cmd_table /* AE WRITE AND VERIFY(12) */ {ctl_read_write, CTL_SERIDX_WRITE, CTL_CMD_FLAG_OK_ON_SLUN| CTL_FLAG_DATA_OUT, CTL_LUN_PAT_WRITE | CTL_LUN_PAT_RANGE, - 12, {0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, + 12, {0x12, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}}, /* AF VERIFY(12) */ {ctl_verify, CTL_SERIDX_READ, CTL_CMD_FLAG_OK_ON_SLUN | From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:30:53 2014 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 A84252F0; Mon, 6 Oct 2014 13:30: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 93694B74; Mon, 6 Oct 2014 13:30: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 s96DUrCb084626; Mon, 6 Oct 2014 13:30:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DUrDC084625; Mon, 6 Oct 2014 13:30:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061330.s96DUrDC084625@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13: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: r272643 - 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.18-1 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, 06 Oct 2014 13:30:53 -0000 Author: mav Date: Mon Oct 6 13:30:52 2014 New Revision: 272643 URL: https://svnweb.freebsd.org/changeset/base/272643 Log: MFC r272033: Fix ASCQ for "Logical unit not ready, manual intervention required" error. Modified: stable/10/sys/cam/ctl/ctl_error.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_error.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_error.c Mon Oct 6 13:30:06 2014 (r272642) +++ stable/10/sys/cam/ctl/ctl_error.c Mon Oct 6 13:30:52 2014 (r272643) @@ -693,7 +693,7 @@ ctl_set_lun_not_ready(struct ctl_scsiio /*current_error*/ 1, /*sense_key*/ SSD_KEY_NOT_READY, /*asc*/ 0x04, - /*ascq*/ 0x05, + /*ascq*/ 0x03, SSD_ELEM_NONE); } From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:31:45 2014 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 4622042A; Mon, 6 Oct 2014 13:31: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 30D7EC08; Mon, 6 Oct 2014 13:31: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 s96DVjXY087115; Mon, 6 Oct 2014 13:31:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DVjrd087114; Mon, 6 Oct 2014 13:31:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061331.s96DVjrd087114@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:31: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: r272644 - 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.18-1 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, 06 Oct 2014 13:31:45 -0000 Author: mav Date: Mon Oct 6 13:31:44 2014 New Revision: 272644 URL: https://svnweb.freebsd.org/changeset/base/272644 Log: MFC r272224: Fix page length reported for Block Limits VPD page. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:30:52 2014 (r272643) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:31:44 2014 (r272644) @@ -10287,7 +10287,7 @@ ctl_inquiry_evpd_block_limits(struct ctl bl_ptr->device = (SID_QUAL_LU_OFFLINE << 5) | T_DIRECT; bl_ptr->page_code = SVPD_BLOCK_LIMITS; - scsi_ulto2b(sizeof(*bl_ptr), bl_ptr->page_length); + scsi_ulto2b(sizeof(*bl_ptr) - 4, bl_ptr->page_length); bl_ptr->max_cmp_write_len = 0xff; scsi_ulto4b(0xffffffff, bl_ptr->max_txfer_len); if (lun != NULL) { From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:32:31 2014 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 778CB575; Mon, 6 Oct 2014 13:32: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 61DC1C16; Mon, 6 Oct 2014 13:32: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 s96DWVRV087291; Mon, 6 Oct 2014 13:32:31 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DWU4a087289; Mon, 6 Oct 2014 13:32:30 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410061332.s96DWU4a087289@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 6 Oct 2014 13:32:30 +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: r272645 - in stable/10/sys: netinet 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.18-1 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, 06 Oct 2014 13:32:31 -0000 Author: tuexen Date: Mon Oct 6 13:32:30 2014 New Revision: 272645 URL: https://svnweb.freebsd.org/changeset/base/272645 Log: MFC r272323: If the checksum coverage field in the UDPLITE header is the length of the complete UDPLITE packet, the packet has full checksum coverage. So fix the condition. Modified: stable/10/sys/netinet/udp_usrreq.c stable/10/sys/netinet6/udp6_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/udp_usrreq.c ============================================================================== --- stable/10/sys/netinet/udp_usrreq.c Mon Oct 6 13:31:44 2014 (r272644) +++ stable/10/sys/netinet/udp_usrreq.c Mon Oct 6 13:32:30 2014 (r272645) @@ -434,9 +434,10 @@ udp_input(struct mbuf *m, int off) */ len = ntohs((u_short)uh->uh_ulen); ip_len = ntohs(ip->ip_len) - iphlen; - if (pr == IPPROTO_UDPLITE && len == 0) { + if (pr == IPPROTO_UDPLITE && (len == 0 || len == ip_len)) { /* Zero means checksum over the complete packet. */ - len = ip_len; + if (len == 0) + len = ip_len; cscov_partial = 0; } if (ip_len != len) { Modified: stable/10/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 13:31:44 2014 (r272644) +++ stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 13:32:30 2014 (r272645) @@ -225,9 +225,10 @@ udp6_input(struct mbuf **mp, int *offp, nxt = ip6->ip6_nxt; cscov_partial = (nxt == IPPROTO_UDPLITE) ? 1 : 0; - if (nxt == IPPROTO_UDPLITE && ulen == 0) { + if (nxt == IPPROTO_UDPLITE && (ulen == 0 || ulen == plen)) { /* Zero means checksum over the complete packet. */ - ulen = plen; + if (ulen == 0) + ulen = plen; cscov_partial = 0; } if (nxt == IPPROTO_UDP && plen != ulen) { From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:33:23 2014 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 05C5A6F5; Mon, 6 Oct 2014 13:33: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 CB5E3C28; Mon, 6 Oct 2014 13:33: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 s96DXMWm087484; Mon, 6 Oct 2014 13:33:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DXMvL087483; Mon, 6 Oct 2014 13:33:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061333.s96DXMvL087483@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:33: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: r272646 - 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.18-1 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, 06 Oct 2014 13:33:23 -0000 Author: mav Date: Mon Oct 6 13:33:22 2014 New Revision: 272646 URL: https://svnweb.freebsd.org/changeset/base/272646 Log: MFC r272247: Do not transfer unneeded training zero bytes in INQUIRY response. It is an addition to r269631. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:32:30 2014 (r272645) +++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 13:33:22 2014 (r272646) @@ -10482,7 +10482,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio struct ctl_softc *ctl_softc; struct ctl_lun *lun; char *val; - uint32_t alloc_len; + uint32_t alloc_len, data_len; ctl_port_type port_type; ctl_softc = control_softc; @@ -10506,16 +10506,17 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio * in. If the user only asks for less, we'll give him * that much. */ - ctsio->kern_data_ptr = malloc(sizeof(*inq_ptr), M_CTL, M_WAITOK | M_ZERO); + data_len = offsetof(struct scsi_inquiry_data, vendor_specific1); + ctsio->kern_data_ptr = malloc(data_len, M_CTL, M_WAITOK | M_ZERO); inq_ptr = (struct scsi_inquiry_data *)ctsio->kern_data_ptr; ctsio->kern_sg_entries = 0; ctsio->kern_data_resid = 0; ctsio->kern_rel_offset = 0; - if (sizeof(*inq_ptr) < alloc_len) { - ctsio->residual = alloc_len - sizeof(*inq_ptr); - ctsio->kern_data_len = sizeof(*inq_ptr); - ctsio->kern_total_len = sizeof(*inq_ptr); + if (data_len < alloc_len) { + ctsio->residual = alloc_len - data_len; + ctsio->kern_data_len = data_len; + ctsio->kern_total_len = data_len; } else { ctsio->residual = 0; ctsio->kern_data_len = alloc_len; @@ -10595,8 +10596,7 @@ ctl_inquiry_std(struct ctl_scsiio *ctsio */ inq_ptr->response_format = SID_HiSup | 2; - inq_ptr->additional_length = - offsetof(struct scsi_inquiry_data, vendor_specific1) - + inq_ptr->additional_length = data_len - (offsetof(struct scsi_inquiry_data, additional_length) + 1); CTL_DEBUG_PRINT(("additional_length = %d\n", inq_ptr->additional_length)); From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 13:34:13 2014 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 D63F385A; Mon, 6 Oct 2014 13:34: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 A72D1C33; Mon, 6 Oct 2014 13:34: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 s96DYDQH087651; Mon, 6 Oct 2014 13:34:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96DYDuh087650; Mon, 6 Oct 2014 13:34:13 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061334.s96DYDuh087650@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 13:34: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: r272647 - 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.18-1 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, 06 Oct 2014 13:34:14 -0000 Author: mav Date: Mon Oct 6 13:34:12 2014 New Revision: 272647 URL: https://svnweb.freebsd.org/changeset/base/272647 Log: MFC r272355: Fix couple issues with ROD tokens content. Modified: stable/10/sys/cam/ctl/ctl_tpc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_tpc.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 6 13:33:22 2014 (r272646) +++ stable/10/sys/cam/ctl/ctl_tpc.c Mon Oct 6 13:34:12 2014 (r272647) @@ -1812,6 +1812,7 @@ tpc_create_token(struct ctl_lun *lun, st static int id = 0; struct scsi_vpd_id_descriptor *idd = NULL; struct scsi_ec_cscd_id *cscd; + struct scsi_read_capacity_data_long *dtsd; int targid_len; scsi_ulto4b(ROD_TYPE_AUR, token->type); @@ -1830,9 +1831,19 @@ tpc_create_token(struct ctl_lun *lun, st cscd->type_code = EC_CSCD_ID; cscd->luidt_pdt = T_DIRECT; memcpy(&cscd->codeset, idd, 4 + idd->length); + scsi_ulto3b(lun->be_lun->blocksize, cscd->dtsp.block_length); } - scsi_u64to8b(0, &token->body[40]); + scsi_u64to8b(0, &token->body[40]); /* XXX: Should be 128bit value. */ scsi_u64to8b(len, &token->body[48]); + + /* ROD token device type specific data (RC16 without first field) */ + dtsd = (struct scsi_read_capacity_data_long *)&token->body[88 - 8]; + scsi_ulto4b(lun->be_lun->blocksize, dtsd->length); + dtsd->prot_lbppbe = lun->be_lun->pblockexp & SRC16_LBPPBE; + scsi_ulto2b(lun->be_lun->pblockoff & SRC16_LALBA_A, dtsd->lalba_lbp); + if (lun->be_lun->flags & CTL_LUN_FLAG_UNMAP) + dtsd->lalba_lbp[0] |= SRC16_LBPME | SRC16_LBPRZ; + if (port->target_devid) { targid_len = port->target_devid->len; memcpy(&token->body[120], port->target_devid->data, targid_len); @@ -1938,6 +1949,8 @@ ctl_populate_token(struct ctl_scsiio *ct token->range = &data->desc[0]; token->nrange = scsi_2btoul(data->range_descriptor_length) / sizeof(struct scsi_range_desc); + list->cursectors = tpc_ranges_length(token->range, token->nrange); + list->curbytes = (off_t)list->cursectors * lun->be_lun->blocksize; tpc_create_token(lun, port, list->curbytes, (struct scsi_token *)token->token); token->active = 0; @@ -1954,8 +1967,6 @@ ctl_populate_token(struct ctl_scsiio *ct } memcpy(list->res_token, token->token, sizeof(list->res_token)); list->res_token_valid = 1; - list->cursectors = tpc_ranges_length(token->range, token->nrange); - list->curbytes = (off_t)list->cursectors * lun->be_lun->blocksize; list->curseg = 0; list->completed = 1; list->last_active = time_uptime; From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 14:39:46 2014 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 B171D47D; Mon, 6 Oct 2014 14:39: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 9C7F33B0; Mon, 6 Oct 2014 14:39: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 s96EdkrD018854; Mon, 6 Oct 2014 14:39:46 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96Edk3f018853; Mon, 6 Oct 2014 14:39:46 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201410061439.s96Edk3f018853@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Mon, 6 Oct 2014 14:39: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: r272648 - stable/10/sys/modules/netmap 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.18-1 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, 06 Oct 2014 14:39:46 -0000 Author: luigi Date: Mon Oct 6 14:39:45 2014 New Revision: 272648 URL: https://svnweb.freebsd.org/changeset/base/272648 Log: MFC r272108: add missing file for building netmap as a module Modified: stable/10/sys/modules/netmap/Makefile Modified: stable/10/sys/modules/netmap/Makefile ============================================================================== --- stable/10/sys/modules/netmap/Makefile Mon Oct 6 13:34:12 2014 (r272647) +++ stable/10/sys/modules/netmap/Makefile Mon Oct 6 14:39:45 2014 (r272648) @@ -16,5 +16,6 @@ SRCS += netmap_vale.c SRCS += netmap_freebsd.c SRCS += netmap_offloadings.c SRCS += netmap_pipe.c +SRCS += netmap_monitor.c .include From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 15:11:09 2014 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 6490F77C; Mon, 6 Oct 2014 15:11: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 35E05A62; Mon, 6 Oct 2014 15:11: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 s96FB926036730; Mon, 6 Oct 2014 15:11:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96FB9b5036729; Mon, 6 Oct 2014 15:11:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061511.s96FB9b5036729@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 15:11:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272654 - stable/10/sys/dev/iscsi_initiator 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.18-1 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, 06 Oct 2014 15:11:09 -0000 Author: mav Date: Mon Oct 6 15:11:08 2014 New Revision: 272654 URL: https://svnweb.freebsd.org/changeset/base/272654 Log: MFC r272308: Fix old iSCSI initiator to work with new CAM locking. This switches code to using xpt_rescan() routine, irrelevant to locking. Using xpt_action() directly requires knowledge about higher level locks, that SIM does not need to have. This code is obsolete, but that is not a reason to crash. Modified: stable/10/sys/dev/iscsi_initiator/isc_cam.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi_initiator/isc_cam.c ============================================================================== --- stable/10/sys/dev/iscsi_initiator/isc_cam.c Mon Oct 6 15:03:08 2014 (r272653) +++ stable/10/sys/dev/iscsi_initiator/isc_cam.c Mon Oct 6 15:11:08 2014 (r272654) @@ -125,7 +125,7 @@ scan_callback(struct cam_periph *periph, debug_called(8); - free(ccb, M_TEMP); + xpt_free_ccb(ccb); if(sp->flags & ISC_SCANWAIT) { sp->flags &= ~ISC_SCANWAIT; @@ -141,30 +141,15 @@ ic_scan(isc_session_t *sp) debug_called(8); sdebug(2, "scanning sid=%d", sp->sid); - if((ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO)) == NULL) { - xdebug("scan failed (can't allocate CCB)"); - return ENOMEM; // XXX - } - sp->flags &= ~ISC_CAMDEVS; sp->flags |= ISC_SCANWAIT; - CAM_LOCK(sp); - if(xpt_create_path(&sp->cam_path, NULL, cam_sim_path(sp->cam_sim), - 0, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - xdebug("can't create cam path"); - CAM_UNLOCK(sp); - free(ccb, M_TEMP); - return ENODEV; // XXX - } - xpt_setup_ccb(&ccb->ccb_h, sp->cam_path, 5/*priority (low)*/); - ccb->ccb_h.func_code = XPT_SCAN_BUS; + ccb = xpt_alloc_ccb(); + ccb->ccb_h.path = sp->cam_path; ccb->ccb_h.cbfcnp = scan_callback; - ccb->crcn.flags = CAM_FLAG_NONE; ccb->ccb_h.spriv_ptr0 = sp; - xpt_action(ccb); - CAM_UNLOCK(sp); + xpt_rescan(ccb); while(sp->flags & ISC_SCANWAIT) tsleep(sp, PRIBIO, "ffp", 5*hz); // the timeout time should @@ -374,6 +359,16 @@ ic_init(isc_session_t *sp) return ENXIO; } sp->cam_sim = sim; + if(xpt_create_path(&sp->cam_path, NULL, cam_sim_path(sp->cam_sim), + CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { + xpt_bus_deregister(cam_sim_path(sp->cam_sim)); + cam_sim_free(sim, /*free_devq*/TRUE); + CAM_UNLOCK(sp); +#if __FreeBSD_version >= 700000 + mtx_destroy(&sp->cam_mtx); +#endif + return ENXIO; + } CAM_UNLOCK(sp); sdebug(1, "cam subsystem initialized"); From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 15:23:13 2014 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 6AD33C53; Mon, 6 Oct 2014 15:23: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 3C366B9E; Mon, 6 Oct 2014 15:23: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 s96FNDTb042996; Mon, 6 Oct 2014 15:23:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96FNDUJ042995; Mon, 6 Oct 2014 15:23:13 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061523.s96FNDUJ042995@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 15:23: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: r272656 - stable/10/sys/cam/scsi 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.18-1 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, 06 Oct 2014 15:23:13 -0000 Author: mav Date: Mon Oct 6 15:23:12 2014 New Revision: 272656 URL: https://svnweb.freebsd.org/changeset/base/272656 Log: MFC r269469: Do not retry token errors. They are not going to disappear by themselves. Modified: stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Mon Oct 6 15:12:59 2014 (r272655) +++ stable/10/sys/cam/scsi/scsi_all.c Mon Oct 6 15:23:12 2014 (r272656) @@ -1592,37 +1592,37 @@ static struct asc_table_entry asc_table[ { SST(0x22, 0x00, SS_FATAL | EINVAL, "Illegal function (use 20 00, 24 00, or 26 00)") }, /* DT P B */ - { SST(0x23, 0x00, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x00, SS_FATAL | EINVAL, "Invalid token operation, cause not reportable") }, /* DT P B */ - { SST(0x23, 0x01, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x01, SS_FATAL | EINVAL, "Invalid token operation, unsupported token type") }, /* DT P B */ - { SST(0x23, 0x02, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x02, SS_FATAL | EINVAL, "Invalid token operation, remote token usage not supported") }, /* DT P B */ - { SST(0x23, 0x03, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x03, SS_FATAL | EINVAL, "Invalid token operation, remote ROD token creation not supported") }, /* DT P B */ - { SST(0x23, 0x04, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x04, SS_FATAL | EINVAL, "Invalid token operation, token unknown") }, /* DT P B */ - { SST(0x23, 0x05, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x05, SS_FATAL | EINVAL, "Invalid token operation, token corrupt") }, /* DT P B */ - { SST(0x23, 0x06, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x06, SS_FATAL | EINVAL, "Invalid token operation, token revoked") }, /* DT P B */ - { SST(0x23, 0x07, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x07, SS_FATAL | EINVAL, "Invalid token operation, token expired") }, /* DT P B */ - { SST(0x23, 0x08, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x08, SS_FATAL | EINVAL, "Invalid token operation, token cancelled") }, /* DT P B */ - { SST(0x23, 0x09, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x09, SS_FATAL | EINVAL, "Invalid token operation, token deleted") }, /* DT P B */ - { SST(0x23, 0x0A, SS_RDEF, /* XXX TBD */ + { SST(0x23, 0x0A, SS_FATAL | EINVAL, "Invalid token operation, invalid token length") }, /* DTLPWROMAEBKVF */ { SST(0x24, 0x00, SS_FATAL | EINVAL, From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 15:24:05 2014 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 3D0C7D90; Mon, 6 Oct 2014 15:24: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 0EC1ABAB; Mon, 6 Oct 2014 15:24: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 s96FO4We043184; Mon, 6 Oct 2014 15:24:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96FO4aL043183; Mon, 6 Oct 2014 15:24:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410061524.s96FO4aL043183@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Oct 2014 15:24: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: r272657 - stable/10/sys/cam/scsi 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.18-1 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, 06 Oct 2014 15:24:05 -0000 Author: mav Date: Mon Oct 6 15:24:04 2014 New Revision: 272657 URL: https://svnweb.freebsd.org/changeset/base/272657 Log: MFC r269472: Do not retry on set of non-transient XCOPY errors. Modified: stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Mon Oct 6 15:23:12 2014 (r272656) +++ stable/10/sys/cam/scsi/scsi_all.c Mon Oct 6 15:24:04 2014 (r272657) @@ -1673,28 +1673,28 @@ static struct asc_table_entry asc_table[ { SST(0x26, 0x05, SS_RDEF, /* XXX TBD */ "Data decryption error") }, /* DTLPWRO K */ - { SST(0x26, 0x06, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x06, SS_FATAL | EINVAL, "Too many target descriptors") }, /* DTLPWRO K */ - { SST(0x26, 0x07, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x07, SS_FATAL | EINVAL, "Unsupported target descriptor type code") }, /* DTLPWRO K */ - { SST(0x26, 0x08, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x08, SS_FATAL | EINVAL, "Too many segment descriptors") }, /* DTLPWRO K */ - { SST(0x26, 0x09, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x09, SS_FATAL | EINVAL, "Unsupported segment descriptor type code") }, /* DTLPWRO K */ - { SST(0x26, 0x0A, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x0A, SS_FATAL | EINVAL, "Unexpected inexact segment") }, /* DTLPWRO K */ - { SST(0x26, 0x0B, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x0B, SS_FATAL | EINVAL, "Inline data length exceeded") }, /* DTLPWRO K */ - { SST(0x26, 0x0C, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x0C, SS_FATAL | EINVAL, "Invalid operation for copy source or destination") }, /* DTLPWRO K */ - { SST(0x26, 0x0D, SS_RDEF, /* XXX TBD */ + { SST(0x26, 0x0D, SS_FATAL | EINVAL, "Copy segment granularity violation") }, /* DT PWROMAEBK */ { SST(0x26, 0x0E, SS_RDEF, /* XXX TBD */ From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 16:59:26 2014 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 5465AD9F; Mon, 6 Oct 2014 16:59: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 4021D950; Mon, 6 Oct 2014 16:59: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 s96GxQ5p086571; Mon, 6 Oct 2014 16:59:26 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96GxQqD086570; Mon, 6 Oct 2014 16:59:26 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410061659.s96GxQqD086570@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 6 Oct 2014 16:59: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: r272660 - 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.18-1 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, 06 Oct 2014 16:59:26 -0000 Author: tuexen Date: Mon Oct 6 16:59:25 2014 New Revision: 272660 URL: https://svnweb.freebsd.org/changeset/base/272660 Log: MFC r272326: UDPLite requires a checksum. Therefore, discard a received packet if the checksum is 0. Modified: stable/10/sys/netinet/udp_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/udp_usrreq.c ============================================================================== --- stable/10/sys/netinet/udp_usrreq.c Mon Oct 6 15:48:28 2014 (r272659) +++ stable/10/sys/netinet/udp_usrreq.c Mon Oct 6 16:59:25 2014 (r272660) @@ -488,8 +488,16 @@ udp_input(struct mbuf *m, int off) m_freem(m); return; } - } else - UDPSTAT_INC(udps_nosum); + } else { + if (pr == IPPROTO_UDP) { + UDPSTAT_INC(udps_nosum); + } else { + /* UDPLite requires a checksum */ + /* XXX: What is the right UDPLite MIB counter here? */ + m_freem(m); + return; + } + } pcbinfo = get_inpcbinfo(pr); if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) || From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 17:04:28 2014 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 1D86911B; Mon, 6 Oct 2014 17:04:28 +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 08BD0A22; Mon, 6 Oct 2014 17:04:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s96H4R2s090902; Mon, 6 Oct 2014 17:04:27 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96H4RD1090895; Mon, 6 Oct 2014 17:04:27 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410061704.s96H4RD1090895@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 6 Oct 2014 17:04: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: r272661 - in stable/10: share/man/man4 sys/netinet 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.18-1 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, 06 Oct 2014 17:04:28 -0000 Author: tuexen Date: Mon Oct 6 17:04:26 2014 New Revision: 272661 URL: https://svnweb.freebsd.org/changeset/base/272661 Log: MFC r272347: The default for UDPLITE_RECV_CSCOV is zero. RFC 3828 recommend that this means full checksum coverage for received packets. If an application is willing to accept packets with partial coverage, it is expected to use the socket option and provide the minimum coverage it accepts. Modified: stable/10/share/man/man4/udplite.4 stable/10/sys/netinet/udp_usrreq.c stable/10/sys/netinet6/udp6_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/udplite.4 ============================================================================== --- stable/10/share/man/man4/udplite.4 Mon Oct 6 16:59:25 2014 (r272660) +++ stable/10/share/man/man4/udplite.4 Mon Oct 6 17:04:26 2014 (r272661) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 7, 2014 +.Dd October 1, 2014 .Dt UDPLITE 4 .Os .Sh NAME @@ -55,16 +55,16 @@ and tested with .Bl -tag -width ".Dv UDPLITE_SEND_CSCOV" .It Dv UDPLITE_SEND_CSCOV This option sets the sender checksum coverage. -A value of zero indicates that the entire packet -is covered by the checksum. -A value of 1 to 7 must be discarded by the receiver. +A value of zero indicates that all sent packets will have +full checksum coverage. +A value of 8 to 65535 limits the checksum coverage of all sent packets +to the value given. .It Dv UDPLITE_RECV_CSCOV This option is the receiver-side analogue. -It is truly optional, i.e. not required to enable traffic -with partial checksum coverage. -Its function is that of a traffic filter: -when enabled, it instructs the kernel to drop -all packets which have a coverage less than this value. +A value of zero instructs the kernel to drop all received packets +not having full checksum coverage. +A value of 8 to 65535 instructs the kernel to drop all received +packets with a partial checksum coverage smaller than the value specified. .El .Sh ERRORS A socket operation may fail with one of the following errors returned: Modified: stable/10/sys/netinet/udp_usrreq.c ============================================================================== --- stable/10/sys/netinet/udp_usrreq.c Mon Oct 6 16:59:25 2014 (r272660) +++ stable/10/sys/netinet/udp_usrreq.c Mon Oct 6 17:04:26 2014 (r272661) @@ -679,7 +679,7 @@ udp_input(struct mbuf *m, int off) struct udpcb *up; up = intoudpcb(inp); - if (up->u_rxcslen > len) { + if (up->u_rxcslen == 0 || up->u_rxcslen > len) { INP_RUNLOCK(inp); m_freem(m); return; Modified: stable/10/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 16:59:25 2014 (r272660) +++ stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 17:04:26 2014 (r272661) @@ -259,7 +259,7 @@ udp6_input(struct mbuf **mp, int *offp, if (uh_sum != 0) { UDPSTAT_INC(udps_badsum); - goto badunlocked; + /*goto badunlocked;*/ } /* @@ -479,7 +479,7 @@ udp6_input(struct mbuf **mp, int *offp, INP_RLOCK_ASSERT(inp); up = intoudpcb(inp); if (cscov_partial) { - if (up->u_rxcslen > ulen) { + if (up->u_rxcslen == 0 || up->u_rxcslen > ulen) { INP_RUNLOCK(inp); m_freem(m); return (IPPROTO_DONE); From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 17:08:20 2014 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 E67333F7; Mon, 6 Oct 2014 17:08: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 C71E5A71; Mon, 6 Oct 2014 17:08: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 s96H8K1C091585; Mon, 6 Oct 2014 17:08:20 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96H8K18091582; Mon, 6 Oct 2014 17:08:20 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410061708.s96H8K18091582@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 6 Oct 2014 17:08: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: r272662 - 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.18-1 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, 06 Oct 2014 17:08:21 -0000 Author: tuexen Date: Mon Oct 6 17:08:19 2014 New Revision: 272662 URL: https://svnweb.freebsd.org/changeset/base/272662 Log: MFC r272404: Fix the checksum computation for UDPLite/IPv6. This requires the usage of a function computing the checksum only over a part of the function. Therefore introduce in6_cksum_partial() and implement in6_cksum() based on that. While there, ensure that the UDPLite packet contains at least enough bytes to contain the header. Modified: stable/10/sys/netinet6/in6.h stable/10/sys/netinet6/in6_cksum.c stable/10/sys/netinet6/udp6_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6.h ============================================================================== --- stable/10/sys/netinet6/in6.h Mon Oct 6 17:04:26 2014 (r272661) +++ stable/10/sys/netinet6/in6.h Mon Oct 6 17:08:19 2014 (r272662) @@ -641,6 +641,8 @@ struct ip6_hdr; int in6_cksum_pseudo(struct ip6_hdr *, uint32_t, uint8_t, uint16_t); int in6_cksum(struct mbuf *, u_int8_t, u_int32_t, u_int32_t); +int in6_cksum_partial(struct mbuf *, u_int8_t, u_int32_t, u_int32_t, + u_int32_t); int in6_localaddr(struct in6_addr *); int in6_localip(struct in6_addr *); int in6_addrscope(struct in6_addr *); Modified: stable/10/sys/netinet6/in6_cksum.c ============================================================================== --- stable/10/sys/netinet6/in6_cksum.c Mon Oct 6 17:04:26 2014 (r272661) +++ stable/10/sys/netinet6/in6_cksum.c Mon Oct 6 17:08:19 2014 (r272662) @@ -145,9 +145,11 @@ in6_cksum_pseudo(struct ip6_hdr *ip6, ui * off is an offset where TCP/UDP/ICMP6 header starts. * len is a total length of a transport segment. * (e.g. TCP header + TCP payload) + * cov is the number of bytes to be taken into account for the checksum */ int -in6_cksum(struct mbuf *m, u_int8_t nxt, u_int32_t off, u_int32_t len) +in6_cksum_partial(struct mbuf *m, u_int8_t nxt, u_int32_t off, + u_int32_t len, u_int32_t cov) { struct ip6_hdr *ip6; u_int16_t *w, scope; @@ -215,9 +217,9 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, } w = (u_int16_t *)(mtod(m, u_char *) + off); mlen = m->m_len - off; - if (len < mlen) - mlen = len; - len -= mlen; + if (cov < mlen) + mlen = cov; + cov -= mlen; /* * Force to even boundary. */ @@ -273,7 +275,7 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, * Lastly calculate a summary of the rest of mbufs. */ - for (;m && len; m = m->m_next) { + for (;m && cov; m = m->m_next) { if (m->m_len == 0) continue; w = mtod(m, u_int16_t *); @@ -290,12 +292,12 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, sum += s_util.s; w = (u_int16_t *)((char *)w + 1); mlen = m->m_len - 1; - len--; + cov--; } else mlen = m->m_len; - if (len < mlen) - mlen = len; - len -= mlen; + if (cov < mlen) + mlen = cov; + cov -= mlen; /* * Force to even boundary. */ @@ -343,7 +345,7 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, } else if (mlen == -1) s_util.c[0] = *(char *)w; } - if (len) + if (cov) panic("in6_cksum: out of data"); if (mlen == -1) { /* The last mbuf has odd # of bytes. Follow the @@ -355,3 +357,9 @@ in6_cksum(struct mbuf *m, u_int8_t nxt, REDUCE; return (~sum & 0xffff); } + +int +in6_cksum(struct mbuf *m, u_int8_t nxt, u_int32_t off, u_int32_t len) +{ + return (in6_cksum_partial(m, nxt, off, len, len)); +} Modified: stable/10/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 17:04:26 2014 (r272661) +++ stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 17:08:19 2014 (r272662) @@ -225,11 +225,16 @@ udp6_input(struct mbuf **mp, int *offp, nxt = ip6->ip6_nxt; cscov_partial = (nxt == IPPROTO_UDPLITE) ? 1 : 0; - if (nxt == IPPROTO_UDPLITE && (ulen == 0 || ulen == plen)) { + if (nxt == IPPROTO_UDPLITE) { /* Zero means checksum over the complete packet. */ if (ulen == 0) ulen = plen; - cscov_partial = 0; + if (ulen == plen) + cscov_partial = 0; + if ((ulen < sizeof(struct udphdr)) || (ulen > plen)) { + /* XXX: What is the right UDPLite MIB counter? */ + goto badunlocked; + } } if (nxt == IPPROTO_UDP && plen != ulen) { UDPSTAT_INC(udps_badlen); @@ -255,7 +260,7 @@ udp6_input(struct mbuf **mp, int *offp, m->m_pkthdr.csum_data); uh_sum ^= 0xffff; } else - uh_sum = in6_cksum(m, nxt, off, ulen); + uh_sum = in6_cksum_partial(m, nxt, off, plen, ulen); if (uh_sum != 0) { UDPSTAT_INC(udps_badsum); @@ -842,8 +847,8 @@ udp6_output(struct inpcb *inp, struct mb ip6->ip6_dst = *faddr; if (cscov_partial) { - if ((udp6->uh_sum = in6_cksum(m, 0, - sizeof(struct ip6_hdr), cscov)) == 0) + if ((udp6->uh_sum = in6_cksum_partial(m, nxt, + sizeof(struct ip6_hdr), plen, cscov)) == 0) udp6->uh_sum = 0xffff; } else { udp6->uh_sum = in6_cksum_pseudo(ip6, plen, nxt, 0); From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 17:12:04 2014 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 9C61661C; Mon, 6 Oct 2014 17:12: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 87F47B7F; Mon, 6 Oct 2014 17:12: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 s96HC4A7095642; Mon, 6 Oct 2014 17:12:04 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96HC4ej095641; Mon, 6 Oct 2014 17:12:04 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410061712.s96HC4ej095641@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 6 Oct 2014 17:12: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: r272663 - 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.18-1 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, 06 Oct 2014 17:12:04 -0000 Author: tuexen Date: Mon Oct 6 17:12:03 2014 New Revision: 272663 URL: https://svnweb.freebsd.org/changeset/base/272663 Log: MFC r272408: Check for UDP/IPv6 packets that the length in the UDP header is at least the minimum. Make the check similar to the one for UDPLite/IPv6. Modified: stable/10/sys/netinet6/udp6_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 17:08:19 2014 (r272662) +++ stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 17:12:03 2014 (r272663) @@ -235,18 +235,9 @@ udp6_input(struct mbuf **mp, int *offp, /* XXX: What is the right UDPLite MIB counter? */ goto badunlocked; } - } - if (nxt == IPPROTO_UDP && plen != ulen) { - UDPSTAT_INC(udps_badlen); - goto badunlocked; - } - - /* - * Checksum extended UDP header and data. - */ - if (uh->uh_sum == 0) { - if (ulen > plen || ulen < sizeof(struct udphdr)) { - UDPSTAT_INC(udps_nosum); + } else { + if ((ulen < sizeof(struct udphdr)) || (plen != ulen)) { + UDPSTAT_INC(udps_badlen); goto badunlocked; } } From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 17:14:32 2014 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 EF8D177C; Mon, 6 Oct 2014 17:14: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 DBC6BB97; Mon, 6 Oct 2014 17:14: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 s96HEVPq095989; Mon, 6 Oct 2014 17:14:31 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96HEVww095988; Mon, 6 Oct 2014 17:14:31 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410061714.s96HEVww095988@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 6 Oct 2014 17:14:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272664 - 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.18-1 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, 06 Oct 2014 17:14:32 -0000 Author: tuexen Date: Mon Oct 6 17:14:31 2014 New Revision: 272664 URL: https://svnweb.freebsd.org/changeset/base/272664 Log: MFC r272469: UDP/IPv6 and UDPLite/IPv6 require a checksum. So check for it. Modified: stable/10/sys/netinet6/udp6_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 17:12:03 2014 (r272663) +++ stable/10/sys/netinet6/udp6_usrreq.c Mon Oct 6 17:14:31 2014 (r272664) @@ -235,11 +235,19 @@ udp6_input(struct mbuf **mp, int *offp, /* XXX: What is the right UDPLite MIB counter? */ goto badunlocked; } + if (uh->uh_sum == 0) { + /* XXX: What is the right UDPLite MIB counter? */ + goto badunlocked; + } } else { if ((ulen < sizeof(struct udphdr)) || (plen != ulen)) { UDPSTAT_INC(udps_badlen); goto badunlocked; } + if (uh->uh_sum == 0) { + UDPSTAT_INC(udps_nosum); + goto badunlocked; + } } if ((m->m_pkthdr.csum_flags & CSUM_DATA_VALID_IPV6) && From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 17:27:50 2014 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 B934DAA9; Mon, 6 Oct 2014 17:27: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 8A854CD9; Mon, 6 Oct 2014 17:27: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 s96HRosP001230; Mon, 6 Oct 2014 17:27:50 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96HRoMP001229; Mon, 6 Oct 2014 17:27:50 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201410061727.s96HRoMP001229@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 6 Oct 2014 17:27: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: r272665 - 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.18-1 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, 06 Oct 2014 17:27:50 -0000 Author: delphij Date: Mon Oct 6 17:27:49 2014 New Revision: 272665 URL: https://svnweb.freebsd.org/changeset/base/272665 Log: MFC r271532: MFV r271515: Add a new tunable/sysctl, vfs.zfs.free_max_blocks, which can be used to limit how many blocks can be free'ed before a new transaction group is created. The default is no limit (infinite), but we should probably have a lower default, e.g. 100,000. With this limit, we can guard against the case where ZFS could run out of memory when destroying large numbers of blocks in a single transaction group, as the entire DDT needs to be brought into memory. Illumos issue: 5138 add tunable for maximum number of blocks freed in one txg Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Mon Oct 6 17:14:31 2014 (r272664) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Mon Oct 6 17:27:49 2014 (r272665) @@ -99,6 +99,11 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, no_scrub_ &zfs_no_scrub_prefetch, 0, "Disable scrub prefetching"); enum ddt_class zfs_scrub_ddt_class_max = DDT_CLASS_DUPLICATE; +/* max number of blocks to free in a single TXG */ +uint64_t zfs_free_max_blocks = UINT64_MAX; +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, free_max_blocks, CTLFLAG_RWTUN, + &zfs_free_max_blocks, 0, "Maximum number of blocks to free in one TXG"); + #define DSL_SCAN_IS_SCRUB_RESILVER(scn) \ ((scn)->scn_phys.scn_func == POOL_SCAN_SCRUB || \ @@ -1350,6 +1355,9 @@ dsl_scan_free_should_pause(dsl_scan_t *s if (zfs_recover) return (B_FALSE); + if (scn->scn_visited_this_txg >= zfs_free_max_blocks) + return (B_TRUE); + elapsed_nanosecs = gethrtime() - scn->scn_sync_start_time; return (elapsed_nanosecs / NANOSEC > zfs_txg_timeout || (NSEC2MSEC(elapsed_nanosecs) > zfs_free_min_time_ms && From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 18:15:15 2014 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 2AC4FA04; Mon, 6 Oct 2014 18:15: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 F10C1268; Mon, 6 Oct 2014 18:15: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 s96IFELo025410; Mon, 6 Oct 2014 18:15:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96IFEUd025408; Mon, 6 Oct 2014 18:15:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410061815.s96IFEUd025408@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 6 Oct 2014 18:15:14 +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: r272667 - in stable/9/sys: amd64/amd64 i386/i386 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.18-1 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, 06 Oct 2014 18:15:15 -0000 Author: kib Date: Mon Oct 6 18:15:13 2014 New Revision: 272667 URL: https://svnweb.freebsd.org/changeset/base/272667 Log: Account for the mapped pages in the kernel_pmap on x86 in pmap_mapdev(). The pmap_unmapdev() on stable/9 calls pmap_remove() to clear the range, which decrements kernel_pmap.pm_stats.resident_count. Misaccounting causes miscellaneous failures, since pmap_remove() tests the counter for zero and does nothing. This is direct commit to stable/9, since HEAD and stable/10 use vmem and do not utilize pmap_remove() etc. Based on the submission by: Kohji Okuno Modified: stable/9/sys/amd64/amd64/pmap.c stable/9/sys/i386/i386/pmap.c Modified: stable/9/sys/amd64/amd64/pmap.c ============================================================================== --- stable/9/sys/amd64/amd64/pmap.c Mon Oct 6 18:11:05 2014 (r272666) +++ stable/9/sys/amd64/amd64/pmap.c Mon Oct 6 18:15:13 2014 (r272667) @@ -5040,6 +5040,9 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_ pa = trunc_page(pa); for (tmpsize = 0; tmpsize < size; tmpsize += PAGE_SIZE) pmap_kenter_attr(va + tmpsize, pa + tmpsize, mode); + PMAP_LOCK(kernel_pmap); + pmap_resident_count_inc(kernel_pmap, OFF_TO_IDX(size)); + PMAP_UNLOCK(kernel_pmap); pmap_invalidate_range(kernel_pmap, va, va + tmpsize); pmap_invalidate_cache_range(va, va + tmpsize); return ((void *)(va + offset)); Modified: stable/9/sys/i386/i386/pmap.c ============================================================================== --- stable/9/sys/i386/i386/pmap.c Mon Oct 6 18:11:05 2014 (r272666) +++ stable/9/sys/i386/i386/pmap.c Mon Oct 6 18:15:13 2014 (r272667) @@ -5066,10 +5066,14 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_ size = roundup(offset + size, PAGE_SIZE); pa = pa & PG_FRAME; - if (pa < KERNLOAD && pa + size <= KERNLOAD) + if (pa < KERNLOAD && pa + size <= KERNLOAD) { va = KERNBASE + pa; - else + } else { va = kmem_alloc_nofault(kernel_map, size); + PMAP_LOCK(kernel_pmap); + kernel_pmap->pm_stats.resident_count += OFF_TO_IDX(size); + PMAP_UNLOCK(kernel_pmap); + } if (!va) panic("pmap_mapdev: Couldn't alloc kernel virtual memory"); From owner-svn-src-stable@FreeBSD.ORG Mon Oct 6 23:17:02 2014 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 A2FCA419; Mon, 6 Oct 2014 23:17: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 8F729A70; Mon, 6 Oct 2014 23:17:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s96NH2Mi075380; Mon, 6 Oct 2014 23:17:02 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s96NH2au075379; Mon, 6 Oct 2014 23:17:02 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201410062317.s96NH2au075379@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 6 Oct 2014 23:17:02 +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: r272672 - 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.18-1 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, 06 Oct 2014 23:17:02 -0000 Author: asomers Date: Mon Oct 6 23:17:01 2014 New Revision: 272672 URL: https://svnweb.freebsd.org/changeset/base/272672 Log: MFC r265232 Fix a panic caused by doing "ifconfig -am" while a lagg is being destroyed. The thread that is destroying the lagg has already set sc->sc_psc=NULL when the "ifconfig -am" thread gets to lacp_req(). It tries to dereference sc->sc_psc and panics. The solution is for lacp_req() to check the value of sc->sc_psc. If NULL, harmlessly return an lacp_opreq structure full of zeros. Full details in GNATS. PR: 189003 Modified: stable/10/sys/net/ieee8023ad_lacp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/10/sys/net/ieee8023ad_lacp.c Mon Oct 6 21:52:40 2014 (r272671) +++ stable/10/sys/net/ieee8023ad_lacp.c Mon Oct 6 23:17:01 2014 (r272672) @@ -591,10 +591,20 @@ lacp_req(struct lagg_softc *sc, caddr_t { struct lacp_opreq *req = (struct lacp_opreq *)data; struct lacp_softc *lsc = LACP_SOFTC(sc); - struct lacp_aggregator *la = lsc->lsc_active_aggregator; + struct lacp_aggregator *la; - LACP_LOCK(lsc); bzero(req, sizeof(struct lacp_opreq)); + + /* + * If the LACP softc is NULL, return with the opreq structure full of + * zeros. It is normal for the softc to be NULL while the lagg is + * being destroyed. + */ + if (NULL == lsc) + return; + + la = lsc->lsc_active_aggregator; + LACP_LOCK(lsc); if (la != NULL) { req->actor_prio = ntohs(la->la_actor.lip_systemid.lsi_prio); memcpy(&req->actor_mac, &la->la_actor.lip_systemid.lsi_mac, From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 06:00:09 2014 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 E3E3064C; Tue, 7 Oct 2014 06:00: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 CEBDB8D1; Tue, 7 Oct 2014 06:00: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 s97609Ks066218; Tue, 7 Oct 2014 06:00:09 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s97609ng066217; Tue, 7 Oct 2014 06:00:09 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201410070600.s97609ng066217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 7 Oct 2014 06:00:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272676 - 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.18-1 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, 07 Oct 2014 06:00:10 -0000 Author: araujo (ports committer) Date: Tue Oct 7 06:00:09 2014 New Revision: 272676 URL: https://svnweb.freebsd.org/changeset/base/272676 Log: Make external NFS clients know when files have their attributes changed and avoid cache the file's state indefinitely. The va_filerev is what is sent to the client as the "change" attribute, the client is periodically fetching the attributes and without this option the attribute remains as some garbage value. Phabric: D905 Reported by: Kevin Buhr Reviewed by: rmacklem, delphij Approved by: delphij Obtained from: r272467 Sponsored by: QNAP Systems Inc. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 7 04:59:11 2014 (r272675) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 7 06:00:09 2014 (r272676) @@ -2827,6 +2827,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i #endif vap->va_seq = zp->z_seq; vap->va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */ + vap->va_filerev = zp->z_seq; /* * Add in any requested optional attributes and the create time. From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 06:00:33 2014 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 090CE786; Tue, 7 Oct 2014 06:00:33 +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 E837B8DA; Tue, 7 Oct 2014 06:00: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 s9760WWN066782; Tue, 7 Oct 2014 06:00:32 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9760WGl066781; Tue, 7 Oct 2014 06:00:32 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201410070600.s9760WGl066781@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Tue, 7 Oct 2014 06:00:32 +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: r272677 - 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.18-1 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, 07 Oct 2014 06:00:33 -0000 Author: araujo (ports committer) Date: Tue Oct 7 06:00:32 2014 New Revision: 272677 URL: https://svnweb.freebsd.org/changeset/base/272677 Log: Make external NFS clients know when files have their attributes changed and avoid cache the file's state indefinitely. The va_filerev is what is sent to the client as the "change" attribute, the client is periodically fetching the attributes and without this option the attribute remains as some garbage value. Phabric: D905 Reported by: Kevin Buhr Reviewed by: rmacklem, delphij Approved by: delphij Obtained from: r272467 Sponsored by: QNAP Systems Inc. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 7 06:00:09 2014 (r272676) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Tue Oct 7 06:00:32 2014 (r272677) @@ -2812,6 +2812,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i #endif vap->va_seq = zp->z_seq; vap->va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */ + vap->va_filerev = zp->z_seq; /* * Add in any requested optional attributes and the create time. From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 07:52:48 2014 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 096E1EDE; Tue, 7 Oct 2014 07:52:48 +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 E951D763; Tue, 7 Oct 2014 07:52: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 s977qlRV023142; Tue, 7 Oct 2014 07:52:47 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s977qljP023141; Tue, 7 Oct 2014 07:52:47 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201410070752.s977qljP023141@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 7 Oct 2014 07:52:47 +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: r272680 - 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.18-1 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, 07 Oct 2014 07:52:48 -0000 Author: ae Date: Tue Oct 7 07:52:47 2014 New Revision: 272680 URL: https://svnweb.freebsd.org/changeset/base/272680 Log: MFC r272176: Keep list of lagg ports sorted by if_index. Modified: stable/10/sys/net/if_lagg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_lagg.c ============================================================================== --- stable/10/sys/net/if_lagg.c Tue Oct 7 06:34:05 2014 (r272679) +++ stable/10/sys/net/if_lagg.c Tue Oct 7 07:52:47 2014 (r272680) @@ -565,7 +565,7 @@ static int lagg_port_create(struct lagg_softc *sc, struct ifnet *ifp) { struct lagg_softc *sc_ptr; - struct lagg_port *lp; + struct lagg_port *lp, *tlp; int error = 0; LAGG_WLOCK_ASSERT(sc); @@ -672,8 +672,18 @@ lagg_port_create(struct lagg_softc *sc, lagg_port_lladdr(lp, IF_LLADDR(sc->sc_ifp)); } - /* Insert into the list of ports */ - SLIST_INSERT_HEAD(&sc->sc_ports, lp, lp_entries); + /* Insert into the list of ports. Keep ports sorted by if_index. */ + SLIST_FOREACH(tlp, &sc->sc_ports, lp_entries) { + if (tlp->lp_ifp->if_index < ifp->if_index && ( + SLIST_NEXT(tlp, lp_entries) == NULL || + SLIST_NEXT(tlp, lp_entries)->lp_ifp->if_index < + ifp->if_index)) + break; + } + if (tlp != NULL) + SLIST_INSERT_AFTER(tlp, lp, lp_entries); + else + SLIST_INSERT_HEAD(&sc->sc_ports, lp, lp_entries); sc->sc_count++; /* Update lagg capabilities */ From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 08:19:22 2014 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 B06675BD; Tue, 7 Oct 2014 08:19: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 9C4A69BE; Tue, 7 Oct 2014 08:19: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 s978JMhD033930; Tue, 7 Oct 2014 08:19:22 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s978JMlw033929; Tue, 7 Oct 2014 08:19:22 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201410070819.s978JMlw033929@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 7 Oct 2014 08:19: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: r272681 - stable/9/sys/net 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.18-1 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, 07 Oct 2014 08:19:22 -0000 Author: ae Date: Tue Oct 7 08:19:21 2014 New Revision: 272681 URL: https://svnweb.freebsd.org/changeset/base/272681 Log: MFC r272176: Keep list of lagg ports sorted by if_index. Modified: stable/9/sys/net/if_lagg.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/if_lagg.c ============================================================================== --- stable/9/sys/net/if_lagg.c Tue Oct 7 07:52:47 2014 (r272680) +++ stable/9/sys/net/if_lagg.c Tue Oct 7 08:19:21 2014 (r272681) @@ -523,7 +523,7 @@ static int lagg_port_create(struct lagg_softc *sc, struct ifnet *ifp) { struct lagg_softc *sc_ptr; - struct lagg_port *lp; + struct lagg_port *lp, *tlp; int error = 0; LAGG_WLOCK_ASSERT(sc); @@ -630,8 +630,18 @@ lagg_port_create(struct lagg_softc *sc, lagg_port_lladdr(lp, IF_LLADDR(sc->sc_ifp)); } - /* Insert into the list of ports */ - SLIST_INSERT_HEAD(&sc->sc_ports, lp, lp_entries); + /* Insert into the list of ports. Keep ports sorted by if_index. */ + SLIST_FOREACH(tlp, &sc->sc_ports, lp_entries) { + if (tlp->lp_ifp->if_index < ifp->if_index && ( + SLIST_NEXT(tlp, lp_entries) == NULL || + SLIST_NEXT(tlp, lp_entries)->lp_ifp->if_index < + ifp->if_index)) + break; + } + if (tlp != NULL) + SLIST_INSERT_AFTER(tlp, lp, lp_entries); + else + SLIST_INSERT_HEAD(&sc->sc_ports, lp, lp_entries); sc->sc_count++; /* Update lagg capabilities */ From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 13:20:04 2014 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 D5F37E1; Tue, 7 Oct 2014 13:20: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 BCBBADC5; Tue, 7 Oct 2014 13:20: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 s97DK4RM082276; Tue, 7 Oct 2014 13:20:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s97DK4G4082275; Tue, 7 Oct 2014 13:20:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201410071320.s97DK4G4082275@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 7 Oct 2014 13:20: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: r272688 - stable/10/cddl/contrib/opensolaris/cmd/zpool 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.18-1 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, 07 Oct 2014 13:20:05 -0000 Author: avg Date: Tue Oct 7 13:20:04 2014 New Revision: 272688 URL: https://svnweb.freebsd.org/changeset/base/272688 Log: MFC r261892: zpool.8: fix typo in option description of labelclear command Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Tue Oct 7 13:18:28 2014 (r272687) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Tue Oct 7 13:20:04 2014 (r272688) @@ -1353,7 +1353,7 @@ The .Ar device must not be part of an active pool configuration. .Bl -tag -width indent -.It Fl v +.It Fl f Treat exported or foreign devices as inactive. .El .It Xo From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 13:20:29 2014 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 958D020F; Tue, 7 Oct 2014 13:20:29 +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 807C2DCA; Tue, 7 Oct 2014 13:20:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s97DKTlF083285; Tue, 7 Oct 2014 13:20:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s97DKTfH083284; Tue, 7 Oct 2014 13:20:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201410071320.s97DKTfH083284@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 7 Oct 2014 13:20:29 +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: r272689 - stable/9/cddl/contrib/opensolaris/cmd/zpool 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.18-1 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, 07 Oct 2014 13:20:29 -0000 Author: avg Date: Tue Oct 7 13:20:28 2014 New Revision: 272689 URL: https://svnweb.freebsd.org/changeset/base/272689 Log: MFC r261892: zpool.8: fix typo in option description of labelclear command Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Directory Properties: stable/9/cddl/contrib/opensolaris/cmd/zpool/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Tue Oct 7 13:20:04 2014 (r272688) +++ stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Tue Oct 7 13:20:28 2014 (r272689) @@ -1347,7 +1347,7 @@ The .Ar device must not be part of an active pool configuration. .Bl -tag -width indent -.It Fl v +.It Fl f Treat exported or foreign devices as inactive. .El .It Xo From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 13:23:53 2014 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 32AF4362; Tue, 7 Oct 2014 13:23: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 1E8ADE70; Tue, 7 Oct 2014 13:23: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 s97DNq22086234; Tue, 7 Oct 2014 13:23:52 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s97DNq1d086233; Tue, 7 Oct 2014 13:23:52 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201410071323.s97DNq1d086233@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 7 Oct 2014 13:23: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: r272690 - stable/10/cddl/contrib/opensolaris/cmd/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.18-1 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, 07 Oct 2014 13:23:53 -0000 Author: avg Date: Tue Oct 7 13:23:52 2014 New Revision: 272690 URL: https://svnweb.freebsd.org/changeset/base/272690 Log: MFC r261893: zfs.8: fix garbled options in a sample zfs send -R command line Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Oct 7 13:20:28 2014 (r272689) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Oct 7 13:23:52 2014 (r272690) @@ -2745,7 +2745,7 @@ option to verify the name the receive op Force a rollback of the file system to the most recent snapshot before performing the receive operation. If receiving an incremental replication stream (for example, one generated by -.Qq Nm Cm send Fl R Fi iI ) , +.Qq Nm Cm send Fl R Bro Fl i | Fl I Brc ) , destroy snapshots and file systems that do not exist on the sending side. .El .It Xo From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 13:24:08 2014 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 1F41A494; Tue, 7 Oct 2014 13:24: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 0A527E77; Tue, 7 Oct 2014 13:24: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 s97DO7bO086341; Tue, 7 Oct 2014 13:24:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s97DO7NJ086339; Tue, 7 Oct 2014 13:24:07 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201410071324.s97DO7NJ086339@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 7 Oct 2014 13:24:07 +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: r272691 - stable/9/cddl/contrib/opensolaris/cmd/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.18-1 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, 07 Oct 2014 13:24:08 -0000 Author: avg Date: Tue Oct 7 13:24:07 2014 New Revision: 272691 URL: https://svnweb.freebsd.org/changeset/base/272691 Log: MFC r261893: zfs.8: fix garbled options in a sample zfs send -R command line Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Directory Properties: stable/9/cddl/contrib/opensolaris/cmd/zfs/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Oct 7 13:23:52 2014 (r272690) +++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Tue Oct 7 13:24:07 2014 (r272691) @@ -2610,7 +2610,7 @@ option to verify the name the receive op Force a rollback of the file system to the most recent snapshot before performing the receive operation. If receiving an incremental replication stream (for example, one generated by -.Qq Nm Cm send Fl R Fi iI ) , +.Qq Nm Cm send Fl R Bro Fl i | Fl I Brc ) , destroy snapshots and file systems that do not exist on the sending side. .El .It Xo From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 13:30:16 2014 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 B31ED92F; Tue, 7 Oct 2014 13:30:16 +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 93EEDEDA; Tue, 7 Oct 2014 13:30: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 s97DUGaM087695; Tue, 7 Oct 2014 13:30:16 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s97DUFUO087692; Tue, 7 Oct 2014 13:30:15 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201410071330.s97DUFUO087692@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 7 Oct 2014 13:30:15 +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: r272693 - in stable/10/etc: . devd 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.18-1 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, 07 Oct 2014 13:30:16 -0000 Author: avg Date: Tue Oct 7 13:30:15 2014 New Revision: 272693 URL: https://svnweb.freebsd.org/changeset/base/272693 Log: MFC r261894: move devd rules for zfs events into a separate file ... and fix stale event types Added: stable/10/etc/devd/zfs.conf - copied unchanged from r261894, head/etc/devd/zfs.conf Modified: stable/10/etc/devd.conf stable/10/etc/devd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/devd.conf ============================================================================== --- stable/10/etc/devd.conf Tue Oct 7 13:25:59 2014 (r272692) +++ stable/10/etc/devd.conf Tue Oct 7 13:30:15 2014 (r272693) @@ -246,37 +246,6 @@ notify 10 { action "logger -p kern.emerg 'WARNING: system temperature too high, shutting down soon!'"; }; -# Sample ZFS problem reports handling. -notify 10 { - match "system" "ZFS"; - match "type" "zpool"; - action "logger -p kern.err 'ZFS: failed to load zpool $pool'"; -}; - -notify 10 { - match "system" "ZFS"; - match "type" "vdev"; - action "logger -p kern.err 'ZFS: vdev failure, zpool=$pool type=$type'"; -}; - -notify 10 { - match "system" "ZFS"; - match "type" "data"; - action "logger -p kern.warn 'ZFS: zpool I/O failure, zpool=$pool error=$zio_err'"; -}; - -notify 10 { - match "system" "ZFS"; - match "type" "io"; - action "logger -p kern.warn 'ZFS: vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'"; -}; - -notify 10 { - match "system" "ZFS"; - match "type" "checksum"; - action "logger -p kern.warn 'ZFS: checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'"; -}; - # User requested suspend, so perform preparation steps and then execute # the actual suspend process. notify 10 { Modified: stable/10/etc/devd/Makefile ============================================================================== --- stable/10/etc/devd/Makefile Tue Oct 7 13:25:59 2014 (r272692) +++ stable/10/etc/devd/Makefile Tue Oct 7 13:30:15 2014 (r272693) @@ -2,7 +2,7 @@ .include -FILES= uath.conf usb.conf +FILES= uath.conf usb.conf zfs.conf .if ${MACHINE} == "powerpc" FILES+= apple.conf Copied: stable/10/etc/devd/zfs.conf (from r261894, head/etc/devd/zfs.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/devd/zfs.conf Tue Oct 7 13:30:15 2014 (r272693, copy of r261894, head/etc/devd/zfs.conf) @@ -0,0 +1,77 @@ +# $FreeBSD$ +# +# Sample ZFS problem reports handling. + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.checksum"; + action "logger -p kern.warn -t ZFS 'checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.io"; + action "logger -p kern.warn -t ZFS 'vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.data"; + action "logger -p kern.warn -t ZFS 'pool I/O failure, zpool=$pool error=$zio_err'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.zpool"; + action "logger -p kern.err -t ZFS 'failed to load zpool $pool'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.vdev\..*"; + action "logger -p kern.err -t ZFS 'vdev problem, zpool=$pool path=$vdev_path type=$type'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.io_failure"; + action "logger -p kern.alert -t ZFS 'catastrophic pool I/O failure, zpool=$pool'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.probe_failure"; + action "logger -p kern.err -t ZFS 'vdev probe failure, zpool=$pool path=$vdev_path'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.log_replay"; + action "logger -p kern.err -t ZFS 'pool log replay failure, zpool=$pool'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.config_cache_write"; + action "logger -p kern.warn -t ZFS 'failed to write zpool.cache, zpool=$pool'"; +}; + + +notify 10 { + match "system" "ZFS"; + match "type" "resource.fs.zfs.removed"; + action "logger -p kern.notice -t ZFS 'vdev is removed, pool_guid=$pool_guid vdev_guid=$vdev_guid'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "resource.fs.zfs.autoreplace"; + action "logger -p kern.info -t ZFS 'autoreplace is configured for vdev, pool_guid=$pool_guid vdev_guid=$vdev_guid'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "resource.fs.zfs.statechange"; + action "logger -p kern.notice -t ZFS 'vdev state changed, pool_guid=$pool_guid vdev_guid=$vdev_guid'"; +}; + From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 13:30:43 2014 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 E5BBBA5E; Tue, 7 Oct 2014 13:30: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 C68E4EDF; Tue, 7 Oct 2014 13:30: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 s97DUhW3088261; Tue, 7 Oct 2014 13:30:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s97DUhB2088258; Tue, 7 Oct 2014 13:30:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201410071330.s97DUhB2088258@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 7 Oct 2014 13:30: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: r272694 - in stable/9/etc: . devd 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.18-1 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, 07 Oct 2014 13:30:44 -0000 Author: avg Date: Tue Oct 7 13:30:42 2014 New Revision: 272694 URL: https://svnweb.freebsd.org/changeset/base/272694 Log: MFC r261894: move devd rules for zfs events into a separate file ... and fix stale event types Added: stable/9/etc/devd/zfs.conf - copied unchanged from r261894, head/etc/devd/zfs.conf Modified: stable/9/etc/devd.conf stable/9/etc/devd/Makefile Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/devd.conf ============================================================================== --- stable/9/etc/devd.conf Tue Oct 7 13:30:15 2014 (r272693) +++ stable/9/etc/devd.conf Tue Oct 7 13:30:42 2014 (r272694) @@ -246,37 +246,6 @@ notify 10 { action "logger -p kern.emerg 'WARNING: system temperature too high, shutting down soon!'"; }; -# Sample ZFS problem reports handling. -notify 10 { - match "system" "ZFS"; - match "type" "zpool"; - action "logger -p kern.err 'ZFS: failed to load zpool $pool'"; -}; - -notify 10 { - match "system" "ZFS"; - match "type" "vdev"; - action "logger -p kern.err 'ZFS: vdev failure, zpool=$pool type=$type'"; -}; - -notify 10 { - match "system" "ZFS"; - match "type" "data"; - action "logger -p kern.warn 'ZFS: zpool I/O failure, zpool=$pool error=$zio_err'"; -}; - -notify 10 { - match "system" "ZFS"; - match "type" "io"; - action "logger -p kern.warn 'ZFS: vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'"; -}; - -notify 10 { - match "system" "ZFS"; - match "type" "checksum"; - action "logger -p kern.warn 'ZFS: checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'"; -}; - # User requested suspend, so perform preparation steps and then execute # the actual suspend process. notify 10 { Modified: stable/9/etc/devd/Makefile ============================================================================== --- stable/9/etc/devd/Makefile Tue Oct 7 13:30:15 2014 (r272693) +++ stable/9/etc/devd/Makefile Tue Oct 7 13:30:42 2014 (r272694) @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= uath.conf usb.conf +FILES= uath.conf usb.conf zfs.conf .if ${MACHINE} == "powerpc" FILES+= apple.conf Copied: stable/9/etc/devd/zfs.conf (from r261894, head/etc/devd/zfs.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/etc/devd/zfs.conf Tue Oct 7 13:30:42 2014 (r272694, copy of r261894, head/etc/devd/zfs.conf) @@ -0,0 +1,77 @@ +# $FreeBSD$ +# +# Sample ZFS problem reports handling. + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.checksum"; + action "logger -p kern.warn -t ZFS 'checksum mismatch, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.io"; + action "logger -p kern.warn -t ZFS 'vdev I/O failure, zpool=$pool path=$vdev_path offset=$zio_offset size=$zio_size error=$zio_err'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.data"; + action "logger -p kern.warn -t ZFS 'pool I/O failure, zpool=$pool error=$zio_err'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.zpool"; + action "logger -p kern.err -t ZFS 'failed to load zpool $pool'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.vdev\..*"; + action "logger -p kern.err -t ZFS 'vdev problem, zpool=$pool path=$vdev_path type=$type'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.io_failure"; + action "logger -p kern.alert -t ZFS 'catastrophic pool I/O failure, zpool=$pool'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.probe_failure"; + action "logger -p kern.err -t ZFS 'vdev probe failure, zpool=$pool path=$vdev_path'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.log_replay"; + action "logger -p kern.err -t ZFS 'pool log replay failure, zpool=$pool'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "fs.zfs.config_cache_write"; + action "logger -p kern.warn -t ZFS 'failed to write zpool.cache, zpool=$pool'"; +}; + + +notify 10 { + match "system" "ZFS"; + match "type" "resource.fs.zfs.removed"; + action "logger -p kern.notice -t ZFS 'vdev is removed, pool_guid=$pool_guid vdev_guid=$vdev_guid'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "resource.fs.zfs.autoreplace"; + action "logger -p kern.info -t ZFS 'autoreplace is configured for vdev, pool_guid=$pool_guid vdev_guid=$vdev_guid'"; +}; + +notify 10 { + match "system" "ZFS"; + match "type" "resource.fs.zfs.statechange"; + action "logger -p kern.notice -t ZFS 'vdev state changed, pool_guid=$pool_guid vdev_guid=$vdev_guid'"; +}; + From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 13:35:36 2014 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 E004EEB9; Tue, 7 Oct 2014 13:35: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 C992FFBF; Tue, 7 Oct 2014 13:35: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 s97DZajb092133; Tue, 7 Oct 2014 13:35:36 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s97DZZIs092121; Tue, 7 Oct 2014 13:35:35 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201410071335.s97DZZIs092121@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 7 Oct 2014 13:35: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: r272696 - in stable/10/sys/boot: common i386/gptzfsboot i386/zfsboot 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.18-1 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, 07 Oct 2014 13:35:37 -0000 Author: avg Date: Tue Oct 7 13:35:34 2014 New Revision: 272696 URL: https://svnweb.freebsd.org/changeset/base/272696 Log: MFC r271609: add gptzfsboot.8, zfsboot.8 and zfsloader.8 manual pages Added: stable/10/sys/boot/common/zfsloader.8 - copied unchanged from r271609, head/sys/boot/common/zfsloader.8 stable/10/sys/boot/i386/gptzfsboot/gptzfsboot.8 - copied unchanged from r271609, head/sys/boot/i386/gptzfsboot/gptzfsboot.8 stable/10/sys/boot/i386/zfsboot/zfsboot.8 - copied unchanged from r271609, head/sys/boot/i386/zfsboot/zfsboot.8 Modified: stable/10/sys/boot/common/Makefile.inc stable/10/sys/boot/i386/gptzfsboot/Makefile stable/10/sys/boot/i386/zfsboot/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/common/Makefile.inc ============================================================================== --- stable/10/sys/boot/common/Makefile.inc Tue Oct 7 13:31:04 2014 (r272695) +++ stable/10/sys/boot/common/Makefile.inc Tue Oct 7 13:35:34 2014 (r272696) @@ -73,3 +73,6 @@ CFLAGS+= -DBOOT_PROMPT_123 .endif MAN+= loader.8 +.if ${MK_ZFS} != "no" +MAN+= zfsloader.8 +.endif Copied: stable/10/sys/boot/common/zfsloader.8 (from r271609, head/sys/boot/common/zfsloader.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/common/zfsloader.8 Tue Oct 7 13:35:34 2014 (r272696, copy of r271609, head/sys/boot/common/zfsloader.8) @@ -0,0 +1,109 @@ +.\" Copyright (c) 2014 Andriy Gapon +.\" 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$ +.\" +.Dd September 15, 2014 +.Dt ZFSLOADER 8 +.Os +.Sh NAME +.Nm zfsloader +.Nd kernel bootstrapping final stage +.Sh DESCRIPTION +.Nm +is an extended variant of +.Xr loader 8 +with added support for booting from ZFS. +This document describes only differences from +.Xr loader 8 . +.Sh ZFS FEATURES +.Nm +supports the following format for specifying ZFS filesystems which +can be used wherever +.Xr loader 8 +refers to a device specification: +.Pp +.Ar zfs:pool/filesystem: +.Pp +where +.Pa pool/filesystem +is a ZFS filesystem name as described in +.Xr zfs 8 . +.Pp +If +.Pa /etc/fstab +does not have an entry for the root filesystem and +.Va vfs.root.mountfrom +is not set, but +.Va currdev +refers to a ZFS filesystem, then +.Nm +will instruct kernel to use that filesystem as the root filesystem. +.Sh ZFS COMMAND EXTENSIONS +.Bl -tag -width Ds -compact +.Pp +.It Ic lsdev Op Fl v +Lists ZFS pools in addition to disks and partitions. +Adding +.Fl v +shows more ZFS pool details in a format that resembles +.Nm zpool Cm status +output. +.Pp +.It Ic lszfs Ar filesystem +A ZFS extended command that can be used to explore the ZFS filesystem +hierarchy in a pool. +Lists the immediate children of the +.Ar filesystem . +The filesystem hierarchy is rooted at a filesystem with the same name +as the pool. +.El +.Sh FILES +.Bl -tag -width /boot/zfsloader -compact +.It Pa /boot/zfsloader +.Nm +itself. +.El +.Sh EXAMPLES +Set the default device used for loading a kernel from a ZFS filesystem: +.Pp +.Bd -literal -offset indent +set currdev=zfs:tank/ROOT/knowngood: +.Ed +.Pp +.Sh SEE ALSO +.Xr gptzfsboot 8 , +.Xr loader 8 , +.Xr zfs 8 , +.Xr zfsboot 8 , +.Xr zfsloader 8 , +.Xr zpool 8 +.Sh HISTORY +The +.Nm +first appeared in +.Fx 7.3 . +.Sh AUTHORS +This manual page was written by +.An Andriy Gapon Aq avg@FreeBSD.org . Modified: stable/10/sys/boot/i386/gptzfsboot/Makefile ============================================================================== --- stable/10/sys/boot/i386/gptzfsboot/Makefile Tue Oct 7 13:31:04 2014 (r272695) +++ stable/10/sys/boot/i386/gptzfsboot/Makefile Tue Oct 7 13:35:34 2014 (r272696) @@ -5,6 +5,7 @@ ${.CURDIR}/../../common FILES= gptzfsboot +MAN= gptzfsboot.8 NM?= nm Copied: stable/10/sys/boot/i386/gptzfsboot/gptzfsboot.8 (from r271609, head/sys/boot/i386/gptzfsboot/gptzfsboot.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/i386/gptzfsboot/gptzfsboot.8 Tue Oct 7 13:35:34 2014 (r272696, copy of r271609, head/sys/boot/i386/gptzfsboot/gptzfsboot.8) @@ -0,0 +1,193 @@ +.\" Copyright (c) 2014 Andriy Gapon +.\" 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 AUTHORS 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 AUTHORS 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$ +.\" +.Dd September 15, 2014 +.Dt GPTZFSBOOT 8 +.Os +.Sh NAME +.Nm gptzfsboot +.Nd GPT bootcode for ZFS on BIOS-based computers +.Sh DESCRIPTION +.Nm +is used on BIOS-based computers to boot from a filesystem in +a ZFS pool. +.Nm +is installed in a +.Cm freebsd-boot +partition of a GPT-partitioned disk with +.Xr gpart 8 . +.Sh IMPLEMENTATION NOTES +The GPT standard allows a variable number of partitions, but +.Nm +only boots from tables with 128 partitions or less. +.Sh BOOTING +.Nm +tries to find all ZFS pools that are composed of BIOS-visible +hard disks or partitions on them. +.Nm +looks for ZFS device labels on all visible disks and in discovered +supported partitions for all supported partition scheme types. +The search starts with the disk from which +.Nm +itself was loaded. +Other disks are probed in BIOS defined order. +After a disk is probed and +.Nm +determines that the whole disk is not a ZFS pool member, then +individual partitions are probed in their partition table order. +Currently GPT and MBR partition schemes are supported. +With the GPT scheme, only partitions of type +.Cm freebsd-zfs +are probed. +The first pool seen during probing is used as a default boot pool. +.Pp +The filesystem specified by the +.Cm bootfs +property of the pool is used as a default boot filesystem. +If the +.Cm bootfs +property is not set, then the root filesystem of the pool is used as +the default. +.Xr zfsloader 8 +is loaded from the boot filesystem. +If +.Pa /boot.config +or +.Pa /boot/config +is present in the boot filesystem, boot options are read from it +in the same way as +.Xr boot 8 . +.Pp +The ZFS GUIDs of the first successfully probed device and the first +detected pool are made available to +.Xr zfsloader 8 +in the +.Cm vfs.zfs.boot.primary_vdev +and +.Cm vfs.zfs.boot.primary_pool +variables. +.Sh USAGE +Normally +.Nm +will boot in fully automatic mode. +However, like +.Xr boot 8 , +it is possible to interrupt the automatic boot process and interact with +.Nm +through a prompt. +.Nm +accepts all the options that +.Xr boot 8 +supports. +.Pp +Filesystem specification and the path to +.Xr zfsloader 8 +is different from +.Xr boot 8 . +The format is +.Pp +.Sm off +.Oo zfs:pool/filesystem: Oc Oo /path/to/loader Oc +.Sm on +.Pp +Both the filesystem and the path can be specified. +If only a path is specified, then the default filesystem is used. +If only a pool and filesystem are specified, then +.Pa /boot/zfsloader +is used as a path. +.Pp +Additionally, the +.Ic status +command can be used to query information about discovered pools. +The output format is similar to that of +.Cm zpool status +.Pq see Xr zpool 8 . +.Pp +The configured or automatically determined ZFS boot filesystem is +stored in the +.Xr zfsloader 8 +.Cm loaddev +variable, and also set as the initial value of the +.Cm currdev +variable. +.Sh FILES +.Bl -tag -width /boot/gptzfsboot -compact +.It Pa /boot/gptzfsboot +boot code binary +.It Pa /boot.config +parameters for the boot block +.Pq optional +.It Pa /boot/config +alternative parameters for the boot block +.Pq optional +.El +.Sh EXAMPLES +.Nm +is typically installed in combination with a +.Dq protective MBR +.Po +see +.Xr gpart 8 +.Pc . +To install +.Nm +on the +.Pa ada0 +drive: +.Bd -literal -offset indent +gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 +.Ed +.Pp +.Nm +can also be installed without the PMBR: +.Bd -literal -offset indent +gpart bootcode -p /boot/gptzfsboot -i 1 ada0 +.Ed +.Sh SEE ALSO +.Xr boot.config 5 , +.Xr boot 8 , +.Xr gpart 8 , +.Xr loader 8 , +.Xr zfsloader 8 , +.Xr zpool 8 +.Sh HISTORY +.Nm +appeared in FreeBSD 7.3. +.Sh BUGS +.Nm +looks for ZFS meta-data only in MBR partitions +.Pq known on FreeBSD as slices . +It does not look into BSD +.Xr disklabel 8 +partitions that are traditionally called partitions. +If a disklabel partition happens to be placed so that ZFS meta-data can be +found at the fixed offsets relative to a slice, then +.Nm +will recognize the partition as a part of a ZFS pool, +but this is not guaranteed to happen. +.Sh AUTHORS +This manual page was written by +.An Andriy Gapon Aq avg@FreeBSD.org . Modified: stable/10/sys/boot/i386/zfsboot/Makefile ============================================================================== --- stable/10/sys/boot/i386/zfsboot/Makefile Tue Oct 7 13:31:04 2014 (r272695) +++ stable/10/sys/boot/i386/zfsboot/Makefile Tue Oct 7 13:35:34 2014 (r272696) @@ -3,6 +3,7 @@ .PATH: ${.CURDIR}/../boot2 ${.CURDIR}/../common ${.CURDIR}/../../common FILES= zfsboot +MAN= zfsboot.8 NM?= nm Copied: stable/10/sys/boot/i386/zfsboot/zfsboot.8 (from r271609, head/sys/boot/i386/zfsboot/zfsboot.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/i386/zfsboot/zfsboot.8 Tue Oct 7 13:35:34 2014 (r272696, copy of r271609, head/sys/boot/i386/zfsboot/zfsboot.8) @@ -0,0 +1,133 @@ +.\" Copyright (c) 2014 Andriy Gapon +.\" 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 AUTHORS 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 AUTHORS 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$ +.\" +.Dd September 15, 2014 +.Dt ZFSBOOT 8 +.Os +.Sh NAME +.Nm zfsboot +.Nd bootcode for ZFS on BIOS-based computers +.Sh DESCRIPTION +.Nm +is used on BIOS-based computers to boot from a filesystem in +a ZFS pool. +.Nm +is installed in two parts on a disk or a partition used by a ZFS pool. +The first part, a single-sector starter boot block, is installed +at the beginning of the disk or partition. +The second part, a main boot block, is installed at a special offset +within the disk or partition. +Both areas are reserved by the ZFS on-disk specification for boot use. +If +.Nm +is installed in a partition, then that partition should be made +bootable using appropriate configuration and boot blocks described in +.Xr boot 8 . +.Sh BOOTING +The +.Nm +boot process is very similar to that of +.Xr gptzfsboot 8 . +One significant difference is that +.Nm +does not currently support the GPT partitioning scheme. +Thus only whole disks and MBR partitions, traditionally referred to as +slices, are probed for ZFS disk labels. +See the BUGS section in +.Xr gptzfsboot 8 +for some limitations of the MBR scheme support. +.Sh USAGE +.Nm +supports all the same prompt and configuration file arguments as +.Xr gptzfsboot 8 . +.Sh FILES +.Bl -tag -width /boot/zfsboot -compact +.It Pa /boot/zfsboot +boot code binary +.It Pa /boot.config +parameters for the boot block +.Pq optional +.It Pa /boot/config +alternative parameters for the boot block +.Pq optional +.El +.Sh EXAMPLES +.Nm +is typically installed using +.Xr dd 1 . +To install +.Nm +on the +.Pa ada0 +drive: +.Bd -literal -offset indent +dd if=/boot/zfsboot of=/dev/ada0 count=1 +dd if=/boot/zfsboot of=/dev/ada0 iseek=1 oseek=1024 +.Ed +.Pp +If the drive is currently in use, the GEOM safety will prevent writes +and must be disabled before running the above commands: +.Bd -literal -offset indent +sysctl kern.geom.debugflags=0x10 +.Ed +.Pp +.Nm +can also be installed in an MBR slice: +.Bd -literal -offset indent +gpart create -s mbr ada0 +gpart add -t freebsd ada0 +gpart create -s BSD ada0s1 +gpart bootcode -b /boot/boot0 ada0 +gpart set -a active -i 1 ada0 +dd if=/boot/zfsboot of=/dev/ada0s1 count=1 +dd if=/boot/zfsboot of=/dev/ada0s1 iseek=1 oseek=1024 +.Ed +.Pp +Note that commands to create and populate a pool are not shown +in the example above. +.Sh SEE ALSO +.Xr dd 1 , +.Xr boot.config 5 , +.Xr boot 8 , +.Xr gptzfsboot 8 , +.Xr loader 8 , +.Xr zfsloader 8 , +.Xr zpool 8 +.Sh HISTORY +.Nm +appeared in FreeBSD 7.3. +.Sh AUTHORS +This manual page was written by +.An Andriy Gapon Aq avg@FreeBSD.org . +.Sh BUGS +Installing +.Nm +with +.Xr dd 1 +is a hack. +ZFS needs a command to properly install +.Nm +onto a ZFS-controlled disk or partition. From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 13:37:12 2014 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 60420A0; Tue, 7 Oct 2014 13:37: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 49D5CFE6; Tue, 7 Oct 2014 13:37: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 s97DbC7I092392; Tue, 7 Oct 2014 13:37:12 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s97DbAmP092386; Tue, 7 Oct 2014 13:37:10 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201410071337.s97DbAmP092386@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 7 Oct 2014 13:37:10 +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: r272697 - in stable/9/sys/boot: common i386/gptzfsboot i386/zfsboot 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.18-1 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, 07 Oct 2014 13:37:12 -0000 Author: avg Date: Tue Oct 7 13:37:10 2014 New Revision: 272697 URL: https://svnweb.freebsd.org/changeset/base/272697 Log: MFC r271609: add gptzfsboot.8, zfsboot.8 and zfsloader.8 manual pages Added: stable/9/sys/boot/common/zfsloader.8 - copied unchanged from r271609, head/sys/boot/common/zfsloader.8 stable/9/sys/boot/i386/gptzfsboot/gptzfsboot.8 - copied unchanged from r271609, head/sys/boot/i386/gptzfsboot/gptzfsboot.8 stable/9/sys/boot/i386/zfsboot/zfsboot.8 - copied unchanged from r271609, head/sys/boot/i386/zfsboot/zfsboot.8 Modified: stable/9/sys/boot/common/Makefile.inc stable/9/sys/boot/i386/gptzfsboot/Makefile stable/9/sys/boot/i386/zfsboot/Makefile Directory Properties: stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/common/Makefile.inc ============================================================================== --- stable/9/sys/boot/common/Makefile.inc Tue Oct 7 13:35:34 2014 (r272696) +++ stable/9/sys/boot/common/Makefile.inc Tue Oct 7 13:37:10 2014 (r272697) @@ -73,3 +73,6 @@ CFLAGS+= -DBOOT_PROMPT_123 .endif MAN+= loader.8 +.if ${MK_ZFS} != "no" +MAN+= zfsloader.8 +.endif Copied: stable/9/sys/boot/common/zfsloader.8 (from r271609, head/sys/boot/common/zfsloader.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/boot/common/zfsloader.8 Tue Oct 7 13:37:10 2014 (r272697, copy of r271609, head/sys/boot/common/zfsloader.8) @@ -0,0 +1,109 @@ +.\" Copyright (c) 2014 Andriy Gapon +.\" 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$ +.\" +.Dd September 15, 2014 +.Dt ZFSLOADER 8 +.Os +.Sh NAME +.Nm zfsloader +.Nd kernel bootstrapping final stage +.Sh DESCRIPTION +.Nm +is an extended variant of +.Xr loader 8 +with added support for booting from ZFS. +This document describes only differences from +.Xr loader 8 . +.Sh ZFS FEATURES +.Nm +supports the following format for specifying ZFS filesystems which +can be used wherever +.Xr loader 8 +refers to a device specification: +.Pp +.Ar zfs:pool/filesystem: +.Pp +where +.Pa pool/filesystem +is a ZFS filesystem name as described in +.Xr zfs 8 . +.Pp +If +.Pa /etc/fstab +does not have an entry for the root filesystem and +.Va vfs.root.mountfrom +is not set, but +.Va currdev +refers to a ZFS filesystem, then +.Nm +will instruct kernel to use that filesystem as the root filesystem. +.Sh ZFS COMMAND EXTENSIONS +.Bl -tag -width Ds -compact +.Pp +.It Ic lsdev Op Fl v +Lists ZFS pools in addition to disks and partitions. +Adding +.Fl v +shows more ZFS pool details in a format that resembles +.Nm zpool Cm status +output. +.Pp +.It Ic lszfs Ar filesystem +A ZFS extended command that can be used to explore the ZFS filesystem +hierarchy in a pool. +Lists the immediate children of the +.Ar filesystem . +The filesystem hierarchy is rooted at a filesystem with the same name +as the pool. +.El +.Sh FILES +.Bl -tag -width /boot/zfsloader -compact +.It Pa /boot/zfsloader +.Nm +itself. +.El +.Sh EXAMPLES +Set the default device used for loading a kernel from a ZFS filesystem: +.Pp +.Bd -literal -offset indent +set currdev=zfs:tank/ROOT/knowngood: +.Ed +.Pp +.Sh SEE ALSO +.Xr gptzfsboot 8 , +.Xr loader 8 , +.Xr zfs 8 , +.Xr zfsboot 8 , +.Xr zfsloader 8 , +.Xr zpool 8 +.Sh HISTORY +The +.Nm +first appeared in +.Fx 7.3 . +.Sh AUTHORS +This manual page was written by +.An Andriy Gapon Aq avg@FreeBSD.org . Modified: stable/9/sys/boot/i386/gptzfsboot/Makefile ============================================================================== --- stable/9/sys/boot/i386/gptzfsboot/Makefile Tue Oct 7 13:35:34 2014 (r272696) +++ stable/9/sys/boot/i386/gptzfsboot/Makefile Tue Oct 7 13:37:10 2014 (r272697) @@ -5,6 +5,7 @@ ${.CURDIR}/../../common FILES= gptzfsboot +MAN= gptzfsboot.8 NM?= nm Copied: stable/9/sys/boot/i386/gptzfsboot/gptzfsboot.8 (from r271609, head/sys/boot/i386/gptzfsboot/gptzfsboot.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/boot/i386/gptzfsboot/gptzfsboot.8 Tue Oct 7 13:37:10 2014 (r272697, copy of r271609, head/sys/boot/i386/gptzfsboot/gptzfsboot.8) @@ -0,0 +1,193 @@ +.\" Copyright (c) 2014 Andriy Gapon +.\" 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 AUTHORS 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 AUTHORS 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$ +.\" +.Dd September 15, 2014 +.Dt GPTZFSBOOT 8 +.Os +.Sh NAME +.Nm gptzfsboot +.Nd GPT bootcode for ZFS on BIOS-based computers +.Sh DESCRIPTION +.Nm +is used on BIOS-based computers to boot from a filesystem in +a ZFS pool. +.Nm +is installed in a +.Cm freebsd-boot +partition of a GPT-partitioned disk with +.Xr gpart 8 . +.Sh IMPLEMENTATION NOTES +The GPT standard allows a variable number of partitions, but +.Nm +only boots from tables with 128 partitions or less. +.Sh BOOTING +.Nm +tries to find all ZFS pools that are composed of BIOS-visible +hard disks or partitions on them. +.Nm +looks for ZFS device labels on all visible disks and in discovered +supported partitions for all supported partition scheme types. +The search starts with the disk from which +.Nm +itself was loaded. +Other disks are probed in BIOS defined order. +After a disk is probed and +.Nm +determines that the whole disk is not a ZFS pool member, then +individual partitions are probed in their partition table order. +Currently GPT and MBR partition schemes are supported. +With the GPT scheme, only partitions of type +.Cm freebsd-zfs +are probed. +The first pool seen during probing is used as a default boot pool. +.Pp +The filesystem specified by the +.Cm bootfs +property of the pool is used as a default boot filesystem. +If the +.Cm bootfs +property is not set, then the root filesystem of the pool is used as +the default. +.Xr zfsloader 8 +is loaded from the boot filesystem. +If +.Pa /boot.config +or +.Pa /boot/config +is present in the boot filesystem, boot options are read from it +in the same way as +.Xr boot 8 . +.Pp +The ZFS GUIDs of the first successfully probed device and the first +detected pool are made available to +.Xr zfsloader 8 +in the +.Cm vfs.zfs.boot.primary_vdev +and +.Cm vfs.zfs.boot.primary_pool +variables. +.Sh USAGE +Normally +.Nm +will boot in fully automatic mode. +However, like +.Xr boot 8 , +it is possible to interrupt the automatic boot process and interact with +.Nm +through a prompt. +.Nm +accepts all the options that +.Xr boot 8 +supports. +.Pp +Filesystem specification and the path to +.Xr zfsloader 8 +is different from +.Xr boot 8 . +The format is +.Pp +.Sm off +.Oo zfs:pool/filesystem: Oc Oo /path/to/loader Oc +.Sm on +.Pp +Both the filesystem and the path can be specified. +If only a path is specified, then the default filesystem is used. +If only a pool and filesystem are specified, then +.Pa /boot/zfsloader +is used as a path. +.Pp +Additionally, the +.Ic status +command can be used to query information about discovered pools. +The output format is similar to that of +.Cm zpool status +.Pq see Xr zpool 8 . +.Pp +The configured or automatically determined ZFS boot filesystem is +stored in the +.Xr zfsloader 8 +.Cm loaddev +variable, and also set as the initial value of the +.Cm currdev +variable. +.Sh FILES +.Bl -tag -width /boot/gptzfsboot -compact +.It Pa /boot/gptzfsboot +boot code binary +.It Pa /boot.config +parameters for the boot block +.Pq optional +.It Pa /boot/config +alternative parameters for the boot block +.Pq optional +.El +.Sh EXAMPLES +.Nm +is typically installed in combination with a +.Dq protective MBR +.Po +see +.Xr gpart 8 +.Pc . +To install +.Nm +on the +.Pa ada0 +drive: +.Bd -literal -offset indent +gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 +.Ed +.Pp +.Nm +can also be installed without the PMBR: +.Bd -literal -offset indent +gpart bootcode -p /boot/gptzfsboot -i 1 ada0 +.Ed +.Sh SEE ALSO +.Xr boot.config 5 , +.Xr boot 8 , +.Xr gpart 8 , +.Xr loader 8 , +.Xr zfsloader 8 , +.Xr zpool 8 +.Sh HISTORY +.Nm +appeared in FreeBSD 7.3. +.Sh BUGS +.Nm +looks for ZFS meta-data only in MBR partitions +.Pq known on FreeBSD as slices . +It does not look into BSD +.Xr disklabel 8 +partitions that are traditionally called partitions. +If a disklabel partition happens to be placed so that ZFS meta-data can be +found at the fixed offsets relative to a slice, then +.Nm +will recognize the partition as a part of a ZFS pool, +but this is not guaranteed to happen. +.Sh AUTHORS +This manual page was written by +.An Andriy Gapon Aq avg@FreeBSD.org . Modified: stable/9/sys/boot/i386/zfsboot/Makefile ============================================================================== --- stable/9/sys/boot/i386/zfsboot/Makefile Tue Oct 7 13:35:34 2014 (r272696) +++ stable/9/sys/boot/i386/zfsboot/Makefile Tue Oct 7 13:37:10 2014 (r272697) @@ -3,6 +3,7 @@ .PATH: ${.CURDIR}/../boot2 ${.CURDIR}/../common ${.CURDIR}/../../common FILES= zfsboot +MAN= zfsboot.8 NM?= nm Copied: stable/9/sys/boot/i386/zfsboot/zfsboot.8 (from r271609, head/sys/boot/i386/zfsboot/zfsboot.8) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/boot/i386/zfsboot/zfsboot.8 Tue Oct 7 13:37:10 2014 (r272697, copy of r271609, head/sys/boot/i386/zfsboot/zfsboot.8) @@ -0,0 +1,133 @@ +.\" Copyright (c) 2014 Andriy Gapon +.\" 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 AUTHORS 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 AUTHORS 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$ +.\" +.Dd September 15, 2014 +.Dt ZFSBOOT 8 +.Os +.Sh NAME +.Nm zfsboot +.Nd bootcode for ZFS on BIOS-based computers +.Sh DESCRIPTION +.Nm +is used on BIOS-based computers to boot from a filesystem in +a ZFS pool. +.Nm +is installed in two parts on a disk or a partition used by a ZFS pool. +The first part, a single-sector starter boot block, is installed +at the beginning of the disk or partition. +The second part, a main boot block, is installed at a special offset +within the disk or partition. +Both areas are reserved by the ZFS on-disk specification for boot use. +If +.Nm +is installed in a partition, then that partition should be made +bootable using appropriate configuration and boot blocks described in +.Xr boot 8 . +.Sh BOOTING +The +.Nm +boot process is very similar to that of +.Xr gptzfsboot 8 . +One significant difference is that +.Nm +does not currently support the GPT partitioning scheme. +Thus only whole disks and MBR partitions, traditionally referred to as +slices, are probed for ZFS disk labels. +See the BUGS section in +.Xr gptzfsboot 8 +for some limitations of the MBR scheme support. +.Sh USAGE +.Nm +supports all the same prompt and configuration file arguments as +.Xr gptzfsboot 8 . +.Sh FILES +.Bl -tag -width /boot/zfsboot -compact +.It Pa /boot/zfsboot +boot code binary +.It Pa /boot.config +parameters for the boot block +.Pq optional +.It Pa /boot/config +alternative parameters for the boot block +.Pq optional +.El +.Sh EXAMPLES +.Nm +is typically installed using +.Xr dd 1 . +To install +.Nm +on the +.Pa ada0 +drive: +.Bd -literal -offset indent +dd if=/boot/zfsboot of=/dev/ada0 count=1 +dd if=/boot/zfsboot of=/dev/ada0 iseek=1 oseek=1024 +.Ed +.Pp +If the drive is currently in use, the GEOM safety will prevent writes +and must be disabled before running the above commands: +.Bd -literal -offset indent +sysctl kern.geom.debugflags=0x10 +.Ed +.Pp +.Nm +can also be installed in an MBR slice: +.Bd -literal -offset indent +gpart create -s mbr ada0 +gpart add -t freebsd ada0 +gpart create -s BSD ada0s1 +gpart bootcode -b /boot/boot0 ada0 +gpart set -a active -i 1 ada0 +dd if=/boot/zfsboot of=/dev/ada0s1 count=1 +dd if=/boot/zfsboot of=/dev/ada0s1 iseek=1 oseek=1024 +.Ed +.Pp +Note that commands to create and populate a pool are not shown +in the example above. +.Sh SEE ALSO +.Xr dd 1 , +.Xr boot.config 5 , +.Xr boot 8 , +.Xr gptzfsboot 8 , +.Xr loader 8 , +.Xr zfsloader 8 , +.Xr zpool 8 +.Sh HISTORY +.Nm +appeared in FreeBSD 7.3. +.Sh AUTHORS +This manual page was written by +.An Andriy Gapon Aq avg@FreeBSD.org . +.Sh BUGS +Installing +.Nm +with +.Xr dd 1 +is a hack. +ZFS needs a command to properly install +.Nm +onto a ZFS-controlled disk or partition. From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 13:42:35 2014 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 95E5832E; Tue, 7 Oct 2014 13:42: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 80F3A146; Tue, 7 Oct 2014 13:42: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 s97DgZvT096497; Tue, 7 Oct 2014 13:42:35 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s97DgZ3P096496; Tue, 7 Oct 2014 13:42:35 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201410071342.s97DgZ3P096496@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 7 Oct 2014 13:42: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: r272698 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/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.18-1 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, 07 Oct 2014 13:42:35 -0000 Author: avg Date: Tue Oct 7 13:42:34 2014 New Revision: 272698 URL: https://svnweb.freebsd.org/changeset/base/272698 Log: MFC r246531: zfs: update comments about zfid_long_t to match the FreeBSD definitions Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h 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/sys/zfs_vfsops.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Tue Oct 7 13:37:10 2014 (r272697) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Tue Oct 7 13:42:34 2014 (r272698) @@ -110,7 +110,7 @@ typedef struct zfid_short { } zfid_short_t; /* - * Filesystems under .zfs/snapshot have a total file ID size of 22 bytes + * Filesystems under .zfs/snapshot have a total file ID size of 22[*] bytes * (including the length field). This makes files under .zfs/snapshot * accessible by NFSv3 and NFSv4, but not NFSv2. * @@ -120,10 +120,13 @@ typedef struct zfid_short { * 6 bytes object number (48 bits) * 4 bytes generation number (32 bits) * 6 bytes objset id (48 bits) - * 4 bytes currently just zero (32 bits) + * 4 bytes[**] currently just zero (32 bits) * * We reserve only 48 bits for the object number and objset id, as these are * the limits currently defined and imposed by the DMU. + * + * [*] 20 bytes on FreeBSD to fit into the size of struct fid. + * [**] 2 bytes on FreeBSD for the above reason. */ typedef struct zfid_long { zfid_short_t z_fid; From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 13:47:55 2014 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 85C3A617; Tue, 7 Oct 2014 13:47: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 71A5219E; Tue, 7 Oct 2014 13:47: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 s97DltEk097254; Tue, 7 Oct 2014 13:47:55 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s97DltjJ097253; Tue, 7 Oct 2014 13:47:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201410071347.s97DltjJ097253@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 7 Oct 2014 13:47:55 +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: r272699 - stable/9/sys/kern 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.18-1 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, 07 Oct 2014 13:47:55 -0000 Author: avg Date: Tue Oct 7 13:47:54 2014 New Revision: 272699 URL: https://svnweb.freebsd.org/changeset/base/272699 Log: MFC r235978: device_add_child: protect against child device with no driver but fixed unit number Modified: stable/9/sys/kern/subr_bus.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/subr_bus.c ============================================================================== --- stable/9/sys/kern/subr_bus.c Tue Oct 7 13:42:34 2014 (r272698) +++ stable/9/sys/kern/subr_bus.c Tue Oct 7 13:47:54 2014 (r272699) @@ -1812,6 +1812,8 @@ device_add_child_ordered(device_t dev, u PDEBUG(("%s at %s with order %u as unit %d", name, DEVICENAME(dev), order, unit)); + KASSERT(name != NULL || unit == -1, + ("child device with wildcard name and specific unit number")); child = make_device(dev, name, unit); if (child == NULL) From owner-svn-src-stable@FreeBSD.ORG Tue Oct 7 15:21:21 2014 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 0F9ADAFF; Tue, 7 Oct 2014 15:21: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 EF18AEF6; Tue, 7 Oct 2014 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 s97FLKOA045049; Tue, 7 Oct 2014 15:21:20 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s97FLKGF045048; Tue, 7 Oct 2014 15:21:20 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201410071521.s97FLKGF045048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 7 Oct 2014 15:21:20 +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: r272705 - stable/9/sys/net 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.18-1 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, 07 Oct 2014 15:21:21 -0000 Author: asomers Date: Tue Oct 7 15:21:20 2014 New Revision: 272705 URL: https://svnweb.freebsd.org/changeset/base/272705 Log: MFC r265232 Fix a panic caused by doing "ifconfig -am" while a lagg is being destroyed. The thread that is destroying the lagg has already set sc->sc_psc=NULL when the "ifconfig -am" thread gets to lacp_req(). It tries to dereference sc->sc_psc and panics. The solution is for lacp_req() to check the value of sc->sc_psc. If NULL, harmlessly return an lacp_opreq structure full of zeros. Full details in GNATS. PR: 189003 Modified: stable/9/sys/net/ieee8023ad_lacp.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/9/sys/net/ieee8023ad_lacp.c Tue Oct 7 15:12:06 2014 (r272704) +++ stable/9/sys/net/ieee8023ad_lacp.c Tue Oct 7 15:21:20 2014 (r272705) @@ -584,10 +584,20 @@ lacp_req(struct lagg_softc *sc, caddr_t { struct lacp_opreq *req = (struct lacp_opreq *)data; struct lacp_softc *lsc = LACP_SOFTC(sc); - struct lacp_aggregator *la = lsc->lsc_active_aggregator; + struct lacp_aggregator *la; - LACP_LOCK(lsc); bzero(req, sizeof(struct lacp_opreq)); + + /* + * If the LACP softc is NULL, return with the opreq structure full of + * zeros. It is normal for the softc to be NULL while the lagg is + * being destroyed. + */ + if (NULL == lsc) + return; + + la = lsc->lsc_active_aggregator; + LACP_LOCK(lsc); if (la != NULL) { req->actor_prio = ntohs(la->la_actor.lip_systemid.lsi_prio); memcpy(&req->actor_mac, &la->la_actor.lip_systemid.lsi_mac, From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 04:07:08 2014 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 4ED47B1A; Wed, 8 Oct 2014 04:07: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 3A626EAA; Wed, 8 Oct 2014 04:07: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 s984780i016731; Wed, 8 Oct 2014 04:07:08 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s984781T016730; Wed, 8 Oct 2014 04:07:08 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201410080407.s984781T016730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Wed, 8 Oct 2014 04:07: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: r272722 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 08 Oct 2014 04:07:08 -0000 Author: bryanv Date: Wed Oct 8 04:07:07 2014 New Revision: 272722 URL: https://svnweb.freebsd.org/changeset/base/272722 Log: MFC 272550: Remove stray uma_mtx lock/unlock in zone_drain_wait() Callers of zone_drain_wait(M_WAITOK) do not need to hold (and were not) the uma_mtx, but we would attempt to unlock and relock the mutex if we had to sleep because the zone was already draining. The M_NOWAIT callers may hold the uma_mtx, but we do not sleep in that case. Modified: stable/10/sys/vm/uma_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/uma_core.c ============================================================================== --- stable/10/sys/vm/uma_core.c Wed Oct 8 01:03:32 2014 (r272721) +++ stable/10/sys/vm/uma_core.c Wed Oct 8 04:07:07 2014 (r272722) @@ -898,9 +898,7 @@ zone_drain_wait(uma_zone_t zone, int wai while (zone->uz_flags & UMA_ZFLAG_DRAINING) { if (waitok == M_NOWAIT) goto out; - mtx_unlock(&uma_mtx); msleep(zone, zone->uz_lockptr, PVM, "zonedrain", 1); - mtx_lock(&uma_mtx); } zone->uz_flags |= UMA_ZFLAG_DRAINING; bucket_cache_drain(zone); From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 04:11:05 2014 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 D6C55E8E; Wed, 8 Oct 2014 04:11: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 C274CF4A; Wed, 8 Oct 2014 04:11: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 s984B5Li019705; Wed, 8 Oct 2014 04:11:05 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s984B5fe019671; Wed, 8 Oct 2014 04:11:05 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201410080411.s984B5fe019671@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Wed, 8 Oct 2014 04:11:05 +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: r272723 - stable/9/sys/vm 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.18-1 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, 08 Oct 2014 04:11:06 -0000 Author: bryanv Date: Wed Oct 8 04:11:05 2014 New Revision: 272723 URL: https://svnweb.freebsd.org/changeset/base/272723 Log: MFC 272550: Remove stray uma_mtx lock/unlock in zone_drain_wait() Callers of zone_drain_wait(M_WAITOK) do not need to hold (and were not) the uma_mtx, but we would attempt to unlock and relock the mutex if we had to sleep because the zone was already draining. The M_NOWAIT callers may hold the uma_mtx, but we do not sleep in that case. Modified: stable/9/sys/vm/uma_core.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/uma_core.c ============================================================================== --- stable/9/sys/vm/uma_core.c Wed Oct 8 04:07:07 2014 (r272722) +++ stable/9/sys/vm/uma_core.c Wed Oct 8 04:11:05 2014 (r272723) @@ -761,9 +761,7 @@ zone_drain_wait(uma_zone_t zone, int wai while (zone->uz_flags & UMA_ZFLAG_DRAINING) { if (waitok == M_NOWAIT) goto out; - mtx_unlock(&uma_mtx); msleep(zone, zone->uz_lock, PVM, "zonedrain", 1); - mtx_lock(&uma_mtx); } zone->uz_flags |= UMA_ZFLAG_DRAINING; bucket_cache_drain(zone); From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 04:25:19 2014 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 9C8AF183; Wed, 8 Oct 2014 04:25: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 86184C5; Wed, 8 Oct 2014 04:25: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 s984PJp9026087; Wed, 8 Oct 2014 04:25:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s984PIKg026078; Wed, 8 Oct 2014 04:25:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410080425.s984PIKg026078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 8 Oct 2014 04:25: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: r272724 - in stable/10: release release/amd64 release/i386 share/man/man7 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.18-1 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, 08 Oct 2014 04:25:19 -0000 Author: gjb Date: Wed Oct 8 04:25:17 2014 New Revision: 272724 URL: https://svnweb.freebsd.org/changeset/base/272724 Log: MFC r272414: Merge the following revisions from ^/projects/release-vmimage: r272234, r272236, r272262, r272264, r272269, r272271, r272272, r272277, r272279, r272376, r272380, r272381, r272392, r272234, r272412: r272234: Initial commit to include virtual machine images as part of the FreeBSD release builds. This adds a make(1) environment variable requirement, WITH_VMIMAGES, which triggers the virtual machine image targets when not defined to an empty value. Relevant user-driven variables include: o VMFORMATS: The virtual machine image formats to create. Valid formats are provided by running 'mkimg --formats' o VMSIZE: The size of the resulting virtual machine image. Typical compression is roughly 140Mb, regardless of the target size (10GB, 15GB, 20GB, 40GB sizes have been tested with the same result). o VMBASE: The prefix of the virtual machine disk images. The VMBASE make(1) environment variable is suffixed with each format in VMFORMATS for each individual disk image, as well as '.img' for the source UFS filesystem passed to mkimg(1). This also includes a new script, mk-vmimage.sh, based on how the VM images for 10.0-RELEASE, 9.3-RELEASE, and 10.1-RELEASE were created (mk-vmimage.sh in ^/user/gjb/thermite/). With the order in which the stages need to occur, as well as sanity-checking error cases, it makes much more sense to execute a shell script called from make(1), using env(1) to set specific parameters for the target image than it does to do this in make(1) directly. r272236: Use VMBASE in place of a hard-coded filename in the CLEANFILES list. r272262: Remove a 'set -x' that snuck in during testing. r272264: release/Makefile: Connect the virtual machine image build to the release target if WITH_VMIMAGES is set to a non-empty value. release/release.sh: Add WITH_VMIMAGES to RELEASE_RMAKEFLAGS. release/release.conf.sample: Add commented entries for tuning the release build if the WITH_VMIMAGES make(1) environment variable is set to a non-empty value. r272269: release/Makefile: Include .OBJDIR in DESTDIR in the vm-base target. release/release.sh: Provide the full path to mddev. r272271: Fix UFS label for the root filesystem. r272272: Remove comments left in accidentally while testing, so the VM /etc/fstab is actually created. r272277: Remove the UFS label from the root filesystem since it is added by mkimg(1) as a gpt label, consistent with the fstab(5) entry. r272279: Comment cleanup in panic() message when mkimg(1) does not support the requested disk image format. r272376: Separate release/scripts/mk-vmimage.sh to machine-specific scripts, making it possible to mimic the functionality for non-x86 targets. Move echo output if MAKEFLAGS is empty outside of usage(). Remove TARGET/TARGET_ARCH evaluation. r272380: Avoid using env(1) to set values passed to mk-vmimage.sh, and instead pass the values as arguments to the script, making it easier to run this by hand, without 'make release'. Add usage_vm_base() and usage_vm_image() usage helpers. r272381: After evaluating WITH_VMIMAGES is non-empty, ensure the mk-vmimage.sh script exists before running it. r272392: Add WITH_COMPRESSED_VMIMAGES variable, which when set enables xz(1) compression of the virtual machine images. This is intentionally separate to allow more fine-grained tuning over which images are compressed, especially in cases where compressing 20GB sparse images can take hours. r272412: Document the new 'vm-image' target, and associated release.conf variables. r272413: Remove two stray comments added during the initial iterations of testing, no longer needed. Sponsored by: The FreeBSD Foundation Added: stable/10/release/amd64/mk-vmimage.sh - copied unchanged from r272414, head/release/amd64/mk-vmimage.sh stable/10/release/i386/mk-vmimage.sh - copied unchanged from r272414, head/release/i386/mk-vmimage.sh Modified: stable/10/release/Makefile stable/10/release/release.conf.sample stable/10/release/release.sh stable/10/share/man/man7/release.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Wed Oct 8 04:11:05 2014 (r272723) +++ stable/10/release/Makefile Wed Oct 8 04:25:17 2014 (r272724) @@ -23,6 +23,9 @@ # WITH_DVD: if set, generate dvd1.iso # WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1) # (uncompressed images are not removed) +# WITH_VMIMAGES: if set, build virtual machine images with the release +# WITH_COMPRESSED_VMIMAGES: if set, compress virtual machine disk images +# with xz(1) (extremely time consuming) # TARGET/TARGET_ARCH: architecture of built release # @@ -110,6 +113,11 @@ IMAGES+= uefi-dvd1.iso . endif .endif +VMTARGETS= vm-base vm-image +VMFORMATS?= vhd vmdk qcow2 raw +VMSIZE?= 20G +VMBASE?= vm + CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} .if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) . for I in ${IMAGES} @@ -119,7 +127,16 @@ CLEANFILES+= ${I}.xz .if defined(WITH_DVD) && !empty(WITH_DVD) CLEANFILES+= pkg-stage .endif +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +CLEANFILES+= ${VMBASE}.img +. for FORMAT in ${VMFORMATS} +CLEANFILES+= ${VMBASE}.${FORMAT} +. endfor +.endif CLEANDIRS= dist ftp release bootonly dvd +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +CLEANDIRS+= ${VMTARGETS} +.endif beforeclean: chflags -R noschg . .include @@ -297,6 +314,9 @@ ftp: packagesystem release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) + ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${VMTARGETS} +.endif install: .if defined(DESTDIR) && !empty(DESTDIR) @@ -311,3 +331,44 @@ install: .endfor cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 cd ${DESTDIR} && md5 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.MD5 +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) + mkdir -p ${DESTDIR}/vmimages +. for FORMAT in ${VMFORMATS} + cp -p ${VMBASE}.${FORMAT} \ + ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} +. endfor +. if defined(WITH_COMPRESSED_VMIMAGES) && !empty(WITH_COMPRESSED_VMIMAGES) +# This is very time consuming, so defer it after the images are moved to +# the DESTDIR. +. for FORMAT in ${VMFORMATS} + # Don't keep the originals. There is a copy in ${.OBJDIR} if needed. + ${XZCMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} +. endfor +. endif + cd ${DESTDIR}/vmimages && sha256 ${OSRELEASE}* > \ + ${DESTDIR}/vmimages/CHECKSUM.SHA256 + cd ${DESTDIR}/vmimages && md5 ${OSRELEASE}* > \ + ${DESTDIR}/vmimages/CHECKSUM.MD5 +.endif + +vm-base: +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ + ${VMBASE}.img ${WORLDDIR} ${.OBJDIR}/${.TARGET} ${VMSIZE} +. endif +.endif + touch ${.TARGET} + +vm-image: vm-base +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) +. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) +. for FORMAT in ${VMFORMATS} + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ + ${VMBASE}.img ${FORMAT} ${VMBASE}.${FORMAT} +. endfor +. endif +.endif + touch ${.TARGET} Copied: stable/10/release/amd64/mk-vmimage.sh (from r272414, head/release/amd64/mk-vmimage.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/release/amd64/mk-vmimage.sh Wed Oct 8 04:25:17 2014 (r272724, copy of r272414, head/release/amd64/mk-vmimage.sh) @@ -0,0 +1,188 @@ +#!/bin/sh +#- +# Copyright (c) 2014 The FreeBSD Foundation +# All rights reserved. +# +# This software was developed by Glen Barber under sponsorship +# from the FreeBSD Foundation. +# +# 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. +# +# mk-vmimage.sh: Create virtual machine disk images in various formats. +# +# $FreeBSD$ +# + +PATH="/bin:/usr/bin:/sbin:/usr/sbin" +export PATH + +usage_vm_base() { + echo -n "$(basename ${0}) vm-base " + echo " " + return 0 +} + +usage_vm_image() { + echo -n "$(basename ${0}) vm-image " + echo " " + return 0 +} + +usage() { + echo "Usage:" + echo "$(basename ${0}) [vm-base|vm-image] [...]" + echo + usage_vm_base + echo + usage_vm_image + exit 1 +} + +panic() { + rc="${1}" + shift 1 + msg="${@}" + printf "${msg}\n" + if [ ! -z "${mddev}" ]; then + mdconfig -d -u ${mddev} + fi + # Do not allow one failure case to chain through any remaining image + # builds. + exit 0 +} + +vm_create_baseimage() { + # Creates the UFS root filesystem for the virtual machine disk, + # written to the formatted disk image with mkimg(1). + # + # Arguments: + # vm-base + + VMBASE="${1}" + WORLDDIR="${2}" + DESTDIR="${3}" + VMSIZE="${4}" + + if [ -z "${VMBASE}" -o -z "${WORLDDIR}" -o -z "${DESTDIR}" \ + -o -z "${VMSIZE}" ]; then + usage + fi + + i=0 + mkdir -p ${DESTDIR} + truncate -s ${VMSIZE} ${VMBASE} + mddev=$(mdconfig -f ${VMBASE}) + newfs -j /dev/${mddev} + mount /dev/${mddev} ${DESTDIR} + cd ${WORLDDIR} && \ + make DESTDIR=${DESTDIR} \ + installworld installkernel distribution || \ + panic 1 "\n\nCannot install the base system to ${DESTDIR}." + chroot ${DESTDIR} /usr/bin/newaliases + echo '# Custom /etc/fstab for FreeBSD VM images' \ + > ${DESTDIR}/etc/fstab + echo '/dev/gpt/rootfs / ufs rw 2 2' \ + >> ${DESTDIR}/etc/fstab + echo '/dev/gpt/swapfs none swap sw 0 0' \ + >> ${DESTDIR}/etc/fstab + sync + while ! umount ${DESTDIR}; do + i=$(( $i + 1 )) + if [ $i -ge 10 ]; then + # This should never happen. But, it has happened. + msg="Cannot umount(8) ${DESTDIR}\n" + msg="${msg}Something has gone horribly wrong." + panic 1 "${msg}" + fi + sleep 1 + done + + return 0 +} + +vm_create_vmdisk() { + # Creates the virtual machine disk image from the raw disk image. + # + # Arguments: + # vm-image " + + VMBASE="${1}" + FORMAT="${2}" + VMIMAGE="${3}" + + if [ -z "${VMBASE}" -o -z "${FORMAT}" -o -z "${VMIMAGE}" ]; then + usage + fi + + mkimg_version=$(mkimg --version 2>/dev/null | awk '{print $2}') + + # We need mkimg(1) '--version' output, at minimum, to be able to + # tell what virtual machine disk image formats are available. + # Bail if mkimg(1) reports an empty '--version' value. + if [ -z "${mkimg_version}" ]; then + msg="Cannot determine mkimg(1) version.\n" + msg="${msg}Cannot continue without a known mkimg(1) version." + panic 0 "${msg}" + fi + + if ! mkimg --formats 2>/dev/null | grep -q ${FORMAT}; then + panic 0 "'${FORMAT}' is not supported by this mkimg(1).\n" + fi + + case ${FORMAT} in + vhd) + mkimg_format=vhdf + ;; + *) + mkimg_format=${FORMAT} + ;; + esac + + mkimg -f ${mkimg_format} -s gpt \ + -b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \ + -p freebsd-swap/swapfs::1G \ + -p freebsd-ufs/rootfs:=${VMBASE} \ + -o ${VMIMAGE} + + return 0 +} + +main() { + cmd="${1}" + shift 1 + + case ${cmd} in + vm-base) + eval vm_create_baseimage "$@" || return 0 + ;; + vm-image) + eval vm_create_vmdisk "$@" || return 0 + ;; + *|\?) + usage + ;; + esac + + return 0 +} + +main "$@" Copied: stable/10/release/i386/mk-vmimage.sh (from r272414, head/release/i386/mk-vmimage.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/release/i386/mk-vmimage.sh Wed Oct 8 04:25:17 2014 (r272724, copy of r272414, head/release/i386/mk-vmimage.sh) @@ -0,0 +1,188 @@ +#!/bin/sh +#- +# Copyright (c) 2014 The FreeBSD Foundation +# All rights reserved. +# +# This software was developed by Glen Barber under sponsorship +# from the FreeBSD Foundation. +# +# 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. +# +# mk-vmimage.sh: Create virtual machine disk images in various formats. +# +# $FreeBSD$ +# + +PATH="/bin:/usr/bin:/sbin:/usr/sbin" +export PATH + +usage_vm_base() { + echo -n "$(basename ${0}) vm-base " + echo " " + return 0 +} + +usage_vm_image() { + echo -n "$(basename ${0}) vm-image " + echo " " + return 0 +} + +usage() { + echo "Usage:" + echo "$(basename ${0}) [vm-base|vm-image] [...]" + echo + usage_vm_base + echo + usage_vm_image + exit 1 +} + +panic() { + rc="${1}" + shift 1 + msg="${@}" + printf "${msg}\n" + if [ ! -z "${mddev}" ]; then + mdconfig -d -u ${mddev} + fi + # Do not allow one failure case to chain through any remaining image + # builds. + exit 0 +} + +vm_create_baseimage() { + # Creates the UFS root filesystem for the virtual machine disk, + # written to the formatted disk image with mkimg(1). + # + # Arguments: + # vm-base + + VMBASE="${1}" + WORLDDIR="${2}" + DESTDIR="${3}" + VMSIZE="${4}" + + if [ -z "${VMBASE}" -o -z "${WORLDDIR}" -o -z "${DESTDIR}" \ + -o -z "${VMSIZE}" ]; then + usage + fi + + i=0 + mkdir -p ${DESTDIR} + truncate -s ${VMSIZE} ${VMBASE} + mddev=$(mdconfig -f ${VMBASE}) + newfs -j /dev/${mddev} + mount /dev/${mddev} ${DESTDIR} + cd ${WORLDDIR} && \ + make DESTDIR=${DESTDIR} \ + installworld installkernel distribution || \ + panic 1 "\n\nCannot install the base system to ${DESTDIR}." + chroot ${DESTDIR} /usr/bin/newaliases + echo '# Custom /etc/fstab for FreeBSD VM images' \ + > ${DESTDIR}/etc/fstab + echo '/dev/gpt/rootfs / ufs rw 2 2' \ + >> ${DESTDIR}/etc/fstab + echo '/dev/gpt/swapfs none swap sw 0 0' \ + >> ${DESTDIR}/etc/fstab + sync + while ! umount ${DESTDIR}; do + i=$(( $i + 1 )) + if [ $i -ge 10 ]; then + # This should never happen. But, it has happened. + msg="Cannot umount(8) ${DESTDIR}\n" + msg="${msg}Something has gone horribly wrong." + panic 1 "${msg}" + fi + sleep 1 + done + + return 0 +} + +vm_create_vmdisk() { + # Creates the virtual machine disk image from the raw disk image. + # + # Arguments: + # vm-image " + + VMBASE="${1}" + FORMAT="${2}" + VMIMAGE="${3}" + + if [ -z "${VMBASE}" -o -z "${FORMAT}" -o -z "${VMIMAGE}" ]; then + usage + fi + + mkimg_version=$(mkimg --version 2>/dev/null | awk '{print $2}') + + # We need mkimg(1) '--version' output, at minimum, to be able to + # tell what virtual machine disk image formats are available. + # Bail if mkimg(1) reports an empty '--version' value. + if [ -z "${mkimg_version}" ]; then + msg="Cannot determine mkimg(1) version.\n" + msg="${msg}Cannot continue without a known mkimg(1) version." + panic 0 "${msg}" + fi + + if ! mkimg --formats 2>/dev/null | grep -q ${FORMAT}; then + panic 0 "'${FORMAT}' is not supported by this mkimg(1).\n" + fi + + case ${FORMAT} in + vhd) + mkimg_format=vhdf + ;; + *) + mkimg_format=${FORMAT} + ;; + esac + + mkimg -f ${mkimg_format} -s gpt \ + -b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \ + -p freebsd-swap/swapfs::1G \ + -p freebsd-ufs/rootfs:=${VMBASE} \ + -o ${VMIMAGE} + + return 0 +} + +main() { + cmd="${1}" + shift 1 + + case ${cmd} in + vm-base) + eval vm_create_baseimage "$@" || return 0 + ;; + vm-image) + eval vm_create_vmdisk "$@" || return 0 + ;; + *|\?) + usage + ;; + esac + + return 0 +} + +main "$@" Modified: stable/10/release/release.conf.sample ============================================================================== --- stable/10/release/release.conf.sample Wed Oct 8 04:11:05 2014 (r272723) +++ stable/10/release/release.conf.sample Wed Oct 8 04:25:17 2014 (r272724) @@ -72,3 +72,24 @@ PORTBRANCH="ports/head@rHEAD" ## as TARGET/TARGET_ARCH. #CHROOT_MAKEENV= +## Set to a non-empty value to build virtual machine images as part of the +## release build. +#WITH_VMIMAGES= + +## Set to a non-empty value to compress virtual machine images with xz(1) +## as part of the release build. +#WITH_COMPRESSED_VMIMAGES= + +## If WITH_VMIMAGES is set to a non-empty value, this is the name of the +## file to use for the installed userland/kernel. +#VMBASE="vm" + +## If WITH_VMIMAGES is set to a non-empty value, this is the size of the +## virtual machine disk filesystem. Valid size values are described in +## the truncate(1) manual page. +#VMSIZE="20G" + +## If WITH_VMIMAGES is set to a non-empty value, this is a list of disk +## image formats to create. Valid values are listed in the mkimg(1) +## manual page, as well as 'mkimg --formats' output. +#VMFORMATS="vhdf vmdk qcow2 raw" Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Wed Oct 8 04:11:05 2014 (r272723) +++ stable/10/release/release.sh Wed Oct 8 04:25:17 2014 (r272724) @@ -85,6 +85,11 @@ NOPORTS= WITH_DVD= WITH_COMPRESSED_IMAGES= +# Set to non-empty value to build virtual machine images as part of +# the release. +WITH_VMIMAGES= +WITH_COMPRESSED_VMIMAGES= + usage() { echo "Usage: $0 [-c release.conf]" exit 1 @@ -168,7 +173,7 @@ CHROOT_DMAKEFLAGS="${CONF_FILES}" RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} ${CONF_FILES}" RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}" RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \ - ${DOCPORTS} WITH_DVD=${WITH_DVD}" + ${DOCPORTS} WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES}" # Force src checkout if configured FORCE_SRC_KEY= @@ -271,4 +276,5 @@ eval chroot ${CHROOTDIR} make -C /usr/sr eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ release eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ - install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} + install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} \ + WITH_COMPRESSED_VMIMAGES=${WITH_COMPRESSED_VMIMAGES} Modified: stable/10/share/man/man7/release.7 ============================================================================== --- stable/10/share/man/man7/release.7 Wed Oct 8 04:11:05 2014 (r272723) +++ stable/10/share/man/man7/release.7 Wed Oct 8 04:25:17 2014 (r272724) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 11, 2014 +.Dd October 2, 2014 .Dt RELEASE 7 .Os .Sh NAME @@ -351,6 +351,61 @@ Set to the target directory within to check out .Va ${UBOOTSRC}/${UBOOTBRANCH} . .El +.Sh VIRTUAL MACHINE DISK IMAGES +The following +.Fa release.conf +variables are relevant only to virtual machine disk image builds: +.Bl -tag -width Ev +.It Va WITH_VMIMAGES +Set to a non-null value to build virtual machine disk images as part +of the release build. +.Va WITH_VMIMAGES +may also be specified as an envirionment variable passed to +.Xr make 1 . +.Pp +The option requires +.Xr mkimg 1 +version 20140927 or later. +.It Va WITH_COMPRESSED_VMIMAGES +Set to a non-null value to compress the virtual machine disk images with +.Xr xz 1 +as part of the +.Cm install +.Xr make 1 +target. +Note that compressing virtual machine disk images may take a very long +time on some systems. +.It Va VMBASE +Set to change the name of the resulting virtual machine disk image file. +The default value is +.Va vm . +.It Va VMSIZE +Set to change the size of the virtual machine disk capacity. +The default value is +.Va 20G . +See +.Xr truncate 1 +for valid values. +.Pp +Virtual machine disk images are, by default, created as sparse images. +When +.Va WITH_COMPRESSED_VMIMAGES +is used, the resulting files compressed with +.Xr xz 1 +compress to roughly the same size, regardless of the specified disk image +size. +.It Va VMFORMATS +Set to the target virtual disk image format(s) to create. +By default, the +.Va vhdf , Va vmdk , Va qcow2 , +and +.Va raw +formats are created. +See +.Xr mkimg 1 +for valid format values +.Pq requires version 20140927 or later . +.El .Sh MAKEFILE TARGETS The release makefile .Pq Pa src/release/Makefile @@ -407,6 +462,14 @@ Creates a directory named .Pa ftp containing the distribution files used in network installations and suitable for upload to an FTP mirror. +.It Cm vm-image +Creates virtual machine disk images in various formats. +The +.Cm vm-image +target requires the +.Va WITH_VMIMAGES +.Xr make 1 +envirionment variable to be set to a non-null value. .El .Pp Major subtargets called by targets above: From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 04:34:47 2014 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 564E74A7; Wed, 8 Oct 2014 04:34: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 4236118A; Wed, 8 Oct 2014 04:34: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 s984Yl1V030699; Wed, 8 Oct 2014 04:34:47 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s984YlUw030698; Wed, 8 Oct 2014 04:34:47 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201410080434.s984YlUw030698@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Wed, 8 Oct 2014 04:34:47 +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: r272725 - stable/8/sys/vm 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.18-1 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, 08 Oct 2014 04:34:47 -0000 Author: bryanv Date: Wed Oct 8 04:34:46 2014 New Revision: 272725 URL: https://svnweb.freebsd.org/changeset/base/272725 Log: MFC 272550: Remove stray uma_mtx lock/unlock in zone_drain_wait() Callers of zone_drain_wait(M_WAITOK) do not need to hold (and were not) the uma_mtx, but we would attempt to unlock and relock the mutex if we had to sleep because the zone was already draining. The M_NOWAIT callers may hold the uma_mtx, but we do not sleep in that case. Modified: stable/8/sys/vm/uma_core.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/vm/ (props changed) Modified: stable/8/sys/vm/uma_core.c ============================================================================== --- stable/8/sys/vm/uma_core.c Wed Oct 8 04:25:17 2014 (r272724) +++ stable/8/sys/vm/uma_core.c Wed Oct 8 04:34:46 2014 (r272725) @@ -761,9 +761,7 @@ zone_drain_wait(uma_zone_t zone, int wai while (zone->uz_flags & UMA_ZFLAG_DRAINING) { if (waitok == M_NOWAIT) goto out; - mtx_unlock(&uma_mtx); msleep(zone, zone->uz_lock, PVM, "zonedrain", 1); - mtx_lock(&uma_mtx); } zone->uz_flags |= UMA_ZFLAG_DRAINING; bucket_cache_drain(zone); From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 04:35:10 2014 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 85A915D6; Wed, 8 Oct 2014 04:35:10 +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 71B26191; Wed, 8 Oct 2014 04:35:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s984ZA82030838; Wed, 8 Oct 2014 04:35:10 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s984ZAC4030837; Wed, 8 Oct 2014 04:35:10 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201410080435.s984ZAC4030837@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Wed, 8 Oct 2014 04:35: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: r272726 - 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.18-1 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, 08 Oct 2014 04:35:10 -0000 Author: neel Date: Wed Oct 8 04:35:09 2014 New Revision: 272726 URL: https://svnweb.freebsd.org/changeset/base/272726 Log: MFC r272270: tty_rel_free() can be called more than once for the same tty so make sure that the tty is dequeued from 'tty_list' only the first time. Modified: stable/10/sys/kern/tty.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/tty.c ============================================================================== --- stable/10/sys/kern/tty.c Wed Oct 8 04:34:46 2014 (r272725) +++ stable/10/sys/kern/tty.c Wed Oct 8 04:35:09 2014 (r272726) @@ -1055,13 +1055,13 @@ tty_rel_free(struct tty *tp) tp->t_dev = NULL; tty_unlock(tp); - sx_xlock(&tty_list_sx); - TAILQ_REMOVE(&tty_list, tp, t_list); - tty_list_count--; - sx_xunlock(&tty_list_sx); - - if (dev != NULL) + if (dev != NULL) { + sx_xlock(&tty_list_sx); + TAILQ_REMOVE(&tty_list, tp, t_list); + tty_list_count--; + sx_xunlock(&tty_list_sx); destroy_dev_sched_cb(dev, tty_dealloc, tp); + } } void From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 04:42:58 2014 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 6BDF77C9; Wed, 8 Oct 2014 04:42: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 55B4E25C; Wed, 8 Oct 2014 04:42: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 s984gwRI035167; Wed, 8 Oct 2014 04:42:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s984gv1H035160; Wed, 8 Oct 2014 04:42:57 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410080442.s984gv1H035160@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 8 Oct 2014 04:42:57 +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: r272727 - in stable/10: release release/amd64 release/i386 share/man/man7 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.18-1 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, 08 Oct 2014 04:42:58 -0000 Author: gjb Date: Wed Oct 8 04:42:56 2014 New Revision: 272727 URL: https://svnweb.freebsd.org/changeset/base/272727 Log: Revert r272724: Features not yet available in stable/10 are needed in mkimg(1), and it is more dangerous to tweak these changes in stable/10 directly without explicitly testing certain failure cases. Re-addition of this change is imminent. Sponsored by: The FreeBSD Foundation Deleted: stable/10/release/amd64/mk-vmimage.sh stable/10/release/i386/mk-vmimage.sh Modified: stable/10/release/Makefile stable/10/release/release.conf.sample stable/10/release/release.sh stable/10/share/man/man7/release.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Wed Oct 8 04:35:09 2014 (r272726) +++ stable/10/release/Makefile Wed Oct 8 04:42:56 2014 (r272727) @@ -23,9 +23,6 @@ # WITH_DVD: if set, generate dvd1.iso # WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1) # (uncompressed images are not removed) -# WITH_VMIMAGES: if set, build virtual machine images with the release -# WITH_COMPRESSED_VMIMAGES: if set, compress virtual machine disk images -# with xz(1) (extremely time consuming) # TARGET/TARGET_ARCH: architecture of built release # @@ -113,11 +110,6 @@ IMAGES+= uefi-dvd1.iso . endif .endif -VMTARGETS= vm-base vm-image -VMFORMATS?= vhd vmdk qcow2 raw -VMSIZE?= 20G -VMBASE?= vm - CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} .if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) . for I in ${IMAGES} @@ -127,16 +119,7 @@ CLEANFILES+= ${I}.xz .if defined(WITH_DVD) && !empty(WITH_DVD) CLEANFILES+= pkg-stage .endif -.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) -CLEANFILES+= ${VMBASE}.img -. for FORMAT in ${VMFORMATS} -CLEANFILES+= ${VMBASE}.${FORMAT} -. endfor -.endif CLEANDIRS= dist ftp release bootonly dvd -.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) -CLEANDIRS+= ${VMTARGETS} -.endif beforeclean: chflags -R noschg . .include @@ -314,9 +297,6 @@ ftp: packagesystem release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} -.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) - ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${VMTARGETS} -.endif install: .if defined(DESTDIR) && !empty(DESTDIR) @@ -331,44 +311,3 @@ install: .endfor cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 cd ${DESTDIR} && md5 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.MD5 -.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) - mkdir -p ${DESTDIR}/vmimages -. for FORMAT in ${VMFORMATS} - cp -p ${VMBASE}.${FORMAT} \ - ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} -. endfor -. if defined(WITH_COMPRESSED_VMIMAGES) && !empty(WITH_COMPRESSED_VMIMAGES) -# This is very time consuming, so defer it after the images are moved to -# the DESTDIR. -. for FORMAT in ${VMFORMATS} - # Don't keep the originals. There is a copy in ${.OBJDIR} if needed. - ${XZCMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} -. endfor -. endif - cd ${DESTDIR}/vmimages && sha256 ${OSRELEASE}* > \ - ${DESTDIR}/vmimages/CHECKSUM.SHA256 - cd ${DESTDIR}/vmimages && md5 ${OSRELEASE}* > \ - ${DESTDIR}/vmimages/CHECKSUM.MD5 -.endif - -vm-base: -.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) -. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ - ${VMBASE}.img ${WORLDDIR} ${.OBJDIR}/${.TARGET} ${VMSIZE} -. endif -.endif - touch ${.TARGET} - -vm-image: vm-base -.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) -. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) -. for FORMAT in ${VMFORMATS} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ - ${VMBASE}.img ${FORMAT} ${VMBASE}.${FORMAT} -. endfor -. endif -.endif - touch ${.TARGET} Modified: stable/10/release/release.conf.sample ============================================================================== --- stable/10/release/release.conf.sample Wed Oct 8 04:35:09 2014 (r272726) +++ stable/10/release/release.conf.sample Wed Oct 8 04:42:56 2014 (r272727) @@ -72,24 +72,3 @@ PORTBRANCH="ports/head@rHEAD" ## as TARGET/TARGET_ARCH. #CHROOT_MAKEENV= -## Set to a non-empty value to build virtual machine images as part of the -## release build. -#WITH_VMIMAGES= - -## Set to a non-empty value to compress virtual machine images with xz(1) -## as part of the release build. -#WITH_COMPRESSED_VMIMAGES= - -## If WITH_VMIMAGES is set to a non-empty value, this is the name of the -## file to use for the installed userland/kernel. -#VMBASE="vm" - -## If WITH_VMIMAGES is set to a non-empty value, this is the size of the -## virtual machine disk filesystem. Valid size values are described in -## the truncate(1) manual page. -#VMSIZE="20G" - -## If WITH_VMIMAGES is set to a non-empty value, this is a list of disk -## image formats to create. Valid values are listed in the mkimg(1) -## manual page, as well as 'mkimg --formats' output. -#VMFORMATS="vhdf vmdk qcow2 raw" Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Wed Oct 8 04:35:09 2014 (r272726) +++ stable/10/release/release.sh Wed Oct 8 04:42:56 2014 (r272727) @@ -85,11 +85,6 @@ NOPORTS= WITH_DVD= WITH_COMPRESSED_IMAGES= -# Set to non-empty value to build virtual machine images as part of -# the release. -WITH_VMIMAGES= -WITH_COMPRESSED_VMIMAGES= - usage() { echo "Usage: $0 [-c release.conf]" exit 1 @@ -173,7 +168,7 @@ CHROOT_DMAKEFLAGS="${CONF_FILES}" RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} ${CONF_FILES}" RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}" RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \ - ${DOCPORTS} WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES}" + ${DOCPORTS} WITH_DVD=${WITH_DVD}" # Force src checkout if configured FORCE_SRC_KEY= @@ -276,5 +271,4 @@ eval chroot ${CHROOTDIR} make -C /usr/sr eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ release eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ - install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} \ - WITH_COMPRESSED_VMIMAGES=${WITH_COMPRESSED_VMIMAGES} + install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} Modified: stable/10/share/man/man7/release.7 ============================================================================== --- stable/10/share/man/man7/release.7 Wed Oct 8 04:35:09 2014 (r272726) +++ stable/10/share/man/man7/release.7 Wed Oct 8 04:42:56 2014 (r272727) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 2, 2014 +.Dd April 11, 2014 .Dt RELEASE 7 .Os .Sh NAME @@ -351,61 +351,6 @@ Set to the target directory within to check out .Va ${UBOOTSRC}/${UBOOTBRANCH} . .El -.Sh VIRTUAL MACHINE DISK IMAGES -The following -.Fa release.conf -variables are relevant only to virtual machine disk image builds: -.Bl -tag -width Ev -.It Va WITH_VMIMAGES -Set to a non-null value to build virtual machine disk images as part -of the release build. -.Va WITH_VMIMAGES -may also be specified as an envirionment variable passed to -.Xr make 1 . -.Pp -The option requires -.Xr mkimg 1 -version 20140927 or later. -.It Va WITH_COMPRESSED_VMIMAGES -Set to a non-null value to compress the virtual machine disk images with -.Xr xz 1 -as part of the -.Cm install -.Xr make 1 -target. -Note that compressing virtual machine disk images may take a very long -time on some systems. -.It Va VMBASE -Set to change the name of the resulting virtual machine disk image file. -The default value is -.Va vm . -.It Va VMSIZE -Set to change the size of the virtual machine disk capacity. -The default value is -.Va 20G . -See -.Xr truncate 1 -for valid values. -.Pp -Virtual machine disk images are, by default, created as sparse images. -When -.Va WITH_COMPRESSED_VMIMAGES -is used, the resulting files compressed with -.Xr xz 1 -compress to roughly the same size, regardless of the specified disk image -size. -.It Va VMFORMATS -Set to the target virtual disk image format(s) to create. -By default, the -.Va vhdf , Va vmdk , Va qcow2 , -and -.Va raw -formats are created. -See -.Xr mkimg 1 -for valid format values -.Pq requires version 20140927 or later . -.El .Sh MAKEFILE TARGETS The release makefile .Pq Pa src/release/Makefile @@ -462,14 +407,6 @@ Creates a directory named .Pa ftp containing the distribution files used in network installations and suitable for upload to an FTP mirror. -.It Cm vm-image -Creates virtual machine disk images in various formats. -The -.Cm vm-image -target requires the -.Va WITH_VMIMAGES -.Xr make 1 -envirionment variable to be set to a non-null value. .El .Pp Major subtargets called by targets above: From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 04:46:14 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAF48926; Wed, 8 Oct 2014 04:46:13 +0000 (UTC) Date: Tue, 7 Oct 2014 21:46:11 -0700 From: Glen Barber To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r272727 - in stable/10: release release/amd64 release/i386 share/man/man7 Message-ID: <20141008044611.GH1562@hub.FreeBSD.org> References: <201410080442.s984gv1H035160@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="c7hkjup166d4FzgN" Content-Disposition: inline In-Reply-To: <201410080442.s984gv1H035160@svn.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 08 Oct 2014 04:46:14 -0000 --c7hkjup166d4FzgN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 08, 2014 at 04:42:57AM +0000, Glen Barber wrote: > Author: gjb > Date: Wed Oct 8 04:42:56 2014 > New Revision: 272727 > URL: https://svnweb.freebsd.org/changeset/base/272727 >=20 > Log: > Revert r272724: > Features not yet available in stable/10 are needed in > mkimg(1), and it is more dangerous to tweak these changes > in stable/10 directly without explicitly testing certain > failure cases. > =20 > Re-addition of this change is imminent. > =20 This is a big pointy-hat to me for not double-checking that the mkimg(1) longopts (--version, --formats, etc.) have been merged yet. Bigger pointy-hat points for committing while tired. Glen --c7hkjup166d4FzgN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJUNMGTAAoJEAMUWKVHj+KTqzEP/31+NuKCG7NByxZt27Dekzfh R4L2eJt3eCe0yAHV0FnAVcOqv93eUmXqJkuyWwjxjxdCU4UQG2iz5msoCQiRCMY3 PT95fYa+ekHPGcp0scwlBmeDnDKGPiZV3sLc1vU4WaPOkeEzNMgmvRz9nk0iSdpQ 59n9bFfOdxAPXkxFwHoLUPQ6rg8asyUKaB2xjlCyqT1VQNawOBdW1Blureymtfo6 LVM/dCKMUEsqdgNIlEKmc7XDwjbycnIti5V6S9V8MWOsd2yUYRfDWI37jrUj+xM0 Yx5I1puFZXGkXzU5+tPQmL51BupJM26v9WKm+/Y+BhYI0gIBPP8U5tsVX2ndEmyD y8n9oo5UHck7EaRxkmzgWQyCEK6nE7GFa9PlOFPkhdax64R1MH/lUElOyTu49eTG VWzVWpNwrFiG63zOI98UG7dd9qTGfHsaNKBwv3lTesAC4+i3ynwRuyaugv/ZeeBL gesYz3bqByb7EKrhIvl9o7sE3Ys479R8h+WP/Xupg1xr93Z1Zvl/M2Sws357KVvG pn2coGxMdwyGJ/k942YmjVNXV9BCPTT2ZuIwto7dWDt93zGr0dNpZYb0Y8/ygmb9 rKeIrGHHGMgqBfSAz49Uib/YfNeUz8QrbefgSZe/HpNIK9UPg2V6KqsY2tMHucxH Cp0ZRADy0pPTG5jPMn6a =zogD -----END PGP SIGNATURE----- --c7hkjup166d4FzgN-- From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 15:44:12 2014 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 684D937F; Wed, 8 Oct 2014 15:44: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 4918B124; Wed, 8 Oct 2014 15:44: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 s98FiCr3057084; Wed, 8 Oct 2014 15:44:12 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s98FiCov057083; Wed, 8 Oct 2014 15:44:12 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201410081544.s98FiCov057083@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 8 Oct 2014 15:44: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: r272753 - stable/10/contrib/libc-vis 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.18-1 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, 08 Oct 2014 15:44:12 -0000 Author: brooks Date: Wed Oct 8 15:44:11 2014 New Revision: 272753 URL: https://svnweb.freebsd.org/changeset/base/272753 Log: MFC r271287: Merge from NetBSD: PR/49185: Conrad Meyer: strvisx: Handle zero-length input strings gracefully. (don't abuse 0 to mean compute string length internally) PR: 193447 Submitted by: Conrad Meyer Modified: stable/10/contrib/libc-vis/vis.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libc-vis/vis.c ============================================================================== --- stable/10/contrib/libc-vis/vis.c Wed Oct 8 15:39:24 2014 (r272752) +++ stable/10/contrib/libc-vis/vis.c Wed Oct 8 15:44:11 2014 (r272753) @@ -1,4 +1,4 @@ -/* $NetBSD: vis.c,v 1.60 2013/02/21 16:21:20 joerg Exp $ */ +/* $NetBSD: vis.c,v 1.62 2014/09/08 17:35:01 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -57,7 +57,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: vis.c,v 1.60 2013/02/21 16:21:20 joerg Exp $"); +__RCSID("$NetBSD: vis.c,v 1.62 2014/09/08 17:35:01 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef __FBSDID __FBSDID("$FreeBSD$"); @@ -357,7 +357,7 @@ istrsenvisx(char *mbdst, size_t *dlen, c ssize_t mbslength, maxolen; _DIAGASSERT(mbdst != NULL); - _DIAGASSERT(mbsrc != NULL); + _DIAGASSERT(mbsrc != NULL || mblength == 0); _DIAGASSERT(mbextra != NULL); /* @@ -375,8 +375,6 @@ istrsenvisx(char *mbdst, size_t *dlen, c /* Allocate space for the wide char strings */ psrc = pdst = extra = NULL; - if (!mblength) - mblength = strlen(mbsrc); if ((psrc = calloc(mblength + 1, sizeof(*psrc))) == NULL) return -1; if ((pdst = calloc((4 * mblength) + 1, sizeof(*pdst))) == NULL) @@ -528,6 +526,15 @@ out: free(psrc); return error; } + +static int +istrsenvisxl(char *mbdst, size_t *dlen, const char *mbsrc, + int flags, const char *mbextra, int *cerr_ptr) +{ + return istrsenvisx(mbdst, dlen, mbsrc, + mbsrc != NULL ? strlen(mbsrc) : 0, flags, mbextra, cerr_ptr); +} + #endif #if !HAVE_SVIS @@ -571,13 +578,13 @@ snvis(char *mbdst, size_t dlen, int c, i int strsvis(char *mbdst, const char *mbsrc, int flags, const char *mbextra) { - return istrsenvisx(mbdst, NULL, mbsrc, 0, flags, mbextra, NULL); + return istrsenvisxl(mbdst, NULL, mbsrc, flags, mbextra, NULL); } int strsnvis(char *mbdst, size_t dlen, const char *mbsrc, int flags, const char *mbextra) { - return istrsenvisx(mbdst, &dlen, mbsrc, 0, flags, mbextra, NULL); + return istrsenvisxl(mbdst, &dlen, mbsrc, flags, mbextra, NULL); } int @@ -646,13 +653,13 @@ nvis(char *mbdst, size_t dlen, int c, in int strvis(char *mbdst, const char *mbsrc, int flags) { - return istrsenvisx(mbdst, NULL, mbsrc, 0, flags, "", NULL); + return istrsenvisxl(mbdst, NULL, mbsrc, flags, "", NULL); } int strnvis(char *mbdst, size_t dlen, const char *mbsrc, int flags) { - return istrsenvisx(mbdst, &dlen, mbsrc, 0, flags, "", NULL); + return istrsenvisxl(mbdst, &dlen, mbsrc, flags, "", NULL); } /* From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 15:45:16 2014 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 8C0044C9; Wed, 8 Oct 2014 15:45:16 +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 775ED137; Wed, 8 Oct 2014 15:45: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 s98FjGhg057392; Wed, 8 Oct 2014 15:45:16 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s98FjGBO057391; Wed, 8 Oct 2014 15:45:16 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201410081545.s98FjGBO057391@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 8 Oct 2014 15:45: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: r272754 - 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.18-1 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, 08 Oct 2014 15:45:16 -0000 Author: tuexen Date: Wed Oct 8 15:45:15 2014 New Revision: 272754 URL: https://svnweb.freebsd.org/changeset/base/272754 Log: MFC r272706: Fix a bug introduced in https://svnweb.freebsd.org/base?view=revision&revision=272347 Modified: stable/10/sys/netinet6/udp6_usrreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/udp6_usrreq.c ============================================================================== --- stable/10/sys/netinet6/udp6_usrreq.c Wed Oct 8 15:44:11 2014 (r272753) +++ stable/10/sys/netinet6/udp6_usrreq.c Wed Oct 8 15:45:15 2014 (r272754) @@ -263,7 +263,7 @@ udp6_input(struct mbuf **mp, int *offp, if (uh_sum != 0) { UDPSTAT_INC(udps_badsum); - /*goto badunlocked;*/ + goto badunlocked; } /* From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 15:58:30 2014 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 C173DA0D; Wed, 8 Oct 2014 15:58: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 AB8A729C; Wed, 8 Oct 2014 15:58: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 s98FwUbC062512; Wed, 8 Oct 2014 15:58:30 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s98FwTne062506; Wed, 8 Oct 2014 15:58:29 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201410081558.s98FwTne062506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 8 Oct 2014 15:58:29 +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: r272755 - in stable/9: contrib/libc-vis etc/rc.d sbin/devd share/man/man4 tools/tools/sysdoc 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.18-1 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, 08 Oct 2014 15:58:30 -0000 Author: brooks Date: Wed Oct 8 15:58:28 2014 New Revision: 272755 URL: https://svnweb.freebsd.org/changeset/base/272755 Log: MFC r271287: Merge from NetBSD: PR/49185: Conrad Meyer: strvisx: Handle zero-length input strings gracefully. (don't abuse 0 to mean compute string length internally) PR: 193447 Submitted by: Conrad Meyer Modified: stable/9/contrib/libc-vis/vis.c stable/9/etc/rc.d/devd stable/9/sbin/devd/devd.cc stable/9/share/man/man4/devctl.4 stable/9/tools/tools/sysdoc/tunables.mdoc Directory Properties: stable/9/ (props changed) stable/9/contrib/libc-vis/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/devd/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/tools/ (props changed) stable/9/tools/tools/ (props changed) stable/9/tools/tools/sysdoc/ (props changed) Modified: stable/9/contrib/libc-vis/vis.c ============================================================================== --- stable/9/contrib/libc-vis/vis.c Wed Oct 8 15:45:15 2014 (r272754) +++ stable/9/contrib/libc-vis/vis.c Wed Oct 8 15:58:28 2014 (r272755) @@ -1,4 +1,4 @@ -/* $NetBSD: vis.c,v 1.60 2013/02/21 16:21:20 joerg Exp $ */ +/* $NetBSD: vis.c,v 1.62 2014/09/08 17:35:01 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -57,7 +57,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: vis.c,v 1.60 2013/02/21 16:21:20 joerg Exp $"); +__RCSID("$NetBSD: vis.c,v 1.62 2014/09/08 17:35:01 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef __FBSDID __FBSDID("$FreeBSD$"); @@ -357,7 +357,7 @@ istrsenvisx(char *mbdst, size_t *dlen, c ssize_t mbslength, maxolen; _DIAGASSERT(mbdst != NULL); - _DIAGASSERT(mbsrc != NULL); + _DIAGASSERT(mbsrc != NULL || mblength == 0); _DIAGASSERT(mbextra != NULL); /* @@ -375,8 +375,6 @@ istrsenvisx(char *mbdst, size_t *dlen, c /* Allocate space for the wide char strings */ psrc = pdst = extra = NULL; - if (!mblength) - mblength = strlen(mbsrc); if ((psrc = calloc(mblength + 1, sizeof(*psrc))) == NULL) return -1; if ((pdst = calloc((4 * mblength) + 1, sizeof(*pdst))) == NULL) @@ -528,6 +526,15 @@ out: free(psrc); return error; } + +static int +istrsenvisxl(char *mbdst, size_t *dlen, const char *mbsrc, + int flags, const char *mbextra, int *cerr_ptr) +{ + return istrsenvisx(mbdst, dlen, mbsrc, + mbsrc != NULL ? strlen(mbsrc) : 0, flags, mbextra, cerr_ptr); +} + #endif #if !HAVE_SVIS @@ -571,13 +578,13 @@ snvis(char *mbdst, size_t dlen, int c, i int strsvis(char *mbdst, const char *mbsrc, int flags, const char *mbextra) { - return istrsenvisx(mbdst, NULL, mbsrc, 0, flags, mbextra, NULL); + return istrsenvisxl(mbdst, NULL, mbsrc, flags, mbextra, NULL); } int strsnvis(char *mbdst, size_t dlen, const char *mbsrc, int flags, const char *mbextra) { - return istrsenvisx(mbdst, &dlen, mbsrc, 0, flags, mbextra, NULL); + return istrsenvisxl(mbdst, &dlen, mbsrc, flags, mbextra, NULL); } int @@ -646,13 +653,13 @@ nvis(char *mbdst, size_t dlen, int c, in int strvis(char *mbdst, const char *mbsrc, int flags) { - return istrsenvisx(mbdst, NULL, mbsrc, 0, flags, "", NULL); + return istrsenvisxl(mbdst, NULL, mbsrc, flags, "", NULL); } int strnvis(char *mbdst, size_t dlen, const char *mbsrc, int flags) { - return istrsenvisx(mbdst, &dlen, mbsrc, 0, flags, "", NULL); + return istrsenvisxl(mbdst, &dlen, mbsrc, flags, "", NULL); } /* Modified: stable/9/etc/rc.d/devd ============================================================================== --- stable/9/etc/rc.d/devd Wed Oct 8 15:45:15 2014 (r272754) +++ stable/9/etc/rc.d/devd Wed Oct 8 15:58:28 2014 (r272755) @@ -30,9 +30,10 @@ devd_prestart () { find_pidfile - # If devd is disabled, turn it off in the kernel to avoid memory leaks. + # If devd is disabled, turn it off in the kernel to avoid unnecessary + # memory usage. if ! checkyesno ${rcvar}; then - $SYSCTL hw.bus.devctl_disable=1 + $SYSCTL hw.bus.devctl_queue=0 fi } Modified: stable/9/sbin/devd/devd.cc ============================================================================== --- stable/9/sbin/devd/devd.cc Wed Oct 8 15:45:15 2014 (r272754) +++ stable/9/sbin/devd/devd.cc Wed Oct 8 15:58:28 2014 (r272755) @@ -99,7 +99,7 @@ __FBSDID("$FreeBSD$"); #define PIPE "/var/run/devd.pipe" #define CF "/etc/devd.conf" -#define SYSCTL "hw.bus.devctl_disable" +#define SYSCTL "hw.bus.devctl_queue" /* * Since the client socket is nonblocking, we must increase its send buffer to @@ -1119,9 +1119,9 @@ check_devd_enabled() len = sizeof(val); if (sysctlbyname(SYSCTL, &val, &len, NULL, 0) != 0) errx(1, "devctl sysctl missing from kernel!"); - if (val) { - warnx("Setting " SYSCTL " to 0"); - val = 0; + if (val == 0) { + warnx("Setting " SYSCTL " to 1000"); + val = 1000; sysctlbyname(SYSCTL, NULL, NULL, &val, sizeof(val)); } } Modified: stable/9/share/man/man4/devctl.4 ============================================================================== --- stable/9/share/man/man4/devctl.4 Wed Oct 8 15:45:15 2014 (r272754) +++ stable/9/share/man/man4/devctl.4 Wed Oct 8 15:58:28 2014 (r272755) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 11, 2003 +.Dd March 26, 2014 .Dt DEVCTL 4 .Os .Sh NAME @@ -73,9 +73,9 @@ If you try to read this device a charact the rest of the data. Listening programs are expected to cope. .Pp -The sysctl and boot parameter -.Va hw.bus.devctl_disable -is used to disable +The sysctl +.Va hw.bus.devctl_queue +can be used to control queue length. It is set to 0 to disable .Nm when no .Xr devd 8 Modified: stable/9/tools/tools/sysdoc/tunables.mdoc ============================================================================== --- stable/9/tools/tools/sysdoc/tunables.mdoc Wed Oct 8 15:45:15 2014 (r272754) +++ stable/9/tools/tools/sysdoc/tunables.mdoc Wed Oct 8 15:58:28 2014 (r272755) @@ -233,16 +233,6 @@ See for more information. --- -hw.bus.devctl_disable -bool - -This can be used to turn off -.Xr devctl 4 -when no -.Xr devd 8 -is running. - ---- hw.bus.devices --- From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 16:29:47 2014 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 88D3C6D4; Wed, 8 Oct 2014 16:29: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 69AAD826; Wed, 8 Oct 2014 16:29: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 s98GTl58077370; Wed, 8 Oct 2014 16:29:47 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s98GTlNo077368; Wed, 8 Oct 2014 16:29:47 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410081629.s98GTlNo077368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 8 Oct 2014 16:29:47 +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: r272758 - stable/10/lib/libc/stdtime 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.18-1 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, 08 Oct 2014 16:29:47 -0000 Author: pfg Date: Wed Oct 8 16:29:46 2014 New Revision: 272758 URL: https://svnweb.freebsd.org/changeset/base/272758 Log: MFC r272273, r272387, r272443, r272533 : Add strptime(3) support for %U and %W Add support for the missing POSIX-2001 %U and %W features: the existing FreeBSD strptime code recognizes both directives and validates that the week number lies in the permitted range, but then simply discards the value. Initial support for the feature was written by Paul Green. David Carlier added the initial handling of tm_wday/tm_yday. Major credit goes to Andrey Chernov for detecting much of the brokenness and rewriting/cleaning most of the code, making it much more robust. Tested independently with the strptime test from the GNU C library. PR: 137307 Relnotes: yes MFC r272441 : strptime: %s format fix. Almost never needed in real life because %s is tends to be only one format spec. 1) Return code of gmtime_r() is checked. 2) All flags are set. Submitted by: ache Modified: stable/10/lib/libc/stdtime/strptime.3 stable/10/lib/libc/stdtime/strptime.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdtime/strptime.3 ============================================================================== --- stable/10/lib/libc/stdtime/strptime.3 Wed Oct 8 16:22:59 2014 (r272757) +++ stable/10/lib/libc/stdtime/strptime.3 Wed Oct 8 16:29:46 2014 (r272758) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" " -.Dd June 25, 2012 +.Dd October 2, 2014 .Dt STRPTIME 3 .Os .Sh NAME @@ -80,6 +80,11 @@ and are now interpreted as beginning at 1969 per POSIX requirements. Years 69-00 are interpreted in the 20th century (1969-2000), years 01-68 in the 21st century (2001-2068). +The +.Fa \&%U +and +.Fa %W +format specifiers accept any value within the range 00 to 53. .Pp If the .Fa format @@ -161,14 +166,6 @@ and 12PM is taken as noon. .Pp The -.Fa \&%U -and -.Fa %W -format specifiers accept any value within the range 00 to 53 -without validating against other values supplied (like month -or day of the year, for example). -.Pp -The .Fa %Z format specifier only accepts time zone abbreviations of the local time zone, or the value "GMT". Modified: stable/10/lib/libc/stdtime/strptime.c ============================================================================== --- stable/10/lib/libc/stdtime/strptime.c Wed Oct 8 16:22:59 2014 (r272757) +++ stable/10/lib/libc/stdtime/strptime.c Wed Oct 8 16:29:46 2014 (r272758) @@ -55,10 +55,32 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "libc_private.h" #include "timelocal.h" +#include "tzfile.h" static char * _strptime(const char *, const char *, struct tm *, int *, locale_t); -#define asizeof(a) (sizeof (a) / sizeof ((a)[0])) +#define asizeof(a) (sizeof(a) / sizeof((a)[0])) + +#define FLAG_NONE (1 << 0) +#define FLAG_YEAR (1 << 1) +#define FLAG_MONTH (1 << 2) +#define FLAG_YDAY (1 << 3) +#define FLAG_MDAY (1 << 4) +#define FLAG_WDAY (1 << 5) + +/* + * Calculate the week day of the first day of a year. Valid for + * the Gregorian calendar, which began Sept 14, 1752 in the UK + * and its colonies. Ref: + * http://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week + */ + +static int +first_wday_of(int year) +{ + return (((2 * (3 - (year / 100) % 4)) + (year % 100) + + ((year % 100) / 4) + (isleap(year) ? 6 : 0) + 1) % 7); +} static char * _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, @@ -66,9 +88,18 @@ _strptime(const char *buf, const char *f { char c; const char *ptr; + int day_offset = -1, wday_offset; + int week_offset; int i, len; + int flags; int Ealternative, Oalternative; - struct lc_time_T *tptr = __get_current_time_locale(locale); + const struct lc_time_T *tptr = __get_current_time_locale(locale); + static int start_of_month[2][13] = { + {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, + {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366} + }; + + flags = FLAG_NONE; ptr = fmt; while (*ptr != 0) { @@ -102,6 +133,7 @@ label: buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_WDAY | FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'C': @@ -119,19 +151,23 @@ label: if (i < 19) return (NULL); - tm->tm_year = i * 100 - 1900; + tm->tm_year = i * 100 - TM_YEAR_BASE; + flags |= FLAG_YEAR; + break; case 'c': buf = _strptime(buf, tptr->c_fmt, tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_WDAY | FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'D': buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'E': @@ -150,6 +186,7 @@ label: buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'R': @@ -180,6 +217,7 @@ label: buf = _strptime(buf, tptr->x_fmt, tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'j': @@ -197,6 +235,8 @@ label: return (NULL); tm->tm_yday = i - 1; + flags |= FLAG_YDAY; + break; case 'M': @@ -302,8 +342,9 @@ label: if (i == asizeof(tptr->weekday)) return (NULL); - tm->tm_wday = i; buf += len; + tm->tm_wday = i; + flags |= FLAG_WDAY; break; case 'U': @@ -327,6 +368,14 @@ label: if (i > 53) return (NULL); + if (c == 'U') + day_offset = TM_SUNDAY; + else + day_offset = TM_MONDAY; + + + week_offset = i; + break; case 'w': @@ -338,6 +387,7 @@ label: return (NULL); tm->tm_wday = i; + flags |= FLAG_WDAY; break; @@ -374,6 +424,7 @@ label: return (NULL); tm->tm_mday = i; + flags |= FLAG_MDAY; break; @@ -413,6 +464,8 @@ label: tm->tm_mon = i; buf += len; + flags |= FLAG_MONTH; + break; case 'm': @@ -430,6 +483,7 @@ label: return (NULL); tm->tm_mon = i - 1; + flags |= FLAG_MONTH; break; @@ -449,8 +503,11 @@ label: } errno = sverrno; buf = cp; - gmtime_r(&t, tm); + if (gmtime_r(&t, tm) == NULL) + return (NULL); *GMTp = 1; + flags |= FLAG_YDAY | FLAG_WDAY | FLAG_MONTH | + FLAG_MDAY | FLAG_YEAR; } break; @@ -471,13 +528,14 @@ label: len--; } if (c == 'Y') - i -= 1900; + i -= TM_YEAR_BASE; if (c == 'y' && i < 69) i += 100; if (i < 0) return (NULL); tm->tm_year = i; + flags |= FLAG_YEAR; break; @@ -543,10 +601,67 @@ label: break; } } + + if (!(flags & FLAG_YDAY) && (flags & FLAG_YEAR)) { + if ((flags & (FLAG_MONTH | FLAG_MDAY)) == + (FLAG_MONTH | FLAG_MDAY)) { + tm->tm_yday = start_of_month[isleap(tm->tm_year + + TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); + flags |= FLAG_YDAY; + } else if (day_offset != -1) { + /* Set the date to the first Sunday (or Monday) + * of the specified week of the year. + */ + if (!(flags & FLAG_WDAY)) { + tm->tm_wday = day_offset; + flags |= FLAG_WDAY; + } + tm->tm_yday = (7 - + first_wday_of(tm->tm_year + TM_YEAR_BASE) + + day_offset) % 7 + (week_offset - 1) * 7 + + tm->tm_wday - day_offset; + flags |= FLAG_YDAY; + } + } + + if ((flags & (FLAG_YEAR | FLAG_YDAY)) == (FLAG_YEAR | FLAG_YDAY)) { + if (!(flags & FLAG_MONTH)) { + i = 0; + while (tm->tm_yday >= + start_of_month[isleap(tm->tm_year + + TM_YEAR_BASE)][i]) + i++; + if (i > 12) { + i = 1; + tm->tm_yday -= + start_of_month[isleap(tm->tm_year + + TM_YEAR_BASE)][12]; + tm->tm_year++; + } + tm->tm_mon = i - 1; + flags |= FLAG_MONTH; + } + if (!(flags & FLAG_MDAY)) { + tm->tm_mday = tm->tm_yday - + start_of_month[isleap(tm->tm_year + TM_YEAR_BASE)] + [tm->tm_mon] + 1; + flags |= FLAG_MDAY; + } + if (!(flags & FLAG_WDAY)) { + i = 0; + wday_offset = first_wday_of(tm->tm_year); + while (i++ <= tm->tm_yday) { + if (wday_offset++ >= 6) + wday_offset = 0; + } + tm->tm_wday = wday_offset; + flags |= FLAG_WDAY; + } + } + return ((char *)buf); } - char * strptime_l(const char * __restrict buf, const char * __restrict fmt, struct tm * __restrict tm, locale_t loc) @@ -564,6 +679,7 @@ strptime_l(const char * __restrict buf, return (ret); } + char * strptime(const char * __restrict buf, const char * __restrict fmt, struct tm * __restrict tm) From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 16:32:03 2014 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 E201283D; Wed, 8 Oct 2014 16:32: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 CCC758CD; Wed, 8 Oct 2014 16:32:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s98GW2hE081159; Wed, 8 Oct 2014 16:32:02 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s98GW2Jb081156; Wed, 8 Oct 2014 16:32:02 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410081632.s98GW2Jb081156@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 8 Oct 2014 16:32:02 +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: r272759 - stable/9/lib/libc/stdtime 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.18-1 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, 08 Oct 2014 16:32:03 -0000 Author: pfg Date: Wed Oct 8 16:32:01 2014 New Revision: 272759 URL: https://svnweb.freebsd.org/changeset/base/272759 Log: MFC r272273, r272387, r272443, r272533 : Add strptime(3) support for %U and %W Add support for the missing POSIX-2001 %U and %W features: the existing FreeBSD strptime code recognizes both directives and validates that the week number lies in the permitted range, but then simply discards the value. Initial support for the feature was written by Paul Green. David Carlier added the initial handling of tm_wday/tm_yday. Major credit goes to Andrey Chernov for detecting much of the brokenness and rewriting/cleaning most of the code, making it much more robust. Tested independently with the strptime test from the GNU C library. PR: 137307 Relnotes: yes MFC r272441 : strptime: %s format fix. Almost never needed in real life because %s is tends to be only one format spec. 1) Return code of gmtime_r() is checked. 2) All flags are set. Submitted by: ache Modified: stable/9/lib/libc/stdtime/strptime.3 stable/9/lib/libc/stdtime/strptime.c Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/stdtime/ (props changed) Modified: stable/9/lib/libc/stdtime/strptime.3 ============================================================================== --- stable/9/lib/libc/stdtime/strptime.3 Wed Oct 8 16:29:46 2014 (r272758) +++ stable/9/lib/libc/stdtime/strptime.3 Wed Oct 8 16:32:01 2014 (r272759) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" " -.Dd June 25, 2012 +.Dd October 2, 2014 .Dt STRPTIME 3 .Os .Sh NAME @@ -80,6 +80,11 @@ and are now interpreted as beginning at 1969 per POSIX requirements. Years 69-00 are interpreted in the 20th century (1969-2000), years 01-68 in the 21st century (2001-2068). +The +.Fa \&%U +and +.Fa %W +format specifiers accept any value within the range 00 to 53. .Pp If the .Fa format @@ -161,14 +166,6 @@ and 12PM is taken as noon. .Pp The -.Fa \&%U -and -.Fa %W -format specifiers accept any value within the range 00 to 53 -without validating against other values supplied (like month -or day of the year, for example). -.Pp -The .Fa %Z format specifier only accepts time zone abbreviations of the local time zone, or the value "GMT". Modified: stable/9/lib/libc/stdtime/strptime.c ============================================================================== --- stable/9/lib/libc/stdtime/strptime.c Wed Oct 8 16:29:46 2014 (r272758) +++ stable/9/lib/libc/stdtime/strptime.c Wed Oct 8 16:32:01 2014 (r272759) @@ -55,10 +55,32 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "libc_private.h" #include "timelocal.h" +#include "tzfile.h" static char * _strptime(const char *, const char *, struct tm *, int *, locale_t); -#define asizeof(a) (sizeof (a) / sizeof ((a)[0])) +#define asizeof(a) (sizeof(a) / sizeof((a)[0])) + +#define FLAG_NONE (1 << 0) +#define FLAG_YEAR (1 << 1) +#define FLAG_MONTH (1 << 2) +#define FLAG_YDAY (1 << 3) +#define FLAG_MDAY (1 << 4) +#define FLAG_WDAY (1 << 5) + +/* + * Calculate the week day of the first day of a year. Valid for + * the Gregorian calendar, which began Sept 14, 1752 in the UK + * and its colonies. Ref: + * http://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week + */ + +static int +first_wday_of(int year) +{ + return (((2 * (3 - (year / 100) % 4)) + (year % 100) + + ((year % 100) / 4) + (isleap(year) ? 6 : 0) + 1) % 7); +} static char * _strptime(const char *buf, const char *fmt, struct tm *tm, int *GMTp, @@ -66,9 +88,18 @@ _strptime(const char *buf, const char *f { char c; const char *ptr; + int day_offset = -1, wday_offset; + int week_offset; int i, len; + int flags; int Ealternative, Oalternative; - struct lc_time_T *tptr = __get_current_time_locale(locale); + const struct lc_time_T *tptr = __get_current_time_locale(locale); + static int start_of_month[2][13] = { + {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}, + {0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366} + }; + + flags = FLAG_NONE; ptr = fmt; while (*ptr != 0) { @@ -102,6 +133,7 @@ label: buf = _strptime(buf, tptr->date_fmt, tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_WDAY | FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'C': @@ -119,19 +151,23 @@ label: if (i < 19) return (NULL); - tm->tm_year = i * 100 - 1900; + tm->tm_year = i * 100 - TM_YEAR_BASE; + flags |= FLAG_YEAR; + break; case 'c': buf = _strptime(buf, tptr->c_fmt, tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_WDAY | FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'D': buf = _strptime(buf, "%m/%d/%y", tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'E': @@ -150,6 +186,7 @@ label: buf = _strptime(buf, "%Y-%m-%d", tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'R': @@ -180,6 +217,7 @@ label: buf = _strptime(buf, tptr->x_fmt, tm, GMTp, locale); if (buf == NULL) return (NULL); + flags |= FLAG_MONTH | FLAG_MDAY | FLAG_YEAR; break; case 'j': @@ -197,6 +235,8 @@ label: return (NULL); tm->tm_yday = i - 1; + flags |= FLAG_YDAY; + break; case 'M': @@ -302,8 +342,9 @@ label: if (i == asizeof(tptr->weekday)) return (NULL); - tm->tm_wday = i; buf += len; + tm->tm_wday = i; + flags |= FLAG_WDAY; break; case 'U': @@ -327,6 +368,14 @@ label: if (i > 53) return (NULL); + if (c == 'U') + day_offset = TM_SUNDAY; + else + day_offset = TM_MONDAY; + + + week_offset = i; + break; case 'w': @@ -338,6 +387,7 @@ label: return (NULL); tm->tm_wday = i; + flags |= FLAG_WDAY; break; @@ -374,6 +424,7 @@ label: return (NULL); tm->tm_mday = i; + flags |= FLAG_MDAY; break; @@ -413,6 +464,8 @@ label: tm->tm_mon = i; buf += len; + flags |= FLAG_MONTH; + break; case 'm': @@ -430,6 +483,7 @@ label: return (NULL); tm->tm_mon = i - 1; + flags |= FLAG_MONTH; break; @@ -449,8 +503,11 @@ label: } errno = sverrno; buf = cp; - gmtime_r(&t, tm); + if (gmtime_r(&t, tm) == NULL) + return (NULL); *GMTp = 1; + flags |= FLAG_YDAY | FLAG_WDAY | FLAG_MONTH | + FLAG_MDAY | FLAG_YEAR; } break; @@ -471,13 +528,14 @@ label: len--; } if (c == 'Y') - i -= 1900; + i -= TM_YEAR_BASE; if (c == 'y' && i < 69) i += 100; if (i < 0) return (NULL); tm->tm_year = i; + flags |= FLAG_YEAR; break; @@ -543,10 +601,67 @@ label: break; } } + + if (!(flags & FLAG_YDAY) && (flags & FLAG_YEAR)) { + if ((flags & (FLAG_MONTH | FLAG_MDAY)) == + (FLAG_MONTH | FLAG_MDAY)) { + tm->tm_yday = start_of_month[isleap(tm->tm_year + + TM_YEAR_BASE)][tm->tm_mon] + (tm->tm_mday - 1); + flags |= FLAG_YDAY; + } else if (day_offset != -1) { + /* Set the date to the first Sunday (or Monday) + * of the specified week of the year. + */ + if (!(flags & FLAG_WDAY)) { + tm->tm_wday = day_offset; + flags |= FLAG_WDAY; + } + tm->tm_yday = (7 - + first_wday_of(tm->tm_year + TM_YEAR_BASE) + + day_offset) % 7 + (week_offset - 1) * 7 + + tm->tm_wday - day_offset; + flags |= FLAG_YDAY; + } + } + + if ((flags & (FLAG_YEAR | FLAG_YDAY)) == (FLAG_YEAR | FLAG_YDAY)) { + if (!(flags & FLAG_MONTH)) { + i = 0; + while (tm->tm_yday >= + start_of_month[isleap(tm->tm_year + + TM_YEAR_BASE)][i]) + i++; + if (i > 12) { + i = 1; + tm->tm_yday -= + start_of_month[isleap(tm->tm_year + + TM_YEAR_BASE)][12]; + tm->tm_year++; + } + tm->tm_mon = i - 1; + flags |= FLAG_MONTH; + } + if (!(flags & FLAG_MDAY)) { + tm->tm_mday = tm->tm_yday - + start_of_month[isleap(tm->tm_year + TM_YEAR_BASE)] + [tm->tm_mon] + 1; + flags |= FLAG_MDAY; + } + if (!(flags & FLAG_WDAY)) { + i = 0; + wday_offset = first_wday_of(tm->tm_year); + while (i++ <= tm->tm_yday) { + if (wday_offset++ >= 6) + wday_offset = 0; + } + tm->tm_wday = wday_offset; + flags |= FLAG_WDAY; + } + } + return ((char *)buf); } - char * strptime_l(const char * __restrict buf, const char * __restrict fmt, struct tm * __restrict tm, locale_t loc) @@ -564,6 +679,7 @@ strptime_l(const char * __restrict buf, return (ret); } + char * strptime(const char * __restrict buf, const char * __restrict fmt, struct tm * __restrict tm) From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 16:35:59 2014 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 64D26B7D; Wed, 8 Oct 2014 16:35: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 4EB95901; Wed, 8 Oct 2014 16:35: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 s98GZxq6082015; Wed, 8 Oct 2014 16:35:59 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s98GZw91082007; Wed, 8 Oct 2014 16:35:58 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201410081635.s98GZw91082007@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 8 Oct 2014 16:35:58 +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: r272760 - in stable/9: contrib/libc-vis etc/rc.d sbin/devd share/man/man4 tools/tools/sysdoc 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.18-1 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, 08 Oct 2014 16:35:59 -0000 Author: brooks Date: Wed Oct 8 16:35:57 2014 New Revision: 272760 URL: https://svnweb.freebsd.org/changeset/base/272760 Log: Revert botched r272755. PR: 193447 Modified: stable/9/contrib/libc-vis/vis.c stable/9/etc/rc.d/devd stable/9/sbin/devd/devd.cc stable/9/share/man/man4/devctl.4 stable/9/tools/tools/sysdoc/tunables.mdoc Directory Properties: stable/9/ (props changed) stable/9/contrib/libc-vis/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/devd/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/tools/ (props changed) stable/9/tools/tools/ (props changed) stable/9/tools/tools/sysdoc/ (props changed) Modified: stable/9/contrib/libc-vis/vis.c ============================================================================== --- stable/9/contrib/libc-vis/vis.c Wed Oct 8 16:32:01 2014 (r272759) +++ stable/9/contrib/libc-vis/vis.c Wed Oct 8 16:35:57 2014 (r272760) @@ -1,4 +1,4 @@ -/* $NetBSD: vis.c,v 1.62 2014/09/08 17:35:01 christos Exp $ */ +/* $NetBSD: vis.c,v 1.60 2013/02/21 16:21:20 joerg Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -57,7 +57,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: vis.c,v 1.62 2014/09/08 17:35:01 christos Exp $"); +__RCSID("$NetBSD: vis.c,v 1.60 2013/02/21 16:21:20 joerg Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef __FBSDID __FBSDID("$FreeBSD$"); @@ -357,7 +357,7 @@ istrsenvisx(char *mbdst, size_t *dlen, c ssize_t mbslength, maxolen; _DIAGASSERT(mbdst != NULL); - _DIAGASSERT(mbsrc != NULL || mblength == 0); + _DIAGASSERT(mbsrc != NULL); _DIAGASSERT(mbextra != NULL); /* @@ -375,6 +375,8 @@ istrsenvisx(char *mbdst, size_t *dlen, c /* Allocate space for the wide char strings */ psrc = pdst = extra = NULL; + if (!mblength) + mblength = strlen(mbsrc); if ((psrc = calloc(mblength + 1, sizeof(*psrc))) == NULL) return -1; if ((pdst = calloc((4 * mblength) + 1, sizeof(*pdst))) == NULL) @@ -526,15 +528,6 @@ out: free(psrc); return error; } - -static int -istrsenvisxl(char *mbdst, size_t *dlen, const char *mbsrc, - int flags, const char *mbextra, int *cerr_ptr) -{ - return istrsenvisx(mbdst, dlen, mbsrc, - mbsrc != NULL ? strlen(mbsrc) : 0, flags, mbextra, cerr_ptr); -} - #endif #if !HAVE_SVIS @@ -578,13 +571,13 @@ snvis(char *mbdst, size_t dlen, int c, i int strsvis(char *mbdst, const char *mbsrc, int flags, const char *mbextra) { - return istrsenvisxl(mbdst, NULL, mbsrc, flags, mbextra, NULL); + return istrsenvisx(mbdst, NULL, mbsrc, 0, flags, mbextra, NULL); } int strsnvis(char *mbdst, size_t dlen, const char *mbsrc, int flags, const char *mbextra) { - return istrsenvisxl(mbdst, &dlen, mbsrc, flags, mbextra, NULL); + return istrsenvisx(mbdst, &dlen, mbsrc, 0, flags, mbextra, NULL); } int @@ -653,13 +646,13 @@ nvis(char *mbdst, size_t dlen, int c, in int strvis(char *mbdst, const char *mbsrc, int flags) { - return istrsenvisxl(mbdst, NULL, mbsrc, flags, "", NULL); + return istrsenvisx(mbdst, NULL, mbsrc, 0, flags, "", NULL); } int strnvis(char *mbdst, size_t dlen, const char *mbsrc, int flags) { - return istrsenvisxl(mbdst, &dlen, mbsrc, flags, "", NULL); + return istrsenvisx(mbdst, &dlen, mbsrc, 0, flags, "", NULL); } /* Modified: stable/9/etc/rc.d/devd ============================================================================== --- stable/9/etc/rc.d/devd Wed Oct 8 16:32:01 2014 (r272759) +++ stable/9/etc/rc.d/devd Wed Oct 8 16:35:57 2014 (r272760) @@ -30,10 +30,9 @@ devd_prestart () { find_pidfile - # If devd is disabled, turn it off in the kernel to avoid unnecessary - # memory usage. + # If devd is disabled, turn it off in the kernel to avoid memory leaks. if ! checkyesno ${rcvar}; then - $SYSCTL hw.bus.devctl_queue=0 + $SYSCTL hw.bus.devctl_disable=1 fi } Modified: stable/9/sbin/devd/devd.cc ============================================================================== --- stable/9/sbin/devd/devd.cc Wed Oct 8 16:32:01 2014 (r272759) +++ stable/9/sbin/devd/devd.cc Wed Oct 8 16:35:57 2014 (r272760) @@ -99,7 +99,7 @@ __FBSDID("$FreeBSD$"); #define PIPE "/var/run/devd.pipe" #define CF "/etc/devd.conf" -#define SYSCTL "hw.bus.devctl_queue" +#define SYSCTL "hw.bus.devctl_disable" /* * Since the client socket is nonblocking, we must increase its send buffer to @@ -1119,9 +1119,9 @@ check_devd_enabled() len = sizeof(val); if (sysctlbyname(SYSCTL, &val, &len, NULL, 0) != 0) errx(1, "devctl sysctl missing from kernel!"); - if (val == 0) { - warnx("Setting " SYSCTL " to 1000"); - val = 1000; + if (val) { + warnx("Setting " SYSCTL " to 0"); + val = 0; sysctlbyname(SYSCTL, NULL, NULL, &val, sizeof(val)); } } Modified: stable/9/share/man/man4/devctl.4 ============================================================================== --- stable/9/share/man/man4/devctl.4 Wed Oct 8 16:32:01 2014 (r272759) +++ stable/9/share/man/man4/devctl.4 Wed Oct 8 16:35:57 2014 (r272760) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 26, 2014 +.Dd February 11, 2003 .Dt DEVCTL 4 .Os .Sh NAME @@ -73,9 +73,9 @@ If you try to read this device a charact the rest of the data. Listening programs are expected to cope. .Pp -The sysctl -.Va hw.bus.devctl_queue -can be used to control queue length. It is set to 0 to disable +The sysctl and boot parameter +.Va hw.bus.devctl_disable +is used to disable .Nm when no .Xr devd 8 Modified: stable/9/tools/tools/sysdoc/tunables.mdoc ============================================================================== --- stable/9/tools/tools/sysdoc/tunables.mdoc Wed Oct 8 16:32:01 2014 (r272759) +++ stable/9/tools/tools/sysdoc/tunables.mdoc Wed Oct 8 16:35:57 2014 (r272760) @@ -233,6 +233,16 @@ See for more information. --- +hw.bus.devctl_disable +bool + +This can be used to turn off +.Xr devctl 4 +when no +.Xr devd 8 +is running. + +--- hw.bus.devices --- From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 22:01:37 2014 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 168DD570; Wed, 8 Oct 2014 22:01: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 021223D7; Wed, 8 Oct 2014 22:01: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 s98M1aiZ040775; Wed, 8 Oct 2014 22:01:36 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s98M1a80040773; Wed, 8 Oct 2014 22:01:36 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201410082201.s98M1a80040773@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Wed, 8 Oct 2014 22:01: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: r272773 - stable/10/usr.bin/mkimg 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.18-1 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, 08 Oct 2014 22:01:37 -0000 Author: marcel Date: Wed Oct 8 22:01:35 2014 New Revision: 272773 URL: https://svnweb.freebsd.org/changeset/base/272773 Log: MFC 271965, 272072, 272086: Add QCOW v1 & v2 support Requested by: gjb Relnotes: yes Added: stable/10/usr.bin/mkimg/qcow.c - copied, changed from r271965, head/usr.bin/mkimg/qcow.c Modified: stable/10/usr.bin/mkimg/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mkimg/Makefile ============================================================================== --- stable/10/usr.bin/mkimg/Makefile Wed Oct 8 21:56:00 2014 (r272772) +++ stable/10/usr.bin/mkimg/Makefile Wed Oct 8 22:01:35 2014 (r272773) @@ -8,6 +8,7 @@ CFLAGS+=-DSPARSE_WRITE # List of formats to support SRCS+= \ + qcow.c \ raw.c \ vhd.c \ vmdk.c Copied and modified: stable/10/usr.bin/mkimg/qcow.c (from r271965, head/usr.bin/mkimg/qcow.c) ============================================================================== --- head/usr.bin/mkimg/qcow.c Mon Sep 22 15:05:28 2014 (r271965, copy source) +++ stable/10/usr.bin/mkimg/qcow.c Wed Oct 8 22:01:35 2014 (r272773) @@ -40,12 +40,14 @@ __FBSDID("$FreeBSD$"); #include "format.h" #include "mkimg.h" -#undef QCOW_SUPPORT_QCOW2 - /* Default cluster sizes. */ #define QCOW1_CLSTR_LOG2SZ 12 /* 4KB */ #define QCOW2_CLSTR_LOG2SZ 16 /* 64KB */ +/* Flag bits in cluster offsets */ +#define QCOW_CLSTR_COMPRESSED (1ULL << 62) +#define QCOW_CLSTR_COPIED (1ULL << 63) + struct qcow_header { uint32_t magic; #define QCOW_MAGIC 0x514649fb @@ -90,7 +92,7 @@ round_clstr(uint64_t ofs) static int qcow_resize(lba_t imgsz, u_int version) { - uint64_t clstrsz, imagesz; + uint64_t imagesz; switch (version) { case QCOW_VERSION_1: @@ -103,12 +105,11 @@ qcow_resize(lba_t imgsz, u_int version) return (EDOOFUS); } - clstrsz = 1UL << clstr_log2sz; imagesz = round_clstr(imgsz * secsz); if (verbose) - fprintf(stderr, "QCOW: image size = %ju, cluster size = %ju\n", - (uintmax_t)imagesz, (uintmax_t)clstrsz); + fprintf(stderr, "QCOW: image size = %ju, cluster size = %u\n", + (uintmax_t)imagesz, (u_int)(1U << clstr_log2sz)); return (image_set_size(imagesz / secsz)); } @@ -120,39 +121,60 @@ qcow1_resize(lba_t imgsz) return (qcow_resize(imgsz, QCOW_VERSION_1)); } -#ifdef QCOW_SUPPORT_QCOW2 static int qcow2_resize(lba_t imgsz) { return (qcow_resize(imgsz, QCOW_VERSION_2)); } -#endif static int qcow_write(int fd, u_int version) { struct qcow_header *hdr; - uint64_t *l1tbl, *l2tbl; - uint16_t *rctbl; - uint64_t n, clstrsz, imagesz, nclstrs; - uint64_t l1ofs, l2ofs, ofs, rcofs; - lba_t blk, blkofs, blkcnt, imgsz; - u_int l1idx, l2idx, l2clstrs; + uint64_t *l1tbl, *l2tbl, *rctbl; + uint16_t *rcblk; + uint64_t clstr_imgsz, clstr_l2tbls, clstr_l1tblsz; + uint64_t clstr_rcblks, clstr_rctblsz; + uint64_t n, imagesz, nclstrs, ofs, ofsflags; + lba_t blk, blkofs, blk_imgsz; + u_int l1clno, l2clno, rcclno; + u_int blk_clstrsz; + u_int clstrsz, l1idx, l2idx; int error; if (clstr_log2sz == 0) return (EDOOFUS); - clstrsz = 1UL << clstr_log2sz; - blkcnt = clstrsz / secsz; - imgsz = image_get_size(); - imagesz = imgsz * secsz; - nclstrs = imagesz >> clstr_log2sz; - l2clstrs = (nclstrs * 8 + clstrsz - 1) > clstr_log2sz; - - l1ofs = clstrsz; - rcofs = round_clstr(l1ofs + l2clstrs * 8); + clstrsz = 1U << clstr_log2sz; + blk_clstrsz = clstrsz / secsz; + blk_imgsz = image_get_size(); + imagesz = blk_imgsz * secsz; + clstr_imgsz = imagesz >> clstr_log2sz; + clstr_l2tbls = round_clstr(clstr_imgsz * 8) >> clstr_log2sz; + clstr_l1tblsz = round_clstr(clstr_l2tbls * 8) >> clstr_log2sz; + nclstrs = clstr_imgsz + clstr_l2tbls + clstr_l1tblsz + 1; + clstr_rcblks = clstr_rctblsz = 0; + do { + n = clstr_rcblks + clstr_rctblsz; + clstr_rcblks = round_clstr((nclstrs + n) * 2) >> clstr_log2sz; + clstr_rctblsz = round_clstr(clstr_rcblks * 8) >> clstr_log2sz; + } while (n < (clstr_rcblks + clstr_rctblsz)); + + /* + * We got all the sizes in clusters. Start the layout. + * 0 - header + * 1 - L1 table + * 2 - RC table (v2 only) + * 3 - L2 tables + * 4 - RC block (v2 only) + * 5 - data + */ + + l1clno = 1; + rcclno = 0; + rctbl = l2tbl = l1tbl = NULL; + rcblk = NULL; hdr = calloc(1, clstrsz); if (hdr == NULL) @@ -163,63 +185,82 @@ qcow_write(int fd, u_int version) be64enc(&hdr->disk_size, imagesz); switch (version) { case QCOW_VERSION_1: - l2ofs = rcofs; /* No reference counting. */ + ofsflags = 0; + l2clno = l1clno + clstr_l1tblsz; hdr->u.v1.clstr_log2sz = clstr_log2sz; hdr->u.v1.l2_log2sz = clstr_log2sz - 3; - be64enc(&hdr->u.v1.l1_offset, l1ofs); + be64enc(&hdr->u.v1.l1_offset, clstrsz * l1clno); break; case QCOW_VERSION_2: - l2ofs = round_clstr(rcofs + (nclstrs + l2clstrs) * 2); + ofsflags = QCOW_CLSTR_COPIED; + rcclno = l1clno + clstr_l1tblsz; + l2clno = rcclno + clstr_rctblsz; be32enc(&hdr->clstr_log2sz, clstr_log2sz); - be32enc(&hdr->u.v2.l1_entries, l2clstrs); - be64enc(&hdr->u.v2.l1_offset, l1ofs); - be64enc(&hdr->u.v2.refcnt_offset, rcofs); - be32enc(&hdr->u.v2.refcnt_entries, l2clstrs); + be32enc(&hdr->u.v2.l1_entries, clstr_l2tbls); + be64enc(&hdr->u.v2.l1_offset, clstrsz * l1clno); + be64enc(&hdr->u.v2.refcnt_offset, clstrsz * rcclno); + be32enc(&hdr->u.v2.refcnt_entries, clstr_rcblks); break; default: return (EDOOFUS); } - l2tbl = l1tbl = NULL; - rctbl = NULL; + if (sparse_write(fd, hdr, clstrsz) < 0) { + error = errno; + goto out; + } + + free(hdr); + hdr = NULL; + + ofs = clstrsz * l2clno; + nclstrs = 1 + clstr_l1tblsz + clstr_rctblsz; - l1tbl = calloc(1, (size_t)(rcofs - l1ofs)); + l1tbl = calloc(1, clstrsz * clstr_l1tblsz); if (l1tbl == NULL) { error = ENOMEM; goto out; } - if (l2ofs != rcofs) { - rctbl = calloc(1, (size_t)(l2ofs - rcofs)); - if (rctbl == NULL) { - error = ENOMEM; - goto out; - } - } - ofs = l2ofs; - for (n = 0; n < nclstrs; n++) { - l1idx = n >> (clstr_log2sz - 3); - if (l1tbl[l1idx] != 0UL) - continue; - blk = n * blkcnt; - if (image_data(blk, blkcnt)) { - be64enc(l1tbl + l1idx, ofs); - ofs += clstrsz; + for (n = 0; n < clstr_imgsz; n++) { + blk = n * blk_clstrsz; + if (image_data(blk, blk_clstrsz)) { + nclstrs++; + l1idx = n >> (clstr_log2sz - 3); + if (l1tbl[l1idx] == 0) { + be64enc(l1tbl + l1idx, ofs + ofsflags); + ofs += clstrsz; + nclstrs++; + } } } - error = 0; - if (!error && sparse_write(fd, hdr, clstrsz) < 0) - error = errno; - if (!error && sparse_write(fd, l1tbl, (size_t)(rcofs - l1ofs)) < 0) + if (sparse_write(fd, l1tbl, clstrsz * clstr_l1tblsz) < 0) { error = errno; - /* XXX refcnt table. */ - if (error) goto out; + } - free(hdr); - hdr = NULL; - if (rctbl != NULL) { + clstr_rcblks = 0; + do { + n = clstr_rcblks; + clstr_rcblks = round_clstr((nclstrs + n) * 2) >> clstr_log2sz; + } while (n < clstr_rcblks); + + if (rcclno > 0) { + rctbl = calloc(1, clstrsz * clstr_rctblsz); + if (rctbl == NULL) { + error = ENOMEM; + goto out; + } + for (n = 0; n < clstr_rcblks; n++) { + be64enc(rctbl + n, ofs); + ofs += clstrsz; + nclstrs++; + } + if (sparse_write(fd, rctbl, clstrsz * clstr_rctblsz) < 0) { + error = errno; + goto out; + } free(rctbl); rctbl = NULL; } @@ -230,17 +271,17 @@ qcow_write(int fd, u_int version) goto out; } - for (l1idx = 0; l1idx < l2clstrs; l1idx++) { + for (l1idx = 0; l1idx < clstr_l2tbls; l1idx++) { if (l1tbl[l1idx] == 0) continue; memset(l2tbl, 0, clstrsz); - blkofs = (lba_t)l1idx * (clstrsz * (clstrsz >> 3)); + blkofs = (lba_t)l1idx * blk_clstrsz * (clstrsz >> 3); for (l2idx = 0; l2idx < (clstrsz >> 3); l2idx++) { - blk = blkofs + (lba_t)l2idx * blkcnt; - if (blk >= imgsz) + blk = blkofs + (lba_t)l2idx * blk_clstrsz; + if (blk >= blk_imgsz) break; - if (image_data(blk, blkcnt)) { - be64enc(l2tbl + l2idx, ofs); + if (image_data(blk, blk_clstrsz)) { + be64enc(l2tbl + l2idx, ofs + ofsflags); ofs += clstrsz; } } @@ -255,11 +296,27 @@ qcow_write(int fd, u_int version) free(l1tbl); l1tbl = NULL; + if (rcclno > 0) { + rcblk = calloc(1, clstrsz * clstr_rcblks); + if (rcblk == NULL) { + error = ENOMEM; + goto out; + } + for (n = 0; n < nclstrs; n++) + be16enc(rcblk + n, 1); + if (sparse_write(fd, rcblk, clstrsz * clstr_rcblks) < 0) { + error = errno; + goto out; + } + free(rcblk); + rcblk = NULL; + } + error = 0; - for (n = 0; n < nclstrs; n++) { - blk = n * blkcnt; - if (image_data(blk, blkcnt)) { - error = image_copyout_region(fd, blk, blkcnt); + for (n = 0; n < clstr_imgsz; n++) { + blk = n * blk_clstrsz; + if (image_data(blk, blk_clstrsz)) { + error = image_copyout_region(fd, blk, blk_clstrsz); if (error) break; } @@ -268,6 +325,8 @@ qcow_write(int fd, u_int version) error = image_copyout_done(fd); out: + if (rcblk != NULL) + free(rcblk); if (l2tbl != NULL) free(l2tbl); if (rctbl != NULL) @@ -286,14 +345,12 @@ qcow1_write(int fd) return (qcow_write(fd, QCOW_VERSION_1)); } -#ifdef QCOW_SUPPORT_QCOW2 static int qcow2_write(int fd) { return (qcow_write(fd, QCOW_VERSION_2)); } -#endif static struct mkimg_format qcow1_format = { .name = "qcow", @@ -303,7 +360,6 @@ static struct mkimg_format qcow1_format }; FORMAT_DEFINE(qcow1_format); -#ifdef QCOW_SUPPORT_QCOW2 static struct mkimg_format qcow2_format = { .name = "qcow2", .description = "QEMU Copy-On-Write, version 2", @@ -311,4 +367,3 @@ static struct mkimg_format qcow2_format .write = qcow2_write, }; FORMAT_DEFINE(qcow2_format); -#endif From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 22:06:40 2014 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 13A2D86B; Wed, 8 Oct 2014 22:06:40 +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 F33B65F6; Wed, 8 Oct 2014 22:06: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 s98M6djX041636; Wed, 8 Oct 2014 22:06:39 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s98M6d1n041633; Wed, 8 Oct 2014 22:06:39 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201410082206.s98M6d1n041633@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Wed, 8 Oct 2014 22:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272774 - stable/10/usr.bin/mkimg 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.18-1 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, 08 Oct 2014 22:06:40 -0000 Author: marcel Date: Wed Oct 8 22:06:38 2014 New Revision: 272774 URL: https://svnweb.freebsd.org/changeset/base/272774 Log: MFC 272198, 272217: Add 3 long options (--version, --formats & --schemes) for getting information about mkimg itself. Requested by: gjb Relnotes: yes Modified: stable/10/usr.bin/mkimg/Makefile stable/10/usr.bin/mkimg/mkimg.1 stable/10/usr.bin/mkimg/mkimg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mkimg/Makefile ============================================================================== --- stable/10/usr.bin/mkimg/Makefile Wed Oct 8 22:01:35 2014 (r272773) +++ stable/10/usr.bin/mkimg/Makefile Wed Oct 8 22:06:38 2014 (r272774) @@ -4,6 +4,8 @@ PROG= mkimg SRCS= format.c image.c mkimg.c scheme.c MAN= mkimg.1 +MKIMG_VERSION=20140927 +CFLAGS+=-DMKIMG_VERSION=${MKIMG_VERSION} CFLAGS+=-DSPARSE_WRITE # List of formats to support Modified: stable/10/usr.bin/mkimg/mkimg.1 ============================================================================== --- stable/10/usr.bin/mkimg/mkimg.1 Wed Oct 8 22:01:35 2014 (r272773) +++ stable/10/usr.bin/mkimg/mkimg.1 Wed Oct 8 22:06:38 2014 (r272774) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 12, 2014 +.Dd September 27, 2014 .Dt MKIMG 1 .Os .Sh NAME @@ -44,6 +44,8 @@ .Fl s Ar scheme .Fl p Ar partition .Op Fl p Ar partition ... +.Nm +.Ar --formats | --schemes | --version .Sh DESCRIPTION The .Nm @@ -122,10 +124,32 @@ utility will generate predictable values .Nm utility will create images that are identical. .Pp -For a complete list of supported partitioning schemes or supported output -format, or for a detailed description of how to specify partitions, run the +A set of long options exist to query about the +.Nm +utilty itself. +Options in this set should be given by themselves because the +.Nm +utility exits immediately after providing the requested information. +The version of the +.Nm +utility is printed when the +.Ar --version +option is given. +The list of supported output formats is printed when the +.Ar --formats +option is given and the list of supported partitioning schemes is printed +when the +.Ar --schemes +option is given. +Both the format and scheme lists a space-separated lists for easy handling +in scripts. +.Pp +For a more descriptive list of supported partitioning schemes or supported +output format, or for a detailed description of how to specify partitions, +run the .Nm utility without any arguments. +This will print a usage message with all the necessary details. .Sh ENVIRONMENT .Bl -tag -width "TMPDIR" -compact .It Ev TMPDIR Modified: stable/10/usr.bin/mkimg/mkimg.c ============================================================================== --- stable/10/usr.bin/mkimg/mkimg.c Wed Oct 8 22:01:35 2014 (r272773) +++ stable/10/usr.bin/mkimg/mkimg.c Wed Oct 8 22:06:38 2014 (r272774) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -48,6 +49,17 @@ __FBSDID("$FreeBSD$"); #include "mkimg.h" #include "scheme.h" +#define LONGOPT_FORMATS 0x01000001 +#define LONGOPT_SCHEMES 0x01000002 +#define LONGOPT_VERSION 0x01000003 + +static struct option longopts[] = { + { "formats", no_argument, NULL, LONGOPT_FORMATS }, + { "schemes", no_argument, NULL, LONGOPT_SCHEMES }, + { "version", no_argument, NULL, LONGOPT_VERSION }, + { NULL, 0, NULL, 0 } +}; + struct partlisthead partlist = STAILQ_HEAD_INITIALIZER(partlist); u_int nparts = 0; @@ -61,15 +73,79 @@ u_int secsz = 512; u_int blksz = 0; static void -usage(const char *why) +print_formats(int usage) { struct mkimg_format *f, **f_iter; + const char *sep; + + if (usage) { + fprintf(stderr, " formats:\n"); + SET_FOREACH(f_iter, formats) { + f = *f_iter; + fprintf(stderr, "\t%s\t- %s\n", f->name, + f->description); + } + } else { + sep = ""; + SET_FOREACH(f_iter, formats) { + f = *f_iter; + printf("%s%s", sep, f->name); + sep = " "; + } + putchar('\n'); + } +} + +static void +print_schemes(int usage) +{ struct mkimg_scheme *s, **s_iter; + const char *sep; + + if (usage) { + fprintf(stderr, " schemes:\n"); + SET_FOREACH(s_iter, schemes) { + s = *s_iter; + fprintf(stderr, "\t%s\t- %s\n", s->name, + s->description); + } + } else { + sep = ""; + SET_FOREACH(s_iter, schemes) { + s = *s_iter; + printf("%s%s", sep, s->name); + sep = " "; + } + putchar('\n'); + } +} + +static void +print_version(void) +{ + u_int width; + +#ifdef __LP64__ + width = 64; +#else + width = 32; +#endif + printf("mkimg %u (%u-bit)\n", MKIMG_VERSION, width); +} + +static void +usage(const char *why) +{ warnx("error: %s", why); - fprintf(stderr, "\nusage: %s \n", getprogname()); + fputc('\n', stderr); + fprintf(stderr, "usage: %s \n", getprogname()); fprintf(stderr, " options:\n"); + fprintf(stderr, "\t--formats\t- list image formats\n"); + fprintf(stderr, "\t--schemes\t- list partition schemes\n"); + fprintf(stderr, "\t--version\t- show version information\n"); + fputc('\n', stderr); fprintf(stderr, "\t-b \t- file containing boot code\n"); fprintf(stderr, "\t-f \n"); fprintf(stderr, "\t-o \t- file to write image into\n"); @@ -81,20 +157,12 @@ usage(const char *why) fprintf(stderr, "\t-P \t- physical sector size\n"); fprintf(stderr, "\t-S \t- logical sector size\n"); fprintf(stderr, "\t-T \t- number of tracks to simulate\n"); - - fprintf(stderr, "\n formats:\n"); - SET_FOREACH(f_iter, formats) { - f = *f_iter; - fprintf(stderr, "\t%s\t- %s\n", f->name, f->description); - } - - fprintf(stderr, "\n schemes:\n"); - SET_FOREACH(s_iter, schemes) { - s = *s_iter; - fprintf(stderr, "\t%s\t- %s\n", s->name, s->description); - } - - fprintf(stderr, "\n partition specification:\n"); + fputc('\n', stderr); + print_formats(1); + fputc('\n', stderr); + print_schemes(1); + fputc('\n', stderr); + fprintf(stderr, " partition specification:\n"); fprintf(stderr, "\t[/]::\t- empty partition of given " "size\n"); fprintf(stderr, "\t[/]:=\t- partition content and size " @@ -366,7 +434,8 @@ main(int argc, char *argv[]) bcfd = -1; outfd = 1; /* Write to stdout by default */ - while ((c = getopt(argc, argv, "b:f:o:p:s:vyH:P:S:T:")) != -1) { + while ((c = getopt_long(argc, argv, "b:f:o:p:s:vyH:P:S:T:", + longopts, NULL)) != -1) { switch (c) { case 'b': /* BOOT CODE */ if (bcfd != -1) @@ -432,6 +501,18 @@ main(int argc, char *argv[]) if (error) errc(EX_DATAERR, error, "track size"); break; + case LONGOPT_FORMATS: + print_formats(0); + exit(EX_OK); + /*NOTREACHED*/ + case LONGOPT_SCHEMES: + print_schemes(0); + exit(EX_OK); + /*NOTREACHED*/ + case LONGOPT_VERSION: + print_version(); + exit(EX_OK); + /*NOTREACHED*/ default: usage("unknown option"); } From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 22:09:37 2014 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 82AAF9F1; Wed, 8 Oct 2014 22:09: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 6E1BD610; Wed, 8 Oct 2014 22:09: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 s98M9bA8042175; Wed, 8 Oct 2014 22:09:37 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s98M9bvW042173; Wed, 8 Oct 2014 22:09:37 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201410082209.s98M9bvW042173@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Wed, 8 Oct 2014 22:09: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: r272775 - stable/10/usr.bin/mkimg 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.18-1 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, 08 Oct 2014 22:09:37 -0000 Author: marcel Date: Wed Oct 8 22:09:36 2014 New Revision: 272775 URL: https://svnweb.freebsd.org/changeset/base/272775 Log: MFC 272384: Improve performance of mking(1). Requested by: gjb Modified: stable/10/usr.bin/mkimg/Makefile stable/10/usr.bin/mkimg/image.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mkimg/Makefile ============================================================================== --- stable/10/usr.bin/mkimg/Makefile Wed Oct 8 22:06:38 2014 (r272774) +++ stable/10/usr.bin/mkimg/Makefile Wed Oct 8 22:09:36 2014 (r272775) @@ -4,7 +4,7 @@ PROG= mkimg SRCS= format.c image.c mkimg.c scheme.c MAN= mkimg.1 -MKIMG_VERSION=20140927 +MKIMG_VERSION=20141001 CFLAGS+=-DMKIMG_VERSION=${MKIMG_VERSION} CFLAGS+=-DSPARSE_WRITE Modified: stable/10/usr.bin/mkimg/image.c ============================================================================== --- stable/10/usr.bin/mkimg/image.c Wed Oct 8 22:06:38 2014 (r272774) +++ stable/10/usr.bin/mkimg/image.c Wed Oct 8 22:09:36 2014 (r272775) @@ -27,71 +27,462 @@ #include __FBSDID("$FreeBSD$"); +#include +#include +#include #include #include #include #include #include +#include #include #include +#include #include #include "image.h" #include "mkimg.h" -#define BUFFER_SIZE (1024*1024) +struct chunk { + STAILQ_ENTRY(chunk) ch_list; + size_t ch_size; /* Size of chunk in bytes. */ + lba_t ch_block; /* Block address in image. */ + union { + struct { + off_t ofs; /* Offset in backing file. */ + int fd; /* FD of backing file. */ + } file; + struct { + void *ptr; /* Pointer to data in memory */ + } mem; + } ch_u; + u_int ch_type; +#define CH_TYPE_ZEROES 0 /* Chunk is a gap (no data). */ +#define CH_TYPE_FILE 1 /* File-backed chunk. */ +#define CH_TYPE_MEMORY 2 /* Memory-backed chunk */ +}; + +static STAILQ_HEAD(chunk_head, chunk) image_chunks; +static u_int image_nchunks; + +static char image_swap_file[PATH_MAX]; +static int image_swap_fd = -1; +static u_int image_swap_pgsz; +static off_t image_swap_size; -static char image_tmpfile[PATH_MAX]; -static int image_fd = -1; static lba_t image_size; -static void -cleanup(void) +static int +is_empty_sector(void *buf) { + uint64_t *p = buf; + size_t n, max; + + assert(((uintptr_t)p & 3) == 0); - if (image_fd != -1) - close(image_fd); - unlink(image_tmpfile); + max = secsz / sizeof(uint64_t); + for (n = 0; n < max; n++) { + if (p[n] != 0UL) + return (0); + } + return (1); } -int -image_copyin(lba_t blk, int fd, uint64_t *sizep) +/* + * Swap file handlng. + */ + +static off_t +image_swap_alloc(size_t size) +{ + off_t ofs; + size_t unit; + + unit = (secsz > image_swap_pgsz) ? secsz : image_swap_pgsz; + assert((unit & (unit - 1)) == 0); + + size = (size + unit - 1) & ~(unit - 1); + + ofs = image_swap_size; + image_swap_size += size; + if (ftruncate(image_swap_fd, image_swap_size) == -1) { + image_swap_size = ofs; + ofs = -1LL; + } + return (ofs); +} + +/* + * Image chunk handling. + */ + +static struct chunk * +image_chunk_find(lba_t blk) +{ + static struct chunk *last = NULL; + struct chunk *ch; + + ch = (last != NULL && last->ch_block <= blk) + ? last : STAILQ_FIRST(&image_chunks); + while (ch != NULL) { + if (ch->ch_block <= blk && + (lba_t)(ch->ch_block + (ch->ch_size / secsz)) > blk) { + last = ch; + break; + } + ch = STAILQ_NEXT(ch, ch_list); + } + return (ch); +} + +static size_t +image_chunk_grow(struct chunk *ch, size_t sz) +{ + size_t dsz, newsz; + + newsz = ch->ch_size + sz; + if (newsz > ch->ch_size) { + ch->ch_size = newsz; + return (0); + } + /* We would overflow -- create new chunk for remainder. */ + dsz = SIZE_MAX - ch->ch_size; + assert(dsz < sz); + ch->ch_size = SIZE_MAX; + return (sz - dsz); +} + +static struct chunk * +image_chunk_memory(struct chunk *ch, lba_t blk) +{ + struct chunk *new; + void *ptr; + + ptr = calloc(1, secsz); + if (ptr == NULL) + return (NULL); + + if (ch->ch_block < blk) { + new = malloc(sizeof(*new)); + if (new == NULL) { + free(ptr); + return (NULL); + } + memcpy(new, ch, sizeof(*new)); + ch->ch_size = (blk - ch->ch_block) * secsz; + new->ch_block = blk; + new->ch_size -= ch->ch_size; + STAILQ_INSERT_AFTER(&image_chunks, ch, new, ch_list); + image_nchunks++; + ch = new; + } + + if (ch->ch_size > secsz) { + new = malloc(sizeof(*new)); + if (new == NULL) { + free(ptr); + return (NULL); + } + memcpy(new, ch, sizeof(*new)); + ch->ch_size = secsz; + new->ch_block++; + new->ch_size -= secsz; + STAILQ_INSERT_AFTER(&image_chunks, ch, new, ch_list); + image_nchunks++; + } + + ch->ch_type = CH_TYPE_MEMORY; + ch->ch_u.mem.ptr = ptr; + return (ch); +} + +static int +image_chunk_skipto(lba_t to) +{ + struct chunk *ch; + lba_t from; + size_t sz; + + ch = STAILQ_LAST(&image_chunks, chunk, ch_list); + from = (ch != NULL) ? ch->ch_block + (ch->ch_size / secsz) : 0LL; + + assert(from <= to); + + /* Nothing to do? */ + if (from == to) + return (0); + /* Avoid bugs due to overflows. */ + if ((uintmax_t)(to - from) > (uintmax_t)(SIZE_MAX / secsz)) + return (EFBIG); + sz = (to - from) * secsz; + if (ch != NULL && ch->ch_type == CH_TYPE_ZEROES) { + sz = image_chunk_grow(ch, sz); + if (sz == 0) + return (0); + from = ch->ch_block + (ch->ch_size / secsz); + } + ch = malloc(sizeof(*ch)); + if (ch == NULL) + return (ENOMEM); + memset(ch, 0, sizeof(*ch)); + ch->ch_block = from; + ch->ch_size = sz; + ch->ch_type = CH_TYPE_ZEROES; + STAILQ_INSERT_TAIL(&image_chunks, ch, ch_list); + image_nchunks++; + return (0); +} + +static int +image_chunk_append(lba_t blk, size_t sz, off_t ofs, int fd) +{ + struct chunk *ch; + + ch = STAILQ_LAST(&image_chunks, chunk, ch_list); + if (ch != NULL && ch->ch_type == CH_TYPE_FILE) { + if (fd == ch->ch_u.file.fd && + blk == (lba_t)(ch->ch_block + (ch->ch_size / secsz)) && + ofs == (off_t)(ch->ch_u.file.ofs + ch->ch_size)) { + sz = image_chunk_grow(ch, sz); + if (sz == 0) + return (0); + blk = ch->ch_block + (ch->ch_size / secsz); + ofs = ch->ch_u.file.ofs + ch->ch_size; + } + } + ch = malloc(sizeof(*ch)); + if (ch == NULL) + return (ENOMEM); + memset(ch, 0, sizeof(*ch)); + ch->ch_block = blk; + ch->ch_size = sz; + ch->ch_type = CH_TYPE_FILE; + ch->ch_u.file.ofs = ofs; + ch->ch_u.file.fd = fd; + STAILQ_INSERT_TAIL(&image_chunks, ch, ch_list); + image_nchunks++; + return (0); +} + +static int +image_chunk_copyin(lba_t blk, void *buf, size_t sz, off_t ofs, int fd) +{ + uint8_t *p = buf; + int error; + + error = 0; + sz = (sz + secsz - 1) & ~(secsz - 1); + while (!error && sz > 0) { + if (is_empty_sector(p)) + error = image_chunk_skipto(blk + 1); + else + error = image_chunk_append(blk, secsz, ofs, fd); + blk++; + p += secsz; + sz -= secsz; + ofs += secsz; + } + return (error); +} + +/* + * File mapping support. + */ + +static void * +image_file_map(int fd, off_t ofs, size_t sz) +{ + void *ptr; + size_t unit; + int flags, prot; + + unit = (secsz > image_swap_pgsz) ? secsz : image_swap_pgsz; + assert((unit & (unit - 1)) == 0); + + flags = MAP_NOCORE | MAP_NOSYNC | MAP_SHARED; + /* Allow writing to our swap file only. */ + prot = PROT_READ | ((fd == image_swap_fd) ? PROT_WRITE : 0); + sz = (sz + unit - 1) & ~(unit - 1); + ptr = mmap(NULL, sz, prot, flags, fd, ofs); + return ((ptr == MAP_FAILED) ? NULL : ptr); +} + +static int +image_file_unmap(void *buffer, size_t sz) +{ + size_t unit; + + unit = (secsz > image_swap_pgsz) ? secsz : image_swap_pgsz; + sz = (sz + unit - 1) & ~(unit - 1); + munmap(buffer, sz); + return (0); +} + +/* + * Input/source file handling. + */ + +static int +image_copyin_stream(lba_t blk, int fd, uint64_t *sizep) { char *buffer; uint64_t bytesize; - ssize_t bcnt, rdsz; - int error, partial; + off_t swofs; + size_t iosz; + ssize_t rdsz; + int error; - assert(BUFFER_SIZE % secsz == 0); + /* + * This makes sure we're doing I/O in multiples of the page + * size as well as of the sector size. 2MB is the minimum + * by virtue of secsz at least 512 bytes and the page size + * at least 4K bytes. + */ + iosz = secsz * image_swap_pgsz; - buffer = malloc(BUFFER_SIZE); - if (buffer == NULL) - return (ENOMEM); bytesize = 0; - partial = 0; - while (1) { - rdsz = read(fd, buffer, BUFFER_SIZE); - if (rdsz <= 0) { - error = (rdsz < 0) ? errno : 0; - break; - } - if (partial) - abort(); - bytesize += rdsz; - bcnt = (rdsz + secsz - 1) / secsz; - error = image_write(blk, buffer, bcnt); + do { + swofs = image_swap_alloc(iosz); + if (swofs == -1LL) + return (errno); + buffer = image_file_map(image_swap_fd, swofs, iosz); + if (buffer == NULL) + return (errno); + rdsz = read(fd, buffer, iosz); + if (rdsz > 0) + error = image_chunk_copyin(blk, buffer, rdsz, swofs, + image_swap_fd); + else if (rdsz < 0) + error = errno; + else + error = 0; + image_file_unmap(buffer, iosz); + /* XXX should we relinguish unused swap space? */ if (error) + return (error); + + bytesize += rdsz; + blk += (rdsz + secsz - 1) / secsz; + } while (rdsz > 0); + + if (sizep != NULL) + *sizep = bytesize; + return (0); +} + +static int +image_copyin_mapped(lba_t blk, int fd, uint64_t *sizep) +{ + off_t cur, data, end, hole, pos; + void *buf; + uint64_t bytesize; + size_t iosz, sz; + int error; + + /* + * We'd like to know the size of the file and we must + * be able to seek in order to mmap(2). If this isn't + * possible, then treat the file as a stream/pipe. + */ + end = lseek(fd, 0L, SEEK_END); + if (end == -1L) + return (image_copyin_stream(blk, fd, sizep)); + + /* + * We need the file opened for the duration and our + * caller is going to close the file. Make a dup(2) + * so that control the faith of the descriptor. + */ + fd = dup(fd); + if (fd == -1) + return (errno); + + iosz = secsz * image_swap_pgsz; + + bytesize = 0; + cur = pos = 0; + error = 0; + while (!error && cur < end) { + hole = lseek(fd, cur, SEEK_HOLE); + data = lseek(fd, cur, SEEK_DATA); + + /* + * Treat the entire file as data if sparse files + * are not supported by the underlying file system. + */ + if (hole == -1 && data == -1) { + data = cur; + hole = end; + } + + if (cur == hole && data > hole) { + hole = pos; + pos = data & ~((uint64_t)secsz - 1); + + blk += (pos - hole) / secsz; + error = image_chunk_skipto(blk); + + bytesize += pos - hole; + cur = data; + } else if (cur == data && hole > data) { + data = pos; + pos = (hole + secsz - 1) & ~((uint64_t)secsz - 1); + + while (data < pos) { + sz = (pos - data > (off_t)iosz) + ? iosz : (size_t)(pos - data); + + buf = image_file_map(fd, data, sz); + if (buf != NULL) { + error = image_chunk_copyin(blk, buf, + sz, data, fd); + image_file_unmap(buf, sz); + } else + error = errno; + + blk += sz / secsz; + bytesize += sz; + data += sz; + } + cur = hole; + } else { + /* + * I don't know what this means or whether it + * can happen at all... + */ + error = EDOOFUS; break; - blk += bcnt; - partial = ((ssize_t)(bcnt * secsz) != rdsz) ? 1 : 0; + } } - free(buffer); - if (sizep != NULL) + if (error) + close(fd); + if (!error && sizep != NULL) *sizep = bytesize; return (error); } int +image_copyin(lba_t blk, int fd, uint64_t *sizep) +{ + struct stat sb; + int error; + + error = image_chunk_skipto(blk); + if (!error) { + if (fstat(fd, &sb) == -1 || !S_ISREG(sb.st_mode)) + error = image_copyin_stream(blk, fd, sizep); + else + error = image_copyin_mapped(blk, fd, sizep); + } + return (error); +} + +/* + * Output/sink file handling. + */ + +int image_copyout(int fd) { int error; @@ -115,71 +506,124 @@ image_copyout_done(int fd) return (error); } -int -image_copyout_region(int fd, lba_t blk, lba_t size) +static int +image_copyout_memory(int fd, size_t size, void *ptr) { - char *buffer; - off_t ofs; + + if (write(fd, ptr, size) == -1) + return (errno); + return (0); +} + +static int +image_copyout_zeroes(int fd, size_t size) +{ + static uint8_t *zeroes = NULL; size_t sz; - ssize_t rdsz, wrsz; int error; - ofs = lseek(fd, 0L, SEEK_CUR); + if (lseek(fd, (off_t)size, SEEK_CUR) != -1) + return (0); + + /* + * If we can't seek, we must write. + */ + + if (zeroes == NULL) { + zeroes = calloc(1, secsz); + if (zeroes == NULL) + return (ENOMEM); + } + + while (size > 0) { + sz = (size > secsz) ? secsz : size; + error = image_copyout_memory(fd, sz, zeroes); + if (error) + return (error); + size -= sz; + } + return (0); +} + +static int +image_copyout_file(int fd, size_t size, int ifd, off_t iofs) +{ + void *buf; + size_t iosz, sz; + int error; + + iosz = secsz * image_swap_pgsz; + + while (size > 0) { + sz = (size > iosz) ? iosz : size; + buf = image_file_map(ifd, iofs, sz); + if (buf == NULL) + return (errno); + error = image_copyout_memory(fd, sz, buf); + image_file_unmap(buf, sz); + if (error) + return (error); + size -= sz; + iofs += sz; + } + return (0); +} + +int +image_copyout_region(int fd, lba_t blk, lba_t size) +{ + struct chunk *ch; + size_t ofs, sz; + int error; - blk *= secsz; - if (lseek(image_fd, blk, SEEK_SET) != blk) - return (errno); - buffer = malloc(BUFFER_SIZE); - if (buffer == NULL) - return (errno); - error = 0; size *= secsz; + while (size > 0) { - sz = (BUFFER_SIZE < size) ? BUFFER_SIZE : size; - rdsz = read(image_fd, buffer, sz); - if (rdsz <= 0) { - error = (rdsz < 0) ? errno : 0; + ch = image_chunk_find(blk); + if (ch == NULL) + return (EINVAL); + ofs = (blk - ch->ch_block) * secsz; + sz = ch->ch_size - ofs; + sz = ((lba_t)sz < size) ? sz : (size_t)size; + switch (ch->ch_type) { + case CH_TYPE_ZEROES: + error = image_copyout_zeroes(fd, sz); break; - } - wrsz = (ofs == -1) ? - write(fd, buffer, rdsz) : - sparse_write(fd, buffer, rdsz); - if (wrsz < 0) { - error = errno; + case CH_TYPE_FILE: + error = image_copyout_file(fd, sz, ch->ch_u.file.fd, + ch->ch_u.file.ofs + ofs); + break; + case CH_TYPE_MEMORY: + error = image_copyout_memory(fd, sz, ch->ch_u.mem.ptr); break; + default: + return (EDOOFUS); } - assert(wrsz == rdsz); - size -= rdsz; + size -= sz; + blk += sz / secsz; } - free(buffer); - return (error); + return (0); } int image_data(lba_t blk, lba_t size) { - char *buffer, *p; - - blk *= secsz; - if (lseek(image_fd, blk, SEEK_SET) != blk) - return (1); + struct chunk *ch; + lba_t lim; - size *= secsz; - buffer = malloc(size); - if (buffer == NULL) - return (1); - - if (read(image_fd, buffer, size) != (ssize_t)size) { - free(buffer); - return (1); + while (1) { + ch = image_chunk_find(blk); + if (ch == NULL) + return (0); + if (ch->ch_type != CH_TYPE_ZEROES) + return (1); + lim = ch->ch_block + (ch->ch_size / secsz); + if (lim >= blk + size) + return (0); + size -= lim - blk; + blk = lim; } - - p = buffer; - while (size > 0 && *p == '\0') - size--, p++; - - free(buffer); - return ((size == 0) ? 0 : 1); + /*NOTREACHED*/ } lba_t @@ -192,39 +636,87 @@ image_get_size(void) int image_set_size(lba_t blk) { + int error; - image_size = blk; - if (ftruncate(image_fd, blk * secsz) == -1) - return (errno); - return (0); + error = image_chunk_skipto(blk); + if (!error) + image_size = blk; + return (error); } int image_write(lba_t blk, void *buf, ssize_t len) { + struct chunk *ch; - blk *= secsz; - if (lseek(image_fd, blk, SEEK_SET) != blk) - return (errno); - len *= secsz; - if (sparse_write(image_fd, buf, len) != len) - return (errno); + while (len > 0) { + if (!is_empty_sector(buf)) { + ch = image_chunk_find(blk); + if (ch == NULL) + return (ENXIO); + /* We may not be able to write to files. */ + if (ch->ch_type == CH_TYPE_FILE) + return (EINVAL); + if (ch->ch_type == CH_TYPE_ZEROES) { + ch = image_chunk_memory(ch, blk); + if (ch == NULL) + return (ENOMEM); + } + assert(ch->ch_type == CH_TYPE_MEMORY); + memcpy(ch->ch_u.mem.ptr, buf, secsz); + } + blk++; + buf = (char *)buf + secsz; + len--; + } return (0); } +static void +image_cleanup(void) +{ + struct chunk *ch; + + while ((ch = STAILQ_FIRST(&image_chunks)) != NULL) { + switch (ch->ch_type) { + case CH_TYPE_FILE: + /* We may be closing the same file multiple times. */ + if (ch->ch_u.file.fd != -1) + close(ch->ch_u.file.fd); + break; + case CH_TYPE_MEMORY: + free(ch->ch_u.mem.ptr); + break; + default: + break; + } + STAILQ_REMOVE_HEAD(&image_chunks, ch_list); + free(ch); + } + if (image_swap_fd != -1) + close(image_swap_fd); + unlink(image_swap_file); +} + int image_init(void) { const char *tmpdir; - if (atexit(cleanup) == -1) + STAILQ_INIT(&image_chunks); + image_nchunks = 0; + + image_swap_size = 0; + image_swap_pgsz = getpagesize(); + + if (atexit(image_cleanup) == -1) return (errno); if ((tmpdir = getenv("TMPDIR")) == NULL || *tmpdir == '\0') tmpdir = _PATH_TMP; - snprintf(image_tmpfile, sizeof(image_tmpfile), "%s/mkimg-XXXXXX", + snprintf(image_swap_file, sizeof(image_swap_file), "%s/mkimg-XXXXXX", tmpdir); - image_fd = mkstemp(image_tmpfile); - if (image_fd == -1) + image_swap_fd = mkstemp(image_swap_file); + if (image_swap_fd == -1) return (errno); return (0); } From owner-svn-src-stable@FreeBSD.ORG Wed Oct 8 22:13:20 2014 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 9611DB77; Wed, 8 Oct 2014 22:13: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 8199C6CC; Wed, 8 Oct 2014 22:13: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 s98MDK6A046125; Wed, 8 Oct 2014 22:13:20 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s98MDJrY046117; Wed, 8 Oct 2014 22:13:19 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201410082213.s98MDJrY046117@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Wed, 8 Oct 2014 22:13: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: r272776 - stable/10/usr.bin/mkimg 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.18-1 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, 08 Oct 2014 22:13:20 -0000 Author: marcel Date: Wed Oct 8 22:13:18 2014 New Revision: 272776 URL: https://svnweb.freebsd.org/changeset/base/272776 Log: MFC r272485: Fill cyclinder, head and sector fields for the EBR, MBR and PC98 schemes. Requested by: gjb Modified: stable/10/usr.bin/mkimg/Makefile stable/10/usr.bin/mkimg/ebr.c stable/10/usr.bin/mkimg/mbr.c stable/10/usr.bin/mkimg/mkimg.c stable/10/usr.bin/mkimg/mkimg.h stable/10/usr.bin/mkimg/pc98.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mkimg/Makefile ============================================================================== --- stable/10/usr.bin/mkimg/Makefile Wed Oct 8 22:09:36 2014 (r272775) +++ stable/10/usr.bin/mkimg/Makefile Wed Oct 8 22:13:18 2014 (r272776) @@ -4,7 +4,9 @@ PROG= mkimg SRCS= format.c image.c mkimg.c scheme.c MAN= mkimg.1 -MKIMG_VERSION=20141001 +MKIMG_VERSION=20141003 +mkimg.o: Makefile + CFLAGS+=-DMKIMG_VERSION=${MKIMG_VERSION} CFLAGS+=-DSPARSE_WRITE Modified: stable/10/usr.bin/mkimg/ebr.c ============================================================================== --- stable/10/usr.bin/mkimg/ebr.c Wed Oct 8 22:09:36 2014 (r272775) +++ stable/10/usr.bin/mkimg/ebr.c Wed Oct 8 22:13:18 2014 (r272776) @@ -58,12 +58,14 @@ ebr_metadata(u_int where, lba_t blk) } static void -ebr_chs(u_char *cyl, u_char *hd, u_char *sec, uint32_t lba __unused) +ebr_chs(u_char *cylp, u_char *hdp, u_char *secp, lba_t lba) { + u_int cyl, hd, sec; - *cyl = 0xff; /* XXX */ - *hd = 0xff; /* XXX */ - *sec = 0xff; /* XXX */ + mkimg_chs(lba, 1023, &cyl, &hd, &sec); + *cylp = cyl; + *hdp = hd; + *secp = (sec & 0x3f) | ((cyl >> 2) & 0xc0); } static int @@ -72,7 +74,7 @@ ebr_write(lba_t imgsz __unused, void *bo u_char *ebr; struct dos_partition *dp; struct part *part, *next; - lba_t block; + lba_t block, size; int error; ebr = malloc(secsz); @@ -84,24 +86,26 @@ ebr_write(lba_t imgsz __unused, void *bo error = 0; STAILQ_FOREACH_SAFE(part, &partlist, link, next) { block = part->block - nsecs; + size = round_track(part->size); dp = (void *)(ebr + DOSPARTOFF); ebr_chs(&dp->dp_scyl, &dp->dp_shd, &dp->dp_ssect, nsecs); dp->dp_typ = ALIAS_TYPE2INT(part->type); ebr_chs(&dp->dp_ecyl, &dp->dp_ehd, &dp->dp_esect, - part->block + part->size - 1); + part->block + size - 1); le32enc(&dp->dp_start, nsecs); - le32enc(&dp->dp_size, part->size); + le32enc(&dp->dp_size, size); /* Add link entry */ if (next != NULL) { + size = round_track(next->size); dp++; ebr_chs(&dp->dp_scyl, &dp->dp_shd, &dp->dp_ssect, next->block - nsecs); dp->dp_typ = DOSPTYP_EXT; ebr_chs(&dp->dp_ecyl, &dp->dp_ehd, &dp->dp_esect, - next->block + next->size - 1); + next->block + size - 1); le32enc(&dp->dp_start, next->block - nsecs); - le32enc(&dp->dp_size, next->size + nsecs); + le32enc(&dp->dp_size, size + nsecs); } error = image_write(block, ebr, 1); Modified: stable/10/usr.bin/mkimg/mbr.c ============================================================================== --- stable/10/usr.bin/mkimg/mbr.c Wed Oct 8 22:09:36 2014 (r272775) +++ stable/10/usr.bin/mkimg/mbr.c Wed Oct 8 22:13:18 2014 (r272776) @@ -59,12 +59,14 @@ mbr_metadata(u_int where, lba_t blk) } static void -mbr_chs(u_char *cyl, u_char *hd, u_char *sec, uint32_t lba __unused) +mbr_chs(u_char *cylp, u_char *hdp, u_char *secp, lba_t lba) { + u_int cyl, hd, sec; - *cyl = 0xff; /* XXX */ - *hd = 0xff; /* XXX */ - *sec = 0xff; /* XXX */ + mkimg_chs(lba, 1023, &cyl, &hd, &sec); + *cylp = cyl; + *hdp = hd; + *secp = (sec & 0x3f) | ((cyl >> 2) & 0xc0); } static int @@ -73,6 +75,7 @@ mbr_write(lba_t imgsz __unused, void *bo u_char *mbr; struct dos_partition *dpbase, *dp; struct part *part; + lba_t size; int error; mbr = malloc(secsz); @@ -86,15 +89,16 @@ mbr_write(lba_t imgsz __unused, void *bo le16enc(mbr + DOSMAGICOFFSET, DOSMAGIC); dpbase = (void *)(mbr + DOSPARTOFF); STAILQ_FOREACH(part, &partlist, link) { + size = round_track(part->size); dp = dpbase + part->index; dp->dp_flag = (part->index == 0 && bootcode != NULL) ? 0x80 : 0; mbr_chs(&dp->dp_scyl, &dp->dp_shd, &dp->dp_ssect, part->block); dp->dp_typ = ALIAS_TYPE2INT(part->type); mbr_chs(&dp->dp_ecyl, &dp->dp_ehd, &dp->dp_esect, - part->block + part->size - 1); + part->block + size - 1); le32enc(&dp->dp_start, part->block); - le32enc(&dp->dp_size, part->size); + le32enc(&dp->dp_size, size); } error = image_write(0, mbr, 1); free(mbr); Modified: stable/10/usr.bin/mkimg/mkimg.c ============================================================================== --- stable/10/usr.bin/mkimg/mkimg.c Wed Oct 8 22:09:36 2014 (r272775) +++ stable/10/usr.bin/mkimg/mkimg.c Wed Oct 8 22:13:18 2014 (r272776) @@ -340,6 +340,27 @@ sparse_write(int fd, const void *ptr, si #endif /* SPARSE_WRITE */ void +mkimg_chs(lba_t lba, u_int maxcyl, u_int *cylp, u_int *hdp, u_int *secp) +{ + u_int hd, sec; + + *cylp = *hdp = *secp = ~0U; + if (nsecs == 1 || nheads == 1) + return; + + sec = lba % nsecs + 1; + lba /= nsecs; + hd = lba % nheads; + lba /= nheads; + if (lba > maxcyl) + return; + + *cylp = lba; + *hdp = hd; + *secp = sec; +} + +void mkimg_uuid(struct uuid *uuid) { static uint8_t gen[sizeof(struct uuid)]; Modified: stable/10/usr.bin/mkimg/mkimg.h ============================================================================== --- stable/10/usr.bin/mkimg/mkimg.h Wed Oct 8 22:09:36 2014 (r272775) +++ stable/10/usr.bin/mkimg/mkimg.h Wed Oct 8 22:13:18 2014 (r272776) @@ -87,6 +87,8 @@ round_track(lba_t n) ssize_t sparse_write(int, const void *, size_t); #endif +void mkimg_chs(lba_t, u_int, u_int *, u_int *, u_int *); + struct uuid; void mkimg_uuid(struct uuid *); Modified: stable/10/usr.bin/mkimg/pc98.c ============================================================================== --- stable/10/usr.bin/mkimg/pc98.c Wed Oct 8 22:09:36 2014 (r272775) +++ stable/10/usr.bin/mkimg/pc98.c Wed Oct 8 22:13:18 2014 (r272776) @@ -68,12 +68,14 @@ pc98_metadata(u_int where, lba_t blk) } static void -pc98_chs(u_short *cyl, u_char *hd, u_char *sec, uint32_t lba __unused) +pc98_chs(u_short *cylp, u_char *hdp, u_char *secp, lba_t lba) { + u_int cyl, hd, sec; - *cyl = 0xffff; /* XXX */ - *hd = 0xff; /* XXX */ - *sec = 0xff; /* XXX */ + mkimg_chs(lba, 0xffff, &cyl, &hd, &sec); + le16enc(cylp, cyl); + *hdp = hd; + *secp = sec; } static int @@ -82,6 +84,7 @@ pc98_write(lba_t imgsz __unused, void *b struct part *part; struct pc98_partition *dpbase, *dp; u_char *buf; + lba_t size; int error, ptyp; buf = malloc(PC98_BOOTCODESZ); @@ -95,6 +98,7 @@ pc98_write(lba_t imgsz __unused, void *b le16enc(buf + PC98_MAGICOFS, PC98_MAGIC); dpbase = (void *)(buf + secsz); STAILQ_FOREACH(part, &partlist, link) { + size = round_track(part->size); dp = dpbase + part->index; ptyp = ALIAS_TYPE2INT(part->type); dp->dp_mid = ptyp; @@ -102,7 +106,7 @@ pc98_write(lba_t imgsz __unused, void *b pc98_chs(&dp->dp_scyl, &dp->dp_shd, &dp->dp_ssect, part->block); pc98_chs(&dp->dp_scyl, &dp->dp_shd, &dp->dp_ssect, - part->block + part->size - 1); + part->block + size - 1); if (part->label != NULL) memcpy(dp->dp_name, part->label, strlen(part->label)); } From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 02:49:35 2014 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 A33EE5AC; Thu, 9 Oct 2014 02:49: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 83CC3274; Thu, 9 Oct 2014 02:49: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 s992nZ6G076140; Thu, 9 Oct 2014 02:49:35 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s992nYeJ076135; Thu, 9 Oct 2014 02:49:34 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201410090249.s992nYeJ076135@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 9 Oct 2014 02:49: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: r272790 - in stable/10: sbin/ifconfig sys/netinet6 usr.bin/netstat 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.18-1 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, 09 Oct 2014 02:49:35 -0000 Author: ae Date: Thu Oct 9 02:49:33 2014 New Revision: 272790 URL: https://svnweb.freebsd.org/changeset/base/272790 Log: MFC r271307: Add the ability to set `prefer_source' flag to an IPv6 address. It affects the IPv6 source address selection algorithm (RFC 6724) and allows override the last rule ("longest matching prefix") for choosing among equivalent addresses. The address with `prefer_source' will be preferred source address. Modified: stable/10/sbin/ifconfig/af_inet6.c stable/10/sbin/ifconfig/ifconfig.8 stable/10/sys/netinet6/in6_src.c stable/10/sys/netinet6/in6_var.h stable/10/usr.bin/netstat/inet6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/af_inet6.c ============================================================================== --- stable/10/sbin/ifconfig/af_inet6.c Thu Oct 9 02:30:38 2014 (r272789) +++ stable/10/sbin/ifconfig/af_inet6.c Thu Oct 9 02:49:33 2014 (r272790) @@ -254,6 +254,8 @@ in6_status(int s __unused, const struct printf("autoconf "); if ((flags6 & IN6_IFF_TEMPORARY) != 0) printf("temporary "); + if ((flags6 & IN6_IFF_PREFER_SOURCE) != 0) + printf("prefer_source "); if (((struct sockaddr_in6 *)(ifa->ifa_addr))->sin6_scope_id) printf("scopeid 0x%x ", @@ -465,6 +467,8 @@ static struct cmd inet6_cmds[] = { DEF_CMD("-deprecated", -IN6_IFF_DEPRECATED, setip6flags), DEF_CMD("autoconf", IN6_IFF_AUTOCONF, setip6flags), DEF_CMD("-autoconf", -IN6_IFF_AUTOCONF, setip6flags), + DEF_CMD("prefer_source",IN6_IFF_PREFER_SOURCE, setip6flags), + DEF_CMD("-prefer_source",-IN6_IFF_PREFER_SOURCE,setip6flags), DEF_CMD("accept_rtadv", ND6_IFF_ACCEPT_RTADV, setnd6flags), DEF_CMD("-accept_rtadv",-ND6_IFF_ACCEPT_RTADV, setnd6flags), DEF_CMD("no_radr", ND6_IFF_NO_RADR, setnd6flags), Modified: stable/10/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/10/sbin/ifconfig/ifconfig.8 Thu Oct 9 02:30:38 2014 (r272789) +++ stable/10/sbin/ifconfig/ifconfig.8 Thu Oct 9 02:49:33 2014 (r272790) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd October 21, 2013 +.Dd September 9, 2014 .Dt IFCONFIG 8 .Os .Sh NAME @@ -725,6 +725,19 @@ Clear a flag .Cm no_prefer_iface . .El .Pp +The following parameters are specific for IPv6 addresses. +Note that the address family keyword +.Dq Li inet6 +is needed for them: +.Bl -tag -width indent +.It Cm prefer_source +Set a flag to prefer address as a candidate of the source address for +outgoing packets. +.It Cm -prefer_source +Clear a flag +.Cm prefer_source . +.El +.Pp The following parameters are specific to cloning IEEE 802.11 wireless interfaces with the .Cm create Modified: stable/10/sys/netinet6/in6_src.c ============================================================================== --- stable/10/sys/netinet6/in6_src.c Thu Oct 9 02:30:38 2014 (r272789) +++ stable/10/sys/netinet6/in6_src.c Thu Oct 9 02:49:33 2014 (r272790) @@ -451,6 +451,16 @@ in6_selectsrc(struct sockaddr_in6 *dstso NEXT(9); /* + * Rule 10: prefer address with `prefer_source' flag. + */ + if ((ia_best->ia6_flags & IN6_IFF_PREFER_SOURCE) == 0 && + (ia->ia6_flags & IN6_IFF_PREFER_SOURCE) != 0) + REPLACE(10); + if ((ia_best->ia6_flags & IN6_IFF_PREFER_SOURCE) != 0 && + (ia->ia6_flags & IN6_IFF_PREFER_SOURCE) == 0) + NEXT(10); + + /* * Rule 14: Use longest matching prefix. * Note: in the address selection draft, this rule is * documented as "Rule 8". However, since it is also Modified: stable/10/sys/netinet6/in6_var.h ============================================================================== --- stable/10/sys/netinet6/in6_var.h Thu Oct 9 02:30:38 2014 (r272789) +++ stable/10/sys/netinet6/in6_var.h Thu Oct 9 02:49:33 2014 (r272790) @@ -503,6 +503,7 @@ struct in6_rrenumreq { */ #define IN6_IFF_AUTOCONF 0x40 /* autoconfigurable address. */ #define IN6_IFF_TEMPORARY 0x80 /* temporary (anonymous) address. */ +#define IN6_IFF_PREFER_SOURCE 0x0100 /* preferred address for SAS */ #define IN6_IFF_NOPFX 0x8000 /* skip kernel prefix management. * XXX: this should be temporary. */ Modified: stable/10/usr.bin/netstat/inet6.c ============================================================================== --- stable/10/usr.bin/netstat/inet6.c Thu Oct 9 02:30:38 2014 (r272789) +++ stable/10/usr.bin/netstat/inet6.c Thu Oct 9 02:49:33 2014 (r272790) @@ -346,7 +346,7 @@ static const char *srcrule_str[] = { "public/temporary address", "alive interface", "better virtual status", - "rule #10", + "preferred source", "rule #11", "rule #12", "rule #13", From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 03:07:16 2014 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 51C15ADB; Thu, 9 Oct 2014 03:07:16 +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 32722759; Thu, 9 Oct 2014 03:07: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 s9937GLx086414; Thu, 9 Oct 2014 03:07:16 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9937EZd086403; Thu, 9 Oct 2014 03:07:14 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201410090307.s9937EZd086403@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 9 Oct 2014 03:07:14 +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: r272791 - in stable/9: sbin/ifconfig sys/netinet6 usr.bin/netstat usr.sbin/ndp 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.18-1 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, 09 Oct 2014 03:07:16 -0000 Author: ae Date: Thu Oct 9 03:07:13 2014 New Revision: 272791 URL: https://svnweb.freebsd.org/changeset/base/272791 Log: MFC r238273 (by hrs): Remove "prefer_source" address selection option. FreeBSD has had an implementation of RFC 3484 for this purpose for a long time and "prefer_source" was never implemented actually. ND6_IFF_PREFER_SOURCE macro is left intact. MFC r271307: Add the ability to set `prefer_source' flag to an IPv6 address. It affects the IPv6 source address selection algorithm (RFC 6724) and allows override the last rule ("longest matching prefix") for choosing among equivalent addresses. The address with `prefer_source' will be preferred source address. Modified: stable/9/sbin/ifconfig/af_inet6.c stable/9/sbin/ifconfig/ifconfig.8 stable/9/sys/netinet6/in6_src.c stable/9/sys/netinet6/in6_var.h stable/9/sys/netinet6/nd6.h stable/9/usr.bin/netstat/inet6.c stable/9/usr.sbin/ndp/ndp.8 stable/9/usr.sbin/ndp/ndp.c Directory Properties: stable/9/sbin/ifconfig/ (props changed) stable/9/sys/ (props changed) stable/9/usr.bin/netstat/ (props changed) stable/9/usr.sbin/ndp/ (props changed) Modified: stable/9/sbin/ifconfig/af_inet6.c ============================================================================== --- stable/9/sbin/ifconfig/af_inet6.c Thu Oct 9 02:49:33 2014 (r272790) +++ stable/9/sbin/ifconfig/af_inet6.c Thu Oct 9 03:07:13 2014 (r272791) @@ -287,6 +287,8 @@ in6_status(int s __unused, const struct printf("autoconf "); if ((flags6 & IN6_IFF_TEMPORARY) != 0) printf("temporary "); + if ((flags6 & IN6_IFF_PREFER_SOURCE) != 0) + printf("prefer_source "); if (scopeid) printf("scopeid 0x%x ", scopeid); @@ -497,6 +499,8 @@ static struct cmd inet6_cmds[] = { DEF_CMD("-deprecated", -IN6_IFF_DEPRECATED, setip6flags), DEF_CMD("autoconf", IN6_IFF_AUTOCONF, setip6flags), DEF_CMD("-autoconf", -IN6_IFF_AUTOCONF, setip6flags), + DEF_CMD("prefer_source",IN6_IFF_PREFER_SOURCE, setip6flags), + DEF_CMD("-prefer_source",-IN6_IFF_PREFER_SOURCE,setip6flags), DEF_CMD("accept_rtadv", ND6_IFF_ACCEPT_RTADV, setnd6flags), DEF_CMD("-accept_rtadv",-ND6_IFF_ACCEPT_RTADV, setnd6flags), DEF_CMD("no_radr", ND6_IFF_NO_RADR, setnd6flags), @@ -507,8 +511,6 @@ static struct cmd inet6_cmds[] = { DEF_CMD("-ifdisabled", -ND6_IFF_IFDISABLED, setnd6flags), DEF_CMD("nud", ND6_IFF_PERFORMNUD, setnd6flags), DEF_CMD("-nud", -ND6_IFF_PERFORMNUD, setnd6flags), - DEF_CMD("prefer_source",ND6_IFF_PREFER_SOURCE, setnd6flags), - DEF_CMD("-prefer_source",-ND6_IFF_PREFER_SOURCE,setnd6flags), DEF_CMD("auto_linklocal",ND6_IFF_AUTO_LINKLOCAL,setnd6flags), DEF_CMD("-auto_linklocal",-ND6_IFF_AUTO_LINKLOCAL,setnd6flags), DEF_CMD("no_prefer_iface",ND6_IFF_NO_PREFER_IFACE,setnd6flags), Modified: stable/9/sbin/ifconfig/ifconfig.8 ============================================================================== --- stable/9/sbin/ifconfig/ifconfig.8 Thu Oct 9 02:49:33 2014 (r272790) +++ stable/9/sbin/ifconfig/ifconfig.8 Thu Oct 9 03:07:13 2014 (r272791) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd January 10, 2013 +.Dd September 9, 2014 .Dt IFCONFIG 8 .Os .Sh NAME @@ -716,12 +716,6 @@ Set a flag to enable Neighbor Unreachabi .It Cm -nud Clear a flag .Cm nud . -.It Cm prefer_source -Set a flag to prefer addresses on the interface as candidates of the -source address for outgoing packets. -.It Cm -prefer_source -Clear a flag -.Cm prefer_source . .It Cm no_prefer_iface Set a flag to not prefer address on the interface as candidates of the source address for outgoing packets, even when the interface is @@ -731,6 +725,19 @@ Clear a flag .Cm no_prefer_iface . .El .Pp +The following parameters are specific for IPv6 addresses. +Note that the address family keyword +.Dq Li inet6 +is needed for them: +.Bl -tag -width indent +.It Cm prefer_source +Set a flag to prefer address as a candidate of the source address for +outgoing packets. +.It Cm -prefer_source +Clear a flag +.Cm prefer_source . +.El +.Pp The following parameters are specific to cloning IEEE 802.11 wireless interfaces with the .Cm create Modified: stable/9/sys/netinet6/in6_src.c ============================================================================== --- stable/9/sys/netinet6/in6_src.c Thu Oct 9 02:49:33 2014 (r272790) +++ stable/9/sys/netinet6/in6_src.c Thu Oct 9 03:07:13 2014 (r272791) @@ -443,6 +443,16 @@ in6_selectsrc(struct sockaddr_in6 *dstso REPLACE(8); /* + * Rule 10: prefer address with `prefer_source' flag. + */ + if ((ia_best->ia6_flags & IN6_IFF_PREFER_SOURCE) == 0 && + (ia->ia6_flags & IN6_IFF_PREFER_SOURCE) != 0) + REPLACE(10); + if ((ia_best->ia6_flags & IN6_IFF_PREFER_SOURCE) != 0 && + (ia->ia6_flags & IN6_IFF_PREFER_SOURCE) == 0) + NEXT(10); + + /* * Rule 14: Use longest matching prefix. * Note: in the address selection draft, this rule is * documented as "Rule 8". However, since it is also Modified: stable/9/sys/netinet6/in6_var.h ============================================================================== --- stable/9/sys/netinet6/in6_var.h Thu Oct 9 02:49:33 2014 (r272790) +++ stable/9/sys/netinet6/in6_var.h Thu Oct 9 03:07:13 2014 (r272791) @@ -473,6 +473,7 @@ struct in6_rrenumreq { */ #define IN6_IFF_AUTOCONF 0x40 /* autoconfigurable address. */ #define IN6_IFF_TEMPORARY 0x80 /* temporary (anonymous) address. */ +#define IN6_IFF_PREFER_SOURCE 0x0100 /* preferred address for SAS */ #define IN6_IFF_NOPFX 0x8000 /* skip kernel prefix management. * XXX: this should be temporary. */ Modified: stable/9/sys/netinet6/nd6.h ============================================================================== --- stable/9/sys/netinet6/nd6.h Thu Oct 9 02:49:33 2014 (r272790) +++ stable/9/sys/netinet6/nd6.h Thu Oct 9 03:07:13 2014 (r272791) @@ -79,7 +79,7 @@ struct nd_ifinfo { #define ND6_IFF_PERFORMNUD 0x1 #define ND6_IFF_ACCEPT_RTADV 0x2 -#define ND6_IFF_PREFER_SOURCE 0x4 /* XXX: not related to ND. */ +#define ND6_IFF_PREFER_SOURCE 0x4 /* Not used in FreeBSD. */ #define ND6_IFF_IFDISABLED 0x8 /* IPv6 operation is disabled due to * DAD failure. (XXX: not ND-specific) */ Modified: stable/9/usr.bin/netstat/inet6.c ============================================================================== --- stable/9/usr.bin/netstat/inet6.c Thu Oct 9 02:49:33 2014 (r272790) +++ stable/9/usr.bin/netstat/inet6.c Thu Oct 9 03:07:13 2014 (r272791) @@ -346,7 +346,7 @@ static char *srcrule_str[] = { "public/temporary address", "alive interface", "preferred interface", - "rule #10", + "preferred source", "rule #11", "rule #12", "rule #13", Modified: stable/9/usr.sbin/ndp/ndp.8 ============================================================================== --- stable/9/usr.sbin/ndp/ndp.8 Thu Oct 9 02:49:33 2014 (r272790) +++ stable/9/usr.sbin/ndp/ndp.8 Thu Oct 9 03:07:13 2014 (r272791) @@ -209,15 +209,6 @@ on This flag is set by .Va net.inet6.ip6.auto_linklocal sysctl variable. -.It Ic prefer_source -Prefer addresses on the -.Ar interface -as candidates of the source address for outgoing packets. -The default value of this flag is off. -For more details about the entire algorithm of source address -selection, see the -.Pa IMPLEMENTATION -file supplied with the KAME kit. .It Ic no_prefer_iface The address on the outgoing interface is preferred by source addess selection rule. Modified: stable/9/usr.sbin/ndp/ndp.c ============================================================================== --- stable/9/usr.sbin/ndp/ndp.c Thu Oct 9 02:49:33 2014 (r272790) +++ stable/9/usr.sbin/ndp/ndp.c Thu Oct 9 03:07:13 2014 (r272791) @@ -1013,9 +1013,6 @@ ifinfo(ifname, argc, argv) #ifdef ND6_IFF_AUTO_LINKLOCAL SETFLAG("auto_linklocal", ND6_IFF_AUTO_LINKLOCAL); #endif -#ifdef ND6_IFF_PREFER_SOURCE - SETFLAG("prefer_source", ND6_IFF_PREFER_SOURCE); -#endif #ifdef ND6_IFF_NO_PREFER_IFACE SETFLAG("no_prefer_iface", ND6_IFF_NO_PREFER_IFACE); #endif @@ -1092,10 +1089,6 @@ ifinfo(ifname, argc, argv) if ((ND.flags & ND6_IFF_AUTO_LINKLOCAL)) printf("auto_linklocal "); #endif -#ifdef ND6_IFF_PREFER_SOURCE - if ((ND.flags & ND6_IFF_PREFER_SOURCE)) - printf("prefer_source "); -#endif #ifdef ND6_IFF_NO_PREFER_IFACE if ((ND.flags & ND6_IFF_NO_PREFER_IFACE)) printf("no_prefer_iface "); From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 05:28:12 2014 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 A5C1C609; Thu, 9 Oct 2014 05:28: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 916603DB; Thu, 9 Oct 2014 05:28: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 s995SCjJ052994; Thu, 9 Oct 2014 05:28:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s995SC7n052993; Thu, 9 Oct 2014 05:28:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201410090528.s995SC7n052993@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 9 Oct 2014 05:28: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: r272798 - 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.18-1 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, 09 Oct 2014 05:28:12 -0000 Author: mav Date: Thu Oct 9 05:28:11 2014 New Revision: 272798 URL: https://svnweb.freebsd.org/changeset/base/272798 Log: MFC r272650: Set CAM_SIM_QUEUED flag before calling ctl_queue() to avoid race. PR: 194128 Submitted by: Scott M. Ferris Sponsored by: EMC/Isilon Storage Division Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Thu Oct 9 05:17:47 2014 (r272797) +++ stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c Thu Oct 9 05:28:11 2014 (r272798) @@ -609,14 +609,16 @@ cfcs_action(struct cam_sim *sim, union c bcopy(csio->cdb_io.cdb_bytes, io->scsiio.cdb, io->scsiio.cdb_len); + ccb->ccb_h.status |= CAM_SIM_QUEUED; err = ctl_queue(io); if (err != CTL_RETVAL_COMPLETE) { printf("%s: func %d: error %d returned by " "ctl_queue()!\n", __func__, ccb->ccb_h.func_code, err); ctl_free_io(io); - } else { - ccb->ccb_h.status |= CAM_SIM_QUEUED; + ccb->ccb_h.status = CAM_REQ_INVALID; + xpt_done(ccb); + return; } break; } From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 22:54:52 2014 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 3C4BACC5; Thu, 9 Oct 2014 22:54: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 0D8D497B; Thu, 9 Oct 2014 22:54: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 s99MspO6060241; Thu, 9 Oct 2014 22:54:51 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99MspOR060240; Thu, 9 Oct 2014 22:54:51 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092254.s99MspOR060240@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 22:54: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: r272846 - stable/10/usr.bin/netstat 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.18-1 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, 09 Oct 2014 22:54:52 -0000 Author: hrs Date: Thu Oct 9 22:54:51 2014 New Revision: 272846 URL: https://svnweb.freebsd.org/changeset/base/272846 Log: MFC r266494: - Fix a bug which can make sysctl() fail when -F is specified. - Increase WID_IF_DEFAULT() from 6 to 8 (the default for AF_INET6) because we have interfaces with longer names than 6 chars like epairN{a,b}. - Style fixes. Modified: stable/10/usr.bin/netstat/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/netstat/route.c ============================================================================== --- stable/10/usr.bin/netstat/route.c Thu Oct 9 22:39:52 2014 (r272845) +++ stable/10/usr.bin/netstat/route.c Thu Oct 9 22:54:51 2014 (r272846) @@ -238,13 +238,13 @@ pr_family(int af1) #ifndef INET6 #define WID_DST_DEFAULT(af) 18 /* width of destination column */ #define WID_GW_DEFAULT(af) 18 /* width of gateway column */ -#define WID_IF_DEFAULT(af) (Wflag ? 8 : 6) /* width of netif column */ +#define WID_IF_DEFAULT(af) (Wflag ? 10 : 8) /* width of netif column */ #else #define WID_DST_DEFAULT(af) \ ((af) == AF_INET6 ? (numeric_addr ? 33: 18) : 18) #define WID_GW_DEFAULT(af) \ ((af) == AF_INET6 ? (numeric_addr ? 29 : 18) : 18) -#define WID_IF_DEFAULT(af) ((af) == AF_INET6 ? 8 : (Wflag ? 8 : 6)) +#define WID_IF_DEFAULT(af) ((af) == AF_INET6 ? 8 : (Wflag ? 10 : 8)) #endif /*INET6*/ static int wid_dst; @@ -594,16 +594,13 @@ p_rtable_sysctl(int fibnum, int af) mib[4] = NET_RT_DUMP; mib[5] = 0; mib[6] = fibnum; - if (sysctl(mib, 7, NULL, &needed, NULL, 0) < 0) { - err(1, "sysctl: net.route.0.%d.dump.%d estimate", af, fibnum); - } - - if ((buf = malloc(needed)) == 0) { + if (sysctl(mib, nitems(mib), NULL, &needed, NULL, 0) < 0) + err(EX_OSERR, "sysctl: net.route.0.%d.dump.%d estimate", af, + fibnum); + if ((buf = malloc(needed)) == NULL) errx(2, "malloc(%lu)", (unsigned long)needed); - } - if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) { + if (sysctl(mib, nitems(mib), buf, &needed, NULL, 0) < 0) err(1, "sysctl: net.route.0.%d.dump.%d", af, fibnum); - } lim = buf + needed; for (next = buf; next < lim; next += rtm->rtm_msglen) { rtm = (struct rt_msghdr *)next; From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 22:56:39 2014 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 2613CE15; Thu, 9 Oct 2014 22:56: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 11BE498F; Thu, 9 Oct 2014 22:56: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 s99MucRl060664; Thu, 9 Oct 2014 22:56:38 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99MucfY060663; Thu, 9 Oct 2014 22:56:38 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092256.s99MucfY060663@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 22:56: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: r272847 - 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.18-1 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, 09 Oct 2014 22:56:39 -0000 Author: hrs Date: Thu Oct 9 22:56:38 2014 New Revision: 272847 URL: https://svnweb.freebsd.org/changeset/base/272847 Log: MFC r266857: - Add rwlock to struct dadq. A panic could occur when a large number of addresses performed DAD at the same time. Modified: stable/10/sys/netinet6/nd6_nbr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/10/sys/netinet6/nd6_nbr.c Thu Oct 9 22:54:51 2014 (r272846) +++ stable/10/sys/netinet6/nd6_nbr.c Thu Oct 9 22:56:38 2014 (r272847) @@ -88,8 +88,10 @@ static void nd6_dad_na_input(struct ifad static void nd6_na_output_fib(struct ifnet *, const struct in6_addr *, const struct in6_addr *, u_long, int, struct sockaddr *, u_int); -VNET_DEFINE(int, dad_ignore_ns) = 0; /* ignore NS in DAD - specwise incorrect*/ -VNET_DEFINE(int, dad_maxtry) = 15; /* max # of *tries* to transmit DAD packet */ +static VNET_DEFINE(int, dad_ignore_ns) = 0; /* ignore NS in DAD + - specwise incorrect */ +static VNET_DEFINE(int, dad_maxtry) = 15; /* max # of *tries* to + transmit DAD packet */ #define V_dad_ignore_ns VNET(dad_ignore_ns) #define V_dad_maxtry VNET(dad_maxtry) @@ -1165,20 +1167,30 @@ struct dadq { }; static VNET_DEFINE(TAILQ_HEAD(, dadq), dadq); -VNET_DEFINE(int, dad_init) = 0; -#define V_dadq VNET(dadq) -#define V_dad_init VNET(dad_init) +static VNET_DEFINE(struct rwlock, dad_rwlock); +#define V_dadq VNET(dadq) +#define V_dad_rwlock VNET(dad_rwlock) + +#define DADQ_LOCK_INIT() rw_init(&V_dad_rwlock, "nd6 DAD queue") +#define DADQ_LOCK_DESTROY() rw_destroy(&V_dad_rwlock) +#define DADQ_LOCK_INITIALIZED() rw_initialized(&V_dad_rwlock) +#define DADQ_RLOCK() rw_rlock(&V_dad_rwlock) +#define DADQ_RUNLOCK() rw_runlock(&V_dad_rwlock) +#define DADQ_WLOCK() rw_wlock(&V_dad_rwlock) +#define DADQ_WUNLOCK() rw_wunlock(&V_dad_rwlock) static struct dadq * nd6_dad_find(struct ifaddr *ifa) { struct dadq *dp; + DADQ_RLOCK(); TAILQ_FOREACH(dp, &V_dadq, dad_list) if (dp->dad_ifa == ifa) - return (dp); + break; + DADQ_RUNLOCK(); - return (NULL); + return (dp); } static void @@ -1206,9 +1218,9 @@ nd6_dad_start(struct ifaddr *ifa, int de struct dadq *dp; char ip6buf[INET6_ADDRSTRLEN]; - if (!V_dad_init) { + if (DADQ_LOCK_INITIALIZED() == 0) { + DADQ_LOCK_INIT(); TAILQ_INIT(&V_dadq); - V_dad_init++; } /* @@ -1258,7 +1270,9 @@ nd6_dad_start(struct ifaddr *ifa, int de #ifdef VIMAGE dp->dad_vnet = curvnet; #endif + DADQ_WLOCK(); TAILQ_INSERT_TAIL(&V_dadq, (struct dadq *)dp, dad_list); + DADQ_WUNLOCK(); nd6log((LOG_DEBUG, "%s: starting DAD for %s\n", if_name(ifa->ifa_ifp), ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr))); @@ -1291,7 +1305,7 @@ nd6_dad_stop(struct ifaddr *ifa) { struct dadq *dp; - if (!V_dad_init) + if (DADQ_LOCK_INITIALIZED() == 0) return; dp = nd6_dad_find(ifa); if (!dp) { @@ -1301,7 +1315,9 @@ nd6_dad_stop(struct ifaddr *ifa) nd6_dad_stoptimer(dp); + DADQ_WLOCK(); TAILQ_REMOVE(&V_dadq, (struct dadq *)dp, dad_list); + DADQ_WUNLOCK(); free(dp, M_IP6NDP); dp = NULL; ifa_free(ifa); @@ -1340,7 +1356,9 @@ nd6_dad_timer(struct dadq *dp) nd6log((LOG_INFO, "%s: could not run DAD, driver problem?\n", if_name(ifa->ifa_ifp))); + DADQ_WLOCK(); TAILQ_REMOVE(&V_dadq, (struct dadq *)dp, dad_list); + DADQ_WUNLOCK(); free(dp, M_IP6NDP); dp = NULL; ifa_free(ifa); @@ -1393,7 +1411,9 @@ nd6_dad_timer(struct dadq *dp) if_name(ifa->ifa_ifp), ip6_sprintf(ip6buf, &ia->ia_addr.sin6_addr))); + DADQ_WLOCK(); TAILQ_REMOVE(&V_dadq, (struct dadq *)dp, dad_list); + DADQ_WUNLOCK(); free(dp, M_IP6NDP); dp = NULL; ifa_free(ifa); @@ -1470,7 +1490,9 @@ nd6_dad_duplicated(struct ifaddr *ifa) } } + DADQ_WLOCK(); TAILQ_REMOVE(&V_dadq, (struct dadq *)dp, dad_list); + DADQ_WUNLOCK(); free(dp, M_IP6NDP); dp = NULL; ifa_free(ifa); From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:05:37 2014 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 5501C38E; Thu, 9 Oct 2014 23:05: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 3DA80A70; Thu, 9 Oct 2014 23:05: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 s99N5beU065465; Thu, 9 Oct 2014 23:05:37 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99N5WlB065438; Thu, 9 Oct 2014 23:05:32 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092305.s99N5WlB065438@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:05: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: r272850 - in stable/10: include/rpcsvc lib/libc/rpc lib/libc/xdr usr.sbin/ypbind 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.18-1 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, 09 Oct 2014 23:05:37 -0000 Author: hrs Date: Thu Oct 9 23:05:32 2014 New Revision: 272850 URL: https://svnweb.freebsd.org/changeset/base/272850 Log: MFC r258580: Replace Sun RPC license in TI-RPC library with a 3-clause BSD license, with the explicit permission of Sun Microsystems in 2009. MFC r258581, 258582: Replace Sun Industry Standards Source License for Sun RPC code with a 3-clause BSD license as specified by Oracle America, Inc. in 2010. This license change was approved by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. MFC r259117, 259118: Replace Sun RPC license with a 3-clause BSD license. This license change was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and Virtualization at Oracle Corporation. MFC r259417: Replace Sun RPC license for TI-RPC library with a 3-clause BSD license, with the explicit permission of Sun Microsystems in 2009. The code in question in this file was copied from lib/libc/rpc/pmap_getport.c. Deleted: stable/10/lib/libc/rpc/LICENSE Modified: stable/10/include/rpcsvc/bootparam_prot.x stable/10/include/rpcsvc/key_prot.x stable/10/include/rpcsvc/klm_prot.x stable/10/include/rpcsvc/mount.x stable/10/include/rpcsvc/nfs_prot.x stable/10/include/rpcsvc/nis.x stable/10/include/rpcsvc/nis_callback.x stable/10/include/rpcsvc/nis_object.x stable/10/include/rpcsvc/nis_tags.h stable/10/include/rpcsvc/rex.x stable/10/include/rpcsvc/rnusers.x stable/10/include/rpcsvc/rstat.x stable/10/include/rpcsvc/sm_inter.x stable/10/include/rpcsvc/spray.x stable/10/include/rpcsvc/yp.x stable/10/include/rpcsvc/yppasswd.x stable/10/lib/libc/xdr/xdr.c stable/10/lib/libc/xdr/xdr_array.c stable/10/lib/libc/xdr/xdr_float.c stable/10/lib/libc/xdr/xdr_mem.c stable/10/lib/libc/xdr/xdr_rec.c stable/10/lib/libc/xdr/xdr_reference.c stable/10/lib/libc/xdr/xdr_sizeof.c stable/10/lib/libc/xdr/xdr_stdio.c stable/10/usr.sbin/ypbind/yp_ping.c Directory Properties: stable/10/ (props changed) Modified: stable/10/include/rpcsvc/bootparam_prot.x ============================================================================== --- stable/10/include/rpcsvc/bootparam_prot.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/bootparam_prot.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 HOLDER 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. */ /* Modified: stable/10/include/rpcsvc/key_prot.x ============================================================================== --- stable/10/include/rpcsvc/key_prot.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/key_prot.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,30 +1,32 @@ -%/* -% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for -% * unrestricted use provided that this legend is included on all tape -% * media and as a part of the software program in whole or part. Users -% * may copy or modify Sun RPC without charge, but are not authorized -% * to license or distribute it to anyone else except as part of a product or -% * program developed by the user. +%/*- +% * Copyright (c) 2010, Oracle America, Inc. % * -% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE -% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. +% * Redistribution and use in source and binary forms, with or without +% * modification, are permitted provided that the following conditions are +% * met: % * -% * Sun RPC is provided with no support and without any obligation on the -% * part of Sun Microsystems, Inc. to assist in its use, correction, -% * modification or enhancement. +% * * 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. +% * * Neither the name of the "Oracle America, Inc." nor the names of its +% * contributors may be used to endorse or promote products derived +% * from this software without specific prior written permission. % * -% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE -% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC -% * OR ANY PART THEREOF. -% * -% * In no event will Sun Microsystems, Inc. be liable for any lost revenue -% * or profits or other special, indirect and consequential damages, even if -% * Sun has been advised of the possibility of such damages. -% * -% * Sun Microsystems, Inc. -% * 2550 Garcia Avenue -% * Mountain View, California 94043 +% * 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 HOLDER 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. % */ /* * Key server protocol definition Modified: stable/10/include/rpcsvc/klm_prot.x ============================================================================== --- stable/10/include/rpcsvc/klm_prot.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/klm_prot.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 HOLDER 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. */ /* Modified: stable/10/include/rpcsvc/mount.x ============================================================================== --- stable/10/include/rpcsvc/mount.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/mount.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 HOLDER 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. */ /* Modified: stable/10/include/rpcsvc/nfs_prot.x ============================================================================== --- stable/10/include/rpcsvc/nfs_prot.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/nfs_prot.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 HOLDER 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. */ #ifndef RPC_HDR Modified: stable/10/include/rpcsvc/nis.x ============================================================================== --- stable/10/include/rpcsvc/nis.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/nis.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,31 +1,32 @@ -%/* -% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for -% * unrestricted use provided that this legend is included on all tape -% * media and as a part of the software program in whole or part. Users -% * may copy or modify Sun RPC without charge, but are not authorized -% * to license or distribute it to anyone else except as part of a product or -% * program developed by the user or with the express written consent of -% * Sun Microsystems, Inc. -% * -% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE -% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. -% * -% * Sun RPC is provided with no support and without any obligation on the -% * part of Sun Microsystems, Inc. to assist in its use, correction, -% * modification or enhancement. +%/*- +% * Copyright (c) 2010, Oracle America, Inc. % * -% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE -% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC -% * OR ANY PART THEREOF. +% * Redistribution and use in source and binary forms, with or without +% * modification, are permitted provided that the following conditions are +% * met: % * -% * In no event will Sun Microsystems, Inc. be liable for any lost revenue -% * or profits or other special, indirect and consequential damages, even if -% * Sun has been advised of the possibility of such damages. +% * * 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. +% * * Neither the name of the "Oracle America, Inc." nor the names of its +% * contributors may be used to endorse or promote products derived +% * from this software without specific prior written permission. % * -% * Sun Microsystems, Inc. -% * 2550 Garcia Avenue -% * Mountain View, California 94043 +% * 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 HOLDER 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. % */ #ifndef RPC_HDR Modified: stable/10/include/rpcsvc/nis_callback.x ============================================================================== --- stable/10/include/rpcsvc/nis_callback.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/nis_callback.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,31 +1,32 @@ -%/* -% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for -% * unrestricted use provided that this legend is included on all tape -% * media and as a part of the software program in whole or part. Users -% * may copy or modify Sun RPC without charge, but are not authorized -% * to license or distribute it to anyone else except as part of a product or -% * program developed by the user or with the express written consent of -% * Sun Microsystems, Inc. +%/*- +% * Copyright (c) 2010, Oracle America, Inc. % * -% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE -% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. +% * Redistribution and use in source and binary forms, with or without +% * modification, are permitted provided that the following conditions are +% * met: % * -% * Sun RPC is provided with no support and without any obligation on the -% * part of Sun Microsystems, Inc. to assist in its use, correction, -% * modification or enhancement. +% * * 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. +% * * Neither the name of the "Oracle America, Inc." nor the names of its +% * contributors may be used to endorse or promote products derived +% * from this software without specific prior written permission. % * -% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE -% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC -% * OR ANY PART THEREOF. -% * -% * In no event will Sun Microsystems, Inc. be liable for any lost revenue -% * or profits or other special, indirect and consequential damages, even if -% * Sun has been advised of the possibility of such damages. -% * -% * Sun Microsystems, Inc. -% * 2550 Garcia Avenue -% * Mountain View, California 94043 +% * 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 HOLDER 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. % */ /* Modified: stable/10/include/rpcsvc/nis_object.x ============================================================================== --- stable/10/include/rpcsvc/nis_object.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/nis_object.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,31 +1,32 @@ -%/* -% * Sun RPC is a product of Sun Microsystems, Inc. and is provided for -% * unrestricted use provided that this legend is included on all tape -% * media and as a part of the software program in whole or part. Users -% * may copy or modify Sun RPC without charge, but are not authorized -% * to license or distribute it to anyone else except as part of a product or -% * program developed by the user or with the express written consent of -% * Sun Microsystems, Inc. +%/*- +% * Copyright (c) 2010, Oracle America, Inc. % * -% * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE -% * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR -% * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. +% * Redistribution and use in source and binary forms, with or without +% * modification, are permitted provided that the following conditions are +% * met: % * -% * Sun RPC is provided with no support and without any obligation on the -% * part of Sun Microsystems, Inc. to assist in its use, correction, -% * modification or enhancement. +% * * 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. +% * * Neither the name of the "Oracle America, Inc." nor the names of its +% * contributors may be used to endorse or promote products derived +% * from this software without specific prior written permission. % * -% * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE -% * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC -% * OR ANY PART THEREOF. -% * -% * In no event will Sun Microsystems, Inc. be liable for any lost revenue -% * or profits or other special, indirect and consequential damages, even if -% * Sun has been advised of the possibility of such damages. -% * -% * Sun Microsystems, Inc. -% * 2550 Garcia Avenue -% * Mountain View, California 94043 +% * 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 HOLDER 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. % */ /* @@ -35,6 +36,7 @@ * All Rights Reserved. */ +/* $FreeBSD$ */ /* From: %#pragma ident "@(#)nis_object.x 1.10 94/05/03 SMI" */ #if RPC_HDR Modified: stable/10/include/rpcsvc/nis_tags.h ============================================================================== --- stable/10/include/rpcsvc/nis_tags.h Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/nis_tags.h Thu Oct 9 23:05:32 2014 (r272850) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 HOLDER 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. */ /* @@ -41,6 +43,7 @@ #ifndef _RPCSVC_NIS_TAGS_H #define _RPCSVC_NIS_TAGS_H +/* $FreeBSD$ */ /* From: #pragma ident "@(#)nis_tags.h 1.10 94/05/03 SMI" */ /* from file: zns_tags.h 1.7 Copyright (c) 1990 Sun Microsystems */ Modified: stable/10/include/rpcsvc/rex.x ============================================================================== --- stable/10/include/rpcsvc/rex.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/rex.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 HOLDER 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. */ /* Modified: stable/10/include/rpcsvc/rnusers.x ============================================================================== --- stable/10/include/rpcsvc/rnusers.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/rnusers.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 HOLDER 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. */ /* Modified: stable/10/include/rpcsvc/rstat.x ============================================================================== --- stable/10/include/rpcsvc/rstat.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/rstat.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 HOLDER 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. */ /* Modified: stable/10/include/rpcsvc/sm_inter.x ============================================================================== --- stable/10/include/rpcsvc/sm_inter.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/sm_inter.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,33 +1,35 @@ /* @(#)sm_inter.x 2.2 88/08/01 4.0 RPCSRC */ /* @(#)sm_inter.x 1.7 87/06/24 Copyr 1987 Sun Micro */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 HOLDER 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. */ /* Modified: stable/10/include/rpcsvc/spray.x ============================================================================== --- stable/10/include/rpcsvc/spray.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/spray.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 HOLDER 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. */ /* Modified: stable/10/include/rpcsvc/yp.x ============================================================================== --- stable/10/include/rpcsvc/yp.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/yp.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,32 +1,34 @@ /* @(#)yp.x 2.1 88/08/01 4.0 RPCSRC */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 HOLDER 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. */ /* Modified: stable/10/include/rpcsvc/yppasswd.x ============================================================================== --- stable/10/include/rpcsvc/yppasswd.x Thu Oct 9 23:05:31 2014 (r272849) +++ stable/10/include/rpcsvc/yppasswd.x Thu Oct 9 23:05:32 2014 (r272850) @@ -1,30 +1,32 @@ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 +/*- + * Copyright (c) 2010, Oracle America, Inc. + * + * 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. + * * Neither the name of the "Oracle America, Inc." nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * 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 HOLDER 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 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:14:03 2014 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 85A986BE; Thu, 9 Oct 2014 23:14: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 64B99B5B; Thu, 9 Oct 2014 23:14: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 s99NE3i0070193; Thu, 9 Oct 2014 23:14:03 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NE2ex070188; Thu, 9 Oct 2014 23:14:02 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092314.s99NE2ex070188@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:14:02 +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: r272852 - stable/10/sbin/route 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.18-1 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, 09 Oct 2014 23:14:03 -0000 Author: hrs Date: Thu Oct 9 23:14:02 2014 New Revision: 272852 URL: https://svnweb.freebsd.org/changeset/base/272852 Log: MFC r256695: - Add relative specification in expiration time. - Add proto3 option for RTF_PROTO3. - Use %lu for members of struct rt_metrics. Modified: stable/10/sbin/route/keywords stable/10/sbin/route/route.8 stable/10/sbin/route/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/route/keywords ============================================================================== --- stable/10/sbin/route/keywords Thu Oct 9 23:11:36 2014 (r272851) +++ stable/10/sbin/route/keywords Thu Oct 9 23:14:02 2014 (r272852) @@ -41,6 +41,7 @@ osi prefixlen proto1 proto2 +proto3 proxy recvpipe reject Modified: stable/10/sbin/route/route.8 ============================================================================== --- stable/10/sbin/route/route.8 Thu Oct 9 23:11:36 2014 (r272851) +++ stable/10/sbin/route/route.8 Thu Oct 9 23:14:02 2014 (r272852) @@ -318,6 +318,7 @@ by indicating the following correspondin -blackhole RTF_BLACKHOLE - silently discard pkts (during updates) -proto1 RTF_PROTO1 - set protocol specific routing flag #1 -proto2 RTF_PROTO2 - set protocol specific routing flag #2 +-proto3 RTF_PROTO3 - set protocol specific routing flag #3 .Ed .Pp The optional modifiers @@ -341,6 +342,17 @@ specify that all ensuing metrics may be .Fl lockrest meta-modifier. .Pp +Note that +.Fl expire +accepts expiration time of the route as the number of seconds since the +Epoch +.Pq see Xr time 3 . +When the first character of the number is +.Dq + +or +.Dq - , +it is interpreted as a value relative to the current time. +.Pp The optional modifier .Fl fib Ar number specifies that the command will be applied to a non-default FIB. Modified: stable/10/sbin/route/route.c ============================================================================== --- stable/10/sbin/route/route.c Thu Oct 9 23:11:36 2014 (r272851) +++ stable/10/sbin/route/route.c Thu Oct 9 23:14:02 2014 (r272852) @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -741,6 +742,7 @@ static void set_metric(char *value, int key) { int flag = 0; + char *endptr; u_long noval, *valp = &noval; switch (key) { @@ -760,7 +762,18 @@ set_metric(char *value, int key) rt_metrics.rmx_locks |= flag; if (locking) locking = 0; - *valp = atoi(value); + errno = 0; + *valp = strtol(value, &endptr, 0); + if (errno == 0 && *endptr != '\0') + errno = EINVAL; + if (errno) + err(EX_USAGE, "%s", value); + if (flag & RTV_EXPIRE && (value[0] == '+' || value[0] == '-')) { + struct timespec ts; + + clock_gettime(CLOCK_REALTIME_FAST, &ts); + *valp += ts.tv_sec; + } } #define F_ISHOST 0x01 @@ -847,6 +860,9 @@ newroute(int argc, char **argv) case K_PROTO2: flags |= RTF_PROTO2; break; + case K_PROTO3: + flags |= RTF_PROTO3; + break; case K_PROXY: nrflags |= F_PROXY; break; @@ -1701,6 +1717,7 @@ static void print_getmsg(struct rt_msghdr *rtm, int msglen, int fib) { struct sockaddr *sp[RTAX_MAX]; + struct timespec ts; char *cp; int i; @@ -1753,15 +1770,17 @@ print_getmsg(struct rt_msghdr *rtm, int #define msec(u) (((u) + 500) / 1000) /* usec to msec */ printf("\n%9s %9s %9s %9s %9s %10s %9s\n", "recvpipe", "sendpipe", "ssthresh", "rtt,msec", "mtu ", "weight", "expire"); - printf("%8ld%c ", rtm->rtm_rmx.rmx_recvpipe, lock(RPIPE)); - printf("%8ld%c ", rtm->rtm_rmx.rmx_sendpipe, lock(SPIPE)); - printf("%8ld%c ", rtm->rtm_rmx.rmx_ssthresh, lock(SSTHRESH)); - printf("%8ld%c ", msec(rtm->rtm_rmx.rmx_rtt), lock(RTT)); - printf("%8ld%c ", rtm->rtm_rmx.rmx_mtu, lock(MTU)); - printf("%8ld%c ", rtm->rtm_rmx.rmx_weight, lock(WEIGHT)); - if (rtm->rtm_rmx.rmx_expire) - rtm->rtm_rmx.rmx_expire -= time(0); - printf("%8ld%c\n", rtm->rtm_rmx.rmx_expire, lock(EXPIRE)); + printf("%8lu%c ", rtm->rtm_rmx.rmx_recvpipe, lock(RPIPE)); + printf("%8lu%c ", rtm->rtm_rmx.rmx_sendpipe, lock(SPIPE)); + printf("%8lu%c ", rtm->rtm_rmx.rmx_ssthresh, lock(SSTHRESH)); + printf("%8lu%c ", msec(rtm->rtm_rmx.rmx_rtt), lock(RTT)); + printf("%8lu%c ", rtm->rtm_rmx.rmx_mtu, lock(MTU)); + printf("%8lu%c ", rtm->rtm_rmx.rmx_weight, lock(WEIGHT)); + if (rtm->rtm_rmx.rmx_expire > 0) + clock_gettime(CLOCK_REALTIME_FAST, &ts); + else + ts.tv_sec = 0; + printf("%8ld%c\n", rtm->rtm_rmx.rmx_expire - ts.tv_sec, lock(EXPIRE)); #undef lock #undef msec #define RTA_IGN (RTA_DST|RTA_GATEWAY|RTA_NETMASK|RTA_IFP|RTA_IFA|RTA_BRD) From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:15:27 2014 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 14D07808; Thu, 9 Oct 2014 23: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 00479B6B; Thu, 9 Oct 2014 23: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 s99NFQQ0070472; Thu, 9 Oct 2014 23:15:26 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NFQTK070471; Thu, 9 Oct 2014 23:15:26 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092315.s99NFQTK070471@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:15: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: r272853 - stable/10/sbin/route 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.18-1 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, 09 Oct 2014 23:15:27 -0000 Author: hrs Date: Thu Oct 9 23:15:26 2014 New Revision: 272853 URL: https://svnweb.freebsd.org/changeset/base/272853 Log: MFC r256715: Use long explicitly for the time difference. Modified: stable/10/sbin/route/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/route/route.c ============================================================================== --- stable/10/sbin/route/route.c Thu Oct 9 23:14:02 2014 (r272852) +++ stable/10/sbin/route/route.c Thu Oct 9 23:15:26 2014 (r272853) @@ -1780,7 +1780,8 @@ print_getmsg(struct rt_msghdr *rtm, int clock_gettime(CLOCK_REALTIME_FAST, &ts); else ts.tv_sec = 0; - printf("%8ld%c\n", rtm->rtm_rmx.rmx_expire - ts.tv_sec, lock(EXPIRE)); + printf("%8ld%c\n", (long)(rtm->rtm_rmx.rmx_expire - ts.tv_sec), + lock(EXPIRE)); #undef lock #undef msec #define RTA_IGN (RTA_DST|RTA_GATEWAY|RTA_NETMASK|RTA_IFP|RTA_IFA|RTA_BRD) From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:17:19 2014 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 9499C9CF; Thu, 9 Oct 2014 23:17: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 7FBECB7D; Thu, 9 Oct 2014 23:17: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 s99NHJEr070774; Thu, 9 Oct 2014 23:17:19 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NHJpW070773; Thu, 9 Oct 2014 23:17:19 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092317.s99NHJpW070773@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:17: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: r272854 - stable/10/sbin/mdconfig 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.18-1 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, 09 Oct 2014 23:17:19 -0000 Author: hrs Date: Thu Oct 9 23:17:18 2014 New Revision: 272854 URL: https://svnweb.freebsd.org/changeset/base/272854 Log: MFC r257036: Return 0 if: 1. "-u N" specified, no -f, and mdN found, 2. no -u, "-f /pathname" specified, and mdN associated with /pathname found, 3. "-u N" specified, "-f /pathname" specified, and both of them found, 4. "-l" specified and no -f, 5. "-l" specified, "-f /pathname" specified, and /pathname found. otherwise return -1. Modified: stable/10/sbin/mdconfig/mdconfig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mdconfig/mdconfig.c ============================================================================== --- stable/10/sbin/mdconfig/mdconfig.c Thu Oct 9 23:15:26 2014 (r272853) +++ stable/10/sbin/mdconfig/mdconfig.c Thu Oct 9 23:17:18 2014 (r272854) @@ -481,12 +481,18 @@ md_list(const char *units, int opt, cons printf("\n"); /* XXX: Check if it's enough to clean everything. */ geom_stats_snapshot_free(sq); - if (((opt & OPT_UNIT) && (fflag == NULL) && ufound) || - ((opt & OPT_UNIT) == 0 && (fflag != NULL) && ffound) || - ((opt & OPT_UNIT) && (fflag != NULL) && ufound && ffound)) - return (0); - else - return (-1); + if (opt & OPT_UNIT) { + if (((fflag == NULL) && ufound) || + ((fflag == NULL) && (units != NULL) && ufound) || + ((fflag != NULL) && ffound) || + ((fflag != NULL) && (units != NULL) && ufound && ffound)) + return (0); + } else if (opt & OPT_LIST) { + if ((fflag == NULL) || + ((fflag != NULL) && ffound)) + return (0); + } + return (-1); } /* From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:23:13 2014 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 EE225B36; Thu, 9 Oct 2014 23:23: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 D9EC4C2D; Thu, 9 Oct 2014 23:23: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 s99NNCs2074946; Thu, 9 Oct 2014 23:23:12 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NNCQ9074945; Thu, 9 Oct 2014 23:23:12 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092323.s99NNCQ9074945@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:23: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: r272855 - stable/10/usr.bin/netstat 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.18-1 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, 09 Oct 2014 23:23:13 -0000 Author: hrs Date: Thu Oct 9 23:23:12 2014 New Revision: 272855 URL: https://svnweb.freebsd.org/changeset/base/272855 Log: MFC r266177: - Do not override sin6_scope_id in LLA when it is already set to non-zero. This fixes destination list in output of netstat -r. - Plug a memory leak. - Add RTM_VERSION check. Modified: stable/10/usr.bin/netstat/route.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/netstat/route.c ============================================================================== --- stable/10/usr.bin/netstat/route.c Thu Oct 9 23:17:18 2014 (r272854) +++ stable/10/usr.bin/netstat/route.c Thu Oct 9 23:23:12 2014 (r272855) @@ -604,6 +604,8 @@ p_rtable_sysctl(int fibnum, int af) lim = buf + needed; for (next = buf; next < lim; next += rtm->rtm_msglen) { rtm = (struct rt_msghdr *)next; + if (rtm->rtm_version != RTM_VERSION) + continue; /* * Peek inside header to determine AF */ @@ -616,6 +618,7 @@ p_rtable_sysctl(int fibnum, int af) } p_rtentry_sysctl(rtm); } + free(buf); } static void @@ -993,9 +996,9 @@ in6_fillscopeid(struct sockaddr_in6 *sa6 if (IN6_IS_ADDR_LINKLOCAL(&sa6->sin6_addr) || IN6_IS_ADDR_MC_NODELOCAL(&sa6->sin6_addr) || IN6_IS_ADDR_MC_LINKLOCAL(&sa6->sin6_addr)) { - /* XXX: override is ok? */ - sa6->sin6_scope_id = - ntohs(*(u_int16_t *)&sa6->sin6_addr.s6_addr[2]); + if (sa6->sin6_scope_id == 0) + sa6->sin6_scope_id = + ntohs(*(u_int16_t *)&sa6->sin6_addr.s6_addr[2]); sa6->sin6_addr.s6_addr[2] = sa6->sin6_addr.s6_addr[3] = 0; } #endif From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:24:24 2014 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 699D5C7F; Thu, 9 Oct 2014 23: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 55442C3F; Thu, 9 Oct 2014 23: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 s99NOOwv075159; Thu, 9 Oct 2014 23:24:24 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NOOmt075158; Thu, 9 Oct 2014 23:24:24 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092324.s99NOOmt075158@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:24:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272856 - stable/10/etc 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.18-1 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, 09 Oct 2014 23:24:24 -0000 Author: hrs Date: Thu Oct 9 23:24:23 2014 New Revision: 272856 URL: https://svnweb.freebsd.org/changeset/base/272856 Log: MFC r265225: Move configuration of IPv6 NDP flags to a point before handling ifconfig_IF. This fixes a race that a non-IPv4 interface can get an EUI64 LLA even if it has IFDISABLED nd6 flag at boot time. Modified: stable/10/etc/network.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/network.subr ============================================================================== --- stable/10/etc/network.subr Thu Oct 9 23:23:12 2014 (r272855) +++ stable/10/etc/network.subr Thu Oct 9 23:24:23 2014 (r272856) @@ -132,13 +132,6 @@ ifconfig_up() _cfg=0 fi - # ifconfig_IF - ifconfig_args=`ifconfig_getargs $1` - if [ -n "${ifconfig_args}" ]; then - eval ${IFCONFIG_CMD} $1 ${ifconfig_args} - _cfg=0 - fi - # inet6 specific if ! noafif $1 && afexists inet6; then if checkyesno ipv6_activate_all_interfaces; then @@ -174,7 +167,17 @@ ifconfig_up() if [ -n "${_ipv6_opts}" ]; then ${IFCONFIG_CMD} $1 inet6 ${_ipv6_opts} fi + fi + # ifconfig_IF + ifconfig_args=`ifconfig_getargs $1` + if [ -n "${ifconfig_args}" ]; then + eval ${IFCONFIG_CMD} $1 ${ifconfig_args} + _cfg=0 + fi + + # inet6 specific + if ! noafif $1 && afexists inet6; then # ifconfig_IF_ipv6 ifconfig_args=`ifconfig_getargs $1 ipv6` if [ -n "${ifconfig_args}" ]; then From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:25:58 2014 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 560F9DC8; Thu, 9 Oct 2014 23:25: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 29804C4B; Thu, 9 Oct 2014 23:25: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 s99NPwTh075418; Thu, 9 Oct 2014 23:25:58 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NPwom075417; Thu, 9 Oct 2014 23:25:58 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092325.s99NPwom075417@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:25: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: r272857 - 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.18-1 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, 09 Oct 2014 23:25:58 -0000 Author: hrs Date: Thu Oct 9 23:25:57 2014 New Revision: 272857 URL: https://svnweb.freebsd.org/changeset/base/272857 Log: MFC r266248: Cancel DAD for an ifa when the ifp has ND6_IFF_IFDISABLED as early as possible and do not clear IN6_IFF_TENTATIVE. If IFDISABLED was accidentally set after a DAD started, TENTATIVE could be cleared because no NA was received due to IFDISABLED, and as a result it could prevent DAD when manually clearing IFDISABLED after that. Modified: stable/10/sys/netinet6/nd6_nbr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/10/sys/netinet6/nd6_nbr.c Thu Oct 9 23:24:23 2014 (r272856) +++ stable/10/sys/netinet6/nd6_nbr.c Thu Oct 9 23:25:57 2014 (r272857) @@ -1328,6 +1328,7 @@ nd6_dad_timer(struct dadq *dp) { CURVNET_SET(dp->dad_vnet); struct ifaddr *ifa = dp->dad_ifa; + struct ifnet *ifp = dp->dad_ifa->ifa_ifp; struct in6_ifaddr *ia = (struct in6_ifaddr *)ifa; char ip6buf[INET6_ADDRSTRLEN]; @@ -1336,6 +1337,16 @@ nd6_dad_timer(struct dadq *dp) log(LOG_ERR, "nd6_dad_timer: called with null parameter\n"); goto done; } + if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) { + /* Do not need DAD for ifdisabled interface. */ + TAILQ_REMOVE(&V_dadq, (struct dadq *)dp, dad_list); + log(LOG_ERR, "nd6_dad_timer: cancel DAD on %s because of " + "ND6_IFF_IFDISABLED.\n", ifp->if_xname); + free(dp, M_IP6NDP); + dp = NULL; + ifa_free(ifa); + goto done; + } if (ia->ia6_flags & IN6_IFF_DUPLICATED) { log(LOG_ERR, "nd6_dad_timer: called with duplicated address " "%s(%s)\n", @@ -1402,9 +1413,12 @@ nd6_dad_timer(struct dadq *dp) } else { /* * We are done with DAD. No NA came, no NS came. - * No duplicate address found. + * No duplicate address found. Check IFDISABLED flag + * again in case that it is changed between the + * beginning of this function and here. */ - ia->ia6_flags &= ~IN6_IFF_TENTATIVE; + if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) == 0) + ia->ia6_flags &= ~IN6_IFF_TENTATIVE; nd6log((LOG_DEBUG, "%s: DAD complete for %s - no duplicates found\n", From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:28:04 2014 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 EDF66F04; Thu, 9 Oct 2014 23:28: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 D95E6C58; Thu, 9 Oct 2014 23:28: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 s99NS4V2075747; Thu, 9 Oct 2014 23:28:04 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NS4O5075746; Thu, 9 Oct 2014 23:28:04 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092328.s99NS4O5075746@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:28: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: r272858 - stable/10/etc 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.18-1 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, 09 Oct 2014 23:28:05 -0000 Author: hrs Date: Thu Oct 9 23:28:04 2014 New Revision: 272858 URL: https://svnweb.freebsd.org/changeset/base/272858 Log: MFC r266267, r267636: Fix an issue in range specification handling when a "-foo" is specified in ifconfig_IF_aliasN. Modified: stable/10/etc/network.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/network.subr ============================================================================== --- stable/10/etc/network.subr Thu Oct 9 23:25:57 2014 (r272857) +++ stable/10/etc/network.subr Thu Oct 9 23:28:04 2014 (r272858) @@ -1043,7 +1043,7 @@ ifalias_af_common_handler() case $_c in ${_af}) case $_tmpargs in - ${_af}\ *-*) + ${_af}\ *[0-9a-fA-F]-*) ifalias_af_common_handler $_if $_af $_action \ `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}\ }` ;; @@ -1061,7 +1061,7 @@ ifalias_af_common_handler() # Process the last component if any. if [ -n "$_tmpargs}" ]; then case $_tmpargs in - ${_af}\ *-*) + ${_af}\ *[0-9a-fA-F]-*) ifalias_af_common_handler $_if $_af $_action \ `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}\ }` ;; From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:29:45 2014 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 EC659CC; Thu, 9 Oct 2014 23:29: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 BF281C61; Thu, 9 Oct 2014 23:29: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 s99NTjvF076000; Thu, 9 Oct 2014 23:29:45 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NTj7E075998; Thu, 9 Oct 2014 23:29:45 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092329.s99NTj7E075998@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:29: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: r272859 - in stable/10/sys: netinet 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.18-1 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, 09 Oct 2014 23:29:46 -0000 Author: hrs Date: Thu Oct 9 23:29:44 2014 New Revision: 272859 URL: https://svnweb.freebsd.org/changeset/base/272859 Log: MFC r269054: Fix EtherIP. TOS field must be initialized when the inner protocol is PF_LINK, and multicast/broadcast flag should always be dropped because the outer protocol uses unicast even when the inner address is not for unicast. It had been broken since r236951 when gif_output() started to use IFQ_HANDOFF(). Modified: stable/10/sys/netinet/in_gif.c stable/10/sys/netinet6/in6_gif.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/in_gif.c ============================================================================== --- stable/10/sys/netinet/in_gif.c Thu Oct 9 23:28:04 2014 (r272858) +++ stable/10/sys/netinet/in_gif.c Thu Oct 9 23:29:44 2014 (r272859) @@ -169,6 +169,7 @@ in_gif_output(struct ifnet *ifp, int fam return ENOBUFS; bcopy(&eiphdr, mtod(m, struct etherip_header *), sizeof(struct etherip_header)); + tos = 0; break; default: @@ -256,6 +257,7 @@ in_gif_output(struct ifnet *ifp, int fam #endif } + m->m_flags &= ~(M_BCAST|M_MCAST); error = ip_output(m, NULL, &sc->gif_ro, 0, NULL, NULL); if (!(GIF2IFP(sc)->if_flags & IFF_LINK0) && Modified: stable/10/sys/netinet6/in6_gif.c ============================================================================== --- stable/10/sys/netinet6/in6_gif.c Thu Oct 9 23:28:04 2014 (r272858) +++ stable/10/sys/netinet6/in6_gif.c Thu Oct 9 23:29:44 2014 (r272859) @@ -174,6 +174,7 @@ in6_gif_output(struct ifnet *ifp, return ENOBUFS; bcopy(&eiphdr, mtod(m, struct etherip_header *), sizeof(struct etherip_header)); + itos = 0; break; default: @@ -264,6 +265,7 @@ in6_gif_output(struct ifnet *ifp, #endif } + m->m_flags &= ~(M_BCAST|M_MCAST); #ifdef IPV6_MINMTU /* * force fragmentation to minimum MTU, to avoid path MTU discovery. From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:30:52 2014 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 8842A218; Thu, 9 Oct 2014 23:30: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 74026C70; Thu, 9 Oct 2014 23:30: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 s99NUqFO076769; Thu, 9 Oct 2014 23:30:52 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NUqd9076768; Thu, 9 Oct 2014 23:30:52 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092330.s99NUqd9076768@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:30: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: r272860 - stable/10/usr.sbin/route6d 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.18-1 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, 09 Oct 2014 23:30:52 -0000 Author: hrs Date: Thu Oct 9 23:30:51 2014 New Revision: 272860 URL: https://svnweb.freebsd.org/changeset/base/272860 Log: MFC r270234: Recover sin6_scope_id of gateway addresses in riprecv() by using the if_index where a RIP packet was received. This fixes a bug which prevented gateway addresses in fe80::/64 from being added. Modified: stable/10/usr.sbin/route6d/route6d.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/route6d/route6d.c ============================================================================== --- stable/10/usr.sbin/route6d/route6d.c Thu Oct 9 23:29:44 2014 (r272859) +++ stable/10/usr.sbin/route6d/route6d.c Thu Oct 9 23:30:51 2014 (r272860) @@ -2838,6 +2838,8 @@ addroute(struct riprt *rrt, sin6->sin6_len = sizeof(struct sockaddr_in6); sin6->sin6_family = AF_INET6; sin6->sin6_addr = *gw; + if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) + sin6->sin6_scope_id = ifcp->ifc_index; sin6 = (struct sockaddr_in6 *)((char *)sin6 + ROUNDUP(sin6->sin6_len)); /* Netmask */ sin6->sin6_len = sizeof(struct sockaddr_in6); From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:33:34 2014 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 4EA19363; Thu, 9 Oct 2014 23:33: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 39EE6D09; Thu, 9 Oct 2014 23:33: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 s99NXYAh080076; Thu, 9 Oct 2014 23:33:34 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NXXsM080071; Thu, 9 Oct 2014 23:33:33 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092333.s99NXXsM080071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:33: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: r272861 - in stable/10/etc: defaults rc.d 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.18-1 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, 09 Oct 2014 23:33:34 -0000 Author: hrs Date: Thu Oct 9 23:33:33 2014 New Revision: 272861 URL: https://svnweb.freebsd.org/changeset/base/272861 Log: MFC r270780: Fix rc.d/gssd script to define the default values in a standard way. MFC r270781: - Add a warning message when an IPv6 address is specified with no prefixlen. - Use a parameter argument in jls(8) instead of doing grep. Modified: stable/10/etc/defaults/rc.conf stable/10/etc/rc.d/gssd stable/10/etc/rc.d/jail Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/rc.conf ============================================================================== --- stable/10/etc/defaults/rc.conf Thu Oct 9 23:30:51 2014 (r272860) +++ stable/10/etc/defaults/rc.conf Thu Oct 9 23:33:33 2014 (r272861) @@ -288,6 +288,7 @@ kfd_enable="NO" # Run kfd (or NO) kfd_program="/usr/libexec/kfd" # path to kerberos 5 kfd daemon gssd_enable="NO" # Run the gssd daemon (or NO). +gssd_program="/usr/sbin/gssd" # Path to gssd. gssd_flags="" # Flags for gssd. rwhod_enable="NO" # Run the rwho daemon (or NO). Modified: stable/10/etc/rc.d/gssd ============================================================================== --- stable/10/etc/rc.d/gssd Thu Oct 9 23:30:51 2014 (r272860) +++ stable/10/etc/rc.d/gssd Thu Oct 9 23:33:33 2014 (r272861) @@ -9,10 +9,8 @@ . /etc/rc.subr -name="gssd" +name=gssd +rcvar=gssd_enable load_rc_config $name -rcvar="gssd_enable" -command="${gssd:-/usr/sbin/${name}}" -eval ${name}_flags=\"${gssd_flags}\" run_rc_command "$1" Modified: stable/10/etc/rc.d/jail ============================================================================== --- stable/10/etc/rc.d/jail Thu Oct 9 23:30:51 2014 (r272860) +++ stable/10/etc/rc.d/jail Thu Oct 9 23:33:33 2014 (r272861) @@ -420,7 +420,7 @@ jail_status() jail_start() { - local _j _jid _jn _jl + local _j _jid _jl if [ $# = 0 ]; then return @@ -433,12 +433,10 @@ jail_start() command_args="-f $jail_conf -c" _tmp=`mktemp -t jail` || exit 3 if $command $rc_flags $command_args >> $_tmp 2>&1; then - $jail_jls -nq | while read IN; do - _jn=$(echo $IN | tr " " "\n" | grep ^name=) - _jid=$(echo $IN | tr " " "\n" | grep ^jid=) - echo -n " ${_jn#name=}" - echo "${_jid#jid=}" \ - > /var/run/jail_${_jn#name=}.id + $jail_jls jid name | while read IN; do + set -- $IN + echo -n " $2" + echo $1 > /var/run/jail_$2.id done else tail -1 $_tmp @@ -468,9 +466,8 @@ jail_start() sleep 1 for _j in $_jl; do echo -n " ${_hostname:-${_j}}" - if _jid=$($jail_jls -n -j $_j | tr " " "\n" | \ - grep ^jid=); then - echo "${_jid#jid=}" > /var/run/jail_${_j}.id + if _jid=$($jail_jls -j $_j jid); then + echo "$_jid" > /var/run/jail_${_j}.id else rm -f /var/run/jail_${_j}.id echo " cannot start jail " \ @@ -492,9 +489,8 @@ jail_start() if $command $rc_flags $command_args \ >> $_tmp 2>&1 /var/run/jail_${_j}.id + _jid=$($jail_jls -j $_j jid) + echo $_jid > /var/run/jail_${_j}.id else rm -f /var/run/jail_${_j}.id echo " cannot start jail " \ @@ -509,7 +505,7 @@ jail_start() jail_stop() { - local _j _jn + local _j if [ $# = 0 ]; then return @@ -520,16 +516,14 @@ jail_stop() command=$jail_program rc_flags=$jail_flags command_args="-f $jail_conf -r" - $jail_jls -nq | while read IN; do - _jn=$(echo $IN | tr " " "\n" | grep ^name=) - echo -n " ${_jn#name=}" + $jail_jls name | while read _j; do + echo -n " $_j" _tmp=`mktemp -t jail` || exit 3 - $command $rc_flags $command_args ${_jn#name=} \ - >> $_tmp 2>&1 - if $jail_jls -j ${_jn#name=} > /dev/null 2>&1; then + $command $rc_flags $command_args $_j >> $_tmp 2>&1 + if $jail_jls -j $_j > /dev/null 2>&1; then tail -1 $_tmp else - rm -f /var/run/jail_${_jn#name=}.id + rm -f /var/run/jail_${_j}.id fi rm -f $_tmp done From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:35:26 2014 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 C4FBB4AC; Thu, 9 Oct 2014 23:35: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 AFC91D16; Thu, 9 Oct 2014 23:35: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 s99NZQSm080411; Thu, 9 Oct 2014 23:35:26 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NZO1h080399; Thu, 9 Oct 2014 23:35:24 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092335.s99NZO1h080399@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272862 - in stable/10/etc: defaults rc.d 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.18-1 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, 09 Oct 2014 23:35:26 -0000 Author: hrs Date: Thu Oct 9 23:35:23 2014 New Revision: 272862 URL: https://svnweb.freebsd.org/changeset/base/272862 Log: MFC r270782: Restructure rc.d scripts for kerberos5 daemons: - Rename $kerberos5_server_enable with $kdc_enable and rename rc.d/kerberos with rc.d/kdc. - Rename $kadmin5_server_enable with $kadmind_enable. - Rename ${kerberos5,kpasswdd}_server with ${kdc,kpasswdd}_program. - Fix rc.d/{kadmind,kerberos,kpasswdd,kfd} scripts not to change variables after load_rc_config(). - Add rc.d/ipropd_master and rc.d/ipropd_slave scripts. These are for iprop-master(8) and iprop-slave(8). Keytab used for iprop service is defined in ipropd_{master,slave}_keytab (/etc/krb5.keytab by default). - Add dependency on rc.d/kdc to SERVERS. rc.d/kdc must be invoked as early as possible before scripts divided by rc.d/SERVERS. Note that changes to rc.d/{kdc,kpasswdd,kadmind} are backward-compatible with the old configuration variables: ${kerberos5,kpasswdd,kadmin5}_server{,_enable,_flags}. Added: stable/10/etc/rc.d/ipropd_master - copied unchanged from r270782, head/etc/rc.d/ipropd_master stable/10/etc/rc.d/ipropd_slave - copied unchanged from r270782, head/etc/rc.d/ipropd_slave stable/10/etc/rc.d/kdc - copied unchanged from r270782, head/etc/rc.d/kdc Deleted: stable/10/etc/rc.d/kerberos Modified: stable/10/etc/defaults/rc.conf stable/10/etc/rc.d/Makefile stable/10/etc/rc.d/SERVERS stable/10/etc/rc.d/kadmind stable/10/etc/rc.d/kfd stable/10/etc/rc.d/kpasswdd Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/rc.conf ============================================================================== --- stable/10/etc/defaults/rc.conf Thu Oct 9 23:33:33 2014 (r272861) +++ stable/10/etc/defaults/rc.conf Thu Oct 9 23:35:23 2014 (r272862) @@ -277,15 +277,28 @@ local_unbound_enable="NO" # local cachin # # kerberos. Do not run the admin daemons on slave servers # -kerberos5_server_enable="NO" # Run a kerberos 5 master server (or NO). -kerberos5_server="/usr/libexec/kdc" # path to kerberos 5 KDC -kerberos5_server_flags="--detach" # Additional flags to the kerberos 5 server -kadmind5_server_enable="NO" # Run kadmind (or NO) -kadmind5_server="/usr/libexec/kadmind" # path to kerberos 5 admin daemon -kpasswdd_server_enable="NO" # Run kpasswdd (or NO) -kpasswdd_server="/usr/libexec/kpasswdd" # path to kerberos 5 passwd daemon +kdc_enable="NO" # Run a kerberos 5 KDC (or NO). +kdc_program="/usr/libexec/kdc" # path to kerberos 5 KDC +kdc_flags="" # Additional flags to the kerberos 5 KDC +kadmind_enable="NO" # Run kadmind (or NO) +kadmind_program="/usr/libexec/kadmind" # path to kadmind +kpasswdd_enable="NO" # Run kpasswdd (or NO) +kpasswdd_program="/usr/libexec/kpasswdd" # path to kpasswdd kfd_enable="NO" # Run kfd (or NO) kfd_program="/usr/libexec/kfd" # path to kerberos 5 kfd daemon +kfd_flags="" +ipropd_master_enable="NO" # Run Heimdal incremental propagation daemon + # (master daemon). +ipropd_master_program="/usr/libexec/ipropd-master" +ipropd_master_flags="" # Flags to ipropd-master. +ipropd_master_keytab="/etc/krb5.keytab" # keytab for ipropd-master. +ipropd_master_slaves="" # slave node names used for /var/heimdal/slaves. +ipropd_slave_enable="NO" # Run Heimdal incremental propagation daemon + # (slave daemon). +ipropd_slave_program="/usr/libexec/ipropd-slave" +ipropd_slave_flags="" # Flags to ipropd-slave. +ipropd_slave_keytab="/etc/krb5.keytab" # keytab for ipropd-slave. +ipropd_slave_masters="" # master node names. gssd_enable="NO" # Run the gssd daemon (or NO). gssd_program="/usr/sbin/gssd" # Path to gssd. Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Thu Oct 9 23:33:33 2014 (r272861) +++ stable/10/etc/rc.d/Makefile Thu Oct 9 23:35:23 2014 (r272862) @@ -64,13 +64,15 @@ FILES= DAEMON \ ipfw \ ipmon \ ipnat \ + ipropd_master \ + ipropd_slave \ ipsec \ ${_ipxrouted} \ iscsictl \ iscsid \ jail \ kadmind \ - kerberos \ + kdc \ keyserv \ kfd \ kld \ Modified: stable/10/etc/rc.d/SERVERS ============================================================================== --- stable/10/etc/rc.d/SERVERS Thu Oct 9 23:33:33 2014 (r272861) +++ stable/10/etc/rc.d/SERVERS Thu Oct 9 23:35:23 2014 (r272862) @@ -4,7 +4,7 @@ # # PROVIDE: SERVERS -# REQUIRE: mountcritremote abi ldconfig savecore watchdogd +# REQUIRE: mountcritremote abi ldconfig savecore watchdogd kdc # This is a dummy dependency, for early-start servers relying on # some basic configuration. Copied: stable/10/etc/rc.d/ipropd_master (from r270782, head/etc/rc.d/ipropd_master) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/rc.d/ipropd_master Thu Oct 9 23:35:23 2014 (r272862, copy of r270782, head/etc/rc.d/ipropd_master) @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: ipropd_master +# REQUIRE: kdc +# KEYWORD: shutdown + +. /etc/rc.subr + +name=ipropd_master +rcvar=${name}_enable +required_files="$ipropd_master_keytab" +start_precmd=${name}_start_precmd +start_postcmd=${name}_start_postcmd + +ipropd_master_start_precmd() +{ + + if [ -z "$ipropd_master_slaves" ]; then + warn "\$ipropd_master_slaves is empty." + return 1 + fi + for _slave in $ipropd_master_slaves; do + echo $_slave + done > /var/heimdal/slaves || return 1 + command_args="$command_args \ + --keytab=\"$ipropd_master_keytab\" \ + --detach \ + " +} +ipropd_master_start_postcmd() +{ + + echo "${name}: slave nodes: $ipropd_master_slaves" +} + +load_rc_config $name +run_rc_command "$1" Copied: stable/10/etc/rc.d/ipropd_slave (from r270782, head/etc/rc.d/ipropd_slave) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/rc.d/ipropd_slave Thu Oct 9 23:35:23 2014 (r272862, copy of r270782, head/etc/rc.d/ipropd_slave) @@ -0,0 +1,32 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: ipropd_slave +# REQUIRE: kdc +# KEYWORD: shutdown + +. /etc/rc.subr + +name=ipropd_slave +rcvar=${name}_enable +required_files="$ipropd_slave_keytab" +start_precmd=${name}_start_precmd + +ipropd_slave_start_precmd() +{ + + if [ -z "$ipropd_slave_masters" ]; then + warn "\$ipropd_slave_masters is empty." + return 1 + fi + command_args=" \ + $command_args \ + --keytab=\"$ipropd_slave_keytab\" \ + --detach \ + $ipropd_slave_masters" +} + +load_rc_config $name +run_rc_command "$1" Modified: stable/10/etc/rc.d/kadmind ============================================================================== --- stable/10/etc/rc.d/kadmind Thu Oct 9 23:33:33 2014 (r272861) +++ stable/10/etc/rc.d/kadmind Thu Oct 9 23:35:23 2014 (r272862) @@ -3,18 +3,26 @@ # $FreeBSD$ # -# PROVIDE: kadmin -# REQUIRE: kerberos -# BEFORE: DAEMON +# PROVIDE: kadmind +# REQUIRE: kdc +# KEYWORD: shutdown . /etc/rc.subr -name="kadmind5" -load_rc_config $name -rcvar="kadmind5_server_enable" -unset start_cmd -command="${kadmind5_server}" -command_args="&" -required_vars="kerberos5_server_enable" +name=kadmind +rcvar=${name}_enable +required_vars=kdc_enable +start_precmd=${name}_start_precmd + +set_rcvar_obsolete kadmind5_server_enable kadmind_enable +set_rcvar_obsolete kadmind5_server kadmind_program +set_rcvar_obsolete kerberos5_server_enable kdc_enable + +kadmind_start_precmd() +{ + command_args="$command_args &" +} + +load_rc_config $name run_rc_command "$1" Copied: stable/10/etc/rc.d/kdc (from r270782, head/etc/rc.d/kdc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/rc.d/kdc Thu Oct 9 23:35:23 2014 (r272862, copy of r270782, head/etc/rc.d/kdc) @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: kdc +# REQUIRE: NETWORKING +# KEYWORD: shutdown + +. /etc/rc.subr + +name=kdc +rcvar=${name}_enable +start_precmd=${name}_start_precmd + +set_rcvar_obsolete kerberos5_server_enable kdc_enable +set_rcvar_obsolete kerberos5_server kdc_program +set_rcvar_obsolete kerberos5_server_flags kdc_flags + +kdc_start_precmd() +{ + + command_args="$command_args --detach" +} + +load_rc_config $name +run_rc_command "$1" Modified: stable/10/etc/rc.d/kfd ============================================================================== --- stable/10/etc/rc.d/kfd Thu Oct 9 23:33:33 2014 (r272861) +++ stable/10/etc/rc.d/kfd Thu Oct 9 23:35:23 2014 (r272862) @@ -10,8 +10,14 @@ . /etc/rc.subr name=kfd -rcvar=kfd_enable -load_rc_config $name -command_args="-i &" +rcvar=${name}_enable +start_precmd=${name}_start_precmd + +kfd_start_precmd() +{ + command_args="$command_args -i &" +} + +load_rc_config $name run_rc_command "$1" Modified: stable/10/etc/rc.d/kpasswdd ============================================================================== --- stable/10/etc/rc.d/kpasswdd Thu Oct 9 23:33:33 2014 (r272861) +++ stable/10/etc/rc.d/kpasswdd Thu Oct 9 23:35:23 2014 (r272862) @@ -4,17 +4,25 @@ # # PROVIDE: kpasswdd -# REQUIRE: kadmin -# BEFORE: DAEMON +# REQUIRE: kdc +# KEYWORD: shutdown . /etc/rc.subr -name="kpasswdd" -load_rc_config $name -rcvar="kpasswdd_server_enable" -unset start_cmd -command="${kpasswdd_server}" -command_args="&" -required_vars="kadmind5_server_enable" +name=kpasswdd +rcvar=${name}_enable +required_vars=kdc_enable +start_precmd=${name}_start_precmd + +set_rcvar_obsolete kpasswdd_server_enable kpasswdd_enable +set_rcvar_obsolete kpasswdd_server kpasswdd_program +set_rcvar_obsolete kerberos5_server_enable kdc_enable + +kpasswdd_start_precmd() +{ + command_args="$command_args &" +} + +load_rc_config $name run_rc_command "$1" From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:39:18 2014 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 859BD6D8; Thu, 9 Oct 2014 23:39: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 57B4CD3B; Thu, 9 Oct 2014 23:39: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 s99NdIlL080920; Thu, 9 Oct 2014 23:39:18 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NdIBg080919; Thu, 9 Oct 2014 23:39:18 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092339.s99NdIBg080919@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:39: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: r272863 - stable/10/etc/rc.d 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.18-1 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, 09 Oct 2014 23:39:18 -0000 Author: hrs Date: Thu Oct 9 23:39:17 2014 New Revision: 272863 URL: https://svnweb.freebsd.org/changeset/base/272863 Log: MFC r270783: Return false status only when adding a route is failed. It could erroneously return false due to an afexists() check loop in routing_start(). Modified: stable/10/etc/rc.d/routing Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/routing ============================================================================== --- stable/10/etc/rc.d/routing Thu Oct 9 23:35:23 2014 (r272862) +++ stable/10/etc/rc.d/routing Thu Oct 9 23:39:17 2014 (r272863) @@ -23,32 +23,33 @@ ROUTE_CMD="/sbin/route" routing_start() { - local _cmd _af _if _a + local _cmd _af _if _a _ret _cmd=$1 _af=$2 _if=$3 + _ret=0 case $_if in ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) _if="" ;; esac case $_af in - inet|inet6|ipx|atm) + ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) + for _a in inet inet6 atm; do + afexists $_a || continue + setroutes $_cmd $_a $_if || _ret=1 + done + ;; + *) if afexists $_af; then - setroutes $_cmd $_af $_if + setroutes $_cmd $_af $_if || _ret=1 else err 1 "Unsupported address family: $_af." fi - ;; - ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) - for _a in inet inet6 ipx atm; do - afexists $_a && setroutes $_cmd $_a $_if - done - ;; - *) - err 1 "Unsupported address family: $_af." - ;; + ;; esac + + return $_ret } routing_stop() @@ -62,17 +63,6 @@ routing_stop() esac case $_af in - inet|inet6|ipx|atm) - if afexists $_af; then - eval static_${_af} delete $_if - # When $_if is specified, do not flush routes. - if ! [ -n "$_if" ]; then - eval routing_stop_${_af} - fi - else - err 1 "Unsupported address family: $_af." - fi - ;; ""|[Aa][Ll][Ll]|[Aa][Nn][Yy]) for _a in inet inet6 ipx atm; do afexists $_a || continue @@ -82,10 +72,18 @@ routing_stop() eval routing_stop_${_a} fi done - ;; + ;; *) - err 1 "Unsupported address family: $_af." - ;; + if afexists $_af; then + eval static_${_af} delete $_if + # When $_if is specified, do not flush routes. + if ! [ -n "$_if" ]; then + eval routing_stop_${_af} + fi + else + err 1 "Unsupported address family: $_af." + fi + ;; esac } From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:40:09 2014 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 39E34818; Thu, 9 Oct 2014 23:40: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 25E2ED42; Thu, 9 Oct 2014 23:40: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 s99Ne9rV081155; Thu, 9 Oct 2014 23:40:09 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99Ne9cR081154; Thu, 9 Oct 2014 23:40:09 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092340.s99Ne9cR081154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:40:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272864 - stable/10/etc/rc.d 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.18-1 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, 09 Oct 2014 23:40:09 -0000 Author: hrs Date: Thu Oct 9 23:40:08 2014 New Revision: 272864 URL: https://svnweb.freebsd.org/changeset/base/272864 Log: MFC r270836: Use ipv6_prefer when at least one ifconfig_IF_ipv6 is configured. Modified: stable/10/etc/rc.d/ip6addrctl Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/ip6addrctl ============================================================================== --- stable/10/etc/rc.d/ip6addrctl Thu Oct 9 23:39:17 2014 (r272863) +++ stable/10/etc/rc.d/ip6addrctl Thu Oct 9 23:40:08 2014 (r272864) @@ -75,6 +75,8 @@ ip6addrctl_start() else if checkyesno ipv6_activate_all_interfaces; then ip6addrctl_prefer_ipv6 + elif [ -n "$(list_vars ifconfig_\*_ipv6)" ]; then + ip6addrctl_prefer_ipv6 else ip6addrctl_prefer_ipv4 fi From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:41:12 2014 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 AEDF1969; Thu, 9 Oct 2014 23:41: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 9AD08D5F; Thu, 9 Oct 2014 23:41: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 s99NfCnG083633; Thu, 9 Oct 2014 23:41:12 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NfCcE083632; Thu, 9 Oct 2014 23:41:12 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092341.s99NfCcE083632@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:41: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: r272865 - stable/10/etc/rc.d 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.18-1 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, 09 Oct 2014 23:41:12 -0000 Author: hrs Date: Thu Oct 9 23:41:11 2014 New Revision: 272865 URL: https://svnweb.freebsd.org/changeset/base/272865 Log: MFC r271145: Fix a bug which prevented mount.fstab parameter from being converted when jail_JID_devfs_enable=NO. Modified: stable/10/etc/rc.d/jail Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/jail ============================================================================== --- stable/10/etc/rc.d/jail Thu Oct 9 23:40:08 2014 (r272864) +++ stable/10/etc/rc.d/jail Thu Oct 9 23:41:11 2014 (r272865) @@ -207,6 +207,10 @@ parse_options() extract_var $_j consolelog exec.consolelog - \ /var/log/jail_${_j}_console.log + if [ -r $_fstab ]; then + echo " mount.fstab = \"$_fstab\";" + fi + eval : \${jail_${_j}_devfs_enable:=${jail_devfs_enable:-NO}} if checkyesno jail_${_j}_devfs_enable; then echo " mount.devfs;" @@ -222,11 +226,7 @@ parse_options() ;; *) warn "devfs_ruleset must be an integer." ;; esac - if [ -r $_fstab ]; then - echo " mount.fstab = \"$_fstab\";" - fi fi - eval : \${jail_${_j}_fdescfs_enable:=${jail_fdescfs_enable:-NO}} if checkyesno jail_${_j}_fdescfs_enable; then echo " mount.fdescfs;" From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:42:23 2014 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 6E99BAB2; Thu, 9 Oct 2014 23:42: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 408D4E08; Thu, 9 Oct 2014 23:42: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 s99NgNYQ084883; Thu, 9 Oct 2014 23:42:23 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NgNJo084882; Thu, 9 Oct 2014 23:42:23 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092342.s99NgNJo084882@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:42: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: r272866 - stable/10/usr.bin/vmstat 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.18-1 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, 09 Oct 2014 23:42:23 -0000 Author: hrs Date: Thu Oct 9 23:42:22 2014 New Revision: 272866 URL: https://svnweb.freebsd.org/changeset/base/272866 Log: MFC r271410: Fix header output when -P is specified and (ncpus - 1) != maxid. Modified: stable/10/usr.bin/vmstat/vmstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/vmstat/vmstat.c ============================================================================== --- stable/10/usr.bin/vmstat/vmstat.c Thu Oct 9 23:41:11 2014 (r272865) +++ stable/10/usr.bin/vmstat/vmstat.c Thu Oct 9 23:42:22 2014 (r272866) @@ -650,6 +650,8 @@ dovmstat(unsigned int interval, int reps uptime = getuptime(); halfuptime = uptime / 2; rate_adj = 1; + ncpus = 1; + maxid = 0; /* * If the user stops the program (control-Z) and then resumes it, @@ -695,7 +697,7 @@ dovmstat(unsigned int interval, int reps } for (hdrcnt = 1;;) { if (!--hdrcnt) - printhdr(ncpus, cpumask); + printhdr(maxid, cpumask); if (kd != NULL) { if (kvm_getcptime(kd, cur.cp_time) < 0) errx(1, "kvm_getcptime: %s", kvm_geterr(kd)); @@ -746,7 +748,7 @@ dovmstat(unsigned int interval, int reps errx(1, "%s", devstat_errbuf); break; case 1: - printhdr(ncpus, cpumask); + printhdr(maxid, cpumask); break; default: break; @@ -815,7 +817,7 @@ dovmstat(unsigned int interval, int reps } static void -printhdr(int ncpus, u_long cpumask) +printhdr(int maxid, u_long cpumask) { int i, num_shown; @@ -827,7 +829,7 @@ printhdr(int ncpus, u_long cpumask) (void)printf("disk"); (void)printf(" faults "); if (Pflag) { - for (i = 0; i < ncpus; i++) { + for (i = 0; i <= maxid; i++) { if (cpumask & (1ul << i)) printf("cpu%-2d ", i); } @@ -843,8 +845,10 @@ printhdr(int ncpus, u_long cpumask) dev_select[i].unit_number); (void)printf(" in sy cs"); if (Pflag) { - for (i = 0; i < ncpus; i++) - printf(" us sy id"); + for (i = 0; i <= maxid; i++) { + if (cpumask & (1ul << i)) + printf(" us sy id"); + } printf("\n"); } else printf(" us sy id\n"); From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:43:13 2014 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 C4EDFC01; Thu, 9 Oct 2014 23:43: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 B0ABBE1F; Thu, 9 Oct 2014 23:43: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 s99NhDQM085047; Thu, 9 Oct 2014 23:43:13 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NhDGI085046; Thu, 9 Oct 2014 23:43:13 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092343.s99NhDGI085046@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:43: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: r272867 - stable/10/sbin/dump 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.18-1 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, 09 Oct 2014 23:43:13 -0000 Author: hrs Date: Thu Oct 9 23:43:13 2014 New Revision: 272867 URL: https://svnweb.freebsd.org/changeset/base/272867 Log: MFC r271411: Fix a bug which could break extended attributes in a dump output. This occurred when a file was >892kB long and had a large data (>1kB) in the extended attributes. Modified: stable/10/sbin/dump/traverse.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/dump/traverse.c ============================================================================== --- stable/10/sbin/dump/traverse.c Thu Oct 9 23:42:22 2014 (r272866) +++ stable/10/sbin/dump/traverse.c Thu Oct 9 23:43:13 2014 (r272867) @@ -673,7 +673,12 @@ ufs2_blksout(union dinode *dp, ufs2_dadd */ blks = howmany(frags * sblock->fs_fsize, TP_BSIZE); if (last) { - resid = howmany(fragoff(sblock, dp->dp2.di_size), TP_BSIZE); + if (writingextdata) + resid = howmany(fragoff(sblock, spcl.c_extsize), + TP_BSIZE); + else + resid = howmany(fragoff(sblock, dp->dp2.di_size), + TP_BSIZE); if (resid > 0) blks -= howmany(sblock->fs_fsize, TP_BSIZE) - resid; } From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:45:28 2014 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 684F9D60; Thu, 9 Oct 2014 23:45:28 +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 49FC0E2F; Thu, 9 Oct 2014 23:45:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s99NjSnu085460; Thu, 9 Oct 2014 23:45:28 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NjRwl085456; Thu, 9 Oct 2014 23:45:27 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092345.s99NjRwl085456@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:45: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: r272868 - in stable/10: etc 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.18-1 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, 09 Oct 2014 23:45:28 -0000 Author: hrs Date: Thu Oct 9 23:45:26 2014 New Revision: 272868 URL: https://svnweb.freebsd.org/changeset/base/272868 Log: MFC r271545, 271610: Make net.inet.ip.sourceroute, net.inet.ip.accept_sourceroute, and net.inet.ip.process_options vnet-aware. Modified: stable/10/etc/rc.subr stable/10/sys/netinet/ip_fastfwd.c stable/10/sys/netinet/ip_options.c stable/10/sys/netinet/ip_options.h Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.subr ============================================================================== --- stable/10/etc/rc.subr Thu Oct 9 23:43:13 2014 (r272867) +++ stable/10/etc/rc.subr Thu Oct 9 23:45:26 2014 (r272868) @@ -1966,6 +1966,22 @@ check_required_after() return 0 } +# check_jail mib +# Return true if security.jail.$mib exists and set to 1. + +check_jail() +{ + local _mib _v + + _mib=$1 + if _v=$(${SYSCTL_N} "security.jail.$_mib" 2> /dev/null); then + case $_v in + 1) return 0;; + esac + fi + return 1 +} + # check_kern_features mib # Return existence of kern.features.* sysctl MIB as true or # false. The result will be cached in $_rc_cache_kern_features_ Modified: stable/10/sys/netinet/ip_fastfwd.c ============================================================================== --- stable/10/sys/netinet/ip_fastfwd.c Thu Oct 9 23:43:13 2014 (r272867) +++ stable/10/sys/netinet/ip_fastfwd.c Thu Oct 9 23:45:26 2014 (r272868) @@ -297,9 +297,9 @@ ip_fastforward(struct mbuf *m) * Only IP packets without options */ if (ip->ip_hl != (sizeof(struct ip) >> 2)) { - if (ip_doopts == 1) + if (V_ip_doopts == 1) return m; - else if (ip_doopts == 2) { + else if (V_ip_doopts == 2) { icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_FILTER_PROHIB, 0, 0); return NULL; /* mbuf already free'd */ Modified: stable/10/sys/netinet/ip_options.c ============================================================================== --- stable/10/sys/netinet/ip_options.c Thu Oct 9 23:43:13 2014 (r272867) +++ stable/10/sys/netinet/ip_options.c Thu Oct 9 23:45:26 2014 (r272868) @@ -65,18 +65,21 @@ __FBSDID("$FreeBSD$"); #include -static int ip_dosourceroute = 0; -SYSCTL_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, - &ip_dosourceroute, 0, "Enable forwarding source routed IP packets"); - -static int ip_acceptsourceroute = 0; -SYSCTL_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, - CTLFLAG_RW, &ip_acceptsourceroute, 0, +static VNET_DEFINE(int, ip_dosourceroute); +SYSCTL_VNET_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, + &VNET_NAME(ip_dosourceroute), 0, + "Enable forwarding source routed IP packets"); +#define V_ip_dosourceroute VNET(ip_dosourceroute) + +static VNET_DEFINE(int, ip_acceptsourceroute); +SYSCTL_VNET_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, + CTLFLAG_RW, &VNET_NAME(ip_acceptsourceroute), 0, "Enable accepting source routed IP packets"); +#define V_ip_acceptsourceroute VNET(ip_acceptsourceroute) -int ip_doopts = 1; /* 0 = ignore, 1 = process, 2 = reject */ -SYSCTL_INT(_net_inet_ip, OID_AUTO, process_options, CTLFLAG_RW, - &ip_doopts, 0, "Enable IP options processing ([LS]SRR, RR, TS)"); +VNET_DEFINE(int, ip_doopts) = 1; /* 0 = ignore, 1 = process, 2 = reject */ +SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, process_options, CTLFLAG_RW, + &VNET_NAME(ip_doopts), 0, "Enable IP options processing ([LS]SRR, RR, TS)"); static void save_rte(struct mbuf *m, u_char *, struct in_addr); @@ -104,9 +107,9 @@ ip_dooptions(struct mbuf *m, int pass) struct sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET }; /* Ignore or reject packets with IP options. */ - if (ip_doopts == 0) + if (V_ip_doopts == 0) return 0; - else if (ip_doopts == 2) { + else if (V_ip_doopts == 2) { type = ICMP_UNREACH; code = ICMP_UNREACH_FILTER_PROHIB; goto bad; @@ -167,7 +170,7 @@ ip_dooptions(struct mbuf *m, int pass) code = ICMP_UNREACH_SRCFAIL; goto bad; } - if (!ip_dosourceroute) + if (!V_ip_dosourceroute) goto nosourcerouting; /* * Loose routing, and not at next destination @@ -180,7 +183,7 @@ ip_dooptions(struct mbuf *m, int pass) /* * End of source route. Should be for us. */ - if (!ip_acceptsourceroute) + if (!V_ip_acceptsourceroute) goto nosourcerouting; save_rte(m, cp, ip->ip_src); break; @@ -189,7 +192,7 @@ ip_dooptions(struct mbuf *m, int pass) if (V_ipstealth) goto dropit; #endif - if (!ip_dosourceroute) { + if (!V_ip_dosourceroute) { if (V_ipforwarding) { char buf[16]; /* aaa.bbb.ccc.ddd\0 */ /* Modified: stable/10/sys/netinet/ip_options.h ============================================================================== --- stable/10/sys/netinet/ip_options.h Thu Oct 9 23:43:13 2014 (r272867) +++ stable/10/sys/netinet/ip_options.h Thu Oct 9 23:45:26 2014 (r272868) @@ -47,7 +47,8 @@ struct ipopt_tag { struct ipoptrt ip_srcrt; }; -extern int ip_doopts; /* process or ignore IP options */ +VNET_DECLARE(int, ip_doopts); /* process or ignore IP options */ +#define V_ip_doopts VNET(ip_doopts) int ip_checkrouteralert(struct mbuf *); int ip_dooptions(struct mbuf *, int); From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:46:18 2014 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 A6DCDE93; Thu, 9 Oct 2014 23:46: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 92728E35; Thu, 9 Oct 2014 23:46: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 s99NkIRu085628; Thu, 9 Oct 2014 23:46:18 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NkIAV085627; Thu, 9 Oct 2014 23:46:18 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092346.s99NkIAV085627@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:46: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: r272869 - 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.18-1 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, 09 Oct 2014 23:46:18 -0000 Author: hrs Date: Thu Oct 9 23:46:17 2014 New Revision: 272869 URL: https://svnweb.freebsd.org/changeset/base/272869 Log: MFC r271628: Use generic SYSCTL_* macro instead of deprecated SYSCTL_VNET_*. Modified: stable/10/sys/netinet/ip_options.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_options.c ============================================================================== --- stable/10/sys/netinet/ip_options.c Thu Oct 9 23:45:26 2014 (r272868) +++ stable/10/sys/netinet/ip_options.c Thu Oct 9 23:46:17 2014 (r272869) @@ -66,19 +66,19 @@ __FBSDID("$FreeBSD$"); #include static VNET_DEFINE(int, ip_dosourceroute); -SYSCTL_VNET_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, CTLFLAG_RW, - &VNET_NAME(ip_dosourceroute), 0, +SYSCTL_INT(_net_inet_ip, IPCTL_SOURCEROUTE, sourceroute, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip_dosourceroute), 0, "Enable forwarding source routed IP packets"); #define V_ip_dosourceroute VNET(ip_dosourceroute) static VNET_DEFINE(int, ip_acceptsourceroute); -SYSCTL_VNET_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, - CTLFLAG_RW, &VNET_NAME(ip_acceptsourceroute), 0, +SYSCTL_INT(_net_inet_ip, IPCTL_ACCEPTSOURCEROUTE, accept_sourceroute, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip_acceptsourceroute), 0, "Enable accepting source routed IP packets"); #define V_ip_acceptsourceroute VNET(ip_acceptsourceroute) VNET_DEFINE(int, ip_doopts) = 1; /* 0 = ignore, 1 = process, 2 = reject */ -SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, process_options, CTLFLAG_RW, +SYSCTL_INT(_net_inet_ip, OID_AUTO, process_options, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip_doopts), 0, "Enable IP options processing ([LS]SRR, RR, TS)"); static void save_rte(struct mbuf *m, u_char *, struct in_addr); From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:47:09 2014 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 091F4FD3; Thu, 9 Oct 2014 23:47: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 E8B47E43; Thu, 9 Oct 2014 23:47: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 s99Nl8eb085792; Thu, 9 Oct 2014 23:47:08 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99Nl8MT085790; Thu, 9 Oct 2014 23:47:08 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092347.s99Nl8MT085790@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:47: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: r272870 - in stable/10/etc: defaults rc.d 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.18-1 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, 09 Oct 2014 23:47:09 -0000 Author: hrs Date: Thu Oct 9 23:47:07 2014 New Revision: 272870 URL: https://svnweb.freebsd.org/changeset/base/272870 Log: MFC r271663: Fix a typo; master server for iprop service should be singular. Modified: stable/10/etc/defaults/rc.conf stable/10/etc/rc.d/ipropd_slave Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/rc.conf ============================================================================== --- stable/10/etc/defaults/rc.conf Thu Oct 9 23:46:17 2014 (r272869) +++ stable/10/etc/defaults/rc.conf Thu Oct 9 23:47:07 2014 (r272870) @@ -298,7 +298,7 @@ ipropd_slave_enable="NO" # Run Heimdal i ipropd_slave_program="/usr/libexec/ipropd-slave" ipropd_slave_flags="" # Flags to ipropd-slave. ipropd_slave_keytab="/etc/krb5.keytab" # keytab for ipropd-slave. -ipropd_slave_masters="" # master node names. +ipropd_slave_master="" # master node name. gssd_enable="NO" # Run the gssd daemon (or NO). gssd_program="/usr/sbin/gssd" # Path to gssd. Modified: stable/10/etc/rc.d/ipropd_slave ============================================================================== --- stable/10/etc/rc.d/ipropd_slave Thu Oct 9 23:46:17 2014 (r272869) +++ stable/10/etc/rc.d/ipropd_slave Thu Oct 9 23:47:07 2014 (r272870) @@ -17,15 +17,15 @@ start_precmd=${name}_start_precmd ipropd_slave_start_precmd() { - if [ -z "$ipropd_slave_masters" ]; then - warn "\$ipropd_slave_masters is empty." + if [ -z "$ipropd_slave_master" ]; then + warn "\$ipropd_slave_master is empty." return 1 fi command_args=" \ $command_args \ --keytab=\"$ipropd_slave_keytab\" \ --detach \ - $ipropd_slave_masters" + $ipropd_slave_master" } load_rc_config $name From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:48:21 2014 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 829CB18A; Thu, 9 Oct 2014 23:48: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 6DF94E48; Thu, 9 Oct 2014 23:48: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 s99NmL6u086004; Thu, 9 Oct 2014 23:48:21 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NmLtM086002; Thu, 9 Oct 2014 23:48:21 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092348.s99NmLtM086002@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:48: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: r272871 - stable/10/sbin/ping6 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.18-1 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, 09 Oct 2014 23:48:21 -0000 Author: hrs Date: Thu Oct 9 23:48:20 2014 New Revision: 272871 URL: https://svnweb.freebsd.org/changeset/base/272871 Log: MFC r271909: Revert changes in r269180. It could cause -c N option to enter an infinite loop if no reply packet is received. Modified: stable/10/sbin/ping6/ping6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ping6/ping6.c ============================================================================== --- stable/10/sbin/ping6/ping6.c Thu Oct 9 23:47:07 2014 (r272870) +++ stable/10/sbin/ping6/ping6.c Thu Oct 9 23:48:20 2014 (r272871) @@ -1090,14 +1090,8 @@ main(int argc, char *argv[]) /* signal handling */ if (seenalrm) { /* last packet sent, timeout reached? */ - if (npackets && ntransmitted >= npackets) { - struct timeval zerotime = {0, 0}; - itimer.it_value = zerotime; - itimer.it_interval = zerotime; - (void)setitimer(ITIMER_REAL, &itimer, NULL); - seenalrm = 0; /* clear flag */ - continue; - } + if (npackets && ntransmitted >= npackets) + break; retransmit(); seenalrm = 0; continue; From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:49:38 2014 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 D37DA2D2; Thu, 9 Oct 2014 23:49: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 B3E58E52; Thu, 9 Oct 2014 23:49: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 s99NncwX086214; Thu, 9 Oct 2014 23:49:38 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99Nnbh1086208; Thu, 9 Oct 2014 23:49:37 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092349.s99Nnbh1086208@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:49: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: r272872 - stable/10/sbin/routed 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.18-1 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, 09 Oct 2014 23:49:39 -0000 Author: hrs Date: Thu Oct 9 23:49:36 2014 New Revision: 272872 URL: https://svnweb.freebsd.org/changeset/base/272872 Log: MFC r271919: Fix a bug which could make routed(8) daemon exit by sending a special RIP query from a remote machine, and disable accepting it by default. This requests a routed(8) daemon to dump routing information base for debugging purpose. An -i flag to enable it has been added. Modified: stable/10/sbin/routed/defs.h stable/10/sbin/routed/input.c stable/10/sbin/routed/main.c stable/10/sbin/routed/output.c stable/10/sbin/routed/routed.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/routed/defs.h ============================================================================== --- stable/10/sbin/routed/defs.h Thu Oct 9 23:48:20 2014 (r272871) +++ stable/10/sbin/routed/defs.h Thu Oct 9 23:49:36 2014 (r272872) @@ -462,6 +462,7 @@ extern int ridhosts; /* 1=reduce host r extern int mhome; /* 1=want multi-homed host route */ extern int advertise_mhome; /* 1=must continue advertising it */ extern int auth_ok; /* 1=ignore auth if we do not care */ +extern int insecure; /* Reply to special queries or not */ extern struct timeval clk; /* system clock's idea of time */ extern struct timeval epoch; /* system clock when started */ Modified: stable/10/sbin/routed/input.c ============================================================================== --- stable/10/sbin/routed/input.c Thu Oct 9 23:48:20 2014 (r272871) +++ stable/10/sbin/routed/input.c Thu Oct 9 23:49:36 2014 (r272872) @@ -289,8 +289,19 @@ input(struct sockaddr_in *from, /* rece * with all we know. */ if (from->sin_port != htons(RIP_PORT)) { - supply(from, aifp, OUT_QUERY, 0, - rip->rip_vers, ap != 0); + /* + * insecure: query from non-router node + * > 1: allow from distant node + * > 0: allow from neighbor node + * == 0: deny + */ + if ((aifp != NULL && insecure > 0) || + (aifp == NULL && insecure > 1)) + supply(from, aifp, OUT_QUERY, 0, + rip->rip_vers, ap != 0); + else + trace_pkt("Warning: " + "possible attack detected"); return; } Modified: stable/10/sbin/routed/main.c ============================================================================== --- stable/10/sbin/routed/main.c Thu Oct 9 23:48:20 2014 (r272871) +++ stable/10/sbin/routed/main.c Thu Oct 9 23:49:36 2014 (r272872) @@ -68,6 +68,7 @@ int ridhosts; /* 1=reduce host routes int mhome; /* 1=want multi-homed host route */ int advertise_mhome; /* 1=must continue advertising it */ int auth_ok = 1; /* 1=ignore auth if we do not care */ +int insecure; /* Reply to special queries or not */ struct timeval epoch; /* when started */ struct timeval clk; @@ -136,8 +137,11 @@ main(int argc, (void)gethostname(myname, sizeof(myname)-1); (void)gethost(myname, &myaddr); - while ((n = getopt(argc, argv, "sqdghmAtvT:F:P:")) != -1) { + while ((n = getopt(argc, argv, "isqdghmAtvT:F:P:")) != -1) { switch (n) { + case 'i': + insecure++; + break; case 's': supplier = 1; supplier_set = 1; Modified: stable/10/sbin/routed/output.c ============================================================================== --- stable/10/sbin/routed/output.c Thu Oct 9 23:48:20 2014 (r272871) +++ stable/10/sbin/routed/output.c Thu Oct 9 23:49:36 2014 (r272872) @@ -673,8 +673,6 @@ supply(struct sockaddr_in *dst, struct rt_entry *rt; int def_metric; - assert(ifp != NULL); - ws.state = 0; ws.gen_limit = 1024; Modified: stable/10/sbin/routed/routed.8 ============================================================================== --- stable/10/sbin/routed/routed.8 Thu Oct 9 23:48:20 2014 (r272871) +++ stable/10/sbin/routed/routed.8 Thu Oct 9 23:49:36 2014 (r272872) @@ -30,7 +30,7 @@ .\" @(#)routed.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd June 1, 1996 +.Dd August 26, 2014 .Dt ROUTED 8 .Os .Sh NAME @@ -39,7 +39,7 @@ .Nd network RIP and router discovery routing daemon .Sh SYNOPSIS .Nm -.Op Fl sqdghmpAtv +.Op Fl isqdghmpAtv .Op Fl T Ar tracefile .Oo .Fl F @@ -250,6 +250,20 @@ to infer the netmask used by the remote .Pp The following options are available: .Bl -tag -width indent +.It Fl i +allow +.Nm +to accept a RIP request from non-router node. +When specified once, +.Nm +replies to a route information query from neighbor nodes. +When specified twice, +it replies to a query from remote nodes in addition. +.Xr rtquery 8 +utility can be used to send a request. +.Pp +This feature is disabled by default because of a risk of reflection attack +though it useful for debugging purpose, .It Fl s force .Nm From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:49:48 2014 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 0ACF63FC for ; Thu, 9 Oct 2014 23:49:48 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 DD1D8E53 for ; Thu, 9 Oct 2014 23:49:47 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s99NnlD8002172 for ; Thu, 9 Oct 2014 23:49:47 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s99Nnl8v002171 for svn-src-stable@freebsd.org; Thu, 9 Oct 2014 23:49:47 GMT (envelope-from bdrewery) Received: (qmail 45803 invoked from network); 9 Oct 2014 18:49:45 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 9 Oct 2014 18:49:45 -0500 Message-ID: <54371F0B.7060900@FreeBSD.org> Date: Thu, 09 Oct 2014 18:49:31 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Hiroki Sato , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r272871 - stable/10/sbin/ping6 References: <201410092348.s99NmLtM086002@svn.freebsd.org> In-Reply-To: <201410092348.s99NmLtM086002@svn.freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LrSCUkfMriEa6vP4CpbVwdxDr02JLB6Qd" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 09 Oct 2014 23:49:48 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --LrSCUkfMriEa6vP4CpbVwdxDr02JLB6Qd Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/9/2014 6:48 PM, Hiroki Sato wrote: > Author: hrs > Date: Thu Oct 9 23:48:20 2014 > New Revision: 272871 > URL: https://svnweb.freebsd.org/changeset/base/272871 >=20 > Log: > MFC r271909: > Revert changes in r269180. It could cause -c N option to enter an > infinite loop if no reply packet is received. >=20 Do you plan to merge this to releng/10.1? It seems important for automati= on. > Modified: > stable/10/sbin/ping6/ping6.c > Directory Properties: > stable/10/ (props changed) >=20 > Modified: stable/10/sbin/ping6/ping6.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/sbin/ping6/ping6.c Thu Oct 9 23:47:07 2014 (r272870) > +++ stable/10/sbin/ping6/ping6.c Thu Oct 9 23:48:20 2014 (r272871) > @@ -1090,14 +1090,8 @@ main(int argc, char *argv[]) > /* signal handling */ > if (seenalrm) { > /* last packet sent, timeout reached? */ > - if (npackets && ntransmitted >=3D npackets) { > - struct timeval zerotime =3D {0, 0}; > - itimer.it_value =3D zerotime; > - itimer.it_interval =3D zerotime; > - (void)setitimer(ITIMER_REAL, &itimer, NULL); > - seenalrm =3D 0; /* clear flag */ > - continue; > - } > + if (npackets && ntransmitted >=3D npackets) > + break; > retransmit(); > seenalrm =3D 0; > continue; >=20 --=20 Regards, Bryan Drewery --LrSCUkfMriEa6vP4CpbVwdxDr02JLB6Qd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJUNx8PAAoJEDXXcbtuRpfP5sYIANxQnNiEB059zlrCC/DKFItS QbG8vfq5xpdMgaCpP85NzWWzmP+v48OW0bxaLrb5RGemvrYBRSkeVi/D5t2RAEqZ /MUpaa3ZExfSB+tSLM3Z0JgtvwLVFt2/0kzMimjYa7MyCdwwyxTaINAA9kCmRSca 95Z/4PqR+cDzsuaNWTzAXBe9xVVhSemcBpHCluliSbOhLPJZNubIA7hxCKhcdtc7 /gT+w+jF8NFUNMYAp4byiB3JagpWGicrsCm/iWVyN2Z6xlYmeLXNn6bRWUUseifp vr/6K08+8yJ9Eu929yyml01ucbyuaTBQNU9EHu2ImVr8qieNg7qhIFo6lV5JWlU= =Xw82 -----END PGP SIGNATURE----- --LrSCUkfMriEa6vP4CpbVwdxDr02JLB6Qd-- From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:50:32 2014 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 01A58532; Thu, 9 Oct 2014 23:50: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 E15F3E61; Thu, 9 Oct 2014 23:50: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 s99NoV7p086459; Thu, 9 Oct 2014 23:50:31 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NoVW0086458; Thu, 9 Oct 2014 23:50:31 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092350.s99NoVW0086458@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:50:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272873 - stable/10/sbin/routed 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.18-1 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, 09 Oct 2014 23:50:32 -0000 Author: hrs Date: Thu Oct 9 23:50:31 2014 New Revision: 272873 URL: https://svnweb.freebsd.org/changeset/base/272873 Log: MFC r271921: Fix a typo. Modified: stable/10/sbin/routed/routed.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/routed/routed.8 ============================================================================== --- stable/10/sbin/routed/routed.8 Thu Oct 9 23:49:36 2014 (r272872) +++ stable/10/sbin/routed/routed.8 Thu Oct 9 23:50:31 2014 (r272873) @@ -263,7 +263,7 @@ it replies to a query from remote nodes utility can be used to send a request. .Pp This feature is disabled by default because of a risk of reflection attack -though it useful for debugging purpose, +though it is useful for debugging purpose. .It Fl s force .Nm From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:52:34 2014 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 5F223676; Thu, 9 Oct 2014 23:52: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 2F866EFD; Thu, 9 Oct 2014 23:52: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 s99NqYJs090099; Thu, 9 Oct 2014 23:52:34 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99NqYfg090098; Thu, 9 Oct 2014 23:52:34 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410092352.s99NqYfg090098@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 9 Oct 2014 23:52: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: r272874 - stable/10/etc 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.18-1 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, 09 Oct 2014 23:52:34 -0000 Author: hrs Date: Thu Oct 9 23:52:33 2014 New Revision: 272874 URL: https://svnweb.freebsd.org/changeset/base/272874 Log: MFC r272393: Resurrect set_rcvar() as a function to define a rc.conf variable. It defines a variable and its default value in load_rc_config() just after rc.conf is loaded. "rcvar" command shows the current and the default values. Modified: stable/10/etc/rc.subr Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.subr ============================================================================== --- stable/10/etc/rc.subr Thu Oct 9 23:50:31 2014 (r272873) +++ stable/10/etc/rc.subr Thu Oct 9 23:52:33 2014 (r272874) @@ -68,6 +68,39 @@ list_vars() done; } } +# set_rcvar [var] [defval] [desc] +# +# Echo or define a rc.conf(5) variable name. Global variable +# $rcvars is used. +# +# If no argument is specified, echo "${name}_enable". +# +# If only a var is specified, echo "${var}_enable". +# +# If var and defval are specified, the ${var} is defined as +# rc.conf(5) variable and the default value is ${defvar}. An +# optional argument $desc can also be specified to add a +# description for that. +# +set_rcvar() +{ + local _var + + case $# in + 0) echo ${name}_enable ;; + 1) echo ${1}_enable ;; + *) + debug "set_rcvar: \$$1=$2 is added" \ + " as a rc.conf(5) variable." + _var=$1 + rcvars="${rcvars# } $_var" + eval ${_var}_defval=\"$2\" + shift 2 + eval ${_var}_desc=\"$*\" + ;; + esac +} + # set_rcvar_obsolete oldvar [newvar] [msg] # Define obsolete variable. # Global variable $rcvars_obsolete is used. @@ -76,7 +109,7 @@ set_rcvar_obsolete() { local _var _var=$1 - debug "rcvar_obsolete: \$$1(old) -> \$$2(new) is defined" + debug "set_rcvar_obsolete: \$$1(old) -> \$$2(new) is defined" rcvars_obsolete="${rcvars_obsolete# } $1" eval ${1}_newvar=\"$2\" @@ -1091,8 +1124,8 @@ $command $rc_flags $command_args" echo "" fi echo "#" - # Get unique vars in $rcvar - for _v in $rcvar; do + # Get unique vars in $rcvar $rcvars + for _v in $rcvar $rcvars; do case $v in $_v\ *|\ *$_v|*\ $_v\ *) ;; *) v="${v# } $_v" ;; @@ -1238,7 +1271,7 @@ run_rc_script() unset name command command_args command_interpreter \ extra_commands pidfile procname \ - rcvar rcvars_obsolete required_dirs required_files \ + rcvar rcvars rcvars_obsolete required_dirs required_files \ required_vars eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd @@ -1306,7 +1339,7 @@ load_rc_config() done # Set defaults if defined. - for _var in $rcvar; do + for _var in $rcvar $rcvars; do eval _defval=\$${_var}_defval if [ -n "$_defval" ]; then eval : \${$_var:=\$${_var}_defval} From owner-svn-src-stable@FreeBSD.ORG Thu Oct 9 23:55:07 2014 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 64F108BD; Thu, 9 Oct 2014 23:55:07 +0000 (UTC) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.allbsd.org", Issuer "RapidSSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E2245F14; Thu, 9 Oct 2014 23:55:06 +0000 (UTC) Received: from alph.d.allbsd.org ([IPv6:2001:2f0:104:e010:862b:2bff:febc:8956]) (authenticated bits=56) by mail.allbsd.org (8.14.9/8.14.8) with ESMTP id s99Nse0s003377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 10 Oct 2014 08:54:51 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.8/8.14.8) with ESMTP id s99NsdoP075838; Fri, 10 Oct 2014 08:54:40 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Fri, 10 Oct 2014 08:54:33 +0900 (JST) Message-Id: <20141010.085433.1216904751687292954.hrs@allbsd.org> To: bdrewery@FreeBSD.org Subject: Re: svn commit: r272871 - stable/10/sbin/ping6 From: Hiroki Sato In-Reply-To: <54371F0B.7060900@FreeBSD.org> References: <201410092348.s99NmLtM086002@svn.freebsd.org> <54371F0B.7060900@FreeBSD.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.6 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Fri_Oct_10_08_54_33_2014_525)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mail.allbsd.org [IPv6:2001:2f0:104:e001::32]); Fri, 10 Oct 2014 08:55:00 +0900 (JST) X-Spam-Status: No, score=-97.9 required=13.0 tests=CONTENT_TYPE_PRESENT, RDNS_NONE,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 09 Oct 2014 23:55:07 -0000 ----Security_Multipart(Fri_Oct_10_08_54_33_2014_525)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Bryan Drewery wrote in <54371F0B.7060900@FreeBSD.org>: bd> On 10/9/2014 6:48 PM, Hiroki Sato wrote: bd> > Author: hrs bd> > Date: Thu Oct 9 23:48:20 2014 bd> > New Revision: 272871 bd> > URL: https://svnweb.freebsd.org/changeset/base/272871 bd> > bd> > Log: bd> > MFC r271909: bd> > Revert changes in r269180. It could cause -c N option to enter an bd> > infinite loop if no reply packet is received. bd> > bd> bd> Do you plan to merge this to releng/10.1? It seems important for automation. Yes, I do. -- Hiroki ----Security_Multipart(Fri_Oct_10_08_54_33_2014_525)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlQ3IDkACgkQTyzT2CeTzy04mQCfeaiNPNyA2pWHfXKadC2jmdeP tWAAn0Ye7lWnDyBqVG3Ozkft/inYzirs =/PPN -----END PGP SIGNATURE----- ----Security_Multipart(Fri_Oct_10_08_54_33_2014_525)---- From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 00:12:17 2014 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 CDA61DA8; Fri, 10 Oct 2014 00: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 B740614C; Fri, 10 Oct 2014 00: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 s9A0CHVw000815; Fri, 10 Oct 2014 00:12:17 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9A0CGov000808; Fri, 10 Oct 2014 00:12:16 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201410100012.s9A0CGov000808@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 10 Oct 2014 00:12: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: r272875 - in stable/10/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 10 Oct 2014 00:12:18 -0000 Author: smh Date: Fri Oct 10 00:12:16 2014 New Revision: 272875 URL: https://svnweb.freebsd.org/changeset/base/272875 Log: MFC r270759: Refactor ZFS ARC reclaim logic to be more VM cooperative MFC r270861: Ensure that ZFS ARC free memory checks include cached pages MFC r272483: Refactor ZFS ARC reclaim checks and limits Sponsored by: Multiplay Modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c stable/10/sys/cddl/compat/opensolaris/sys/kmem.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/10/sys/vm/vm_pageout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Thu Oct 9 23:52:33 2014 (r272874) +++ stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Fri Oct 10 00:12:16 2014 (r272875) @@ -133,13 +133,6 @@ kmem_size(void) return (kmem_size_val); } -uint64_t -kmem_used(void) -{ - - return (vmem_size(kmem_arena, VMEM_ALLOC)); -} - static int kmem_std_constructor(void *mem, int size __unused, void *private, int flags) { Modified: stable/10/sys/cddl/compat/opensolaris/sys/kmem.h ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/sys/kmem.h Thu Oct 9 23:52:33 2014 (r272874) +++ stable/10/sys/cddl/compat/opensolaris/sys/kmem.h Fri Oct 10 00:12:16 2014 (r272875) @@ -66,7 +66,6 @@ typedef struct kmem_cache { void *zfs_kmem_alloc(size_t size, int kmflags); void zfs_kmem_free(void *buf, size_t size); uint64_t kmem_size(void); -uint64_t kmem_used(void); kmem_cache_t *kmem_cache_create(char *name, size_t bufsize, size_t align, int (*constructor)(void *, void *, int), void (*destructor)(void *, void *), void (*reclaim)(void *) __unused, void *private, vmem_t *vmp, int cflags); @@ -78,6 +77,9 @@ void kmem_reap(void); int kmem_debugging(void); void *calloc(size_t n, size_t s); +#define freemem (cnt.v_free_count + cnt.v_cache_count) +#define minfree cnt.v_free_min +#define heap_arena kmem_arena #define kmem_alloc(size, kmflags) zfs_kmem_alloc((size), (kmflags)) #define kmem_zalloc(size, kmflags) zfs_kmem_alloc((size), (kmflags) | M_ZERO) #define kmem_free(buf, size) zfs_kmem_free((buf), (size)) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Oct 9 23:52:33 2014 (r272874) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Oct 10 00:12:16 2014 (r272875) @@ -138,6 +138,7 @@ #include #include +#include #ifdef illumos #ifndef _KERNEL @@ -193,9 +194,6 @@ extern int zfs_prefetch_disable; */ static boolean_t arc_warm; -/* - * These tunables are for performance analysis. - */ uint64_t zfs_arc_max; uint64_t zfs_arc_min; uint64_t zfs_arc_meta_limit = 0; @@ -204,6 +202,19 @@ int zfs_arc_shrink_shift = 0; int zfs_arc_p_min_shift = 0; int zfs_disable_dup_eviction = 0; uint64_t zfs_arc_average_blocksize = 8 * 1024; /* 8KB */ +u_int zfs_arc_free_target = 0; + +static int sysctl_vfs_zfs_arc_free_target(SYSCTL_HANDLER_ARGS); + +#ifdef _KERNEL +static void +arc_free_target_init(void *unused __unused) +{ + + zfs_arc_free_target = vm_pageout_wakeup_thresh; +} +SYSINIT(arc_free_target_init, SI_SUB_KTHREAD_PAGE, SI_ORDER_ANY, + arc_free_target_init, NULL); TUNABLE_QUAD("vfs.zfs.arc_max", &zfs_arc_max); TUNABLE_QUAD("vfs.zfs.arc_min", &zfs_arc_min); @@ -217,6 +228,36 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_min SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_average_blocksize, CTLFLAG_RDTUN, &zfs_arc_average_blocksize, 0, "ARC average blocksize"); +/* + * We don't have a tunable for arc_free_target due to the dependency on + * pagedaemon initialisation. + */ +SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_free_target, + CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(u_int), + sysctl_vfs_zfs_arc_free_target, "IU", + "Desired number of free pages below which ARC triggers reclaim"); + +static int +sysctl_vfs_zfs_arc_free_target(SYSCTL_HANDLER_ARGS) +{ + u_int val; + int err; + + val = zfs_arc_free_target; + err = sysctl_handle_int(oidp, &val, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + if (val < minfree) + return (EINVAL); + if (val > cnt.v_page_count) + return (EINVAL); + + zfs_arc_free_target = val; + + return (0); +} +#endif /* * Note that buffers can be in one of 6 states: @@ -2421,9 +2462,12 @@ arc_flush(spa_t *spa) void arc_shrink(void) { + if (arc_c > arc_c_min) { uint64_t to_free; + DTRACE_PROBE4(arc__shrink, uint64_t, arc_c, uint64_t, + arc_c_min, uint64_t, arc_p, uint64_t, to_free); #ifdef _KERNEL to_free = arc_c >> arc_shrink_shift; #else @@ -2439,12 +2483,19 @@ arc_shrink(void) arc_c = MAX(arc_size, arc_c_min); if (arc_p > arc_c) arc_p = (arc_c >> 1); + + DTRACE_PROBE2(arc__shrunk, uint64_t, arc_c, uint64_t, + arc_p); + ASSERT(arc_c >= arc_c_min); ASSERT((int64_t)arc_p >= 0); } - if (arc_size > arc_c) + if (arc_size > arc_c) { + DTRACE_PROBE2(arc__shrink_adjust, uint64_t, arc_size, + uint64_t, arc_c); arc_adjust(); + } } static int needfree = 0; @@ -2455,15 +2506,20 @@ arc_reclaim_needed(void) #ifdef _KERNEL - if (needfree) + if (needfree) { + DTRACE_PROBE(arc__reclaim_needfree); return (1); + } /* * Cooperate with pagedaemon when it's time for it to scan * and reclaim some pages. */ - if (vm_paging_needed()) + if (freemem < zfs_arc_free_target) { + DTRACE_PROBE2(arc__reclaim_freemem, uint64_t, + freemem, uint64_t, zfs_arc_free_target); return (1); + } #ifdef sun /* @@ -2491,7 +2547,18 @@ arc_reclaim_needed(void) if (availrmem < swapfs_minfree + swapfs_reserve + extra) return (1); -#if defined(__i386) + /* + * Check that we have enough availrmem that memory locking (e.g., via + * mlock(3C) or memcntl(2)) can still succeed. (pages_pp_maximum + * stores the number of pages that cannot be locked; when availrmem + * drops below pages_pp_maximum, page locking mechanisms such as + * page_pp_lock() will fail.) + */ + if (availrmem <= pages_pp_maximum) + return (1); + +#endif /* sun */ +#if defined(__i386) || !defined(UMA_MD_SMALL_ALLOC) /* * If we're on an i386 platform, it's possible that we'll exhaust the * kernel heap space before we ever run out of available physical @@ -2503,32 +2570,49 @@ arc_reclaim_needed(void) * heap is allocated. (Or, in the calculation, if less than 1/4th is * free) */ - if (btop(vmem_size(heap_arena, VMEM_FREE)) < - (btop(vmem_size(heap_arena, VMEM_FREE | VMEM_ALLOC)) >> 2)) + if (vmem_size(heap_arena, VMEM_FREE) < + (vmem_size(heap_arena, VMEM_FREE | VMEM_ALLOC) >> 2)) { + DTRACE_PROBE2(arc__reclaim_used, uint64_t, + vmem_size(heap_arena, VMEM_FREE), uint64_t, + (vmem_size(heap_arena, VMEM_FREE | VMEM_ALLOC)) >> 2); return (1); + } #endif -#else /* !sun */ - if (kmem_used() > (kmem_size() * 3) / 4) +#ifdef sun + /* + * If zio data pages are being allocated out of a separate heap segment, + * then enforce that the size of available vmem for this arena remains + * above about 1/16th free. + * + * Note: The 1/16th arena free requirement was put in place + * to aggressively evict memory from the arc in order to avoid + * memory fragmentation issues. + */ + if (zio_arena != NULL && + vmem_size(zio_arena, VMEM_FREE) < + (vmem_size(zio_arena, VMEM_ALLOC) >> 4)) return (1); #endif /* sun */ - -#else +#else /* _KERNEL */ if (spa_get_random(100) == 0) return (1); -#endif +#endif /* _KERNEL */ + DTRACE_PROBE(arc__reclaim_no); + return (0); } extern kmem_cache_t *zio_buf_cache[]; extern kmem_cache_t *zio_data_buf_cache[]; -static void +static void __noinline arc_kmem_reap_now(arc_reclaim_strategy_t strat) { size_t i; kmem_cache_t *prev_cache = NULL; kmem_cache_t *prev_data_cache = NULL; + DTRACE_PROBE(arc__kmem_reap_start); #ifdef _KERNEL if (arc_meta_used >= arc_meta_limit) { /* @@ -2564,6 +2648,16 @@ arc_kmem_reap_now(arc_reclaim_strategy_t } kmem_cache_reap_now(buf_cache); kmem_cache_reap_now(hdr_cache); + +#ifdef sun + /* + * Ask the vmem arena to reclaim unused memory from its + * quantum caches. + */ + if (zio_arena != NULL && strat == ARC_RECLAIM_AGGR) + vmem_qcache_reap(zio_arena); +#endif + DTRACE_PROBE(arc__kmem_reap_end); } static void @@ -2581,6 +2675,7 @@ arc_reclaim_thread(void *dummy __unused) if (arc_no_grow) { if (last_reclaim == ARC_RECLAIM_CONS) { + DTRACE_PROBE(arc__reclaim_aggr_no_grow); last_reclaim = ARC_RECLAIM_AGGR; } else { last_reclaim = ARC_RECLAIM_CONS; @@ -2588,6 +2683,7 @@ arc_reclaim_thread(void *dummy __unused) } else { arc_no_grow = TRUE; last_reclaim = ARC_RECLAIM_AGGR; + DTRACE_PROBE(arc__reclaim_aggr); membar_producer(); } @@ -2692,6 +2788,7 @@ arc_adapt(int bytes, arc_state_t *state) * cache size, increment the target cache size */ if (arc_size > arc_c - (2ULL << SPA_MAXBLOCKSHIFT)) { + DTRACE_PROBE1(arc__inc_adapt, int, bytes); atomic_add_64(&arc_c, (int64_t)bytes); if (arc_c > arc_c_max) arc_c = arc_c_max; @@ -2713,20 +2810,6 @@ arc_evict_needed(arc_buf_contents_t type if (type == ARC_BUFC_METADATA && arc_meta_used >= arc_meta_limit) return (1); -#ifdef sun -#ifdef _KERNEL - /* - * If zio data pages are being allocated out of a separate heap segment, - * then enforce that the size of available vmem for this area remains - * above about 1/32nd free. - */ - if (type == ARC_BUFC_DATA && zio_arena != NULL && - vmem_size(zio_arena, VMEM_FREE) < - (vmem_size(zio_arena, VMEM_ALLOC) >> 5)) - return (1); -#endif -#endif /* sun */ - if (arc_reclaim_needed()) return (1); @@ -3885,20 +3968,16 @@ static int arc_memory_throttle(uint64_t reserve, uint64_t txg) { #ifdef _KERNEL - uint64_t available_memory = - ptoa((uintmax_t)cnt.v_free_count + cnt.v_cache_count); + uint64_t available_memory = ptob(freemem); static uint64_t page_load = 0; static uint64_t last_txg = 0; -#ifdef sun -#if defined(__i386) +#if defined(__i386) || !defined(UMA_MD_SMALL_ALLOC) available_memory = - MIN(available_memory, vmem_size(heap_arena, VMEM_FREE)); + MIN(available_memory, ptob(vmem_size(heap_arena, VMEM_FREE))); #endif -#endif /* sun */ - if (cnt.v_free_count + cnt.v_cache_count > - (uint64_t)physmem * arc_lotsfree_percent / 100) + if (freemem > (uint64_t)physmem * arc_lotsfree_percent / 100) return (0); if (txg > last_txg) { @@ -3911,7 +3990,7 @@ arc_memory_throttle(uint64_t reserve, ui * continue to let page writes occur as quickly as possible. */ if (curproc == pageproc) { - if (page_load > available_memory / 4) + if (page_load > MAX(ptob(minfree), available_memory) / 4) return (SET_ERROR(ERESTART)); /* Note: reserve is inflated, so we deflate */ page_load += reserve / 8; @@ -3939,8 +4018,10 @@ arc_tempreserve_space(uint64_t reserve, int error; uint64_t anon_size; - if (reserve > arc_c/4 && !arc_no_grow) + if (reserve > arc_c/4 && !arc_no_grow) { arc_c = MIN(arc_c_max, reserve * 4); + DTRACE_PROBE1(arc__set_reserve, uint64_t, arc_c); + } if (reserve > arc_c) return (SET_ERROR(ENOMEM)); @@ -3994,6 +4075,7 @@ arc_lowmem(void *arg __unused, int howto mutex_enter(&arc_lowmem_lock); mutex_enter(&arc_reclaim_thr_lock); needfree = 1; + DTRACE_PROBE(arc__needfree); cv_signal(&arc_reclaim_thr_cv); /* Modified: stable/10/sys/vm/vm_pageout.c ============================================================================== --- stable/10/sys/vm/vm_pageout.c Thu Oct 9 23:52:33 2014 (r272874) +++ stable/10/sys/vm/vm_pageout.c Fri Oct 10 00:12:16 2014 (r272875) @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include "opt_vm.h" +#include "opt_kdtrace.h" #include #include #include @@ -89,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -115,10 +117,14 @@ __FBSDID("$FreeBSD$"); /* the kernel process "vm_pageout"*/ static void vm_pageout(void); +static void vm_pageout_init(void); static int vm_pageout_clean(vm_page_t); static void vm_pageout_scan(struct vm_domain *vmd, int pass); static void vm_pageout_mightbe_oom(struct vm_domain *vmd, int pass); +SYSINIT(pagedaemon_init, SI_SUB_KTHREAD_PAGE, SI_ORDER_FIRST, vm_pageout_init, + NULL); + struct proc *pageproc; static struct kproc_desc page_kp = { @@ -126,9 +132,13 @@ static struct kproc_desc page_kp = { vm_pageout, &pageproc }; -SYSINIT(pagedaemon, SI_SUB_KTHREAD_PAGE, SI_ORDER_FIRST, kproc_start, +SYSINIT(pagedaemon, SI_SUB_KTHREAD_PAGE, SI_ORDER_SECOND, kproc_start, &page_kp); +SDT_PROVIDER_DEFINE(vm); +SDT_PROBE_DEFINE(vm, , , vm__lowmem_cache); +SDT_PROBE_DEFINE(vm, , , vm__lowmem_scan); + #if !defined(NO_SWAPPING) /* the kernel process "vm_daemon"*/ static void vm_daemon(void); @@ -663,6 +673,7 @@ vm_pageout_grow_cache(int tries, vm_padd * may acquire locks and/or sleep, so they can only be invoked * when "tries" is greater than zero. */ + SDT_PROBE0(vm, , , vm__lowmem_cache); EVENTHANDLER_INVOKE(vm_lowmem, 0); /* @@ -925,6 +936,7 @@ vm_pageout_scan(struct vm_domain *vmd, i /* * Decrease registered cache sizes. */ + SDT_PROBE0(vm, , , vm__lowmem_scan); EVENTHANDLER_INVOKE(vm_lowmem, 0); /* * We do this explicitly after the caches have been @@ -1650,15 +1662,11 @@ vm_pageout_worker(void *arg) } /* - * vm_pageout is the high level pageout daemon. + * vm_pageout_init initialises basic pageout daemon settings. */ static void -vm_pageout(void) +vm_pageout_init(void) { -#if MAXMEMDOM > 1 - int error, i; -#endif - /* * Initialize some paging parameters. */ @@ -1704,6 +1712,17 @@ vm_pageout(void) /* XXX does not really belong here */ if (vm_page_max_wired == 0) vm_page_max_wired = cnt.v_free_count / 3; +} + +/* + * vm_pageout is the high level pageout daemon. + */ +static void +vm_pageout(void) +{ +#if MAXMEMDOM > 1 + int error, i; +#endif swap_pager_swap_init(); #if MAXMEMDOM > 1 From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 00:26:02 2014 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 EE95F15A; Fri, 10 Oct 2014 00:26: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 D82DB23F; Fri, 10 Oct 2014 00:26: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 s9A0Q14B006144; Fri, 10 Oct 2014 00:26:01 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9A0Q0g8006127; Fri, 10 Oct 2014 00:26:00 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201410100026.s9A0Q0g8006127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 10 Oct 2014 00:26: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: r272877 - in stable/10: share/man/man9 sys/cddl/compat/opensolaris/kern sys/cddl/compat/opensolaris/sys sys/conf sys/modules/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.18-1 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, 10 Oct 2014 00:26:02 -0000 Author: smh Date: Fri Oct 10 00:26:00 2014 New Revision: 272877 URL: https://svnweb.freebsd.org/changeset/base/272877 Log: MFC r271802: Add dtrace probe support for zfs SET_ERROR(..) MFC r271873: Fix static kernel build with options ZFS MFC r271819: Remove sys/types.h include as per style (9) Sponsored by: Multiplay Added: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_dtrace.c - copied, changed from r271802, head/sys/cddl/compat/opensolaris/kern/opensolaris_dtrace.c Modified: stable/10/share/man/man9/SDT.9 stable/10/sys/cddl/compat/opensolaris/sys/sdt.h stable/10/sys/conf/files stable/10/sys/modules/zfs/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/SDT.9 ============================================================================== --- stable/10/share/man/man9/SDT.9 Fri Oct 10 00:24:45 2014 (r272876) +++ stable/10/share/man/man9/SDT.9 Fri Oct 10 00:26:00 2014 (r272877) @@ -24,13 +24,15 @@ .\" .\" $FreeBSD$ .\" -.Dd August 17, 2013 +.Dd September 18, 2014 .Dt SDT 9 .Os .Sh NAME .Nm SDT .Nd a DTrace framework for adding statically-defined tracing probes .Sh SYNOPSIS +.In sys/param.h +.In sys/queue.h .In sys/sdt.h .Fn SDT_PROVIDER_DECLARE prov .Fn SDT_PROVIDER_DEFINE prov Copied and modified: stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_dtrace.c (from r271802, head/sys/cddl/compat/opensolaris/kern/opensolaris_dtrace.c) ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_dtrace.c Thu Sep 18 20:00:36 2014 (r271802, copy source) +++ stable/10/sys/cddl/compat/opensolaris/kern/opensolaris_dtrace.c Fri Oct 10 00:26:00 2014 (r272877) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include Modified: stable/10/sys/cddl/compat/opensolaris/sys/sdt.h ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/sys/sdt.h Fri Oct 10 00:24:45 2014 (r272876) +++ stable/10/sys/cddl/compat/opensolaris/sys/sdt.h Fri Oct 10 00:26:00 2014 (r272877) @@ -34,6 +34,15 @@ #endif #include_next -#define SET_ERROR(err) (err) +#ifdef KDTRACE_HOOKS +SDT_PROBE_DECLARE(sdt, , , set__error); + +#define SET_ERROR(err) \ + ((sdt_sdt___set__error->id ? \ + (*sdt_probe_func)(sdt_sdt___set__error->id, \ + (uintptr_t)err, 0, 0, 0, 0) : 0), err) +#else +#define SET_ERROR(err) (err) +#endif #endif /* _OPENSOLARIS_SYS_SDT_H_ */ Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Fri Oct 10 00:24:45 2014 (r272876) +++ stable/10/sys/conf/files Fri Oct 10 00:26:00 2014 (r272877) @@ -111,6 +111,7 @@ cddl/compat/opensolaris/kern/opensolaris cddl/compat/opensolaris/kern/opensolaris_sunddi.c optional zfs compile-with "${ZFS_C}" # zfs specific cddl/compat/opensolaris/kern/opensolaris_acl.c optional zfs compile-with "${ZFS_C}" +cddl/compat/opensolaris/kern/opensolaris_dtrace.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_kobj.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_kstat.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_lookup.c optional zfs compile-with "${ZFS_C}" Modified: stable/10/sys/modules/zfs/Makefile ============================================================================== --- stable/10/sys/modules/zfs/Makefile Fri Oct 10 00:24:45 2014 (r272876) +++ stable/10/sys/modules/zfs/Makefile Fri Oct 10 00:26:00 2014 (r272877) @@ -25,6 +25,7 @@ SRCS+= u8_textprep.c .PATH: ${.CURDIR}/../../cddl/compat/opensolaris/kern SRCS+= opensolaris_acl.c +SRCS+= opensolaris_dtrace.c SRCS+= opensolaris_kobj.c SRCS+= opensolaris_kstat.c SRCS+= opensolaris_lookup.c From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 00:28:21 2014 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 1450E401; Fri, 10 Oct 2014 00:28: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 D992A267; Fri, 10 Oct 2014 00:28: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 s9A0SKEQ006589; Fri, 10 Oct 2014 00:28:20 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9A0SKBr006587; Fri, 10 Oct 2014 00:28:20 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201410100028.s9A0SKBr006587@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 10 Oct 2014 00:28: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: r272879 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . 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.18-1 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, 10 Oct 2014 00:28:21 -0000 Author: smh Date: Fri Oct 10 00:28:19 2014 New Revision: 272879 URL: https://svnweb.freebsd.org/changeset/base/272879 Log: MFC r271754: Remove unused ZFS ARC functions Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Oct 10 00:26:28 2014 (r272878) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Oct 10 00:28:19 2014 (r272879) @@ -1507,23 +1507,6 @@ arc_space_return(uint64_t space, arc_spa atomic_add_64(&arc_size, -space); } -void * -arc_data_buf_alloc(uint64_t size) -{ - if (arc_evict_needed(ARC_BUFC_DATA)) - cv_signal(&arc_reclaim_thr_cv); - atomic_add_64(&arc_size, size); - return (zio_data_buf_alloc(size)); -} - -void -arc_data_buf_free(void *buf, uint64_t size) -{ - zio_data_buf_free(buf, size); - ASSERT(arc_size >= size); - atomic_add_64(&arc_size, -size); -} - arc_buf_t * arc_buf_alloc(spa_t *spa, int size, void *tag, arc_buf_contents_t type) { Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Fri Oct 10 00:26:28 2014 (r272878) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Fri Oct 10 00:28:19 2014 (r272879) @@ -83,8 +83,6 @@ typedef enum arc_space_type { void arc_space_consume(uint64_t space, arc_space_type_t type); void arc_space_return(uint64_t space, arc_space_type_t type); -void *arc_data_buf_alloc(uint64_t space); -void arc_data_buf_free(void *buf, uint64_t space); arc_buf_t *arc_buf_alloc(spa_t *spa, int size, void *tag, arc_buf_contents_t type); arc_buf_t *arc_loan_buf(spa_t *spa, int size); From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 00:30:01 2014 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 65001551; Fri, 10 Oct 2014 00:30:01 +0000 (UTC) Received: from mail-pd0-x230.google.com (mail-pd0-x230.google.com [IPv6:2607:f8b0:400e:c02::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E09E27A; Fri, 10 Oct 2014 00:30:01 +0000 (UTC) Received: by mail-pd0-f176.google.com with SMTP id fp1so619615pdb.21 for ; Thu, 09 Oct 2014 17:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:content-transfer-encoding:subject:references:from :mime-version:in-reply-to:message-id:date:cc:to; bh=vXeYle7lUPMO6CaWm06vNnJvJ60+Aw5NkE3sqfuvD6Y=; b=to4OPbdfhdKIAPewsUryUIJn6vDn9IZuzosgESO0Nna+eim0gzoPIIK0tDWZLYXOsO Q/erOpQtMpzSrrSrcEK8v0Ze2P/Pnwx/MrfBC2Is6Hmx9g569WAZkEun5bqk48BYE9OD YjlwEpp5ntkDvpAADRD4He87xG2PDBb3e+1eyG6A0INVaDgCOYvcQWni4j8D7iLDqhM+ F3JNL6y0AvFzAk8SGUmmKuFoSv6r7KgL+mmD917xax/SvGwwIxb9X/klZqnj53PrVZN1 kpD0ETkRXP8rETC4hnXyYQW5yMCO5wIEaQcWY2GhLyCQT+ev3HtayGppsKOdsKOEe7FB 7g+Q== X-Received: by 10.66.139.16 with SMTP id qu16mr76401pab.153.1412901000374; Thu, 09 Oct 2014 17:30:00 -0700 (PDT) Received: from [10.61.9.12] (mobile-166-137-212-101.mycingular.net. [166.137.212.101]) by mx.google.com with ESMTPSA id fv4sm1635503pbd.47.2014.10.09.17.29.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 Oct 2014 17:29:59 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r272862 - in stable/10/etc: defaults rc.d References: <201410092335.s99NZO1h080399@svn.freebsd.org> From: Garrett Cooper Mime-Version: 1.0 (1.0) In-Reply-To: <201410092335.s99NZO1h080399@svn.freebsd.org> Message-Id: <63A6BF88-C3D8-4D6D-9827-8A4E9EC564FA@gmail.com> Date: Thu, 9 Oct 2014 17:24:43 -0700 To: Hiroki Sato X-Mailer: iPhone Mail (11D257) Cc: "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "svn-src-stable-10@freebsd.org" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 10 Oct 2014 00:30:01 -0000 > On Oct 9, 2014, at 16:35, Hiroki Sato wrote: >=20 > Author: hrs > Date: Thu Oct 9 23:35:23 2014 > New Revision: 272862 > URL: https://svnweb.freebsd.org/changeset/base/272862 >=20 > Log: > MFC r270782: >=20 > Restructure rc.d scripts for kerberos5 daemons: >=20 > - Rename $kerberos5_server_enable with $kdc_enable and rename > rc.d/kerberos with rc.d/kdc. >=20 > - Rename $kadmin5_server_enable with $kadmind_enable. >=20 > - Rename ${kerberos5,kpasswdd}_server with ${kdc,kpasswdd}_program. >=20 > - Fix rc.d/{kadmind,kerberos,kpasswdd,kfd} scripts not to change variab= les > after load_rc_config(). >=20 > - Add rc.d/ipropd_master and rc.d/ipropd_slave scripts. These are > for iprop-master(8) and iprop-slave(8). Keytab used for iprop servic= e is > defined in ipropd_{master,slave}_keytab (/etc/krb5.keytab by default)= . >=20 > - Add dependency on rc.d/kdc to SERVERS. rc.d/kdc must be invoked as e= arly > as possible before scripts divided by rc.d/SERVERS. >=20 > Note that changes to rc.d/{kdc,kpasswdd,kadmind} are backward-compatibl= e > with the old configuration variables: > ${kerberos5,kpasswdd,kadmin5}_server{,_enable,_flags}. Relnotes: yes?= From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 00:51:24 2014 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 AD162ADD; Fri, 10 Oct 2014 00:51: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 97B6F758; Fri, 10 Oct 2014 00:51: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 s9A0pOiJ019499; Fri, 10 Oct 2014 00:51:24 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9A0pO6n019497; Fri, 10 Oct 2014 00:51:24 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201410100051.s9A0pO6n019497@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 10 Oct 2014 00:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272882 - 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.18-1 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, 10 Oct 2014 00:51:24 -0000 Author: smh Date: Fri Oct 10 00:51:23 2014 New Revision: 272882 URL: https://svnweb.freebsd.org/changeset/base/272882 Log: MFC r271589: Added missing ZFS sysctls This also includes small additional direct changes as it still uses the old way of handling tunables. Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Fri Oct 10 00:35:13 2014 (r272881) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Fri Oct 10 00:51:23 2014 (r272882) @@ -148,8 +148,10 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, dirty_d "The absolute cap on dirty_data_max when auto calculating"); TUNABLE_INT("vfs.zfs.dirty_data_max_percent", &zfs_dirty_data_max_percent); -SYSCTL_INT(_vfs_zfs, OID_AUTO, dirty_data_max_percent, CTLFLAG_RDTUN, - &zfs_dirty_data_max_percent, 0, +static int sysctl_zfs_dirty_data_max_percent(SYSCTL_HANDLER_ARGS); +SYSCTL_PROC(_vfs_zfs, OID_AUTO, dirty_data_max_percent, + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int), + sysctl_zfs_dirty_data_max_percent, "I", "The percent of physical memory used to auto calculate dirty_data_max"); TUNABLE_QUAD("vfs.zfs.dirty_data_sync", &zfs_dirty_data_sync); @@ -172,6 +174,24 @@ SYSCTL_PROC(_vfs_zfs, OID_AUTO, delay_sc "Controls how quickly the delay approaches infinity"); static int +sysctl_zfs_dirty_data_max_percent(SYSCTL_HANDLER_ARGS) +{ + int val, err; + + val = zfs_dirty_data_max_percent; + err = sysctl_handle_int(oidp, &val, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + if (val < 0 || val > 100) + return (EINVAL); + + zfs_dirty_data_max_percent = val; + + return (0); +} + +static int sysctl_zfs_delay_min_dirty_percent(SYSCTL_HANDLER_ARGS) { int val, err; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Fri Oct 10 00:35:13 2014 (r272881) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Fri Oct 10 00:51:23 2014 (r272882) @@ -176,24 +176,43 @@ int zfs_vdev_write_gap_limit = 4 << 10; #ifdef __FreeBSD__ SYSCTL_DECL(_vfs_zfs_vdev); + +TUNABLE_INT("vfs.zfs.vdev.async_write_active_min_dirty_percent", + &zfs_vdev_async_write_active_min_dirty_percent); +static int sysctl_zfs_async_write_active_min_dirty_percent(SYSCTL_HANDLER_ARGS); +SYSCTL_PROC(_vfs_zfs_vdev, OID_AUTO, async_write_active_min_dirty_percent, + CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int), + sysctl_zfs_async_write_active_min_dirty_percent, "I", + "Percentage of async write dirty data below which " + "async_write_min_active is used."); + +TUNABLE_INT("vfs.zfs.vdev.async_write_active_max_dirty_percent", + &zfs_vdev_async_write_active_max_dirty_percent); +static int sysctl_zfs_async_write_active_max_dirty_percent(SYSCTL_HANDLER_ARGS); +SYSCTL_PROC(_vfs_zfs_vdev, OID_AUTO, async_write_active_max_dirty_percent, + CTLTYPE_UINT | CTLFLAG_MPSAFE | CTLFLAG_RWTUN, 0, sizeof(int), + sysctl_zfs_async_write_active_max_dirty_percent, "I", + "Percentage of async write dirty data above which " + "async_write_max_active is used."); + TUNABLE_INT("vfs.zfs.vdev.max_active", &zfs_vdev_max_active); -SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, max_active, CTLFLAG_RW, +SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, max_active, CTLFLAG_RWTUN, &zfs_vdev_max_active, 0, "The maximum number of I/Os of all types active for each device."); #define ZFS_VDEV_QUEUE_KNOB_MIN(name) \ TUNABLE_INT("vfs.zfs.vdev." #name "_min_active", \ &zfs_vdev_ ## name ## _min_active); \ -SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, name ## _min_active, CTLFLAG_RW, \ - &zfs_vdev_ ## name ## _min_active, 0, \ +SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, name ## _min_active, \ + CTLFLAG_RWTUN, &zfs_vdev_ ## name ## _min_active, 0, \ "Initial number of I/O requests of type " #name \ " active for each device"); #define ZFS_VDEV_QUEUE_KNOB_MAX(name) \ TUNABLE_INT("vfs.zfs.vdev." #name "_max_active", \ &zfs_vdev_ ## name ## _max_active); \ -SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, name ## _max_active, CTLFLAG_RW, \ - &zfs_vdev_ ## name ## _max_active, 0, \ +SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, name ## _max_active, \ + CTLFLAG_RWTUN, &zfs_vdev_ ## name ## _max_active, 0, \ "Maximum number of I/O requests of type " #name \ " active for each device"); @@ -213,17 +232,55 @@ ZFS_VDEV_QUEUE_KNOB_MAX(trim); #undef ZFS_VDEV_QUEUE_KNOB TUNABLE_INT("vfs.zfs.vdev.aggregation_limit", &zfs_vdev_aggregation_limit); -SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, aggregation_limit, CTLFLAG_RW, +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, aggregation_limit, CTLFLAG_RWTUN, &zfs_vdev_aggregation_limit, 0, "I/O requests are aggregated up to this size"); TUNABLE_INT("vfs.zfs.vdev.read_gap_limit", &zfs_vdev_read_gap_limit); -SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, read_gap_limit, CTLFLAG_RW, +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, read_gap_limit, CTLFLAG_RWTUN, &zfs_vdev_read_gap_limit, 0, "Acceptable gap between two reads being aggregated"); TUNABLE_INT("vfs.zfs.vdev.write_gap_limit", &zfs_vdev_write_gap_limit); -SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, write_gap_limit, CTLFLAG_RW, +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, write_gap_limit, CTLFLAG_RWTUN, &zfs_vdev_write_gap_limit, 0, "Acceptable gap between two writes being aggregated"); + +static int +sysctl_zfs_async_write_active_min_dirty_percent(SYSCTL_HANDLER_ARGS) +{ + int val, err; + + val = zfs_vdev_async_write_active_min_dirty_percent; + err = sysctl_handle_int(oidp, &val, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + if (val < 0 || val > 100 || + val >= zfs_vdev_async_write_active_max_dirty_percent) + return (EINVAL); + + zfs_vdev_async_write_active_min_dirty_percent = val; + + return (0); +} + +static int +sysctl_zfs_async_write_active_max_dirty_percent(SYSCTL_HANDLER_ARGS) +{ + int val, err; + + val = zfs_vdev_async_write_active_max_dirty_percent; + err = sysctl_handle_int(oidp, &val, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + if (val < 0 || val > 100 || + val <= zfs_vdev_async_write_active_min_dirty_percent) + return (EINVAL); + + zfs_vdev_async_write_active_max_dirty_percent = val; + + return (0); +} #endif int From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 01:01:06 2014 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 46234DD3; Fri, 10 Oct 2014 01:01: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 311AB842; Fri, 10 Oct 2014 01:01: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 s9A116tB024346; Fri, 10 Oct 2014 01:01:06 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9A115i3024343; Fri, 10 Oct 2014 01:01:05 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201410100101.s9A115i3024343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 10 Oct 2014 01:01: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: r272883 - 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.18-1 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, 10 Oct 2014 01:01:06 -0000 Author: smh Date: Fri Oct 10 01:01:04 2014 New Revision: 272883 URL: https://svnweb.freebsd.org/changeset/base/272883 Log: MFC r272474: Fix various issues with zvols Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.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 Fri Oct 10 00:51:23 2014 (r272882) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Oct 10 01:01:04 2014 (r272883) @@ -2257,6 +2257,9 @@ dsl_dataset_promote_sync(void *arg, dmu_ dsl_dir_t *odd = NULL; uint64_t oldnext_obj; int64_t delta; +#if defined(__FreeBSD__) && defined(_KERNEL) + char *oldname, *newname; +#endif VERIFY0(promote_hold(ddpa, dp, FTAG)); hds = ddpa->ddpa_clone; @@ -2322,6 +2325,14 @@ dsl_dataset_promote_sync(void *arg, dmu_ dd->dd_phys->dd_clones, origin_head->ds_object, tx)); } +#if defined(__FreeBSD__) && defined(_KERNEL) + /* Take the spa_namespace_lock early so zvol renames don't deadlock. */ + mutex_enter(&spa_namespace_lock); + + oldname = kmem_alloc(MAXPATHLEN, KM_SLEEP); + newname = kmem_alloc(MAXPATHLEN, KM_SLEEP); +#endif + /* move snapshots to this dir */ for (snap = list_head(&ddpa->shared_snaps); snap; snap = list_next(&ddpa->shared_snaps, snap)) { @@ -2356,6 +2367,12 @@ dsl_dataset_promote_sync(void *arg, dmu_ VERIFY0(dsl_dir_hold_obj(dp, dd->dd_object, NULL, ds, &ds->ds_dir)); +#if defined(__FreeBSD__) && defined(_KERNEL) + dsl_dataset_name(ds, newname); + zfsvfs_update_fromname(oldname, newname); + zvol_rename_minors(oldname, newname); +#endif + /* move any clone references */ if (ds->ds_phys->ds_next_clones_obj && spa_version(dp->dp_spa) >= SPA_VERSION_DIR_CLONES) { @@ -2393,6 +2410,12 @@ dsl_dataset_promote_sync(void *arg, dmu_ ASSERT(!dsl_prop_hascb(ds)); } +#if defined(__FreeBSD__) && defined(_KERNEL) + mutex_exit(&spa_namespace_lock); + + kmem_free(newname, MAXPATHLEN); + kmem_free(oldname, MAXPATHLEN); +#endif /* * Change space accounting. * Note, pa->*usedsnap and dd_used_breakdown[SNAP] will either Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Oct 10 00:51:23 2014 (r272882) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Oct 10 01:01:04 2014 (r272883) @@ -3541,6 +3541,7 @@ zfs_destroy_unmount_origin(const char *f static int zfs_ioc_destroy_snaps(const char *poolname, nvlist_t *innvl, nvlist_t *outnvl) { + int error, poollen; nvlist_t *snaps; nvpair_t *pair; boolean_t defer; @@ -3549,9 +3550,25 @@ zfs_ioc_destroy_snaps(const char *poolna return (SET_ERROR(EINVAL)); defer = nvlist_exists(innvl, "defer"); + poollen = strlen(poolname); for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL; pair = nvlist_next_nvpair(snaps, pair)) { - (void) zfs_unmount_snap(nvpair_name(pair)); + const char *name = nvpair_name(pair); + + /* + * The snap must be in the specified pool to prevent the + * invalid removal of zvol minors below. + */ + if (strncmp(name, poolname, poollen) != 0 || + (name[poollen] != '/' && name[poollen] != '@')) + return (SET_ERROR(EXDEV)); + + error = zfs_unmount_snap(name); + if (error != 0) + return (error); +#if defined(__FreeBSD__) + zvol_remove_minors(name); +#endif } return (dsl_destroy_snapshots_nvl(snaps, defer, outnvl)); @@ -3676,7 +3693,11 @@ zfs_ioc_destroy(zfs_cmd_t *zc) else err = dsl_destroy_head(zc->zc_name); if (zc->zc_objset_type == DMU_OST_ZVOL && err == 0) +#ifdef __FreeBSD__ + zvol_remove_minors(zc->zc_name); +#else (void) zvol_remove_minor(zc->zc_name); +#endif return (err); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Oct 10 00:51:23 2014 (r272882) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Oct 10 01:01:04 2014 (r272883) @@ -883,7 +883,8 @@ zvol_remove_minors(const char *name) LIST_FOREACH_SAFE(zv, &all_zvols, zv_links, tzv) { if (strcmp(zv->zv_name, name) == 0 || (strncmp(zv->zv_name, name, namelen) == 0 && - zv->zv_name[namelen] == '/')) { + strlen(zv->zv_name) > namelen && (zv->zv_name[namelen] == '/' || + zv->zv_name[namelen] == '@'))) { (void) zvol_remove_zv(zv); } } @@ -2571,9 +2572,10 @@ zvol_create_minors(const char *name) if (dmu_objset_type(os) == DMU_OST_ZVOL) { dsl_dataset_long_hold(os->os_dsl_dataset, FTAG); dsl_pool_rele(dmu_objset_pool(os), FTAG); - if ((error = zvol_create_minor(name)) == 0) + error = zvol_create_minor(name); + if (error == 0 || error == EEXIST) { error = zvol_create_snapshots(os, name); - else { + } else { printf("ZFS WARNING: Unable to create ZVOL %s (error=%d).\n", name, error); } @@ -2674,12 +2676,17 @@ zvol_rename_minors(const char *oldname, size_t oldnamelen, newnamelen; zvol_state_t *zv; char *namebuf; + boolean_t locked = B_FALSE; oldnamelen = strlen(oldname); newnamelen = strlen(newname); DROP_GIANT(); - mutex_enter(&spa_namespace_lock); + /* See comment in zvol_open(). */ + if (!MUTEX_HELD(&spa_namespace_lock)) { + mutex_enter(&spa_namespace_lock); + locked = B_TRUE; + } LIST_FOREACH(zv, &all_zvols, zv_links) { if (strcmp(zv->zv_name, oldname) == 0) { @@ -2694,7 +2701,8 @@ zvol_rename_minors(const char *oldname, } } - mutex_exit(&spa_namespace_lock); + if (locked) + mutex_exit(&spa_namespace_lock); PICKUP_GIANT(); } From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 12:02:35 2014 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 566F2F6C; Fri, 10 Oct 2014 12:02: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 42854E4C; Fri, 10 Oct 2014 12:02: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 s9AC2Z4c035384; Fri, 10 Oct 2014 12:02:35 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9AC2ZLm035383; Fri, 10 Oct 2014 12:02:35 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201410101202.s9AC2ZLm035383@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 10 Oct 2014 12:02: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: r272892 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 10 Oct 2014 12:02:35 -0000 Author: bz Date: Fri Oct 10 12:02:34 2014 New Revision: 272892 URL: https://svnweb.freebsd.org/changeset/base/272892 Log: MFC r272713: Since introducing the extra mapping in r250103 (head) for architectural performance events we have actually counted 'Branch Instruction Retired' when people asked for 'Unhalted core cycles' using the 'unhalted-core-cycles' event mask mnemonic. Reviewed by: jimharris Discussed with: gnn, rwatson Sponsored by: DARPA/AFRL Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Fri Oct 10 08:57:55 2014 (r272891) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Fri Oct 10 12:02:34 2014 (r272892) @@ -1796,7 +1796,7 @@ iap_is_event_architectural(enum pmc_even switch (pe) { case PMC_EV_IAP_ARCH_UNH_COR_CYC: ae = CORE_AE_UNHALTED_CORE_CYCLES; - *map = PMC_EV_IAP_EVENT_C4H_00H; + *map = PMC_EV_IAP_EVENT_3CH_00H; break; case PMC_EV_IAP_ARCH_INS_RET: ae = CORE_AE_INSTRUCTION_RETIRED; From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 14:47:54 2014 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 7FB54CB2; Fri, 10 Oct 2014 14:47:54 +0000 (UTC) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7401D271; Fri, 10 Oct 2014 14:47:53 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id fb4so2284340wid.10 for ; Fri, 10 Oct 2014 07:47:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=uA3qzw7UyU+/b/o11R4Bg8PLWk+QpwlzP2tupk7NKoI=; b=FNteTy8REV2lgIfScVyplmhib8ZsB5R15gXhvJm2RxiV0OJ4MIaL2Cucq5jGVYnQ84 8ydK/iCcglm+KZcelIAE3wRPSnyOdtibLxW54YisarKH7hTg72HUrKzICBuGkWKvMAH7 8ITe5krvFtyv436z006KUXPT8U5cUTFtjgNpQa7kllyVtDSZc94VSWSOH/qjcU5mCLA4 tSFpcRo+URWMy5ycH6rd4NzxLK+qGjPH4K9SMLrswcltwMeGcaJYtoYJcsDbxOVI3bk+ dOk2qF9v3Ol4Y1aqbaOP5yaWQ39jsRXRhPmx+vy8NZY5z0Ggg84t5FLURQCVuKDuUYOH 6PnA== X-Received: by 10.180.223.100 with SMTP id qt4mr5332312wic.35.1412952470576; Fri, 10 Oct 2014 07:47:50 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id di1sm2852845wib.21.2014.10.10.07.47.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Oct 2014 07:47:49 -0700 (PDT) Sender: Baptiste Daroussin Date: Fri, 10 Oct 2014 16:47:47 +0200 From: Baptiste Daroussin To: "Andrey A. Chernov" Subject: Re: svn commit: r270122 - in stable/10: . lib/libopie Message-ID: <20141010144747.GH19486@ivaldir.etoilebsd.net> References: <201408180242.s7I2gNaq087095@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="y0Ed1hDcWxc3B7cn" Content-Disposition: inline In-Reply-To: <201408180242.s7I2gNaq087095@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 10 Oct 2014 14:47:54 -0000 --y0Ed1hDcWxc3B7cn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 18, 2014 at 02:42:23AM +0000, Andrey A. Chernov wrote: > Author: ache > Date: Mon Aug 18 02:42:23 2014 > New Revision: 270122 > URL: http://svnweb.freebsd.org/changeset/base/270122 >=20 > Log: > Direct commit to stable/10 reflecting r269961 because the rest can't be > merged. > =20 > Bump version because challenge buffer size changed. Discovered a bit late but it is forbidden to break the ABI in a stable bran= ch as it defeats the way we are providing packages for users :( regards, Bapt >=20 > Modified: > stable/10/ObsoleteFiles.inc > stable/10/lib/libopie/Makefile > Directory Properties: > stable/10/ (props changed) >=20 > Modified: stable/10/ObsoleteFiles.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/ObsoleteFiles.inc Mon Aug 18 02:32:48 2014 (r270121) > +++ stable/10/ObsoleteFiles.inc Mon Aug 18 02:42:23 2014 (r270122) > @@ -38,6 +38,9 @@ > # xargs -n1 | sort | uniq -d; > # done > =20 > +# 20140814: libopie version bump > +OLD_LIBS+=3Dusr/lib/libopie.so.7 > +OLD_LIBS+=3Dusr/lib32/libopie.so.7 > # 20140811: otp-sha renamed to otp-sha1 > OLD_FILES+=3Dusr/bin/otp-sha > OLD_FILES+=3Dusr/share/man/man1/otp-sha.1.gz >=20 > Modified: stable/10/lib/libopie/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/lib/libopie/Makefile Mon Aug 18 02:32:48 2014 (r270121) > +++ stable/10/lib/libopie/Makefile Mon Aug 18 02:42:23 2014 (r270122) > @@ -4,7 +4,7 @@ > # > OPIE_DIST?=3D ${.CURDIR}/../../contrib/opie > DIST_DIR=3D ${OPIE_DIST}/${.CURDIR:T} > -SHLIB_MAJOR=3D 7 > +SHLIB_MAJOR=3D 8 > =20 > KEYFILE?=3D \"/etc/opiekeys\" > =20 > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" --y0Ed1hDcWxc3B7cn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlQ38ZMACgkQ8kTtMUmk6ExAHgCgiZ8SXbjlz1dBY22NshPLWZ3s 4FAAoJ+eb+CDjRijoLfji/xLoJNiNoWC =gO60 -----END PGP SIGNATURE----- --y0Ed1hDcWxc3B7cn-- From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 14:56:15 2014 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 9B3B633B for ; Fri, 10 Oct 2014 14:56:15 +0000 (UTC) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B2653CF for ; Fri, 10 Oct 2014 14:56:14 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id 10so3261461lbg.0 for ; Fri, 10 Oct 2014 07:56:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=A49UJtsEuTCjVxqfjjx9TJI2mgCxRieEUyzoLRoRSH8=; b=QTBb1k8+8XyKuny2iYsmhFdaqNyHtL1Nvg5qxrbpp07jiVG9XjH0ME+2MlhZAcPGt0 8WJwCNQQxqjGC7HZvAPmfD2oARhzoZSul7XsxMlfTUzOq0tnrFXj24zhCKhJa+TbgVHA 2RSxGgdf5Xnjdwdz7KrTO8SXbIdvJGA2/aQe6GjVMSTk6Y3GOqADse7tLTmnrQrIMzyv 1o5ja1eW5rPQaWOc0fYCoBYJcE1K9GX4sOZ0vJeo6qHAvskgQ+qRsFN2xB57DU4FMG5J 0kX6pDyz9OT4bI5u4wpi75Tz7erYDUSQD0kwTaf8tXXNZl/LGZmONgR1EH6UZs/BBTYG xSDg== X-Gm-Message-State: ALoCoQntybn5j/wnAESpzy5hvGXDuQz7/8vWxUvl4rRNLUfqTuKGM3DrfFQRAdPMZaCqC4BdFlpz X-Received: by 10.112.161.234 with SMTP id xv10mr3929414lbb.96.1412952966648; Fri, 10 Oct 2014 07:56:06 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id wj8sm1889432lbb.34.2014.10.10.07.56.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Oct 2014 07:56:05 -0700 (PDT) Message-ID: <5437F373.1090300@freebsd.org> Date: Fri, 10 Oct 2014 18:55:47 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Baptiste Daroussin Subject: Re: svn commit: r270122 - in stable/10: . lib/libopie References: <201408180242.s7I2gNaq087095@svn.freebsd.org> <20141010144747.GH19486@ivaldir.etoilebsd.net> In-Reply-To: <20141010144747.GH19486@ivaldir.etoilebsd.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5vwx901OtHDWODNPAnr08nBFffso9msSm" Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 10 Oct 2014 14:56:15 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --5vwx901OtHDWODNPAnr08nBFffso9msSm Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable On 10.10.2014 18:47, Baptiste Daroussin wrote: > On Mon, Aug 18, 2014 at 02:42:23AM +0000, Andrey A. Chernov wrote: >> Author: ache >> Date: Mon Aug 18 02:42:23 2014 >> New Revision: 270122 >> URL: http://svnweb.freebsd.org/changeset/base/270122 >> >> Log: >> Direct commit to stable/10 reflecting r269961 because the rest can't= be >> merged. >> =20 >> Bump version because challenge buffer size changed. >=20 > Discovered a bit late but it is forbidden to break the ABI in a stable = branch as > it defeats the way we are providing packages for users :( It is strange that nobody notice that so far. Is there any packages which builds with libopie? If no, there is no problem. If yes, what you suggest to fix, is that backing out? If yes, when exactly this change can be merged to -stable (because -stable always stays -stable, so from your sentence it means - never can be merged). --=20 http://ache.vniz.net/ --5vwx901OtHDWODNPAnr08nBFffso9msSm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJUN/OCAAoJEKUckv0MjfbKxQsH+gMAaBvtWB/TnY5hZikzQFl3 T8Ba7jGVER1SG+8phkMXklVsR/h5ulq2BG8cVturZsR9W4JDdyddljlyZBZxyg1r /a3cMNGzRgges/ddzJZY9exVkul7R311w3yfW0AQ3mpiivCvq6ngyWiuKOCpfBwv 1lHfoWVBc1QEXrBQHa0YfwJsvquHiHjhBtbuIO0d5f2I0TX88S//OWrXs9HLKxMV ohRpn6OUsmH9JE2O0RtQOJ6RtnqMyp56m2/Mc7hulpa0OXxobV9BtZxeO0Ci0of+ yqiQLjzP1Om/t8UxFLkLMAHf0DW1uvLZBGiV598rSE1Yalrp6T5uk3c749987kA= =Odld -----END PGP SIGNATURE----- --5vwx901OtHDWODNPAnr08nBFffso9msSm-- From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 15:02:51 2014 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 186375DD; Fri, 10 Oct 2014 15:02:51 +0000 (UTC) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.allbsd.org", Issuer "RapidSSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 15C2F688; Fri, 10 Oct 2014 15:02:49 +0000 (UTC) Received: from alph.d.allbsd.org ([IPv6:2001:2f0:104:e010:862b:2bff:febc:8956]) (authenticated bits=56) by mail.allbsd.org (8.14.9/8.14.8) with ESMTP id s9AF2NcL091924 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 11 Oct 2014 00:02:35 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.8/8.14.8) with ESMTP id s9AF2Mpi093056; Sat, 11 Oct 2014 00:02:23 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sat, 11 Oct 2014 00:02:01 +0900 (JST) Message-Id: <20141011.000201.1863876266089528066.hrs@allbsd.org> To: ache@freebsd.org Subject: Re: svn commit: r270122 - in stable/10: . lib/libopie From: Hiroki Sato In-Reply-To: <5437F373.1090300@freebsd.org> References: <201408180242.s7I2gNaq087095@svn.freebsd.org> <20141010144747.GH19486@ivaldir.etoilebsd.net> <5437F373.1090300@freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.6 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Sat_Oct_11_00_02_01_2014_397)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mail.allbsd.org [IPv6:2001:2f0:104:e001::32]); Sat, 11 Oct 2014 00:02:43 +0900 (JST) X-Spam-Status: No, score=-97.9 required=13.0 tests=CONTENT_TYPE_PRESENT, RDNS_NONE,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-stable@freebsd.org, bapt@FreeBSD.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 10 Oct 2014 15:02:51 -0000 ----Security_Multipart(Sat_Oct_11_00_02_01_2014_397)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Andrey Chernov wrote in <5437F373.1090300@freebsd.org>: ac> On 10.10.2014 18:47, Baptiste Daroussin wrote: ac> > On Mon, Aug 18, 2014 at 02:42:23AM +0000, Andrey A. Chernov wrote: ac> >> Author: ache ac> >> Date: Mon Aug 18 02:42:23 2014 ac> >> New Revision: 270122 ac> >> URL: http://svnweb.freebsd.org/changeset/base/270122 ac> >> ac> >> Log: ac> >> Direct commit to stable/10 reflecting r269961 because the rest can't be ac> >> merged. ac> >> ac> >> Bump version because challenge buffer size changed. ac> > ac> > Discovered a bit late but it is forbidden to break the ABI in a stable branch as ac> > it defeats the way we are providing packages for users :( ac> ac> It is strange that nobody notice that so far. Is there any packages ac> which builds with libopie? If no, there is no problem. If yes, what you cyrus-sasl uses it. ac> suggest to fix, is that backing out? If yes, when exactly this change ac> can be merged to -stable (because -stable always stays -stable, so from ac> your sentence it means - never can be merged). Is it impossible to handle this by symbol versioning instead of shlib version bump? -- Hiroki ----Security_Multipart(Sat_Oct_11_00_02_01_2014_397)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlQ39OkACgkQTyzT2CeTzy11KQCgzHr7zdl4R5vxpyW3tAuZgW3a 6sgAoIPApcnQ43T/RTIqD4GawoV+vowh =IDQb -----END PGP SIGNATURE----- ----Security_Multipart(Sat_Oct_11_00_02_01_2014_397)---- From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 15:11:37 2014 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 8C77AA8B for ; Fri, 10 Oct 2014 15:11:37 +0000 (UTC) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC4BD74D for ; Fri, 10 Oct 2014 15:11:36 +0000 (UTC) Received: by mail-la0-f47.google.com with SMTP id pv20so3408664lab.6 for ; Fri, 10 Oct 2014 08:11:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=AKZD1onVBjEzzV66J+3j2xn6iWJba+GDzVOYMBHqKrk=; b=mUMNm6pHkLblhRfezneOaCm7eTPaQsXOsUZDcHIc+utSs/bogK9JzhWciNtzY/h7rB nB8XctmUwtGJmgbmY/BCVfGA8s7WFWghTC4pLT22V8+im373Eh8NuheGkj4yx7vXfLGt CcuUAE3Tif5LIiO+gYR2Y013AVxrheCryrdf6WKIP4TImkd35rbGnv5ivoOzHqz2zIFJ W1WXbAPyj36f8QZD76dMq9lUs5+jA3jB4DXAsQw+lNWqxhw7VL8ixd4+/VpYMQK9hu7/ tvKRjtxT+H4RcGfODC5WHUgr6VqsoPBNQVLGidjHawh81eXtb+ztQoL4082Va4+20N7t qx4Q== X-Gm-Message-State: ALoCoQmU2oHC+Q4p5DvzjbpC14XZU8qW8iEbZ7kqcrqzbbsSjZbEQUDFgtXmWVu1JAr8vnP9gKBg X-Received: by 10.112.13.10 with SMTP id d10mr5610132lbc.10.1412953888595; Fri, 10 Oct 2014 08:11:28 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id nb7sm1894718lbb.43.2014.10.10.08.11.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Oct 2014 08:11:27 -0700 (PDT) Message-ID: <5437F71E.1090701@freebsd.org> Date: Fri, 10 Oct 2014 19:11:26 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Hiroki Sato Subject: Re: svn commit: r270122 - in stable/10: . lib/libopie References: <201408180242.s7I2gNaq087095@svn.freebsd.org> <20141010144747.GH19486@ivaldir.etoilebsd.net> <5437F373.1090300@freebsd.org> <20141011.000201.1863876266089528066.hrs@allbsd.org> In-Reply-To: <20141011.000201.1863876266089528066.hrs@allbsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KugaumLh8UAHakw4iFpI5d5lJNGv4gO1T" Cc: svn-src-stable@freebsd.org, bapt@FreeBSD.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 10 Oct 2014 15:11:37 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KugaumLh8UAHakw4iFpI5d5lJNGv4gO1T Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable On 10.10.2014 19:02, Hiroki Sato wrote: > ac> It is strange that nobody notice that so far. Is there any packages= > ac> which builds with libopie? If no, there is no problem. If yes, what= you >=20 > cyrus-sasl uses it. >=20 > ac> suggest to fix, is that backing out? If yes, when exactly this chan= ge > ac> can be merged to -stable (because -stable always stays -stable, so = from > ac> your sentence it means - never can be merged). >=20 > Is it impossible to handle this by symbol versioning instead of shlib > version bump? There is buffer size #define change (it was too small in unfixed version, so discards valid input), the buffer itself is in the userland programs, not in the library. AFAIK symbol versioning is for functions, not for such changes but I can be wrong, I know very little about symbol versioning procedure. --=20 http://ache.vniz.net/ --KugaumLh8UAHakw4iFpI5d5lJNGv4gO1T Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJUN/cfAAoJEKUckv0MjfbKgNYH/Rb7nwUaoaCqUFZYBz6BMSSM pdkf2jmjSK4mpD93uilAAX0OPpBxB71TeCpXhF8sVDuJSmm6x5/HW1K7+zucCog0 V/4zqc0iBfC7h/FyyawqyGfDS3wxVsK1Ti9HoEp9eDD+IeB6zhRAbtP8QbM2l1me dyuE4G1HkcjBqb2ujiP8QZOgEX9clxSyxxodGxuWz0mDeJ3fYoFMi7CrC436bkiE BlyoMrzcwqBEbBskpX8SvaEio/8OzAH6obl9iToo880ALToTglFGkhFMJwqxEWVj Kdwzxcyw+kKXJv8/U61NyHpOwLWquO9fJArpRYSqpx8gnGGRxhFdxVPn8fibp1M= =1xWm -----END PGP SIGNATURE----- --KugaumLh8UAHakw4iFpI5d5lJNGv4gO1T-- From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 15:18:03 2014 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 8F5F1D97 for ; Fri, 10 Oct 2014 15:18:03 +0000 (UTC) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E9A2826 for ; Fri, 10 Oct 2014 15:18:02 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id gm9so3476928lab.27 for ; Fri, 10 Oct 2014 08:17:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=UBtqEtGKv1KuJNr7ul+xYxm1W46hQ9T6NBC4NO6BuIA=; b=QfHmsNjxhI/6JcBJgpeXTImp87ZOkIkOlf3PJWhbCzr4x2+zwtP6FGslg8yO/zaQ5C YHiYkXw0pdYMIJhFP5IFMzEg5516xNQb/MTcz9hDF7PGEPTNT6YljL+E1n8gSwlWHk+g 5hKMHzoMq3fCyvwsHWEO4PQZuGRMfYq0hHOFi+rTAkMoPtosV5K4P8/PQH/yHyQ9tEy8 siMHz3nYnukzLiiA6RZ5+ti10SUXi5LZLzp25bXEYXIsip+6ULcvMl4P0ZpbwAw+1fX6 Q1KJS9GdbTikomjn94Siyoh94JKjmGeMoMTGcr/p/y5Z1zcI6u37B/g89JYKGJjvxbzA 4lTw== X-Gm-Message-State: ALoCoQlsmJWJyXAcrQfhJYdC8tiCWGsWn99Yx5coCwE9PtwCkbCzX7zOY0fDYr1axU/b35d9ugzf X-Received: by 10.152.18.130 with SMTP id w2mr5785873lad.64.1412954273931; Fri, 10 Oct 2014 08:17:53 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id je9sm1916439lbc.3.2014.10.10.08.17.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Oct 2014 08:17:53 -0700 (PDT) Message-ID: <5437F8A0.4080905@freebsd.org> Date: Fri, 10 Oct 2014 19:17:52 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Hiroki Sato Subject: Re: svn commit: r270122 - in stable/10: . lib/libopie References: <201408180242.s7I2gNaq087095@svn.freebsd.org> <20141010144747.GH19486@ivaldir.etoilebsd.net> <5437F373.1090300@freebsd.org> <20141011.000201.1863876266089528066.hrs@allbsd.org> <5437F71E.1090701@freebsd.org> In-Reply-To: <5437F71E.1090701@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gcgULEKfM5DA0KmArIBNK4CKHLRDAkFUq" Cc: svn-src-stable@freebsd.org, bapt@FreeBSD.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 10 Oct 2014 15:18:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gcgULEKfM5DA0KmArIBNK4CKHLRDAkFUq Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable On 10.10.2014 19:11, Andrey Chernov wrote: > On 10.10.2014 19:02, Hiroki Sato wrote: >> ac> It is strange that nobody notice that so far. Is there any package= s >> ac> which builds with libopie? If no, there is no problem. If yes, wha= t you >> >> cyrus-sasl uses it. >> >> ac> suggest to fix, is that backing out? If yes, when exactly this cha= nge >> ac> can be merged to -stable (because -stable always stays -stable, so= from >> ac> your sentence it means - never can be merged). >> >> Is it impossible to handle this by symbol versioning instead of shlib= >> version bump? >=20 > There is buffer size #define change (it was too small in unfixed > version, so discards valid input), the buffer itself is in the userland= > programs, not in the library. AFAIK symbol versioning is for functions,= > not for such changes but I can be wrong, I know very little about symbo= l > versioning procedure. =46rom other hand, the check for buffer size is in the library, so the function which does the check can be versioned, but I still don't know how exactly to do that. --=20 http://ache.vniz.net/ --gcgULEKfM5DA0KmArIBNK4CKHLRDAkFUq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJUN/ihAAoJEKUckv0MjfbKx7IH/R2MKGua//LOoca1QUOYk1mp cjQSOlXM2eI8l6/kWAaj3izUHpjvO5QeunmvDetyoWrSxOBB7HLPuGC22GyUl6JW FPINY8xNFcxe7nrS0MPaLrOc0jWC0dbANK+YEN0ilHtba5pTPLSHSDjEnljOGdJO lMkZkxhj2gNwTSnzoUiK+ApJCKJI2Rqb8pz37OzkylGLrmc4flKYjVOfBW6T1xpR pkGr5R1ZUsx0DBm+THhp4dy4FwhRvcv/6yosvF/kEU/OU/CR5FbR1nvNiJ8cSCLi BUzuR40ohuueGaEUjdamgcb0Y+5IkGU2XDaz5mH/Frqxp+8itCsEQlxkeWZaIss= =HU/b -----END PGP SIGNATURE----- --gcgULEKfM5DA0KmArIBNK4CKHLRDAkFUq-- From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 15:59:21 2014 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 E8966754 for ; Fri, 10 Oct 2014 15:59:20 +0000 (UTC) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 657AFC6C for ; Fri, 10 Oct 2014 15:59:20 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id 10so3375796lbg.0 for ; Fri, 10 Oct 2014 08:59:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=yFh6pPvGLeF16VvQghOMXHUBnAKX6wzrSS0gPI8GkjI=; b=W6p2RXAlFdUA/sF3nJD4iME+UrJmWUFrMBp704UE2MuQrvbTxCzgjRZQiGDHZhbDd7 aMDwMzkF+xaJXXlQ+305b9V5cGU7CgYAi3R++n9b2TX58ZUPfB+B5FlF9VsgNs+MQsYU kbq76UiTD6/38kwUaYl95DgqyxLGR72HyIkkXdAm4cCOe+oiLwzqFZ3qMGPvsmbF7lpw NMmyUtOg3DzzgPKPPtKQjUFaKP/cT5083KOAtnnZ1B/NlKa9cCWImu65TU8++wCqNVOL Y9BsI59uJ5xAq7TDmKBgJYxBPDPz3OqfWJ0xv+9uqBpqE/IFDxHnZPR//MbHI2lXxj3q +jCw== X-Gm-Message-State: ALoCoQmpx9uWakbdUf5NXZ1WaFfyrswYUghpqsYlhQrXuDZg2+9HMXgP8KS+OWsDSLdxLEDIQqAT X-Received: by 10.152.36.130 with SMTP id q2mr6090275laj.42.1412956758026; Fri, 10 Oct 2014 08:59:18 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id k3sm1931443lam.33.2014.10.10.08.59.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Oct 2014 08:59:16 -0700 (PDT) Message-ID: <54380254.3090702@freebsd.org> Date: Fri, 10 Oct 2014 19:59:16 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Hiroki Sato Subject: Re: svn commit: r270122 - in stable/10: . lib/libopie References: <201408180242.s7I2gNaq087095@svn.freebsd.org> <20141010144747.GH19486@ivaldir.etoilebsd.net> <5437F373.1090300@freebsd.org> <20141011.000201.1863876266089528066.hrs@allbsd.org> <5437F71E.1090701@freebsd.org> <5437F8A0.4080905@freebsd.org> In-Reply-To: <5437F8A0.4080905@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="C4bHrobAT0LTejDQChRd22UTOmDX8GPxO" Cc: svn-src-stable@freebsd.org, bapt@FreeBSD.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 10 Oct 2014 15:59:21 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --C4bHrobAT0LTejDQChRd22UTOmDX8GPxO Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable On 10.10.2014 19:17, Andrey Chernov wrote: > On 10.10.2014 19:11, Andrey Chernov wrote: >> On 10.10.2014 19:02, Hiroki Sato wrote: >>> ac> It is strange that nobody notice that so far. Is there any packag= es >>> ac> which builds with libopie? If no, there is no problem. If yes, wh= at you >>> >>> cyrus-sasl uses it. >>> >>> ac> suggest to fix, is that backing out? If yes, when exactly this ch= ange >>> ac> can be merged to -stable (because -stable always stays -stable, s= o from >>> ac> your sentence it means - never can be merged). >>> >>> Is it impossible to handle this by symbol versioning instead of shli= b >>> version bump? >> >> There is buffer size #define change (it was too small in unfixed >> version, so discards valid input), the buffer itself is in the userlan= d >> programs, not in the library. AFAIK symbol versioning is for functions= , >> not for such changes but I can be wrong, I know very little about symb= ol >> versioning procedure. >=20 > From other hand, the check for buffer size is in the library, so the > function which does the check can be versioned, but I still don't know > how exactly to do that. >=20 It does not help in general case. Such checks can be in the userland too. So, backing out buffer size change and major version bump for -stable, right? --=20 http://ache.vniz.net/ --C4bHrobAT0LTejDQChRd22UTOmDX8GPxO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJUOAJVAAoJEKUckv0MjfbK77gIAI7cGviTYNwTa4DbDRqk7Lnu kfKp2xbfzz8zSAkw16w0LsRbC0vGjN1CtOH6auy6D4C8gw0tgFRT50BVGbkzjNds Yx7Ir6McjJ3YOCE4Kl73ezoOALWYEyZh36rKvp3n7vTS4Ow6uuSlulyuNlGJz1mX htrrTpvR5aVPTMrWMirBHCcop4b3sdsUCNrYrFQyf5FrA7d0pqD8Fvq+7s7RipNC S9onp7nH/5prp/5F/NvQKfHH00FiPqlDzCFnH06E5hml4EF0sNPruyZENXJIijk2 kJt79UZxkm2+ddKDflyCrAGYiJNjq/N4h/YHed5bKjsSI4Dt2DrxwuUlPdFSizM= =es/J -----END PGP SIGNATURE----- --C4bHrobAT0LTejDQChRd22UTOmDX8GPxO-- From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 20:47:25 2014 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 103BCE51; Fri, 10 Oct 2014 20:47:25 +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 E68CFFE7; Fri, 10 Oct 2014 20:47: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 s9AKlOsr089817; Fri, 10 Oct 2014 20:47:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9AKlNFc089811; Fri, 10 Oct 2014 20:47:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201410102047.s9AKlNFc089811@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 10 Oct 2014 20:47: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: r272913 - in stable/10: sbin/sysctl sys/amd64/amd64 sys/amd64/include/pc sys/i386/i386 sys/i386/include/pc 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.18-1 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, 10 Oct 2014 20:47:25 -0000 Author: jhb Date: Fri Oct 10 20:47:23 2014 New Revision: 272913 URL: https://svnweb.freebsd.org/changeset/base/272913 Log: MFC 270828,271487,271495: Add sysctls to export the BIOS SMAP and EFI memory maps along with handlers in the sysctl(8) binary to format them. Modified: stable/10/sbin/sysctl/sysctl.c stable/10/sys/amd64/amd64/machdep.c stable/10/sys/amd64/include/pc/bios.h stable/10/sys/i386/i386/machdep.c stable/10/sys/i386/include/pc/bios.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/sysctl/sysctl.c ============================================================================== --- stable/10/sbin/sysctl/sysctl.c Fri Oct 10 20:37:06 2014 (r272912) +++ stable/10/sbin/sysctl/sysctl.c Fri Oct 10 20:47:23 2014 (r272913) @@ -48,6 +48,15 @@ static const char rcsid[] = #include #include +#ifdef __amd64__ +#include +#include +#endif + +#if defined(__amd64__) || defined(__i386__) +#include +#endif + #include #include #include @@ -454,12 +463,12 @@ parsefile(const char *filename) /* These functions will dump out various interesting structures. */ static int -S_clockinfo(int l2, void *p) +S_clockinfo(size_t l2, void *p) { struct clockinfo *ci = (struct clockinfo*)p; if (l2 != sizeof(*ci)) { - warnx("S_clockinfo %d != %zu", l2, sizeof(*ci)); + warnx("S_clockinfo %zu != %zu", l2, sizeof(*ci)); return (1); } printf(hflag ? "{ hz = %'d, tick = %'d, profhz = %'d, stathz = %'d }" : @@ -469,12 +478,12 @@ S_clockinfo(int l2, void *p) } static int -S_loadavg(int l2, void *p) +S_loadavg(size_t l2, void *p) { struct loadavg *tv = (struct loadavg*)p; if (l2 != sizeof(*tv)) { - warnx("S_loadavg %d != %zu", l2, sizeof(*tv)); + warnx("S_loadavg %zu != %zu", l2, sizeof(*tv)); return (1); } printf(hflag ? "{ %'.2f %'.2f %'.2f }" : "{ %.2f %.2f %.2f }", @@ -485,14 +494,14 @@ S_loadavg(int l2, void *p) } static int -S_timeval(int l2, void *p) +S_timeval(size_t l2, void *p) { struct timeval *tv = (struct timeval*)p; time_t tv_sec; char *p1, *p2; if (l2 != sizeof(*tv)) { - warnx("S_timeval %d != %zu", l2, sizeof(*tv)); + warnx("S_timeval %zu != %zu", l2, sizeof(*tv)); return (1); } printf(hflag ? "{ sec = %'jd, usec = %'ld } " : @@ -509,13 +518,13 @@ S_timeval(int l2, void *p) } static int -S_vmtotal(int l2, void *p) +S_vmtotal(size_t l2, void *p) { struct vmtotal *v = (struct vmtotal *)p; int pageKilo = getpagesize() / 1024; if (l2 != sizeof(*v)) { - warnx("S_vmtotal %d != %zu", l2, sizeof(*v)); + warnx("S_vmtotal %zu != %zu", l2, sizeof(*v)); return (1); } @@ -536,10 +545,116 @@ S_vmtotal(int l2, void *p) v->t_vmshr * pageKilo, v->t_avmshr * pageKilo); printf("Shared Real Memory:\t(Total: %dK Active: %dK)\n", v->t_rmshr * pageKilo, v->t_armshr * pageKilo); - printf("Free Memory:\t%dK\n", v->t_free * pageKilo); + printf("Free Memory:\t%dK", v->t_free * pageKilo); + + return (0); +} + +#ifdef __amd64__ +#define efi_next_descriptor(ptr, size) \ + ((struct efi_md *)(((uint8_t *) ptr) + size)) + +static int +S_efi_map(size_t l2, void *p) +{ + struct efi_map_header *efihdr; + struct efi_md *map; + const char *type; + size_t efisz; + int ndesc, i; + + static const char *types[] = { + "Reserved", + "LoaderCode", + "LoaderData", + "BootServicesCode", + "BootServicesData", + "RuntimeServicesCode", + "RuntimeServicesData", + "ConventionalMemory", + "UnusableMemory", + "ACPIReclaimMemory", + "ACPIMemoryNVS", + "MemoryMappedIO", + "MemoryMappedIOPortSpace", + "PalCode" + }; + + /* + * Memory map data provided by UEFI via the GetMemoryMap + * Boot Services API. + */ + if (l2 < sizeof(*efihdr)) { + warnx("S_efi_map length less than header"); + return (1); + } + efihdr = p; + efisz = (sizeof(struct efi_map_header) + 0xf) & ~0xf; + map = (struct efi_md *)((uint8_t *)efihdr + efisz); + + if (efihdr->descriptor_size == 0) + return (0); + if (l2 != efisz + efihdr->memory_size) { + warnx("S_efi_map length mismatch %zu vs %zu", l2, efisz + + efihdr->memory_size); + return (1); + } + ndesc = efihdr->memory_size / efihdr->descriptor_size; + + printf("\n%23s %12s %12s %8s %4s", + "Type", "Physical", "Virtual", "#Pages", "Attr"); + + for (i = 0; i < ndesc; i++, + map = efi_next_descriptor(map, efihdr->descriptor_size)) { + if (map->md_type <= EFI_MD_TYPE_PALCODE) + type = types[map->md_type]; + else + type = ""; + printf("\n%23s %012lx %12p %08lx ", type, map->md_phys, + map->md_virt, map->md_pages); + if (map->md_attr & EFI_MD_ATTR_UC) + printf("UC "); + if (map->md_attr & EFI_MD_ATTR_WC) + printf("WC "); + if (map->md_attr & EFI_MD_ATTR_WT) + printf("WT "); + if (map->md_attr & EFI_MD_ATTR_WB) + printf("WB "); + if (map->md_attr & EFI_MD_ATTR_UCE) + printf("UCE "); + if (map->md_attr & EFI_MD_ATTR_WP) + printf("WP "); + if (map->md_attr & EFI_MD_ATTR_RP) + printf("RP "); + if (map->md_attr & EFI_MD_ATTR_XP) + printf("XP "); + if (map->md_attr & EFI_MD_ATTR_RT) + printf("RUNTIME"); + } + return (0); +} +#endif + +#if defined(__amd64__) || defined(__i386__) +static int +S_bios_smap_xattr(size_t l2, void *p) +{ + struct bios_smap_xattr *smap, *end; + + if (l2 % sizeof(*smap) != 0) { + warnx("S_bios_smap_xattr %zu is not a multiple of %zu", l2, + sizeof(*smap)); + return (1); + } + end = (struct bios_smap_xattr *)((char *)p + l2); + for (smap = p; smap < end; smap++) + printf("\nSMAP type=%02x, xattr=%02x, base=%016jx, len=%016jx", + smap->type, smap->xattr, (uintmax_t)smap->base, + (uintmax_t)smap->length); return (0); } +#endif static int set_IK(const char *str, int *val) @@ -655,7 +770,7 @@ show_var(int *oid, int nlen) size_t intlen; size_t j, len; u_int kind; - int (*func)(int, void *); + int (*func)(size_t, void *); /* Silence GCC. */ umv = mv = intlen = 0; @@ -793,6 +908,14 @@ show_var(int *oid, int nlen) func = S_loadavg; else if (strcmp(fmt, "S,vmtotal") == 0) func = S_vmtotal; +#ifdef __amd64__ + else if (strcmp(fmt, "S,efi_map_header") == 0) + func = S_efi_map; +#endif +#if defined(__amd64__) || defined(__i386__) + else if (strcmp(fmt, "S,bios_smap_xattr") == 0) + func = S_bios_smap_xattr; +#endif else func = NULL; if (func) { Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Fri Oct 10 20:37:06 2014 (r272912) +++ stable/10/sys/amd64/amd64/machdep.c Fri Oct 10 20:47:23 2014 (r272913) @@ -2054,6 +2054,62 @@ cpu_pcpu_init(struct pcpu *pcpu, int cpu pcpu->pc_acpi_id = 0xffffffff; } +static int +smap_sysctl_handler(SYSCTL_HANDLER_ARGS) +{ + struct bios_smap *smapbase; + struct bios_smap_xattr smap; + caddr_t kmdp; + uint32_t *smapattr; + int count, error, i; + + /* Retrieve the system memory map from the loader. */ + kmdp = preload_search_by_type("elf kernel"); + if (kmdp == NULL) + kmdp = preload_search_by_type("elf64 kernel"); + smapbase = (struct bios_smap *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_SMAP); + if (smapbase == NULL) + return (0); + smapattr = (uint32_t *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_SMAP_XATTR); + count = *((uint32_t *)smapbase - 1) / sizeof(*smapbase); + error = 0; + for (i = 0; i < count; i++) { + smap.base = smapbase[i].base; + smap.length = smapbase[i].length; + smap.type = smapbase[i].type; + if (smapattr != NULL) + smap.xattr = smapattr[i]; + else + smap.xattr = 0; + error = SYSCTL_OUT(req, &smap, sizeof(smap)); + } + return (error); +} +SYSCTL_PROC(_machdep, OID_AUTO, smap, CTLTYPE_OPAQUE|CTLFLAG_RD, NULL, 0, + smap_sysctl_handler, "S,bios_smap_xattr", "Raw BIOS SMAP data"); + +static int +efi_map_sysctl_handler(SYSCTL_HANDLER_ARGS) +{ + struct efi_map_header *efihdr; + caddr_t kmdp; + uint32_t efisize; + + kmdp = preload_search_by_type("elf kernel"); + if (kmdp == NULL) + kmdp = preload_search_by_type("elf64 kernel"); + efihdr = (struct efi_map_header *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_EFI_MAP); + if (efihdr == NULL) + return (0); + efisize = *((uint32_t *)efihdr - 1); + return (SYSCTL_OUT(req, efihdr, efisize)); +} +SYSCTL_PROC(_machdep, OID_AUTO, efi_map, CTLTYPE_OPAQUE|CTLFLAG_RD, NULL, 0, + efi_map_sysctl_handler, "S,efi_map_header", "Raw EFI Memory Map"); + void spinlock_enter(void) { Modified: stable/10/sys/amd64/include/pc/bios.h ============================================================================== --- stable/10/sys/amd64/include/pc/bios.h Fri Oct 10 20:37:06 2014 (r272912) +++ stable/10/sys/amd64/include/pc/bios.h Fri Oct 10 20:47:23 2014 (r272913) @@ -51,6 +51,14 @@ struct bios_smap { u_int32_t type; } __packed; +/* Structure extended to include extended attribute field in ACPI 3.0. */ +struct bios_smap_xattr { + u_int64_t base; + u_int64_t length; + u_int32_t type; + u_int32_t xattr; +} __packed; + /* * System Management BIOS */ Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Fri Oct 10 20:37:06 2014 (r272912) +++ stable/10/sys/i386/i386/machdep.c Fri Oct 10 20:47:23 2014 (r272913) @@ -3104,6 +3104,42 @@ cpu_pcpu_init(struct pcpu *pcpu, int cpu pcpu->pc_acpi_id = 0xffffffff; } +static int +smap_sysctl_handler(SYSCTL_HANDLER_ARGS) +{ + struct bios_smap *smapbase; + struct bios_smap_xattr smap; + caddr_t kmdp; + uint32_t *smapattr; + int count, error, i; + + /* Retrieve the system memory map from the loader. */ + kmdp = preload_search_by_type("elf kernel"); + if (kmdp == NULL) + kmdp = preload_search_by_type("elf32 kernel"); + smapbase = (struct bios_smap *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_SMAP); + if (smapbase == NULL) + return (0); + smapattr = (uint32_t *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_SMAP_XATTR); + count = *((u_int32_t *)smapbase - 1) / sizeof(*smapbase); + error = 0; + for (i = 0; i < count; i++) { + smap.base = smapbase[i].base; + smap.length = smapbase[i].length; + smap.type = smapbase[i].type; + if (smapattr != NULL) + smap.xattr = smapattr[i]; + else + smap.xattr = 0; + error = SYSCTL_OUT(req, &smap, sizeof(smap)); + } + return (error); +} +SYSCTL_PROC(_machdep, OID_AUTO, smap, CTLTYPE_OPAQUE|CTLFLAG_RD, NULL, 0, + smap_sysctl_handler, "S,bios_smap_xattr", "Raw BIOS SMAP data"); + void spinlock_enter(void) { Modified: stable/10/sys/i386/include/pc/bios.h ============================================================================== --- stable/10/sys/i386/include/pc/bios.h Fri Oct 10 20:37:06 2014 (r272912) +++ stable/10/sys/i386/include/pc/bios.h Fri Oct 10 20:47:23 2014 (r272913) @@ -221,6 +221,14 @@ struct bios_smap { u_int32_t type; } __packed; +/* Structure extended to include extended attribute field in ACPI 3.0. */ +struct bios_smap_xattr { + u_int64_t base; + u_int64_t length; + u_int32_t type; + u_int32_t xattr; +} __packed; + /* * System Management BIOS */ From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 23:18:46 2014 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 7209A61B; Fri, 10 Oct 2014 23:18: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 438DC6F; Fri, 10 Oct 2014 23:18: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 s9ANIk9I063163; Fri, 10 Oct 2014 23:18:46 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9ANIjps063160; Fri, 10 Oct 2014 23:18:45 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410102318.s9ANIjps063160@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 10 Oct 2014 23: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: r272918 - stable/10/contrib/one-true-awk 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.18-1 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, 10 Oct 2014 23:18:46 -0000 Author: pfg Date: Fri Oct 10 23:18:44 2014 New Revision: 272918 URL: https://svnweb.freebsd.org/changeset/base/272918 Log: MFC r271879: awk: Use random(3) instead of rand(3) While none of them is considered even near to cryptographic level, random(3) is a better random generator than rand(3). Use random(3) for awk as is done in other systems. PR: 193147 Modified: stable/10/contrib/one-true-awk/awk.1 stable/10/contrib/one-true-awk/main.c stable/10/contrib/one-true-awk/run.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/one-true-awk/awk.1 ============================================================================== --- stable/10/contrib/one-true-awk/awk.1 Fri Oct 10 22:18:09 2014 (r272917) +++ stable/10/contrib/one-true-awk/awk.1 Fri Oct 10 23:18:44 2014 (r272918) @@ -208,7 +208,7 @@ or of if no argument. .TP .B rand -random number on (0,1) +random number on [0,1) .TP .B srand sets seed for Modified: stable/10/contrib/one-true-awk/main.c ============================================================================== --- stable/10/contrib/one-true-awk/main.c Fri Oct 10 22:18:09 2014 (r272917) +++ stable/10/contrib/one-true-awk/main.c Fri Oct 10 23:18:44 2014 (r272918) @@ -74,7 +74,7 @@ int main(int argc, char *argv[]) signal(SIGFPE, fpecatch); srand_seed = 1; - srand(srand_seed); + srandom((unsigned long) srand_seed); yyin = NULL; symtab = makesymtab(NSYMTAB/NSYMTAB); Modified: stable/10/contrib/one-true-awk/run.c ============================================================================== --- stable/10/contrib/one-true-awk/run.c Fri Oct 10 22:18:09 2014 (r272917) +++ stable/10/contrib/one-true-awk/run.c Fri Oct 10 23:18:44 2014 (r272918) @@ -1521,8 +1521,10 @@ Cell *bltin(Node **a, int n) /* builtin u = (Awkfloat) system(getsval(x)) / 256; /* 256 is unix-dep */ break; case FRAND: - /* in principle, rand() returns something in 0..RAND_MAX */ - u = (Awkfloat) (rand() % RAND_MAX) / RAND_MAX; + /* random() returns numbers in [0..2^31-1] + * in order to get a number in [0, 1), divide it by 2^31 + */ + u = (Awkfloat) random() / (0x7fffffffL + 0x1UL); break; case FSRAND: if (isrec(x)) /* no argument provided */ @@ -1530,7 +1532,7 @@ Cell *bltin(Node **a, int n) /* builtin else u = getfval(x); tmp = u; - srand((unsigned int) u); + srandom((unsigned long) u); u = srand_seed; srand_seed = tmp; break; From owner-svn-src-stable@FreeBSD.ORG Fri Oct 10 23:19:35 2014 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 C000E75C; Fri, 10 Oct 2014 23:19: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 91BB27D; Fri, 10 Oct 2014 23:19: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 s9ANJZ5E063340; Fri, 10 Oct 2014 23:19:35 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9ANJYqt063337; Fri, 10 Oct 2014 23:19:34 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201410102319.s9ANJYqt063337@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 10 Oct 2014 23:19:34 +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: r272919 - stable/9/contrib/one-true-awk 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.18-1 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, 10 Oct 2014 23:19:35 -0000 Author: pfg Date: Fri Oct 10 23:19:34 2014 New Revision: 272919 URL: https://svnweb.freebsd.org/changeset/base/272919 Log: MFC r271879: awk: Use random(3) instead of rand(3) While none of them is considered even near to cryptographic level, random(3) is a better random generator than rand(3). Use random(3) for awk as is done in other systems. PR: 193147 Modified: stable/9/contrib/one-true-awk/awk.1 stable/9/contrib/one-true-awk/main.c stable/9/contrib/one-true-awk/run.c Directory Properties: stable/9/contrib/one-true-awk/ (props changed) Modified: stable/9/contrib/one-true-awk/awk.1 ============================================================================== --- stable/9/contrib/one-true-awk/awk.1 Fri Oct 10 23:18:44 2014 (r272918) +++ stable/9/contrib/one-true-awk/awk.1 Fri Oct 10 23:19:34 2014 (r272919) @@ -208,7 +208,7 @@ or of if no argument. .TP .B rand -random number on (0,1) +random number on [0,1) .TP .B srand sets seed for Modified: stable/9/contrib/one-true-awk/main.c ============================================================================== --- stable/9/contrib/one-true-awk/main.c Fri Oct 10 23:18:44 2014 (r272918) +++ stable/9/contrib/one-true-awk/main.c Fri Oct 10 23:19:34 2014 (r272919) @@ -74,7 +74,7 @@ int main(int argc, char *argv[]) signal(SIGFPE, fpecatch); srand_seed = 1; - srand(srand_seed); + srandom((unsigned long) srand_seed); yyin = NULL; symtab = makesymtab(NSYMTAB/NSYMTAB); Modified: stable/9/contrib/one-true-awk/run.c ============================================================================== --- stable/9/contrib/one-true-awk/run.c Fri Oct 10 23:18:44 2014 (r272918) +++ stable/9/contrib/one-true-awk/run.c Fri Oct 10 23:19:34 2014 (r272919) @@ -1521,8 +1521,10 @@ Cell *bltin(Node **a, int n) /* builtin u = (Awkfloat) system(getsval(x)) / 256; /* 256 is unix-dep */ break; case FRAND: - /* in principle, rand() returns something in 0..RAND_MAX */ - u = (Awkfloat) (rand() % RAND_MAX) / RAND_MAX; + /* random() returns numbers in [0..2^31-1] + * in order to get a number in [0, 1), divide it by 2^31 + */ + u = (Awkfloat) random() / (0x7fffffffL + 0x1UL); break; case FSRAND: if (isrec(x)) /* no argument provided */ @@ -1530,7 +1532,7 @@ Cell *bltin(Node **a, int n) /* builtin else u = getfval(x); tmp = u; - srand((unsigned int) u); + srandom((unsigned long) u); u = srand_seed; srand_seed = tmp; break; From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 00:30:58 2014 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 434798F8; Sat, 11 Oct 2014 00: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 2EA58921; Sat, 11 Oct 2014 00: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 s9B0UwLk001757; Sat, 11 Oct 2014 00:30:58 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9B0Uwb8001756; Sat, 11 Oct 2014 00:30:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201410110030.s9B0Uwb8001756@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 11 Oct 2014 00: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: r272922 - stable/10/usr.bin/find 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.18-1 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, 11 Oct 2014 00:30:58 -0000 Author: emaste Date: Sat Oct 11 00:30:57 2014 New Revision: 272922 URL: https://svnweb.freebsd.org/changeset/base/272922 Log: MFC r272762: Correct scale factor for T terabyte suffix PR: 194250 Modified: stable/10/usr.bin/find/function.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/find/function.c ============================================================================== --- stable/10/usr.bin/find/function.c Fri Oct 10 23:52:56 2014 (r272921) +++ stable/10/usr.bin/find/function.c Sat Oct 11 00:30:57 2014 (r272922) @@ -1500,7 +1500,7 @@ c_size(OPTION *option, char ***argvp) scale = 0x40000000LL; break; case 'T': /* terabytes 1<<40 */ - scale = 0x1000000000LL; + scale = 0x10000000000LL; break; case 'P': /* petabytes 1<<50 */ scale = 0x4000000000000LL; From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 01:00:38 2014 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 0EC06CAD; Sat, 11 Oct 2014 01:00: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 EEB9CBA8; Sat, 11 Oct 2014 01:00: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 s9B10bVv016429; Sat, 11 Oct 2014 01:00:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9B10bf2016428; Sat, 11 Oct 2014 01:00:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201410110100.s9B10bf2016428@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 11 Oct 2014 01:00: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: r272923 - stable/9/usr.bin/find 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.18-1 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, 11 Oct 2014 01:00:38 -0000 Author: emaste Date: Sat Oct 11 01:00:37 2014 New Revision: 272923 URL: https://svnweb.freebsd.org/changeset/base/272923 Log: MFC r272762: Correct scale factor for T terabyte suffix PR: 194250 Modified: stable/9/usr.bin/find/function.c Directory Properties: stable/9/usr.bin/find/ (props changed) Modified: stable/9/usr.bin/find/function.c ============================================================================== --- stable/9/usr.bin/find/function.c Sat Oct 11 00:30:57 2014 (r272922) +++ stable/9/usr.bin/find/function.c Sat Oct 11 01:00:37 2014 (r272923) @@ -1479,7 +1479,7 @@ c_size(OPTION *option, char ***argvp) scale = 0x40000000LL; break; case 'T': /* terabytes 1<<40 */ - scale = 0x1000000000LL; + scale = 0x10000000000LL; break; case 'P': /* petabytes 1<<50 */ scale = 0x4000000000000LL; From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 01:01:19 2014 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 562B1ED5; Sat, 11 Oct 2014 01:01: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 41B95BC5; Sat, 11 Oct 2014 01:01: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 s9B11JWu017246; Sat, 11 Oct 2014 01:01:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9B11JIu017245; Sat, 11 Oct 2014 01:01:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201410110101.s9B11JIu017245@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 11 Oct 2014 01:01:19 +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: r272924 - stable/8/usr.bin/find 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.18-1 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, 11 Oct 2014 01:01:19 -0000 Author: emaste Date: Sat Oct 11 01:01:18 2014 New Revision: 272924 URL: https://svnweb.freebsd.org/changeset/base/272924 Log: MFC r272762: Correct scale factor for T terabyte suffix PR: 194250 Modified: stable/8/usr.bin/find/function.c Directory Properties: stable/8/usr.bin/find/ (props changed) Modified: stable/8/usr.bin/find/function.c ============================================================================== --- stable/8/usr.bin/find/function.c Sat Oct 11 01:00:37 2014 (r272923) +++ stable/8/usr.bin/find/function.c Sat Oct 11 01:01:18 2014 (r272924) @@ -1443,7 +1443,7 @@ c_size(OPTION *option, char ***argvp) scale = 0x40000000LL; break; case 'T': /* terabytes 1<<40 */ - scale = 0x1000000000LL; + scale = 0x10000000000LL; break; case 'P': /* petabytes 1<<50 */ scale = 0x4000000000000LL; From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 06:04:45 2014 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 761055B0; Sat, 11 Oct 2014 06:04: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 61E3CAF9; Sat, 11 Oct 2014 06:04: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 s9B64jU2059533; Sat, 11 Oct 2014 06:04:45 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9B64j1q059532; Sat, 11 Oct 2014 06:04:45 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201410110604.s9B64j1q059532@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 11 Oct 2014 06:04: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: r272933 - stable/10/sys/boot/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 11 Oct 2014 06:04:45 -0000 Author: ae Date: Sat Oct 11 06:04:44 2014 New Revision: 272933 URL: https://svnweb.freebsd.org/changeset/base/272933 Log: MFC r272487: Add UUID of FreeBSD slice to GPT scheme. Modified: stable/10/sys/boot/common/part.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/common/part.c ============================================================================== --- stable/10/sys/boot/common/part.c Sat Oct 11 05:18:22 2014 (r272932) +++ stable/10/sys/boot/common/part.c Sat Oct 11 06:04:44 2014 (r272933) @@ -53,6 +53,7 @@ static const uuid_t gpt_uuid_unused = GP static const uuid_t gpt_uuid_ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA; static const uuid_t gpt_uuid_freebsd_ufs = GPT_ENT_TYPE_FREEBSD_UFS; static const uuid_t gpt_uuid_efi = GPT_ENT_TYPE_EFI; +static const uuid_t gpt_uuid_freebsd = GPT_ENT_TYPE_FREEBSD; static const uuid_t gpt_uuid_freebsd_boot = GPT_ENT_TYPE_FREEBSD_BOOT; static const uuid_t gpt_uuid_freebsd_nandfs = GPT_ENT_TYPE_FREEBSD_NANDFS; static const uuid_t gpt_uuid_freebsd_swap = GPT_ENT_TYPE_FREEBSD_SWAP; @@ -139,6 +140,8 @@ gpt_parttype(uuid_t type) return (PART_FREEBSD_VINUM); else if (uuid_equal(&type, &gpt_uuid_freebsd_nandfs, NULL)) return (PART_FREEBSD_NANDFS); + else if (uuid_equal(&type, &gpt_uuid_freebsd, NULL)) + return (PART_FREEBSD); return (PART_UNKNOWN); } From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 06:22:58 2014 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 01CEC90F; Sat, 11 Oct 2014 06:22: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 E2066C78; Sat, 11 Oct 2014 06:22: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 s9B6Mvgh068800; Sat, 11 Oct 2014 06:22:57 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9B6Mv8Z068799; Sat, 11 Oct 2014 06:22:57 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201410110622.s9B6Mv8Z068799@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 11 Oct 2014 06:22:57 +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: r272934 - stable/9/sys/boot/common 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.18-1 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, 11 Oct 2014 06:22:58 -0000 Author: ae Date: Sat Oct 11 06:22:57 2014 New Revision: 272934 URL: https://svnweb.freebsd.org/changeset/base/272934 Log: MFC r272487: Add UUID of FreeBSD slice to GPT scheme. Modified: stable/9/sys/boot/common/part.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/common/part.c ============================================================================== --- stable/9/sys/boot/common/part.c Sat Oct 11 06:04:44 2014 (r272933) +++ stable/9/sys/boot/common/part.c Sat Oct 11 06:22:57 2014 (r272934) @@ -53,6 +53,7 @@ static const uuid_t gpt_uuid_unused = GP static const uuid_t gpt_uuid_ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA; static const uuid_t gpt_uuid_freebsd_ufs = GPT_ENT_TYPE_FREEBSD_UFS; static const uuid_t gpt_uuid_efi = GPT_ENT_TYPE_EFI; +static const uuid_t gpt_uuid_freebsd = GPT_ENT_TYPE_FREEBSD; static const uuid_t gpt_uuid_freebsd_boot = GPT_ENT_TYPE_FREEBSD_BOOT; static const uuid_t gpt_uuid_freebsd_nandfs = GPT_ENT_TYPE_FREEBSD_NANDFS; static const uuid_t gpt_uuid_freebsd_swap = GPT_ENT_TYPE_FREEBSD_SWAP; @@ -139,6 +140,8 @@ gpt_parttype(uuid_t type) return (PART_FREEBSD_VINUM); else if (uuid_equal(&type, &gpt_uuid_freebsd_nandfs, NULL)) return (PART_FREEBSD_NANDFS); + else if (uuid_equal(&type, &gpt_uuid_freebsd, NULL)) + return (PART_FREEBSD); return (PART_UNKNOWN); } From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 06:43:14 2014 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 82604C26; Sat, 11 Oct 2014 06:43:14 +0000 (UTC) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A1BBDF9; Sat, 11 Oct 2014 06:43:13 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id hi2so3771875wib.8 for ; Fri, 10 Oct 2014 23:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=hSll+idKbYCypT7u0y0yMKPzJGKp77ToLN7pPxsXU54=; b=pRADBYOoZ3y++OqWVUkFfw33oJSrNcbPvATWvYzliOI3F/OWVQwpx/EXCP54s3BXa2 pV/ct9+wbID6APa9e97hXgmw8D/WOwM5KlulkZDdraykhPv9YFKM+JAx8E5HLOi4c/2F 5sM69fIkyH/R1zzXx5qlvps/H/Iy529XnxDaNBuDZf6paywExYVmYpVBTHZYlaWqT/gV VeURadUtoVF4b5P7wDkuzfxyYobvGz8VT9HxgLnb01HyXAtwwEsd8Ehxb10wYCNQm2QV A1mC6QPSln/0Io44IKnl+leCNuvtN0yupFgajv7/M0fjsH/kXBpnE85vy/y/okCbhn3t oVzg== X-Received: by 10.181.13.132 with SMTP id ey4mr8680313wid.33.1413009791603; Fri, 10 Oct 2014 23:43:11 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id wx3sm9193093wjc.19.2014.10.10.23.43.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Oct 2014 23:43:10 -0700 (PDT) Sender: Baptiste Daroussin Date: Sat, 11 Oct 2014 08:43:08 +0200 From: Baptiste Daroussin To: "Pedro F. Giffuni" Subject: Re: svn commit: r272918 - stable/10/contrib/one-true-awk Message-ID: <20141011064308.GN19486@ivaldir.etoilebsd.net> References: <201410102318.s9ANIjps063160@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aIbcA3MSwnGacr4f" Content-Disposition: inline In-Reply-To: <201410102318.s9ANIjps063160@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 11 Oct 2014 06:43:14 -0000 --aIbcA3MSwnGacr4f Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 10, 2014 at 11:18:45PM +0000, Pedro F. Giffuni wrote: > Author: pfg > Date: Fri Oct 10 23:18:44 2014 > New Revision: 272918 > URL: https://svnweb.freebsd.org/changeset/base/272918 >=20 > Log: > MFC r271879: > awk: Use random(3) instead of rand(3) > =20 > While none of them is considered even near to cryptographic > level, random(3) is a better random generator than rand(3). > =20 > Use random(3) for awk as is done in other systems. > =20 > PR: 193147 >=20 > Modified: > stable/10/contrib/one-true-awk/awk.1 > stable/10/contrib/one-true-awk/main.c > stable/10/contrib/one-true-awk/run.c > Directory Properties: > stable/10/ (props changed) >=20 > Modified: stable/10/contrib/one-true-awk/awk.1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- stable/10/contrib/one-true-awk/awk.1 Fri Oct 10 22:18:09 2014 (r27291= 7) > +++ stable/10/contrib/one-true-awk/awk.1 Fri Oct 10 23:18:44 2014 (r27291= 8) > @@ -208,7 +208,7 @@ or of > if no argument. > .TP > .B rand > -random number on (0,1) > +random number on [0,1) --------------------^ The above looks like a typo Bapt --aIbcA3MSwnGacr4f Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlQ40XwACgkQ8kTtMUmk6EzU0ACeM7jn8aMjuAHkfyZxn0p29m43 wH0An0Ee6w/zLDl8+53W+QChaJ0N9szl =VpaP -----END PGP SIGNATURE----- --aIbcA3MSwnGacr4f-- From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 10:09:00 2014 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 F104DF72; Sat, 11 Oct 2014 10:08:59 +0000 (UTC) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FF1B19E; Sat, 11 Oct 2014 10:08:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id s9BA8uQa018380; Sat, 11 Oct 2014 14:08:56 +0400 (MSK) (envelope-from marck@rinet.ru) Date: Sat, 11 Oct 2014 14:08:56 +0400 (MSK) From: Dmitry Morozovsky To: Baptiste Daroussin Subject: Re: svn commit: r272918 - stable/10/contrib/one-true-awk In-Reply-To: <20141011064308.GN19486@ivaldir.etoilebsd.net> Message-ID: References: <201410102318.s9ANIjps063160@svn.freebsd.org> <20141011064308.GN19486@ivaldir.etoilebsd.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Sat, 11 Oct 2014 14:08:56 +0400 (MSK) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, "Pedro F. Giffuni" , src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 11 Oct 2014 10:09:00 -0000 On Sat, 11 Oct 2014, Baptiste Daroussin wrote: > > --- stable/10/contrib/one-true-awk/awk.1 Fri Oct 10 22:18:09 2014 (r272917) > > +++ stable/10/contrib/one-true-awk/awk.1 Fri Oct 10 23:18:44 2014 (r272918) > > @@ -208,7 +208,7 @@ or of > > if no argument. > > .TP > > .B rand > > -random number on (0,1) > > +random number on [0,1) > --------------------^ > > The above looks like a typo Doesn't really: random number *could* be zero, hence inclusive (square) bracket. (on the other side, it could never be exactly 1, hence exclusive, round bracket at the right side). And, yes, unbalanced brackets on those math are disturbing ;-P -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 15:09:15 2014 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 9CBAB931 for ; Sat, 11 Oct 2014 15:09:15 +0000 (UTC) Received: from nm16.bullet.mail.bf1.yahoo.com (nm16.bullet.mail.bf1.yahoo.com [98.139.212.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FAF7191 for ; Sat, 11 Oct 2014 15:09:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1413040147; bh=p4GecpV88v/n0YnO8q9Qoy/DOL6fcfixn5V6NsehtqU=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=OmXEaGfrspbD1PoYaVkZWQh4W0435i+2Kb1tRnIRxCQHU6/OrmHK6sGSFTBtHAvpOyvtG68D7yc/2b9sDEuD7cehj5Q+/OlfCkC26OxBYjwDKWwPGvSvZMvUsQVvup2kOc9kDVilwLB6WC6QUtsiU6JdpZFV3IT3shi2SH8mdABXRt+GqlMbzNMRYIs3JrbTADfYV3GMOPUlYzJGS3AVBT1risZPxFpZcg0mgcJKzChFF2e/gUCBPE1qrbkhtMrasbPXcW0Sxae5r1Ivm9bhzCIbjxJrKzmonxLw23VuUk9iHDLSssGNH+0G7ANmdF3qJCBZi+OCC9cfVwt2GacGHw== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=ifvYhZCwzj9PlM9/wj8pc0/Qzdve9Pu1wG95me0ev268q8yQUPdmcZ6RpVSp1xqky6ZkImAkpNolfQgTG3F1p3EKpLxXPp/JpRHP+AVwsva8Chwj+0gRNEjV+tvRNCDuFG2z0Ei6Zifi2ivTavo+k9+23TKYzyjWWrCXe54mvKncMA53eNAyxyBUgHapj+nXJTdd5E83a2EFLXnTD/tdEgMhMqDWIlSWGr82x6MB5JBdV7Ls2ZcLFWbBiouhxOrfO5xyapRGIxKQ902j7ZjUVHT6zPWsfRnWnGW0VlNhyZ+sStiq4opUkuH25CcWhW0D5PrseW6Bo+ImLhDBKRV2Cw==; Received: from [66.196.81.173] by nm16.bullet.mail.bf1.yahoo.com with NNFMP; 11 Oct 2014 15:09:07 -0000 Received: from [98.139.211.194] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 11 Oct 2014 15:09:07 -0000 Received: from [127.0.0.1] by smtp203.mail.bf1.yahoo.com with NNFMP; 11 Oct 2014 15:09:07 -0000 X-Yahoo-Newman-Id: 485569.98291.bm@smtp203.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: YkuwR30VM1k9ZmAx4Bg2kE1B8D4Q5OTTda2aPtxHMDJm7RK 2gjiOzvT3IVrjZ9ISBAjJY8hzJ8yU4rf30G21XqQgaxYOqpmIyXrn0Q7c8O_ DHzxd_QLARmf2D93CnYz.0_.poexoNgnX5WSBMQmpDhG0Sw8b69gqVzLx_Uh eekgL4YVm5FM8FAwCeEysXT9Xb.bMFLNZSlBlWUMCMG4rmZwXd.oXP8FdJz9 4BiXVijeqqQTPAYbb_SpD_TxEpud7RCH3mvJnCpf76NxmEyVMXdKThwnPErt AVUwK1kt4D10VPfyxkyZQ0LTef0V0Tea8xaE3EqHPZSfOtkMtMCyZTkjHvgg GpekwfLWzV438_CQVT5pVEZLQc0mDkzlFzxiAilpsFynjjSicpecQ_qhoNZ. DQiiySoa_yyhaDA6WcGBiy0hh0GN2ITY1jrZ7A3kp5uMNTZlVgtGu1qI3LLc lkxFF_HhB79UqPqJut0h0sU080yD3nfqB0QWaynj1PYjE8ySVer30yYJ.iDJ 6ajBPD6hqS43zMPzTohBjFnKm5YByv88_jA-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54394819.7050901@freebsd.org> Date: Sat, 11 Oct 2014 10:09:13 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Dmitry Morozovsky , Baptiste Daroussin Subject: Re: svn commit: r272918 - stable/10/contrib/one-true-awk References: <201410102318.s9ANIjps063160@svn.freebsd.org> <20141011064308.GN19486@ivaldir.etoilebsd.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 11 Oct 2014 15:09:15 -0000 On 10/11/14 05:08, Dmitry Morozovsky wrote: > On Sat, 11 Oct 2014, Baptiste Daroussin wrote: > >>> --- stable/10/contrib/one-true-awk/awk.1 Fri Oct 10 22:18:09 2014 (r272917) >>> +++ stable/10/contrib/one-true-awk/awk.1 Fri Oct 10 23:18:44 2014 (r272918) >>> @@ -208,7 +208,7 @@ or of >>> if no argument. >>> .TP >>> .B rand >>> -random number on (0,1) >>> +random number on [0,1) >> --------------------^ >> >> The above looks like a typo > Doesn't really: random number *could* be zero, hence inclusive (square) > bracket. (on the other side, it could never be exactly 1, hence > exclusive, round bracket at the right side). > > And, yes, unbalanced brackets on those math are disturbing ;-P > > Yes, as marck@ has noted, it's regular math set notation, which OTOH, is probably not very common in man pages. Pedro. From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 16:16:06 2014 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 9D3C3ABF; Sat, 11 Oct 2014 16:16: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 894709CC; Sat, 11 Oct 2014 16:16: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 s9BGG6JH048821; Sat, 11 Oct 2014 16:16:06 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BGG6vS048820; Sat, 11 Oct 2014 16:16:06 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201410111616.s9BGG6vS048820@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 11 Oct 2014 16:16: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: r272942 - stable/10/sys/conf 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.18-1 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, 11 Oct 2014 16:16:06 -0000 Author: gjb Date: Sat Oct 11 16:16:05 2014 New Revision: 272942 URL: https://svnweb.freebsd.org/changeset/base/272942 Log: Switch stable/10 back to -PRERELEASE now that releng/10.1 is branched. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Sat Oct 11 16:08:54 2014 (r272941) +++ stable/10/sys/conf/newvers.sh Sat Oct 11 16:16:05 2014 (r272942) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.1" -BRANCH="RC1" +BRANCH="PRERELEASE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 17:49:53 2014 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 7481912B; Sat, 11 Oct 2014 17:49: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 6020822B; Sat, 11 Oct 2014 17:49: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 s9BHnrqO091905; Sat, 11 Oct 2014 17:49:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BHnqag091898; Sat, 11 Oct 2014 17:49:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410111749.s9BHnqag091898@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 11 Oct 2014 17:49: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: r272946 - in stable/10/sys: conf kern sys vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 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, 11 Oct 2014 17:49:53 -0000 Author: kib Date: Sat Oct 11 17:49:51 2014 New Revision: 272946 URL: https://svnweb.freebsd.org/changeset/base/272946 Log: MFC r272536: Add kernel option KSTACK_USAGE_PROF. Modified: stable/10/sys/conf/NOTES stable/10/sys/conf/options stable/10/sys/kern/kern_intr.c stable/10/sys/sys/systm.h stable/10/sys/vm/vm_glue.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Sat Oct 11 17:16:18 2014 (r272945) +++ stable/10/sys/conf/NOTES Sat Oct 11 17:49:51 2014 (r272946) @@ -2950,6 +2950,7 @@ options SC_RENDER_DEBUG # syscons rende options VFS_BIO_DEBUG # VFS buffer I/O debugging options KSTACK_MAX_PAGES=32 # Maximum pages to give the kernel stack +options KSTACK_USAGE_PROF # Adaptec Array Controller driver options options AAC_DEBUG # Debugging levels: Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Sat Oct 11 17:16:18 2014 (r272945) +++ stable/10/sys/conf/options Sat Oct 11 17:49:51 2014 (r272946) @@ -132,6 +132,7 @@ GEOM_ZERO opt_geom.h KDTRACE_HOOKS opt_kdtrace.h KSTACK_MAX_PAGES KSTACK_PAGES +KSTACK_USAGE_PROF KTRACE KTRACE_REQUEST_POOL opt_ktrace.h LIBICONV Modified: stable/10/sys/kern/kern_intr.c ============================================================================== --- stable/10/sys/kern/kern_intr.c Sat Oct 11 17:16:18 2014 (r272945) +++ stable/10/sys/kern/kern_intr.c Sat Oct 11 17:49:51 2014 (r272946) @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" +#include "opt_kstack_usage_prof.h" #include #include @@ -1407,6 +1408,10 @@ intr_event_handle(struct intr_event *ie, td = curthread; +#ifdef KSTACK_USAGE_PROF + intr_prof_stack_use(td, frame); +#endif + /* An interrupt with no event or handlers is a stray interrupt. */ if (ie == NULL || TAILQ_EMPTY(&ie->ie_handlers)) return (EINVAL); Modified: stable/10/sys/sys/systm.h ============================================================================== --- stable/10/sys/sys/systm.h Sat Oct 11 17:16:18 2014 (r272945) +++ stable/10/sys/sys/systm.h Sat Oct 11 17:49:51 2014 (r272946) @@ -443,4 +443,6 @@ bitcount16(uint32_t x) return (x); } +void intr_prof_stack_use(struct thread *td, struct trapframe *frame); + #endif /* !_SYS_SYSTM_H_ */ Modified: stable/10/sys/vm/vm_glue.c ============================================================================== --- stable/10/sys/vm/vm_glue.c Sat Oct 11 17:16:18 2014 (r272945) +++ stable/10/sys/vm/vm_glue.c Sat Oct 11 17:49:51 2014 (r272946) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include "opt_vm.h" #include "opt_kstack_pages.h" #include "opt_kstack_max_pages.h" +#include "opt_kstack_usage_prof.h" #include #include @@ -98,6 +99,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #ifndef NO_SWAPPING static int swapout(struct proc *); static void swapclear(struct proc *); @@ -486,6 +489,52 @@ kstack_cache_init(void *nulll) SYSINIT(vm_kstacks, SI_SUB_KTHREAD_INIT, SI_ORDER_ANY, kstack_cache_init, NULL); +#ifdef KSTACK_USAGE_PROF +/* + * Track maximum stack used by a thread in kernel. + */ +static int max_kstack_used; + +SYSCTL_INT(_debug, OID_AUTO, max_kstack_used, CTLFLAG_RD, + &max_kstack_used, 0, + "Maxiumum stack depth used by a thread in kernel"); + +void +intr_prof_stack_use(struct thread *td, struct trapframe *frame) +{ + vm_offset_t stack_top; + vm_offset_t current; + int used, prev_used; + + /* + * Testing for interrupted kernel mode isn't strictly + * needed. It optimizes the execution, since interrupts from + * usermode will have only the trap frame on the stack. + */ + if (TRAPF_USERMODE(frame)) + return; + + stack_top = td->td_kstack + td->td_kstack_pages * PAGE_SIZE; + current = (vm_offset_t)(uintptr_t)&stack_top; + + /* + * Try to detect if interrupt is using kernel thread stack. + * Hardware could use a dedicated stack for interrupt handling. + */ + if (stack_top <= current || current < td->td_kstack) + return; + + used = stack_top - current; + for (;;) { + prev_used = max_kstack_used; + if (prev_used >= used) + break; + if (atomic_cmpset_int(&max_kstack_used, prev_used, used)) + break; + } +} +#endif /* KSTACK_USAGE_PROF */ + #ifndef NO_SWAPPING /* * Allow a thread's kernel stack to be paged out. From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 18:01:10 2014 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 A736A9E9; Sat, 11 Oct 2014 18:01:10 +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 932965E7; Sat, 11 Oct 2014 18:01:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9BI1ABQ098130; Sat, 11 Oct 2014 18:01:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BI1AXm098129; Sat, 11 Oct 2014 18:01:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201410111801.s9BI1AXm098129@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 11 Oct 2014 18:01: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: r272948 - 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.18-1 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, 11 Oct 2014 18:01:10 -0000 Author: kib Date: Sat Oct 11 18:01:09 2014 New Revision: 272948 URL: https://svnweb.freebsd.org/changeset/base/272948 Log: MFC r272538: Slightly reword comment. Move code, which is described by the comment, after it. Modified: stable/10/sys/kern/vfs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_vnops.c ============================================================================== --- stable/10/sys/kern/vfs_vnops.c Sat Oct 11 17:52:54 2014 (r272947) +++ stable/10/sys/kern/vfs_vnops.c Sat Oct 11 18:01:09 2014 (r272948) @@ -2232,12 +2232,10 @@ vn_utimes_perm(struct vnode *vp, struct { int error; - error = VOP_ACCESSX(vp, VWRITE_ATTRIBUTES, cred, td); - /* - * From utimes(2): - * Grant permission if the caller is the owner of the file or - * the super-user. If the time pointer is null, then write + * Grant permission if the caller is the owner of the file, or + * the super-user, or has ACL_WRITE_ATTRIBUTES permission on + * on the file. If the time pointer is null, then write * permission on the file is also sufficient. * * From NFSv4.1, draft 21, 6.2.1.3.1, Discussion of Mask Attributes: @@ -2245,6 +2243,7 @@ vn_utimes_perm(struct vnode *vp, struct * will be allowed to set the times [..] to the current * server time. */ + error = VOP_ACCESSX(vp, VWRITE_ATTRIBUTES, cred, td); if (error != 0 && (vap->va_vaflags & VA_UTIMES_NULL) != 0) error = VOP_ACCESS(vp, VWRITE, cred, td); return (error); From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 19:18:25 2014 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 595747E0; Sat, 11 Oct 2014 19:18:25 +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 4069DCBE; Sat, 11 Oct 2014 19:18:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9BJIPE5035683; Sat, 11 Oct 2014 19:18:25 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BJI1BG035532; Sat, 11 Oct 2014 19:18:01 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201410111918.s9BJI1BG035532@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sat, 11 Oct 2014 19:18: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: r272953 - in stable/10: contrib/byacc contrib/byacc/package contrib/byacc/package/debian contrib/byacc/package/pkgsrc contrib/byacc/test contrib/byacc/test/btyacc contrib/byacc/test/yac... 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.18-1 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, 11 Oct 2014 19:18:25 -0000 Author: rodrigc Date: Sat Oct 11 19:18:00 2014 New Revision: 272953 URL: https://svnweb.freebsd.org/changeset/base/272953 Log: Merge: r268811 Update to byacc 20140715 PR: 191020 Submitted by: gcooper (yaneurabeya@gmail.com) Added: stable/10/usr.bin/yacc/tests/yacc_tests.sh - copied unchanged from r268811, head/usr.bin/yacc/tests/yacc_tests.sh Deleted: stable/10/contrib/byacc/NOTES-btyacc-Changes stable/10/contrib/byacc/NOTES-btyacc-Disposition stable/10/usr.bin/yacc/tests/calc.y stable/10/usr.bin/yacc/tests/calc1.y stable/10/usr.bin/yacc/tests/calc2.y stable/10/usr.bin/yacc/tests/calc3.y stable/10/usr.bin/yacc/tests/code_calc.y stable/10/usr.bin/yacc/tests/code_error.y stable/10/usr.bin/yacc/tests/error.y stable/10/usr.bin/yacc/tests/ftp.y stable/10/usr.bin/yacc/tests/grammar.y stable/10/usr.bin/yacc/tests/legacy_test.sh stable/10/usr.bin/yacc/tests/pure_calc.y stable/10/usr.bin/yacc/tests/pure_error.y stable/10/usr.bin/yacc/tests/quote_calc.y stable/10/usr.bin/yacc/tests/quote_calc2.y stable/10/usr.bin/yacc/tests/quote_calc3.y stable/10/usr.bin/yacc/tests/quote_calc4.y stable/10/usr.bin/yacc/tests/regress.00.out stable/10/usr.bin/yacc/tests/regress.01.out stable/10/usr.bin/yacc/tests/regress.02.out stable/10/usr.bin/yacc/tests/regress.03.out stable/10/usr.bin/yacc/tests/regress.04.out stable/10/usr.bin/yacc/tests/regress.05.out stable/10/usr.bin/yacc/tests/regress.06.out stable/10/usr.bin/yacc/tests/regress.07.out stable/10/usr.bin/yacc/tests/regress.08.out stable/10/usr.bin/yacc/tests/regress.09.out stable/10/usr.bin/yacc/tests/regress.10.out stable/10/usr.bin/yacc/tests/regress.11.out stable/10/usr.bin/yacc/tests/regress.12.out stable/10/usr.bin/yacc/tests/regress.13.out stable/10/usr.bin/yacc/tests/regress.14.out stable/10/usr.bin/yacc/tests/regress.sh stable/10/usr.bin/yacc/tests/undefined.y Modified: stable/10/contrib/byacc/CHANGES stable/10/contrib/byacc/MANIFEST stable/10/contrib/byacc/VERSION stable/10/contrib/byacc/aclocal.m4 stable/10/contrib/byacc/main.c stable/10/contrib/byacc/package/byacc.spec stable/10/contrib/byacc/package/debian/changelog stable/10/contrib/byacc/package/mingw-byacc.spec stable/10/contrib/byacc/package/pkgsrc/Makefile stable/10/contrib/byacc/test/btyacc/big_b.output stable/10/contrib/byacc/test/btyacc/big_l.output stable/10/contrib/byacc/test/btyacc/err_inherit1.error stable/10/contrib/byacc/test/btyacc/err_inherit2.error stable/10/contrib/byacc/test/btyacc/err_inherit3.error stable/10/contrib/byacc/test/btyacc/err_inherit4.error stable/10/contrib/byacc/test/btyacc/err_inherit5.error stable/10/contrib/byacc/test/btyacc/err_syntax1.error stable/10/contrib/byacc/test/btyacc/err_syntax10.error stable/10/contrib/byacc/test/btyacc/err_syntax11.error stable/10/contrib/byacc/test/btyacc/err_syntax12.error stable/10/contrib/byacc/test/btyacc/err_syntax13.error stable/10/contrib/byacc/test/btyacc/err_syntax14.error stable/10/contrib/byacc/test/btyacc/err_syntax15.error stable/10/contrib/byacc/test/btyacc/err_syntax16.error stable/10/contrib/byacc/test/btyacc/err_syntax17.error stable/10/contrib/byacc/test/btyacc/err_syntax18.error stable/10/contrib/byacc/test/btyacc/err_syntax19.error stable/10/contrib/byacc/test/btyacc/err_syntax2.error stable/10/contrib/byacc/test/btyacc/err_syntax21.error stable/10/contrib/byacc/test/btyacc/err_syntax22.error stable/10/contrib/byacc/test/btyacc/err_syntax23.error stable/10/contrib/byacc/test/btyacc/err_syntax24.error stable/10/contrib/byacc/test/btyacc/err_syntax25.error stable/10/contrib/byacc/test/btyacc/err_syntax26.error stable/10/contrib/byacc/test/btyacc/err_syntax27.error stable/10/contrib/byacc/test/btyacc/err_syntax3.error stable/10/contrib/byacc/test/btyacc/err_syntax4.error stable/10/contrib/byacc/test/btyacc/err_syntax5.error stable/10/contrib/byacc/test/btyacc/err_syntax6.error stable/10/contrib/byacc/test/btyacc/err_syntax7.error stable/10/contrib/byacc/test/btyacc/err_syntax7a.error stable/10/contrib/byacc/test/btyacc/err_syntax7b.error stable/10/contrib/byacc/test/btyacc/err_syntax8.error stable/10/contrib/byacc/test/btyacc/err_syntax8a.error stable/10/contrib/byacc/test/btyacc/err_syntax9.error stable/10/contrib/byacc/test/btyacc/help.output stable/10/contrib/byacc/test/btyacc/no_b_opt.output stable/10/contrib/byacc/test/btyacc/no_output2.output stable/10/contrib/byacc/test/btyacc/no_p_opt.output stable/10/contrib/byacc/test/btyacc/nostdin.output stable/10/contrib/byacc/test/run_test.sh stable/10/contrib/byacc/test/yacc/big_b.output stable/10/contrib/byacc/test/yacc/big_l.output stable/10/contrib/byacc/test/yacc/err_syntax1.error stable/10/contrib/byacc/test/yacc/err_syntax10.error stable/10/contrib/byacc/test/yacc/err_syntax11.error stable/10/contrib/byacc/test/yacc/err_syntax12.error stable/10/contrib/byacc/test/yacc/err_syntax13.error stable/10/contrib/byacc/test/yacc/err_syntax14.error stable/10/contrib/byacc/test/yacc/err_syntax15.error stable/10/contrib/byacc/test/yacc/err_syntax16.error stable/10/contrib/byacc/test/yacc/err_syntax17.error stable/10/contrib/byacc/test/yacc/err_syntax18.error stable/10/contrib/byacc/test/yacc/err_syntax19.error stable/10/contrib/byacc/test/yacc/err_syntax2.error stable/10/contrib/byacc/test/yacc/err_syntax21.error stable/10/contrib/byacc/test/yacc/err_syntax22.error stable/10/contrib/byacc/test/yacc/err_syntax23.error stable/10/contrib/byacc/test/yacc/err_syntax24.error stable/10/contrib/byacc/test/yacc/err_syntax25.error stable/10/contrib/byacc/test/yacc/err_syntax26.error stable/10/contrib/byacc/test/yacc/err_syntax27.error stable/10/contrib/byacc/test/yacc/err_syntax3.error stable/10/contrib/byacc/test/yacc/err_syntax4.error stable/10/contrib/byacc/test/yacc/err_syntax5.error stable/10/contrib/byacc/test/yacc/err_syntax6.error stable/10/contrib/byacc/test/yacc/err_syntax7.error stable/10/contrib/byacc/test/yacc/err_syntax7a.error stable/10/contrib/byacc/test/yacc/err_syntax7b.error stable/10/contrib/byacc/test/yacc/err_syntax8.error stable/10/contrib/byacc/test/yacc/err_syntax8a.error stable/10/contrib/byacc/test/yacc/err_syntax9.error stable/10/contrib/byacc/test/yacc/help.output stable/10/contrib/byacc/test/yacc/no_b_opt.output stable/10/contrib/byacc/test/yacc/no_output2.output stable/10/contrib/byacc/test/yacc/no_p_opt.output stable/10/contrib/byacc/test/yacc/nostdin.output stable/10/usr.bin/yacc/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/byacc/CHANGES ============================================================================== --- stable/10/contrib/byacc/CHANGES Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/CHANGES Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,38 @@ +2014-07-15 Thomas E. Dickey + + * aclocal.m4: resync with my-autoconf (no change to configure script) + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * test/run_test.sh: + make top-level "make check" work again, by adding another step to filtering + the test results. + +2014-07-14 Thomas E. Dickey + + * test/run_test.sh: changes from Garrett Cooper's patch: + a) ensure that the script returns an error-code if there are differences + b) escape "." character in left side of sed expression for $YACC + c) ensure that $ifBTYACC has a value + + * test/btyacc/big_b.output, test/btyacc/big_l.output, test/btyacc/help.output, test/btyacc/no_b_opt.output, test/btyacc/no_output2.output, test/btyacc/no_p_opt.output, test/btyacc/nostdin.output: + regen (reminder by Garrett Cooper) + +2014-07-14 Garrett.Cooper + + * test/btyacc/err_inherit1.error, test/btyacc/err_inherit2.error, test/btyacc/err_inherit3.error, test/btyacc/err_inherit4.error, test/btyacc/err_inherit5.error, test/btyacc/err_syntax1.error, test/btyacc/err_syntax10.error, test/btyacc/err_syntax11.error, test/btyacc/err_syntax12.error, test/btyacc/err_syntax13.error, test/btyacc/err_syntax14.error, test/btyacc/err_syntax15.error, test/btyacc/err_syntax16.error, test/btyacc/err_syntax17.error, test/btyacc/err_syntax18.error, test/btyacc/err_syntax19.error, test/btyacc/err_syntax2.error, test/btyacc/err_syntax21.error, test/btyacc/err_syntax22.error, test/btyacc/err_syntax23.error, test/btyacc/err_syntax24.error, test/btyacc/err_syntax25.error, test/btyacc/err_syntax26.error, test/btyacc/err_syntax27.error, test/btyacc/err_syntax3.error, test/btyacc/err_syntax4.error, test/btyacc/err_syntax5.error, test/btyacc/err_syntax6.error, test/btyacc/err_syntax7.error, test/btyacc/err_syntax7a.error, test/btyacc/err_syntax7b.error, test/btya cc/err_syntax8.error, test/btyacc/err_syntax8a.error, test/btyacc/err_syntax9.error, test/yacc/err_syntax1.error, test/yacc/err_syntax10.error, test/yacc/err_syntax11.error, test/yacc/err_syntax12.error, test/yacc/err_syntax13.error, test/yacc/err_syntax14.error, test/yacc/err_syntax15.error, test/yacc/err_syntax16.error, test/yacc/err_syntax17.error, test/yacc/err_syntax18.error, test/yacc/err_syntax19.error, test/yacc/err_syntax2.error, test/yacc/err_syntax21.error, test/yacc/err_syntax22.error, test/yacc/err_syntax23.error, test/yacc/err_syntax24.error, test/yacc/err_syntax25.error, test/yacc/err_syntax26.error, test/yacc/err_syntax27.error, test/yacc/err_syntax3.error, test/yacc/err_syntax4.error, test/yacc/err_syntax5.error, test/yacc/err_syntax6.error, test/yacc/err_syntax7.error, test/yacc/err_syntax7a.error, test/yacc/err_syntax7b.error, test/yacc/err_syntax8.error, test/yacc/err_syntax8a.error, test/yacc/err_syntax9.error: + regen + +2014-05-27 Tom.Shields + + * main.c: remove obsolete -D option from usage message + +2014-05-27 Thomas E. Dickey + + * VERSION, package/byacc.spec, package/debian/changelog, test/yacc/big_b.output, test/yacc/big_l.output, test/yacc/help.output, test/yacc/no_b_opt.output, test/yacc/no_output2.output, test/yacc/no_p_opt.output, test/yacc/nostdin.output: + bump + 2014-04-22 Thomas E. Dickey * mstring.c: Modified: stable/10/contrib/byacc/MANIFEST ============================================================================== --- stable/10/contrib/byacc/MANIFEST Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/MANIFEST Sat Oct 11 19:18:00 2014 (r272953) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20140422, version t20140422 +MANIFEST for byacc-20140715, version t20140715 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 Modified: stable/10/contrib/byacc/VERSION ============================================================================== --- stable/10/contrib/byacc/VERSION Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/VERSION Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -20140422 +20140715 Modified: stable/10/contrib/byacc/aclocal.m4 ============================================================================== --- stable/10/contrib/byacc/aclocal.m4 Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/aclocal.m4 Sat Oct 11 19:18:00 2014 (r272953) @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.34 2014/04/06 19:16:18 tom Exp $ +dnl $Id: aclocal.m4,v 1.35 2014/07/15 19:38:05 tom Exp $ dnl Macros for byacc configure script (Thomas E. Dickey) dnl --------------------------------------------------------------------------- dnl Copyright 2004-2013,2014 Thomas E. Dickey @@ -28,7 +28,7 @@ dnl sale, use or other dealings in this dnl authorization. dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- -dnl CF_ACVERSION_CHECK version: 4 updated: 2013/03/04 19:52:56 +dnl CF_ACVERSION_CHECK version: 5 updated: 2014/06/04 19:11:49 dnl ------------------ dnl Conditionally generate script according to whether we're using a given autoconf. dnl @@ -37,7 +37,7 @@ dnl $2 = code to use if AC_ACVERSION is dnl $3 = code to use if AC_ACVERSION is older than $1. define([CF_ACVERSION_CHECK], [ -ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])dnl +ifdef([AC_ACVERSION], ,[ifdef([AC_AUTOCONF_VERSION],[m4_copy([AC_AUTOCONF_VERSION],[AC_ACVERSION])],[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])])dnl ifdef([m4_version_compare], [m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], [CF_ACVERSION_COMPARE( @@ -930,7 +930,7 @@ AC_PROG_AWK test -z "$AWK" && AC_MSG_ERROR(No awk program found) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PROG_CC version: 3 updated: 2012/10/06 15:31:55 +dnl CF_PROG_CC version: 4 updated: 2014/07/12 18:57:58 dnl ---------- dnl standard check for CC, plus followup sanity checks dnl $1 = optional parameter to pass to AC_PROG_CC to specify compiler name @@ -940,7 +940,7 @@ CF_GCC_VERSION CF_ACVERSION_CHECK(2.52, [AC_PROG_CC_STDC], [CF_ANSI_CC_REQD]) -CF_CC_ENV_FLAGS +CF_CC_ENV_FLAGS ])dnl dnl --------------------------------------------------------------------------- dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14 Modified: stable/10/contrib/byacc/main.c ============================================================================== --- stable/10/contrib/byacc/main.c Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/main.c Sat Oct 11 19:18:00 2014 (r272953) @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.50 2014/04/22 23:34:47 tom Exp $ */ +/* $Id: main.c,v 1.51 2014/05/28 02:01:55 Tom.Shields Exp $ */ #include #ifndef _WIN32 @@ -208,7 +208,6 @@ usage(void) ," -b file_prefix set filename prefix (default \"y.\")" ," -B create a backtracking parser" ," -d write definitions (" DEFINES_SUFFIX ")" - ," -D enable value stack memory reclamation" ," -i write interface (y.tab.i)" ," -g write a graphical description" ," -l suppress #line directives" Modified: stable/10/contrib/byacc/package/byacc.spec ============================================================================== --- stable/10/contrib/byacc/package/byacc.spec Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/package/byacc.spec Sat Oct 11 19:18:00 2014 (r272953) @@ -1,8 +1,8 @@ Summary: byacc - public domain Berkeley LALR Yacc parser generator %define AppProgram byacc -%define AppVersion 20140422 +%define AppVersion 20140715 %define UseProgram yacc -# $XTermId: byacc.spec,v 1.20 2014/04/22 08:13:20 tom Exp $ +# $XTermId: byacc.spec,v 1.22 2014/07/15 19:36:54 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: 1 Modified: stable/10/contrib/byacc/package/debian/changelog ============================================================================== --- stable/10/contrib/byacc/package/debian/changelog Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/package/debian/changelog Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,15 @@ +byacc (20140715) unstable; urgency=low + + * maintenance updates + + -- Thomas E. Dickey Tue, 15 Jul 2014 15:36:54 -0400 + +byacc (20140527) unstable; urgency=low + + * remove obsolete option from usage message + + -- Thomas E. Dickey Tue, 27 May 2014 22:01:55 -0400 + byacc (20140422) unstable; urgency=low * maintenance updates Modified: stable/10/contrib/byacc/package/mingw-byacc.spec ============================================================================== --- stable/10/contrib/byacc/package/mingw-byacc.spec Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/package/mingw-byacc.spec Sat Oct 11 19:18:00 2014 (r272953) @@ -1,8 +1,8 @@ Summary: byacc - public domain Berkeley LALR Yacc parser generator %define AppProgram byacc -%define AppVersion 20140422 +%define AppVersion 20140715 %define UseProgram yacc -# $XTermId: mingw-byacc.spec,v 1.3 2014/04/22 08:13:20 tom Exp $ +# $XTermId: mingw-byacc.spec,v 1.4 2014/07/15 19:36:54 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: 1 Modified: stable/10/contrib/byacc/package/pkgsrc/Makefile ============================================================================== --- stable/10/contrib/byacc/package/pkgsrc/Makefile Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/package/pkgsrc/Makefile Sat Oct 11 19:18:00 2014 (r272953) @@ -1,7 +1,7 @@ # $NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp $ # -DISTNAME= byacc-20140422 +DISTNAME= byacc-20140715 PKGREVISION= 1 CATEGORIES= devel MASTER_SITES= ftp://invisible-island.net/byacc/ Modified: stable/10/contrib/byacc/test/btyacc/big_b.output ============================================================================== --- stable/10/contrib/byacc/test/btyacc/big_b.output Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/big_b.output Sat Oct 11 19:18:00 2014 (r272953) @@ -4,7 +4,6 @@ Options: -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: stable/10/contrib/byacc/test/btyacc/big_l.output ============================================================================== --- stable/10/contrib/byacc/test/btyacc/big_l.output Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/big_l.output Sat Oct 11 19:18:00 2014 (r272953) @@ -4,7 +4,6 @@ Options: -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: stable/10/contrib/byacc/test/btyacc/err_inherit1.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_inherit1.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_inherit1.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 64 of "./test/err_inherit1.y", unterminated argument list +YACC: e - line 64 of "./err_inherit1.y", unterminated argument list namelist($c, $t ^ Modified: stable/10/contrib/byacc/test/btyacc/err_inherit2.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_inherit2.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_inherit2.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,5 +1,5 @@ -YACC: w - line 64 of "./test/err_inherit2.y", number of arguments of namelist doesn't agree with previous declaration -YACC: w - line 64 of "./test/err_inherit2.y", type of argument 1 to namelist doesn't agree with previous declaration -YACC: e - line 64 of "./test/err_inherit2.y", bad formal argument list +YACC: w - line 64 of "./err_inherit2.y", number of arguments of namelist doesn't agree with previous declaration +YACC: w - line 64 of "./err_inherit2.y", type of argument 1 to namelist doesn't agree with previous declaration +YACC: e - line 64 of "./err_inherit2.y", bad formal argument list namelist($c, $t, extra): namelist NAME ^ Modified: stable/10/contrib/byacc/test/btyacc/err_inherit3.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_inherit3.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_inherit3.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,23 +1,23 @@ -YACC: w - line 64 of "./test/err_inherit3.y", number of arguments of namelist doesn't agree with previous declaration -YACC: w - line 64 of "./test/err_inherit3.y", wrong number of arguments for namelist +YACC: w - line 64 of "./err_inherit3.y", number of arguments of namelist doesn't agree with previous declaration +YACC: w - line 64 of "./err_inherit3.y", wrong number of arguments for namelist namelist: namelist($c) NAME ^ -YACC: w - line 64 of "./test/err_inherit3.y", unknown argument $c -YACC: w - line 64 of "./test/err_inherit3.y", untyped argument $c -YACC: w - line 65 of "./test/err_inherit3.y", unknown argument $t +YACC: w - line 64 of "./err_inherit3.y", unknown argument $c +YACC: w - line 64 of "./err_inherit3.y", untyped argument $c +YACC: w - line 65 of "./err_inherit3.y", unknown argument $t { $$->s = mksymbol($t, $c, $2); ^ -YACC: w - line 65 of "./test/err_inherit3.y", unknown argument $c +YACC: w - line 65 of "./err_inherit3.y", unknown argument $c { $$->s = mksymbol($t, $c, $2); ^ -YACC: w - line 69 of "./test/err_inherit3.y", unknown argument $t +YACC: w - line 69 of "./err_inherit3.y", unknown argument $t { $$->s = mksymbol($t, $c, $1); ^ -YACC: w - line 69 of "./test/err_inherit3.y", untyped argument $t -YACC: w - line 69 of "./test/err_inherit3.y", unknown argument $c +YACC: w - line 69 of "./err_inherit3.y", untyped argument $t +YACC: w - line 69 of "./err_inherit3.y", unknown argument $c { $$->s = mksymbol($t, $c, $1); ^ -YACC: w - line 69 of "./test/err_inherit3.y", untyped argument $c -YACC: w - line 0 of "./test/err_inherit3.y", start symbol declaration requires arguments +YACC: w - line 69 of "./err_inherit3.y", untyped argument $c +YACC: w - line 0 of "./err_inherit3.y", start symbol declaration requires arguments YACC: 1 rule never reduced YACC: 3 shift/reduce conflicts. Modified: stable/10/contrib/byacc/test/btyacc/err_inherit4.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_inherit4.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_inherit4.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,13 +1,13 @@ -YACC: w - line 32 of "./test/err_inherit4.y", destructor redeclared +YACC: w - line 32 of "./err_inherit4.y", destructor redeclared %destructor { ^ -YACC: w - line 77 of "./test/err_inherit4.y", wrong number of default arguments for namelist +YACC: w - line 77 of "./err_inherit4.y", wrong number of default arguments for namelist { $$ = $1; @$ = @2; } ^ -YACC: w - line 77 of "./test/err_inherit4.y", wrong type for default argument 2 to namelist +YACC: w - line 77 of "./err_inherit4.y", wrong type for default argument 2 to namelist { $$ = $1; @$ = @2; } ^ -YACC: w - line 77 of "./test/err_inherit4.y", wrong type for default argument 1 to namelist +YACC: w - line 77 of "./err_inherit4.y", wrong type for default argument 1 to namelist { $$ = $1; @$ = @2; } ^ -YACC: w - line 77 of "./test/err_inherit4.y", @2 references beyond the end of the current rule +YACC: w - line 77 of "./err_inherit4.y", @2 references beyond the end of the current rule Modified: stable/10/contrib/byacc/test/btyacc/err_inherit5.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_inherit5.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_inherit5.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 74 of "./test/err_inherit5.y", illegal @$ or @N reference +YACC: e - line 74 of "./err_inherit5.y", illegal @$ or @N reference Modified: stable/10/contrib/byacc/test/btyacc/err_syntax1.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax1.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax1.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 1 of "./test/err_syntax1.y", syntax error +YACC: e - line 1 of "./err_syntax1.y", syntax error ?% { ^ Modified: stable/10/contrib/byacc/test/btyacc/err_syntax10.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax10.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax10.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: w - line 7 of "./test/err_syntax10.y", the type of '(' has been redeclared -YACC: w - line 7 of "./test/err_syntax10.y", the type of '*' has been redeclared -YACC: w - line 7 of "./test/err_syntax10.y", the type of '&' has been redeclared +YACC: w - line 7 of "./err_syntax10.y", the type of '(' has been redeclared +YACC: w - line 7 of "./err_syntax10.y", the type of '*' has been redeclared +YACC: w - line 7 of "./err_syntax10.y", the type of '&' has been redeclared Modified: stable/10/contrib/byacc/test/btyacc/err_syntax11.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax11.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax11.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: w - line 7 of "./test/err_syntax11.y", the precedence of '|' has been redeclared +YACC: w - line 7 of "./err_syntax11.y", the precedence of '|' has been redeclared Modified: stable/10/contrib/byacc/test/btyacc/err_syntax12.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax12.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax12.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: w - line 7 of "./test/err_syntax12.y", the value of text has been redeclared +YACC: w - line 7 of "./err_syntax12.y", the value of text has been redeclared Modified: stable/10/contrib/byacc/test/btyacc/err_syntax13.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax13.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax13.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 7 of "./test/err_syntax13.y", the start symbol text is a token +YACC: e - line 7 of "./err_syntax13.y", the start symbol text is a token Modified: stable/10/contrib/byacc/test/btyacc/err_syntax14.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax14.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax14.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,2 +1,2 @@ -YACC: w - line 7 of "./test/err_syntax14.y", the start symbol has been redeclared +YACC: w - line 7 of "./err_syntax14.y", the start symbol has been redeclared YACC: e - the start symbol text2 is undefined Modified: stable/10/contrib/byacc/test/btyacc/err_syntax15.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax15.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax15.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 9 of "./test/err_syntax15.y", no grammar has been specified +YACC: e - line 9 of "./err_syntax15.y", no grammar has been specified Modified: stable/10/contrib/byacc/test/btyacc/err_syntax16.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax16.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax16.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 14 of "./test/err_syntax16.y", a token appears on the lhs of a production +YACC: e - line 14 of "./err_syntax16.y", a token appears on the lhs of a production Modified: stable/10/contrib/byacc/test/btyacc/err_syntax17.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax17.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax17.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 8 of "./test/err_syntax17.y", unterminated action +YACC: e - line 8 of "./err_syntax17.y", unterminated action S: { error ^ Modified: stable/10/contrib/byacc/test/btyacc/err_syntax18.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax18.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax18.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: w - line 9 of "./test/err_syntax18.y", $4 references beyond the end of the current rule +YACC: w - line 9 of "./err_syntax18.y", $4 references beyond the end of the current rule Modified: stable/10/contrib/byacc/test/btyacc/err_syntax19.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax19.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax19.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 9 of "./test/err_syntax19.y", illegal $-name +YACC: e - line 9 of "./err_syntax19.y", illegal $-name { $$ = $; } ^ Modified: stable/10/contrib/byacc/test/btyacc/err_syntax2.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax2.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax2.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 1 of "./test/err_syntax2.y", unmatched /* +YACC: e - line 1 of "./err_syntax2.y", unmatched /* %{ /* ^ Modified: stable/10/contrib/byacc/test/btyacc/err_syntax21.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax21.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax21.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 12 of "./test/err_syntax21.y", $0 is untyped +YACC: e - line 12 of "./err_syntax21.y", $0 is untyped Modified: stable/10/contrib/byacc/test/btyacc/err_syntax22.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax22.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax22.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 17 of "./test/err_syntax22.y", $2 (recur) is untyped +YACC: e - line 17 of "./err_syntax22.y", $2 (recur) is untyped Modified: stable/10/contrib/byacc/test/btyacc/err_syntax23.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax23.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax23.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 18 of "./test/err_syntax23.y", $$ is untyped +YACC: e - line 18 of "./err_syntax23.y", $$ is untyped Modified: stable/10/contrib/byacc/test/btyacc/err_syntax24.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax24.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax24.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,2 +1,2 @@ -YACC: w - line 21 of "./test/err_syntax24.y", the default action assigns an undefined value to $$ -YACC: e - line 22 of "./test/err_syntax24.y", $$ is untyped +YACC: w - line 21 of "./err_syntax24.y", the default action assigns an undefined value to $$ +YACC: e - line 22 of "./err_syntax24.y", $$ is untyped Modified: stable/10/contrib/byacc/test/btyacc/err_syntax25.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax25.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax25.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 11 of "./test/err_syntax25.y", too many %union declarations +YACC: e - line 11 of "./err_syntax25.y", too many %union declarations %union { ^ Modified: stable/10/contrib/byacc/test/btyacc/err_syntax26.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax26.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax26.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 6 of "./test/err_syntax26.y", unexpected end-of-file +YACC: e - line 6 of "./err_syntax26.y", unexpected end-of-file Modified: stable/10/contrib/byacc/test/btyacc/err_syntax27.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax27.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax27.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 3 of "./test/err_syntax27.y", missing '}' +YACC: e - line 3 of "./err_syntax27.y", missing '}' Modified: stable/10/contrib/byacc/test/btyacc/err_syntax3.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax3.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax3.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax3.y", unterminated string +YACC: e - line 6 of "./err_syntax3.y", unterminated string %token '(' '*' '& ^ Modified: stable/10/contrib/byacc/test/btyacc/err_syntax4.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax4.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax4.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 1 of "./test/err_syntax4.y", unmatched %{ +YACC: e - line 1 of "./err_syntax4.y", unmatched %{ %{ ^ Modified: stable/10/contrib/byacc/test/btyacc/err_syntax5.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax5.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax5.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax5.y", unterminated %union declaration +YACC: e - line 6 of "./err_syntax5.y", unterminated %union declaration %union { ^ Modified: stable/10/contrib/byacc/test/btyacc/err_syntax6.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax6.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax6.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax6.y", illegal tag +YACC: e - line 6 of "./err_syntax6.y", illegal tag %token '\777' ^ Modified: stable/10/contrib/byacc/test/btyacc/err_syntax7a.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax7a.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax7a.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax7a.y", illegal character +YACC: e - line 6 of "./err_syntax7a.y", illegal character %token '\xfff' ^ Modified: stable/10/contrib/byacc/test/btyacc/err_syntax7b.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax7b.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax7b.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax7b.y", illegal character +YACC: e - line 6 of "./err_syntax7b.y", illegal character %token '\x.' ^ Modified: stable/10/contrib/byacc/test/btyacc/err_syntax8.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax8.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax8.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 6 of "./test/err_syntax8.y", illegal use of reserved symbol . +YACC: e - line 6 of "./err_syntax8.y", illegal use of reserved symbol . Modified: stable/10/contrib/byacc/test/btyacc/err_syntax8a.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax8a.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax8a.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 6 of "./test/err_syntax8a.y", illegal use of reserved symbol $$123 +YACC: e - line 6 of "./err_syntax8a.y", illegal use of reserved symbol $$123 Modified: stable/10/contrib/byacc/test/btyacc/err_syntax9.error ============================================================================== --- stable/10/contrib/byacc/test/btyacc/err_syntax9.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/err_syntax9.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 7 of "./test/err_syntax9.y", the start symbol text cannot be declared to be a token +YACC: e - line 7 of "./err_syntax9.y", the start symbol text cannot be declared to be a token Modified: stable/10/contrib/byacc/test/btyacc/help.output ============================================================================== --- stable/10/contrib/byacc/test/btyacc/help.output Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/help.output Sat Oct 11 19:18:00 2014 (r272953) @@ -4,7 +4,6 @@ Options: -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: stable/10/contrib/byacc/test/btyacc/no_b_opt.output ============================================================================== --- stable/10/contrib/byacc/test/btyacc/no_b_opt.output Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/no_b_opt.output Sat Oct 11 19:18:00 2014 (r272953) @@ -4,7 +4,6 @@ Options: -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: stable/10/contrib/byacc/test/btyacc/no_output2.output ============================================================================== --- stable/10/contrib/byacc/test/btyacc/no_output2.output Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/no_output2.output Sat Oct 11 19:18:00 2014 (r272953) @@ -4,7 +4,6 @@ Options: -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: stable/10/contrib/byacc/test/btyacc/no_p_opt.output ============================================================================== --- stable/10/contrib/byacc/test/btyacc/no_p_opt.output Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/no_p_opt.output Sat Oct 11 19:18:00 2014 (r272953) @@ -4,7 +4,6 @@ Options: -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: stable/10/contrib/byacc/test/btyacc/nostdin.output ============================================================================== --- stable/10/contrib/byacc/test/btyacc/nostdin.output Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/btyacc/nostdin.output Sat Oct 11 19:18:00 2014 (r272953) @@ -4,7 +4,6 @@ Options: -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: stable/10/contrib/byacc/test/run_test.sh ============================================================================== --- stable/10/contrib/byacc/test/run_test.sh Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/run_test.sh Sat Oct 11 19:18:00 2014 (r272953) @@ -1,7 +1,9 @@ #!/bin/sh -# $Id: run_test.sh,v 1.22 2014/04/09 11:00:45 tom Exp $ +# $Id: run_test.sh,v 1.24 2014/07/15 19:21:10 tom Exp $ # vi:ts=4 sw=4: +errors=0 + # NEW is the file created by the testcase # REF is the reference file against which to compare test_diffs() { @@ -11,13 +13,15 @@ test_diffs() { if test ! -f $CMP then echo "...not found $CMP" + errors=1 else sed -e s,$NEW,$REF, \ - -e "s%$YACC%YACC%" \ + -e "s%$YACC_escaped%YACC%" \ -e '/YYPATCH/s/[0-9][0-9]*/"yyyymmdd"/' \ -e '/#define YYPATCH/s/PATCH/CHECK/' \ -e 's,#line \([1-9][0-9]*\) "'$REF_DIR'/,#line \1 ",' \ -e 's,#line \([1-9][0-9]*\) "'$TEST_DIR'/,#line \1 ",' \ + -e 's,\(YACC:.* line [0-9][0-9]* of "\)'$TEST_DIR/',\1./,' \ < $CMP >$tmpfile \ && mv $tmpfile $CMP if test ! -f $REF @@ -31,6 +35,7 @@ test_diffs() { else echo "...diff $REF" diff -u $REF $CMP + errors=1 fi fi } @@ -62,10 +67,11 @@ else fi YACC=$PROG_DIR/yacc +YACC_escaped=`echo "$PROG_DIR/yacc" | sed -e 's/\./\\\./g'` tmpfile=temp$$ -ifBTYACC=`fgrep -l 'define YYBTYACC' config.h > /dev/null; test $? != 0; echo $?` +ifBTYACC=`fgrep -l 'define YYBTYACC' $PROG_DIR/config.h > /dev/null; test $? != 0; echo $?` if test $ifBTYACC = 0; then REF_DIR=${TEST_DIR}/yacc @@ -236,3 +242,5 @@ do ;; esac done + +exit $errors Modified: stable/10/contrib/byacc/test/yacc/big_b.output ============================================================================== --- stable/10/contrib/byacc/test/yacc/big_b.output Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/big_b.output Sat Oct 11 19:18:00 2014 (r272953) @@ -5,7 +5,6 @@ Options: -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: stable/10/contrib/byacc/test/yacc/big_l.output ============================================================================== --- stable/10/contrib/byacc/test/yacc/big_l.output Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/big_l.output Sat Oct 11 19:18:00 2014 (r272953) @@ -5,7 +5,6 @@ Options: -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: stable/10/contrib/byacc/test/yacc/err_syntax1.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax1.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax1.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 1 of "./test/err_syntax1.y", syntax error +YACC: e - line 1 of "./err_syntax1.y", syntax error ?% { ^ Modified: stable/10/contrib/byacc/test/yacc/err_syntax10.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax10.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax10.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: w - line 7 of "./test/err_syntax10.y", the type of '(' has been redeclared -YACC: w - line 7 of "./test/err_syntax10.y", the type of '*' has been redeclared -YACC: w - line 7 of "./test/err_syntax10.y", the type of '&' has been redeclared +YACC: w - line 7 of "./err_syntax10.y", the type of '(' has been redeclared +YACC: w - line 7 of "./err_syntax10.y", the type of '*' has been redeclared +YACC: w - line 7 of "./err_syntax10.y", the type of '&' has been redeclared Modified: stable/10/contrib/byacc/test/yacc/err_syntax11.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax11.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax11.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: w - line 7 of "./test/err_syntax11.y", the precedence of '|' has been redeclared +YACC: w - line 7 of "./err_syntax11.y", the precedence of '|' has been redeclared Modified: stable/10/contrib/byacc/test/yacc/err_syntax12.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax12.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax12.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: w - line 7 of "./test/err_syntax12.y", the value of text has been redeclared +YACC: w - line 7 of "./err_syntax12.y", the value of text has been redeclared Modified: stable/10/contrib/byacc/test/yacc/err_syntax13.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax13.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax13.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 7 of "./test/err_syntax13.y", the start symbol text is a token +YACC: e - line 7 of "./err_syntax13.y", the start symbol text is a token Modified: stable/10/contrib/byacc/test/yacc/err_syntax14.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax14.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax14.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,2 +1,2 @@ -YACC: w - line 7 of "./test/err_syntax14.y", the start symbol has been redeclared +YACC: w - line 7 of "./err_syntax14.y", the start symbol has been redeclared YACC: e - the start symbol text2 is undefined Modified: stable/10/contrib/byacc/test/yacc/err_syntax15.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax15.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax15.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 9 of "./test/err_syntax15.y", no grammar has been specified +YACC: e - line 9 of "./err_syntax15.y", no grammar has been specified Modified: stable/10/contrib/byacc/test/yacc/err_syntax16.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax16.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax16.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 14 of "./test/err_syntax16.y", a token appears on the lhs of a production +YACC: e - line 14 of "./err_syntax16.y", a token appears on the lhs of a production Modified: stable/10/contrib/byacc/test/yacc/err_syntax17.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax17.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax17.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 8 of "./test/err_syntax17.y", unterminated action +YACC: e - line 8 of "./err_syntax17.y", unterminated action S: { error ^ Modified: stable/10/contrib/byacc/test/yacc/err_syntax18.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax18.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax18.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: w - line 9 of "./test/err_syntax18.y", $4 references beyond the end of the current rule +YACC: w - line 9 of "./err_syntax18.y", $4 references beyond the end of the current rule Modified: stable/10/contrib/byacc/test/yacc/err_syntax19.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax19.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax19.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 9 of "./test/err_syntax19.y", illegal $-name +YACC: e - line 9 of "./err_syntax19.y", illegal $-name { $$ = $; } ^ Modified: stable/10/contrib/byacc/test/yacc/err_syntax2.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax2.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax2.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 1 of "./test/err_syntax2.y", unmatched /* +YACC: e - line 1 of "./err_syntax2.y", unmatched /* %{ /* ^ Modified: stable/10/contrib/byacc/test/yacc/err_syntax21.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax21.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax21.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 12 of "./test/err_syntax21.y", $0 is untyped +YACC: e - line 12 of "./err_syntax21.y", $0 is untyped Modified: stable/10/contrib/byacc/test/yacc/err_syntax22.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax22.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax22.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 17 of "./test/err_syntax22.y", $2 (recur) is untyped +YACC: e - line 17 of "./err_syntax22.y", $2 (recur) is untyped Modified: stable/10/contrib/byacc/test/yacc/err_syntax23.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax23.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax23.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 18 of "./test/err_syntax23.y", $$ is untyped +YACC: e - line 18 of "./err_syntax23.y", $$ is untyped Modified: stable/10/contrib/byacc/test/yacc/err_syntax24.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax24.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax24.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,2 +1,2 @@ -YACC: w - line 21 of "./test/err_syntax24.y", the default action assigns an undefined value to $$ -YACC: e - line 22 of "./test/err_syntax24.y", $$ is untyped +YACC: w - line 21 of "./err_syntax24.y", the default action assigns an undefined value to $$ +YACC: e - line 22 of "./err_syntax24.y", $$ is untyped Modified: stable/10/contrib/byacc/test/yacc/err_syntax25.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax25.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax25.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 11 of "./test/err_syntax25.y", too many %union declarations +YACC: e - line 11 of "./err_syntax25.y", too many %union declarations %union { ^ Modified: stable/10/contrib/byacc/test/yacc/err_syntax26.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax26.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax26.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 6 of "./test/err_syntax26.y", unexpected end-of-file +YACC: e - line 6 of "./err_syntax26.y", unexpected end-of-file Modified: stable/10/contrib/byacc/test/yacc/err_syntax27.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax27.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax27.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 3 of "./test/err_syntax27.y", missing '}' +YACC: e - line 3 of "./err_syntax27.y", missing '}' Modified: stable/10/contrib/byacc/test/yacc/err_syntax3.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax3.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax3.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax3.y", unterminated string +YACC: e - line 6 of "./err_syntax3.y", unterminated string %token '(' '*' '& ^ Modified: stable/10/contrib/byacc/test/yacc/err_syntax4.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax4.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax4.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 1 of "./test/err_syntax4.y", unmatched %{ +YACC: e - line 1 of "./err_syntax4.y", unmatched %{ %{ ^ Modified: stable/10/contrib/byacc/test/yacc/err_syntax5.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax5.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax5.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax5.y", unterminated %union declaration +YACC: e - line 6 of "./err_syntax5.y", unterminated %union declaration %union { ^ Modified: stable/10/contrib/byacc/test/yacc/err_syntax6.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax6.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax6.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax6.y", illegal tag +YACC: e - line 6 of "./err_syntax6.y", illegal tag %token '\777' ^ Modified: stable/10/contrib/byacc/test/yacc/err_syntax7a.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax7a.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax7a.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax7a.y", illegal character +YACC: e - line 6 of "./err_syntax7a.y", illegal character %token '\xfff' ^ Modified: stable/10/contrib/byacc/test/yacc/err_syntax7b.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax7b.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax7b.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax7b.y", illegal character +YACC: e - line 6 of "./err_syntax7b.y", illegal character %token '\x.' ^ Modified: stable/10/contrib/byacc/test/yacc/err_syntax8.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax8.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax8.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 6 of "./test/err_syntax8.y", illegal use of reserved symbol . +YACC: e - line 6 of "./err_syntax8.y", illegal use of reserved symbol . Modified: stable/10/contrib/byacc/test/yacc/err_syntax8a.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax8a.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax8a.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 6 of "./test/err_syntax8a.y", illegal use of reserved symbol $$123 +YACC: e - line 6 of "./err_syntax8a.y", illegal use of reserved symbol $$123 Modified: stable/10/contrib/byacc/test/yacc/err_syntax9.error ============================================================================== --- stable/10/contrib/byacc/test/yacc/err_syntax9.error Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/err_syntax9.error Sat Oct 11 19:18:00 2014 (r272953) @@ -1 +1 @@ -YACC: e - line 7 of "./test/err_syntax9.y", the start symbol text cannot be declared to be a token +YACC: e - line 7 of "./err_syntax9.y", the start symbol text cannot be declared to be a token Modified: stable/10/contrib/byacc/test/yacc/help.output ============================================================================== --- stable/10/contrib/byacc/test/yacc/help.output Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/help.output Sat Oct 11 19:18:00 2014 (r272953) @@ -4,7 +4,6 @@ Options: -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: stable/10/contrib/byacc/test/yacc/no_b_opt.output ============================================================================== --- stable/10/contrib/byacc/test/yacc/no_b_opt.output Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/no_b_opt.output Sat Oct 11 19:18:00 2014 (r272953) @@ -4,7 +4,6 @@ Options: -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: stable/10/contrib/byacc/test/yacc/no_output2.output ============================================================================== --- stable/10/contrib/byacc/test/yacc/no_output2.output Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/no_output2.output Sat Oct 11 19:18:00 2014 (r272953) @@ -4,7 +4,6 @@ Options: -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: stable/10/contrib/byacc/test/yacc/no_p_opt.output ============================================================================== --- stable/10/contrib/byacc/test/yacc/no_p_opt.output Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/no_p_opt.output Sat Oct 11 19:18:00 2014 (r272953) @@ -4,7 +4,6 @@ Options: -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: stable/10/contrib/byacc/test/yacc/nostdin.output ============================================================================== --- stable/10/contrib/byacc/test/yacc/nostdin.output Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/contrib/byacc/test/yacc/nostdin.output Sat Oct 11 19:18:00 2014 (r272953) @@ -4,7 +4,6 @@ Options: -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: stable/10/usr.bin/yacc/tests/Makefile ============================================================================== --- stable/10/usr.bin/yacc/tests/Makefile Sat Oct 11 19:09:56 2014 (r272952) +++ stable/10/usr.bin/yacc/tests/Makefile Sat Oct 11 19:18:00 2014 (r272953) @@ -1,41 +1,334 @@ # $FreeBSD$ +.include + +TEST_DIR= ${.CURDIR}/../../../contrib/byacc/test + +.PATH: ${TEST_DIR} ${TEST_DIR}/yacc + TESTSDIR= ${TESTSBASE}/usr.bin/yacc -TAP_TESTS_SH= legacy_test +PLAIN_TESTS_SH= yacc_tests + +SCRIPTS= run_test +SCRIPTSDIR= ${TESTSDIR} + +FILESGROUPS= FILEStest FILEStest_yacc + +FILEStestDIR= ${TESTSDIR} + +FILEStest+= btyacc_calc1.y +FILEStest+= btyacc_demo.y +FILEStest+= calc.y +FILEStest+= calc1.y +FILEStest+= calc2.y +FILEStest+= calc3.y +FILEStest+= code_calc.y +FILEStest+= code_debug.y +FILEStest+= code_error.y +FILEStest+= empty.y +FILEStest+= err_inherit1.y +FILEStest+= err_inherit2.y +FILEStest+= err_inherit3.y +FILEStest+= err_inherit4.y +FILEStest+= err_inherit5.y +FILEStest+= err_syntax1.y +FILEStest+= err_syntax10.y +FILEStest+= err_syntax11.y +FILEStest+= err_syntax12.y +FILEStest+= err_syntax13.y +FILEStest+= err_syntax14.y +FILEStest+= err_syntax15.y +FILEStest+= err_syntax16.y +FILEStest+= err_syntax17.y +FILEStest+= err_syntax18.y +FILEStest+= err_syntax19.y +FILEStest+= err_syntax2.y +FILEStest+= err_syntax20.y +FILEStest+= err_syntax21.y +FILEStest+= err_syntax22.y +FILEStest+= err_syntax23.y +FILEStest+= err_syntax24.y +FILEStest+= err_syntax25.y +FILEStest+= err_syntax26.y +FILEStest+= err_syntax27.y +FILEStest+= err_syntax3.y +FILEStest+= err_syntax4.y +FILEStest+= err_syntax5.y +FILEStest+= err_syntax6.y +FILEStest+= err_syntax7.y +FILEStest+= err_syntax7a.y +FILEStest+= err_syntax7b.y +FILEStest+= err_syntax8.y +FILEStest+= err_syntax8a.y +FILEStest+= err_syntax9.y +FILEStest+= error.y +FILEStest+= grammar.y +FILEStest+= inherit0.y +FILEStest+= inherit1.y +FILEStest+= inherit2.y +FILEStest+= ok_syntax1.y +FILEStest+= pure_calc.y +FILEStest+= pure_error.y +FILEStest+= quote_calc.y +FILEStest+= quote_calc2.y +FILEStest+= quote_calc3.y +FILEStest+= quote_calc4.y +FILEStest+= varsyntax_calc1.y + +FILEStest_yaccDIR= ${TESTSDIR}/yacc -FILESDIR= ${TESTSDIR} -FILES= calc.y -FILES+= calc1.y -FILES+= calc2.y -FILES+= calc3.y -FILES+= code_calc.y -FILES+= code_error.y -FILES+= error.y -FILES+= ftp.y -FILES+= grammar.y -FILES+= pure_calc.y -FILES+= pure_error.y -FILES+= quote_calc.y -FILES+= quote_calc2.y -FILES+= quote_calc3.y -FILES+= quote_calc4.y -FILES+= regress.00.out -FILES+= regress.01.out -FILES+= regress.02.out -FILES+= regress.03.out -FILES+= regress.04.out -FILES+= regress.05.out -FILES+= regress.06.out -FILES+= regress.07.out -FILES+= regress.08.out -FILES+= regress.09.out -FILES+= regress.10.out -FILES+= regress.11.out -FILES+= regress.12.out -FILES+= regress.13.out -FILES+= regress.14.out -FILES+= regress.sh -FILES+= undefined.y +FILEStest_yacc+= big_b.error +FILEStest_yacc+= big_b.output +FILEStest_yacc+= big_l.error +FILEStest_yacc+= big_l.output +FILEStest_yacc+= calc.error +FILEStest_yacc+= calc.output +FILEStest_yacc+= calc.tab.c +FILEStest_yacc+= calc.tab.h +FILEStest_yacc+= calc1.error +FILEStest_yacc+= calc1.output +FILEStest_yacc+= calc1.tab.c +FILEStest_yacc+= calc1.tab.h +FILEStest_yacc+= calc2.error +FILEStest_yacc+= calc2.output +FILEStest_yacc+= calc2.tab.c +FILEStest_yacc+= calc2.tab.h +FILEStest_yacc+= calc3.error +FILEStest_yacc+= calc3.output +FILEStest_yacc+= calc3.tab.c +FILEStest_yacc+= calc3.tab.h +FILEStest_yacc+= code_calc.code.c +FILEStest_yacc+= code_calc.error +FILEStest_yacc+= code_calc.output +FILEStest_yacc+= code_calc.tab.c +FILEStest_yacc+= code_calc.tab.h +FILEStest_yacc+= code_error.code.c +FILEStest_yacc+= code_error.error +FILEStest_yacc+= code_error.output +FILEStest_yacc+= code_error.tab.c +FILEStest_yacc+= code_error.tab.h +FILEStest_yacc+= empty.error +FILEStest_yacc+= empty.output +FILEStest_yacc+= empty.tab.c +FILEStest_yacc+= empty.tab.h +FILEStest_yacc+= err_syntax1.error +FILEStest_yacc+= err_syntax1.output +FILEStest_yacc+= err_syntax1.tab.c +FILEStest_yacc+= err_syntax1.tab.h +FILEStest_yacc+= err_syntax10.error +FILEStest_yacc+= err_syntax10.output +FILEStest_yacc+= err_syntax10.tab.c +FILEStest_yacc+= err_syntax10.tab.h +FILEStest_yacc+= err_syntax11.error +FILEStest_yacc+= err_syntax11.output +FILEStest_yacc+= err_syntax11.tab.c +FILEStest_yacc+= err_syntax11.tab.h +FILEStest_yacc+= err_syntax12.error +FILEStest_yacc+= err_syntax12.output +FILEStest_yacc+= err_syntax12.tab.c +FILEStest_yacc+= err_syntax12.tab.h +FILEStest_yacc+= err_syntax13.error +FILEStest_yacc+= err_syntax13.output +FILEStest_yacc+= err_syntax13.tab.c +FILEStest_yacc+= err_syntax13.tab.h +FILEStest_yacc+= err_syntax14.error +FILEStest_yacc+= err_syntax14.output +FILEStest_yacc+= err_syntax14.tab.c +FILEStest_yacc+= err_syntax14.tab.h +FILEStest_yacc+= err_syntax15.error +FILEStest_yacc+= err_syntax15.output +FILEStest_yacc+= err_syntax15.tab.c +FILEStest_yacc+= err_syntax15.tab.h +FILEStest_yacc+= err_syntax16.error +FILEStest_yacc+= err_syntax16.output +FILEStest_yacc+= err_syntax16.tab.c +FILEStest_yacc+= err_syntax16.tab.h +FILEStest_yacc+= err_syntax17.error +FILEStest_yacc+= err_syntax17.output +FILEStest_yacc+= err_syntax17.tab.c +FILEStest_yacc+= err_syntax17.tab.h +FILEStest_yacc+= err_syntax18.error +FILEStest_yacc+= err_syntax18.output +FILEStest_yacc+= err_syntax18.tab.c +FILEStest_yacc+= err_syntax18.tab.h +FILEStest_yacc+= err_syntax19.error +FILEStest_yacc+= err_syntax19.output +FILEStest_yacc+= err_syntax19.tab.c +FILEStest_yacc+= err_syntax19.tab.h +FILEStest_yacc+= err_syntax2.error +FILEStest_yacc+= err_syntax2.output +FILEStest_yacc+= err_syntax2.tab.c +FILEStest_yacc+= err_syntax2.tab.h +FILEStest_yacc+= err_syntax20.error +FILEStest_yacc+= err_syntax20.output *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 19:28:24 2014 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 3000DA9D; Sat, 11 Oct 2014 19:28: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 0306ADC8; Sat, 11 Oct 2014 19:28: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 s9BJSN4w040398; Sat, 11 Oct 2014 19:28:23 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BJSNLs040395; Sat, 11 Oct 2014 19:28:23 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201410111928.s9BJSNLs040395@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sat, 11 Oct 2014 19:28: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: r272954 - stable/10/contrib/byacc 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.18-1 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, 11 Oct 2014 19:28:24 -0000 Author: rodrigc Date: Sat Oct 11 19:28:22 2014 New Revision: 272954 URL: https://svnweb.freebsd.org/changeset/base/272954 Log: Merge: r272649 use calloc in get_line() when allocating line to ensure it is fully initialized, fixes a later uninitialized value in copy_param() (FreeBSD #193499). PR: 193499 Submitted by: Thomas E. Dickey Modified: stable/10/contrib/byacc/CHANGES stable/10/contrib/byacc/defs.h stable/10/contrib/byacc/reader.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/byacc/CHANGES ============================================================================== --- stable/10/contrib/byacc/CHANGES Sat Oct 11 19:18:00 2014 (r272953) +++ stable/10/contrib/byacc/CHANGES Sat Oct 11 19:28:22 2014 (r272954) @@ -1,3 +1,9 @@ +2014-10-02 Thomas E. Dickey + + * reader.c, defs.h: + use calloc in get_line() when allocating line to ensure it is fully initialized, + fixes a later uninitialized value in copy_param() (FreeBSD #193499). + 2014-07-15 Thomas E. Dickey * aclocal.m4: resync with my-autoconf (no change to configure script) Modified: stable/10/contrib/byacc/defs.h ============================================================================== --- stable/10/contrib/byacc/defs.h Sat Oct 11 19:18:00 2014 (r272953) +++ stable/10/contrib/byacc/defs.h Sat Oct 11 19:28:22 2014 (r272954) @@ -157,6 +157,7 @@ #define CALLOC(k,n) (calloc((size_t)(k),(size_t)(n))) #define FREE(x) (free((char*)(x))) #define MALLOC(n) (malloc((size_t)(n))) +#define TCMALLOC(t,n) ((t*) calloc((size_t)(n), sizeof(t))) #define TMALLOC(t,n) ((t*) malloc((size_t)(n) * sizeof(t))) #define NEW(t) ((t*)allocate(sizeof(t))) #define NEW2(n,t) ((t*)allocate(((size_t)(n)*sizeof(t)))) Modified: stable/10/contrib/byacc/reader.c ============================================================================== --- stable/10/contrib/byacc/reader.c Sat Oct 11 19:18:00 2014 (r272953) +++ stable/10/contrib/byacc/reader.c Sat Oct 11 19:28:22 2014 (r272954) @@ -125,7 +125,7 @@ get_line(void) if (line) FREE(line); linesize = LINESIZE + 1; - line = TMALLOC(char, linesize); + line = TCMALLOC(char, linesize); NO_SPACE(line); } From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 19:34:44 2014 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 BA009C1F; Sat, 11 Oct 2014 19:34:44 +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 A24C1E7A; Sat, 11 Oct 2014 19:34:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9BJYiLp044724; Sat, 11 Oct 2014 19:34:44 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BJYgWo044712; Sat, 11 Oct 2014 19:34:42 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201410111934.s9BJYgWo044712@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sat, 11 Oct 2014 19:34: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: r272955 - in stable/10/contrib/byacc: . package package/debian package/pkgsrc test test/btyacc test/yacc 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.18-1 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, 11 Oct 2014 19:34:45 -0000 Author: rodrigc Date: Sat Oct 11 19:34:41 2014 New Revision: 272955 URL: https://svnweb.freebsd.org/changeset/base/272955 Log: Merge: 272655 Import byacc 20141005 from vendor Added: stable/10/contrib/byacc/test/btyacc/btyacc_demo2.error - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_demo2.error stable/10/contrib/byacc/test/btyacc/btyacc_demo2.output - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_demo2.output stable/10/contrib/byacc/test/btyacc/btyacc_demo2.tab.c - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_demo2.tab.c stable/10/contrib/byacc/test/btyacc/btyacc_demo2.tab.h - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_demo2.tab.h stable/10/contrib/byacc/test/btyacc/btyacc_destroy1.error - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_destroy1.error stable/10/contrib/byacc/test/btyacc/btyacc_destroy1.output - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_destroy1.output stable/10/contrib/byacc/test/btyacc/btyacc_destroy1.tab.c - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_destroy1.tab.c stable/10/contrib/byacc/test/btyacc/btyacc_destroy1.tab.h - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_destroy1.tab.h stable/10/contrib/byacc/test/btyacc/btyacc_destroy2.error - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_destroy2.error stable/10/contrib/byacc/test/btyacc/btyacc_destroy2.output - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_destroy2.output stable/10/contrib/byacc/test/btyacc/btyacc_destroy2.tab.c - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_destroy2.tab.c stable/10/contrib/byacc/test/btyacc/btyacc_destroy2.tab.h - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_destroy2.tab.h stable/10/contrib/byacc/test/btyacc/btyacc_destroy3.error - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_destroy3.error stable/10/contrib/byacc/test/btyacc/btyacc_destroy3.output - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_destroy3.output stable/10/contrib/byacc/test/btyacc/btyacc_destroy3.tab.c - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_destroy3.tab.c stable/10/contrib/byacc/test/btyacc/btyacc_destroy3.tab.h - copied unchanged from r272655, head/contrib/byacc/test/btyacc/btyacc_destroy3.tab.h stable/10/contrib/byacc/test/btyacc_destroy1.y - copied unchanged from r272655, head/contrib/byacc/test/btyacc_destroy1.y stable/10/contrib/byacc/test/btyacc_destroy2.y - copied unchanged from r272655, head/contrib/byacc/test/btyacc_destroy2.y stable/10/contrib/byacc/test/btyacc_destroy3.y - copied unchanged from r272655, head/contrib/byacc/test/btyacc_destroy3.y Modified: stable/10/contrib/byacc/CHANGES stable/10/contrib/byacc/MANIFEST stable/10/contrib/byacc/VERSION stable/10/contrib/byacc/aclocal.m4 stable/10/contrib/byacc/btyaccpar.c stable/10/contrib/byacc/closure.c stable/10/contrib/byacc/config.sub stable/10/contrib/byacc/configure stable/10/contrib/byacc/defs.h stable/10/contrib/byacc/lalr.c stable/10/contrib/byacc/main.c stable/10/contrib/byacc/output.c stable/10/contrib/byacc/package/byacc.spec stable/10/contrib/byacc/package/debian/changelog stable/10/contrib/byacc/package/mingw-byacc.spec stable/10/contrib/byacc/package/pkgsrc/Makefile stable/10/contrib/byacc/reader.c stable/10/contrib/byacc/test/btyacc/btyacc_calc1.tab.c stable/10/contrib/byacc/test/btyacc/btyacc_demo.tab.c stable/10/contrib/byacc/test/btyacc/calc.tab.c stable/10/contrib/byacc/test/btyacc/calc1.tab.c stable/10/contrib/byacc/test/btyacc/calc2.tab.c stable/10/contrib/byacc/test/btyacc/calc3.tab.c stable/10/contrib/byacc/test/btyacc/code_calc.code.c stable/10/contrib/byacc/test/btyacc/code_calc.tab.c stable/10/contrib/byacc/test/btyacc/code_error.code.c stable/10/contrib/byacc/test/btyacc/code_error.tab.c stable/10/contrib/byacc/test/btyacc/empty.tab.c stable/10/contrib/byacc/test/btyacc/err_inherit1.tab.c stable/10/contrib/byacc/test/btyacc/err_inherit2.tab.c stable/10/contrib/byacc/test/btyacc/err_inherit3.tab.c stable/10/contrib/byacc/test/btyacc/err_inherit4.tab.c stable/10/contrib/byacc/test/btyacc/err_inherit5.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax1.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax10.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax11.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax12.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax13.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax14.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax15.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax16.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax17.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax18.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax19.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax2.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax20.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax21.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax22.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax23.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax24.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax25.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax26.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax27.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax3.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax4.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax5.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax6.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax7.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax7a.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax7b.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax8.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax8a.tab.c stable/10/contrib/byacc/test/btyacc/err_syntax9.tab.c stable/10/contrib/byacc/test/btyacc/error.tab.c stable/10/contrib/byacc/test/btyacc/grammar.tab.c stable/10/contrib/byacc/test/btyacc/inherit0.tab.c stable/10/contrib/byacc/test/btyacc/inherit1.tab.c stable/10/contrib/byacc/test/btyacc/inherit2.tab.c stable/10/contrib/byacc/test/btyacc/ok_syntax1.tab.c stable/10/contrib/byacc/test/btyacc/pure_calc.tab.c stable/10/contrib/byacc/test/btyacc/pure_error.tab.c stable/10/contrib/byacc/test/btyacc/quote_calc-s.tab.c stable/10/contrib/byacc/test/btyacc/quote_calc.tab.c stable/10/contrib/byacc/test/btyacc/quote_calc2-s.tab.c stable/10/contrib/byacc/test/btyacc/quote_calc2.tab.c stable/10/contrib/byacc/test/btyacc/quote_calc3-s.tab.c stable/10/contrib/byacc/test/btyacc/quote_calc3.tab.c stable/10/contrib/byacc/test/btyacc/quote_calc4-s.tab.c stable/10/contrib/byacc/test/btyacc/quote_calc4.tab.c stable/10/contrib/byacc/test/btyacc/rename_debug.c stable/10/contrib/byacc/test/btyacc/varsyntax_calc1.tab.c stable/10/contrib/byacc/test/yacc/calc2.tab.c stable/10/contrib/byacc/test/yacc/calc3.tab.c stable/10/contrib/byacc/test/yacc/ok_syntax1.tab.c stable/10/contrib/byacc/yacc.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/byacc/CHANGES ============================================================================== --- stable/10/contrib/byacc/CHANGES Sat Oct 11 19:28:22 2014 (r272954) +++ stable/10/contrib/byacc/CHANGES Sat Oct 11 19:34:41 2014 (r272955) @@ -1,9 +1,125 @@ +2014-10-05 Thomas E. Dickey + + * main.c: + make change to umask before calling mkstemp, as suggested in Coverity #56902 + + * reader.c: + adjust logic in copy_action to avoid potential null-pointer dereference + (Coverity #56901) + + * reader.c: + adjust logic to avoid potential null-pointer dereference in compile_args + (Coverity #63407) + + * reader.c: eliminate strcpy into fixed-size buffer (Coverity #63408) + + * yacc.1: document changes made with respect to %parse-param + + * output.c: + add parameters from %parse-param to destructor. The order of the parameters + is intentionally inconsistent with yyparse/yyerror, for "compatibility" with + bison. + + * test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.tab.c: + regen + + * output.c: + use puts_param_types/puts_param_names to output lex_param data. + + * test/btyacc/ok_syntax1.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c, test/yacc/ok_syntax1.tab.c, test/yacc/calc2.tab.c, test/yacc/calc3.tab.c, test/btyacc/error.tab.c, test/btyacc/grammar.tab.c, test/btyacc/inherit0.tab.c, test/btyacc/inherit1.tab.c, test/btyacc/inherit2.tab.c, test/btyacc/pure_calc.tab.c, test/btyacc/pure_error.tab.c, test/btyacc/quote_calc-s.tab.c, test/btyacc/quote_calc.tab.c, test/btyacc/quote_calc2-s.tab.c, test/btyacc/quote_calc2.tab.c, test/btyacc/quote_calc3-s.tab.c, test/btyacc/quote_calc3.tab.c, test/btyacc/quote_calc4-s.tab.c, test/btyacc/quote_calc4.tab.c, test/btyacc/varsyntax_calc1.tab.c, test/btyacc/btyacc_calc1.tab.c, test/btyacc/btyacc_demo.tab.c, test/btyacc/calc.tab.c, test/btyacc/calc1.tab.c, test/btyacc/code_calc.code.c, test/btyacc/code_error.code.c, test/btyacc/empty.tab.c, test/btyacc/err_inherit3.tab.c, test/btyacc/err_inherit4.tab.c, test/btyacc/err_syntax10.tab.c, test/btyacc/err_syntax11.tab.c, test/btyacc/err_syntax12.tab.c , test/btyacc/err_syntax18.tab.c, test/btyacc/err_syntax20.tab.c, test/btyacc/rename_debug.c: + regen + + * btyaccpar.c: add casts, change types to fix strict compiler warnings + + * test/btyacc/err_syntax17.tab.c, test/btyacc/err_syntax19.tab.c, test/btyacc/err_syntax2.tab.c, test/btyacc/err_syntax21.tab.c, test/btyacc/err_syntax22.tab.c, test/btyacc/err_syntax23.tab.c, test/btyacc/err_syntax24.tab.c, test/btyacc/err_syntax25.tab.c, test/btyacc/err_syntax26.tab.c, test/btyacc/err_syntax27.tab.c, test/btyacc/err_syntax3.tab.c, test/btyacc/err_syntax4.tab.c, test/btyacc/err_syntax5.tab.c, test/btyacc/err_syntax6.tab.c, test/btyacc/err_syntax7.tab.c, test/btyacc/err_syntax7a.tab.c, test/btyacc/err_syntax7b.tab.c, test/btyacc/err_syntax8.tab.c, test/btyacc/err_syntax8a.tab.c, test/btyacc/err_syntax9.tab.c, test/btyacc/err_inherit1.tab.c, test/btyacc/err_inherit2.tab.c, test/btyacc/err_inherit5.tab.c, test/btyacc/err_syntax1.tab.c, test/btyacc/err_syntax13.tab.c, test/btyacc/err_syntax14.tab.c, test/btyacc/err_syntax15.tab.c, test/btyacc/err_syntax16.tab.c: + regen + + * output.c: gcc-warning + + * test/btyacc/code_calc.tab.c, test/btyacc/code_error.tab.c: regen + + * output.c: fix limit when merging real/workaround tables + + * output.c: + for btyacc, it is possible to have no conflicts - but in that case, the + "ctable" was not generated at all, while the skeleton uses the table. + The most straightforward (workaround) is generating a dummy table which + rejects any state. + + * test/btyacc_destroy3.y, test/btyacc_destroy2.y, test/btyacc_destroy1.y: + fix "make check_make" + + * test/yacc/calc3.tab.c, test/yacc/ok_syntax1.tab.c, test/yacc/calc2.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c: + regen + + * reader.c: + trim blanks from interim value in copy_param() to handle special case when + a space precedes a comma. + + * output.c: + use two new functions, puts_param_types and puts_param_names, to improve + format of the parse_param list (by trimming space after "*") as well as + correcting the output of the comma-separated names (only the last name + was output). + + * test/btyacc/ok_syntax1.tab.c, test/btyacc/btyacc_destroy3.tab.c, test/btyacc/calc2.tab.c, test/btyacc/calc3.tab.c: + regen + + * reader.c: + modify copy_param() to handle resulting comma-separated list. Before, it + only expected a single parameter. + +2014-10-04 Thomas E. Dickey + + * reader.c: split-out save_param() from copy_param() + + * reader.c: trim_blanks() did not always convert spaces - fix. + + * reader.c: fix some minor regressions with error-reporting + + * aclocal.m4: update CF_XOPEN_SOURCE for Unixware change from lynx + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * reader.c: + modify copy_param() to accept multiple parameters, each in curly braces like + recent bison, as well as honoring bison's undocumented feature to accept the + parameters as a comma-separated list. + + * test/btyacc/btyacc_destroy3.tab.c, test/btyacc/btyacc_destroy1.tab.c, test/btyacc/btyacc_destroy2.tab.c, test/btyacc/btyacc_destroy3.error, test/btyacc/btyacc_destroy3.output, test/btyacc/btyacc_destroy3.tab.h, test/btyacc/btyacc_destroy2.error, test/btyacc/btyacc_destroy2.output, test/btyacc/btyacc_destroy2.tab.h: + RCS_BASE + +2014-10-03 Thomas E. Dickey + + * test/btyacc/btyacc_demo2.error, test/btyacc/btyacc_demo2.output, test/btyacc/btyacc_demo2.tab.c, test/btyacc/btyacc_demo2.tab.h, test/btyacc/btyacc_destroy1.error, test/btyacc/btyacc_destroy1.output, test/btyacc/btyacc_destroy1.tab.h, test/btyacc_destroy3.y, test/btyacc_destroy1.y, test/btyacc_destroy2.y: + RCS_BASE + 2014-10-02 Thomas E. Dickey - * reader.c, defs.h: + * main.c, reader.c, defs.h: use calloc in get_line() when allocating line to ensure it is fully initialized, fixes a later uninitialized value in copy_param() (FreeBSD #193499). +2014-09-17 Thomas E. Dickey + + * closure.c, lalr.c, output.c, defs.h: + rephrase odd addressing to fix Coverity #48848, #38950, #38860, not actually + a bug. + +2014-09-01 Thomas E. Dickey + + * config.sub: update to 2014-07-28 + +2014-07-27 Thomas E. Dickey + + * configure: regen + + * aclocal.m4: modified to support port to Minix3.2 + + * package/pkgsrc/Makefile, VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec: + bump + 2014-07-15 Thomas E. Dickey * aclocal.m4: resync with my-autoconf (no change to configure script) Modified: stable/10/contrib/byacc/MANIFEST ============================================================================== --- stable/10/contrib/byacc/MANIFEST Sat Oct 11 19:28:22 2014 (r272954) +++ stable/10/contrib/byacc/MANIFEST Sat Oct 11 19:34:41 2014 (r272955) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20140715, version t20140715 +MANIFEST for byacc-20141005, version t20141005 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 Modified: stable/10/contrib/byacc/VERSION ============================================================================== --- stable/10/contrib/byacc/VERSION Sat Oct 11 19:28:22 2014 (r272954) +++ stable/10/contrib/byacc/VERSION Sat Oct 11 19:34:41 2014 (r272955) @@ -1 +1 @@ -20140715 +20141005 Modified: stable/10/contrib/byacc/aclocal.m4 ============================================================================== --- stable/10/contrib/byacc/aclocal.m4 Sat Oct 11 19:28:22 2014 (r272954) +++ stable/10/contrib/byacc/aclocal.m4 Sat Oct 11 19:34:41 2014 (r272955) @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.35 2014/07/15 19:38:05 tom Exp $ +dnl $Id: aclocal.m4,v 1.37 2014/10/04 16:40:06 tom Exp $ dnl Macros for byacc configure script (Thomas E. Dickey) dnl --------------------------------------------------------------------------- dnl Copyright 2004-2013,2014 Thomas E. Dickey @@ -54,7 +54,7 @@ define([CF_ACVERSION_COMPARE], [ifelse([$8], , ,[$8])], [ifelse([$9], , ,[$9])])])dnl dnl --------------------------------------------------------------------------- -dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42 +dnl CF_ADD_CFLAGS version: 11 updated: 2014/07/22 05:32:57 dnl ------------- dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS dnl The second parameter if given makes this macro verbose. @@ -79,7 +79,7 @@ no) -D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes @@ -116,7 +116,7 @@ yes) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; @@ -1085,7 +1085,7 @@ fi fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_XOPEN_SOURCE version: 46 updated: 2014/02/09 19:30:15 +dnl CF_XOPEN_SOURCE version: 48 updated: 2014/09/01 12:29:14 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, @@ -1136,6 +1136,9 @@ irix[[56]].*) #(vi linux*|gnu*|mint*|k*bsd*-gnu) #(vi CF_GNU_SOURCE ;; +minix*) #(vi + cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this... + ;; mirbsd*) #(vi # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks and other headers which use u_int / u_short types cf_XOPEN_SOURCE= @@ -1165,6 +1168,10 @@ solaris2.*) #(vi cf_xopen_source="-D__EXTENSIONS__" cf_cv_xopen_source=broken ;; +sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2) + cf_XOPEN_SOURCE= + cf_POSIX_C_SOURCE= + ;; *) CF_TRY_XOPEN_SOURCE CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) @@ -1172,7 +1179,7 @@ solaris2.*) #(vi esac if test -n "$cf_xopen_source" ; then - CF_ADD_CFLAGS($cf_xopen_source) + CF_ADD_CFLAGS($cf_xopen_source,true) fi dnl In anything but the default case, we may have system-specific setting Modified: stable/10/contrib/byacc/btyaccpar.c ============================================================================== --- stable/10/contrib/byacc/btyaccpar.c Sat Oct 11 19:28:22 2014 (r272954) +++ stable/10/contrib/byacc/btyaccpar.c Sat Oct 11 19:34:41 2014 (r272955) @@ -18,7 +18,7 @@ const char *const banner[] = { "/* original parser id follows */", "/* yysccsid[] = \"@(#)yaccpar 1.9 (Berkeley) 02/21/93\" */", - "/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */", + "/* (use YYMAJOR/YYMINOR for ifdefs dependent of parser version) */", "", "#define YYBYACC 1", CONCAT1("#define YYMAJOR ", YYMAJOR), @@ -56,7 +56,7 @@ const char *const tables[] = "#if YYBTYACC", "extern const YYINT yycindex[];", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "extern const YYINT yygindex[];", "extern const YYINT yytable[];", "extern const YYINT yycheck[];", @@ -64,7 +64,7 @@ const char *const tables[] = "#if YYBTYACC", "extern const YYINT yyctable[];", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "", "#if YYDEBUG", "extern const char *const yyname[];", @@ -127,7 +127,7 @@ const char *const hdr_defs[] = "#define YYLVQUEUEGROWTH 32", "#endif", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "", "/* define the initial stack-sizes */", "#ifdef YYSTACKSIZE", @@ -172,7 +172,7 @@ const char *const hdr_defs[] = "};", "typedef struct YYParseState_s YYParseState;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ 0 }; @@ -220,7 +220,7 @@ const char *const hdr_vars[] = "", "static short *yylexemes = 0;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ 0 }; @@ -277,7 +277,7 @@ const char *const body_vars[] = "", " static short *yylexemes = 0;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ 0 }; @@ -290,14 +290,14 @@ const char *const body_1[] = "#if YYBTYACC", "#define yytrial (yyps->save)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "", "#if YYDEBUG", - "#include /* needed for printf */", + "#include /* needed for printf */", "#endif", "", - "#include /* needed for malloc, etc */", - "#include /* needed for memset */", + "#include /* needed for malloc, etc */", + "#include /* needed for memset */", "", "/* allocate initial stack or double stack size, up to YYMAXDEPTH */", "static int yygrowstack(YYSTACKDATA *data)", @@ -404,7 +404,7 @@ const char *const body_1[] = " free(p);", "}", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "", "#define YYABORT goto yyabort", "#define YYREJECT goto yyabort", @@ -416,7 +416,7 @@ const char *const body_1[] = "#define YYVALID_NESTED do { if (yyps->save && \\", " yyps->save->save == 0) goto yyvalid; } while(0)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "", "int", "YYPARSE_DECL()", @@ -432,7 +432,7 @@ const char *const body_2[] = " int yynewerrflag;", " YYParseState *yyerrctx = NULL;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " YYLTYPE yyerror_loc_range[2]; /* position of error start & end */", "#endif", @@ -454,7 +454,7 @@ const char *const body_2[] = " yyps = yyNewState(0); if (yyps == 0) goto yyenomem;", " yyps->save = 0;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " yynerrs = 0;", " yyerrflag = 0;", " yychar = YYEMPTY;", @@ -495,8 +495,8 @@ const char *const body_2[] = " /* in trial mode; save scanner results for future parse attempts */", " if (yylvp == yylvlim)", " { /* Enlarge lexical value queue */", - " int p = yylvp - yylvals;", - " int s = yylvlim - yylvals;", + " size_t p = (size_t) (yylvp - yylvals);", + " size_t s = (size_t) (yylvlim - yylvals);", "", " s += YYLVQUEUEGROWTH;", " if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL) goto yyenomem;", @@ -524,13 +524,13 @@ const char *const body_2[] = " }", " /* normal operation, no conflict encountered */", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " yychar = YYLEX;", #if defined(YYBTYACC) "#if YYBTYACC", " } while (0);", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " if (yychar < 0) yychar = YYEOF;", " /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */", "#if YYDEBUG", @@ -544,7 +544,7 @@ const char *const body_2[] = "#if YYBTYACC", " if (!yytrial)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " fprintf(stderr, \" <%s>\", YYSTYPE_TOSTRING(yychar, yylval));", "#endif", " fputc('\\n', stderr);", @@ -598,12 +598,12 @@ const char *const body_2[] = " save->state = yystate;", " save->errflag = yyerrflag;", " save->yystack.s_mark = save->yystack.s_base + (yystack.s_mark - yystack.s_base);", - " memcpy (save->yystack.s_base, yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (save->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", " save->yystack.l_mark = save->yystack.l_base + (yystack.l_mark - yystack.l_base);", - " memcpy (save->yystack.l_base, yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", + " memcpy (save->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " save->yystack.p_mark = save->yystack.p_base + (yystack.p_mark - yystack.p_base);", - " memcpy (save->yystack.p_base, yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", + " memcpy (save->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", "#endif", " ctry = yytable[yyn];", " if (yyctable[ctry] == -1)", @@ -658,7 +658,7 @@ const char *const body_2[] = " yylexp--;", " yychar = YYEMPTY;", " }", - " save->lexeme = yylvp - yylvals;", + " save->lexeme = (int) (yylvp - yylvals);", " yyps->save = save;", " }", " if (yytable[yyn] == ctry)", @@ -695,7 +695,7 @@ const char *const body_2[] = " }", " } /* End of code dealing with conflicts */", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 &&", " yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)", " {", @@ -754,14 +754,14 @@ const char *const body_2[] = " yyerrctx->state = yystate;", " yyerrctx->errflag = yyerrflag;", " yyerrctx->yystack.s_mark = yyerrctx->yystack.s_base + (yystack.s_mark - yystack.s_base);", - " memcpy (yyerrctx->yystack.s_base, yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yyerrctx->yystack.s_base, yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", " yyerrctx->yystack.l_mark = yyerrctx->yystack.l_base + (yystack.l_mark - yystack.l_base);", - " memcpy (yyerrctx->yystack.l_base, yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", + " memcpy (yyerrctx->yystack.l_base, yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " yyerrctx->yystack.p_mark = yyerrctx->yystack.p_base + (yystack.p_mark - yystack.p_base);", - " memcpy (yyerrctx->yystack.p_base, yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", + " memcpy (yyerrctx->yystack.p_base, yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", "#endif", - " yyerrctx->lexeme = yylvp - yylvals;", + " yyerrctx->lexeme = (int) (yylvp - yylvals);", " }", " yylvp = yylvals + save->lexeme;", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", @@ -770,12 +770,12 @@ const char *const body_2[] = " yylexp = yylexemes + save->lexeme;", " yychar = YYEMPTY;", " yystack.s_mark = yystack.s_base + (save->yystack.s_mark - save->yystack.s_base);", - " memcpy (yystack.s_base, save->yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yystack.s_base, save->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", " yystack.l_mark = yystack.l_base + (save->yystack.l_mark - save->yystack.l_base);", - " memcpy (yystack.l_base, save->yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", + " memcpy (yystack.l_base, save->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " yystack.p_mark = yystack.p_base + (save->yystack.p_mark - save->yystack.p_base);", - " memcpy (yystack.p_base, save->yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", + " memcpy (yystack.p_base, save->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", "#endif", " ctry = ++save->ctry;", " yystate = save->state;", @@ -805,12 +805,12 @@ const char *const body_2[] = " yylloc = yylpp[-1];", "#endif", " yystack.s_mark = yystack.s_base + (yyerrctx->yystack.s_mark - yyerrctx->yystack.s_base);", - " memcpy (yystack.s_base, yyerrctx->yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yystack.s_base, yyerrctx->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", " yystack.l_mark = yystack.l_base + (yyerrctx->yystack.l_mark - yyerrctx->yystack.l_base);", - " memcpy (yystack.l_base, yyerrctx->yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", + " memcpy (yystack.l_base, yyerrctx->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " yystack.p_mark = yystack.p_base + (yyerrctx->yystack.p_mark - yyerrctx->yystack.p_base);", - " memcpy (yystack.p_base, yyerrctx->yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", + " memcpy (yystack.p_base, yyerrctx->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", "#endif", " yystate = yyerrctx->state;", " yyFreeState(yyerrctx);", @@ -820,7 +820,7 @@ const char *const body_2[] = " }", " if (yynewerrflag == 0) goto yyinrecovery;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "", " YYERROR_CALL(\"syntax error\");", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", @@ -876,7 +876,7 @@ const char *const body_2[] = "#if YYBTYACC", " if (!yytrial)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " YYDESTRUCT_CALL(\"error: discarding state\",", " yystos[*yystack.s_mark], yystack.l_mark, yystack.p_mark);", @@ -909,7 +909,7 @@ const char *const body_2[] = "#if YYBTYACC", " if (!yytrial)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " YYDESTRUCT_CALL(\"error: discarding token\", yychar, &yylval, &yylloc);", "#else", @@ -932,7 +932,7 @@ const char *const body_2[] = "#if YYBTYACC", " if (!yytrial)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " if (yym > 0)", " {", " int i;", @@ -961,7 +961,7 @@ const char *const body_2[] = "#if YYBTYACC", " if (!yytrial)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " {", " YYLLOC_DEFAULT(yyloc, &yystack.p_mark[1-yym], yym);", " /* just in case YYERROR is invoked within the action, save", @@ -998,7 +998,7 @@ const char *const trailer[] = "#if YYBTYACC", " if (!yytrial)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " fprintf(stderr, \"result is <%s>, \", YYSTYPE_TOSTRING(yystos[YYFINAL], yyval));", "#endif", " fprintf(stderr, \"shifting from state 0 to final state %d\\n\", YYFINAL);", @@ -1030,8 +1030,8 @@ const char *const trailer[] = " /* in trial mode; save scanner results for future parse attempts */", " if (yylvp == yylvlim)", " { /* Enlarge lexical value queue */", - " int p = yylvp - yylvals;", - " int s = yylvlim - yylvals;", + " size_t p = (size_t) (yylvp - yylvals);", + " size_t s = (size_t) (yylvlim - yylvals);", "", " s += YYLVQUEUEGROWTH;", " if ((yylexemes = (short *) realloc(yylexemes, s * sizeof(short))) == NULL)", @@ -1062,13 +1062,13 @@ const char *const trailer[] = " }", " /* normal operation, no conflict encountered */", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " yychar = YYLEX;", #if defined(YYBTYACC) "#if YYBTYACC", " } while (0);", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " if (yychar < 0) yychar = YYEOF;", " /* if ((yychar = YYLEX) < 0) yychar = YYEOF; */", "#if YYDEBUG", @@ -1097,7 +1097,7 @@ const char *const trailer[] = "#if YYBTYACC", " if (!yytrial)", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " fprintf(stderr, \"result is <%s>, \", YYSTYPE_TOSTRING(yystos[yystate], yyval));", "#endif", " fprintf(stderr, \"shifting from state %d to state %d\\n\", *yystack.s_mark, yystate);", @@ -1140,17 +1140,17 @@ const char *const trailer[] = " yylexp = yylexemes + yypath->lexeme;", " yychar = YYEMPTY;", " yystack.s_mark = yystack.s_base + (yypath->yystack.s_mark - yypath->yystack.s_base);", - " memcpy (yystack.s_base, yypath->yystack.s_base, (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", + " memcpy (yystack.s_base, yypath->yystack.s_base, (size_t) (yystack.s_mark - yystack.s_base + 1) * sizeof(short));", " yystack.l_mark = yystack.l_base + (yypath->yystack.l_mark - yypath->yystack.l_base);", - " memcpy (yystack.l_base, yypath->yystack.l_base, (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", + " memcpy (yystack.l_base, yypath->yystack.l_base, (size_t) (yystack.l_mark - yystack.l_base + 1) * sizeof(YYSTYPE));", "#if defined(YYLTYPE) || defined(YYLTYPE_IS_DECLARED)", " yystack.p_mark = yystack.p_base + (yypath->yystack.p_mark - yypath->yystack.p_base);", - " memcpy (yystack.p_base, yypath->yystack.p_base, (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", + " memcpy (yystack.p_base, yypath->yystack.p_base, (size_t) (yystack.p_mark - yystack.p_base + 1) * sizeof(YYLTYPE));", "#endif", " yystate = yypath->state;", " goto yyloop;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ "", "yyoverflow:", " YYERROR_CALL(\"yacc stack overflow\");", @@ -1161,7 +1161,7 @@ const char *const trailer[] = " YYERROR_CALL(\"memory exhausted\");", "yyabort_nomem:", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " yyresult = 2;", " goto yyreturn;", "", @@ -1174,7 +1174,7 @@ const char *const trailer[] = "#if YYBTYACC", " if (yyps->save) goto yyvalid;", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " yyresult = 0;", "", "yyreturn:", @@ -1224,7 +1224,7 @@ const char *const trailer[] = " yyFreeState(save);", " }", "#endif /* YYBTYACC */", -#endif /* defined(YYBTYACC) */ +#endif /* defined(YYBTYACC) */ " yyfreestack(&yystack);", " return (yyresult);", "}", Modified: stable/10/contrib/byacc/closure.c ============================================================================== --- stable/10/contrib/byacc/closure.c Sat Oct 11 19:28:22 2014 (r272954) +++ stable/10/contrib/byacc/closure.c Sat Oct 11 19:34:41 2014 (r272955) @@ -1,4 +1,4 @@ -/* $Id: closure.c,v 1.10 2014/02/19 00:45:42 Tom.Shields Exp $ */ +/* $Id: closure.c,v 1.11 2014/09/18 00:40:07 tom Exp $ */ #include "defs.h" @@ -6,6 +6,7 @@ Value_t *itemset; Value_t *itemsetend; unsigned *ruleset; +static unsigned *first_base; static unsigned *first_derives; static unsigned *EFF; @@ -68,7 +69,8 @@ set_first_derives(void) rulesetsize = WORDSIZE(nrules); varsetsize = WORDSIZE(nvars); - first_derives = NEW2(nvars * rulesetsize, unsigned) - ntokens * rulesetsize; + first_base = NEW2(nvars * rulesetsize, unsigned); + first_derives = first_base - ntokens * rulesetsize; set_EFF(); @@ -176,7 +178,7 @@ finalize_closure(void) { FREE(itemset); FREE(ruleset); - FREE(first_derives + ntokens * WORDSIZE(nrules)); + FREE(first_base); } #ifdef DEBUG Modified: stable/10/contrib/byacc/config.sub ============================================================================== --- stable/10/contrib/byacc/config.sub Sat Oct 11 19:28:22 2014 (r272954) +++ stable/10/contrib/byacc/config.sub Sat Oct 11 19:34:41 2014 (r272955) @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2014-04-03' +timestamp='2014-07-28' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -283,8 +283,10 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ @@ -401,8 +403,10 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ @@ -824,6 +828,10 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -1369,7 +1377,7 @@ case $os in | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ Modified: stable/10/contrib/byacc/configure ============================================================================== --- stable/10/contrib/byacc/configure Sat Oct 11 19:28:22 2014 (r272954) +++ stable/10/contrib/byacc/configure Sat Oct 11 19:34:41 2014 (r272955) @@ -1936,7 +1936,7 @@ no) -D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes @@ -1977,7 +1977,7 @@ yes) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; @@ -2498,6 +2498,9 @@ echo "${ECHO_T}$cf_cv_gnu_source" >&6 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" ;; +minix*) #(vi + cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this... + ;; mirbsd*) #(vi # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks and other headers which use u_int / u_short types cf_XOPEN_SOURCE= @@ -2515,16 +2518,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAG sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` -echo "$as_me:2518: checking if we should define _POSIX_C_SOURCE" >&5 +echo "$as_me:2521: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else -echo "${as_me:-configure}:2524: testing if the symbol is already defined go no further ..." 1>&5 +echo "${as_me:-configure}:2527: testing if the symbol is already defined go no further ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 2527 "configure" +#line 2530 "configure" #include "confdefs.h" #include int @@ -2539,16 +2542,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2542: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2545: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2545: \$? = $ac_status" >&5 + echo "$as_me:2548: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2548: \"$ac_try\"") >&5 + { (eval echo "$as_me:2551: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2551: \$? = $ac_status" >&5 + echo "$as_me:2554: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_posix_c_source=no else @@ -2569,7 +2572,7 @@ cf_want_posix_source=no esac if test "$cf_want_posix_source" = yes ; then cat >conftest.$ac_ext <<_ACEOF -#line 2572 "configure" +#line 2575 "configure" #include "confdefs.h" #include int @@ -2584,16 +2587,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2587: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2590: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2590: \$? = $ac_status" >&5 + echo "$as_me:2593: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2593: \"$ac_try\"") >&5 + { (eval echo "$as_me:2596: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2596: \$? = $ac_status" >&5 + echo "$as_me:2599: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -2604,15 +2607,15 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "${as_me:-configure}:2607: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 +echo "${as_me:-configure}:2610: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source" -echo "${as_me:-configure}:2612: testing if the second compile does not leave our definition intact error ..." 1>&5 +echo "${as_me:-configure}:2615: testing if the second compile does not leave our definition intact error ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 2615 "configure" +#line 2618 "configure" #include "confdefs.h" #include int @@ -2627,16 +2630,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2630: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2633: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2633: \$? = $ac_status" >&5 + echo "$as_me:2636: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2636: \"$ac_try\"") >&5 + { (eval echo "$as_me:2639: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2639: \$? = $ac_status" >&5 + echo "$as_me:2642: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -2652,7 +2655,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2655: result: $cf_cv_posix_c_source" >&5 +echo "$as_me:2658: result: $cf_cv_posix_c_source" >&5 echo "${ECHO_T}$cf_cv_posix_c_source" >&6 if test "$cf_cv_posix_c_source" != no ; then @@ -2674,7 +2677,7 @@ no) -D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes @@ -2715,7 +2718,7 @@ yes) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; @@ -2766,14 +2769,14 @@ solaris2.*) #(vi ;; *) -echo "$as_me:2769: checking if we should define _XOPEN_SOURCE" >&5 +echo "$as_me:2772: checking if we should define _XOPEN_SOURCE" >&5 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 if test "${cf_cv_xopen_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 2776 "configure" +#line 2779 "configure" #include "confdefs.h" #include @@ -2792,16 +2795,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2795: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2798: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2798: \$? = $ac_status" >&5 + echo "$as_me:2801: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2801: \"$ac_try\"") >&5 + { (eval echo "$as_me:2804: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2804: \$? = $ac_status" >&5 + echo "$as_me:2807: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_xopen_source=no else @@ -2810,7 +2813,7 @@ cat conftest.$ac_ext >&5 cf_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat >conftest.$ac_ext <<_ACEOF -#line 2813 "configure" +#line 2816 "configure" #include "confdefs.h" #include @@ -2829,16 +2832,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2832: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2835: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2835: \$? = $ac_status" >&5 + echo "$as_me:2838: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2838: \"$ac_try\"") >&5 + { (eval echo "$as_me:2841: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2841: \$? = $ac_status" >&5 + echo "$as_me:2844: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_xopen_source=no else @@ -2853,7 +2856,7 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:2856: result: $cf_cv_xopen_source" >&5 +echo "$as_me:2859: result: $cf_cv_xopen_source" >&5 echo "${ECHO_T}$cf_cv_xopen_source" >&6 if test "$cf_cv_xopen_source" != no ; then @@ -2883,7 +2886,7 @@ no) -D*) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes @@ -2924,7 +2927,7 @@ yes) cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'` - test "${cf_add_cflags}" != "${cf_tst_cflags}" \ + test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; @@ -2961,16 +2964,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAG sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` -echo "$as_me:2964: checking if we should define _POSIX_C_SOURCE" >&5 +echo "$as_me:2967: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else -echo "${as_me:-configure}:2970: testing if the symbol is already defined go no further ..." 1>&5 +echo "${as_me:-configure}:2973: testing if the symbol is already defined go no further ..." 1>&5 cat >conftest.$ac_ext <<_ACEOF -#line 2973 "configure" +#line 2976 "configure" #include "confdefs.h" #include int @@ -2985,16 +2988,16 @@ make an error } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:2988: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:2991: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:2991: \$? = $ac_status" >&5 + echo "$as_me:2994: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:2994: \"$ac_try\"") >&5 + { (eval echo "$as_me:2997: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:2997: \$? = $ac_status" >&5 + echo "$as_me:3000: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cf_cv_posix_c_source=no else @@ -3015,7 +3018,7 @@ cf_want_posix_source=no esac if test "$cf_want_posix_source" = yes ; then cat >conftest.$ac_ext <<_ACEOF -#line 3018 "configure" +#line 3021 "configure" #include "confdefs.h" #include int @@ -3030,16 +3033,16 @@ make an error } _ACEOF *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 19:38:31 2014 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 705533F2; Sat, 11 Oct 2014 19:38: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 56798EC4; Sat, 11 Oct 2014 19:38: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 s9BJcViJ045645; Sat, 11 Oct 2014 19:38:31 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BJcUCM045640; Sat, 11 Oct 2014 19:38:30 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201410111938.s9BJcUCM045640@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sat, 11 Oct 2014 19:38:30 +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: r272957 - in stable/10/contrib/byacc: . package package/debian package/debian/source package/pkgsrc 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.18-1 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, 11 Oct 2014 19:38:31 -0000 Author: rodrigc Date: Sat Oct 11 19:38:29 2014 New Revision: 272957 URL: https://svnweb.freebsd.org/changeset/base/272957 Log: Merge: r272769 Import byacc 20141006 PR: 193499 Modified: stable/10/contrib/byacc/CHANGES stable/10/contrib/byacc/MANIFEST stable/10/contrib/byacc/VERSION stable/10/contrib/byacc/configure stable/10/contrib/byacc/configure.in stable/10/contrib/byacc/main.c stable/10/contrib/byacc/package/byacc.spec stable/10/contrib/byacc/package/debian/changelog stable/10/contrib/byacc/package/debian/source/format stable/10/contrib/byacc/package/mingw-byacc.spec stable/10/contrib/byacc/package/pkgsrc/Makefile stable/10/contrib/byacc/reader.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/byacc/CHANGES ============================================================================== --- stable/10/contrib/byacc/CHANGES Sat Oct 11 19:36:59 2014 (r272956) +++ stable/10/contrib/byacc/CHANGES Sat Oct 11 19:38:29 2014 (r272957) @@ -1,3 +1,23 @@ +2014-10-06 Thomas E. Dickey + + * package/debian/source/format: + change to native format to work around regression in Debian packaging. + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * configure: regen + + * main.c: + correct parameter for umask - for very old mkstemp's - and use type mode_t + to quiet compiler warning + + * configure.in: add configure check for mode_t + + * reader.c: + better fix for get_line, by ensuring there is enough space to null-terminate + its result (prompted by discussion with Craig Rodrigues). + 2014-10-05 Thomas E. Dickey * main.c: Modified: stable/10/contrib/byacc/MANIFEST ============================================================================== --- stable/10/contrib/byacc/MANIFEST Sat Oct 11 19:36:59 2014 (r272956) +++ stable/10/contrib/byacc/MANIFEST Sat Oct 11 19:38:29 2014 (r272957) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20141005, version t20141005 +MANIFEST for byacc-20141006, version t20141006 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 Modified: stable/10/contrib/byacc/VERSION ============================================================================== --- stable/10/contrib/byacc/VERSION Sat Oct 11 19:36:59 2014 (r272956) +++ stable/10/contrib/byacc/VERSION Sat Oct 11 19:38:29 2014 (r272957) @@ -1 +1 @@ -20141005 +20141006 Modified: stable/10/contrib/byacc/configure ============================================================================== --- stable/10/contrib/byacc/configure Sat Oct 11 19:36:59 2014 (r272956) +++ stable/10/contrib/byacc/configure Sat Oct 11 19:38:29 2014 (r272957) @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.19 . +# From configure.in Revision: 1.20 . # Guess values for system-dependent variables and create Makefiles. # Generated by Autoconf 2.52.20121002. # @@ -106,6 +106,42 @@ SHELL=${CONFIG_SHELL-/bin/sh} : ${ac_max_here_lines=38} ac_unique_file="main.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" # Initialize some variables set by options. ac_init_help= @@ -854,7 +890,7 @@ if test -z "$CONFIG_SITE"; then fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then - { echo "$as_me:857: loading site script $ac_site_file" >&5 + { echo "$as_me:893: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} cat "$ac_site_file" >&5 . "$ac_site_file" @@ -865,7 +901,7 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:868: loading cache $cache_file" >&5 + { echo "$as_me:904: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; @@ -873,7 +909,7 @@ echo "$as_me: loading cache $cache_file" esac fi else - { echo "$as_me:876: creating cache $cache_file" >&5 + { echo "$as_me:912: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -889,21 +925,21 @@ for ac_var in `(set) 2>&1 | eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:892: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { echo "$as_me:928: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:896: error: \`$ac_var' was not set in the previous run" >&5 + { echo "$as_me:932: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:902: error: \`$ac_var' has changed since the previous run:" >&5 + { echo "$as_me:938: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:904: former value: $ac_old_val" >&5 + { echo "$as_me:940: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:906: current value: $ac_new_val" >&5 + { echo "$as_me:942: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; @@ -922,9 +958,9 @@ echo "$as_me: current value: $ac_new_v fi done if $ac_cache_corrupted; then - { echo "$as_me:925: error: changes in the environment can compromise the build" >&5 + { echo "$as_me:961: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:927: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 + { { echo "$as_me:963: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi @@ -945,10 +981,10 @@ esac echo "#! $SHELL" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh -if { (echo "$as_me:948: PATH=\".;.\"; conftest.sh") >&5 +if { (echo "$as_me:984: PATH=\".;.\"; conftest.sh") >&5 (PATH=".;."; conftest.sh) 2>&5 ac_status=$? - echo "$as_me:951: \$? = $ac_status" >&5 + echo "$as_me:987: \$? = $ac_status" >&5 (exit $ac_status); }; then ac_path_separator=';' else @@ -976,7 +1012,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:979: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 + { { echo "$as_me:1015: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi @@ -986,11 +1022,11 @@ ac_configure="$SHELL $ac_aux_dir/configu # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:989: error: cannot run $ac_config_sub" >&5 + { { echo "$as_me:1025: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:993: checking build system type" >&5 +echo "$as_me:1029: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -999,23 +1035,23 @@ else test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && - { { echo "$as_me:1002: error: cannot guess build type; you must specify one" >&5 + { { echo "$as_me:1038: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:1006: error: $ac_config_sub $ac_cv_build_alias failed." >&5 + { { echo "$as_me:1042: error: $ac_config_sub $ac_cv_build_alias failed." >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1011: result: $ac_cv_build" >&5 +echo "$as_me:1047: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$as_me:1018: checking host system type" >&5 +echo "$as_me:1054: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1024,12 +1060,12 @@ else test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:1027: error: $ac_config_sub $ac_cv_host_alias failed" >&5 + { { echo "$as_me:1063: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1032: result: $ac_cv_host" >&5 +echo "$as_me:1068: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` @@ -1037,7 +1073,7 @@ host_vendor=`echo $ac_cv_host | sed 's/^ host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then - echo "$as_me:1040: checking target system type" >&5 + echo "$as_me:1076: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6 if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1046,12 +1082,12 @@ else test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || - { { echo "$as_me:1049: error: $ac_config_sub $ac_cv_target_alias failed" >&5 + { { echo "$as_me:1085: error: $ac_config_sub $ac_cv_target_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:1054: result: $ac_cv_target" >&5 +echo "$as_me:1090: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6 target=$ac_cv_target target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` @@ -1083,13 +1119,13 @@ else fi test -z "$system_name" && system_name="$cf_cv_system_name" -test -n "$cf_cv_system_name" && echo "$as_me:1086: result: Configuring for $cf_cv_system_name" >&5 +test -n "$cf_cv_system_name" && echo "$as_me:1122: result: Configuring for $cf_cv_system_name" >&5 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6 if test ".$system_name" != ".$cf_cv_system_name" ; then - echo "$as_me:1090: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 + echo "$as_me:1126: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6 - { { echo "$as_me:1092: error: \"Please remove config.cache and try again.\"" >&5 + { { echo "$as_me:1128: error: \"Please remove config.cache and try again.\"" >&5 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;} { (exit 1); exit 1; }; } fi @@ -1116,7 +1152,7 @@ ac_main_return=return if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:1119: checking for $ac_word" >&5 +echo "$as_me:1155: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1131,7 +1167,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}gcc" -echo "$as_me:1134: found $ac_dir/$ac_word" >&5 +echo "$as_me:1170: found $ac_dir/$ac_word" >&5 break done @@ -1139,10 +1175,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1142: result: $CC" >&5 + echo "$as_me:1178: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1145: result: no" >&5 + echo "$as_me:1181: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1151,7 +1187,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:1154: checking for $ac_word" >&5 +echo "$as_me:1190: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1166,7 +1202,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="gcc" -echo "$as_me:1169: found $ac_dir/$ac_word" >&5 +echo "$as_me:1205: found $ac_dir/$ac_word" >&5 break done @@ -1174,10 +1210,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1177: result: $ac_ct_CC" >&5 + echo "$as_me:1213: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1180: result: no" >&5 + echo "$as_me:1216: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1190,7 +1226,7 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:1193: checking for $ac_word" >&5 +echo "$as_me:1229: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1205,7 +1241,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}cc" -echo "$as_me:1208: found $ac_dir/$ac_word" >&5 +echo "$as_me:1244: found $ac_dir/$ac_word" >&5 break done @@ -1213,10 +1249,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1216: result: $CC" >&5 + echo "$as_me:1252: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1219: result: no" >&5 + echo "$as_me:1255: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1225,7 +1261,7 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1228: checking for $ac_word" >&5 +echo "$as_me:1264: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1240,7 +1276,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="cc" -echo "$as_me:1243: found $ac_dir/$ac_word" >&5 +echo "$as_me:1279: found $ac_dir/$ac_word" >&5 break done @@ -1248,10 +1284,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1251: result: $ac_ct_CC" >&5 + echo "$as_me:1287: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1254: result: no" >&5 + echo "$as_me:1290: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1264,7 +1300,7 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:1267: checking for $ac_word" >&5 +echo "$as_me:1303: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1284,7 +1320,7 @@ if test "$ac_dir/$ac_word" = "/usr/ucb/c continue fi ac_cv_prog_CC="cc" -echo "$as_me:1287: found $ac_dir/$ac_word" >&5 +echo "$as_me:1323: found $ac_dir/$ac_word" >&5 break done @@ -1306,10 +1342,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1309: result: $CC" >&5 + echo "$as_me:1345: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1312: result: no" >&5 + echo "$as_me:1348: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1320,7 +1356,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:1323: checking for $ac_word" >&5 +echo "$as_me:1359: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1335,7 +1371,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="$ac_tool_prefix$ac_prog" -echo "$as_me:1338: found $ac_dir/$ac_word" >&5 +echo "$as_me:1374: found $ac_dir/$ac_word" >&5 break done @@ -1343,10 +1379,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:1346: result: $CC" >&5 + echo "$as_me:1382: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else - echo "$as_me:1349: result: no" >&5 + echo "$as_me:1385: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1359,7 +1395,7 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:1362: checking for $ac_word" >&5 +echo "$as_me:1398: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1374,7 +1410,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="$ac_prog" -echo "$as_me:1377: found $ac_dir/$ac_word" >&5 +echo "$as_me:1413: found $ac_dir/$ac_word" >&5 break done @@ -1382,10 +1418,10 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:1385: result: $ac_ct_CC" >&5 + echo "$as_me:1421: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else - echo "$as_me:1388: result: no" >&5 + echo "$as_me:1424: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -1397,32 +1433,32 @@ fi fi -test -z "$CC" && { { echo "$as_me:1400: error: no acceptable cc found in \$PATH" >&5 +test -z "$CC" && { { echo "$as_me:1436: error: no acceptable cc found in \$PATH" >&5 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:1405:" \ +echo "$as_me:1441:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:1408: \"$ac_compiler --version &5\"") >&5 +{ (eval echo "$as_me:1444: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? - echo "$as_me:1411: \$? = $ac_status" >&5 + echo "$as_me:1447: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1413: \"$ac_compiler -v &5\"") >&5 +{ (eval echo "$as_me:1449: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? - echo "$as_me:1416: \$? = $ac_status" >&5 + echo "$as_me:1452: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:1418: \"$ac_compiler -V &5\"") >&5 +{ (eval echo "$as_me:1454: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? - echo "$as_me:1421: \$? = $ac_status" >&5 + echo "$as_me:1457: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF -#line 1425 "configure" +#line 1461 "configure" #include "confdefs.h" int @@ -1438,13 +1474,13 @@ ac_clean_files="$ac_clean_files a.out a. # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:1441: checking for C compiler default output" >&5 +echo "$as_me:1477: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:1444: \"$ac_link_default\"") >&5 +if { (eval echo "$as_me:1480: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? - echo "$as_me:1447: \$? = $ac_status" >&5 + echo "$as_me:1483: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last @@ -1467,34 +1503,34 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1470: error: C compiler cannot create executables" >&5 +{ { echo "$as_me:1506: error: C compiler cannot create executables" >&5 echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:1476: result: $ac_file" >&5 +echo "$as_me:1512: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1481: checking whether the C compiler works" >&5 +echo "$as_me:1517: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:1487: \"$ac_try\"") >&5 + { (eval echo "$as_me:1523: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1490: \$? = $ac_status" >&5 + echo "$as_me:1526: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:1497: error: cannot run C compiled programs. + { { echo "$as_me:1533: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&2;} @@ -1502,24 +1538,24 @@ If you meant to cross compile, use \`--h fi fi fi -echo "$as_me:1505: result: yes" >&5 +echo "$as_me:1541: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:1512: checking whether we are cross compiling" >&5 +echo "$as_me:1548: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:1514: result: $cross_compiling" >&5 +echo "$as_me:1550: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 -echo "$as_me:1517: checking for executable suffix" >&5 +echo "$as_me:1553: checking for executable suffix" >&5 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 -if { (eval echo "$as_me:1519: \"$ac_link\"") >&5 +if { (eval echo "$as_me:1555: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? - echo "$as_me:1522: \$? = $ac_status" >&5 + echo "$as_me:1558: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -1535,25 +1571,25 @@ for ac_file in `(ls conftest.exe; ls con esac done else - { { echo "$as_me:1538: error: cannot compute EXEEXT: cannot compile and link" >&5 + { { echo "$as_me:1574: error: cannot compute EXEEXT: cannot compile and link" >&5 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:1544: result: $ac_cv_exeext" >&5 +echo "$as_me:1580: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:1550: checking for object suffix" >&5 +echo "$as_me:1586: checking for object suffix" >&5 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1556 "configure" +#line 1592 "configure" #include "confdefs.h" int @@ -1565,10 +1601,10 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:1568: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1604: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1571: \$? = $ac_status" >&5 + echo "$as_me:1607: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in @@ -1580,24 +1616,24 @@ done else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -{ { echo "$as_me:1583: error: cannot compute OBJEXT: cannot compile" >&5 +{ { echo "$as_me:1619: error: cannot compute OBJEXT: cannot compile" >&5 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:1590: result: $ac_cv_objext" >&5 +echo "$as_me:1626: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:1594: checking whether we are using the GNU C compiler" >&5 +echo "$as_me:1630: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1600 "configure" +#line 1636 "configure" #include "confdefs.h" int @@ -1612,16 +1648,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1615: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1651: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1618: \$? = $ac_status" >&5 + echo "$as_me:1654: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1621: \"$ac_try\"") >&5 + { (eval echo "$as_me:1657: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1624: \$? = $ac_status" >&5 + echo "$as_me:1660: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else @@ -1633,19 +1669,19 @@ rm -f conftest.$ac_objext conftest.$ac_e ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:1636: result: $ac_cv_c_compiler_gnu" >&5 +echo "$as_me:1672: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" -echo "$as_me:1642: checking whether $CC accepts -g" >&5 +echo "$as_me:1678: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF -#line 1648 "configure" +#line 1684 "configure" #include "confdefs.h" int @@ -1657,16 +1693,16 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1660: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1696: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1663: \$? = $ac_status" >&5 + echo "$as_me:1699: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1666: \"$ac_try\"") >&5 + { (eval echo "$as_me:1702: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1669: \$? = $ac_status" >&5 + echo "$as_me:1705: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else @@ -1676,7 +1712,7 @@ ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:1679: result: $ac_cv_prog_cc_g" >&5 +echo "$as_me:1715: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -1703,16 +1739,16 @@ cat >conftest.$ac_ext <<_ACEOF #endif _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1706: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1742: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1709: \$? = $ac_status" >&5 + echo "$as_me:1745: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1712: \"$ac_try\"") >&5 + { (eval echo "$as_me:1748: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1715: \$? = $ac_status" >&5 + echo "$as_me:1751: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ @@ -1724,7 +1760,7 @@ if { (eval echo "$as_me:1706: \"$ac_comp 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF -#line 1727 "configure" +#line 1763 "configure" #include "confdefs.h" #include $ac_declaration @@ -1737,16 +1773,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1740: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1776: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1743: \$? = $ac_status" >&5 + echo "$as_me:1779: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1746: \"$ac_try\"") >&5 + { (eval echo "$as_me:1782: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1749: \$? = $ac_status" >&5 + echo "$as_me:1785: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else @@ -1756,7 +1792,7 @@ continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF -#line 1759 "configure" +#line 1795 "configure" #include "confdefs.h" $ac_declaration int @@ -1768,16 +1804,16 @@ exit (42); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:1771: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1807: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1774: \$? = $ac_status" >&5 + echo "$as_me:1810: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1777: \"$ac_try\"") >&5 + { (eval echo "$as_me:1813: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1780: \$? = $ac_status" >&5 + echo "$as_me:1816: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else @@ -1807,15 +1843,15 @@ ac_main_return=return GCC_VERSION=none if test "$GCC" = yes ; then - echo "$as_me:1810: checking version of $CC" >&5 + echo "$as_me:1846: checking version of $CC" >&5 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown - echo "$as_me:1814: result: $GCC_VERSION" >&5 + echo "$as_me:1850: result: $GCC_VERSION" >&5 echo "${ECHO_T}$GCC_VERSION" >&6 fi -echo "$as_me:1818: checking for $CC option to accept ANSI C" >&5 +echo "$as_me:1854: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1823,7 +1859,7 @@ else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF -#line 1826 "configure" +#line 1862 "configure" #include "confdefs.h" #include #include @@ -1872,16 +1908,16 @@ for ac_arg in "" -qlanglvl=ansi -std1 -A do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:1875: \"$ac_compile\"") >&5 +if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? - echo "$as_me:1878: \$? = $ac_status" >&5 + echo "$as_me:1914: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:1881: \"$ac_try\"") >&5 + { (eval echo "$as_me:1917: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:1884: \$? = $ac_status" >&5 + echo "$as_me:1920: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break @@ -1898,10 +1934,10 @@ fi case "x$ac_cv_prog_cc_stdc" in x|xno) - echo "$as_me:1901: result: none needed" >&5 + echo "$as_me:1937: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) - echo "$as_me:1904: result: $ac_cv_prog_cc_stdc" >&5 + echo "$as_me:1940: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac @@ -1909,13 +1945,13 @@ esac # This should have been defined by AC_PROG_CC : ${CC:=cc} -echo "$as_me:1912: checking \$CC variable" >&5 +echo "$as_me:1948: checking \$CC variable" >&5 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6 case "$CC" in #(vi *[\ \ ]-[IUD]*) - echo "$as_me:1916: result: broken" >&5 + echo "$as_me:1952: result: broken" >&5 echo "${ECHO_T}broken" >&6 - { echo "$as_me:1918: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 + { echo "$as_me:1954: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;} # humor him... cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'` @@ -2001,12 +2037,12 @@ fi ;; *) - echo "$as_me:2004: result: ok" >&5 + echo "$as_me:2040: result: ok" >&5 echo "${ECHO_T}ok" >&6 ;; esac -echo "$as_me:2009: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "$as_me:2045: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then @@ -2026,11 +2062,11 @@ fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:2029: result: yes" >&5 + echo "$as_me:2065: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else - echo "$as_me:2033: result: no" >&5 + echo "$as_me:2069: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi @@ -2047,7 +2083,7 @@ fi # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:2050: checking for a BSD compatible install" >&5 +echo "$as_me:2086: checking for a BSD compatible install" >&5 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then @@ -2096,7 +2132,7 @@ fi INSTALL=$ac_install_sh fi fi -echo "$as_me:2099: result: $INSTALL" >&5 +echo "$as_me:2135: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2107,7 +2143,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo "$as_me:2110: checking if filesystem supports mixed-case filenames" >&5 +echo "$as_me:2146: checking if filesystem supports mixed-case filenames" >&5 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6 if test "${cf_cv_mixedcase+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2134,7 +2170,7 @@ else fi fi -echo "$as_me:2137: result: $cf_cv_mixedcase" >&5 +echo "$as_me:2173: result: $cf_cv_mixedcase" >&5 echo "${ECHO_T}$cf_cv_mixedcase" >&6 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF @@ -2145,7 +2181,7 @@ for ac_prog in exctags ctags do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 20:35:37 2014 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 4B4755AF; Sat, 11 Oct 2014 20:35: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 37A3763F; Sat, 11 Oct 2014 20:35: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 s9BKZbDV074059; Sat, 11 Oct 2014 20:35:37 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BKZbC8074058; Sat, 11 Oct 2014 20:35:37 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201410112035.s9BKZbC8074058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sat, 11 Oct 2014 20:35: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: r272960 - stable/10/sbin/swapon 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.18-1 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, 11 Oct 2014 20:35:37 -0000 Author: hrs Date: Sat Oct 11 20:35:36 2014 New Revision: 272960 URL: https://svnweb.freebsd.org/changeset/base/272960 Log: MFC r272885: Do not add late flag when file= is specified because it has a bad side-effect. The specified file should exist before the fstab line. Modified: stable/10/sbin/swapon/swapon.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/swapon/swapon.c ============================================================================== --- stable/10/sbin/swapon/swapon.c Sat Oct 11 20:28:04 2014 (r272959) +++ stable/10/sbin/swapon/swapon.c Sat Oct 11 20:35:36 2014 (r272960) @@ -172,15 +172,8 @@ main(int argc, char **argv) continue; if (strstr(fsp->fs_mntops, "noauto") != NULL) continue; - /* - * Forcibly enable "late" option when file= is - * specified. This is because mounting file - * systems with rw option is typically - * required to make the backing store ready. - */ if (which_prog != SWAPOFF && - (strstr(fsp->fs_mntops, "late") != NULL || - strstr(fsp->fs_mntops, "file=") != NULL) && + strstr(fsp->fs_mntops, "late") && late == 0) continue; swfile = swap_on_off(fsp->fs_spec, 1, From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 21:54:24 2014 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 02EFB53F; Sat, 11 Oct 2014 21:54: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 E2DDBCD7; Sat, 11 Oct 2014 21:54: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 s9BLsNkx011621; Sat, 11 Oct 2014 21:54:23 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BLsNJp011620; Sat, 11 Oct 2014 21:54:23 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201410112154.s9BLsNJp011620@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sat, 11 Oct 2014 21:54: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: r272964 - stable/10/etc/mtree 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.18-1 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, 11 Oct 2014 21:54:24 -0000 Author: rodrigc Date: Sat Oct 11 21:54:23 2014 New Revision: 272964 URL: https://svnweb.freebsd.org/changeset/base/272964 Log: Merge: r268812 Add the mtree entry for yacc tests Modified: stable/10/etc/mtree/BSD.tests.dist Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sat Oct 11 21:53:06 2014 (r272963) +++ stable/10/etc/mtree/BSD.tests.dist Sat Oct 11 21:54:23 2014 (r272964) @@ -264,6 +264,8 @@ xargs .. yacc + yacc + .. .. .. usr.sbin From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 22:08:53 2014 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 B0625AF8; Sat, 11 Oct 2014 22:08: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 9C2DBDD9; Sat, 11 Oct 2014 22:08: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 s9BM8r2Q017320; Sat, 11 Oct 2014 22:08:53 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BM8rlC017319; Sat, 11 Oct 2014 22:08:53 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201410112208.s9BM8rlC017319@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 11 Oct 2014 22:08: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: r272965 - 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.18-1 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, 11 Oct 2014 22:08:53 -0000 Author: adrian Date: Sat Oct 11 22:08:53 2014 New Revision: 272965 URL: https://svnweb.freebsd.org/changeset/base/272965 Log: Merge r271647 - Fix a double-free of mbufs in rx_ixgbe_discard(). fmp->buf at the free point is already part of the chain being freed, so double-freeing is counter-productive. Submitted by: Marc De La Gueronniere Sponsored by: Verisign, Inc. Modified: stable/10/sys/dev/ixgbe/ixgbe.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.c Sat Oct 11 21:54:23 2014 (r272964) +++ stable/10/sys/dev/ixgbe/ixgbe.c Sat Oct 11 22:08:53 2014 (r272965) @@ -4368,11 +4368,6 @@ ixgbe_rx_discard(struct rx_ring *rxr, in rbuf = &rxr->rx_buffers[i]; - if (rbuf->fmp != NULL) {/* Partial chain ? */ - rbuf->fmp->m_flags |= M_PKTHDR; - m_freem(rbuf->fmp); - rbuf->fmp = NULL; - } /* ** With advanced descriptors the writeback @@ -4381,7 +4376,13 @@ ixgbe_rx_discard(struct rx_ring *rxr, in ** the normal refresh path to get new buffers ** and mapping. */ - if (rbuf->buf) { + + if (rbuf->fmp != NULL) {/* Partial chain ? */ + rbuf->fmp->m_flags |= M_PKTHDR; + m_freem(rbuf->fmp); + rbuf->fmp = NULL; + rbuf->buf = NULL; /* rbuf->buf is part of fmp's chain */ + } else if (rbuf->buf) { m_free(rbuf->buf); rbuf->buf = NULL; } From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 22:09:47 2014 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 ED0F0C36; Sat, 11 Oct 2014 22:09: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 BEDBFDE1; Sat, 11 Oct 2014 22:09: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 s9BM9lQt017620; Sat, 11 Oct 2014 22:09:47 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BM9lWS017616; Sat, 11 Oct 2014 22:09:47 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201410112209.s9BM9lWS017616@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 11 Oct 2014 22:09:47 +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: r272966 - 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.18-1 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, 11 Oct 2014 22:09:48 -0000 Author: adrian Date: Sat Oct 11 22:09:46 2014 New Revision: 272966 URL: https://svnweb.freebsd.org/changeset/base/272966 Log: MFC r271648 - The error bits are not valid with EOP=0; so intermediary fragments should not be discarded. Submitted by: Marc De La Gueronniere Sponsored by: Verisign, Inc. Modified: stable/10/sys/dev/ixgbe/ixgbe.c stable/10/sys/dev/ixgbe/ixgbe.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.c Sat Oct 11 22:08:53 2014 (r272965) +++ stable/10/sys/dev/ixgbe/ixgbe.c Sat Oct 11 22:09:46 2014 (r272966) @@ -4062,7 +4062,6 @@ ixgbe_setup_receive_ring(struct rx_ring rxr->lro_enabled = FALSE; rxr->rx_copies = 0; rxr->rx_bytes = 0; - rxr->discard = FALSE; rxr->vtag_strip = FALSE; bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, @@ -4461,13 +4460,8 @@ ixgbe_rxeof(struct ix_queue *que) eop = ((staterr & IXGBE_RXD_STAT_EOP) != 0); /* Make sure bad packets are discarded */ - if (((staterr & IXGBE_RXDADV_ERR_FRAME_ERR_MASK) != 0) || - (rxr->discard)) { + if (eop && (staterr & IXGBE_RXDADV_ERR_FRAME_ERR_MASK) != 0) { rxr->rx_discarded++; - if (eop) - rxr->discard = FALSE; - else - rxr->discard = TRUE; ixgbe_rx_discard(rxr, i); goto next_desc; } Modified: stable/10/sys/dev/ixgbe/ixgbe.h ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.h Sat Oct 11 22:08:53 2014 (r272965) +++ stable/10/sys/dev/ixgbe/ixgbe.h Sat Oct 11 22:09:46 2014 (r272966) @@ -341,7 +341,6 @@ struct rx_ring { struct lro_ctrl lro; bool lro_enabled; bool hw_rsc; - bool discard; bool vtag_strip; u16 next_to_refresh; u16 next_to_check; From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 22:10:41 2014 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 0D569D79; Sat, 11 Oct 2014 22:10: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 EC454E76; Sat, 11 Oct 2014 22:10:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9BMAejb020651; Sat, 11 Oct 2014 22:10:40 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BMAelO020647; Sat, 11 Oct 2014 22:10:40 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201410112210.s9BMAelO020647@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 11 Oct 2014 22:10: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: r272967 - in stable/10/sys: conf modules/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.18-1 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, 11 Oct 2014 22:10:41 -0000 Author: adrian Date: Sat Oct 11 22:10:39 2014 New Revision: 272967 URL: https://svnweb.freebsd.org/changeset/base/272967 Log: MFC r271649 - Disable flow-director support until it's been debugged and verified. The flowdirector feature shares on-chip memory with other things such as the RX buffers. In theory it should be configured in a way that doesn't interfere with the rest of operation. In practice, the RX buffer calculation didn't take the flow-director allocation into account and there'd be overlap. This lead to various garbage frames being received containing what looks like internal NIC state. What _I_ saw was traffic ending up in the wrong RX queues. If I was doing a UDP traffic test with only one NIC ring receiving traffic, everything is fine. If I fired up a second UDP stream which came in on another ring, there'd be a few percent of traffic from both rings ending up in the wrong ring. Ie, the RSS hash would indicate it was supposed to come in ring X, but it'd come in ring Y. However, when the allocation was fixed up, the developers at Verisign still saw traffic stalls. The flowdirector feature ends up fiddling with the NIC to do various attempts at load balancing connections by populating flow table rules based on sampled traffic. It's likely that all of that has to be carefully reviewed and made less "magic". So for now the flow director feature is disabled (which fixes both what I was seeing and what they were seeing) until it's all much more debugged and verified. Tested: * (me) 82599EB 2x10G NIC, RSS UDP testing. * (verisign) not sure on the NIC (but likely 82599), 100k-200k/sec TCP transaction tests. Submitted by: Marc De La Gueronniere Sponsored by: Verisign, Inc. Modified: stable/10/sys/conf/files stable/10/sys/modules/ixgbe/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sat Oct 11 22:09:46 2014 (r272966) +++ stable/10/sys/conf/files Sat Oct 11 22:10:39 2014 (r272967) @@ -1705,7 +1705,7 @@ dev/ixgb/if_ixgb.c optional ixgb dev/ixgb/ixgb_ee.c optional ixgb dev/ixgb/ixgb_hw.c optional ixgb dev/ixgbe/ixgbe.c optional ixgbe inet \ - compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP -DIXGBE_FDIR" + compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" dev/ixgbe/ixv.c optional ixgbe inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_phy.c optional ixgbe inet \ Modified: stable/10/sys/modules/ixgbe/Makefile ============================================================================== --- stable/10/sys/modules/ixgbe/Makefile Sat Oct 11 22:09:46 2014 (r272966) +++ stable/10/sys/modules/ixgbe/Makefile Sat Oct 11 22:10:39 2014 (r272967) @@ -12,7 +12,7 @@ SRCS += ixgbe.c ixv.c SRCS += ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c SRCS += ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_dcb_82599.c SRCS += ixgbe_82599.c ixgbe_82598.c ixgbe_x540.c -CFLAGS+= -I${.CURDIR}/../../dev/ixgbe -DSMP -DIXGBE_FDIR +CFLAGS+= -I${.CURDIR}/../../dev/ixgbe -DSMP .if !defined(KERNBUILDDIR) .if ${MK_INET_SUPPORT} != "no" From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 22:12:25 2014 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 88DCFFBB; Sat, 11 Oct 2014 22:12:25 +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 5B55DE9F; Sat, 11 Oct 2014 22:12:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9BMCPaN021640; Sat, 11 Oct 2014 22:12:25 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BMCPXh021639; Sat, 11 Oct 2014 22:12:25 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201410112212.s9BMCPXh021639@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 11 Oct 2014 22:12: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: r272968 - 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.18-1 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, 11 Oct 2014 22:12:25 -0000 Author: adrian Date: Sat Oct 11 22:12:24 2014 New Revision: 272968 URL: https://svnweb.freebsd.org/changeset/base/272968 Log: MFC r271645 - Set DROP_EN on each RX queue if transmit flow-control is disabled. This allows the NIC to drop frames on the receive queue and not cause the MAC to block on receiving to _any_ queue. Tested: igb0@pci0:5:0:0: class=0x020000 card=0x152115d9 chip=0x15218086 rev=0x01 hdr=0x00 vendor = 'Intel Corporation' device = 'I350 Gigabit Network Connection' class = network subclass = ethernet Discussed with: Eric Joyner MFC after: 1 week Sponsored by: Norse Corp, Inc. 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 Sat Oct 11 22:10:39 2014 (r272967) +++ stable/10/sys/dev/e1000/if_igb.c Sat Oct 11 22:12:24 2014 (r272968) @@ -4517,6 +4517,18 @@ igb_initialize_receive_units(struct adap rctl |= E1000_RCTL_SZ_2048; } + /* + * If TX flow control is disabled and there's >1 queue defined, + * enable DROP. + * + * This drops frames rather than hanging the RX MAC for all queues. + */ + if ((adapter->num_queues > 1) && + (adapter->fc == e1000_fc_none || + adapter->fc == e1000_fc_rx_pause)) { + srrctl |= E1000_SRRCTL_DROP_EN; + } + /* Setup the Base and Length of the Rx Descriptor Rings */ for (int i = 0; i < adapter->num_queues; i++, rxr++) { u64 bus_addr = rxr->rxdma.dma_paddr; @@ -6053,6 +6065,7 @@ igb_set_flowcntl(SYSCTL_HANDLER_ARGS) adapter->hw.fc.current_mode = adapter->hw.fc.requested_mode; e1000_force_mac_fc(&adapter->hw); + /* XXX TODO: update DROP_EN on each RX queue if appropriate */ return (error); } From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 22:13:25 2014 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 5FE5718B; Sat, 11 Oct 2014 22:13:25 +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 31E6FEAE; Sat, 11 Oct 2014 22:13:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9BMDPoZ021817; Sat, 11 Oct 2014 22:13:25 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BMDO2k021815; Sat, 11 Oct 2014 22:13:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201410112213.s9BMDO2k021815@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 11 Oct 2014 22:13:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272969 - 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.18-1 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, 11 Oct 2014 22:13:25 -0000 Author: adrian Date: Sat Oct 11 22:13:24 2014 New Revision: 272969 URL: https://svnweb.freebsd.org/changeset/base/272969 Log: MFC r271784 - Fix the handling of EOP in status descriptors for if_igb(4) and don't double-free mbufs. Like ixgbe(4) chipsets, EOP is only set on the final descriptor in a chain of descriptors. So, to free the whole list of descriptors, we should free the current slot _and_ the assembled list of descriptors that make up the fragment list. The existing code was setting discard once it saw EOP + an error status; it then freed all the subsequent descriptors until the next EOP. That's totally the wrong order. Modified: stable/10/sys/dev/e1000/if_igb.c stable/10/sys/dev/e1000/if_igb.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/e1000/if_igb.c ============================================================================== --- stable/10/sys/dev/e1000/if_igb.c Sat Oct 11 22:12:24 2014 (r272968) +++ stable/10/sys/dev/e1000/if_igb.c Sat Oct 11 22:13:24 2014 (r272969) @@ -4397,7 +4397,6 @@ skip_head: rxr->fmp = NULL; rxr->lmp = NULL; - rxr->discard = FALSE; bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); @@ -4873,15 +4872,16 @@ igb_rxeof(struct igb_queue *que, int cou hdr = le16toh(cur->wb.lower.lo_dword.hs_rss.hdr_info); eop = ((staterr & E1000_RXD_STAT_EOP) == E1000_RXD_STAT_EOP); - /* Make sure all segments of a bad packet are discarded */ - if (((staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) != 0) || - (rxr->discard)) { + /* + * Free the frame (all segments) if we're at EOP and + * it's an error. + * + * The datasheet states that EOP + status is only valid for + * the final segment in a multi-segment frame. + */ + if (eop && ((staterr & E1000_RXDEXT_ERR_FRAME_ERR_MASK) != 0)) { adapter->dropped_pkts++; ++rxr->rx_discarded; - if (!eop) /* Catch subsequent segs */ - rxr->discard = TRUE; - else - rxr->discard = FALSE; igb_rx_discard(rxr, i); goto next_desc; } Modified: stable/10/sys/dev/e1000/if_igb.h ============================================================================== --- stable/10/sys/dev/e1000/if_igb.h Sat Oct 11 22:12:24 2014 (r272968) +++ stable/10/sys/dev/e1000/if_igb.h Sat Oct 11 22:13:24 2014 (r272969) @@ -336,7 +336,6 @@ struct rx_ring { struct lro_ctrl lro; bool lro_enabled; bool hdr_split; - bool discard; struct mtx rx_mtx; char mtx_name[16]; u32 next_to_refresh; From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 23:02:04 2014 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 7AFDA985; Sat, 11 Oct 2014 23:02: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 667E3339; Sat, 11 Oct 2014 23:02: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 s9BN24mj045374; Sat, 11 Oct 2014 23:02:04 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BN24CC045373; Sat, 11 Oct 2014 23:02:04 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201410112302.s9BN24CC045373@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sat, 11 Oct 2014 23:02: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: r272970 - stable/10/usr.bin/yacc 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.18-1 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, 11 Oct 2014 23:02:04 -0000 Author: rodrigc Date: Sat Oct 11 23:02:03 2014 New Revision: 272970 URL: https://svnweb.freebsd.org/changeset/base/272970 Log: Merge: r258931 Add missing bits from the vendor's 2005-05-04 change to contrib/byacc/makefile.in ("add YYPATCH here so it can be tested by applications") so that applications have a hope of detecting newer FreeBSD YACC output from an older one. Submitted by: Juniper Networks Modified: stable/10/usr.bin/yacc/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/yacc/Makefile ============================================================================== --- stable/10/usr.bin/yacc/Makefile Sat Oct 11 22:13:24 2014 (r272969) +++ stable/10/usr.bin/yacc/Makefile Sat Oct 11 23:02:03 2014 (r272970) @@ -3,7 +3,8 @@ .include -.PATH: ${.CURDIR}/../../contrib/byacc +BYACC_SRC= ${.CURDIR}/../../contrib/byacc +.PATH: ${BYACC_SRC} PROG= yacc SRCS= closure.c error.c graph.c lalr.c lr0.c main.c mkpar.c mstring.c output.c \ @@ -12,7 +13,10 @@ SRCS= closure.c error.c graph.c lalr.c l CFLAGS+= -DMIXEDCASE_FILENAMES=1 \ -DHAVE_FCNTL_H=1 \ -DHAVE_MKSTEMP=1 - + +YYPATCH!= cat ${BYACC_SRC}/VERSION +CFLAGS+= -DYYPATCH=${YYPATCH} + LINKS= ${BINDIR}/yacc ${BINDIR}/byacc MLINKS= yacc.1 byacc.1 From owner-svn-src-stable@FreeBSD.ORG Sat Oct 11 23:31:45 2014 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 B5392FE6; Sat, 11 Oct 2014 23:31: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 9F54E7FB; Sat, 11 Oct 2014 23:31: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 s9BNVjD7059421; Sat, 11 Oct 2014 23:31:45 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9BNViOI059418; Sat, 11 Oct 2014 23:31:44 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201410112331.s9BNViOI059418@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Sat, 11 Oct 2014 23:31: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: r272973 - in stable/10: tools/build/mk usr.bin/yacc/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.18-1 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, 11 Oct 2014 23:31:45 -0000 Author: rodrigc Date: Sat Oct 11 23:31:44 2014 New Revision: 272973 URL: https://svnweb.freebsd.org/changeset/base/272973 Log: Merge: r269884 Complete the usr.bin/yacc kyua integration work I originally submitted via r268811 - Install the Kyuafile by adding FILES to FILESGROUPS - Run the testcases with an unprivileged user Some of the testcases depend upon behavior that's broken when run as root on FreeBSD because of how permissions are treated with access(2) vs eaccess(2), open(2), etc - Simplify the test driver to just inspect the exit code from run_test because it now exits with 0 if successful and exits with !0 if unsuccessful - Don't do ad hoc temporary directory creation/deletion; let Kyua handle that - Add entries for files removed in r268811 to OptionalObsoleteFiles.inc PR: 191020 X-MFC with: r268811 Approved by: jmmv (mentor) Reviewed by: bapt Sponsored by: EMC / Isilon Storage Division Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.bin/yacc/tests/Makefile stable/10/usr.bin/yacc/tests/yacc_tests.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sat Oct 11 23:24:09 2014 (r272972) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sat Oct 11 23:31:44 2014 (r272973) @@ -4511,6 +4511,24 @@ OLD_DIRS+=usr/tests/usr.bin/make/archive OLD_DIRS+=usr/tests/usr.bin/make/archives/fmt_44bsd OLD_DIRS+=usr/tests/usr.bin/make/archives OLD_DIRS+=usr/tests/usr.bin/make +OLD_FILES+=usr/tests/usr.bin/yacc/legacy_test +OLD_FILES+=usr/tests/usr.bin/yacc/regress.00.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.01.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.02.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.03.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.04.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.05.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.06.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.07.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.08.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.09.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.10.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.11.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.12.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.13.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.14.out +OLD_FILES+=usr/tests/usr.bin/yacc/regress.sh +OLD_FILES+=usr/tests/usr.bin/yacc/undefined.y .endif .else # ATF libraries. Modified: stable/10/usr.bin/yacc/tests/Makefile ============================================================================== --- stable/10/usr.bin/yacc/tests/Makefile Sat Oct 11 23:24:09 2014 (r272972) +++ stable/10/usr.bin/yacc/tests/Makefile Sat Oct 11 23:31:44 2014 (r272973) @@ -9,11 +9,15 @@ TEST_DIR= ${.CURDIR}/../../../contrib/by TESTSDIR= ${TESTSBASE}/usr.bin/yacc PLAIN_TESTS_SH= yacc_tests +# NOTE: due to caveats with how permissions are handled on FreeBSD +# with root, this must be run as a non-privileged user; otherwise +# the testcases will fail unexpectedly. +TEST_METADATA.yacc_tests+= required_user="unprivileged" SCRIPTS= run_test SCRIPTSDIR= ${TESTSDIR} -FILESGROUPS= FILEStest FILEStest_yacc +FILESGROUPS= FILES FILEStest FILEStest_yacc FILEStestDIR= ${TESTSDIR} @@ -245,36 +249,30 @@ FILEStest_yacc+= help.error FILEStest_yacc+= help.output FILEStest_yacc+= no_b_opt.error FILEStest_yacc+= no_b_opt.output -# XXX: expected: `f - cannot open "nosuchfile.c"; gets -# `e - line 0 of "nosuchfile.y", unexpected end-of-file`. -#FILEStest_yacc+= no_b_opt1.error -#FILEStest_yacc+= no_b_opt1.output -#FILEStest_yacc+= no_code_c.error -#FILEStest_yacc+= no_code_c.output -#FILEStest_yacc+= no_defines.error -#FILEStest_yacc+= no_defines.output -#FILEStest_yacc+= no_graph.error -#FILEStest_yacc+= no_graph.output -#FILEStest_yacc+= no_include.error -#FILEStest_yacc+= no_include.output +FILEStest_yacc+= no_b_opt1.error +FILEStest_yacc+= no_b_opt1.output +FILEStest_yacc+= no_code_c.error +FILEStest_yacc+= no_code_c.output +FILEStest_yacc+= no_defines.error +FILEStest_yacc+= no_defines.output +FILEStest_yacc+= no_graph.error +FILEStest_yacc+= no_graph.output +FILEStest_yacc+= no_include.error +FILEStest_yacc+= no_include.output FILEStest_yacc+= no_opts.error FILEStest_yacc+= no_opts.output -# XXX: expected: `f - cannot open "nosuchfile.c"; gets -# `e - line 0 of "nosuchfile.y", unexpected end-of-file`. -#FILEStest_yacc+= no_output.error -#FILEStest_yacc+= no_output.output -#FILEStest_yacc+= no_output1.error -#FILEStest_yacc+= no_output1.output +FILEStest_yacc+= no_output.error +FILEStest_yacc+= no_output.output +FILEStest_yacc+= no_output1.error +FILEStest_yacc+= no_output1.output FILEStest_yacc+= no_output2.error FILEStest_yacc+= no_output2.output FILEStest_yacc+= no_p_opt.error FILEStest_yacc+= no_p_opt.output -# XXX: expected: `f - cannot open "nosuchfile.c"; gets -# `e - line 0 of "nosuchfile.y", unexpected end-of-file`. -#FILEStest_yacc+= no_p_opt1.error -#FILEStest_yacc+= no_p_opt1.output -#FILEStest_yacc+= no_verbose.error -#FILEStest_yacc+= no_verbose.output +FILEStest_yacc+= no_p_opt1.error +FILEStest_yacc+= no_p_opt1.output +FILEStest_yacc+= no_verbose.error +FILEStest_yacc+= no_verbose.output FILEStest_yacc+= nostdin.error FILEStest_yacc+= nostdin.output FILEStest_yacc+= ok_syntax1.error Modified: stable/10/usr.bin/yacc/tests/yacc_tests.sh ============================================================================== --- stable/10/usr.bin/yacc/tests/yacc_tests.sh Sat Oct 11 23:24:09 2014 (r272972) +++ stable/10/usr.bin/yacc/tests/yacc_tests.sh Sat Oct 11 23:31:44 2014 (r272973) @@ -3,22 +3,15 @@ set -e -cd $(dirname $0) +# Setup the environment for run_test +# - run_test looks for `#define YYBTYACC` in ../config.h +# - run_test assumes a yacc binary exists in ../yacc instead of running "yacc" +# - run_test spams the test dir with files (polluting subsequent test runs), +# so it's better to copy all the files to a temporary directory created by +# kyua +echo > "./config.h" +mkdir "test" +cp -Rf "$(dirname "$0")"/* "test" +cp -p /usr/bin/yacc ./yacc -TMPDIR=$(mktemp -d /tmp/tmp.XXXXXXXX) -TEST_DIR="$TMPDIR/test" -trap "cd /; rm -Rf $TMPDIR" EXIT INT TERM - -# Setup the environment for run_test.sh -mkdir -p "$TEST_DIR" -cp -Rf * "$TEST_DIR/." -echo > "$TMPDIR/config.h" -ln /usr/bin/yacc $TMPDIR/yacc - -log=$TMPDIR/run_test.log -(cd $TEST_DIR && ./run_test 2>&1 && : > run_test.ok) | tee $log -if [ -f run_test.ok ] && ! egrep "^...(diff|not found)[^\*]+$" $log; then - exit 0 -else - exit 1 -fi +cd "test" && ./run_test