From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 03:16:54 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A55CAA28; Sun, 4 Aug 2013 03:16:54 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 600792928; Sun, 4 Aug 2013 03:16:53 +0000 (UTC) Received: from alph.d.allbsd.org (p2049-ipbf1102funabasi.chiba.ocn.ne.jp [122.26.101.49]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r743GYxt092725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 4 Aug 2013 12:16:44 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r743GV8X094817; Sun, 4 Aug 2013 12:16:34 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sun, 04 Aug 2013 12:15:23 +0900 (JST) Message-Id: <20130804.121523.488481502477873993.hrs@allbsd.org> To: jilles@stack.nl Subject: Re: svn commit: r253887 - head/sys/dev/filemon From: Hiroki Sato In-Reply-To: <20130802152204.GA1880@stack.nl> References: <201308021444.r72EiBk2059771@svn.freebsd.org> <20130802152204.GA1880@stack.nl> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 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_Multipart0(Sun_Aug__4_12_15_23_2013_113)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Sun, 04 Aug 2013 12:16:45 +0900 (JST) X-Spam-Status: No, score=-90.6 required=13.0 tests=CONTENT_TYPE_PRESENT, DIRECTOCNDYN,DYN_PBL,RCVD_IN_PBL,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-head@FreeBSD.org, sjg@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 03:16:54 -0000 ----Security_Multipart0(Sun_Aug__4_12_15_23_2013_113)-- Content-Type: Multipart/Mixed; boundary="--Next_Part(Sun_Aug__4_12_15_23_2013_653)--" Content-Transfer-Encoding: 7bit ----Next_Part(Sun_Aug__4_12_15_23_2013_653)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Jilles Tjoelker wrote in <20130802152204.GA1880@stack.nl>: ji> You can simplify the code using the fairly new pget(). This will also ji> fix the incorrect errno when the process does not exist (should be ji> [ESRCH]). ji> ji> This change is a step in the right direction but is incomplete. Although ji> the check protects currently running processes, I do not see how it ji> prevents tracing a process that gets the same PID again after the ji> original target process has exited. This not only leaks sensitive ji> information but may also prevent tracing by the legitimate owner of the ji> process (because only one filemon will write events for a process). This ji> could be fixed by setting filemon->pid = -1 in ji> filemon_wrapper_sys_exit() and not allowing P_WEXIT and zombies in ji> FILEMON_SET_PID (PGET_NOTWEXIT disallows both). An [EBUSY] when there is ji> already a filemon monitoring the process may also be useful (or writing ji> copies of the events to all attached filemons). Thank you for your comments. Can you review the attached patch? If there is no problem, I will commit this and MFC to stable branches. -- Hiroki ----Next_Part(Sun_Aug__4_12_15_23_2013_653)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="filemon_privcheck.20130804-1.diff" Index: sys/dev/filemon/filemon.c =================================================================== --- sys/dev/filemon/filemon.c (revision 253911) +++ sys/dev/filemon/filemon.c (working copy) @@ -164,13 +164,12 @@ /* Set the monitored process ID. */ case FILEMON_SET_PID: - p = pfind(*((pid_t *)data)); - if (p == NULL) - return (EINVAL); - error = p_candebug(curthread, p); - if (error == 0) + error = pget(*((pid_t *)data), PGET_CANDEBUG | PGET_NOTWEXIT, + &p); + if (error == 0) { filemon->pid = p->p_pid; - PROC_UNLOCK(p); + PROC_UNLOCK(p); + } break; default: Index: sys/dev/filemon/filemon_wrapper.c =================================================================== --- sys/dev/filemon/filemon_wrapper.c (revision 253911) +++ sys/dev/filemon/filemon_wrapper.c (working copy) @@ -574,6 +574,7 @@ (uintmax_t)now.tv_sec, (uintmax_t)now.tv_usec); filemon_output(filemon, filemon->msgbufr, len); + filemon->pid = -1; } /* Unlock the found filemon structure. */ ----Next_Part(Sun_Aug__4_12_15_23_2013_653)---- ----Security_Multipart0(Sun_Aug__4_12_15_23_2013_113)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlH9x0sACgkQTyzT2CeTzy2/EgCgwY3wB89hp+Q7oAxhFw9pgi73 Es0AnRoeXb4glizY4oW5X6ZiOFCupKTS =eRc9 -----END PGP SIGNATURE----- ----Security_Multipart0(Sun_Aug__4_12_15_23_2013_113)---- From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 05:11:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9F26B7DC; Sun, 4 Aug 2013 05:11:48 +0000 (UTC) (envelope-from rpaulo@felyko.com) Received: from felyko.com (felyko.com [IPv6:2607:f2f8:a528::3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id 830B62D09; Sun, 4 Aug 2013 05:11:48 +0000 (UTC) Received: from [IPv6:2601:9:4d00:119:ed95:b8f:8ae1:6dda] (unknown [IPv6:2601:9:4d00:119:ed95:b8f:8ae1:6dda]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 801973981E; Sat, 3 Aug 2013 22:11:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=felyko.com; s=mail; t=1375593107; bh=vWyEnIMVIpgY2Kh+kqAyEjXdmXXD5IQI8vRq67QTRxY=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=Hpqv9SUo4aA/lX3WycmjPTIgaRlKjh6VsuYn1Vao8FVripfLF5ZCECeGQv65tEGLL sK2L6OyyHv2qhUiFM9nFu8lMmYfaLyymbKMn+GUjViJPFPv2QGhp0IgyHjC6zkYVqy 5m98bOLPYDiQcBYMqtzNcXnze2cxNGkJ0YGFsbuQ= Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r253883 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests From: Rui Paulo In-Reply-To: <20130803060104.708E258097@chaos.jnpr.net> Date: Sat, 3 Aug 2013 22:11:46 -0700 Content-Transfer-Encoding: 7bit Message-Id: <93CDA01C-5609-4AD9-A865-6598787E3A0C@felyko.com> References: <201308020625.r726PTkY012023@svn.freebsd.org> <20130803060104.708E258097@chaos.jnpr.net> To: Simon J. Gerraty X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 05:11:48 -0000 On 2 Aug 2013, at 23:01, Simon J. Gerraty wrote: > > On Fri, 2 Aug 2013 22:46:36 -0700, Rui Paulo writes: >> Cool! Can we set this in /etc/make.conf ? > > I would expect so. Doesn't seem to make any effect... -- Rui Paulo From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 06:36:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 16D4C504; Sun, 4 Aug 2013 06:36:19 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E840E205B; Sun, 4 Aug 2013 06:36:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r746aIbH038934; Sun, 4 Aug 2013 06:36:18 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r746aI5i038931; Sun, 4 Aug 2013 06:36:18 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201308040636.r746aI5i038931@svn.freebsd.org> From: Hiroki Sato Date: Sun, 4 Aug 2013 06:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253924 - in head: etc etc/rc.d share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 06:36:19 -0000 Author: hrs Date: Sun Aug 4 06:36:17 2013 New Revision: 253924 URL: http://svnweb.freebsd.org/changeset/base/253924 Log: - Reimplement $gif_interfaces as a variant of $cloned_interfaces. Newly-configured systems should use $cloned_interfaces. - Call clone_{up,down}() and ifnet_rename() in rc.d/netif {start,stop}. ifnet_rename() now accepts an interface name list as its argument. - Add rc.d/netif clear. The "clear" subcommand is basically equivalent to "stop" but it does not call clone_down(). - Add "ifname:sticky" keyword into $cloned_interfaces. If :sticky is specified, the interface will not be destroyed in rc.d/netif stop. - Add cloned_interfaces_sticky={YES,NO}. This variable globally sets :sticky keyword above for all interfaces. The default value is NO. When cloned_interfaces_sticky=YES, :nosticky keyword can be used to override it on per interface basis. Modified: head/etc/network.subr head/etc/rc.d/netif head/share/man/man5/rc.conf.5 Modified: head/etc/network.subr ============================================================================== --- head/etc/network.subr Sun Aug 4 02:37:05 2013 (r253923) +++ head/etc/network.subr Sun Aug 4 06:36:17 2013 (r253924) @@ -660,6 +660,11 @@ ipv4_down() IFS="$_ifs" for _inet in $inetList ; do # get rid of extraneous line + case $_inet in + "") break ;; + inet\ *) ;; + *) continue ;; + esac [ -z "$_inet" ] && break _inet=`expr "$_inet" : '.*\(inet \([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\).*'` @@ -1192,18 +1197,62 @@ ifscript_down() # clone_up() { - local _prefix _list ifn + local _prefix _list ifn ifopt _iflist _n tmpargs _prefix= _list= + _iflist=$* # create_args_IF for ifn in ${cloned_interfaces}; do + # Parse ifn:ifopt. + OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS + case $_iflist in + ""|$ifn|$ifn\ *|*\ $ifn\ *|*\ $ifn) ;; + *) continue ;; + esac + # Skip if ifn already exists. + if ${IFCONFIG_CMD} $ifn > /dev/null 2>&1; then + continue + fi ${IFCONFIG_CMD} ${ifn} create `get_if_var ${ifn} create_args_IF` if [ $? -eq 0 ]; then _list="${_list}${_prefix}${ifn}" [ -z "$_prefix" ] && _prefix=' ' fi done + if [ -n "$gif_interfaces" ]; then + warn "\$gif_interfaces is obsolete. Use \$cloned_interfaces instead." + fi + for ifn in ${gif_interfaces}; do + # Parse ifn:ifopt. + OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS + case $_iflist in + ""|$ifn|$ifn\ *|*\ $ifn\ *|*\ $ifn) ;; + *) continue ;; + esac + # Skip if ifn already exists. + if ${IFCONFIG_CMD} $ifn > /dev/null 2>&1; then + continue + fi + case $ifn in + gif[0-9]*) + ${IFCONFIG_CMD} $ifn create + ;; + *) + _n=$(${IFCONFIG_CMD} gif create) + ${IFCONFIG_CMD} $_n name $ifn + ;; + esac + if [ $? -eq 0 ]; then + _list="${_list}${_prefix}${ifn}" + [ -z "$_prefix" ] && _prefix=' ' + fi + tmpargs=$(get_if_var $ifn gifconfig_IF) + eval ifconfig_${ifn}=\"tunnel \$tmpargs\" + done + if [ -n "${_list}" ]; then + echo "Created clone interfaces: ${_list}." + fi debug "Cloned: ${_list}" } @@ -1213,17 +1262,42 @@ clone_up() # clone_down() { - local _prefix _list ifn + local _prefix _list ifn ifopt _iflist _sticky _prefix= _list= + _iflist=$* - for ifn in ${cloned_interfaces}; do + : ${cloned_interfaces_sticky:=NO} + if checkyesno cloned_interfaces_sticky; then + _sticky=1 + else + _sticky=0 + fi + for ifn in ${cloned_interfaces} ${gif_interfaces}; do + # Parse ifn:ifopt. + OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS + case $ifopt:$_sticky in + sticky:*) continue ;; # :sticky => not destroy + nosticky:*) ;; # :nosticky => destroy + *:1) continue ;; # global sticky knob == 1 + esac + case $_iflist in + ""|$ifn|$ifn\ *|*\ $ifn\ *|*\ $ifn) ;; + *) continue ;; + esac + # Skip if ifn does not exist. + if ! ${IFCONFIG_CMD} $ifn > /dev/null 2>&1; then + continue + fi ${IFCONFIG_CMD} -n ${ifn} destroy if [ $? -eq 0 ]; then _list="${_list}${_prefix}${ifn}" [ -z "$_prefix" ] && _prefix=' ' fi done + if [ -n "${_list}" ]; then + echo "Destroyed clone interfaces: ${_list}." + fi debug "Destroyed clones: ${_list}" } @@ -1347,32 +1421,6 @@ ng_create_one() done } -# gif_up -# Create gif(4) tunnel interfaces. -gif_up() -{ - local i peers - - for i in ${gif_interfaces}; do - peers=`get_if_var $i gifconfig_IF` - case ${peers} in - '') - continue - ;; - *) - if expr $i : 'gif[0-9][0-9]*$' >/dev/null 2>&1; then - ${IFCONFIG_CMD} $i create >/dev/null 2>&1 - else - gif=`${IFCONFIG_CMD} gif create` - ${IFCONFIG_CMD} $gif name $i - fi - ${IFCONFIG_CMD} $i tunnel ${peers} - ${IFCONFIG_CMD} $i up - ;; - esac - done -} - # ng_fec_create ifn # Configure Fast EtherChannel for interface $ifn. Returns 0 if # FEC arguments were found and configured; returns !0 otherwise. @@ -1470,15 +1518,15 @@ ipx_down() return $_ret } -# ifnet_rename -# Rename all requested interfaces. +# ifnet_rename [ifname] +# Rename interfaces if ifconfig_IF_name is defined. # ifnet_rename() { local _if _ifname # ifconfig_IF_name - for _if in `${IFCONFIG_CMD} -l`; do + for _if in ${*:-$(${IFCONFIG_CMD} -l)}; do _ifname=`get_if_var $_if ifconfig_IF_name` if [ ! -z "$_ifname" ]; then ${IFCONFIG_CMD} $_if name $_ifname Modified: head/etc/rc.d/netif ============================================================================== --- head/etc/rc.d/netif Sun Aug 4 02:37:05 2013 (r253923) +++ head/etc/rc.d/netif Sun Aug 4 06:36:17 2013 (r253924) @@ -38,7 +38,8 @@ start_cmd="network_start" stop_cmd="network_stop" cloneup_cmd="clone_up" clonedown_cmd="clone_down" -extra_commands="cloneup clonedown" +clear_cmd="doclear" +extra_commands="cloneup clonedown clear" cmdifn= set_rcvar_obsolete ipv6_enable ipv6_activate_all_interfaces @@ -60,18 +61,15 @@ network_start() # disable SIGINT (Ctrl-c) when running at startup trap : 2 - # Create cloned interfaces - clone_up - # Create Fast EtherChannel interfaces fec_up + fi - # Create IPv6<-->IPv4 tunnels - gif_up + # Create cloned interfaces + clone_up $cmdifn - # Rename interfaces. - ifnet_rename - fi + # Rename interfaces. + ifnet_rename $cmdifn # Configure the interface(s). network_common ifn_start @@ -92,6 +90,18 @@ network_start() network_stop() { + _clone_down=1 + network_stop0 $* +} + +doclear() +{ + _clone_down= + network_stop0 $* +} + +network_stop0() +{ local _if # Set the list of interfaces to work on. @@ -101,6 +111,11 @@ network_stop() # Deconfigure the interface(s) network_common ifn_stop + # Destroy cloned interfaces + if [ -n "$_clone_down" ]; then + clone_down $cmdifn + fi + if [ -f /etc/rc.d/routing -a -n "$cmdifn" ] ; then for _if in $cmdifn; do /etc/rc.d/routing stop any $_if @@ -142,6 +157,16 @@ network_common() _fail= _ok= for ifn in ${_cooked_list}; do + # Skip if ifn does not exist. + case $_func in + ifn_stop) + if ! ${IFCONFIG_CMD} $ifn > /dev/null 2>&1; then + warn "$ifn does not exist. Skipped." + _fail="${_fail} ${ifn}" + continue + fi + ;; + esac if ${_func} ${ifn} $2; then _ok="${_ok} ${ifn}" if ipv6if ${ifn}; then Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sun Aug 4 02:37:05 2013 (r253923) +++ head/share/man/man5/rc.conf.5 Sun Aug 4 06:36:17 2013 (r253924) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 12, 2013 +.Dd July 22, 2013 .Dt RC.CONF 5 .Os .Sh NAME @@ -1651,11 +1651,33 @@ Further cloning arguments may be passed command for each interface by setting the .Va create_args_ Ns Aq Ar interface variable. +If an interface name is specified with +.Dq :sticky +keyword, +the interface will not be destroyed even when +.Pa rc.d/netif +script is invoked with +.Dq stop +argument. +This is useful when reconfiguring the interface without destroying it. Entries in .Va cloned_interfaces are automatically appended to .Va network_interfaces for configuration. +.It Va cloned_interfaces_sticky +.Pq Vt bool +This variable is to globally enable functionality of +.Dq :sticky +keyword in +.Va cloned_interfaces +for all interfaces. +The default value is +.Dq NO . +Even if this variable is specified to +.Dq YES , +.Dq :nosticky +keyword can be used to override it on per interface basis. .It Va fec_interfaces .Pq Vt str Set to the list of @@ -1685,6 +1707,8 @@ ifconfig_fec0="DHCP" .Ed .It Va gif_interfaces .Pq Vt str +This variable is deprecated in favor of +.Va cloned_interfaces . Set to the list of .Xr gif 4 tunnel interfaces to configure on this host. From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 06:42:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 80D836AF; Sun, 4 Aug 2013 06:42:36 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from co1outboundpool.messaging.microsoft.com (co1ehsobe003.messaging.microsoft.com [216.32.180.186]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3572089; Sun, 4 Aug 2013 06:42:35 +0000 (UTC) Received: from mail182-co1-R.bigfish.com (10.243.78.235) by CO1EHSOBE039.bigfish.com (10.243.66.104) with Microsoft SMTP Server id 14.1.225.22; Sun, 4 Aug 2013 06:27:26 +0000 Received: from mail182-co1 (localhost [127.0.0.1]) by mail182-co1-R.bigfish.com (Postfix) with ESMTP id 006AE700107; Sun, 4 Aug 2013 06:27:26 +0000 (UTC) X-Forefront-Antispam-Report: CIP:66.129.224.51; KIP:(null); UIP:(null); IPV:NLI; H:P-EMF01-SAC.jnpr.net; RD:none; EFVD:NLI X-SpamScore: 1 X-BigFish: VPS1(zz98dI1432Izz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6h1082kzz1de098h1de097h8275chz2fh2a8h668h839hd25hf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh1b88h1fb3h1d0ch1d2eh1d3fh1de2h1dfeh1dffh1e23h1155h) Received-SPF: pass (mail182-co1: domain of juniper.net designates 66.129.224.51 as permitted sender) client-ip=66.129.224.51; envelope-from=sjg@juniper.net; helo=P-EMF01-SAC.jnpr.net ; SAC.jnpr.net ; Received: from mail182-co1 (localhost.localdomain [127.0.0.1]) by mail182-co1 (MessageSwitch) id 1375597644572162_25219; Sun, 4 Aug 2013 06:27:24 +0000 (UTC) Received: from CO1EHSMHS020.bigfish.com (unknown [10.243.78.234]) by mail182-co1.bigfish.com (Postfix) with ESMTP id 88AC826004A; Sun, 4 Aug 2013 06:27:24 +0000 (UTC) Received: from P-EMF01-SAC.jnpr.net (66.129.224.51) by CO1EHSMHS020.bigfish.com (10.243.66.30) with Microsoft SMTP Server (TLS) id 14.16.227.3; Sun, 4 Aug 2013 06:27:24 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF01-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Sat, 3 Aug 2013 23:27:23 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id r746RML03221; Sat, 3 Aug 2013 23:27:23 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id B626258097; Sat, 3 Aug 2013 23:27:22 -0700 (PDT) To: Rui Paulo Subject: Re: svn commit: r253883 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests In-Reply-To: <93CDA01C-5609-4AD9-A865-6598787E3A0C@felyko.com> References: <201308020625.r726PTkY012023@svn.freebsd.org> <20130803060104.708E258097@chaos.jnpr.net> <93CDA01C-5609-4AD9-A865-6598787E3A0C@felyko.com> Comments: In-reply-to: Rui Paulo message dated "Sat, 03 Aug 2013 22:11:46 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Sat, 3 Aug 2013 23:27:22 -0700 Message-ID: <20130804062722.B626258097@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain X-OriginatorOrg: juniper.net X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 06:42:36 -0000 On Sat, 3 Aug 2013 22:11:46 -0700, Rui Paulo writes: >On 2 Aug 2013, at 23:01, Simon J. Gerraty wrote: > >> >> On Fri, 2 Aug 2013 22:46:36 -0700, Rui Paulo writes: >>> Cool! Can we set this in /etc/make.conf ? >> >> I would expect so. > >Doesn't seem to make any effect... Ah, looks like Job_SetPrefix() is called too early, will fix. You can set it on the command line for sure. From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 07:10:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3C6A2C38; Sun, 4 Aug 2013 07:10:17 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2A0EE2107; Sun, 4 Aug 2013 07:10:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r747AHTf050182; Sun, 4 Aug 2013 07:10:17 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r747AG14050180; Sun, 4 Aug 2013 07:10:16 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201308040710.r747AG14050180@svn.freebsd.org> From: "Simon J. Gerraty" Date: Sun, 4 Aug 2013 07:10:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253925 - head/contrib/bmake X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 07:10:17 -0000 Author: sjg Date: Sun Aug 4 07:10:16 2013 New Revision: 253925 URL: http://svnweb.freebsd.org/changeset/base/253925 Log: Move the call to Job_SetPrefix() to Job_Init() so that makefiles have had a chance to set .MAKE.JOB.PREFIX Modified: head/contrib/bmake/job.c head/contrib/bmake/main.c Modified: head/contrib/bmake/job.c ============================================================================== --- head/contrib/bmake/job.c Sun Aug 4 06:36:17 2013 (r253924) +++ head/contrib/bmake/job.c Sun Aug 4 07:10:16 2013 (r253925) @@ -2214,6 +2214,7 @@ Job_SetPrefix(void) void Job_Init(void) { + Job_SetPrefix(); /* Allocate space for all the job info */ job_table = bmake_malloc(maxJobs * sizeof *job_table); memset(job_table, 0, maxJobs * sizeof *job_table); Modified: head/contrib/bmake/main.c ============================================================================== --- head/contrib/bmake/main.c Sun Aug 4 06:36:17 2013 (r253924) +++ head/contrib/bmake/main.c Sun Aug 4 07:10:16 2013 (r253925) @@ -1026,7 +1026,6 @@ main(int argc, char **argv) snprintf(pn, sizeof(pn), "%s[%d]", progname, makelevel); progname = bmake_strdup(pn); } - Job_SetPrefix(); #ifdef USE_META meta_init(); From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 10:03:21 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 59EF1B67; Sun, 4 Aug 2013 10:03:21 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1B2622431; Sun, 4 Aug 2013 10:03:21 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 70C661203C7; Sun, 4 Aug 2013 12:03:04 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 55EDC28494; Sun, 4 Aug 2013 12:03:04 +0200 (CEST) Date: Sun, 4 Aug 2013 12:03:04 +0200 From: Jilles Tjoelker To: Hiroki Sato Subject: Re: svn commit: r253887 - head/sys/dev/filemon Message-ID: <20130804100304.GB35080@stack.nl> References: <201308021444.r72EiBk2059771@svn.freebsd.org> <20130802152204.GA1880@stack.nl> <20130804.121523.488481502477873993.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130804.121523.488481502477873993.hrs@allbsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, sjg@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 10:03:21 -0000 On Sun, Aug 04, 2013 at 12:15:23PM +0900, Hiroki Sato wrote: > Jilles Tjoelker wrote > in <20130802152204.GA1880@stack.nl>: > ji> You can simplify the code using the fairly new pget(). This will also > ji> fix the incorrect errno when the process does not exist (should be > ji> [ESRCH]). > ji> > ji> This change is a step in the right direction but is incomplete. Although > ji> the check protects currently running processes, I do not see how it > ji> prevents tracing a process that gets the same PID again after the > ji> original target process has exited. This not only leaks sensitive > ji> information but may also prevent tracing by the legitimate owner of the > ji> process (because only one filemon will write events for a process). This > ji> could be fixed by setting filemon->pid = -1 in > ji> filemon_wrapper_sys_exit() and not allowing P_WEXIT and zombies in > ji> FILEMON_SET_PID (PGET_NOTWEXIT disallows both). An [EBUSY] when there is > ji> already a filemon monitoring the process may also be useful (or writing > ji> copies of the events to all attached filemons). > Thank you for your comments. Can you review the attached patch? If > there is no problem, I will commit this and MFC to stable branches. > Index: sys/dev/filemon/filemon.c > =================================================================== > --- sys/dev/filemon/filemon.c (revision 253911) > +++ sys/dev/filemon/filemon.c (working copy) > @@ -164,13 +164,12 @@ > > /* Set the monitored process ID. */ > case FILEMON_SET_PID: > - p = pfind(*((pid_t *)data)); > - if (p == NULL) > - return (EINVAL); > - error = p_candebug(curthread, p); > - if (error == 0) > + error = pget(*((pid_t *)data), PGET_CANDEBUG | PGET_NOTWEXIT, > + &p); > + if (error == 0) { > filemon->pid = p->p_pid; > - PROC_UNLOCK(p); > + PROC_UNLOCK(p); > + } > break; > > default: > Index: sys/dev/filemon/filemon_wrapper.c > =================================================================== > --- sys/dev/filemon/filemon_wrapper.c (revision 253911) > +++ sys/dev/filemon/filemon_wrapper.c (working copy) > @@ -574,6 +574,7 @@ > (uintmax_t)now.tv_sec, (uintmax_t)now.tv_usec); > > filemon_output(filemon, filemon->msgbufr, len); > + filemon->pid = -1; > } > > /* Unlock the found filemon structure. */ This looks OK, but I have not tested it. I think filemon_ioctl() may need to lock the struct filemon. Replacing the fp seems particularly unsafe. I did not fully know about the recursive effect on child processes when I wrote my earlier mail. Filemon allows tracing setuid programs this way, which may be a security risk and is not possible with ktrace/truss. Perhaps it is best to commit this patch, but also add a warning to filemon(4) that it should not be loaded on systems with untrusted users or the permissions on /dev/filemon should be restricted (via /etc/devfs.rules). -- Jilles Tjoelker From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 11:38:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A04B634E; Sun, 4 Aug 2013 11:38:09 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8CFD125C2; Sun, 4 Aug 2013 11:38:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r74Bc9U0026693; Sun, 4 Aug 2013 11:38:09 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r74Bc9M6026692; Sun, 4 Aug 2013 11:38:09 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201308041138.r74Bc9M6026692@svn.freebsd.org> From: Steven Hartland Date: Sun, 4 Aug 2013 11:38:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253926 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 11:38:09 -0000 Author: smh Date: Sun Aug 4 11:38:08 2013 New Revision: 253926 URL: http://svnweb.freebsd.org/changeset/base/253926 Log: zfs_ioc_rename should not leave the value of zc_name passed in via zc altered on return. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sun Aug 4 07:10:16 2013 (r253925) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Sun Aug 4 11:38:08 2013 (r253926) @@ -3612,6 +3612,8 @@ zfs_ioc_rename(zfs_cmd_t *zc) at = strchr(zc->zc_name, '@'); if (at != NULL) { /* snaps must be in same fs */ + int error; + if (strncmp(zc->zc_name, zc->zc_value, at - zc->zc_name + 1)) return (SET_ERROR(EXDEV)); *at = '\0'; @@ -3620,14 +3622,19 @@ zfs_ioc_rename(zfs_cmd_t *zc) #else if (zc->zc_objset_type == DMU_OST_ZFS && allow_mounted) { #endif - int error = dmu_objset_find(zc->zc_name, + error = dmu_objset_find(zc->zc_name, recursive_unmount, at + 1, recursive ? DS_FIND_CHILDREN : 0); - if (error != 0) + if (error != 0) { + *at = '@'; return (error); + } } - return (dsl_dataset_rename_snapshot(zc->zc_name, - at + 1, strchr(zc->zc_value, '@') + 1, recursive)); + error = dsl_dataset_rename_snapshot(zc->zc_name, + at + 1, strchr(zc->zc_value, '@') + 1, recursive); + *at = '@'; + + return (error); } else { #ifdef illumos if (zc->zc_objset_type == DMU_OST_ZVOL) From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 15:33:12 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A1950163; Sun, 4 Aug 2013 15:33:12 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe006.messaging.microsoft.com [216.32.181.186]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 50C4E2CA6; Sun, 4 Aug 2013 15:33:11 +0000 (UTC) Received: from mail115-ch1-R.bigfish.com (10.43.68.231) by CH1EHSOBE016.bigfish.com (10.43.70.66) with Microsoft SMTP Server id 14.1.225.22; Sun, 4 Aug 2013 15:17:58 +0000 Received: from mail115-ch1 (localhost [127.0.0.1]) by mail115-ch1-R.bigfish.com (Postfix) with ESMTP id 0C2F620007A; Sun, 4 Aug 2013 15:17:58 +0000 (UTC) X-Forefront-Antispam-Report: CIP:66.129.224.53; KIP:(null); UIP:(null); IPV:NLI; H:P-EMF01-SAC.jnpr.net; RD:none; EFVD:NLI X-SpamScore: 3 X-BigFish: VPS3(zzzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6h1082kzzz2fh2a8h668h839hf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh1b88h1fb3h1d0ch1d2eh1d3fh1de2h1dfeh1dffh1e23h1155h) Received-SPF: pass (mail115-ch1: domain of juniper.net designates 66.129.224.53 as permitted sender) client-ip=66.129.224.53; envelope-from=sjg@juniper.net; helo=P-EMF01-SAC.jnpr.net ; SAC.jnpr.net ; Received: from mail115-ch1 (localhost.localdomain [127.0.0.1]) by mail115-ch1 (MessageSwitch) id 1375629476497450_8125; Sun, 4 Aug 2013 15:17:56 +0000 (UTC) Received: from CH1EHSMHS040.bigfish.com (snatpool2.int.messaging.microsoft.com [10.43.68.234]) by mail115-ch1.bigfish.com (Postfix) with ESMTP id 743241E0047; Sun, 4 Aug 2013 15:17:56 +0000 (UTC) Received: from P-EMF01-SAC.jnpr.net (66.129.224.53) by CH1EHSMHS040.bigfish.com (10.43.69.249) with Microsoft SMTP Server (TLS) id 14.16.227.3; Sun, 4 Aug 2013 15:17:56 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF01-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Sun, 4 Aug 2013 08:17:55 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id r74FHsL85820; Sun, 4 Aug 2013 08:17:54 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 8189758097; Sun, 4 Aug 2013 08:17:54 -0700 (PDT) To: Jilles Tjoelker Subject: Re: svn commit: r253887 - head/sys/dev/filemon In-Reply-To: <20130804100304.GB35080@stack.nl> References: <201308021444.r72EiBk2059771@svn.freebsd.org> <20130802152204.GA1880@stack.nl> <20130804.121523.488481502477873993.hrs@allbsd.org> <20130804100304.GB35080@stack.nl> Comments: In-reply-to: Jilles Tjoelker message dated "Sun, 04 Aug 2013 12:03:04 +0200." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Sun, 4 Aug 2013 08:17:54 -0700 Message-ID: <20130804151754.8189758097@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain X-OriginatorOrg: juniper.net X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Hiroki Sato , src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 15:33:12 -0000 >> Thank you for your comments. Can you review the attached patch? If >> there is no problem, I will commit this and MFC to stable branches. Looks good. But don't commit it untested ;-) I can test it for you. >Perhaps it is best to commit this patch, but also add a warning to >filemon(4) that it should not be loaded on systems with untrusted users >or the permissions on /dev/filemon should be restricted (via >/etc/devfs.rules). That would largely defeat the purpose. This driver was written to overcome issues with dtrace: a/ it needed privs beyond normal user b/ it could not reliably provide path of binary being exec'd c/ performace #b is probably fixable, but the fix could not be relied on to exist everywhere. This driver looks at a very limited set of syscalls, and does not report anything beyond pathnames read/written/exec'd. In the NetBSD version I even dropped stat calls as being unnecessary (for make). dtrace would meet many of Robert's criteria for a general purpose functionality but allows far more functionality, and apart from the issues above, cannot (I'm told) be ported to linux. A simple driver like this can be. From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 15:56:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 645DF871; Sun, 4 Aug 2013 15:56:20 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3809B2D5E; Sun, 4 Aug 2013 15:56:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r74FuJ3j004186; Sun, 4 Aug 2013 15:56:19 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r74FuJ1U004183; Sun, 4 Aug 2013 15:56:19 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201308041556.r74FuJ1U004183@svn.freebsd.org> From: Attilio Rao Date: Sun, 4 Aug 2013 15:56:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253927 - in head/sys: fs/tmpfs kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 15:56:20 -0000 Author: attilio Date: Sun Aug 4 15:56:19 2013 New Revision: 253927 URL: http://svnweb.freebsd.org/changeset/base/253927 Log: Remove unnecessary soft busy of the page before to do vn_rdwr() in kern_sendfile() which is unnecessary. The page is already wired so it will not be subjected to pagefault. The content cannot be effectively protected as it is full of races already. Multiple accesses to the same indexes are serialized through vn_rdwr(). Sponsored by: EMC / Isilon storage division Reviewed by: alc, jeff Tested by: pho Modified: head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/kern/uipc_syscalls.c Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Sun Aug 4 11:38:08 2013 (r253926) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Sun Aug 4 15:56:19 2013 (r253927) @@ -448,10 +448,8 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p VM_OBJECT_WLOCK(tobj); /* - * The kern_sendfile() code calls vn_rdwr() with the page - * soft-busied. Ignore the soft-busy state here. Parallel - * reads of the page content from disk are prevented by - * VPO_BUSY. + * Parallel reads of the page content from disk are prevented + * by VPO_BUSY. * * Although the tmpfs vnode lock is held here, it is * nonetheless safe to sleep waiting for a free page. The @@ -460,7 +458,7 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p * type object. */ m = vm_page_grab(tobj, idx, VM_ALLOC_NORMAL | VM_ALLOC_RETRY | - VM_ALLOC_IGN_SBUSY | VM_ALLOC_NOBUSY); + VM_ALLOC_NOBUSY); if (m->valid != VM_PAGE_BITS_ALL) { vm_page_busy(m); if (vm_pager_has_page(tobj, idx, NULL, NULL)) { Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Sun Aug 4 11:38:08 2013 (r253926) +++ head/sys/kern/uipc_syscalls.c Sun Aug 4 15:56:19 2013 (r253927) @@ -2246,11 +2246,6 @@ retry_space: ssize_t resid; int readahead = sfreadahead * MAXBSIZE; - /* - * Ensure that our page is still around - * when the I/O completes. - */ - vm_page_io_start(pg); VM_OBJECT_WUNLOCK(obj); /* @@ -2264,11 +2259,9 @@ retry_space: trunc_page(off), UIO_NOCOPY, IO_NODELOCKED | IO_VMIO | ((readahead / bsize) << IO_SEQSHIFT), td->td_ucred, NOCRED, &resid, td); - VM_OBJECT_WLOCK(obj); - vm_page_io_finish(pg); - if (!error) - VM_OBJECT_WUNLOCK(obj); SFSTAT_INC(sf_iocnt); + if (error) + VM_OBJECT_WLOCK(obj); } if (error) { vm_page_lock(pg); From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 16:25:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 46D29445; Sun, 4 Aug 2013 16:25:47 +0000 (UTC) (envelope-from rmh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 34C2B2E91; Sun, 4 Aug 2013 16:25:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r74GPlc5013565; Sun, 4 Aug 2013 16:25:47 GMT (envelope-from rmh@svn.freebsd.org) Received: (from rmh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r74GPlJU013564; Sun, 4 Aug 2013 16:25:47 GMT (envelope-from rmh@svn.freebsd.org) Message-Id: <201308041625.r74GPlJU013564@svn.freebsd.org> From: Robert Millan Date: Sun, 4 Aug 2013 16:25:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253930 - head/cddl/contrib/opensolaris/cmd/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 16:25:47 -0000 Author: rmh Date: Sun Aug 4 16:25:46 2013 New Revision: 253930 URL: http://svnweb.freebsd.org/changeset/base/253930 Log: Fix implicit declaration of warnx(). Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Aug 4 16:23:09 2013 (r253929) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sun Aug 4 16:25:46 2013 (r253930) @@ -57,6 +57,7 @@ #include #include #include +#include #include #include From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 17:14:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D921FFAA; Sun, 4 Aug 2013 17:14:42 +0000 (UTC) (envelope-from rpaulo@felyko.com) Received: from felyko.com (felyko.com [174.136.100.2]) by mx1.freebsd.org (Postfix) with ESMTP id BC97A206B; Sun, 4 Aug 2013 17:14:42 +0000 (UTC) Received: from [IPv6:2601:9:4d00:119:c1a4:5299:ada4:3d28] (unknown [IPv6:2601:9:4d00:119:c1a4:5299:ada4:3d28]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 51B2F3981E; Sun, 4 Aug 2013 10:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=felyko.com; s=mail; t=1375636476; bh=OqsxRo/LjhgneJARHs9ix4w/VaZ5ioGA2zogrIn74bM=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=G5rT7xqeNYYLcoQd7agZ+Qmxgi4gG+WBoanEQ+szcV6nUJd/frQ9zaOPvfPxdpbgM WDRlZmJR10Exu4E393i6LjmUCWf3lsdNrrwvRoQCMRo5uhUSVnh59IAeFV+PoM9GTo WYKrVr2crZV/moJ/jOpXpdBPvEvsJbqwP9r/oN0E= Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r253883 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests From: Rui Paulo In-Reply-To: <20130804062722.B626258097@chaos.jnpr.net> Date: Sun, 4 Aug 2013 10:14:36 -0700 Content-Transfer-Encoding: 7bit Message-Id: <4B439B9B-E05E-4CC7-A887-4B5847401F4A@felyko.com> References: <201308020625.r726PTkY012023@svn.freebsd.org> <20130803060104.708E258097@chaos.jnpr.net> <93CDA01C-5609-4AD9-A865-6598787E3A0C@felyko.com> <20130804062722.B626258097@chaos.jnpr.net> To: Simon J. Gerraty X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 17:14:42 -0000 On 3 Aug 2013, at 23:27, Simon J. Gerraty wrote: > > On Sat, 3 Aug 2013 22:11:46 -0700, Rui Paulo writes: >> On 2 Aug 2013, at 23:01, Simon J. Gerraty wrote: >> >>> >>> On Fri, 2 Aug 2013 22:46:36 -0700, Rui Paulo writes: >>>> Cool! Can we set this in /etc/make.conf ? >>> >>> I would expect so. >> >> Doesn't seem to make any effect... > > Ah, looks like Job_SetPrefix() is called too early, will fix. > You can set it on the command line for sure. Yes, that works. -- Rui Paulo From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 18:10:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1A3F1CE2; Sun, 4 Aug 2013 18:10:42 +0000 (UTC) (envelope-from rpaulo@felyko.com) Received: from felyko.com (felyko.com [IPv6:2607:f2f8:a528::3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id 008DC2227; Sun, 4 Aug 2013 18:10:42 +0000 (UTC) Received: from [IPv6:2601:9:4d00:119:c1a4:5299:ada4:3d28] (unknown [IPv6:2601:9:4d00:119:c1a4:5299:ada4:3d28]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 0D8E23981E; Sun, 4 Aug 2013 11:10:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=felyko.com; s=mail; t=1375639841; bh=/dtYmMR42PesrH9MCBlbZej2y/JzcQyyEXwM46fiS18=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=ltEj0/ovnr3XpRPi+81IrpKm07VEx6QhJ9sr4iM0VgIr2/MgKkHtbJj9ENaBCNzbe vW8lGs2PJGX1Nq5rOhsu9JiyTwLIVKRKJFlrPNMTOMSIKxnVUi7mD6Puuw57CGYqDi Me12jsHwY8m4shz0kBcdZW8wkKo7yKEyozd/xIH4= Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r253925 - head/contrib/bmake From: Rui Paulo In-Reply-To: <201308040710.r747AG14050180@svn.freebsd.org> Date: Sun, 4 Aug 2013 11:10:39 -0700 Content-Transfer-Encoding: 7bit Message-Id: <13138463-0D72-4DCD-A841-F9E7B304EBB2@felyko.com> References: <201308040710.r747AG14050180@svn.freebsd.org> To: Simon J. Gerraty X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 18:10:42 -0000 On 4 Aug 2013, at 00:10, Simon J. Gerraty wrote: > Author: sjg > Date: Sun Aug 4 07:10:16 2013 > New Revision: 253925 > URL: http://svnweb.freebsd.org/changeset/base/253925 > > Log: > Move the call to Job_SetPrefix() to Job_Init() so that > makefiles have had a chance to set .MAKE.JOB.PREFIX > > Modified: > head/contrib/bmake/job.c > head/contrib/bmake/main.c Thanks! -- Rui Paulo From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 19:36:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 859FE1A7; Sun, 4 Aug 2013 19:36:47 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 70ABB2698; Sun, 4 Aug 2013 19:36:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r74JalqF069481; Sun, 4 Aug 2013 19:36:47 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r74JalE7069480; Sun, 4 Aug 2013 19:36:47 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201308041936.r74JalE7069480@svn.freebsd.org> From: Rui Paulo Date: Sun, 4 Aug 2013 19:36:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253936 - head/etc/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 19:36:47 -0000 Author: rpaulo Date: Sun Aug 4 19:36:46 2013 New Revision: 253936 URL: http://svnweb.freebsd.org/changeset/base/253936 Log: Regen for if_rsu. Modified: head/etc/devd/usb.conf Modified: head/etc/devd/usb.conf ============================================================================== --- head/etc/devd/usb.conf Sun Aug 4 19:17:06 2013 (r253935) +++ head/etc/devd/usb.conf Sun Aug 4 19:36:46 2013 (r253936) @@ -777,7 +777,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x050d"; - match "product" "(0x8053|0x805c|0x815c|0x825a|0x825b)"; + match "product" "(0x8053|0x805c|0x815c)"; action "kldload -n if_run"; }; @@ -785,6 +785,30 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x050d"; + match "product" "0x815f"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x050d"; + match "product" "(0x825a|0x825b)"; + action "kldload -n if_run"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x050d"; + match "product" "0x845a"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x050d"; match "product" "0x905b"; action "kldload -n if_rum"; }; @@ -800,6 +824,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x050d"; + match "product" "0x945a"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0525"; match "product" "(0x1080|0xa4a0)"; action "kldload -n udbp"; @@ -1249,6 +1281,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x06f8"; + match "product" "(0xe031|0xe032)"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x06f8"; match "product" "0xe033"; action "kldload -n if_urtwn"; }; @@ -1457,6 +1497,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x07aa"; + match "product" "0x0047"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x07aa"; match "product" "0x0056"; action "kldload -n if_urtwn"; }; @@ -1561,6 +1609,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x07d1"; + match "product" "(0x3300|0x3302|0x3303)"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x07d1"; match "product" "0x3a0c"; action "kldload -n if_uath"; }; @@ -1657,7 +1713,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x083a"; - match "product" "(0x6618|0x7511|0x7512|0x7522|0x8522|0xa512|0xa618|0xa701|0xa702|0xb522|0xc522|0xd522)"; + match "product" "(0x6618|0x7511|0x7512|0x7522|0x8522|0xa512|0xa618|0xa701|0xa702|0xb522)"; + action "kldload -n if_run"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x083a"; + match "product" "0xc512"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x083a"; + match "product" "(0xc522|0xd522)"; action "kldload -n if_run"; }; @@ -2137,7 +2209,39 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0b05"; - match "product" "(0x1731|0x1732|0x1742|0x1760|0x1761|0x1784|0x1790|0x179d)"; + match "product" "(0x1731|0x1732|0x1742|0x1760|0x1761|0x1784)"; + action "kldload -n if_run"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x1786"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x1790"; + action "kldload -n if_run"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x1791"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b05"; + match "product" "0x179d"; action "kldload -n if_run"; }; @@ -2273,7 +2377,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; - match "product" "(0x8170|0x8176|0x8177|0x8178|0x817a|0x817b|0x817c|0x817d|0x817e)"; + match "product" "0x8170"; + action "kldload -n if_urtwn"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0bda"; + match "product" "(0x8171|0x8172|0x8173|0x8174)"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0bda"; + match "product" "(0x8176|0x8177|0x8178|0x817a|0x817b|0x817c|0x817d|0x817e)"; action "kldload -n if_urtwn"; }; @@ -2305,6 +2425,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; + match "product" "(0x8712|0x8712)"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0bda"; match "product" "0x8754"; action "kldload -n if_urtwn"; }; @@ -2312,6 +2440,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0bda"; + match "product" "0xc512"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0bed"; match "product" "(0x1100|0x1101)"; action "kldload -n uslcom"; @@ -2609,7 +2745,39 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0df6"; - match "product" "(0x002b|0x002c|0x002d|0x0039|0x003b|0x003c|0x003d|0x003e|0x003f|0x0040|0x0041|0x0042|0x0047|0x0048|0x004a|0x004d)"; + match "product" "(0x002b|0x002c|0x002d|0x0039|0x003b|0x003c|0x003d|0x003e|0x003f|0x0040|0x0041|0x0042)"; + action "kldload -n if_run"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0df6"; + match "product" "0x0045"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0df6"; + match "product" "(0x0047|0x0048|0x004a)"; + action "kldload -n if_run"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0df6"; + match "product" "0x004b"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0df6"; + match "product" "0x004d"; action "kldload -n if_run"; }; @@ -2681,6 +2849,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0e66"; + match "product" "(0x0015|0x0016)"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0e66"; match "product" "0x0019"; action "kldload -n if_urtwn"; }; @@ -3401,6 +3577,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x13d3"; + match "product" "(0x3306|0x3309|0x3310|0x3311|0x3325)"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x13d3"; match "product" "(0x3357|0x3358|0x3359)"; action "kldload -n if_urtwn"; }; @@ -3553,6 +3737,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x14b2"; + match "product" "(0x3300|0x3301|0x3302)"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x14b2"; match "product" "0x3c02"; action "kldload -n if_ural"; }; @@ -3945,6 +4137,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1740"; + match "product" "(0x9603|0x9605)"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x1740"; match "product" "(0x9701|0x9702|0x9703|0x9705|0x9706|0x9707|0x9708|0x9709|0x9801)"; action "kldload -n if_run"; }; @@ -3961,7 +4161,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x177f"; - match "product" "(0x0153|0x0302|0x0313)"; + match "product" "0x0153"; + action "kldload -n if_run"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x177f"; + match "product" "0x0154"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x177f"; + match "product" "(0x0302|0x0313)"; action "kldload -n if_run"; }; @@ -4353,6 +4569,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2019"; + match "product" "0xab28"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x2019"; match "product" "(0xab2a|0xab2b|0xab2e)"; action "kldload -n if_urtwn"; }; @@ -4681,6 +4905,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x7392"; + match "product" "(0x7611|0x7612|0x7622)"; + action "kldload -n if_rsu"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x7392"; match "product" "(0x7711|0x7717|0x7718)"; action "kldload -n if_run"; }; @@ -4936,5 +5168,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2477 USB entries processed +# 2515 USB entries processed From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 19:54:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6CB89872; Sun, 4 Aug 2013 19:54:48 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 59E07275B; Sun, 4 Aug 2013 19:54:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r74Jsm2g075042; Sun, 4 Aug 2013 19:54:48 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r74JsmST075041; Sun, 4 Aug 2013 19:54:48 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201308041954.r74JsmST075041@svn.freebsd.org> From: Hiren Panchasara Date: Sun, 4 Aug 2013 19:54:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253937 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 19:54:48 -0000 Author: hiren Date: Sun Aug 4 19:54:47 2013 New Revision: 253937 URL: http://svnweb.freebsd.org/changeset/base/253937 Log: Fixing a typo. Approved by: sbruno (mentor, implicit) Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sun Aug 4 19:36:46 2013 (r253936) +++ head/sys/dev/iwn/if_iwn.c Sun Aug 4 19:54:47 2013 (r253937) @@ -7489,7 +7489,7 @@ iwn_hw_reset(void *arg0, int pending) #define COUNTOF(array) (sizeof(array) / sizeof(array[0])) /* - * Transate CSR code to string + * Translate CSR code to string */ static char *iwn_get_csr_string(int csr) { From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 21:00:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A3E2AA1B; Sun, 4 Aug 2013 21:00:23 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 914B229C2; Sun, 4 Aug 2013 21:00:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r74L0N6c093940; Sun, 4 Aug 2013 21:00:23 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r74L0NqN093938; Sun, 4 Aug 2013 21:00:23 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201308042100.r74L0NqN093938@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 4 Aug 2013 21:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253938 - head/sys/geom/part X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 21:00:23 -0000 Author: marcel Date: Sun Aug 4 21:00:22 2013 New Revision: 253938 URL: http://svnweb.freebsd.org/changeset/base/253938 Log: Remove inclusion of . We have no business knowing anything related to MBR in this file. Modified: head/sys/geom/part/g_part.c head/sys/geom/part/g_part_apm.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Sun Aug 4 19:54:47 2013 (r253937) +++ head/sys/geom/part/g_part.c Sun Aug 4 21:00:22 2013 (r253938) @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/geom/part/g_part_apm.c ============================================================================== --- head/sys/geom/part/g_part_apm.c Sun Aug 4 19:54:47 2013 (r253937) +++ head/sys/geom/part/g_part_apm.c Sun Aug 4 21:00:22 2013 (r253938) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 21:07:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BAB5CCA7; Sun, 4 Aug 2013 21:07:26 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A4B0029E9; Sun, 4 Aug 2013 21:07:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r74L7Qv6096515; Sun, 4 Aug 2013 21:07:26 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r74L7OvH096499; Sun, 4 Aug 2013 21:07:24 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201308042107.r74L7OvH096499@svn.freebsd.org> From: Attilio Rao Date: Sun, 4 Aug 2013 21:07:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253939 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/tmpfs kern vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 21:07:26 -0000 Author: attilio Date: Sun Aug 4 21:07:24 2013 New Revision: 253939 URL: http://svnweb.freebsd.org/changeset/base/253939 Log: The page hold mechanism is fast but it has couple of fallouts: - It does not let pages respect the LRU policy - It bloats the active/inactive queues of few pages Try to avoid it as much as possible with the long-term target to completely remove it. Use the soft-busy mechanism to protect page content accesses during short-term operations (like uiomove_fromphys()). After this change only vm_fault_quick_hold_pages() is still using the hold mechanism for page content access. There is an additional complexity there as the quick path cannot immediately access the page object to busy the page and the slow path cannot however busy more than one page a time (to avoid deadlocks). Fixing such primitive can bring to complete removal of the page hold mechanism. Sponsored by: EMC / Isilon storage division Discussed with: alc Reviewed by: jeff Tested by: pho Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/kern/imgact_elf.c head/sys/kern/kern_exec.c head/sys/kern/sys_process.c head/sys/vm/vm_extern.h head/sys/vm/vm_fault.c head/sys/vm/vm_glue.c head/sys/vm/vm_map.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Aug 4 21:00:22 2013 (r253938) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Aug 4 21:07:24 2013 (r253939) @@ -324,7 +324,8 @@ zfs_ioctl(vnode_t *vp, u_long com, intpt } static vm_page_t -page_busy(vnode_t *vp, int64_t start, int64_t off, int64_t nbytes) +page_busy(vnode_t *vp, int64_t start, int64_t off, int64_t nbytes, + boolean_t alloc) { vm_object_t obj; vm_page_t pp; @@ -346,6 +347,8 @@ page_busy(vnode_t *vp, int64_t start, in continue; } } else if (pp == NULL) { + if (!alloc) + break; pp = vm_page_alloc(obj, OFF_TO_IDX(start), VM_ALLOC_SYSTEM | VM_ALLOC_IFCACHED | VM_ALLOC_NOBUSY); @@ -356,8 +359,10 @@ page_busy(vnode_t *vp, int64_t start, in if (pp != NULL) { ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); - vm_object_pip_add(obj, 1); vm_page_io_start(pp); + if (!alloc) + break; + vm_object_pip_add(obj, 1); pmap_remove_write(pp); vm_page_clear_dirty(pp, off, nbytes); } @@ -367,55 +372,12 @@ page_busy(vnode_t *vp, int64_t start, in } static void -page_unbusy(vm_page_t pp) +page_unbusy(vm_page_t pp, boolean_t unalloc) { vm_page_io_finish(pp); - vm_object_pip_subtract(pp->object, 1); -} - -static vm_page_t -page_hold(vnode_t *vp, int64_t start) -{ - vm_object_t obj; - vm_page_t pp; - - obj = vp->v_object; - zfs_vmobject_assert_wlocked(obj); - - for (;;) { - if ((pp = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && - pp->valid) { - if ((pp->oflags & VPO_BUSY) != 0) { - /* - * Reference the page before unlocking and - * sleeping so that the page daemon is less - * likely to reclaim it. - */ - vm_page_reference(pp); - vm_page_sleep(pp, "zfsmwb"); - continue; - } - - ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); - vm_page_lock(pp); - vm_page_hold(pp); - vm_page_unlock(pp); - - } else - pp = NULL; - break; - } - return (pp); -} - -static void -page_unhold(vm_page_t pp) -{ - - vm_page_lock(pp); - vm_page_unhold(pp); - vm_page_unlock(pp); + if (unalloc) + vm_object_pip_subtract(pp->object, 1); } static caddr_t @@ -479,7 +441,8 @@ update_pages(vnode_t *vp, int64_t start, zfs_vmobject_wlock(obj); vm_page_undirty(pp); - } else if ((pp = page_busy(vp, start, off, nbytes)) != NULL) { + } else if ((pp = page_busy(vp, start, off, nbytes, + TRUE)) != NULL) { zfs_vmobject_wunlock(obj); va = zfs_map_page(pp, &sf); @@ -488,7 +451,7 @@ update_pages(vnode_t *vp, int64_t start, zfs_unmap_page(sf); zfs_vmobject_wlock(obj); - page_unbusy(pp); + page_unbusy(pp, TRUE); } len -= nbytes; off = 0; @@ -598,7 +561,7 @@ mappedread(vnode_t *vp, int nbytes, uio_ vm_page_t pp; uint64_t bytes = MIN(PAGESIZE - off, len); - if (pp = page_hold(vp, start)) { + if (pp = page_busy(vp, start, 0, 0, FALSE)) { struct sf_buf *sf; caddr_t va; @@ -607,7 +570,7 @@ mappedread(vnode_t *vp, int nbytes, uio_ error = uiomove(va + off, bytes, UIO_READ, uio); zfs_unmap_page(sf); zfs_vmobject_wlock(obj); - page_unhold(pp); + page_unbusy(pp, FALSE); } else { zfs_vmobject_wunlock(obj); error = dmu_read_uio(os, zp->z_id, uio, bytes); Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Sun Aug 4 21:00:22 2013 (r253938) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Sun Aug 4 21:07:24 2013 (r253939) @@ -485,13 +485,13 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p vm_page_zero_invalid(m, TRUE); vm_page_wakeup(m); } - vm_page_lock(m); - vm_page_hold(m); - vm_page_unlock(m); + vm_page_io_start(m); VM_OBJECT_WUNLOCK(tobj); error = uiomove_fromphys(&m, offset, tlen, uio); + VM_OBJECT_WLOCK(tobj); + vm_page_io_finish(m); + VM_OBJECT_WUNLOCK(tobj); vm_page_lock(m); - vm_page_unhold(m); if (m->queue == PQ_NONE) { vm_page_deactivate(m); } else { @@ -602,16 +602,14 @@ tmpfs_mappedwrite(vm_object_t tobj, size vm_page_zero_invalid(tpg, TRUE); vm_page_wakeup(tpg); } - vm_page_lock(tpg); - vm_page_hold(tpg); - vm_page_unlock(tpg); + vm_page_io_start(tpg); VM_OBJECT_WUNLOCK(tobj); error = uiomove_fromphys(&tpg, offset, tlen, uio); VM_OBJECT_WLOCK(tobj); + vm_page_io_finish(tpg); if (error == 0) vm_page_dirty(tpg); vm_page_lock(tpg); - vm_page_unhold(tpg); if (tpg->queue == PQ_NONE) { vm_page_deactivate(tpg); } else { Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Sun Aug 4 21:00:22 2013 (r253938) +++ head/sys/kern/imgact_elf.c Sun Aug 4 21:07:24 2013 (r253939) @@ -378,7 +378,7 @@ __elfN(map_partial)(vm_map_t map, vm_obj off = offset - trunc_page(offset); error = copyout((caddr_t)sf_buf_kva(sf) + off, (caddr_t)start, end - start); - vm_imgact_unmap_page(sf); + vm_imgact_unmap_page(object, sf); if (error) { return (KERN_FAILURE); } @@ -433,7 +433,7 @@ __elfN(map_insert)(vm_map_t map, vm_obje sz = PAGE_SIZE - off; error = copyout((caddr_t)sf_buf_kva(sf) + off, (caddr_t)start, sz); - vm_imgact_unmap_page(sf); + vm_imgact_unmap_page(object, sf); if (error) { return (KERN_FAILURE); } @@ -553,7 +553,7 @@ __elfN(load_section)(struct image_params trunc_page(offset + filsz); error = copyout((caddr_t)sf_buf_kva(sf) + off, (caddr_t)map_addr, copy_len); - vm_imgact_unmap_page(sf); + vm_imgact_unmap_page(object, sf); if (error) { return (error); } Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Sun Aug 4 21:00:22 2013 (r253938) +++ head/sys/kern/kern_exec.c Sun Aug 4 21:07:24 2013 (r253939) @@ -973,7 +973,7 @@ exec_map_first_page(imgp) vm_page_wakeup(ma[0]); } vm_page_lock(ma[0]); - vm_page_hold(ma[0]); + vm_page_wire(ma[0]); vm_page_unlock(ma[0]); VM_OBJECT_WUNLOCK(object); @@ -994,7 +994,7 @@ exec_unmap_first_page(imgp) sf_buf_free(imgp->firstpage); imgp->firstpage = NULL; vm_page_lock(m); - vm_page_unhold(m); + vm_page_unwire(m, 0); vm_page_unlock(m); } } Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Sun Aug 4 21:00:22 2013 (r253938) +++ head/sys/kern/sys_process.c Sun Aug 4 21:07:24 2013 (r253939) @@ -263,6 +263,7 @@ proc_rwmem(struct proc *p, struct uio *u writing = uio->uio_rw == UIO_WRITE; reqprot = writing ? VM_PROT_COPY | VM_PROT_READ : VM_PROT_READ; fault_flags = writing ? VM_FAULT_DIRTY : VM_FAULT_NORMAL; + fault_flags |= VM_FAULT_IOBUSY; /* * Only map in one page at a time. We don't have to, but it @@ -287,9 +288,9 @@ proc_rwmem(struct proc *p, struct uio *u len = min(PAGE_SIZE - page_offset, uio->uio_resid); /* - * Fault and hold the page on behalf of the process. + * Fault and busy the page on behalf of the process. */ - error = vm_fault_hold(map, pageno, reqprot, fault_flags, &m); + error = vm_fault_handle(map, pageno, reqprot, fault_flags, &m); if (error != KERN_SUCCESS) { if (error == KERN_RESOURCE_SHORTAGE) error = ENOMEM; @@ -315,9 +316,9 @@ proc_rwmem(struct proc *p, struct uio *u /* * Release the page. */ - vm_page_lock(m); - vm_page_unhold(m); - vm_page_unlock(m); + VM_OBJECT_WLOCK(m->object); + vm_page_io_finish(m); + VM_OBJECT_WUNLOCK(m->object); } while (error == 0 && uio->uio_resid > 0); Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Sun Aug 4 21:00:22 2013 (r253938) +++ head/sys/vm/vm_extern.h Sun Aug 4 21:07:24 2013 (r253939) @@ -63,7 +63,7 @@ void vm_fault_copy_entry(vm_map_t, vm_ma vm_ooffset_t *); int vm_fault_disable_pagefaults(void); void vm_fault_enable_pagefaults(int save); -int vm_fault_hold(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, +int vm_fault_handle(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int fault_flags, vm_page_t *m_hold); int vm_fault_quick_hold_pages(vm_map_t map, vm_offset_t addr, vm_size_t len, vm_prot_t prot, vm_page_t *ma, int max_count); @@ -87,7 +87,7 @@ void vnode_pager_setsize(struct vnode *, int vslock(void *, size_t); void vsunlock(void *, size_t); struct sf_buf *vm_imgact_map_page(vm_object_t object, vm_ooffset_t offset); -void vm_imgact_unmap_page(struct sf_buf *sf); +void vm_imgact_unmap_page(vm_object_t, struct sf_buf *sf); void vm_thread_dispose(struct thread *td); int vm_thread_new(struct thread *td, int pages); int vm_mlock(struct proc *, struct ucred *, const void *, size_t); Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Sun Aug 4 21:00:22 2013 (r253938) +++ head/sys/vm/vm_fault.c Sun Aug 4 21:07:24 2013 (r253939) @@ -221,8 +221,8 @@ vm_fault(vm_map_t map, vm_offset_t vaddr if (map != kernel_map && KTRPOINT(td, KTR_FAULT)) ktrfault(vaddr, fault_type); #endif - result = vm_fault_hold(map, trunc_page(vaddr), fault_type, fault_flags, - NULL); + result = vm_fault_handle(map, trunc_page(vaddr), fault_type, + fault_flags, NULL); #ifdef KTRACE if (map != kernel_map && KTRPOINT(td, KTR_FAULTEND)) ktrfaultend(result); @@ -231,7 +231,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr } int -vm_fault_hold(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, +vm_fault_handle(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int fault_flags, vm_page_t *m_hold) { vm_prot_t prot; @@ -943,7 +943,10 @@ vnode_locked: vm_page_activate(fs.m); if (m_hold != NULL) { *m_hold = fs.m; - vm_page_hold(fs.m); + if (fault_flags & VM_FAULT_IOBUSY) + vm_page_io_start(fs.m); + else + vm_page_hold(fs.m); } vm_page_unlock(fs.m); vm_page_wakeup(fs.m); @@ -1145,7 +1148,7 @@ vm_fault_quick_hold_pages(vm_map_t map, * and hold these pages. */ for (mp = ma, va = addr; va < end; mp++, va += PAGE_SIZE) - if (*mp == NULL && vm_fault_hold(map, va, prot, + if (*mp == NULL && vm_fault_handle(map, va, prot, VM_FAULT_NORMAL, mp) != KERN_SUCCESS) goto error; } Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Sun Aug 4 21:00:22 2013 (r253938) +++ head/sys/vm/vm_glue.c Sun Aug 4 21:07:24 2013 (r253939) @@ -223,7 +223,7 @@ vsunlock(void *addr, size_t len) * Return the pinned page if successful; otherwise, return NULL. */ static vm_page_t -vm_imgact_hold_page(vm_object_t object, vm_ooffset_t offset) +vm_imgact_page_iostart(vm_object_t object, vm_ooffset_t offset) { vm_page_t m, ma[1]; vm_pindex_t pindex; @@ -249,9 +249,7 @@ vm_imgact_hold_page(vm_object_t object, } vm_page_wakeup(m); } - vm_page_lock(m); - vm_page_hold(m); - vm_page_unlock(m); + vm_page_io_start(m); out: VM_OBJECT_WUNLOCK(object); return (m); @@ -266,7 +264,7 @@ vm_imgact_map_page(vm_object_t object, v { vm_page_t m; - m = vm_imgact_hold_page(object, offset); + m = vm_imgact_page_iostart(object, offset); if (m == NULL) return (NULL); sched_pin(); @@ -277,16 +275,16 @@ vm_imgact_map_page(vm_object_t object, v * Destroy the given CPU private mapping and unpin the page that it mapped. */ void -vm_imgact_unmap_page(struct sf_buf *sf) +vm_imgact_unmap_page(vm_object_t object, struct sf_buf *sf) { vm_page_t m; m = sf_buf_page(sf); sf_buf_free(sf); sched_unpin(); - vm_page_lock(m); - vm_page_unhold(m); - vm_page_unlock(m); + VM_OBJECT_WLOCK(object); + vm_page_io_finish(m); + VM_OBJECT_WUNLOCK(object); } void Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Sun Aug 4 21:00:22 2013 (r253938) +++ head/sys/vm/vm_map.h Sun Aug 4 21:07:24 2013 (r253939) @@ -329,6 +329,7 @@ long vmspace_resident_count(struct vmspa #define VM_FAULT_NORMAL 0 /* Nothing special */ #define VM_FAULT_CHANGE_WIRING 1 /* Change the wiring as appropriate */ #define VM_FAULT_DIRTY 2 /* Dirty the page; use w/VM_PROT_COPY */ +#define VM_FAULT_IOBUSY 4 /* Busy the faulted page */ /* * Initially, mappings are slightly sequential. The maximum window size must From owner-svn-src-head@FreeBSD.ORG Sun Aug 4 21:17:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 22719EE5; Sun, 4 Aug 2013 21:17:06 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0FA602A2B; Sun, 4 Aug 2013 21:17:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r74LH5HW099598; Sun, 4 Aug 2013 21:17:05 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r74LH5Vk099596; Sun, 4 Aug 2013 21:17:05 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201308042117.r74LH5Vk099596@svn.freebsd.org> From: Attilio Rao Date: Sun, 4 Aug 2013 21:17:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253940 - in head/sys/sparc64: include sparc64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Aug 2013 21:17:06 -0000 Author: attilio Date: Sun Aug 4 21:17:05 2013 New Revision: 253940 URL: http://svnweb.freebsd.org/changeset/base/253940 Log: Remove unused member. Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by: pho Modified: head/sys/sparc64/include/pmap.h head/sys/sparc64/sparc64/pmap.c Modified: head/sys/sparc64/include/pmap.h ============================================================================== --- head/sys/sparc64/include/pmap.h Sun Aug 4 21:07:24 2013 (r253939) +++ head/sys/sparc64/include/pmap.h Sun Aug 4 21:17:05 2013 (r253940) @@ -56,7 +56,6 @@ struct md_page { struct pmap *pmap; uint32_t colors[DCACHE_COLORS]; int32_t color; - uint32_t flags; }; struct pmap { Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Sun Aug 4 21:07:24 2013 (r253939) +++ head/sys/sparc64/sparc64/pmap.c Sun Aug 4 21:17:05 2013 (r253940) @@ -765,7 +765,6 @@ pmap_page_init(vm_page_t m) TAILQ_INIT(&m->md.tte_list); m->md.color = DCACHE_COLOR(VM_PAGE_TO_PHYS(m)); - m->md.flags = 0; m->md.pmap = NULL; } From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 00:28:04 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 504A25BF; Mon, 5 Aug 2013 00:28:04 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3D3332FCC; Mon, 5 Aug 2013 00:28:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r750S42B056023; Mon, 5 Aug 2013 00:28:04 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r750S3fY056021; Mon, 5 Aug 2013 00:28:03 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201308050028.r750S3fY056021@svn.freebsd.org> From: Jeff Roberson Date: Mon, 5 Aug 2013 00:28:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253949 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 00:28:04 -0000 Author: jeff Date: Mon Aug 5 00:28:03 2013 New Revision: 253949 URL: http://svnweb.freebsd.org/changeset/base/253949 Log: - Introduce a specific function, pmap_remove_kernel_pde, for removing huge pages in the kernel's address space. This works around several asserts from pmap_demote_pde_locked that did not apply and gave false warnings. Discovered by: pho Reviewed by: alc Sponsored by: EMC / Isilon Storage Division Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sun Aug 4 23:45:04 2013 (r253948) +++ head/sys/amd64/amd64/pmap.c Mon Aug 5 00:28:03 2013 (r253949) @@ -2795,6 +2795,44 @@ pmap_demote_pde_locked(pmap_t pmap, pd_e } /* + * pmap_remove_kernel_pde: Remove a kernel superpage mapping. + */ +static void +pmap_remove_kernel_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) +{ + pd_entry_t newpde; + vm_paddr_t mptepa; + vm_page_t mpte; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + mpte = pmap_lookup_pt_page(pmap, va); + if (mpte == NULL) + panic("pmap_remove_kernel_pde: Missing pt page."); + + pmap_remove_pt_page(pmap, mpte); + mptepa = VM_PAGE_TO_PHYS(mpte); + newpde = mptepa | PG_M | PG_A | PG_RW | PG_V; + + /* + * Initialize the page table page. + */ + pagezero((void *)PHYS_TO_DMAP(mptepa)); + + /* + * Demote the mapping. + */ + if (workaround_erratum383) + pmap_update_pde(pmap, va, pde, newpde); + else + pde_store(pde, newpde); + + /* + * Invalidate a stale recursive mapping of the page table page. + */ + pmap_invalidate_page(pmap, (vm_offset_t)vtopte(va)); +} + +/* * pmap_remove_pde: do the things to unmap a superpage in a process */ static int @@ -2837,8 +2875,7 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t } } if (pmap == kernel_pmap) { - if (!pmap_demote_pde_locked(pmap, pdq, sva, lockp)) - panic("pmap_remove_pde: failed demotion"); + pmap_remove_kernel_pde(pmap, pdq, sva); } else { mpte = pmap_lookup_pt_page(pmap, sva); if (mpte != NULL) { Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sun Aug 4 23:45:04 2013 (r253948) +++ head/sys/i386/i386/pmap.c Mon Aug 5 00:28:03 2013 (r253949) @@ -2773,6 +2773,44 @@ pmap_demote_pde(pmap_t pmap, pd_entry_t } /* + * Removes a 2- or 4MB page mapping from the kernel pmap. + */ +static void +pmap_remove_kernel_pde(pmap_t pmap, pd_entry_t *pde, vm_offset_t va) +{ + pd_entry_t newpde; + vm_paddr_t mptepa; + vm_page_t mpte; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + mpte = pmap_lookup_pt_page(pmap, va); + if (mpte == NULL) + panic("pmap_remove_kernel_pde: Missing pt page."); + + pmap_remove_pt_page(pmap, mpte); + mptepa = VM_PAGE_TO_PHYS(mpte); + newpde = mptepa | PG_M | PG_A | PG_RW | PG_V; + + /* + * Initialize the page table page. + */ + pagezero((void *)&KPTmap[i386_btop(trunc_4mpage(va))]); + + /* + * Remove the mapping. + */ + if (workaround_erratum383) + pmap_update_pde(pmap, va, pde, newpde); + else + pmap_kenter_pde(va, newpde); + + /* + * Invalidate the recursive mapping of the page table page. + */ + pmap_invalidate_page(pmap, (vm_offset_t)vtopte(va)); +} + +/* * pmap_remove_pde: do the things to unmap a superpage in a process */ static void @@ -2814,8 +2852,7 @@ pmap_remove_pde(pmap_t pmap, pd_entry_t } } if (pmap == kernel_pmap) { - if (!pmap_demote_pde(pmap, pdq, sva)) - panic("pmap_remove_pde: failed demotion"); + pmap_remove_kernel_pde(pmap, pdq, sva); } else { mpte = pmap_lookup_pt_page(pmap, sva); if (mpte != NULL) { From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 00:36:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8E0577F8; Mon, 5 Aug 2013 00:36:12 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7B5332034; Mon, 5 Aug 2013 00:36:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r750aCqA058784; Mon, 5 Aug 2013 00:36:12 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r750aCXq058783; Mon, 5 Aug 2013 00:36:12 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201308050036.r750aCXq058783@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Aug 2013 00:36:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253950 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 00:36:12 -0000 Author: hrs Date: Mon Aug 5 00:36:12 2013 New Revision: 253950 URL: http://svnweb.freebsd.org/changeset/base/253950 Log: Fix a panic in tmpaddrtimer. Modified: head/sys/netinet6/in6_ifattach.c Modified: head/sys/netinet6/in6_ifattach.c ============================================================================== --- head/sys/netinet6/in6_ifattach.c Mon Aug 5 00:28:03 2013 (r253949) +++ head/sys/netinet6/in6_ifattach.c Mon Aug 5 00:36:12 2013 (r253950) @@ -932,6 +932,8 @@ in6_tmpaddrtimer(void *arg) bzero(nullbuf, sizeof(nullbuf)); TAILQ_FOREACH(ifp, &V_ifnet, if_list) { + if (ifp->if_afdata[AF_INET6] == NULL) + continue; ndi = ND_IFINFO(ifp); if (bcmp(ndi->randomid, nullbuf, sizeof(nullbuf)) != 0) { /* From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 01:35:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 30EA854A; Mon, 5 Aug 2013 01:35:16 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D5F5421AB; Mon, 5 Aug 2013 01:35:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1V69hR-0006EL-RB; Mon, 05 Aug 2013 05:35:06 +0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:Date:X-TorMail-User:Content-Type:MIME-Version:References:In-Reply-To:Subject:Cc:To:From; bh=GnnXe7NCtM6ThPPZ8Wn3qAqb3KlNJjsW8H43xlHWJGY=; b=GaMbgY1q08WRElmNHV5F6yseKFUs6OcNMZxXgvBMMlKz+/GwwPKyB0xHSz2oN3PHArIud+0NC7UCSAVq2s+noKv9M/G421IuDRVwLD0R8EzGkVp3UWkkA4VwsQyY/KewV/zCQoRInCgEDxIo17/pGVioSehjtVgYlw3i1wkbrOw=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1V65V2-0001RI-Fu; Sun, 04 Aug 2013 21:06:05 +0000 From: Jan Beich To: Marcel Moolenaar Subject: Re: svn commit: r253862 - head/sys/boot/ficl In-Reply-To: <201308011806.r71I6xpd088690@svn.freebsd.org> (Marcel Moolenaar's message of "Thu, 1 Aug 2013 18:06:59 +0000 (UTC)") References: <201308011806.r71I6xpd088690@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Date: Sun, 04 Aug 2013 21:06:05 +0000 Message-Id: <1V65V2-0001RI-Fu@internal.tormail.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 01:35:16 -0000 Marcel Moolenaar writes: > + static union { > + struct dirent dirent; > + char buf[512]; > + } u; > + off_t off; > + int len; [...] > + /* > + * The readdirfd() function is specific to the loader environment. > + * We do the best we can to make freaddir work, but it's not at > + * all guaranteed. > + */ > + off = lseek(fd, 0LL, SEEK_CUR); > + len = getdents(fd, u.buf, sizeof(u.buf)); > + d = (len != -1) ? &u.dirent : NULL; > + if (d != NULL) > + lseek(fd, off + d->d_reclen, SEEK_SET); How did you test? I can't make the code work on amd64 using either ficl32 or ficl64. # r253862 ok> s" /bin" 0 fopen ok> dup freaddir . type cr -1 . ok> dup freaddir . type cr -1 sleep ok> dup freaddir . type cr -1 sleep ok> dup freaddir . type cr -1 sleep ok> dup freaddir . type cr -1 sleep # bin/172542 ok> s" /bin" 0 fopen ok> dup freaddir . type cr -1 . ok> dup freaddir . type cr -1 .. ok> dup freaddir . type cr -1 sleep ok> dup freaddir . type cr -1 domainname ok> dup freaddir . type cr -1 ps ok> dup freaddir . type cr -1 sync ok> dup freaddir . type cr -1 red # zfsloader (no '.' and '..' - zfs_readdir bug?) OK s" /bin" 0 fopen OK dup freaddir . type cr -1 cat OK dup freaddir . type cr -1 sh OK dup freaddir . type cr -1 chflags OK dup freaddir . type cr -1 chio OK dup freaddir . type cr -1 sleep OK dup freaddir . type cr -1 chmod Here's an example with a loop almost endless. # r253862 ok> s" /bin" lsdir . sleep sleep sleep ... \ list directory contents : lsdir ( dir -- ) 0 fopen begin dup freaddir while type cr repeat fclose ; From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 03:56:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E77BCD49; Mon, 5 Aug 2013 03:56:15 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BDC9D267E; Mon, 5 Aug 2013 03:56:15 +0000 (UTC) Received: from dhcp-192-168-2-38.wifi.xcllnt.net (50-0-150-213.dsl.static.sonic.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.14.7/8.14.7) with ESMTP id r753uDmj077660 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 4 Aug 2013 20:56:14 -0700 (PDT) (envelope-from marcel@xcllnt.net) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r253862 - head/sys/boot/ficl From: Marcel Moolenaar In-Reply-To: <1V65V2-0001RI-Fu@internal.tormail.org> Date: Sun, 4 Aug 2013 20:56:13 -0700 Content-Transfer-Encoding: 7bit Message-Id: <953FDB6A-11EF-46D3-85D8-634952AF9309@xcllnt.net> References: <201308011806.r71I6xpd088690@svn.freebsd.org> <1V65V2-0001RI-Fu@internal.tormail.org> To: Jan Beich X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 03:56:16 -0000 On Aug 4, 2013, at 2:06 PM, Jan Beich wrote: > Marcel Moolenaar writes: > >> + static union { >> + struct dirent dirent; >> + char buf[512]; >> + } u; >> + off_t off; >> + int len; > [...] >> + /* >> + * The readdirfd() function is specific to the loader environment. >> + * We do the best we can to make freaddir work, but it's not at >> + * all guaranteed. >> + */ >> + off = lseek(fd, 0LL, SEEK_CUR); >> + len = getdents(fd, u.buf, sizeof(u.buf)); >> + d = (len != -1) ? &u.dirent : NULL; >> + if (d != NULL) >> + lseek(fd, off + d->d_reclen, SEEK_SET); > > How did you test? On amd64 with UFS. The problem is that using d_reclen to get to the next dirent is highly non-portable and depends on the FS used: fbsdvm64% uname -m amd64 fbsdvm64% pwd /usr/src/sys/boot/ficl fbsdvm64% ./testmain ficl Version 3.03 Aug 4 2013 ok> s" /bin" 0 fopen . cr 3 ok> 3 freaddir . type cr -1 . ok> 3 freaddir . type cr -1 .. ok> 3 freaddir . type cr -1 chflags ok> 3 freaddir . type cr -1 [ ok> 3 freaddir . type cr -1 cat ok> 3 freaddir . type cr -1 domainname ok> 3 freaddir . type cr -1 chio ok> 3 freaddir . type cr -1 chmod ok> 3 freaddir . type cr -1 cp ok> 3 freaddir . type cr -1 csh It's probably not going to work on any other FS. The alternative is to just not support freaddir due to lack of runtime support. FYI, -- Marcel Moolenaar marcel@xcllnt.net From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 04:22:34 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AF50CD2; Mon, 5 Aug 2013 04:22:34 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 23ED12732; Mon, 5 Aug 2013 04:22:33 +0000 (UTC) Received: from alph.d.allbsd.org (p2049-ipbf1102funabasi.chiba.ocn.ne.jp [122.26.101.49]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r754MGwo045046 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Aug 2013 13:22:26 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r754MDGl007895; Mon, 5 Aug 2013 13:22:15 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Mon, 05 Aug 2013 13:22:06 +0900 (JST) Message-Id: <20130805.132206.2279958710329728569.hrs@allbsd.org> To: sjg@juniper.net Subject: Re: svn commit: r253887 - head/sys/dev/filemon From: Hiroki Sato In-Reply-To: <20130804151754.8189758097@chaos.jnpr.net> References: <20130804.121523.488481502477873993.hrs@allbsd.org> <20130804100304.GB35080@stack.nl> <20130804151754.8189758097@chaos.jnpr.net> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 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(Mon_Aug__5_13_22_06_2013_252)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Mon, 05 Aug 2013 13:22:26 +0900 (JST) X-Spam-Status: No, score=-90.6 required=13.0 tests=CONTENT_TYPE_PRESENT, DIRECTOCNDYN,DYN_PBL,RCVD_IN_PBL,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-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, jilles@stack.nl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 04:22:34 -0000 ----Security_Multipart(Mon_Aug__5_13_22_06_2013_252)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit "Simon J. Gerraty" wrote in <20130804151754.8189758097@chaos.jnpr.net>: sj> >> Thank you for your comments. Can you review the attached patch? If sj> >> there is no problem, I will commit this and MFC to stable branches. sj> sj> Looks good. sj> But don't commit it untested ;-) sj> I can test it for you. Okay, I will wait for the results. -- Hiroki ----Security_Multipart(Mon_Aug__5_13_22_06_2013_252)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlH/KG4ACgkQTyzT2CeTzy0FsACgncRyrHqHFpoijTWcDmiA2Hvr DpcAoJINhWPtjhFC92oPGecuGAKhlhip =rlpm -----END PGP SIGNATURE----- ----Security_Multipart(Mon_Aug__5_13_22_06_2013_252)---- From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 04:53:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BCF24484; Mon, 5 Aug 2013 04:53:05 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6DFE527E4; Mon, 5 Aug 2013 04:53:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1V6Cmy-0006Mn-Sb; Mon, 05 Aug 2013 08:53:01 +0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:Date:X-TorMail-User:Content-Type:MIME-Version:References:In-Reply-To:Subject:Cc:To:From; bh=wONkO72ZP0aej/tlYJjsOOZeRQlOPF+KOSUD80ZygVw=; b=reoyxTLUiXd+kpgJxQ0t0jthG5Q48JitwryafC9ObvCjUdzvEPSz8w3gLYk/SMlgBRyBIWwkLjJz1Hw9iM/cw8zPcmHWbjIIdcU/S5tycw7XV/uly34QmBtwuevGVcQyhFRxoyMBj8Xygv9jgE6RG2egef1EcgOPm3jWiLYHqNM=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1V6Cmb-000M0k-0l; Mon, 05 Aug 2013 04:52:38 +0000 From: Jan Beich To: Marcel Moolenaar Subject: Re: svn commit: r253862 - head/sys/boot/ficl In-Reply-To: <953FDB6A-11EF-46D3-85D8-634952AF9309@xcllnt.net> (Marcel Moolenaar's message of "Sun, 4 Aug 2013 20:56:13 -0700") References: <201308011806.r71I6xpd088690@svn.freebsd.org> <1V65V2-0001RI-Fu@internal.tormail.org> <953FDB6A-11EF-46D3-85D8-634952AF9309@xcllnt.net> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Date: Mon, 05 Aug 2013 04:52:38 +0000 Message-Id: <1V6Cmb-000M0k-0l@internal.tormail.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 04:53:05 -0000 Marcel Moolenaar writes: > On Aug 4, 2013, at 2:06 PM, Jan Beich wrote: > >> Marcel Moolenaar writes: >> >>> + static union { >>> + struct dirent dirent; >>> + char buf[512]; >>> + } u; >>> + off_t off; >>> + int len; >> [...] >>> + /* >>> + * The readdirfd() function is specific to the loader environment. >>> + * We do the best we can to make freaddir work, but it's not at >>> + * all guaranteed. >>> + */ >>> + off = lseek(fd, 0LL, SEEK_CUR); >>> + len = getdents(fd, u.buf, sizeof(u.buf)); >>> + d = (len != -1) ? &u.dirent : NULL; >>> + if (d != NULL) >>> + lseek(fd, off + d->d_reclen, SEEK_SET); >> >> How did you test? > > On amd64 with UFS. The problem is that using d_reclen to get to > the next dirent is highly non-portable and depends on the FS > used: > > fbsdvm64% uname -m > amd64 > fbsdvm64% pwd > /usr/src/sys/boot/ficl > fbsdvm64% ./testmain > ficl Version 3.03 > Aug 4 2013 > > ok> s" /bin" 0 fopen . cr > 3 > ok> 3 freaddir . type cr > -1 . > ok> 3 freaddir . type cr > -1 .. > ok> 3 freaddir . type cr > -1 chflags > ok> 3 freaddir . type cr > -1 [ > ok> 3 freaddir . type cr > -1 cat > ok> 3 freaddir . type cr > -1 domainname > ok> 3 freaddir . type cr > -1 chio > ok> 3 freaddir . type cr > -1 chmod > ok> 3 freaddir . type cr > -1 cp > ok> 3 freaddir . type cr > -1 csh Except there'd be no FICL_FALSE after the last entry. Try running my lsdir function. > > It's probably not going to work on any other FS. The > alternative is to just not support freaddir due to lack > of runtime support. What's the issue with my version in bin/172542 ? It doesn't use d_reclen but relies on a side-effect of readdir() call. >> + static DIR *dir; >> + if (lseek(fd, 0, SEEK_CUR) == 0) >> + dir = fdopendir(fd); >> + if (dir != NULL) >> + d = readdir(dir); From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 08:55:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D4444B5E; Mon, 5 Aug 2013 08:55:37 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1E5E2FB7; Mon, 5 Aug 2013 08:55:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r758tbM8011256; Mon, 5 Aug 2013 08:55:37 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r758tZLZ011247; Mon, 5 Aug 2013 08:55:35 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201308050855.r758tZLZ011247@svn.freebsd.org> From: Attilio Rao Date: Mon, 5 Aug 2013 08:55:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253953 - in head/sys: cddl/contrib/opensolaris/uts/common/fs/zfs fs/tmpfs kern vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 08:55:37 -0000 Author: attilio Date: Mon Aug 5 08:55:35 2013 New Revision: 253953 URL: http://svnweb.freebsd.org/changeset/base/253953 Log: Revert r253939: We cannot busy a page before doing pagefaults. Infact, it can deadlock against vnode lock, as it tries to vget(). Other functions, right now, have an opposite lock ordering, like vm_object_sync(), which acquires the vnode lock first and then sleeps on the busy mechanism. Before this patch is reinserted we need to break this ordering. Sponsored by: EMC / Isilon storage division Reported by: kib Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/fs/tmpfs/tmpfs_vnops.c head/sys/kern/imgact_elf.c head/sys/kern/kern_exec.c head/sys/kern/sys_process.c head/sys/vm/vm_extern.h head/sys/vm/vm_fault.c head/sys/vm/vm_glue.c head/sys/vm/vm_map.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Aug 5 08:27:35 2013 (r253952) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Aug 5 08:55:35 2013 (r253953) @@ -324,8 +324,7 @@ zfs_ioctl(vnode_t *vp, u_long com, intpt } static vm_page_t -page_busy(vnode_t *vp, int64_t start, int64_t off, int64_t nbytes, - boolean_t alloc) +page_busy(vnode_t *vp, int64_t start, int64_t off, int64_t nbytes) { vm_object_t obj; vm_page_t pp; @@ -347,8 +346,6 @@ page_busy(vnode_t *vp, int64_t start, in continue; } } else if (pp == NULL) { - if (!alloc) - break; pp = vm_page_alloc(obj, OFF_TO_IDX(start), VM_ALLOC_SYSTEM | VM_ALLOC_IFCACHED | VM_ALLOC_NOBUSY); @@ -359,10 +356,8 @@ page_busy(vnode_t *vp, int64_t start, in if (pp != NULL) { ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); - vm_page_io_start(pp); - if (!alloc) - break; vm_object_pip_add(obj, 1); + vm_page_io_start(pp); pmap_remove_write(pp); vm_page_clear_dirty(pp, off, nbytes); } @@ -372,12 +367,55 @@ page_busy(vnode_t *vp, int64_t start, in } static void -page_unbusy(vm_page_t pp, boolean_t unalloc) +page_unbusy(vm_page_t pp) { vm_page_io_finish(pp); - if (unalloc) - vm_object_pip_subtract(pp->object, 1); + vm_object_pip_subtract(pp->object, 1); +} + +static vm_page_t +page_hold(vnode_t *vp, int64_t start) +{ + vm_object_t obj; + vm_page_t pp; + + obj = vp->v_object; + zfs_vmobject_assert_wlocked(obj); + + for (;;) { + if ((pp = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && + pp->valid) { + if ((pp->oflags & VPO_BUSY) != 0) { + /* + * Reference the page before unlocking and + * sleeping so that the page daemon is less + * likely to reclaim it. + */ + vm_page_reference(pp); + vm_page_sleep(pp, "zfsmwb"); + continue; + } + + ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); + vm_page_lock(pp); + vm_page_hold(pp); + vm_page_unlock(pp); + + } else + pp = NULL; + break; + } + return (pp); +} + +static void +page_unhold(vm_page_t pp) +{ + + vm_page_lock(pp); + vm_page_unhold(pp); + vm_page_unlock(pp); } static caddr_t @@ -441,8 +479,7 @@ update_pages(vnode_t *vp, int64_t start, zfs_vmobject_wlock(obj); vm_page_undirty(pp); - } else if ((pp = page_busy(vp, start, off, nbytes, - TRUE)) != NULL) { + } else if ((pp = page_busy(vp, start, off, nbytes)) != NULL) { zfs_vmobject_wunlock(obj); va = zfs_map_page(pp, &sf); @@ -451,7 +488,7 @@ update_pages(vnode_t *vp, int64_t start, zfs_unmap_page(sf); zfs_vmobject_wlock(obj); - page_unbusy(pp, TRUE); + page_unbusy(pp); } len -= nbytes; off = 0; @@ -561,7 +598,7 @@ mappedread(vnode_t *vp, int nbytes, uio_ vm_page_t pp; uint64_t bytes = MIN(PAGESIZE - off, len); - if (pp = page_busy(vp, start, 0, 0, FALSE)) { + if (pp = page_hold(vp, start)) { struct sf_buf *sf; caddr_t va; @@ -570,7 +607,7 @@ mappedread(vnode_t *vp, int nbytes, uio_ error = uiomove(va + off, bytes, UIO_READ, uio); zfs_unmap_page(sf); zfs_vmobject_wlock(obj); - page_unbusy(pp, FALSE); + page_unhold(pp); } else { zfs_vmobject_wunlock(obj); error = dmu_read_uio(os, zp->z_id, uio, bytes); Modified: head/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_vnops.c Mon Aug 5 08:27:35 2013 (r253952) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Mon Aug 5 08:55:35 2013 (r253953) @@ -485,13 +485,13 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p vm_page_zero_invalid(m, TRUE); vm_page_wakeup(m); } - vm_page_io_start(m); + vm_page_lock(m); + vm_page_hold(m); + vm_page_unlock(m); VM_OBJECT_WUNLOCK(tobj); error = uiomove_fromphys(&m, offset, tlen, uio); - VM_OBJECT_WLOCK(tobj); - vm_page_io_finish(m); - VM_OBJECT_WUNLOCK(tobj); vm_page_lock(m); + vm_page_unhold(m); if (m->queue == PQ_NONE) { vm_page_deactivate(m); } else { @@ -602,14 +602,16 @@ tmpfs_mappedwrite(vm_object_t tobj, size vm_page_zero_invalid(tpg, TRUE); vm_page_wakeup(tpg); } - vm_page_io_start(tpg); + vm_page_lock(tpg); + vm_page_hold(tpg); + vm_page_unlock(tpg); VM_OBJECT_WUNLOCK(tobj); error = uiomove_fromphys(&tpg, offset, tlen, uio); VM_OBJECT_WLOCK(tobj); - vm_page_io_finish(tpg); if (error == 0) vm_page_dirty(tpg); vm_page_lock(tpg); + vm_page_unhold(tpg); if (tpg->queue == PQ_NONE) { vm_page_deactivate(tpg); } else { Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Mon Aug 5 08:27:35 2013 (r253952) +++ head/sys/kern/imgact_elf.c Mon Aug 5 08:55:35 2013 (r253953) @@ -378,7 +378,7 @@ __elfN(map_partial)(vm_map_t map, vm_obj off = offset - trunc_page(offset); error = copyout((caddr_t)sf_buf_kva(sf) + off, (caddr_t)start, end - start); - vm_imgact_unmap_page(object, sf); + vm_imgact_unmap_page(sf); if (error) { return (KERN_FAILURE); } @@ -433,7 +433,7 @@ __elfN(map_insert)(vm_map_t map, vm_obje sz = PAGE_SIZE - off; error = copyout((caddr_t)sf_buf_kva(sf) + off, (caddr_t)start, sz); - vm_imgact_unmap_page(object, sf); + vm_imgact_unmap_page(sf); if (error) { return (KERN_FAILURE); } @@ -553,7 +553,7 @@ __elfN(load_section)(struct image_params trunc_page(offset + filsz); error = copyout((caddr_t)sf_buf_kva(sf) + off, (caddr_t)map_addr, copy_len); - vm_imgact_unmap_page(object, sf); + vm_imgact_unmap_page(sf); if (error) { return (error); } Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Mon Aug 5 08:27:35 2013 (r253952) +++ head/sys/kern/kern_exec.c Mon Aug 5 08:55:35 2013 (r253953) @@ -973,7 +973,7 @@ exec_map_first_page(imgp) vm_page_wakeup(ma[0]); } vm_page_lock(ma[0]); - vm_page_wire(ma[0]); + vm_page_hold(ma[0]); vm_page_unlock(ma[0]); VM_OBJECT_WUNLOCK(object); @@ -994,7 +994,7 @@ exec_unmap_first_page(imgp) sf_buf_free(imgp->firstpage); imgp->firstpage = NULL; vm_page_lock(m); - vm_page_unwire(m, 0); + vm_page_unhold(m); vm_page_unlock(m); } } Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Mon Aug 5 08:27:35 2013 (r253952) +++ head/sys/kern/sys_process.c Mon Aug 5 08:55:35 2013 (r253953) @@ -263,7 +263,6 @@ proc_rwmem(struct proc *p, struct uio *u writing = uio->uio_rw == UIO_WRITE; reqprot = writing ? VM_PROT_COPY | VM_PROT_READ : VM_PROT_READ; fault_flags = writing ? VM_FAULT_DIRTY : VM_FAULT_NORMAL; - fault_flags |= VM_FAULT_IOBUSY; /* * Only map in one page at a time. We don't have to, but it @@ -288,9 +287,9 @@ proc_rwmem(struct proc *p, struct uio *u len = min(PAGE_SIZE - page_offset, uio->uio_resid); /* - * Fault and busy the page on behalf of the process. + * Fault and hold the page on behalf of the process. */ - error = vm_fault_handle(map, pageno, reqprot, fault_flags, &m); + error = vm_fault_hold(map, pageno, reqprot, fault_flags, &m); if (error != KERN_SUCCESS) { if (error == KERN_RESOURCE_SHORTAGE) error = ENOMEM; @@ -316,9 +315,9 @@ proc_rwmem(struct proc *p, struct uio *u /* * Release the page. */ - VM_OBJECT_WLOCK(m->object); - vm_page_io_finish(m); - VM_OBJECT_WUNLOCK(m->object); + vm_page_lock(m); + vm_page_unhold(m); + vm_page_unlock(m); } while (error == 0 && uio->uio_resid > 0); Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Mon Aug 5 08:27:35 2013 (r253952) +++ head/sys/vm/vm_extern.h Mon Aug 5 08:55:35 2013 (r253953) @@ -63,7 +63,7 @@ void vm_fault_copy_entry(vm_map_t, vm_ma vm_ooffset_t *); int vm_fault_disable_pagefaults(void); void vm_fault_enable_pagefaults(int save); -int vm_fault_handle(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, +int vm_fault_hold(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int fault_flags, vm_page_t *m_hold); int vm_fault_quick_hold_pages(vm_map_t map, vm_offset_t addr, vm_size_t len, vm_prot_t prot, vm_page_t *ma, int max_count); @@ -87,7 +87,7 @@ void vnode_pager_setsize(struct vnode *, int vslock(void *, size_t); void vsunlock(void *, size_t); struct sf_buf *vm_imgact_map_page(vm_object_t object, vm_ooffset_t offset); -void vm_imgact_unmap_page(vm_object_t, struct sf_buf *sf); +void vm_imgact_unmap_page(struct sf_buf *sf); void vm_thread_dispose(struct thread *td); int vm_thread_new(struct thread *td, int pages); int vm_mlock(struct proc *, struct ucred *, const void *, size_t); Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Mon Aug 5 08:27:35 2013 (r253952) +++ head/sys/vm/vm_fault.c Mon Aug 5 08:55:35 2013 (r253953) @@ -221,8 +221,8 @@ vm_fault(vm_map_t map, vm_offset_t vaddr if (map != kernel_map && KTRPOINT(td, KTR_FAULT)) ktrfault(vaddr, fault_type); #endif - result = vm_fault_handle(map, trunc_page(vaddr), fault_type, - fault_flags, NULL); + result = vm_fault_hold(map, trunc_page(vaddr), fault_type, fault_flags, + NULL); #ifdef KTRACE if (map != kernel_map && KTRPOINT(td, KTR_FAULTEND)) ktrfaultend(result); @@ -231,7 +231,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr } int -vm_fault_handle(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, +vm_fault_hold(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, int fault_flags, vm_page_t *m_hold) { vm_prot_t prot; @@ -943,10 +943,7 @@ vnode_locked: vm_page_activate(fs.m); if (m_hold != NULL) { *m_hold = fs.m; - if (fault_flags & VM_FAULT_IOBUSY) - vm_page_io_start(fs.m); - else - vm_page_hold(fs.m); + vm_page_hold(fs.m); } vm_page_unlock(fs.m); vm_page_wakeup(fs.m); @@ -1148,7 +1145,7 @@ vm_fault_quick_hold_pages(vm_map_t map, * and hold these pages. */ for (mp = ma, va = addr; va < end; mp++, va += PAGE_SIZE) - if (*mp == NULL && vm_fault_handle(map, va, prot, + if (*mp == NULL && vm_fault_hold(map, va, prot, VM_FAULT_NORMAL, mp) != KERN_SUCCESS) goto error; } Modified: head/sys/vm/vm_glue.c ============================================================================== --- head/sys/vm/vm_glue.c Mon Aug 5 08:27:35 2013 (r253952) +++ head/sys/vm/vm_glue.c Mon Aug 5 08:55:35 2013 (r253953) @@ -223,7 +223,7 @@ vsunlock(void *addr, size_t len) * Return the pinned page if successful; otherwise, return NULL. */ static vm_page_t -vm_imgact_page_iostart(vm_object_t object, vm_ooffset_t offset) +vm_imgact_hold_page(vm_object_t object, vm_ooffset_t offset) { vm_page_t m, ma[1]; vm_pindex_t pindex; @@ -249,7 +249,9 @@ vm_imgact_page_iostart(vm_object_t objec } vm_page_wakeup(m); } - vm_page_io_start(m); + vm_page_lock(m); + vm_page_hold(m); + vm_page_unlock(m); out: VM_OBJECT_WUNLOCK(object); return (m); @@ -264,7 +266,7 @@ vm_imgact_map_page(vm_object_t object, v { vm_page_t m; - m = vm_imgact_page_iostart(object, offset); + m = vm_imgact_hold_page(object, offset); if (m == NULL) return (NULL); sched_pin(); @@ -275,16 +277,16 @@ vm_imgact_map_page(vm_object_t object, v * Destroy the given CPU private mapping and unpin the page that it mapped. */ void -vm_imgact_unmap_page(vm_object_t object, struct sf_buf *sf) +vm_imgact_unmap_page(struct sf_buf *sf) { vm_page_t m; m = sf_buf_page(sf); sf_buf_free(sf); sched_unpin(); - VM_OBJECT_WLOCK(object); - vm_page_io_finish(m); - VM_OBJECT_WUNLOCK(object); + vm_page_lock(m); + vm_page_unhold(m); + vm_page_unlock(m); } void Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Mon Aug 5 08:27:35 2013 (r253952) +++ head/sys/vm/vm_map.h Mon Aug 5 08:55:35 2013 (r253953) @@ -329,7 +329,6 @@ long vmspace_resident_count(struct vmspa #define VM_FAULT_NORMAL 0 /* Nothing special */ #define VM_FAULT_CHANGE_WIRING 1 /* Change the wiring as appropriate */ #define VM_FAULT_DIRTY 2 /* Dirty the page; use w/VM_PROT_COPY */ -#define VM_FAULT_IOBUSY 4 /* Busy the faulted page */ /* * Initially, mappings are slightly sequential. The maximum window size must From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 10:26:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D2B99316; Mon, 5 Aug 2013 10:26:42 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C034B23AF; Mon, 5 Aug 2013 10:26:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r75AQg41038316; Mon, 5 Aug 2013 10:26:42 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r75AQgfp038315; Mon, 5 Aug 2013 10:26:42 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201308051026.r75AQgfp038315@svn.freebsd.org> From: Glen Barber Date: Mon, 5 Aug 2013 10:26:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253956 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 10:26:42 -0000 Author: gjb Date: Mon Aug 5 10:26:42 2013 New Revision: 253956 URL: http://svnweb.freebsd.org/changeset/base/253956 Log: Redirect svnversion stderr to /dev/null if we cannot determine the tree version, for example if the tree is checked out with an outdated svn from ports, but the base system svnlite is built. Approved by: kib (mentor) Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Mon Aug 5 09:53:48 2013 (r253955) +++ head/sys/conf/newvers.sh Mon Aug 5 10:26:42 2013 (r253956) @@ -116,7 +116,7 @@ if [ -d "${SYSDIR}/../.git" ] ; then fi if [ -n "$svnversion" ] ; then - svn=`cd ${SYSDIR} && $svnversion` + svn=`cd ${SYSDIR} && $svnversion 2>/dev/null` case "$svn" in [0-9]*) svn=" r${svn}" ;; *) unset svn ;; From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 10:38:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C88B9708; Mon, 5 Aug 2013 10:38:34 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B5F9E2422; Mon, 5 Aug 2013 10:38:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r75AcYET041422; Mon, 5 Aug 2013 10:38:34 GMT (envelope-from crees@svn.freebsd.org) Received: (from crees@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r75AcYTl041421; Mon, 5 Aug 2013 10:38:34 GMT (envelope-from crees@svn.freebsd.org) Message-Id: <201308051038.r75AcYTl041421@svn.freebsd.org> From: Chris Rees Date: Mon, 5 Aug 2013 10:38:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253957 - head/sbin/geom/class/eli X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 10:38:34 -0000 Author: crees (doc,ports committer) Date: Mon Aug 5 10:38:34 2013 New Revision: 253957 URL: http://svnweb.freebsd.org/changeset/base/253957 Log: Note NULL encryption method for GELI PR: docs/180551 Submitted by: r4721@tormail.org Approved by: gjb (mentor) Modified: head/sbin/geom/class/eli/geli.8 Modified: head/sbin/geom/class/eli/geli.8 ============================================================================== --- head/sbin/geom/class/eli/geli.8 Mon Aug 5 10:26:42 2013 (r253956) +++ head/sbin/geom/class/eli/geli.8 Mon Aug 5 10:38:34 2013 (r253957) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 18, 2012 +.Dd July 5, 2013 .Dt GELI 8 .Os .Sh NAME @@ -285,11 +285,14 @@ Currently supported algorithms are: .Nm AES-XTS , .Nm AES-CBC , .Nm Blowfish-CBC , -.Nm Camellia-CBC +.Nm Camellia-CBC , +.Nm 3DES-CBC , and -.Nm 3DES-CBC . +.Nm NULL . The default and recommended algorithm is .Nm AES-XTS . +.Nm NULL +is unencrypted. .It Fl i Ar iterations Number of iterations to use with PKCS#5v2 when processing User Key passphrase component. From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 11:48:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 771B73E9; Mon, 5 Aug 2013 11:48:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6441428F8; Mon, 5 Aug 2013 11:48:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r75Bmg14061831; Mon, 5 Aug 2013 11:48:42 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r75Bmfi0061823; Mon, 5 Aug 2013 11:48:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201308051148.r75Bmfi0061823@svn.freebsd.org> From: Alexander Motin Date: Mon, 5 Aug 2013 11:48:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253958 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 11:48:42 -0000 Author: mav Date: Mon Aug 5 11:48:40 2013 New Revision: 253958 URL: http://svnweb.freebsd.org/changeset/base/253958 Log: MFprojects/camlock r249505: Change CCB queue resize logic to be able safely handle overallocations: - (re)allocate queue space in power of 2 chunks with 64 elements minimum and never shrink it; with only 4/8 bytes per element size is insignificant. - automatically reallocate the queue to double size if it is overflowed. - if queue reallocation failed, store extra CCBs in unsorted TAILQ, fetching them back as soon as some queue element is freed. To free space in CCB for TAILQ linking, change highpowerq from keeping high-power CCBs to keeping devices frozen due to high-power CCBs. This encloses all pieces of queue resize logic inside of cam_queue.[ch], removing some not obvious duties from xpt_release_ccb(). Modified: head/sys/cam/cam.h head/sys/cam/cam_queue.c head/sys/cam/cam_queue.h head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt_internal.h Modified: head/sys/cam/cam.h ============================================================================== --- head/sys/cam/cam.h Mon Aug 5 10:38:34 2013 (r253957) +++ head/sys/cam/cam.h Mon Aug 5 11:48:40 2013 (r253958) @@ -88,6 +88,7 @@ typedef struct { #define CAM_UNQUEUED_INDEX -1 #define CAM_ACTIVE_INDEX -2 #define CAM_DONEQ_INDEX -3 +#define CAM_EXTRAQ_INDEX INT_MAX } cam_pinfo; /* Modified: head/sys/cam/cam_queue.c ============================================================================== --- head/sys/cam/cam_queue.c Mon Aug 5 10:38:34 2013 (r253957) +++ head/sys/cam/cam_queue.c Mon Aug 5 11:48:40 2013 (r253958) @@ -284,39 +284,24 @@ u_int32_t cam_ccbq_resize(struct cam_ccbq *ccbq, int new_size) { int delta; - int space_left; delta = new_size - (ccbq->dev_active + ccbq->dev_openings); - space_left = new_size - - ccbq->queue.entries - - ccbq->held - - ccbq->dev_active; - - /* - * Only attempt to change the underlying queue size if we are - * shrinking it and there is space for all outstanding entries - * in the new array or we have been requested to grow the array. - * We don't fail in the case where we can't reduce the array size, - * but clients that care that the queue be "garbage collected" - * should detect this condition and call us again with the - * same size once the outstanding entries have been processed. - */ - if (space_left < 0 - || camq_resize(&ccbq->queue, new_size + (CAM_RL_VALUES - 1)) == - CAM_REQ_CMP) { - ccbq->devq_openings += delta; - ccbq->dev_openings += delta; + ccbq->devq_openings += delta; + ccbq->dev_openings += delta; + + new_size = imax(64, 1 << fls(new_size + new_size / 2)); + if (new_size > ccbq->queue.array_size) + return (camq_resize(&ccbq->queue, new_size)); + else return (CAM_REQ_CMP); - } else { - return (CAM_RESRC_UNAVAIL); - } } int cam_ccbq_init(struct cam_ccbq *ccbq, int openings) { bzero(ccbq, sizeof(*ccbq)); - if (camq_init(&ccbq->queue, openings + (CAM_RL_VALUES - 1)) != 0) + if (camq_init(&ccbq->queue, + imax(64, 1 << fls(openings + openings / 2))) != 0) return (1); ccbq->devq_openings = openings; ccbq->dev_openings = openings; Modified: head/sys/cam/cam_queue.h ============================================================================== --- head/sys/cam/cam_queue.h Mon Aug 5 10:38:34 2013 (r253957) +++ head/sys/cam/cam_queue.h Mon Aug 5 11:48:40 2013 (r253958) @@ -57,6 +57,8 @@ SLIST_HEAD(ccb_hdr_slist, ccb_hdr); struct cam_ccbq { struct camq queue; + struct ccb_hdr_tailq queue_extra_head; + int queue_extra_entries; int devq_openings; int devq_allocating; int dev_openings; @@ -177,7 +179,7 @@ cam_ccbq_release_opening(struct cam_ccbq static __inline int cam_ccbq_pending_ccb_count(struct cam_ccbq *ccbq) { - return (ccbq->queue.entries); + return (ccbq->queue.entries + ccbq->queue_extra_entries); } static __inline void @@ -190,14 +192,61 @@ cam_ccbq_take_opening(struct cam_ccbq *c static __inline void cam_ccbq_insert_ccb(struct cam_ccbq *ccbq, union ccb *new_ccb) { + struct ccb_hdr *old_ccb; + struct camq *queue = &ccbq->queue; + ccbq->held--; - camq_insert(&ccbq->queue, &new_ccb->ccb_h.pinfo); + + /* + * If queue is already full, try to resize. + * If resize fail, push CCB with lowest priority out to the TAILQ. + */ + if (queue->entries == queue->array_size && + camq_resize(&ccbq->queue, queue->array_size * 2) != CAM_REQ_CMP) { + old_ccb = (struct ccb_hdr *)camq_remove(queue, queue->entries); + TAILQ_INSERT_HEAD(&ccbq->queue_extra_head, old_ccb, + xpt_links.tqe); + old_ccb->pinfo.index = CAM_EXTRAQ_INDEX; + ccbq->queue_extra_entries++; + } + + camq_insert(queue, &new_ccb->ccb_h.pinfo); } static __inline void cam_ccbq_remove_ccb(struct cam_ccbq *ccbq, union ccb *ccb) { - camq_remove(&ccbq->queue, ccb->ccb_h.pinfo.index); + struct ccb_hdr *cccb, *bccb; + struct camq *queue = &ccbq->queue; + + /* If the CCB is on the TAILQ, remove it from there. */ + if (ccb->ccb_h.pinfo.index == CAM_EXTRAQ_INDEX) { + TAILQ_REMOVE(&ccbq->queue_extra_head, &ccb->ccb_h, + xpt_links.tqe); + ccb->ccb_h.pinfo.index = CAM_UNQUEUED_INDEX; + ccbq->queue_extra_entries--; + return; + } + + camq_remove(queue, ccb->ccb_h.pinfo.index); + + /* + * If there are some CCBs on TAILQ, find the best one and move it + * to the emptied space in the queue. + */ + bccb = TAILQ_FIRST(&ccbq->queue_extra_head); + if (bccb == NULL) + return; + TAILQ_FOREACH(cccb, &ccbq->queue_extra_head, xpt_links.tqe) { + if (bccb->pinfo.priority > cccb->pinfo.priority || + (bccb->pinfo.priority == cccb->pinfo.priority && + GENERATIONCMP(bccb->pinfo.generation, >, + cccb->pinfo.generation))) + bccb = cccb; + } + TAILQ_REMOVE(&ccbq->queue_extra_head, bccb, xpt_links.tqe); + ccbq->queue_extra_entries--; + camq_insert(queue, &bccb->pinfo); } static __inline union ccb * Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Mon Aug 5 10:38:34 2013 (r253957) +++ head/sys/cam/cam_xpt.c Mon Aug 5 11:48:40 2013 (r253958) @@ -99,7 +99,7 @@ struct xpt_softc { u_int32_t xpt_generation; /* number of high powered commands that can go through right now */ - STAILQ_HEAD(highpowerlist, ccb_hdr) highpowerq; + STAILQ_HEAD(highpowerlist, cam_ed) highpowerq; int num_highpower; /* queue for handling async rescan requests. */ @@ -2684,7 +2684,7 @@ xpt_action_default(union ccb *start_ccb) cgds->dev_openings = dev->ccbq.dev_openings; cgds->dev_active = dev->ccbq.dev_active; cgds->devq_openings = dev->ccbq.devq_openings; - cgds->devq_queued = dev->ccbq.queue.entries; + cgds->devq_queued = cam_ccbq_pending_ccb_count(&dev->ccbq); cgds->held = dev->ccbq.held; cgds->last_reset = tar->last_reset; cgds->maxtags = dev->maxtags; @@ -3255,8 +3255,8 @@ xpt_run_devq(struct cam_devq *devq) */ xpt_freeze_devq(work_ccb->ccb_h.path, 1); STAILQ_INSERT_TAIL(&xsoftc.highpowerq, - &work_ccb->ccb_h, - xpt_links.stqe); + work_ccb->ccb_h.path->device, + highpowerq_entry); mtx_unlock(&xsoftc.xpt_lock); continue; @@ -3778,11 +3778,6 @@ xpt_release_ccb(union ccb *free_ccb) mtx_assert(sim->mtx, MA_OWNED); cam_ccbq_release_opening(&device->ccbq); - if (device->flags & CAM_DEV_RESIZE_QUEUE_NEEDED) { - device->flags &= ~CAM_DEV_RESIZE_QUEUE_NEEDED; - cam_ccbq_resize(&device->ccbq, - device->ccbq.dev_openings + device->ccbq.dev_active); - } if (sim->ccb_count > sim->max_ccbs) { xpt_free_ccb(free_ccb); sim->ccb_count--; @@ -4581,9 +4576,6 @@ xpt_dev_ccbq_resize(struct cam_path *pat diff = newopenings - (dev->ccbq.dev_active + dev->ccbq.dev_openings); result = cam_ccbq_resize(&dev->ccbq, newopenings); - if (result == CAM_REQ_CMP && (diff < 0)) { - dev->flags |= CAM_DEV_RESIZE_QUEUE_NEEDED; - } if ((dev->flags & CAM_DEV_TAG_AFTER_COUNT) != 0 || (dev->inq_flags & SID_CmdQue) != 0) dev->tag_saved_openings = newopenings; @@ -4965,12 +4957,12 @@ camisr_runqueue(void *V_queue) if (ccb_h->flags & CAM_HIGH_POWER) { struct highpowerlist *hphead; - union ccb *send_ccb; + struct cam_ed *device; mtx_lock(&xsoftc.xpt_lock); hphead = &xsoftc.highpowerq; - send_ccb = (union ccb *)STAILQ_FIRST(hphead); + device = STAILQ_FIRST(hphead); /* * Increment the count since this command is done. @@ -4980,12 +4972,12 @@ camisr_runqueue(void *V_queue) /* * Any high powered commands queued up? */ - if (send_ccb != NULL) { + if (device != NULL) { - STAILQ_REMOVE_HEAD(hphead, xpt_links.stqe); + STAILQ_REMOVE_HEAD(hphead, highpowerq_entry); mtx_unlock(&xsoftc.xpt_lock); - xpt_release_devq(send_ccb->ccb_h.path, + xpt_release_devq_device(device, /*count*/1, /*runqueue*/TRUE); } else mtx_unlock(&xsoftc.xpt_lock); Modified: head/sys/cam/cam_xpt_internal.h ============================================================================== --- head/sys/cam/cam_xpt_internal.h Mon Aug 5 10:38:34 2013 (r253957) +++ head/sys/cam/cam_xpt_internal.h Mon Aug 5 11:48:40 2013 (r253958) @@ -114,7 +114,6 @@ struct cam_ed { #define CAM_DEV_REL_TIMEOUT_PENDING 0x02 #define CAM_DEV_REL_ON_COMPLETE 0x04 #define CAM_DEV_REL_ON_QUEUE_EMPTY 0x08 -#define CAM_DEV_RESIZE_QUEUE_NEEDED 0x10 #define CAM_DEV_TAG_AFTER_COUNT 0x20 #define CAM_DEV_INQUIRY_DATA_VALID 0x40 #define CAM_DEV_IN_DV 0x80 @@ -125,6 +124,7 @@ struct cam_ed { u_int32_t tag_saved_openings; u_int32_t refcount; struct callout callout; + STAILQ_ENTRY(cam_ed) highpowerq_entry; }; /* From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 12:15:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 49F5F1A7; Mon, 5 Aug 2013 12:15:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 37E2B2A57; Mon, 5 Aug 2013 12:15:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r75CFsRf071016; Mon, 5 Aug 2013 12:15:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r75CFsOR071015; Mon, 5 Aug 2013 12:15:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201308051215.r75CFsOR071015@svn.freebsd.org> From: Alexander Motin Date: Mon, 5 Aug 2013 12:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253960 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 12:15:54 -0000 Author: mav Date: Mon Aug 5 12:15:53 2013 New Revision: 253960 URL: http://svnweb.freebsd.org/changeset/base/253960 Log: MFprojects/camlock r249006: Pass SIM pointer as an argument to camisr_runqueue() instead of doneq pointer. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Mon Aug 5 11:56:47 2013 (r253959) +++ head/sys/cam/cam_xpt.c Mon Aug 5 12:15:53 2013 (r253960) @@ -246,7 +246,7 @@ static xpt_devicefunc_t xptpassannouncef static void xptaction(struct cam_sim *sim, union ccb *work_ccb); static void xptpoll(struct cam_sim *sim); static void camisr(void *); -static void camisr_runqueue(void *); +static void camisr_runqueue(struct cam_sim *); static dev_match_ret xptbusmatch(struct dev_match_pattern *patterns, u_int num_patterns, struct cam_eb *bus); static dev_match_ret xptdevicematch(struct dev_match_pattern *patterns, @@ -3052,7 +3052,7 @@ xpt_polled_action(union ccb *start_ccb) dev->ccbq.dev_openings < 0) && (--timeout > 0)) { DELAY(100); (*(sim->sim_poll))(sim); - camisr_runqueue(&sim->sim_doneq); + camisr_runqueue(sim); } dev->ccbq.devq_openings++; @@ -3062,7 +3062,7 @@ xpt_polled_action(union ccb *start_ccb) xpt_action(start_ccb); while(--timeout > 0) { (*(sim->sim_poll))(sim); - camisr_runqueue(&sim->sim_doneq); + camisr_runqueue(sim); if ((start_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_INPROG) break; @@ -4309,7 +4309,7 @@ xpt_batch_done(struct cam_sim *sim) sim->flags &= ~CAM_SIM_BATCH; if (!TAILQ_EMPTY(&sim->sim_doneq) && (sim->flags & CAM_SIM_ON_DONEQ) == 0) - camisr_runqueue(&sim->sim_doneq); + camisr_runqueue(sim); } union ccb * @@ -4929,7 +4929,7 @@ camisr(void *dummy) while ((sim = TAILQ_FIRST(&queue)) != NULL) { TAILQ_REMOVE(&queue, sim, links); CAM_SIM_LOCK(sim); - camisr_runqueue(&sim->sim_doneq); + camisr_runqueue(sim); sim->flags &= ~CAM_SIM_ON_DONEQ; CAM_SIM_UNLOCK(sim); } @@ -4939,15 +4939,14 @@ camisr(void *dummy) } static void -camisr_runqueue(void *V_queue) +camisr_runqueue(struct cam_sim *sim) { - cam_isrq_t *queue = V_queue; struct ccb_hdr *ccb_h; - while ((ccb_h = TAILQ_FIRST(queue)) != NULL) { + while ((ccb_h = TAILQ_FIRST(&sim->sim_doneq)) != NULL) { int runq; - TAILQ_REMOVE(queue, ccb_h, sim_links.tqe); + TAILQ_REMOVE(&sim->sim_doneq, ccb_h, sim_links.tqe); ccb_h->pinfo.index = CAM_UNQUEUED_INDEX; CAM_DEBUG(ccb_h->path, CAM_DEBUG_TRACE, @@ -4989,8 +4988,8 @@ camisr_runqueue(void *V_queue) dev = ccb_h->path->device; cam_ccbq_ccb_done(&dev->ccbq, (union ccb *)ccb_h); - ccb_h->path->bus->sim->devq->send_active--; - ccb_h->path->bus->sim->devq->send_openings++; + sim->devq->send_active--; + sim->devq->send_openings++; runq = TRUE; if (((dev->flags & CAM_DEV_REL_ON_QUEUE_EMPTY) != 0 @@ -5011,14 +5010,12 @@ camisr_runqueue(void *V_queue) && (--dev->tag_delay_count == 0)) xpt_start_tags(ccb_h->path); if (!device_is_queued(dev)) { - (void)xpt_schedule_devq( - ccb_h->path->bus->sim->devq, dev); + (void)xpt_schedule_devq(sim->devq, dev); } } if (ccb_h->status & CAM_RELEASE_SIMQ) { - xpt_release_simq(ccb_h->path->bus->sim, - /*run_queue*/TRUE); + xpt_release_simq(sim, /*run_queue*/TRUE); ccb_h->status &= ~CAM_RELEASE_SIMQ; runq = FALSE; } @@ -5029,7 +5026,7 @@ camisr_runqueue(void *V_queue) /*run_queue*/TRUE); ccb_h->status &= ~CAM_DEV_QFRZN; } else if (runq) { - xpt_run_devq(ccb_h->path->bus->sim->devq); + xpt_run_devq(sim->devq); } /* Call the peripheral driver's callback */ From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 16:16:50 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BD2A36CF; Mon, 5 Aug 2013 16:16:50 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AA94525F7; Mon, 5 Aug 2013 16:16:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r75GGolq044712; Mon, 5 Aug 2013 16:16:50 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r75GGoWg044711; Mon, 5 Aug 2013 16:16:50 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201308051616.r75GGoWg044711@svn.freebsd.org> From: Jack F Vogel Date: Mon, 5 Aug 2013 16:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253965 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 16:16:50 -0000 Author: jfv Date: Mon Aug 5 16:16:50 2013 New Revision: 253965 URL: http://svnweb.freebsd.org/changeset/base/253965 Log: Correct a fat-finger in the last delta. MFC after: ASAP Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Mon Aug 5 12:55:23 2013 (r253964) +++ head/sys/dev/ixgbe/ixgbe.c Mon Aug 5 16:16:50 2013 (r253965) @@ -1581,7 +1581,7 @@ ixgbe_msix_link(void *arg) /* First get the cause */ reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICS); /* Be sure the queue bits are not cleared */ - reg_eicr = ~IXGBE_EICR_RTX_QUEUE; + reg_eicr &= ~IXGBE_EICR_RTX_QUEUE; /* Clear interrupt with write */ IXGBE_WRITE_REG(hw, IXGBE_EICR, reg_eicr); From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 18:54:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 88FAAA93; Mon, 5 Aug 2013 18:54:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 674F32077; Mon, 5 Aug 2013 18:54:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r75Is0Cb090984; Mon, 5 Aug 2013 18:54:00 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r75Is09Q090977; Mon, 5 Aug 2013 18:54:00 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308051854.r75Is09Q090977@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 5 Aug 2013 18:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253967 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 18:54:00 -0000 Author: kib Date: Mon Aug 5 18:53:59 2013 New Revision: 253967 URL: http://svnweb.freebsd.org/changeset/base/253967 Log: The tmpfs_alloc_vp() is used to instantiate vnode for the tmpfs node, in particular, from the tmpfs_lookup VOP method. If LK_NOWAIT is not specified in the lkflags, the lookup is supposed to return an alive vnode whenever the underlying node is valid. Currently, the tmpfs_alloc_vp() returns ENOENT if the vnode attached to node exists and is being reclaimed. This causes spurious ENOENT errors from lookup on tmpfs and corresponding random 'No such file' failures from syscalls working with tmpfs files. Fix this by waiting for the doomed vnode to be detached from the tmpfs node if sleepable allocation is requested. Note that filesystems which use vfs_hash.c, correctly handle the case due to vfs_hash_get() looping when vget() returns ENOENT for sleepable requests. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/fs/tmpfs/tmpfs.h head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs.h ============================================================================== --- head/sys/fs/tmpfs/tmpfs.h Mon Aug 5 18:11:02 2013 (r253966) +++ head/sys/fs/tmpfs/tmpfs.h Mon Aug 5 18:53:59 2013 (r253967) @@ -307,6 +307,7 @@ LIST_HEAD(tmpfs_node_list, tmpfs_node); #define TMPFS_VNODE_ALLOCATING 1 #define TMPFS_VNODE_WANT 2 #define TMPFS_VNODE_DOOMED 4 +#define TMPFS_VNODE_WRECLAIM 8 /* --------------------------------------------------------------------- */ /* Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Mon Aug 5 18:11:02 2013 (r253966) +++ head/sys/fs/tmpfs/tmpfs_subr.c Mon Aug 5 18:53:59 2013 (r253967) @@ -479,11 +479,32 @@ tmpfs_alloc_vp(struct mount *mp, struct error = 0; loop: TMPFS_NODE_LOCK(node); +loop1: if ((vp = node->tn_vnode) != NULL) { MPASS((node->tn_vpstate & TMPFS_VNODE_DOOMED) == 0); VI_LOCK(vp); + if ((node->tn_type == VDIR && node->tn_dir.tn_parent == NULL) || + ((vp->v_iflag & VI_DOOMED) != 0 && + (lkflag & LK_NOWAIT) != 0)) { + VI_UNLOCK(vp); + TMPFS_NODE_UNLOCK(node); + error = ENOENT; + vp = NULL; + goto out; + } + if ((vp->v_iflag & VI_DOOMED) != 0) { + VI_UNLOCK(vp); + node->tn_vpstate |= TMPFS_VNODE_WRECLAIM; + while ((node->tn_vpstate & TMPFS_VNODE_WRECLAIM) != 0) { + msleep(&node->tn_vnode, TMPFS_NODE_MTX(node), + 0, "tmpfsE", 0); + } + goto loop1; + } TMPFS_NODE_UNLOCK(node); error = vget(vp, lkflag | LK_INTERLOCK, curthread); + if (error == ENOENT) + goto loop; if (error != 0) { vp = NULL; goto out; @@ -620,6 +641,9 @@ tmpfs_free_vp(struct vnode *vp) mtx_assert(TMPFS_NODE_MTX(node), MA_OWNED); node->tn_vnode = NULL; + if ((node->tn_vpstate & TMPFS_VNODE_WRECLAIM) != 0) + wakeup(&node->tn_vnode); + node->tn_vpstate &= ~TMPFS_VNODE_WRECLAIM; vp->v_data = NULL; } From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 19:06:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1C060F40; Mon, 5 Aug 2013 19:06:29 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EF36B212D; Mon, 5 Aug 2013 19:06:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r75J6SLP094543; Mon, 5 Aug 2013 19:06:28 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r75J6Snq094540; Mon, 5 Aug 2013 19:06:28 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201308051906.r75J6Snq094540@svn.freebsd.org> From: Andrew Turner Date: Mon, 5 Aug 2013 19:06:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253968 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 19:06:29 -0000 Author: andrew Date: Mon Aug 5 19:06:28 2013 New Revision: 253968 URL: http://svnweb.freebsd.org/changeset/base/253968 Log: When entering exception handlers we may not have an aligned stack. This is because an exception may happen at any time. The stack alignment rules on ARM EABI state the only place the stack must be 8-byte aligned is on a function boundary. If an exception happens while a function is setting up or tearing down it's stack frame it may not be correctly aligned. There is also no requirement for it to be when the function is a leaf node. The fix is to align the stack after we have stored a backup of the old stack pointer, but before we have stored anything in the trapframe. Along with this we need to adjust the size of the trapframe by 4 bytes to ensure the stack below it is also correctly aligned. Modified: head/sys/arm/arm/vm_machdep.c head/sys/arm/include/asmacros.h head/sys/arm/include/frame.h Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Mon Aug 5 18:53:59 2013 (r253967) +++ head/sys/arm/arm/vm_machdep.c Mon Aug 5 19:06:28 2013 (r253968) @@ -74,10 +74,11 @@ __FBSDID("$FreeBSD$"); #include /* - * struct switchframe must be a multiple of 8 for correct stack alignment + * struct switchframe and trapframe must both be a multiple of 8 + * for correct stack alignment. */ CTASSERT(sizeof(struct switchframe) == 24); -CTASSERT(sizeof(struct trapframe) == 76); +CTASSERT(sizeof(struct trapframe) == 80); #ifndef NSFBUFS #define NSFBUFS (512 + maxusers * 16) Modified: head/sys/arm/include/asmacros.h ============================================================================== --- head/sys/arm/include/asmacros.h Mon Aug 5 18:53:59 2013 (r253967) +++ head/sys/arm/include/asmacros.h Mon Aug 5 19:06:28 2013 (r253968) @@ -63,6 +63,7 @@ */ #ifdef ARM_TP_ADDRESS #define PUSHFRAME \ + sub sp, sp, #4; /* Align the stack */ \ str lr, [sp, #-4]!; /* Push the return address */ \ sub sp, sp, #(4*17); /* Adjust the stack pointer */ \ stmia sp, {r0-r12}; /* Push the user mode registers */ \ @@ -78,6 +79,7 @@ str r1, [r0, #4]; #else #define PUSHFRAME \ + sub sp, sp, #4; /* Align the stack */ \ str lr, [sp, #-4]!; /* Push the return address */ \ sub sp, sp, #(4*17); /* Adjust the stack pointer */ \ stmia sp, {r0-r12}; /* Push the user mode registers */ \ @@ -100,7 +102,8 @@ ldmia sp, {r0-r14}^; /* Restore registers (usr mode) */ \ mov r0, r0; /* NOP for previous instruction */ \ add sp, sp, #(4*17); /* Adjust the stack pointer */ \ - ldr lr, [sp], #0x0004; /* Pull the return address */ + ldr lr, [sp], #0x0004; /* Pull the return address */ \ + add sp, sp, #4 /* Align the stack */ #else #define PULLFRAME \ ldr r0, [sp], #0x0004; /* Get the SPSR from stack */ \ @@ -109,7 +112,8 @@ ldmia sp, {r0-r14}^; /* Restore registers (usr mode) */ \ mov r0, r0; /* NOP for previous instruction */ \ add sp, sp, #(4*17); /* Adjust the stack pointer */ \ - ldr lr, [sp], #0x0004; /* Pull the return address */ + ldr lr, [sp], #0x0004; /* Pull the return address */ \ + add sp, sp, #4 /* Align the stack */ #endif /* @@ -133,6 +137,8 @@ orr r2, r2, #(PSR_SVC32_MODE); \ msr cpsr_c, r2; /* Punch into SVC mode */ \ mov r2, sp; /* Save SVC sp */ \ + bic sp, sp, #7; /* Align sp to an 8-byte addrress */ \ + sub sp, sp, #4; /* Pad trapframe to keep alignment */ \ str r0, [sp, #-4]!; /* Push return address */ \ str lr, [sp, #-4]!; /* Push SVC lr */ \ str r2, [sp, #-4]!; /* Push SVC sp */ \ @@ -168,6 +174,8 @@ orr r2, r2, #(PSR_SVC32_MODE); \ msr cpsr_c, r2; /* Punch into SVC mode */ \ mov r2, sp; /* Save SVC sp */ \ + bic sp, sp, #7; /* Align sp to an 8-byte addrress */ \ + sub sp, sp, #4; /* Pad trapframe to keep alignment */ \ str r0, [sp, #-4]!; /* Push return address */ \ str lr, [sp, #-4]!; /* Push SVC lr */ \ str r2, [sp, #-4]!; /* Push SVC sp */ \ @@ -209,6 +217,7 @@ #endif #if defined(__ARM_EABI__) #define UNWINDSVCFRAME \ + .pad #(4); /* Skip stack alignment */ \ .save {r13-r15}; /* Restore sp, lr, pc */ \ .pad #(2*4); /* Skip user sp and lr */ \ .save {r0-r12}; /* Restore r0-r12 */ \ Modified: head/sys/arm/include/frame.h ============================================================================== --- head/sys/arm/include/frame.h Mon Aug 5 18:53:59 2013 (r253967) +++ head/sys/arm/include/frame.h Mon Aug 5 19:06:28 2013 (r253968) @@ -62,7 +62,7 @@ typedef struct trapframe { register_t tf_spsr; /* Zero on arm26 */ register_t tf_r0; - register_t tf_r1; + register_t tf_r1; register_t tf_r2; register_t tf_r3; register_t tf_r4; @@ -78,7 +78,8 @@ typedef struct trapframe { register_t tf_usr_lr; register_t tf_svc_sp; /* Not used on arm26 */ register_t tf_svc_lr; /* Not used on arm26 */ - register_t tf_pc; + register_t tf_pc; + register_t tf_pad; } trapframe_t; /* Register numbers */ From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 19:42:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EF6A4BAF; Mon, 5 Aug 2013 19:42:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DCA52232A; Mon, 5 Aug 2013 19:42:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r75Jg3bA005844; Mon, 5 Aug 2013 19:42:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r75Jg3M9005843; Mon, 5 Aug 2013 19:42:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308051942.r75Jg3M9005843@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 5 Aug 2013 19:42:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253969 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 19:42:04 -0000 Author: kib Date: Mon Aug 5 19:42:03 2013 New Revision: 253969 URL: http://svnweb.freebsd.org/changeset/base/253969 Log: Do not override the ENOENT error for the empty path, or EFAULT errors from copyins, with the relative lookup check. Discussed with: rwatson Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Mon Aug 5 19:06:28 2013 (r253968) +++ head/sys/kern/vfs_lookup.c Mon Aug 5 19:42:03 2013 (r253969) @@ -172,7 +172,8 @@ namei(struct nameidata *ndp) * not an absolute path, and not containing '..' components) to * a real file descriptor, not the pseudo-descriptor AT_FDCWD. */ - if (IN_CAPABILITY_MODE(td) && (cnp->cn_flags & NOCAPCHECK) == 0) { + if (error == 0 && IN_CAPABILITY_MODE(td) && + (cnp->cn_flags & NOCAPCHECK) == 0) { ndp->ni_strictrelative = 1; if (ndp->ni_dirfd == AT_FDCWD) { #ifdef KTRACE From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 20:13:06 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5B148674; Mon, 5 Aug 2013 20:13:06 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 46256255E; Mon, 5 Aug 2013 20:13:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r75KD6w6015170; Mon, 5 Aug 2013 20:13:06 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r75KD36I015147; Mon, 5 Aug 2013 20:13:03 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201308052013.r75KD36I015147@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Aug 2013 20:13:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253970 - in head: sys/netinet6 sys/sys usr.sbin/ndp usr.sbin/rtadvctl usr.sbin/rtadvd usr.sbin/rtsold X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 20:13:06 -0000 Author: hrs Date: Mon Aug 5 20:13:02 2013 New Revision: 253970 URL: http://svnweb.freebsd.org/changeset/base/253970 Log: - Use time_uptime instead of time_second in data structures for PF_INET6 in kernel. This fixes various malfunction when the wall time clock is changed. Bump __FreeBSD_version to 1000041. - Use clock_gettime(CLOCK_MONOTONIC_FAST) in userland utilities. MFC after: 1 month Modified: head/sys/netinet6/icmp6.c head/sys/netinet6/in6.c head/sys/netinet6/in6.h head/sys/netinet6/ip6_forward.c head/sys/netinet6/ip6_id.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_rtr.c head/sys/sys/param.h head/usr.sbin/ndp/ndp.c head/usr.sbin/rtadvctl/rtadvctl.c head/usr.sbin/rtadvd/config.c head/usr.sbin/rtadvd/rrenum.c head/usr.sbin/rtadvd/rtadvd.c head/usr.sbin/rtadvd/rtadvd.h head/usr.sbin/rtadvd/timer.c head/usr.sbin/rtadvd/timer.h head/usr.sbin/rtadvd/timer_subr.c head/usr.sbin/rtadvd/timer_subr.h head/usr.sbin/rtsold/dump.c head/usr.sbin/rtsold/rtsol.c head/usr.sbin/rtsold/rtsold.c head/usr.sbin/rtsold/rtsold.h Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Mon Aug 5 19:42:03 2013 (r253969) +++ head/sys/netinet6/icmp6.c Mon Aug 5 20:13:02 2013 (r253970) @@ -1931,8 +1931,8 @@ ni6_store_addrs(struct icmp6_nodeinfo *n ltime = ND6_INFINITE_LIFETIME; else { if (ifa6->ia6_lifetime.ia6t_expire > - time_second) - ltime = htonl(ifa6->ia6_lifetime.ia6t_expire - time_second); + time_uptime) + ltime = htonl(ifa6->ia6_lifetime.ia6t_expire - time_uptime); else ltime = 0; } Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Mon Aug 5 19:42:03 2013 (r253969) +++ head/sys/netinet6/in6.c Mon Aug 5 20:13:02 2013 (r253970) @@ -523,12 +523,12 @@ in6_control(struct socket *so, u_long cm /* sanity for overflow - beware unsigned */ lt = &ifr->ifr_ifru.ifru_lifetime; if (lt->ia6t_vltime != ND6_INFINITE_LIFETIME && - lt->ia6t_vltime + time_second < time_second) { + lt->ia6t_vltime + time_uptime < time_uptime) { error = EINVAL; goto out; } if (lt->ia6t_pltime != ND6_INFINITE_LIFETIME && - lt->ia6t_pltime + time_second < time_second) { + lt->ia6t_pltime + time_uptime < time_uptime) { error = EINVAL; goto out; } @@ -632,12 +632,12 @@ in6_control(struct socket *so, u_long cm /* for sanity */ if (ia->ia6_lifetime.ia6t_vltime != ND6_INFINITE_LIFETIME) { ia->ia6_lifetime.ia6t_expire = - time_second + ia->ia6_lifetime.ia6t_vltime; + time_uptime + ia->ia6_lifetime.ia6t_vltime; } else ia->ia6_lifetime.ia6t_expire = 0; if (ia->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME) { ia->ia6_lifetime.ia6t_preferred = - time_second + ia->ia6_lifetime.ia6t_pltime; + time_uptime + ia->ia6_lifetime.ia6t_pltime; } else ia->ia6_lifetime.ia6t_preferred = 0; break; @@ -1140,7 +1140,7 @@ in6_update_ifa(struct ifnet *ifp, struct ia->ia_ifa.ifa_addr = (struct sockaddr *)&ia->ia_addr; ia->ia_addr.sin6_family = AF_INET6; ia->ia_addr.sin6_len = sizeof(ia->ia_addr); - ia->ia6_createtime = time_second; + ia->ia6_createtime = time_uptime; if ((ifp->if_flags & (IFF_POINTOPOINT | IFF_LOOPBACK)) != 0) { /* * XXX: some functions expect that ifa_dstaddr is not @@ -1167,7 +1167,7 @@ in6_update_ifa(struct ifnet *ifp, struct } /* update timestamp */ - ia->ia6_updatetime = time_second; + ia->ia6_updatetime = time_uptime; /* set prefix mask */ if (ifra->ifra_prefixmask.sin6_len) { @@ -1217,12 +1217,12 @@ in6_update_ifa(struct ifnet *ifp, struct ia->ia6_lifetime = ifra->ifra_lifetime; if (ia->ia6_lifetime.ia6t_vltime != ND6_INFINITE_LIFETIME) { ia->ia6_lifetime.ia6t_expire = - time_second + ia->ia6_lifetime.ia6t_vltime; + time_uptime + ia->ia6_lifetime.ia6t_vltime; } else ia->ia6_lifetime.ia6t_expire = 0; if (ia->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME) { ia->ia6_lifetime.ia6t_preferred = - time_second + ia->ia6_lifetime.ia6t_pltime; + time_uptime + ia->ia6_lifetime.ia6t_pltime; } else ia->ia6_lifetime.ia6t_preferred = 0; @@ -1240,7 +1240,7 @@ in6_update_ifa(struct ifnet *ifp, struct */ if ((ifra->ifra_flags & IN6_IFF_DEPRECATED) != 0) { ia->ia6_lifetime.ia6t_pltime = 0; - ia->ia6_lifetime.ia6t_preferred = time_second; + ia->ia6_lifetime.ia6t_preferred = time_uptime; } /* * Make the address tentative before joining multicast addresses, Modified: head/sys/netinet6/in6.h ============================================================================== --- head/sys/netinet6/in6.h Mon Aug 5 19:42:03 2013 (r253969) +++ head/sys/netinet6/in6.h Mon Aug 5 20:13:02 2013 (r253970) @@ -361,11 +361,11 @@ extern const struct in6_addr in6addr_lin #define IFA6_IS_DEPRECATED(a) \ ((a)->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME && \ - (u_int32_t)((time_second - (a)->ia6_updatetime)) > \ + (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \ (a)->ia6_lifetime.ia6t_pltime) #define IFA6_IS_INVALID(a) \ ((a)->ia6_lifetime.ia6t_vltime != ND6_INFINITE_LIFETIME && \ - (u_int32_t)((time_second - (a)->ia6_updatetime)) > \ + (u_int32_t)((time_uptime - (a)->ia6_updatetime)) > \ (a)->ia6_lifetime.ia6t_vltime) #endif /* _KERNEL */ Modified: head/sys/netinet6/ip6_forward.c ============================================================================== --- head/sys/netinet6/ip6_forward.c Mon Aug 5 19:42:03 2013 (r253969) +++ head/sys/netinet6/ip6_forward.c Mon Aug 5 20:13:02 2013 (r253970) @@ -137,8 +137,8 @@ ip6_forward(struct mbuf *m, int srcrt) IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src)) { IP6STAT_INC(ip6s_cantforward); /* XXX in6_ifstat_inc(rt->rt_ifp, ifs6_in_discard) */ - if (V_ip6_log_time + V_ip6_log_interval < time_second) { - V_ip6_log_time = time_second; + if (V_ip6_log_time + V_ip6_log_interval < time_uptime) { + V_ip6_log_time = time_uptime; log(LOG_DEBUG, "cannot forward " "from %s to %s nxt %d received on %s\n", @@ -405,8 +405,8 @@ skip_routing: IP6STAT_INC(ip6s_badscope); in6_ifstat_inc(rt->rt_ifp, ifs6_in_discard); - if (V_ip6_log_time + V_ip6_log_interval < time_second) { - V_ip6_log_time = time_second; + if (V_ip6_log_time + V_ip6_log_interval < time_uptime) { + V_ip6_log_time = time_uptime; log(LOG_DEBUG, "cannot forward " "src %s, dst %s, nxt %d, rcvif %s, outif %s\n", Modified: head/sys/netinet6/ip6_id.c ============================================================================== --- head/sys/netinet6/ip6_id.c Mon Aug 5 19:42:03 2013 (r253969) +++ head/sys/netinet6/ip6_id.c Mon Aug 5 20:13:02 2013 (r253970) @@ -221,7 +221,7 @@ initid(struct randomtab *p) p->ru_g = pmod(p->ru_gen, j, p->ru_n); p->ru_counter = 0; - p->ru_reseed = time_second + p->ru_out; + p->ru_reseed = time_uptime + p->ru_out; p->ru_msb = p->ru_msb ? 0 : (1U << (p->ru_bits - 1)); } @@ -231,7 +231,7 @@ randomid(struct randomtab *p) int i, n; u_int32_t tmp; - if (p->ru_counter >= p->ru_max || time_second > p->ru_reseed) + if (p->ru_counter >= p->ru_max || time_uptime > p->ru_reseed) initid(p); tmp = arc4random(); Modified: head/sys/netinet6/ip6_mroute.c ============================================================================== --- head/sys/netinet6/ip6_mroute.c Mon Aug 5 19:42:03 2013 (r253969) +++ head/sys/netinet6/ip6_mroute.c Mon Aug 5 20:13:02 2013 (r253970) @@ -1103,8 +1103,8 @@ X_ip6_mforward(struct ip6_hdr *ip6, stru */ if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src)) { IP6STAT_INC(ip6s_cantforward); - if (V_ip6_log_time + V_ip6_log_interval < time_second) { - V_ip6_log_time = time_second; + if (V_ip6_log_time + V_ip6_log_interval < time_uptime) { + V_ip6_log_time = time_uptime; log(LOG_DEBUG, "cannot forward " "from %s to %s nxt %d received on %s\n", Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Mon Aug 5 19:42:03 2013 (r253969) +++ head/sys/netinet6/nd6.c Mon Aug 5 20:13:02 2013 (r253970) @@ -428,7 +428,7 @@ nd6_llinfo_settimer_locked(struct llentr ln->ln_ntick = 0; canceled = callout_stop(&ln->ln_timer_ch); } else { - ln->la_expire = time_second + tick / hz; + ln->la_expire = time_uptime + tick / hz; LLE_ADDREF(ln); if (tick > INT_MAX) { ln->ln_ntick = tick - INT_MAX; @@ -591,7 +591,7 @@ nd6_timer(void *arg) /* expire default router list */ TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) { - if (dr->expire && dr->expire < time_second) + if (dr->expire && dr->expire < time_uptime) defrtrlist_del(dr); } @@ -675,7 +675,7 @@ nd6_timer(void *arg) * prefix is not necessary. */ if (pr->ndpr_vltime != ND6_INFINITE_LIFETIME && - time_second - pr->ndpr_lastupdate > pr->ndpr_vltime) { + time_uptime - pr->ndpr_lastupdate > pr->ndpr_vltime) { /* * address expiration and prefix expiration are @@ -1033,9 +1033,9 @@ nd6_free(struct llentry *ln, int gc) * XXX: the check for ln_state would be redundant, * but we intentionally keep it just in case. */ - if (dr->expire > time_second) + if (dr->expire > time_uptime) nd6_llinfo_settimer_locked(ln, - (dr->expire - time_second) * hz); + (dr->expire - time_uptime) * hz); else nd6_llinfo_settimer_locked(ln, (long)V_nd6_gctimer * hz); Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Mon Aug 5 19:42:03 2013 (r253969) +++ head/sys/netinet6/nd6_rtr.c Mon Aug 5 20:13:02 2013 (r253970) @@ -282,7 +282,7 @@ nd6_ra_input(struct mbuf *m, int off, in dr0.rtlifetime = 0; else dr0.rtlifetime = ntohs(nd_ra->nd_ra_router_lifetime); - dr0.expire = time_second + dr0.rtlifetime; + dr0.expire = time_uptime + dr0.rtlifetime; dr0.ifp = ifp; /* unspecified or not? (RFC 2461 6.3.4) */ if (advreachable) { @@ -874,7 +874,7 @@ nd6_prelist_add(struct nd_prefixctl *pr, free(new, M_IP6NDP); return(error); } - new->ndpr_lastupdate = time_second; + new->ndpr_lastupdate = time_uptime; if (newp != NULL) *newp = new; @@ -998,7 +998,7 @@ prelist_update(struct nd_prefixctl *new, pr->ndpr_vltime = new->ndpr_vltime; pr->ndpr_pltime = new->ndpr_pltime; (void)in6_init_prefix_ltimes(pr); /* XXX error case? */ - pr->ndpr_lastupdate = time_second; + pr->ndpr_lastupdate = time_uptime; } if (new->ndpr_raf_onlink && @@ -1136,7 +1136,7 @@ prelist_update(struct nd_prefixctl *new, if (lt6_tmp.ia6t_vltime == ND6_INFINITE_LIFETIME) remaininglifetime = ND6_INFINITE_LIFETIME; - else if (time_second - ifa6->ia6_updatetime > + else if (time_uptime - ifa6->ia6_updatetime > lt6_tmp.ia6t_vltime) { /* * The case of "invalid" address. We should usually @@ -1145,7 +1145,7 @@ prelist_update(struct nd_prefixctl *new, remaininglifetime = 0; } else remaininglifetime = lt6_tmp.ia6t_vltime - - (time_second - ifa6->ia6_updatetime); + (time_uptime - ifa6->ia6_updatetime); /* when not updating, keep the current stored lifetime. */ lt6_tmp.ia6t_vltime = remaininglifetime; @@ -1181,18 +1181,18 @@ prelist_update(struct nd_prefixctl *new, u_int32_t maxvltime, maxpltime; if (V_ip6_temp_valid_lifetime > - (u_int32_t)((time_second - ifa6->ia6_createtime) + + (u_int32_t)((time_uptime - ifa6->ia6_createtime) + V_ip6_desync_factor)) { maxvltime = V_ip6_temp_valid_lifetime - - (time_second - ifa6->ia6_createtime) - + (time_uptime - ifa6->ia6_createtime) - V_ip6_desync_factor; } else maxvltime = 0; if (V_ip6_temp_preferred_lifetime > - (u_int32_t)((time_second - ifa6->ia6_createtime) + + (u_int32_t)((time_uptime - ifa6->ia6_createtime) + V_ip6_desync_factor)) { maxpltime = V_ip6_temp_preferred_lifetime - - (time_second - ifa6->ia6_createtime) - + (time_uptime - ifa6->ia6_createtime) - V_ip6_desync_factor; } else maxpltime = 0; @@ -1207,7 +1207,7 @@ prelist_update(struct nd_prefixctl *new, } } ifa6->ia6_lifetime = lt6_tmp; - ifa6->ia6_updatetime = time_second; + ifa6->ia6_updatetime = time_uptime; } IF_ADDR_RUNLOCK(ifp); if (ia6_match == NULL && new->ndpr_vltime) { @@ -1988,7 +1988,7 @@ in6_tmpifadd(const struct in6_ifaddr *ia if (ia0->ia6_lifetime.ia6t_vltime != ND6_INFINITE_LIFETIME) { vltime0 = IFA6_IS_INVALID(ia0) ? 0 : (ia0->ia6_lifetime.ia6t_vltime - - (time_second - ia0->ia6_updatetime)); + (time_uptime - ia0->ia6_updatetime)); if (vltime0 > V_ip6_temp_valid_lifetime) vltime0 = V_ip6_temp_valid_lifetime; } else @@ -1996,7 +1996,7 @@ in6_tmpifadd(const struct in6_ifaddr *ia if (ia0->ia6_lifetime.ia6t_pltime != ND6_INFINITE_LIFETIME) { pltime0 = IFA6_IS_DEPRECATED(ia0) ? 0 : (ia0->ia6_lifetime.ia6t_pltime - - (time_second - ia0->ia6_updatetime)); + (time_uptime - ia0->ia6_updatetime)); if (pltime0 > V_ip6_temp_preferred_lifetime - V_ip6_desync_factor){ pltime0 = V_ip6_temp_preferred_lifetime - V_ip6_desync_factor; @@ -2054,11 +2054,11 @@ in6_init_prefix_ltimes(struct nd_prefix if (ndpr->ndpr_pltime == ND6_INFINITE_LIFETIME) ndpr->ndpr_preferred = 0; else - ndpr->ndpr_preferred = time_second + ndpr->ndpr_pltime; + ndpr->ndpr_preferred = time_uptime + ndpr->ndpr_pltime; if (ndpr->ndpr_vltime == ND6_INFINITE_LIFETIME) ndpr->ndpr_expire = 0; else - ndpr->ndpr_expire = time_second + ndpr->ndpr_vltime; + ndpr->ndpr_expire = time_uptime + ndpr->ndpr_vltime; return 0; } @@ -2070,7 +2070,7 @@ in6_init_address_ltimes(struct nd_prefix if (lt6->ia6t_vltime == ND6_INFINITE_LIFETIME) lt6->ia6t_expire = 0; else { - lt6->ia6t_expire = time_second; + lt6->ia6t_expire = time_uptime; lt6->ia6t_expire += lt6->ia6t_vltime; } @@ -2078,7 +2078,7 @@ in6_init_address_ltimes(struct nd_prefix if (lt6->ia6t_pltime == ND6_INFINITE_LIFETIME) lt6->ia6t_preferred = 0; else { - lt6->ia6t_preferred = time_second; + lt6->ia6t_preferred = time_uptime; lt6->ia6t_preferred += lt6->ia6t_pltime; } } Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Aug 5 19:42:03 2013 (r253969) +++ head/sys/sys/param.h Mon Aug 5 20:13:02 2013 (r253970) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000040 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000041 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/usr.sbin/ndp/ndp.c ============================================================================== --- head/usr.sbin/ndp/ndp.c Mon Aug 5 19:42:03 2013 (r253969) +++ head/usr.sbin/ndp/ndp.c Mon Aug 5 20:13:02 2013 (r253970) @@ -79,7 +79,6 @@ #include #include #include -#include #include #include @@ -105,6 +104,7 @@ #include #include #include +#include #include #include #include "gmt2local.h" @@ -125,6 +125,7 @@ static int tflag; static int32_t thiszone; /* time difference with gmt */ static int s = -1; static int repeat = 0; +static struct timespec ts, ts0; char ntop_buf[INET6_ADDRSTRLEN]; /* inet_ntop() */ char host_buf[NI_MAXHOST]; /* getnameinfo() */ @@ -153,7 +154,7 @@ static void getdefif(void); static void setdefif(char *); #endif static char *sec2str(time_t); -static void ts_print(const struct timeval *); +static void ts_print(const struct timespec *); #ifdef ICMPV6CTL_ND6_DRLIST static char *rtpref_str[] = { @@ -164,6 +165,16 @@ static char *rtpref_str[] = { }; #endif +#define TS_SUB(tsp, usp, vsp) \ + do { \ + (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \ + (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \ + if ((vsp)->tv_nsec < 0) { \ + (vsp)->tv_sec--; \ + (vsp)->tv_nsec += 1000000000L; \ + } \ + } while (0) + int mode = 0; char *arg = NULL; @@ -172,10 +183,14 @@ main(argc, argv) int argc; char **argv; { + struct timespec now; int ch; pid = getpid(); thiszone = gmt2local(0); + clock_gettime(CLOCK_REALTIME_FAST, &now); + clock_gettime(CLOCK_MONOTONIC_FAST, &ts); + TS_SUB(&now, &ts, &ts0); while ((ch = getopt(argc, argv, "acd:f:Ii:nprstA:HPR")) != -1) switch (ch) { case 'a': @@ -367,7 +382,8 @@ getsocket() struct sockaddr_in6 so_mask = {sizeof(so_mask), AF_INET6 }; struct sockaddr_in6 blank_sin = {sizeof(blank_sin), AF_INET6 }, sin_m; struct sockaddr_dl blank_sdl = {sizeof(blank_sdl), AF_LINK }, sdl_m; -int expire_time, flags, found_entry; +static time_t expire_time; +static int flags, found_entry; struct { struct rt_msghdr m_rtm; char m_space[512]; @@ -412,10 +428,10 @@ set(argc, argv) flags = expire_time = 0; while (argc-- > 0) { if (strncmp(argv[0], "temp", 4) == 0) { - struct timeval time; + struct timespec now; - gettimeofday(&time, 0); - expire_time = time.tv_sec + 20 * 60; + clock_gettime(CLOCK_MONOTONIC_FAST, &now); + expire_time = now.tv_sec + 20 * 60; } else if (strncmp(argv[0], "proxy", 5) == 0) flags |= RTF_ANNOUNCE; argv++; @@ -566,7 +582,7 @@ dump(addr, cflag) struct sockaddr_dl *sdl; extern int h_errno; struct in6_nbrinfo *nbi; - struct timeval time; + struct timespec now; int addrwidth; int llwidth; int ifwidth; @@ -653,9 +669,9 @@ again:; #endif continue; } - gettimeofday(&time, 0); + clock_gettime(CLOCK_MONOTONIC_FAST, &now); if (tflag) - ts_print(&time); + ts_print(&now); addrwidth = strlen(host_buf); if (addrwidth < W_ADDR) @@ -676,9 +692,9 @@ again:; /* Print neighbor discovery specific informations */ nbi = getnbrinfo(&sin->sin6_addr, sdl->sdl_index, 1); if (nbi) { - if (nbi->expire > time.tv_sec) { + if (nbi->expire > now.tv_sec) { printf(" %-9.9s", - sec2str(nbi->expire - time.tv_sec)); + sec2str(nbi->expire - now.tv_sec)); } else if (nbi->expire == 0) printf(" %-9.9s", "permanent"); else @@ -1075,7 +1091,7 @@ rtrlist() char *buf; struct in6_defrouter *p, *ep; size_t l; - struct timeval time; + struct timespec now; if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &l, NULL, 0) < 0) { err(1, "sysctl(ICMPV6CTL_ND6_DRLIST)"); @@ -1110,18 +1126,18 @@ rtrlist() rtpref = ((p->flags & ND_RA_FLAG_RTPREF_MASK) >> 3) & 0xff; printf(", pref=%s", rtpref_str[rtpref]); - gettimeofday(&time, 0); + clock_gettime(CLOCK_MONOTONIC_FAST, &now); if (p->expire == 0) printf(", expire=Never\n"); else printf(", expire=%s\n", - sec2str(p->expire - time.tv_sec)); + sec2str(p->expire - now.tv_sec)); } free(buf); #else struct in6_drlist dr; int s, i; - struct timeval time; + struct timespec now; if ((s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { err(1, "socket"); @@ -1150,12 +1166,12 @@ rtrlist() printf(", flags=%s%s", DR.flags & ND_RA_FLAG_MANAGED ? "M" : "", DR.flags & ND_RA_FLAG_OTHER ? "O" : ""); - gettimeofday(&time, 0); + clock_gettime(CLOCK_MONOTONIC_FAST, &now); if (DR.expire == 0) printf(", expire=Never\n"); else printf(", expire=%s\n", - sec2str(DR.expire - time.tv_sec)); + sec2str(DR.expire - now.tv_sec)); } #undef DR close(s); @@ -1171,7 +1187,7 @@ plist() struct in6_prefix *p, *ep, *n; struct sockaddr_in6 *advrtr; size_t l; - struct timeval time; + struct timespec now; const int niflags = NI_NUMERICHOST; int ninflags = nflag ? NI_NUMERICHOST : 0; char namebuf[NI_MAXHOST]; @@ -1202,7 +1218,7 @@ plist() printf("%s/%d if=%s\n", namebuf, p->prefixlen, if_indextoname(p->if_index, ifix_buf)); - gettimeofday(&time, 0); + clock_gettime(CLOCK_MONOTONIC_FAST, &now); /* * meaning of fields, especially flags, is very different * by origin. notify the difference to the users. @@ -1228,9 +1244,9 @@ plist() printf(", pltime=%lu", (unsigned long)p->pltime); if (p->expire == 0) printf(", expire=Never"); - else if (p->expire >= time.tv_sec) + else if (p->expire >= now.tv_sec) printf(", expire=%s", - sec2str(p->expire - time.tv_sec)); + sec2str(p->expire - now.tv_sec)); else printf(", expired"); printf(", ref=%d", p->refcnt); @@ -1278,9 +1294,9 @@ plist() #else struct in6_prlist pr; int s, i; - struct timeval time; + struct timespec now; - gettimeofday(&time, 0); + clock_gettime(CLOCK_MONOTONIC_FAST, &now); if ((s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { err(1, "socket"); @@ -1316,7 +1332,7 @@ plist() printf("%s/%d if=%s\n", namebuf, PR.prefixlen, if_indextoname(PR.if_index, ifix_buf)); - gettimeofday(&time, 0); + clock_gettime(CLOCK_MONOTONIC_FAST, &now); /* * meaning of fields, especially flags, is very different * by origin. notify the difference to the users. @@ -1352,9 +1368,9 @@ plist() printf(", pltime=%lu", PR.pltime); if (PR.expire == 0) printf(", expire=Never"); - else if (PR.expire >= time.tv_sec) + else if (PR.expire >= now.tv_sec) printf(", expire=%s", - sec2str(PR.expire - time.tv_sec)); + sec2str(PR.expire - now.tv_sec)); else printf(", expired"); #ifdef NDPRF_ONLINK @@ -1577,15 +1593,15 @@ sec2str(total) * from tcpdump/util.c */ static void -ts_print(tvp) - const struct timeval *tvp; +ts_print(tsp) + const struct timespec *tsp; { int s; /* Default */ - s = (tvp->tv_sec + thiszone) % 86400; + s = (tsp->tv_sec + thiszone + ts0.tv_sec) % 86400; (void)printf("%02d:%02d:%02d.%06u ", - s / 3600, (s % 3600) / 60, s % 60, (u_int32_t)tvp->tv_usec); + s / 3600, (s % 3600) / 60, s % 60, (u_int32_t)tsp->tv_nsec / 1000); } #undef NEXTADDR Modified: head/usr.sbin/rtadvctl/rtadvctl.c ============================================================================== --- head/usr.sbin/rtadvctl/rtadvctl.c Mon Aug 5 19:42:03 2013 (r253969) +++ head/usr.sbin/rtadvctl/rtadvctl.c Mon Aug 5 20:13:02 2013 (r253970) @@ -55,6 +55,7 @@ #include #include #include +#include #include #include "pathnames.h" @@ -416,6 +417,7 @@ action_show(int argc, char **argv) char argv_dnssl[IFNAMSIZ + sizeof(":dnssl=")]; char ssbuf[SSBUFLEN]; + struct timespec now, ts0, ts; struct ctrl_msg_pl cp; struct ifinfo *ifi; TAILQ_HEAD(, ifinfo) ifl = TAILQ_HEAD_INITIALIZER(ifl); @@ -464,6 +466,10 @@ action_show(int argc, char **argv) } } + clock_gettime(CLOCK_REALTIME_FAST, &now); + clock_gettime(CLOCK_MONOTONIC_FAST, &ts); + TS_SUB(&now, &ts, &ts0); + TAILQ_FOREACH(ifi, &ifl, ifi_next) { struct ifinfo *ifi_s; struct rtadvd_timer *rat; @@ -615,12 +621,20 @@ action_show(int argc, char **argv) rat = (struct rtadvd_timer *)cp.cp_val; } - printf("\tNext RA send: %s", - (rat == NULL) ? "never\n" : - ctime((time_t *)&rat->rat_tm.tv_sec)); - printf("\tLast RA sent: %s", - (ifi_s->ifi_ra_lastsent.tv_sec == 0) ? "never\n" : - ctime((time_t *)&ifi_s->ifi_ra_lastsent.tv_sec)); + printf("\tNext RA send: "); + if (rat == NULL) + printf("never\n"); + else { + ts.tv_sec = rat->rat_tm.tv_sec + ts0.tv_sec; + printf("%s", ctime(&ts.tv_sec)); + } + printf("\tLast RA send: "); + if (ifi_s->ifi_ra_lastsent.tv_sec == 0) + printf("never\n"); + else { + ts.tv_sec = ifi_s->ifi_ra_lastsent.tv_sec + ts0.tv_sec; + printf("%s", ctime(&ts.tv_sec)); + } if (rai->rai_clockskew) printf("\tClock skew: %" PRIu16 "sec\n", rai->rai_clockskew); @@ -747,9 +761,9 @@ action_show_prefix(struct prefix *pfx) { char ntopbuf[INET6_ADDRSTRLEN]; char ssbuf[SSBUFLEN]; - struct timeval now; + struct timespec now; - gettimeofday(&now, NULL); + clock_gettime(CLOCK_MONOTONIC_FAST, &now); printf("\t %s/%d", inet_ntop(AF_INET6, &pfx->pfx_prefix, ntopbuf, sizeof(ntopbuf)), pfx->pfx_prefixlen); @@ -800,7 +814,7 @@ action_show_prefix(struct prefix *pfx) printf(""); if (pfx->pfx_timer) { - struct timeval *rest; + struct timespec *rest; rest = rtadvd_timer_rest(pfx->pfx_timer); if (rest) { /* XXX: what if not? */ Modified: head/usr.sbin/rtadvd/config.c ============================================================================== --- head/usr.sbin/rtadvd/config.c Mon Aug 5 19:42:03 2013 (r253969) +++ head/usr.sbin/rtadvd/config.c Mon Aug 5 20:13:02 2013 (r253970) @@ -34,7 +34,6 @@ #include #include #include -#include #include #include @@ -58,6 +57,7 @@ #include #include #include +#include #include #include @@ -563,8 +563,9 @@ getconfig(struct ifinfo *ifi) makeentry(entbuf, sizeof(entbuf), i, "vltimedecr"); if (agetflag(entbuf)) { - struct timeval now; - gettimeofday(&now, 0); + struct timespec now; + + clock_gettime(CLOCK_MONOTONIC_FAST, &now); pfx->pfx_vltimeexpire = now.tv_sec + pfx->pfx_validlifetime; } @@ -583,8 +584,9 @@ getconfig(struct ifinfo *ifi) makeentry(entbuf, sizeof(entbuf), i, "pltimedecr"); if (agetflag(entbuf)) { - struct timeval now; - gettimeofday(&now, 0); + struct timespec now; + + clock_gettime(CLOCK_MONOTONIC_FAST, &now); pfx->pfx_pltimeexpire = now.tv_sec + pfx->pfx_preflifetime; } @@ -1164,7 +1166,7 @@ delete_prefix(struct prefix *pfx) void invalidate_prefix(struct prefix *pfx) { - struct timeval timo; + struct timespec timo; struct rainfo *rai; struct ifinfo *ifi; char ntopbuf[INET6_ADDRSTRLEN]; @@ -1191,7 +1193,7 @@ invalidate_prefix(struct prefix *pfx) delete_prefix(pfx); } timo.tv_sec = prefix_timo; - timo.tv_usec = 0; + timo.tv_nsec = 0; rtadvd_set_timer(&timo, pfx->pfx_timer); } @@ -1415,7 +1417,7 @@ make_packet(struct rainfo *rai) TAILQ_FOREACH(pfx, &rai->rai_prefix, pfx_next) { uint32_t vltime, pltime; - struct timeval now; + struct timespec now; ndopt_pi = (struct nd_opt_prefix_info *)buf; ndopt_pi->nd_opt_pi_type = ND_OPT_PREFIX_INFORMATION; @@ -1432,7 +1434,7 @@ make_packet(struct rainfo *rai) vltime = 0; else { if (pfx->pfx_vltimeexpire || pfx->pfx_pltimeexpire) - gettimeofday(&now, NULL); + clock_gettime(CLOCK_MONOTONIC_FAST, &now); if (pfx->pfx_vltimeexpire == 0) vltime = pfx->pfx_validlifetime; else Modified: head/usr.sbin/rtadvd/rrenum.c ============================================================================== --- head/usr.sbin/rtadvd/rrenum.c Mon Aug 5 19:42:03 2013 (r253969) +++ head/usr.sbin/rtadvd/rrenum.c Mon Aug 5 20:13:02 2013 (r253970) @@ -49,6 +49,7 @@ #include #include #include +#include #include #include "rtadvd.h" #include "rrenum.h" @@ -215,7 +216,7 @@ do_use_prefix(int len, struct rr_pco_mat rai = ifi->ifi_rainfo; TAILQ_FOREACH(pfx, &rai->rai_prefix, pfx_next) { - struct timeval now; + struct timespec now; if (prefix_match(&pfx->pfx_prefix, pfx->pfx_prefixlen, &rpm->rpm_prefix, @@ -226,14 +227,16 @@ do_use_prefix(int len, struct rr_pco_mat pfx->pfx_preflifetime = ntohl(rpu->rpu_pltime); if (irr->irr_rrf_decrvalid) { - gettimeofday(&now, 0); + clock_gettime(CLOCK_MONOTONIC_FAST, + &now); pfx->pfx_vltimeexpire = now.tv_sec + pfx->pfx_validlifetime; } else pfx->pfx_vltimeexpire = 0; if (irr->irr_rrf_decrprefd) { - gettimeofday(&now, 0); + clock_gettime(CLOCK_MONOTONIC_FAST, + &now); pfx->pfx_pltimeexpire = now.tv_sec + pfx->pfx_preflifetime; Modified: head/usr.sbin/rtadvd/rtadvd.c ============================================================================== --- head/usr.sbin/rtadvd/rtadvd.c Mon Aug 5 19:42:03 2013 (r253969) +++ head/usr.sbin/rtadvd/rtadvd.c Mon Aug 5 20:13:02 2013 (r253970) @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -179,7 +178,7 @@ int main(int argc, char *argv[]) { struct pollfd set[PFD_MAX]; - struct timeval *timeout; + struct timespec *timeout; int i, ch; int fflag = 0, logopt; int error; @@ -331,7 +330,7 @@ main(int argc, char *argv[]) "<%s> set timer to %ld:%ld. waiting for " "inputs or timeout", __func__, (long int)timeout->tv_sec, - (long int)timeout->tv_usec); + (long int)timeout->tv_nsec / 1000); } else { syslog(LOG_DEBUG, "<%s> there's no timer. waiting for inputs", @@ -339,7 +338,7 @@ main(int argc, char *argv[]) } if ((i = poll(set, sizeof(set)/sizeof(set[0]), timeout ? (timeout->tv_sec * 1000 + - timeout->tv_usec / 1000) : INFTIM)) < 0) { + timeout->tv_nsec / 1000 / 1000) : INFTIM)) < 0) { /* EINTR would occur if a signal was delivered */ if (errno != EINTR) @@ -432,7 +431,7 @@ rtadvd_shutdown(void) if (ifi->ifi_ra_timer == NULL) continue; if (ifi->ifi_ra_lastsent.tv_sec == 0 && - ifi->ifi_ra_lastsent.tv_usec == 0 && + ifi->ifi_ra_lastsent.tv_nsec == 0 && ifi->ifi_ra_timer != NULL) { /* * When RA configured but never sent, @@ -1006,7 +1005,7 @@ static void set_short_delay(struct ifinfo *ifi) { long delay; /* must not be greater than 1000000 */ - struct timeval interval, now, min_delay, tm_tmp, *rest; + struct timespec interval, now, min_delay, tm_tmp, *rest; if (ifi->ifi_ra_timer == NULL) return; @@ -1023,9 +1022,9 @@ set_short_delay(struct ifinfo *ifi) delay = random() % MAX_RA_DELAY_TIME; #endif interval.tv_sec = 0; - interval.tv_usec = delay; + interval.tv_nsec = delay * 1000; rest = rtadvd_timer_rest(ifi->ifi_ra_timer); - if (TIMEVAL_LT(rest, &interval)) { + if (TS_CMP(rest, &interval, <)) { syslog(LOG_DEBUG, "<%s> random delay is larger than " "the rest of the current timer", __func__); interval = *rest; @@ -1038,13 +1037,13 @@ set_short_delay(struct ifinfo *ifi) * MIN_DELAY_BETWEEN_RAS plus the random value after the * previous advertisement was sent. */ - gettimeofday(&now, NULL); - TIMEVAL_SUB(&now, &ifi->ifi_ra_lastsent, &tm_tmp); + clock_gettime(CLOCK_MONOTONIC_FAST, &now); + TS_SUB(&now, &ifi->ifi_ra_lastsent, &tm_tmp); min_delay.tv_sec = MIN_DELAY_BETWEEN_RAS; - min_delay.tv_usec = 0; - if (TIMEVAL_LT(&tm_tmp, &min_delay)) { - TIMEVAL_SUB(&min_delay, &tm_tmp, &min_delay); - TIMEVAL_ADD(&min_delay, &interval, &interval); + min_delay.tv_nsec = 0; + if (TS_CMP(&tm_tmp, &min_delay, <)) { + TS_SUB(&min_delay, &tm_tmp, &min_delay); + TS_ADD(&min_delay, &interval, &interval); } rtadvd_set_timer(&interval, ifi->ifi_ra_timer); } @@ -1242,7 +1241,7 @@ prefix_check(struct nd_opt_prefix_info * int inconsistent = 0; char ntopbuf[INET6_ADDRSTRLEN]; char prefixbuf[INET6_ADDRSTRLEN]; - struct timeval now; + struct timespec now; #if 0 /* impossible */ if (pinfo->nd_opt_pi_type != ND_OPT_PREFIX_INFORMATION) @@ -1285,7 +1284,7 @@ prefix_check(struct nd_opt_prefix_info * * XXX: can we really expect that all routers on the link * have synchronized clocks? */ - gettimeofday(&now, NULL); + clock_gettime(CLOCK_MONOTONIC_FAST, &now); preferred_time += now.tv_sec; if (!pfx->pfx_timer && rai->rai_clockskew && @@ -1318,7 +1317,7 @@ prefix_check(struct nd_opt_prefix_info * valid_time = ntohl(pinfo->nd_opt_pi_valid_time); if (pfx->pfx_vltimeexpire) { - gettimeofday(&now, NULL); + clock_gettime(CLOCK_MONOTONIC_FAST, &now); valid_time += now.tv_sec; if (!pfx->pfx_timer && rai->rai_clockskew && @@ -1784,7 +1783,7 @@ ra_output(struct ifinfo *ifi) } /* update timestamp */ - gettimeofday(&ifi->ifi_ra_lastsent, NULL); + clock_gettime(CLOCK_MONOTONIC_FAST, &ifi->ifi_ra_lastsent); /* update counter */ ifi->ifi_rs_waitcount = 0; @@ -1866,7 +1865,7 @@ ra_timeout(void *arg) /* update RA timer */ void -ra_timer_update(void *arg, struct timeval *tm) +ra_timer_update(void *arg, struct timespec *tm) { uint16_t interval; struct rainfo *rai; @@ -1916,12 +1915,12 @@ ra_timer_update(void *arg, struct timeva } tm->tv_sec = interval; - tm->tv_usec = 0; + tm->tv_nsec = 0; syslog(LOG_DEBUG, "<%s> RA timer on %s is set to %ld:%ld", __func__, ifi->ifi_ifname, - (long int)tm->tv_sec, (long int)tm->tv_usec); + (long int)tm->tv_sec, (long int)tm->tv_nsec / 1000); return; } Modified: head/usr.sbin/rtadvd/rtadvd.h ============================================================================== --- head/usr.sbin/rtadvd/rtadvd.h Mon Aug 5 19:42:03 2013 (r253969) +++ head/usr.sbin/rtadvd/rtadvd.h Mon Aug 5 20:13:02 2013 (r253970) @@ -270,7 +270,7 @@ struct ifinfo { uint32_t ifi_burstinterval; struct rtadvd_timer *ifi_ra_timer; /* timestamp when the latest RA was sent */ - struct timeval ifi_ra_lastsent; + struct timespec ifi_ra_lastsent; uint16_t ifi_rs_waitcount; /* statistics */ @@ -286,7 +286,7 @@ extern TAILQ_HEAD(ifilist_head_t, ifinfo extern char *mcastif; struct rtadvd_timer *ra_timeout(void *); -void ra_timer_update(void *, struct timeval *); +void ra_timer_update(void *, struct timespec *); void ra_output(struct ifinfo *); int prefix_match(struct in6_addr *, int, Modified: head/usr.sbin/rtadvd/timer.c ============================================================================== --- head/usr.sbin/rtadvd/timer.c Mon Aug 5 19:42:03 2013 (r253969) +++ head/usr.sbin/rtadvd/timer.c Mon Aug 5 20:13:02 2013 (r253970) @@ -31,7 +31,6 @@ * SUCH DAMAGE. */ -#include #include #include @@ -44,6 +43,7 @@ #include #include #include +#include #include #include "rtadvd.h" @@ -52,12 +52,17 @@ struct rtadvd_timer_head_t ra_timer = TAILQ_HEAD_INITIALIZER(ra_timer); -static struct timeval tm_limit = {0x7fffffff, 0x7fffffff}; -static struct timeval tm_max; +static struct timespec tm_limit; +static struct timespec tm_max; void rtadvd_timer_init(void) { + /* Generate maximum time in timespec. */ + memset(&tm_limit.tv_sec, 0xff, sizeof(tm_limit.tv_sec)); + memset(&tm_limit.tv_nsec, 0xff, sizeof(tm_limit.tv_nsec)); + tm_limit.tv_sec &= ~(1UL << (sizeof(tm_limit.tv_sec) * 8 - 1)); + tm_limit.tv_nsec &= ~(1UL << (sizeof(tm_limit.tv_nsec) * 8 - 1)); tm_max = tm_limit; TAILQ_INIT(&ra_timer); @@ -102,7 +107,7 @@ rtadvd_update_timeout_handler(void) struct rtadvd_timer * rtadvd_add_timer(struct rtadvd_timer *(*timeout)(void *), - void (*update)(void *, struct timeval *), + void (*update)(void *, struct timespec *), void *timeodata, void *updatedata) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 20:14:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AB297965; Mon, 5 Aug 2013 20:14:57 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 98273256C; Mon, 5 Aug 2013 20:14:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r75KEvCi015509; Mon, 5 Aug 2013 20:14:57 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r75KEvD1015506; Mon, 5 Aug 2013 20:14:57 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201308052014.r75KEvD1015506@svn.freebsd.org> From: Olivier Houchard Date: Mon, 5 Aug 2013 20:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253971 - in head/sys: arm/arm arm/ti/omap4 boot/fdt/dts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 20:14:57 -0000 Author: cognet Date: Mon Aug 5 20:14:56 2013 New Revision: 253971 URL: http://svnweb.freebsd.org/changeset/base/253971 Log: Let the platform calculate the timer frequency at runtime, and use that for the omap4, instead of relying on the (wrong) value provided in the dts. Modified: head/sys/arm/arm/mpcore_timer.c head/sys/arm/ti/omap4/omap4_prcm_clks.c head/sys/boot/fdt/dts/pandaboard.dts Modified: head/sys/arm/arm/mpcore_timer.c ============================================================================== --- head/sys/arm/arm/mpcore_timer.c Mon Aug 5 20:13:02 2013 (r253970) +++ head/sys/arm/arm/mpcore_timer.c Mon Aug 5 20:14:56 2013 (r253971) @@ -115,6 +115,8 @@ static struct resource_spec arm_tmr_spec static struct arm_tmr_softc *arm_tmr_sc = NULL; +uint32_t platform_arm_tmr_freq = 0; + #define tmr_prv_read_4(reg) \ bus_space_read_4(arm_tmr_sc->prv_bst, arm_tmr_sc->prv_bsh, reg) #define tmr_prv_write_4(reg, val) \ @@ -274,13 +276,18 @@ arm_tmr_attach(device_t dev) if (arm_tmr_sc) return (ENXIO); - /* Get the base clock frequency */ - node = ofw_bus_get_node(dev); - if ((OF_getprop(node, "clock-frequency", &clock, sizeof(clock))) <= 0) { - device_printf(dev, "missing clock-frequency attribute in FDT\n"); - return (ENXIO); + if (platform_arm_tmr_freq != 0) + sc->clkfreq = platform_arm_tmr_freq; + else { + /* Get the base clock frequency */ + node = ofw_bus_get_node(dev); + if ((OF_getprop(node, "clock-frequency", &clock, + sizeof(clock))) <= 0) { + device_printf(dev, "missing clock-frequency attribute in FDT\n"); + return (ENXIO); + } + sc->clkfreq = fdt32_to_cpu(clock); } - sc->clkfreq = fdt32_to_cpu(clock); if (bus_alloc_resources(dev, arm_tmr_spec, sc->tmr_res)) { Modified: head/sys/arm/ti/omap4/omap4_prcm_clks.c ============================================================================== --- head/sys/arm/ti/omap4/omap4_prcm_clks.c Mon Aug 5 20:13:02 2013 (r253970) +++ head/sys/arm/ti/omap4/omap4_prcm_clks.c Mon Aug 5 20:14:56 2013 (r253971) @@ -1384,10 +1384,14 @@ omap4_prcm_probe(device_t dev) * RETURNS: * Always returns 0 */ + +extern uint32_t platform_arm_tmr_freq; + static int omap4_prcm_attach(device_t dev) { struct omap4_prcm_softc *sc = device_get_softc(dev); + unsigned int freq; if (bus_alloc_resources(dev, omap4_scm_res_spec, sc->sc_res)) { device_printf(dev, "could not allocate resources\n"); @@ -1396,6 +1400,8 @@ omap4_prcm_attach(device_t dev) omap4_prcm_sc = sc; ti_cpu_reset = omap4_prcm_reset; + omap4_clk_get_arm_fclk_freq(NULL, &freq); + platform_arm_tmr_freq = freq / 2; return (0); } Modified: head/sys/boot/fdt/dts/pandaboard.dts ============================================================================== --- head/sys/boot/fdt/dts/pandaboard.dts Mon Aug 5 20:13:02 2013 (r253970) +++ head/sys/boot/fdt/dts/pandaboard.dts Mon Aug 5 20:14:56 2013 (r253971) @@ -64,6 +64,13 @@ < 0x48240100 0x0100 >; /* CPU Interface Registers */ }; + omap4_prcm@4a306000 { + compatible = "ti,omap4_prcm"; + reg =< 0x4a306000 0x2000 + 0x4a004000 0x1000 + 0x4a008000 0x8000>; + }; + pl310@48242000 { compatible = "arm,pl310"; reg = < 0x48242000 0x1000 >; @@ -72,7 +79,6 @@ }; mp_tmr@48240200 { compatible = "arm,mpcore-timers"; - clock-frequency = < 504000000 >; #address-cells = <1>; #size-cells = <0>; reg = < 0x48240200 0x100 >, /* Global Timer Registers */ @@ -110,13 +116,6 @@ "ag16", "usbb1_ulpiphy_dat7", "input_pulldown"; }; - omap4_prcm@4a306000 { - compatible = "ti,omap4_prcm"; - reg =< 0x4a306000 0x2000 - 0x4a004000 0x1000 - 0x4a008000 0x8000>; - }; - GPIO: gpio { #gpio-cells = <3>; compatible = "ti,gpio"; From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 20:30:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D30E26F0; Mon, 5 Aug 2013 20:30:15 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C03AA2696; Mon, 5 Aug 2013 20:30:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r75KUF2N019155; Mon, 5 Aug 2013 20:30:15 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r75KUF0M019154; Mon, 5 Aug 2013 20:30:15 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201308052030.r75KUF0M019154@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Aug 2013 20:30:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253972 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 20:30:15 -0000 Author: hrs Date: Mon Aug 5 20:30:15 2013 New Revision: 253972 URL: http://svnweb.freebsd.org/changeset/base/253972 Log: Document IPv6 timer value change in r253970. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Aug 5 20:14:56 2013 (r253971) +++ head/UPDATING Mon Aug 5 20:30:15 2013 (r253972) @@ -31,6 +31,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130806: + Timer values in IPv6 data structures now use time_uptime instead + of time_second. Although this is not a user-visible functional + change, userland utilities which directly use them---ndp(8), + rtadvd(8), and rtsold(8) in the base system---need to be updated + to r253970 or later. + 20130802: find -delete can now delete the pathnames given as arguments, instead of only files found below them or if the pathname did From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 20:44:29 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BE0F6E7B; Mon, 5 Aug 2013 20:44:29 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from db8outboundpool.messaging.microsoft.com (mail-db8lp0187.outbound.messaging.microsoft.com [213.199.154.187]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4E0274A; Mon, 5 Aug 2013 20:44:28 +0000 (UTC) Received: from mail61-db8-R.bigfish.com (10.174.8.236) by DB8EHSOBE030.bigfish.com (10.174.4.93) with Microsoft SMTP Server id 14.1.225.22; Mon, 5 Aug 2013 20:14:05 +0000 Received: from mail61-db8 (localhost [127.0.0.1]) by mail61-db8-R.bigfish.com (Postfix) with ESMTP id 6D1BD5402B0; Mon, 5 Aug 2013 20:14:05 +0000 (UTC) X-Forefront-Antispam-Report: CIP:66.129.224.54; KIP:(null); UIP:(null); IPV:NLI; H:P-EMF01-SAC.jnpr.net; RD:none; EFVD:NLI X-SpamScore: 2 X-BigFish: VPS2(zzda00h1432Idc73hzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6h1082kzz8275ch1de098h1de097hz2fh2a8h668h839hd25hf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh1b88h1fb3h1d0ch1d2eh1d3fh1de2h1dfeh1dffh1e23h1155h) Received-SPF: pass (mail61-db8: domain of juniper.net designates 66.129.224.54 as permitted sender) client-ip=66.129.224.54; envelope-from=sjg@juniper.net; helo=P-EMF01-SAC.jnpr.net ; SAC.jnpr.net ; Received: from mail61-db8 (localhost.localdomain [127.0.0.1]) by mail61-db8 (MessageSwitch) id 1375733644196198_10388; Mon, 5 Aug 2013 20:14:04 +0000 (UTC) Received: from DB8EHSMHS012.bigfish.com (unknown [10.174.8.230]) by mail61-db8.bigfish.com (Postfix) with ESMTP id 21FF3680046; Mon, 5 Aug 2013 20:14:04 +0000 (UTC) Received: from P-EMF01-SAC.jnpr.net (66.129.224.54) by DB8EHSMHS012.bigfish.com (10.174.4.22) with Microsoft SMTP Server (TLS) id 14.16.227.3; Mon, 5 Aug 2013 20:14:03 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF01-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Mon, 5 Aug 2013 13:14:00 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id r75KE0L69557; Mon, 5 Aug 2013 13:14:00 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id A181158097; Mon, 5 Aug 2013 13:14:00 -0700 (PDT) To: Hiroki Sato Subject: Re: svn commit: r253887 - head/sys/dev/filemon In-Reply-To: <20130805.132206.2279958710329728569.hrs@allbsd.org> References: <20130804.121523.488481502477873993.hrs@allbsd.org> <20130804100304.GB35080@stack.nl> <20130804151754.8189758097@chaos.jnpr.net> <20130805.132206.2279958710329728569.hrs@allbsd.org> Comments: In-reply-to: Hiroki Sato message dated "Mon, 05 Aug 2013 13:22:06 +0900." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Mon, 5 Aug 2013 13:14:00 -0700 Message-ID: <20130805201400.A181158097@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain X-OriginatorOrg: juniper.net X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, jilles@stack.nl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 20:44:29 -0000 On Mon, 5 Aug 2013 13:22:06 +0900, Hiroki Sato writes: >"Simon J. Gerraty" wrote > in <20130804151754.8189758097@chaos.jnpr.net>: >sj> I can test it for you. > > Okay, I will wait for the results. Seems to work ok. Thanks --sjg From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 22:01:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2FC9EB81; Mon, 5 Aug 2013 22:01:17 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EB09B2AA6; Mon, 5 Aug 2013 22:01:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r75M1Gw6048101; Mon, 5 Aug 2013 22:01:16 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r75M1GCw048099; Mon, 5 Aug 2013 22:01:16 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201308052201.r75M1GCw048099@svn.freebsd.org> From: Kirk McKusick Date: Mon, 5 Aug 2013 22:01:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253973 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 22:01:17 -0000 Author: mckusick Date: Mon Aug 5 22:01:16 2013 New Revision: 253973 URL: http://svnweb.freebsd.org/changeset/base/253973 Log: To better understand performance problems with journalled soft updates, we need to collect the highest level of allocation for each of the different soft update dependency structures. This change collects these statistics and makes them available using `sysctl debug.softdep.highuse'. Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Mon Aug 5 20:30:15 2013 (r253972) +++ head/sys/ufs/ffs/ffs_softdep.c Mon Aug 5 22:01:16 2013 (r253973) @@ -661,14 +661,16 @@ FEATURE(softupdates, "FFS soft-updates s #define D_LAST D_SENTINEL unsigned long dep_current[D_LAST + 1]; +unsigned long dep_highuse[D_LAST + 1]; unsigned long dep_total[D_LAST + 1]; unsigned long dep_write[D_LAST + 1]; - static SYSCTL_NODE(_debug, OID_AUTO, softdep, CTLFLAG_RW, 0, "soft updates stats"); static SYSCTL_NODE(_debug_softdep, OID_AUTO, total, CTLFLAG_RW, 0, "total dependencies allocated"); +static SYSCTL_NODE(_debug_softdep, OID_AUTO, highuse, CTLFLAG_RW, 0, + "high use dependencies allocated"); static SYSCTL_NODE(_debug_softdep, OID_AUTO, current, CTLFLAG_RW, 0, "current dependencies allocated"); static SYSCTL_NODE(_debug_softdep, OID_AUTO, write, CTLFLAG_RW, 0, @@ -680,6 +682,8 @@ static SYSCTL_NODE(_debug_softdep, OID_A &dep_total[D_ ## type], 0, ""); \ SYSCTL_ULONG(_debug_softdep_current, OID_AUTO, str, CTLFLAG_RD, \ &dep_current[D_ ## type], 0, ""); \ + SYSCTL_ULONG(_debug_softdep_highuse, OID_AUTO, str, CTLFLAG_RD, \ + &dep_highuse[D_ ## type], 0, ""); \ SYSCTL_ULONG(_debug_softdep_write, OID_AUTO, str, CTLFLAG_RD, \ &dep_write[D_ ## type], 0, ""); @@ -1204,8 +1208,12 @@ jwork_insert(dst, jsegdep) */ static void workitem_free(struct worklist *, int); static void workitem_alloc(struct worklist *, int, struct mount *); +static void workitem_reassign(struct worklist *, int); -#define WORKITEM_FREE(item, type) workitem_free((struct worklist *)(item), (type)) +#define WORKITEM_FREE(item, type) \ + workitem_free((struct worklist *)(item), (type)) +#define WORKITEM_REASSIGN(item, type) \ + workitem_reassign((struct worklist *)(item), (type)) static void workitem_free(item, type) @@ -1219,16 +1227,22 @@ workitem_free(item, type) if (item->wk_state & ONWORKLIST) panic("workitem_free: %s(0x%X) still on list", TYPENAME(item->wk_type), item->wk_state); - if (item->wk_type != type) + if (item->wk_type != type && type != D_NEWBLK) panic("workitem_free: type mismatch %s != %s", TYPENAME(item->wk_type), TYPENAME(type)); #endif if (item->wk_state & IOWAITING) wakeup(item); ump = VFSTOUFS(item->wk_mp); + KASSERT(ump->softdep_deps > 0, + ("workitem_free: %s: softdep_deps going negative", + ump->um_fs->fs_fsmnt)); if (--ump->softdep_deps == 0 && ump->softdep_req) wakeup(&ump->softdep_deps); - dep_current[type]--; + KASSERT(dep_current[item->wk_type] > 0, + ("workitem_free: %s: dep_current[%s] going negative", + ump->um_fs->fs_fsmnt, TYPENAME(item->wk_type))); + dep_current[item->wk_type]--; free(item, DtoM(type)); } @@ -1247,12 +1261,31 @@ workitem_alloc(item, type, mp) ump = VFSTOUFS(mp); ACQUIRE_LOCK(&lk); dep_current[type]++; + if (dep_current[type] > dep_highuse[type]) + dep_highuse[type] = dep_current[type]; dep_total[type]++; ump->softdep_deps++; ump->softdep_accdeps++; FREE_LOCK(&lk); } +static void +workitem_reassign(item, newtype) + struct worklist *item; + int newtype; +{ + + KASSERT(dep_current[item->wk_type] > 0, + ("workitem_reassign: %s: dep_current[%s] going negative", + VFSTOUFS(item->wk_mp)->um_fs->fs_fsmnt, TYPENAME(item->wk_type))); + dep_current[item->wk_type]--; + dep_current[newtype]++; + if (dep_current[newtype] > dep_highuse[newtype]) + dep_highuse[newtype] = dep_current[newtype]; + dep_total[newtype]++; + item->wk_type = newtype; +} + /* * Workitem queue management */ @@ -5122,7 +5155,7 @@ softdep_setup_allocdirect(ip, off, newbl /* * Convert the newblk to an allocdirect. */ - newblk->nb_list.wk_type = D_ALLOCDIRECT; + WORKITEM_REASSIGN(newblk, D_ALLOCDIRECT); adp = (struct allocdirect *)newblk; newblk->nb_freefrag = freefrag; adp->ad_offset = off; @@ -5478,7 +5511,7 @@ softdep_setup_allocext(ip, off, newblkno /* * Convert the newblk to an allocdirect. */ - newblk->nb_list.wk_type = D_ALLOCDIRECT; + WORKITEM_REASSIGN(newblk, D_ALLOCDIRECT); adp = (struct allocdirect *)newblk; newblk->nb_freefrag = freefrag; adp->ad_offset = off; @@ -5587,7 +5620,7 @@ newallocindir(ip, ptrno, newblkno, oldbl panic("new_allocindir: lost block"); KASSERT(newblk->nb_list.wk_type == D_NEWBLK, ("newallocindir: newblk already initialized")); - newblk->nb_list.wk_type = D_ALLOCINDIR; + WORKITEM_REASSIGN(newblk, D_ALLOCINDIR); newblk->nb_freefrag = freefrag; aip = (struct allocindir *)newblk; aip->ai_offset = ptrno; @@ -7218,7 +7251,9 @@ free_newblk(newblk) struct worklist *wk; KASSERT(newblk->nb_jnewblk == NULL, - ("free_newblk; jnewblk %p still attached", newblk->nb_jnewblk)); + ("free_newblk: jnewblk %p still attached", newblk->nb_jnewblk)); + KASSERT(newblk->nb_list.wk_type != D_NEWBLK, + ("free_newblk: unclaimed newblk")); rw_assert(&lk, RA_WLOCKED); newblk_freefrag(newblk); if (newblk->nb_state & ONDEPLIST) @@ -7233,7 +7268,6 @@ free_newblk(newblk) while ((indirdep = LIST_FIRST(&newblk->nb_indirdeps)) != NULL) indirdep_complete(indirdep); handle_jwork(&newblk->nb_jwork); - newblk->nb_list.wk_type = D_NEWBLK; WORKITEM_FREE(newblk, D_NEWBLK); } From owner-svn-src-head@FreeBSD.ORG Mon Aug 5 22:02:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 95150CC7; Mon, 5 Aug 2013 22:02:45 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 81C8D2AB2; Mon, 5 Aug 2013 22:02:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r75M2jp3048346; Mon, 5 Aug 2013 22:02:45 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r75M2jtk048345; Mon, 5 Aug 2013 22:02:45 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201308052202.r75M2jtk048345@svn.freebsd.org> From: Kirk McKusick Date: Mon, 5 Aug 2013 22:02:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253974 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2013 22:02:45 -0000 Author: mckusick Date: Mon Aug 5 22:02:45 2013 New Revision: 253974 URL: http://svnweb.freebsd.org/changeset/base/253974 Log: With the addition of journalled soft updates, the "newblk" structures persist much longer than previously. Historically we had at most 100 entries; now the count may reach a million. With the increased count we spent far too much time looking them up in the grossly undersized newblk hash table. Configure the newblk hash table to accurately reflect the number of entries that it must index. Reviewed by: kib Tested by: Peter Holm MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Mon Aug 5 22:01:16 2013 (r253973) +++ head/sys/ufs/ffs/ffs_softdep.c Mon Aug 5 22:02:45 2013 (r253974) @@ -2393,7 +2393,7 @@ softdep_initialize() max_softdeps = desiredvnodes * 4; pagedep_hashtbl = hashinit(desiredvnodes / 5, M_PAGEDEP, &pagedep_hash); inodedep_hashtbl = hashinit(desiredvnodes, M_INODEDEP, &inodedep_hash); - newblk_hashtbl = hashinit(desiredvnodes / 5, M_NEWBLK, &newblk_hash); + newblk_hashtbl = hashinit(max_softdeps / 2, M_NEWBLK, &newblk_hash); bmsafemap_hashtbl = hashinit(1024, M_BMSAFEMAP, &bmsafemap_hash); i = 1 << (ffs(desiredvnodes / 10) - 1); indir_hashtbl = malloc(i * sizeof(indir_hashtbl[0]), M_FREEWORK, From owner-svn-src-head@FreeBSD.ORG Tue Aug 6 01:01:16 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5535BE4E; Tue, 6 Aug 2013 01:01:16 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 428EE2088; Tue, 6 Aug 2013 01:01:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7611FCb031895; Tue, 6 Aug 2013 01:01:15 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7611FwW031894; Tue, 6 Aug 2013 01:01:15 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201308060101.r7611FwW031894@svn.freebsd.org> From: Justin Hibbits Date: Tue, 6 Aug 2013 01:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253976 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2013 01:01:16 -0000 Author: jhibbits Date: Tue Aug 6 01:01:15 2013 New Revision: 253976 URL: http://svnweb.freebsd.org/changeset/base/253976 Log: Evict pages from the PTEG when it's full and trying to insert a new PTE, rather than panicking. Reviewed by: nwhitehorn MFC after: 3 weeks Modified: head/sys/powerpc/aim/mmu_oea.c Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Mon Aug 5 23:34:35 2013 (r253975) +++ head/sys/powerpc/aim/mmu_oea.c Tue Aug 6 01:01:15 2013 (r253976) @@ -548,7 +548,7 @@ moea_pte_set(struct pte *pt, struct pte /* * Update the PTE as defined in section 7.6.3.1. - * Note that the REF/CHG bits are from pvo_pt and thus should havce + * Note that the REF/CHG bits are from pvo_pt and thus should have * been saved so this routine can restore them (if desired). */ pt->pte_lo = pvo_pt->pte_lo; @@ -2021,10 +2021,8 @@ moea_pvo_enter(pmap_t pm, uma_zone_t zon pm->pm_stats.wired_count++; pm->pm_stats.resident_count++; - /* - * We hope this succeeds but it isn't required. - */ i = moea_pte_insert(ptegidx, &pvo->pvo_pte.pte); + KASSERT(i < 8, ("Invalid PTE index")); if (i >= 0) { PVO_PTEGIDX_SET(pvo, i); } else { @@ -2163,6 +2161,9 @@ moea_pvo_to_pte(const struct pvo_entry * "pvo but no valid pte", pvo); } + if (pvo->pvo_pte.pte.pte_hi != pt->pte_hi) { + panic("moea_pvo_to_pte: pvo does not match pte: pvo hi: %8x, pte hi: %8x", pvo->pvo_pte.pte.pte_hi, pt->pte_hi); + } if ((pt->pte_hi ^ (pvo->pvo_pte.pte.pte_hi & ~PTE_VALID)) == PTE_VALID) { if ((pvo->pvo_pte.pte.pte_hi & PTE_VALID) == 0) { panic("moea_pvo_to_pte: pvo %p has valid pte in " @@ -2181,7 +2182,7 @@ moea_pvo_to_pte(const struct pvo_entry * if (pvo->pvo_pte.pte.pte_hi & PTE_VALID) { panic("moea_pvo_to_pte: pvo %p has invalid pte %p in " - "moea_pteg_table but valid in pvo", pvo, pt); + "moea_pteg_table but valid in pvo: %8x, %8x", pvo, pt, pvo->pvo_pte.pte.pte_hi, pt->pte_hi); } mtx_unlock(&moea_table_mutex); @@ -2305,11 +2306,42 @@ moea_pte_spill(vm_offset_t addr) return (1); } +static __inline struct pvo_entry * +moea_pte_spillable_ident(u_int ptegidx) +{ + struct pte *pt; + struct pvo_entry *pvo_walk, *pvo = NULL; + + LIST_FOREACH(pvo_walk, &moea_pvo_table[ptegidx], pvo_olink) { + if (pvo_walk->pvo_vaddr & PVO_WIRED) + continue; + + if (!(pvo_walk->pvo_pte.pte.pte_hi & PTE_VALID)) + continue; + + pt = moea_pvo_to_pte(pvo_walk, -1); + + if (pt == NULL) + continue; + + pvo = pvo_walk; + + mtx_unlock(&moea_table_mutex); + if (!(pt->pte_lo & PTE_REF)) + return (pvo_walk); + } + + return (pvo); +} + static int moea_pte_insert(u_int ptegidx, struct pte *pvo_pt) { struct pte *pt; + struct pvo_entry *victim_pvo; int i; + int victim_idx; + u_int pteg_bkpidx = ptegidx; mtx_assert(&moea_table_mutex, MA_OWNED); @@ -2337,8 +2369,46 @@ moea_pte_insert(u_int ptegidx, struct pt } } - panic("moea_pte_insert: overflow"); - return (-1); + /* Try again, but this time try to force a PTE out. */ + ptegidx = pteg_bkpidx; + + victim_pvo = moea_pte_spillable_ident(ptegidx); + if (victim_pvo == NULL) { + ptegidx ^= moea_pteg_mask; + victim_pvo = moea_pte_spillable_ident(ptegidx); + } + + if (victim_pvo == NULL) { + panic("moea_pte_insert: overflow"); + return (-1); + } + + victim_idx = moea_pvo_pte_index(victim_pvo, ptegidx); + + if (pteg_bkpidx == ptegidx) + pvo_pt->pte_hi &= ~PTE_HID; + else + pvo_pt->pte_hi |= PTE_HID; + + /* + * Synchronize the sacrifice PTE with its PVO, then mark both + * invalid. The PVO will be reused when/if the VM system comes + * here after a fault. + */ + pt = &moea_pteg_table[victim_idx >> 3].pt[victim_idx & 7]; + + if (pt->pte_hi != victim_pvo->pvo_pte.pte.pte_hi) + panic("Victim PVO doesn't match PTE! PVO: %8x, PTE: %8x", victim_pvo->pvo_pte.pte.pte_hi, pt->pte_hi); + + /* + * Set the new PTE. + */ + moea_pte_unset(pt, &victim_pvo->pvo_pte.pte, victim_pvo->pvo_vaddr); + PVO_PTEGIDX_CLR(victim_pvo); + moea_pte_overflow++; + moea_pte_set(pt, pvo_pt); + + return (victim_idx & 7); } static boolean_t From owner-svn-src-head@FreeBSD.ORG Tue Aug 6 02:14:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0784C9EA; Tue, 6 Aug 2013 02:14:31 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA2FF22AA; Tue, 6 Aug 2013 02:14:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r762EU3p003283; Tue, 6 Aug 2013 02:14:30 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r762EUsE003281; Tue, 6 Aug 2013 02:14:30 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201308060214.r762EUsE003281@svn.freebsd.org> From: Hiroki Sato Date: Tue, 6 Aug 2013 02:14:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253977 - head/sys/dev/filemon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2013 02:14:31 -0000 Author: hrs Date: Tue Aug 6 02:14:30 2013 New Revision: 253977 URL: http://svnweb.freebsd.org/changeset/base/253977 Log: - Use pget(PGET_CANDEBUG | PGET_NOTWEXIT) to determine if the specified PID is valid for monitoring in FILEMON_SET_PID ioctl. - Set the monitored PID to -1 when the process exits. Suggested by: jilles Tested by: sjg MFC after: 3 days Modified: head/sys/dev/filemon/filemon.c head/sys/dev/filemon/filemon_wrapper.c Modified: head/sys/dev/filemon/filemon.c ============================================================================== --- head/sys/dev/filemon/filemon.c Tue Aug 6 01:01:15 2013 (r253976) +++ head/sys/dev/filemon/filemon.c Tue Aug 6 02:14:30 2013 (r253977) @@ -164,13 +164,12 @@ filemon_ioctl(struct cdev *dev, u_long c /* Set the monitored process ID. */ case FILEMON_SET_PID: - p = pfind(*((pid_t *)data)); - if (p == NULL) - return (EINVAL); - error = p_candebug(curthread, p); - if (error == 0) + error = pget(*((pid_t *)data), PGET_CANDEBUG | PGET_NOTWEXIT, + &p); + if (error == 0) { filemon->pid = p->p_pid; - PROC_UNLOCK(p); + PROC_UNLOCK(p); + } break; default: Modified: head/sys/dev/filemon/filemon_wrapper.c ============================================================================== --- head/sys/dev/filemon/filemon_wrapper.c Tue Aug 6 01:01:15 2013 (r253976) +++ head/sys/dev/filemon/filemon_wrapper.c Tue Aug 6 02:14:30 2013 (r253977) @@ -574,6 +574,7 @@ filemon_wrapper_sys_exit(struct thread * (uintmax_t)now.tv_sec, (uintmax_t)now.tv_usec); filemon_output(filemon, filemon->msgbufr, len); + filemon->pid = -1; } /* Unlock the found filemon structure. */ From owner-svn-src-head@FreeBSD.ORG Tue Aug 6 02:17:36 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 542B5CA6; Tue, 6 Aug 2013 02:17:36 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C712E22D5; Tue, 6 Aug 2013 02:17:35 +0000 (UTC) Received: from alph.d.allbsd.org (p2049-ipbf1102funabasi.chiba.ocn.ne.jp [122.26.101.49]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r762HHDJ083012 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Aug 2013 11:17:27 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r762HG7J020038; Tue, 6 Aug 2013 11:17:16 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Tue, 06 Aug 2013 11:17:05 +0900 (JST) Message-Id: <20130806.111705.1821513759706354028.hrs@allbsd.org> To: sjg@juniper.net Subject: Re: svn commit: r253887 - head/sys/dev/filemon From: Hiroki Sato In-Reply-To: <20130805201400.A181158097@chaos.jnpr.net> References: <20130804151754.8189758097@chaos.jnpr.net> <20130805.132206.2279958710329728569.hrs@allbsd.org> <20130805201400.A181158097@chaos.jnpr.net> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 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(Tue_Aug__6_11_17_05_2013_357)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Tue, 06 Aug 2013 11:17:28 +0900 (JST) X-Spam-Status: No, score=-90.6 required=13.0 tests=CONTENT_TYPE_PRESENT, DIRECTOCNDYN,DYN_PBL,RCVD_IN_PBL,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-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, jilles@stack.nl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2013 02:17:36 -0000 ----Security_Multipart(Tue_Aug__6_11_17_05_2013_357)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit "Simon J. Gerraty" wrote in <20130805201400.A181158097@chaos.jnpr.net>: sj> sj> On Mon, 5 Aug 2013 13:22:06 +0900, Hiroki Sato writes: sj> >"Simon J. Gerraty" wrote sj> > in <20130804151754.8189758097@chaos.jnpr.net>: sj> >sj> I can test it for you. sj> > sj> > Okay, I will wait for the results. sj> sj> Seems to work ok. Thank you. Committed in r253977. -- Hiroki ----Security_Multipart(Tue_Aug__6_11_17_05_2013_357)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlIAXKEACgkQTyzT2CeTzy3f/gCgjZPqyuxidZIA5UQFEKGsN+Bj v/AAoM3VvwU7B4vKk3ULY4RVI6iU5l2j =Jkpu -----END PGP SIGNATURE----- ----Security_Multipart(Tue_Aug__6_11_17_05_2013_357)---- From owner-svn-src-head@FreeBSD.ORG Tue Aug 6 02:58:17 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2DC33FD2; Tue, 6 Aug 2013 02:58:17 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1B7D023A5; Tue, 6 Aug 2013 02:58:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r762wG7N015148; Tue, 6 Aug 2013 02:58:16 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r762wGJG015147; Tue, 6 Aug 2013 02:58:16 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201308060258.r762wGJG015147@svn.freebsd.org> From: Justin Hibbits Date: Tue, 6 Aug 2013 02:58:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253978 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2013 02:58:17 -0000 Author: jhibbits Date: Tue Aug 6 02:58:16 2013 New Revision: 253978 URL: http://svnweb.freebsd.org/changeset/base/253978 Log: Remove an unnecessary panic. The PVO's PTE entry and the PTEG's PTE entry may not match, if the PVO's PTE is invalid. Modified: head/sys/powerpc/aim/mmu_oea.c Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Tue Aug 6 02:14:30 2013 (r253977) +++ head/sys/powerpc/aim/mmu_oea.c Tue Aug 6 02:58:16 2013 (r253978) @@ -2161,9 +2161,6 @@ moea_pvo_to_pte(const struct pvo_entry * "pvo but no valid pte", pvo); } - if (pvo->pvo_pte.pte.pte_hi != pt->pte_hi) { - panic("moea_pvo_to_pte: pvo does not match pte: pvo hi: %8x, pte hi: %8x", pvo->pvo_pte.pte.pte_hi, pt->pte_hi); - } if ((pt->pte_hi ^ (pvo->pvo_pte.pte.pte_hi & ~PTE_VALID)) == PTE_VALID) { if ((pvo->pvo_pte.pte.pte_hi & PTE_VALID) == 0) { panic("moea_pvo_to_pte: pvo %p has valid pte in " From owner-svn-src-head@FreeBSD.ORG Tue Aug 6 03:09:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 77FC74F9; Tue, 6 Aug 2013 03:09:45 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 644D924B2; Tue, 6 Aug 2013 03:09:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7639jXY020051; Tue, 6 Aug 2013 03:09:45 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7639jTi020050; Tue, 6 Aug 2013 03:09:45 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201308060309.r7639jTi020050@svn.freebsd.org> From: Justin Hibbits Date: Tue, 6 Aug 2013 03:09:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253979 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2013 03:09:45 -0000 Author: jhibbits Date: Tue Aug 6 03:09:44 2013 New Revision: 253979 URL: http://svnweb.freebsd.org/changeset/base/253979 Log: Micro-optimize OFW syscons 8-bit blank. MFC after: 1 week Modified: head/sys/powerpc/ofw/ofw_syscons.c Modified: head/sys/powerpc/ofw/ofw_syscons.c ============================================================================== --- head/sys/powerpc/ofw/ofw_syscons.c Tue Aug 6 02:58:16 2013 (r253978) +++ head/sys/powerpc/ofw/ofw_syscons.c Tue Aug 6 03:09:44 2013 (r253979) @@ -586,14 +586,22 @@ ofwfb_blank_display8(video_adapter_t *ad { struct ofwfb_softc *sc; int i; - uint8_t *addr; + uint32_t *addr; + uint32_t color; + uint32_t end; sc = (struct ofwfb_softc *)adp; - addr = (uint8_t *) sc->sc_addr; + addr = (uint32_t *) sc->sc_addr; + end = (sc->sc_stride/4) * sc->sc_height; + + /* Splat 4 pixels at once. */ + color = (ofwfb_background(SC_NORM_ATTR) << 24) | + (ofwfb_background(SC_NORM_ATTR) << 16) | + (ofwfb_background(SC_NORM_ATTR) << 8) | + (ofwfb_background(SC_NORM_ATTR)); - /* Could be done a lot faster e.g. 32-bits, or Altivec'd */ - for (i = 0; i < sc->sc_stride*sc->sc_height; i++) - *(addr + i) = ofwfb_background(SC_NORM_ATTR); + for (i = 0; i < end; i++) + *(addr + i) = color; return (0); } From owner-svn-src-head@FreeBSD.ORG Tue Aug 6 03:17:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 476B66C3; Tue, 6 Aug 2013 03:17:02 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1A81524E7; Tue, 6 Aug 2013 03:17:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r763H1iX022739; Tue, 6 Aug 2013 03:17:01 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r763H1dl022737; Tue, 6 Aug 2013 03:17:01 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201308060317.r763H1dl022737@svn.freebsd.org> From: Sean Bruno Date: Tue, 6 Aug 2013 03:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253980 - in head: share/man/man4 sys/dev/ciss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2013 03:17:02 -0000 Author: sbruno Date: Tue Aug 6 03:17:01 2013 New Revision: 253980 URL: http://svnweb.freebsd.org/changeset/base/253980 Log: Update ciss(4) with new models of raid controllers from HP Submitted by: scott.benesh@hp.com MFC after: 2 weeks Sponsored by: Hewlett Packard Modified: head/share/man/man4/ciss.4 head/sys/dev/ciss/ciss.c Modified: head/share/man/man4/ciss.4 ============================================================================== --- head/share/man/man4/ciss.4 Tue Aug 6 03:09:44 2013 (r253979) +++ head/share/man/man4/ciss.4 Tue Aug 6 03:17:01 2013 (r253980) @@ -122,6 +122,8 @@ HP Smart Array P220i .It HP Smart Array P222 .It +HP Smart Array P230i +.It HP Smart Array P400 .It HP Smart Array P400i @@ -138,14 +140,30 @@ HP Smart Array P420i .It HP Smart Array P421 .It +HP Smart Array P430 +.It +HP Smart Array P430i +.It +HP Smart Array P431 +.It +HP Smart Array P530 +.It +HP Smart Array P531 +.It HP Smart Array P600 .It HP Smart Array P721m .It +HP Smart Array P731m +.It HP Smart Array P800 .It HP Smart Array P812 .It +HP Smart Array P830 +.It +HP Smart Array P830i +.It HP Modular Smart Array 20 (MSA20) .It HP Modular Smart Array 500 (MSA500) Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Tue Aug 6 03:09:44 2013 (r253979) +++ head/sys/dev/ciss/ciss.c Tue Aug 6 03:17:01 2013 (r253980) @@ -338,6 +338,15 @@ static struct { 0x103C, 0x3354, CISS_BOARD_SA5, "HP Smart Array P420i" }, { 0x103C, 0x3355, CISS_BOARD_SA5, "HP Smart Array P220i" }, { 0x103C, 0x3356, CISS_BOARD_SA5, "HP Smart Array P721m" }, + { 0x103C, 0x1920, CISS_BOARD_SA5, "HP Smart Array P430i" }, + { 0x103C, 0x1921, CISS_BOARD_SA5, "HP Smart Array P830i" }, + { 0x103C, 0x1922, CISS_BOARD_SA5, "HP Smart Array P430" }, + { 0x103C, 0x1923, CISS_BOARD_SA5, "HP Smart Array P431" }, + { 0x103C, 0x1924, CISS_BOARD_SA5, "HP Smart Array P830" }, + { 0x103C, 0x1926, CISS_BOARD_SA5, "HP Smart Array P731m" }, + { 0x103C, 0x1928, CISS_BOARD_SA5, "HP Smart Array P230i" }, + { 0x103C, 0x1929, CISS_BOARD_SA5, "HP Smart Array P530" }, + { 0x103C, 0x192A, CISS_BOARD_SA5, "HP Smart Array P531" }, { 0, 0, 0, NULL } }; From owner-svn-src-head@FreeBSD.ORG Tue Aug 6 06:22:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 260D5DB; Tue, 6 Aug 2013 06:22:58 +0000 (UTC) (envelope-from erwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0FC152A97; Tue, 6 Aug 2013 06:22:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r766Mvel078045; Tue, 6 Aug 2013 06:22:57 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r766MtlO078026; Tue, 6 Aug 2013 06:22:55 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201308060622.r766MtlO078026@svn.freebsd.org> From: Erwin Lansing Date: Tue, 6 Aug 2013 06:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253983 - in head: contrib/bind9 contrib/bind9/bin contrib/bind9/bin/check contrib/bind9/bin/confgen contrib/bind9/bin/dig contrib/bind9/bin/dig/include/dig contrib/bind9/bin/dnssec con... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2013 06:22:58 -0000 Author: erwin Date: Tue Aug 6 06:22:54 2013 New Revision: 253983 URL: http://svnweb.freebsd.org/changeset/base/253983 Log: Update Bind to 9.8.5-P2 New Features Adds a new configuration option, "check-spf"; valid values are "warn" (default) and "ignore". When set to "warn", checks SPF and TXT records in spf format, warning if either resource record type occurs without a corresponding record of the other resource record type. [RT #33355] Adds support for Uniform Resource Identifier (URI) resource records. [RT #23386] Adds support for the EUI48 and EUI64 RR types. [RT #33082] Adds support for the RFC 6742 ILNP record types (NID, LP, L32, and L64). [RT #31836] Feature Changes Changes timing of when slave zones send NOTIFY messages after loading a new copy of the zone. They now send the NOTIFY before writing the zone data to disk. This will result in quicker propagation of updates in multi-level server structures. [RT #27242] "named -V" can now report a source ID string. (This is will be of most interest to developers and troubleshooters). The source ID for ISC's production versions of BIND is defined in the "srcid" file in the build tree and is normally set to the most recent git hash. [RT #31494] Response Policy Zone performance enhancements. New "response-policy" option "min-ns-dots". "nsip" and "nsdname" now enabled by default with RPZ. [RT #32251] Approved by: delphij (mentor) Sponsored by: DK Hostmaster A/S Added: head/contrib/bind9/lib/dns/rdata/generic/eui48_108.c - copied unchanged from r253837, vendor/bind9/dist/lib/dns/rdata/generic/eui48_108.c head/contrib/bind9/lib/dns/rdata/generic/eui48_108.h - copied unchanged from r253837, vendor/bind9/dist/lib/dns/rdata/generic/eui48_108.h head/contrib/bind9/lib/dns/rdata/generic/eui64_109.c - copied unchanged from r253837, vendor/bind9/dist/lib/dns/rdata/generic/eui64_109.c head/contrib/bind9/lib/dns/rdata/generic/eui64_109.h - copied unchanged from r253837, vendor/bind9/dist/lib/dns/rdata/generic/eui64_109.h head/contrib/bind9/lib/dns/rdata/generic/l32_105.c - copied unchanged from r253837, vendor/bind9/dist/lib/dns/rdata/generic/l32_105.c head/contrib/bind9/lib/dns/rdata/generic/l32_105.h - copied unchanged from r253837, vendor/bind9/dist/lib/dns/rdata/generic/l32_105.h head/contrib/bind9/lib/dns/rdata/generic/l64_106.c - copied unchanged from r253837, vendor/bind9/dist/lib/dns/rdata/generic/l64_106.c head/contrib/bind9/lib/dns/rdata/generic/l64_106.h - copied unchanged from r253837, vendor/bind9/dist/lib/dns/rdata/generic/l64_106.h head/contrib/bind9/lib/dns/rdata/generic/lp_107.c - copied unchanged from r253837, vendor/bind9/dist/lib/dns/rdata/generic/lp_107.c head/contrib/bind9/lib/dns/rdata/generic/lp_107.h - copied unchanged from r253837, vendor/bind9/dist/lib/dns/rdata/generic/lp_107.h head/contrib/bind9/lib/dns/rdata/generic/nid_104.c - copied unchanged from r253837, vendor/bind9/dist/lib/dns/rdata/generic/nid_104.c head/contrib/bind9/lib/dns/rdata/generic/nid_104.h - copied unchanged from r253837, vendor/bind9/dist/lib/dns/rdata/generic/nid_104.h head/contrib/bind9/lib/dns/rdata/generic/uri_256.c - copied unchanged from r253837, vendor/bind9/dist/lib/dns/rdata/generic/uri_256.c head/contrib/bind9/lib/dns/rdata/generic/uri_256.h - copied unchanged from r253837, vendor/bind9/dist/lib/dns/rdata/generic/uri_256.h head/contrib/bind9/lib/isc/include/isc/regex.h - copied unchanged from r253837, vendor/bind9/dist/lib/isc/include/isc/regex.h head/contrib/bind9/lib/isc/regex.c - copied unchanged from r253837, vendor/bind9/dist/lib/isc/regex.c Replaced: head/contrib/bind9/libtool.m4/ - copied from r253837, vendor/bind9/dist/libtool.m4/ Modified: head/contrib/bind9/CHANGES head/contrib/bind9/COPYRIGHT head/contrib/bind9/FAQ head/contrib/bind9/FAQ.xml head/contrib/bind9/Makefile.in head/contrib/bind9/README head/contrib/bind9/aclocal.m4 head/contrib/bind9/bin/Makefile.in head/contrib/bind9/bin/check/check-tool.c head/contrib/bind9/bin/check/named-checkconf.c head/contrib/bind9/bin/check/named-checkzone.8 head/contrib/bind9/bin/check/named-checkzone.c head/contrib/bind9/bin/check/named-checkzone.docbook head/contrib/bind9/bin/check/named-checkzone.html head/contrib/bind9/bin/confgen/keygen.c head/contrib/bind9/bin/confgen/rndc-confgen.c head/contrib/bind9/bin/dig/dig.1 head/contrib/bind9/bin/dig/dig.c head/contrib/bind9/bin/dig/dig.docbook head/contrib/bind9/bin/dig/dig.html head/contrib/bind9/bin/dig/dighost.c head/contrib/bind9/bin/dig/host.c head/contrib/bind9/bin/dig/include/dig/dig.h head/contrib/bind9/bin/dnssec/dnssec-keyfromlabel.c head/contrib/bind9/bin/dnssec/dnssec-keygen.c head/contrib/bind9/bin/dnssec/dnssec-revoke.c head/contrib/bind9/bin/dnssec/dnssec-settime.c head/contrib/bind9/bin/dnssec/dnssec-signzone.c head/contrib/bind9/bin/named/Makefile.in head/contrib/bind9/bin/named/client.c head/contrib/bind9/bin/named/config.c head/contrib/bind9/bin/named/control.c head/contrib/bind9/bin/named/controlconf.c head/contrib/bind9/bin/named/include/named/client.h head/contrib/bind9/bin/named/include/named/globals.h head/contrib/bind9/bin/named/include/named/server.h head/contrib/bind9/bin/named/interfacemgr.c head/contrib/bind9/bin/named/log.c head/contrib/bind9/bin/named/logconf.c head/contrib/bind9/bin/named/lwresd.c head/contrib/bind9/bin/named/main.c head/contrib/bind9/bin/named/named.conf.5 head/contrib/bind9/bin/named/named.conf.docbook head/contrib/bind9/bin/named/named.conf.html head/contrib/bind9/bin/named/query.c head/contrib/bind9/bin/named/server.c head/contrib/bind9/bin/named/statschannel.c head/contrib/bind9/bin/named/tkeyconf.c head/contrib/bind9/bin/named/tsigconf.c head/contrib/bind9/bin/named/unix/dlz_dlopen_driver.c head/contrib/bind9/bin/named/update.c head/contrib/bind9/bin/named/xfrout.c head/contrib/bind9/bin/named/zoneconf.c head/contrib/bind9/bin/nsupdate/nsupdate.c head/contrib/bind9/bin/rndc/rndc.c head/contrib/bind9/bin/tools/genrandom.c head/contrib/bind9/bin/tools/isc-hmac-fixup.8 head/contrib/bind9/bin/tools/isc-hmac-fixup.docbook head/contrib/bind9/bin/tools/isc-hmac-fixup.html head/contrib/bind9/config.h.in head/contrib/bind9/config.threads.in head/contrib/bind9/configure.in head/contrib/bind9/doc/arm/Bv9ARM-book.xml head/contrib/bind9/doc/arm/Bv9ARM.ch01.html head/contrib/bind9/doc/arm/Bv9ARM.ch02.html head/contrib/bind9/doc/arm/Bv9ARM.ch03.html head/contrib/bind9/doc/arm/Bv9ARM.ch04.html head/contrib/bind9/doc/arm/Bv9ARM.ch05.html head/contrib/bind9/doc/arm/Bv9ARM.ch06.html head/contrib/bind9/doc/arm/Bv9ARM.ch07.html head/contrib/bind9/doc/arm/Bv9ARM.ch08.html head/contrib/bind9/doc/arm/Bv9ARM.ch09.html head/contrib/bind9/doc/arm/Bv9ARM.ch10.html head/contrib/bind9/doc/arm/Bv9ARM.html head/contrib/bind9/doc/arm/Bv9ARM.pdf head/contrib/bind9/doc/arm/man.arpaname.html head/contrib/bind9/doc/arm/man.ddns-confgen.html head/contrib/bind9/doc/arm/man.dig.html head/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html head/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html head/contrib/bind9/doc/arm/man.dnssec-keygen.html head/contrib/bind9/doc/arm/man.dnssec-revoke.html head/contrib/bind9/doc/arm/man.dnssec-settime.html head/contrib/bind9/doc/arm/man.dnssec-signzone.html head/contrib/bind9/doc/arm/man.genrandom.html head/contrib/bind9/doc/arm/man.host.html head/contrib/bind9/doc/arm/man.isc-hmac-fixup.html head/contrib/bind9/doc/arm/man.named-checkconf.html head/contrib/bind9/doc/arm/man.named-checkzone.html head/contrib/bind9/doc/arm/man.named-journalprint.html head/contrib/bind9/doc/arm/man.named.html head/contrib/bind9/doc/arm/man.nsec3hash.html head/contrib/bind9/doc/arm/man.nsupdate.html head/contrib/bind9/doc/arm/man.rndc-confgen.html head/contrib/bind9/doc/arm/man.rndc.conf.html head/contrib/bind9/doc/arm/man.rndc.html head/contrib/bind9/doc/arm/pkcs11.xml head/contrib/bind9/doc/misc/options head/contrib/bind9/isc-config.sh.in head/contrib/bind9/lib/Makefile.in head/contrib/bind9/lib/bind9/Makefile.in head/contrib/bind9/lib/bind9/api head/contrib/bind9/lib/bind9/check.c head/contrib/bind9/lib/dns/Makefile.in head/contrib/bind9/lib/dns/acache.c head/contrib/bind9/lib/dns/adb.c head/contrib/bind9/lib/dns/api head/contrib/bind9/lib/dns/cache.c head/contrib/bind9/lib/dns/client.c head/contrib/bind9/lib/dns/db.c head/contrib/bind9/lib/dns/dispatch.c head/contrib/bind9/lib/dns/dlz.c head/contrib/bind9/lib/dns/dnssec.c head/contrib/bind9/lib/dns/dst_api.c head/contrib/bind9/lib/dns/dst_internal.h head/contrib/bind9/lib/dns/dst_openssl.h head/contrib/bind9/lib/dns/ecdb.c head/contrib/bind9/lib/dns/gen.c head/contrib/bind9/lib/dns/gssapictx.c head/contrib/bind9/lib/dns/include/dns/acache.h head/contrib/bind9/lib/dns/include/dns/db.h head/contrib/bind9/lib/dns/include/dns/message.h head/contrib/bind9/lib/dns/include/dns/name.h head/contrib/bind9/lib/dns/include/dns/ncache.h head/contrib/bind9/lib/dns/include/dns/nsec.h head/contrib/bind9/lib/dns/include/dns/nsec3.h head/contrib/bind9/lib/dns/include/dns/rdata.h head/contrib/bind9/lib/dns/include/dns/result.h head/contrib/bind9/lib/dns/include/dns/rpz.h head/contrib/bind9/lib/dns/include/dns/types.h head/contrib/bind9/lib/dns/include/dns/validator.h head/contrib/bind9/lib/dns/include/dns/view.h head/contrib/bind9/lib/dns/include/dns/zone.h head/contrib/bind9/lib/dns/include/dst/dst.h head/contrib/bind9/lib/dns/master.c head/contrib/bind9/lib/dns/message.c head/contrib/bind9/lib/dns/name.c head/contrib/bind9/lib/dns/ncache.c head/contrib/bind9/lib/dns/nsec.c head/contrib/bind9/lib/dns/nsec3.c head/contrib/bind9/lib/dns/openssl_link.c head/contrib/bind9/lib/dns/openssldsa_link.c head/contrib/bind9/lib/dns/opensslecdsa_link.c head/contrib/bind9/lib/dns/opensslgost_link.c head/contrib/bind9/lib/dns/opensslrsa_link.c head/contrib/bind9/lib/dns/peer.c head/contrib/bind9/lib/dns/rbt.c head/contrib/bind9/lib/dns/rbtdb.c head/contrib/bind9/lib/dns/rdata.c head/contrib/bind9/lib/dns/rdata/any_255/tsig_250.c head/contrib/bind9/lib/dns/rdata/generic/dlv_32769.c head/contrib/bind9/lib/dns/rdata/generic/mx_15.c head/contrib/bind9/lib/dns/rdata/generic/sshfp_44.c head/contrib/bind9/lib/dns/rdata/generic/txt_16.c head/contrib/bind9/lib/dns/rdata/in_1/naptr_35.c head/contrib/bind9/lib/dns/rdata/in_1/nsap_22.c head/contrib/bind9/lib/dns/request.c head/contrib/bind9/lib/dns/resolver.c head/contrib/bind9/lib/dns/result.c head/contrib/bind9/lib/dns/rootns.c head/contrib/bind9/lib/dns/rpz.c head/contrib/bind9/lib/dns/sdb.c head/contrib/bind9/lib/dns/sdlz.c head/contrib/bind9/lib/dns/spnego.c head/contrib/bind9/lib/dns/spnego_asn1.c head/contrib/bind9/lib/dns/ssu.c head/contrib/bind9/lib/dns/ssu_external.c head/contrib/bind9/lib/dns/tkey.c head/contrib/bind9/lib/dns/tsig.c head/contrib/bind9/lib/dns/validator.c head/contrib/bind9/lib/dns/view.c head/contrib/bind9/lib/dns/xfrin.c head/contrib/bind9/lib/dns/zone.c head/contrib/bind9/lib/export/dns/Makefile.in head/contrib/bind9/lib/export/irs/Makefile.in head/contrib/bind9/lib/export/isc/Makefile.in head/contrib/bind9/lib/export/isc/include/isc/Makefile.in head/contrib/bind9/lib/export/isc/nls/Makefile.in head/contrib/bind9/lib/export/isc/nothreads/Makefile.in head/contrib/bind9/lib/export/isc/pthreads/Makefile.in head/contrib/bind9/lib/export/isc/unix/Makefile.in head/contrib/bind9/lib/export/isccfg/Makefile.in head/contrib/bind9/lib/export/samples/Makefile.in head/contrib/bind9/lib/export/samples/nsprobe.c head/contrib/bind9/lib/export/samples/sample-async.c head/contrib/bind9/lib/export/samples/sample-gai.c head/contrib/bind9/lib/export/samples/sample-request.c head/contrib/bind9/lib/export/samples/sample-update.c head/contrib/bind9/lib/export/samples/sample.c head/contrib/bind9/lib/irs/api head/contrib/bind9/lib/irs/dnsconf.c head/contrib/bind9/lib/irs/getaddrinfo.c head/contrib/bind9/lib/irs/getnameinfo.c head/contrib/bind9/lib/irs/resconf.c head/contrib/bind9/lib/isc/Makefile.in head/contrib/bind9/lib/isc/api head/contrib/bind9/lib/isc/buffer.c head/contrib/bind9/lib/isc/include/isc/Makefile.in head/contrib/bind9/lib/isc/include/isc/buffer.h head/contrib/bind9/lib/isc/include/isc/file.h head/contrib/bind9/lib/isc/include/isc/list.h head/contrib/bind9/lib/isc/include/isc/mem.h head/contrib/bind9/lib/isc/include/isc/namespace.h head/contrib/bind9/lib/isc/include/isc/region.h head/contrib/bind9/lib/isc/include/isc/sockaddr.h head/contrib/bind9/lib/isc/include/isc/socket.h head/contrib/bind9/lib/isc/include/isc/task.h head/contrib/bind9/lib/isc/include/isc/timer.h head/contrib/bind9/lib/isc/inet_aton.c head/contrib/bind9/lib/isc/mem.c head/contrib/bind9/lib/isc/nothreads/Makefile.in head/contrib/bind9/lib/isc/parseint.c head/contrib/bind9/lib/isc/pthreads/thread.c head/contrib/bind9/lib/isc/ratelimiter.c head/contrib/bind9/lib/isc/sockaddr.c head/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h head/contrib/bind9/lib/isc/symtab.c head/contrib/bind9/lib/isc/task.c head/contrib/bind9/lib/isc/taskpool.c head/contrib/bind9/lib/isc/timer.c head/contrib/bind9/lib/isc/timer_api.c head/contrib/bind9/lib/isc/unix/entropy.c head/contrib/bind9/lib/isc/unix/file.c head/contrib/bind9/lib/isc/unix/include/isc/time.h head/contrib/bind9/lib/isc/unix/net.c head/contrib/bind9/lib/isc/unix/socket.c head/contrib/bind9/lib/isc/unix/time.c head/contrib/bind9/lib/isccc/api head/contrib/bind9/lib/isccc/cc.c head/contrib/bind9/lib/isccfg/Makefile.in head/contrib/bind9/lib/isccfg/aclconf.c head/contrib/bind9/lib/isccfg/api head/contrib/bind9/lib/isccfg/include/isccfg/cfg.h head/contrib/bind9/lib/isccfg/namedconf.c head/contrib/bind9/lib/isccfg/parser.c head/contrib/bind9/lib/lwres/api head/contrib/bind9/lib/lwres/context.c head/contrib/bind9/lib/lwres/getaddrinfo.c head/contrib/bind9/lib/lwres/getipnode.c head/contrib/bind9/lib/lwres/getnameinfo.c head/contrib/bind9/lib/lwres/getrrset.c head/contrib/bind9/lib/lwres/lwinetaton.c head/contrib/bind9/lib/lwres/print.c head/contrib/bind9/ltmain.sh head/contrib/bind9/make/rules.in head/contrib/bind9/version head/lib/bind/config.h head/lib/bind/dns/code.h head/lib/bind/dns/dns/enumtype.h head/lib/bind/dns/dns/rdatastruct.h head/lib/bind/isc/Makefile head/usr.sbin/named/Makefile Directory Properties: head/contrib/bind9/ (props changed) Modified: head/contrib/bind9/CHANGES ============================================================================== --- head/contrib/bind9/CHANGES Tue Aug 6 06:04:55 2013 (r253982) +++ head/contrib/bind9/CHANGES Tue Aug 6 06:22:54 2013 (r253983) @@ -1,20 +1,392 @@ - --- 9.8.4-P2 released --- + --- 9.8.5-P2 released --- -3516. [security] Removed the check for regex.h in configure in order - to disable regex syntax checking, as it exposes - BIND to a critical flaw in libregex on some - platforms. [RT #32688] +3621. [security] Incorrect bounds checking on private type 'keydata' + can lead to a remotely triggerable REQUIRE failure + (CVE-2013-4854). [RT #34238] - --- 9.8.4-P1 released --- + --- 9.8.5-P1 released --- -3407. [security] Named could die on specific queries with dns64 enabled. - [Addressed in change #3388 for BIND 9.8.5 and 9.9.3.] +3584. [security] Caching data from an incompletely signed zone could + trigger an assertion failure in resolver.c [RT #33690] - --- 9.8.4 released --- + --- 9.8.5 released --- + +3568. [cleanup] Add a product description line to the version file, + to be reported by named -v/-V. [RT #33366] + +3567. [bug] Silence clang static analyzer warnings. [RT #33365] + +3563. [contrib] zone2sqlite failed with some table names. [RT #33375] + +3561. [bug] dig: issue a warning if an EDNS query returns FORMERR + or NOTIMP. Adjust usage message. [RT #33363] + + --- 9.8.5rc1 released --- + +3560. [bug] isc-config.sh did not honor includedir and libdir + when set via configure. [RT #33345] + +3559. [func] Check that both forms of Sender Policy Framework + records exist or do not exist. [RT #33355] + +3558. [bug] IXFR of a DLZ stored zone was broken. [RT #33331] + +3556. [maint] Added AAAA for D.ROOT-SERVERS.NET. + +3555. [bug] Address theoretical race conditions in acache.c + (change #3553 was incomplete). [RT #33252] + +3553. [bug] Address suspected double free in acache. [RT #33252] + +3552. [bug] Wrong getopt option string for 'nsupdate -r'. + [RT #33280] + +3549. [doc] Documentation for "request-nsid" was missing. + [RT #33153] + +3548. [bug] The NSID request code in resolver.c was broken + resulting in invalid EDNS options being sent. + [RT #33153] + +3547. [bug] Some malformed unknown rdata records were not properly + detected and rejected. [RT #33129] + +3056. [func] Added support for URI resource record. [RT #23386] + + --- 9.8.5rc1 released --- + +3546. [func] Add EUI48 and EUI64 types. [RT #33082] + +3544. [contrib] check5011.pl: Script to report the status of + managed keys as recorded in managed-keys.bind. + Contributed by Tony Finch + +3543. [bug] Update socket structure before attaching to socket + manager after accept. [RT #33084] + +3542. [bug] masterformat system test was broken. [RT #33086] + +3541. [bug] Parts of libdns were not properly initialized when + built in libexport mode. [RT #33028] + +3540. [test] libt_api: t_info and t_assert were not thread safe. + +3539. [port] win32: timestamp format didn't match other platforms. + +3538. [test] Running "make test" now requires loopback interfaces + to be set up. [RT #32452] + +3537. [tuning] Slave zones, when updated, now send NOTIFY messages + to peers before being dumped to disk rather than + after. [RT #27242] + +3535. [bug] Minor win32 cleanups. [RT #32962] + +3534. [bug] Extra text after an embedded NULL was ignored when + parsing zone files. [RT #32699] + +3533. [contrib] query-loc-0.4.0: memory leaks. [RT #32960] + +3532. [contrib] zkt: fixed buffer overrun, resource leaks. [RT #32960] + +3531. [bug] win32: A uninitialized value could be returned on out + of memory. [RT #32960] + +3530. [contrib] Better RTT tracking in queryperf. [RT #30128] + +3526. [cleanup] Set up dependencies for unit tests correctly during + build. [RT #32803] + +3521. [bug] Address memory leak in opensslecdsa_link.c. [RT #32249] + +3520. [bug] 'mctx' was not being referenced counted in some places + where it should have been. [RT #32794] + + --- 9.8.5b2 released --- + +3517. [bug] Reorder destruction to avoid shutdown race. [RT #32777] + +3515. [port] '%T' is not portable in strftime(). [RT #32763] + +3514. [bug] The ranges for valid key sizes in ddns-confgen and + rndc-confgen were too constrained. Keys up to 512 + bits are now allowed for most algorithms, and up + to 1024 bits for hmac-sha384 and hmac-sha512. + [RT #32753] + +3509. [cleanup] Added a product line to version file to allow for + easy naming of different products (BIND + vs BIND ESV, for example). [RT #32755] + +3508. [contrib] queryperf was incorrectly rejecting the -T option. + [RT #32338] + +3503. [doc] Clarify size_spec syntax. [RT #32449] + +3500. [security] Support NAPTR regular expression validation on + all platforms without using libregex, which + can be vulnerable to memory exhaustion attack + (CVE-2013-2266). [RT #32688] + +3499. [doc] Corrected ARM documentation of built-in zones. + [RT #32694] + +3498. [bug] zone statistics for zones which matched a potential + empty zone could have their zone-statistics setting + overridden. + +3496. [func] Improvements to RPZ performance. The "response-policy" + syntax now includes a "min-ns-dots" clause, with + default 1, to exclude top-level domains from + NSIP and NSDNAME checking. --enable-rpz-nsip and + --enable-rpz-nsdname are now the default. [RT #32251] + +3489. [bug] --enable-developer now turns on ISC_LIST_CHECKINIT. + When cloning a rdataset do not copy the link contents. + [RT #32651] + +3488. [bug] Use after free error with DH generated keys. [RT #32649] + +3487. [bug] Change 3444 was not complete. There was a additional + place where the NOQNAME proof needed to be saved. + [RT #32629] + +3486. [bug] named could crash when using TKEY-negotiated keys + that had been deleted and then recreated. [RT #32506] + +3485. [cleanup] Only compile openssl_gostlink.c if we support GOST. + +3481. [cleanup] Removed use of const const in atf. + +3479. [bug] Address potential memory leaks in gssapi support + code. [RT #32405] + +3478. [port] Fix a build failure in strict C99 environments + [RT #32475] + +3474. [bug] nsupdate could assert when the local and remote + address families didn't match. [RT #22897] + +3470. [bug] Slave zones could fail to dump when successfully + refreshing after an initial failure. [RT #31276] + + --- 9.8.5b1 released --- + +3468. [security] RPZ rules to generate A records (but not AAAA records) + could trigger an assertion failure when used in + conjunction with DNS64 (CVE-2012-5689). [RT #32141] + +3467. [bug] Added checks in dnssec-keygen and dnssec-settime + to check for delete date < inactive date. [RT #31719] + +3465. [bug] Handle isolated reserved ports. [RT #31778] + +3464. [maint] Updates to PKCS#11 openssl patches, supporting + versions 0.9.8x, 1.0.0j, 1.0.1c [RT #29749] + +3463. [doc] Clarify managed-keys syntax in ARM. [RT #32232] + +3462. [doc] Clarify server selection behavior of dig when using + -4 or -6 options. [RT #32181] + +3461. [bug] Negative responses could incorrectly have AD=1 + set. [RT #32237] + +3458. [bug] Return FORMERR when presented with a overly long + domain named in a request. [RT #29682] + +3457. [protocol] Add ILNP records (NID, LP, L32, L64). [RT #31836] + +3456. [port] g++47: ATF failed to compile. [RT #32012] + +3455. [contrib] queryperf: fix getopt option list. [RT #32338] + +3454. [port] sparc64: improve atomic support. [RT #25182] + +3452. [bug] Accept duplicate singleton records. [RT #32329] + +3451. [port] Increase per thread stack size from 64K to 1M. + [RT #32230] + +3450. [bug] Stop logfileconfig system test spam system logs. + [RT #32315] + +3449. [bug] gen.c: use the pre-processor to construct format + strings so that compiler can perform sanity checks; + check the snprintf results. [RT #17576] + +3448. [bug] The allow-query-on ACL was not processed correctly. + [RT #29486] + +3447. [port] Add support for libxml2-2.9.x [RT #32231] + +3446. [port] win32: Add source ID (see change #3400) to build. + [RT #31683] + +3445. [bug] Warn about zone files with blank owner names + immediately after $ORIGIN directives. [RT #31848] + +3444. [bug] The NOQNAME proof was not being returned from cached + insecure responses. [RT #21409] + +3443. [bug] ddns-confgen: Some TSIG algorithms were incorrectly + rejected when generating keys. [RT #31927] + +3442. [port] Net::DNS 0.69 introduced a non backwards compatible + change. [RT #32216] + +3441. [maint] D.ROOT-SERVERS.NET is now 199.7.91.13. + +3440. [bug] Reorder get_key_struct to not trigger a assertion when + cleaning up due to out of memory error. [RT #32131] + +3439. [bug] contrib/dlz error checking fixes. [RT #32102] + +3438. [bug] Don't accept unknown data escape in quotes. [RT #32031] + +3437. [bug] isc_buffer_init -> isc_buffer_constinit to initialize + buffers with constant data. [RT #32064] + +3436. [bug] Check malloc/calloc return values. [RT #32088] + +3435. [bug] Cross compilation support in configure was broken. + [RT #32078] + +3431. [bug] ddns-confgen: Some valid key algorithms were + not accepted. [RT #31927] + +3430. [bug] win32: isc_time_formatISO8601 was missing the + 'T' between the date and time. [RT #32044] + +3429. [bug] dns_zone_getserial2 could a return success without + returning a valid serial. [RT #32007] + +3428. [cleanup] dig: Add timezone to date output. [RT #2269] + +3427. [bug] dig +trace incorrectly displayed name server + addresses instead of names. [RT #31641] + +3425. [bug] "acacheentry" reference counting was broken resulting + in use after free. [RT #31908] + +3422. [bug] Added a clear error message for when the SOA does not + match the referral. [RT #31281] + +3421. [bug] Named loops when re-signing if all keys are offline. + [RT #31916] + +3420. [bug] Address VPATH compilation issues. [RT #31879] + +3419. [bug] Memory leak on validation cancel. [RT #31869] + +3415. [bug] named could die with a REQUIRE failure if a validation + was canceled. [RT #31804] + +3412. [bug] Copy timeval structure from control message data. + [RT #31548] + +3411. [tuning] Use IPV6_USE_MIN_MTU or equivalent with TCP in addition + to UDP. [RT #31690] + +3410. [bug] Addressed Coverity warnings. [RT #31626] + +3409. [contrib] contrib/dane/mkdane.sh: Tool to generate TLSA RR's + from X.509 certificates, for use with DANE + (DNS-based Authentication of Named Entities). + [RT #30513] + +3406. [bug] mem.c: Fix compilation errors when building with + ISC_MEM_TRACKLINES or ISC_MEMPOOL_NAMES disabled. + Also, ISC_MEM_DEBUG is no longer optional. [RT #31559] + +3405. [bug] Handle time going backwards in acache. [RT #31253] + +3404. [bug] dnssec-signzone: When re-signing a zone, remove + RRSIG and NSEC records from nodes that used to be + in-zone but are now below a zone cut. [RT #31556] + +3403. [bug] Silence noisy OpenSSL logging. [RT #31497] + +3402. [test] The IPv6 interface numbers used for system + tests were incorrect on some platforms. [RT #25085] + +3401. [bug] Addressed Coverity warnings. [RT #31484] + +3400. [cleanup] "named -V" can now report a source ID string, defined + in the "srcid" file in the build tree and normally set + to the most recent git hash. [RT #31494] + +3397. [bug] dig crashed when using +nssearch with +tcp. [RT #25298] + +3396. [bug] OPT records were incorrectly removed from signed, + truncated responses. [RT #31439] + +3395. [protocol] Add RFC 6598 reverse zones to built in empty zones + list, 64.100.IN-ADDR.ARPA ... 127.100.IN-ADDR.ARPA. + [RT #31336] + +3394. [bug] Adjust 'successfully validated after lower casing + signer' log level and category. [RT #31414] + +3393. [bug] 'host -C' could core dump if REFUSED was received. + [RT #31381] + +3391. [bug] A DNSKEY lookup that encountered a CNAME failed. + [RT #31262] + +3390. [bug] Silence clang compiler warnings. [RT #30417] + +3389. [bug] Always return NOERROR (not 0) in TSIG. [RT #31275] + +3388. [bug] Fixed several Coverity warnings. + Note: This change includes a fix for a bug that + was subsequently determined to be an exploitable + security vulnerability, CVE-2012-5688: named could + die on specific queries with dns64 enabled. + [RT #30996] + +3386. [bug] Address locking violation when generating new NSEC / + NSEC3 chains. [RT #31224] + +3384. [bug] Improved logging of crypto errors. [RT #30963] 3383. [security] A certain combination of records in the RBT could - cause named to hang while populating the additional - section of a response. [RT #31090] + cause named to hang while populating the additional + section of a response. [RT #31090] + +3382. [bug] SOA query from slave used use-v6-udp-ports range, + if set, regardless of the address family in use. + [RT #24173] + +3381. [contrib] Update queryperf to support more RR types. + [RT #30762] + +3380. [bug] named could die if a nonexistent master list was + referenced in a also-notify. [RT #31004] + +3379. [bug] isc_interval_zero and isc_time_epoch should be + "const (type)* const". [RT #31069] + +3378. [bug] Handle missing 'managed-keys-directory' better. + [RT #30625] + +3376. [bug] Lack of EDNS support was being recorded without a + successful response. [RT #30811] + +3375. [func] Check that 'rndc dumpdb' works on a empty cache. + [RT #30808] + +3374. [bug] isc_parse_uint32 failed to return a range error on + systems with 64 bit longs. [RT #30232] + +3372. [bug] Silence spurious "deleted from unreachable cache" + messages. [RT #30501] + +3371. [bug] AD=1 should behave like DO=1 when deciding whether to + add NS RRsets to the additional section or not. + [RT #30479] + + --- 9.8.4 released --- 3373. [bug] win32: open raw files in binary mode. [RT #30944] @@ -135,11 +507,11 @@ --- 9.8.3 released --- 3318. [tuning] Reduce the amount of work performed while holding a - bucket lock when finshed with a fetch context. + bucket lock when finished with a fetch context. [RT #29239] -3314. [bug] The masters list could be updated while refesh_callback - and stub_callback were using it. [RT #26732] +3314. [bug] The masters list could be updated while stub_callback + or refresh_callback were using it. [RT #26732] 3313. [protocol] Add TLSA record type. [RT #28989] @@ -151,7 +523,7 @@ 3310. [test] Increase table size for mutex profiling. [RT #28809] -3309. [bug] resolver.c:fctx_finddone() was not threadsafe. +3309. [bug] resolver.c:fctx_finddone() was not thread safe. [RT #27995] 3307. [bug] Add missing ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS. @@ -328,7 +700,7 @@ 3234. [bug] 'make depend' produced invalid makefiles. [RT #26830] -3231. [bug] named could fail to send a uncompressable zone. +3231. [bug] named could fail to send a incompressible zone. [RT #26796] 3230. [bug] 'dig axfr' failed to properly handle a multi-message @@ -345,7 +717,7 @@ 3226. [bug] Address minor resource leakages. [RT #26624] -3221. [bug] Fixed a potential coredump on shutdown due to +3221. [bug] Fixed a potential core dump on shutdown due to referencing fetch context after it's been freed. [RT #26720] @@ -369,7 +741,7 @@ 3209. [func] Add "dnssec-lookaside 'no'". [RT #24858] -3208. [bug] 'dig -y' handle unknown tsig alorithm better. +3208. [bug] 'dig -y' handle unknown tsig algorithm better. [RT #25522] 3207. [contrib] Fixed build error in Berkeley DB DLZ module. [RT #26444] @@ -672,7 +1044,7 @@ 3077. [bug] zone.c:zone_refreshkeys() incorrectly called dns_zone_attach(), use zone->irefs instead. [RT #23303] -3075. [bug] dns_dnssec_findzonekeys{2} used a inconsistant +3075. [bug] dns_dnssec_findzonekeys{2} used a inconsistent timestamp when determining which keys are active. [RT #23642] @@ -686,7 +1058,7 @@ 3072. [bug] dns_dns64_aaaaok() potential NULL pointer dereference. [RT #20256] -3071. [bug] has_nsec could be used unintialised in +3071. [bug] has_nsec could be used uninitialized in update.c:next_active. [RT #20256] 3070. [bug] dnssec-signzone potential NULL pointer dereference. @@ -732,7 +1104,7 @@ 3052. [test] Fixed last autosign test report. [RT #23256] -3051. [bug] NS records obsure DNAME records at the bottom of the +3051. [bug] NS records obscure DNAME records at the bottom of the zone if both are present. [RT #23035] 3050. [bug] The autosign system test was timing dependent. @@ -742,7 +1114,7 @@ 3049. [bug] Save and restore the gid when creating creating named.pid at startup. [RT #23290] -3048. [bug] Fully separate view key mangement. [RT #23419] +3048. [bug] Fully separate view key management. [RT #23419] 3047. [bug] DNSKEY NODATA responses not cached fixed in validator.c. Tests added to dnssec system test. @@ -1079,7 +1451,7 @@ no data response. [RT #21744] 2952. [port] win32: named-checkzone and named-checkconf failed - to initialise winsock. [RT #21932] + to initialize winsock. [RT #21932] 2951. [bug] named failed to generate a correct signed response in a optout, delegation only zone with no secure @@ -1125,7 +1497,7 @@ in use. [RT# 21868] 2938. [bug] When generating signed responses, from a signed zone - that uses NSEC3, named would use a uninitialised + that uses NSEC3, named would use a uninitialized pointer if it needed to skip a NSEC3 record because it didn't match the selected NSEC3PARAM record for zone. [RT# 21868] @@ -1179,7 +1551,7 @@ revisit the issue and complete the fix later. [RT #21710] -2930. [experimental] New "rndc addzone" and "rndc delzone" commads +2930. [experimental] New "rndc addzone" and "rndc delzone" commands allow dynamic addition and deletion of zones. To enable this feature, specify a "new-zone-file" option at the view or options level in named.conf. @@ -1355,7 +1727,7 @@ successfully responds to the query using plain DNS. [RT #20930] -2873. [bug] Cancelling a dynamic update via the dns/client module +2873. [bug] Canceling a dynamic update via the dns/client module could trigger an assertion failure. [RT #21133] 2872. [bug] Modify dns/client.c:dns_client_createx() to only @@ -1397,7 +1769,7 @@ 2860. [bug] named-checkconf's usage was out of date. [RT #21039] -2859. [bug] When cancelling validation it was possible to leak +2859. [bug] When canceling validation it was possible to leak memory. [RT #20800] 2858. [bug] RTT estimates were not being adjusted on ICMP errors. @@ -1950,7 +2322,7 @@ 2695. [func] DHCP/DDNS - update fdwatch code for use by DHCP. Modify the api to isc_sockfdwatch_t (the - callback functon for isc_socket_fdwatchcreate) + callback function for isc_socket_fdwatchcreate) to include information about the direction (read or write) and add isc_socket_fdwatchpoke. [RT #20253] @@ -2015,7 +2387,7 @@ sets the time when a key is no longer used for signing but is still published. - The "unpublished" date (-U) is deprecated in - favour of "deleted" (-D). + favor of "deleted" (-D). [RT #20247] 2676. [bug] --with-export-installdir should have been @@ -2461,7 +2833,7 @@ 2553. [bug] Reference leak on DNSSEC validation errors. [RT #19291] -2552. [bug] zero-no-soa-ttl-cache was not being honoured. +2552. [bug] zero-no-soa-ttl-cache was not being honored. [RT #19340] 2551. [bug] Potential Reference leak on return. [RT #19341] @@ -2514,7 +2886,7 @@ 2534. [func] Check NAPTR records regular expressions and replacement strings to ensure they are syntactically - valid and consistant. [RT #18168] + valid and consistent. [RT #18168] 2533. [doc] ARM: document @ (at-sign). [RT #17144] Modified: head/contrib/bind9/COPYRIGHT ============================================================================== --- head/contrib/bind9/COPYRIGHT Tue Aug 6 06:04:55 2013 (r253982) +++ head/contrib/bind9/COPYRIGHT Tue Aug 6 06:22:54 2013 (r253983) @@ -1,4 +1,4 @@ -Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC") +Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 1996-2003 Internet Software Consortium. Permission to use, copy, modify, and/or distribute this software for any Modified: head/contrib/bind9/FAQ ============================================================================== --- head/contrib/bind9/FAQ Tue Aug 6 06:04:55 2013 (r253982) +++ head/contrib/bind9/FAQ Tue Aug 6 06:22:54 2013 (r253983) @@ -1,6 +1,6 @@ Frequently Asked Questions about BIND 9 -Copyright © 2004-2010 Internet Systems Consortium, Inc. ("ISC") +Copyright © 2004-2010, 2013 Internet Systems Consortium, Inc. ("ISC") Copyright © 2000-2003 Internet Software Consortium. @@ -869,7 +869,7 @@ A: If you run Tiger(Mac OS 10.4) or late Copy the key statement from /etc/rndc.conf into /etc/rndc.key, e.g.: key "rndc-key" { - algorithm hmac-md5; + algorithm hmac-sha256; secret "uvceheVuqf17ZwIcTydddw=="; }; Modified: head/contrib/bind9/FAQ.xml ============================================================================== --- head/contrib/bind9/FAQ.xml Tue Aug 6 06:04:55 2013 (r253982) +++ head/contrib/bind9/FAQ.xml Tue Aug 6 06:22:54 2013 (r253983) @@ -1,7 +1,7 @@