From owner-svn-src-stable-8@FreeBSD.ORG Sun Feb 13 10:22:43 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAF52106566C; Sun, 13 Feb 2011 10:22:43 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98E8C8FC0A; Sun, 13 Feb 2011 10:22:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1DAMhGS033883; Sun, 13 Feb 2011 10:22:43 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1DAMhmk033881; Sun, 13 Feb 2011 10:22:43 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201102131022.p1DAMhmk033881@svn.freebsd.org> From: "Simon L. Nielsen" Date: Sun, 13 Feb 2011 10:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218633 - stable/8/crypto/openssl/ssl X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2011 10:22:43 -0000 Author: simon Date: Sun Feb 13 10:22:43 2011 New Revision: 218633 URL: http://svn.freebsd.org/changeset/base/218633 Log: MFC 218625: Fix Incorrectly formatted ClientHello SSL/TLS handshake messages could cause OpenSSL to parse past the end of the message. Note: Applications are only affected if they act as a server and call SSL_CTX_set_tlsext_status_cb on the server's SSL_CTX. This includes Apache httpd >= 2.3.3, if configured with "SSLUseStapling On". The very quick MFC is done to get this fix into 7.4 / 8.2. Discussed with: re Approved by: so (simon, for "instant" MFC) Obtained from: OpenSSL CVS Security: http://www.openssl.org/news/secadv_20110208.txt Security: CVE-2011-0014 Modified: stable/8/crypto/openssl/ssl/t1_lib.c Directory Properties: stable/8/crypto/openssl/ (props changed) Modified: stable/8/crypto/openssl/ssl/t1_lib.c ============================================================================== --- stable/8/crypto/openssl/ssl/t1_lib.c Sun Feb 13 08:54:47 2011 (r218632) +++ stable/8/crypto/openssl/ssl/t1_lib.c Sun Feb 13 10:22:43 2011 (r218633) @@ -521,6 +521,7 @@ int ssl_parse_clienthello_tlsext(SSL *s, } n2s(data, idsize); dsize -= 2 + idsize; + size -= 2 + idsize; if (dsize < 0) { *al = SSL_AD_DECODE_ERROR; @@ -559,9 +560,14 @@ int ssl_parse_clienthello_tlsext(SSL *s, } /* Read in request_extensions */ + if (size < 2) + { + *al = SSL_AD_DECODE_ERROR; + return 0; + } n2s(data,dsize); size -= 2; - if (dsize > size) + if (dsize != size) { *al = SSL_AD_DECODE_ERROR; return 0; From owner-svn-src-stable-8@FreeBSD.ORG Sun Feb 13 15:15:47 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA7E8106566B; Sun, 13 Feb 2011 15:15:47 +0000 (UTC) (envelope-from jpaetzel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A851E8FC18; Sun, 13 Feb 2011 15:15:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1DFFlWd042741; Sun, 13 Feb 2011 15:15:47 GMT (envelope-from jpaetzel@svn.freebsd.org) Received: (from jpaetzel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1DFFlAa042739; Sun, 13 Feb 2011 15:15:47 GMT (envelope-from jpaetzel@svn.freebsd.org) Message-Id: <201102131515.p1DFFlAa042739@svn.freebsd.org> From: Josh Paetzel Date: Sun, 13 Feb 2011 15:15:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218643 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2011 15:15:47 -0000 Author: jpaetzel Date: Sun Feb 13 15:15:47 2011 New Revision: 218643 URL: http://svn.freebsd.org/changeset/base/218643 Log: MFC 218523: Netgear renamed the WG311 to the WG311v1 after they released a second version of it. There is also a WG311v3 which uses a chipset covered by malo(4). Along the way add the WG311T to the list which is also an atheros chipset. Approved by: kib (mentor) Modified: stable/8/share/man/man4/ath_hal.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ath_hal.4 ============================================================================== --- stable/8/share/man/man4/ath_hal.4 Sun Feb 13 15:14:13 2011 (r218642) +++ stable/8/share/man/man4/ath_hal.4 Sun Feb 13 15:15:47 2011 (r218643) @@ -109,7 +109,9 @@ module: .It "Netgear WAG311 AR5212 PCI a/b/g" .It "Netgear WAB501 AR5211 CardBus a/b" .It "Netgear WAG511 AR5212 CardBus a/b/g" -.It "Netgear WG311 AR5212 PCI b/g" +.It "Netgear WG311 (aka WG311v1) AR5212 PCI b/g" +.It "Netgear WG311v2 AR5212 PCI b/g" +.It "Netgear WG311T AR5212 PCI b/g" .It "Netgear WG511T AR5212 CardBus b/g" .It "Orinoco 8480 AR5212 CardBus a/b/g" .It "Orinoco 8470WD AR5212 CardBus a/b/g" From owner-svn-src-stable-8@FreeBSD.ORG Sun Feb 13 18:03:30 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5ACB1065679; Sun, 13 Feb 2011 18:03:30 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 93C6B8FC19; Sun, 13 Feb 2011 18:03:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1DI3Ung046518; Sun, 13 Feb 2011 18:03:30 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1DI3UiL046516; Sun, 13 Feb 2011 18:03:30 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201102131803.p1DI3UiL046516@svn.freebsd.org> From: Bruce Cran Date: Sun, 13 Feb 2011 18:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218648 - stable/8/share/man/man9 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2011 18:03:30 -0000 Author: brucec Date: Sun Feb 13 18:03:30 2011 New Revision: 218648 URL: http://svn.freebsd.org/changeset/base/218648 Log: MFC r216156: Document the fact that passing in a count of zero to the bus_space functions will result in undefined behaviour. Taken from NetBSD's bus_space(9). PR: kern/80980 Modified: stable/8/share/man/man9/bus_space.9 Directory Properties: stable/8/share/man/man9/ (props changed) Modified: stable/8/share/man/man9/bus_space.9 ============================================================================== --- stable/8/share/man/man9/bus_space.9 Sun Feb 13 18:00:05 2011 (r218647) +++ stable/8/share/man/man9/bus_space.9 Sun Feb 13 18:03:30 2011 (r218648) @@ -719,6 +719,9 @@ or which return data read from bus space do not obviously return an error code) do not fail. They could only fail if given invalid arguments, and in that case their behaviour is undefined. +Functions which take a count of bytes have undefined results if the specified +.Fa count +is zero. .Sh TYPES Several types are defined in .In machine/bus.h From owner-svn-src-stable-8@FreeBSD.ORG Sun Feb 13 19:02:26 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C892E106566B; Sun, 13 Feb 2011 19:02:26 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6AC58FC12; Sun, 13 Feb 2011 19:02:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1DJ2QmM048430; Sun, 13 Feb 2011 19:02:26 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1DJ2QER048428; Sun, 13 Feb 2011 19:02:26 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201102131902.p1DJ2QER048428@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 13 Feb 2011 19:02:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218656 - stable/8/usr.bin/getopt X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2011 19:02:26 -0000 Author: uqs Date: Sun Feb 13 19:02:26 2011 New Revision: 218656 URL: http://svn.freebsd.org/changeset/base/218656 Log: MFH r217890 Fix typo in example getopt(1) script: $i vs $1 [1] While here apply style hammer. PR: docs/154289 [1] Submitted by: Jamie Landeg Jones Modified: stable/8/usr.bin/getopt/getopt.1 Directory Properties: stable/8/usr.bin/getopt/ (props changed) Modified: stable/8/usr.bin/getopt/getopt.1 ============================================================================== --- stable/8/usr.bin/getopt/getopt.1 Sun Feb 13 18:46:34 2011 (r218655) +++ stable/8/usr.bin/getopt/getopt.1 Sun Feb 13 19:02:26 2011 (r218656) @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.Dd July 7, 2010 +.Dd January 26, 2011 .Dt GETOPT 1 .Os .Sh NAME @@ -55,8 +55,7 @@ which requires an argument. args=\`getopt abo: $*\` # you should not use \`getopt abo: "$@"\` since that would parse # the arguments differently from what the set command below does. -if [ $? -ne 0 ] -then +if [ $? -ne 0 ]; then echo 'Usage: ...' exit 2 fi @@ -64,22 +63,23 @@ set \-\- $args # You cannot use the set command with a backquoted getopt directly, # since the exit code from getopt would be shadowed by those of set, # which is zero by definition. -while true; -do - case "$1" - in - \-a|\-b) - echo flag $i set; sflags="${i#-}$sflags"; - shift;; - \-o) - echo oarg is "'"$2"'"; oarg="$2"; shift; - shift;; - \-\-) - shift; break;; +while true; do + case "$1" in + \-a|\-b) + echo "flag $1 set"; sflags="${1#-}$sflags" + shift + ;; + \-o) + echo "oarg is '$2'"; oarg="$2" + shift; shift + ;; + \-\-) + shift; break + ;; esac done -echo single-char flags: "'"$sflags"'" -echo oarg is "'"$oarg"'" +echo "single-char flags: '$sflags'" +echo "oarg is '$oarg'" .Ed .Pp This code will accept any of the following as equivalent: From owner-svn-src-stable-8@FreeBSD.ORG Sun Feb 13 19:15:42 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FFBA1065670; Sun, 13 Feb 2011 19:15:42 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BB848FC12; Sun, 13 Feb 2011 19:15:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1DJFgFa048932; Sun, 13 Feb 2011 19:15:42 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1DJFgWf048927; Sun, 13 Feb 2011 19:15:42 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201102131915.p1DJFgWf048927@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 13 Feb 2011 19:15:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218659 - in stable/8: contrib/groff/tmac gnu/usr.bin/groff/tmac X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2011 19:15:42 -0000 Author: uqs Date: Sun Feb 13 19:15:42 2011 New Revision: 218659 URL: http://svn.freebsd.org/changeset/base/218659 Log: MFH r217595 Update groff manpage and symbols with what has been submitted upstream. Also remove local overrides that are now in the contrib tree. Modified: stable/8/contrib/groff/tmac/doc-common stable/8/contrib/groff/tmac/doc-syms stable/8/contrib/groff/tmac/groff_mdoc.man stable/8/gnu/usr.bin/groff/tmac/mdoc.local Directory Properties: stable/8/contrib/groff/ (props changed) stable/8/gnu/usr.bin/groff/ (props changed) Modified: stable/8/contrib/groff/tmac/doc-common ============================================================================== --- stable/8/contrib/groff/tmac/doc-common Sun Feb 13 19:07:48 2011 (r218658) +++ stable/8/contrib/groff/tmac/doc-common Sun Feb 13 19:15:42 2011 (r218659) @@ -454,6 +454,39 @@ .ds doc-operating-system-NetBSD-3.1 3.1 .ds doc-operating-system-NetBSD-4.0 4.0 .ds doc-operating-system-NetBSD-4.0.1 4.0.1 +.ds doc-operating-system-NetBSD-5.0 5.0 +.ds doc-operating-system-NetBSD-5.0.1 5.0.1 +.ds doc-operating-system-NetBSD-5.0.2 5.0.2 +. +.ds doc-operating-system-OpenBSD-2.0 2.0 +.ds doc-operating-system-OpenBSD-2.1 2.1 +.ds doc-operating-system-OpenBSD-2.2 2.2 +.ds doc-operating-system-OpenBSD-2.3 2.3 +.ds doc-operating-system-OpenBSD-2.4 2.4 +.ds doc-operating-system-OpenBSD-2.5 2.5 +.ds doc-operating-system-OpenBSD-2.6 2.6 +.ds doc-operating-system-OpenBSD-2.7 2.7 +.ds doc-operating-system-OpenBSD-2.8 2.8 +.ds doc-operating-system-OpenBSD-2.9 2.9 +.ds doc-operating-system-OpenBSD-3.0 3.0 +.ds doc-operating-system-OpenBSD-3.1 3.1 +.ds doc-operating-system-OpenBSD-3.2 3.2 +.ds doc-operating-system-OpenBSD-3.3 3.3 +.ds doc-operating-system-OpenBSD-3.4 3.4 +.ds doc-operating-system-OpenBSD-3.5 3.5 +.ds doc-operating-system-OpenBSD-3.6 3.6 +.ds doc-operating-system-OpenBSD-3.7 3.7 +.ds doc-operating-system-OpenBSD-3.8 3.8 +.ds doc-operating-system-OpenBSD-3.9 3.9 +.ds doc-operating-system-OpenBSD-4.0 4.0 +.ds doc-operating-system-OpenBSD-4.1 4.1 +.ds doc-operating-system-OpenBSD-4.2 4.2 +.ds doc-operating-system-OpenBSD-4.3 4.3 +.ds doc-operating-system-OpenBSD-4.4 4.4 +.ds doc-operating-system-OpenBSD-4.5 4.5 +.ds doc-operating-system-OpenBSD-4.6 4.6 +.ds doc-operating-system-OpenBSD-4.7 4.7 +.ds doc-operating-system-OpenBSD-4.8 4.8 . .ds doc-operating-system-FreeBSD-1.0 1.0 .ds doc-operating-system-FreeBSD-1.1 1.1 @@ -506,6 +539,10 @@ .ds doc-operating-system-FreeBSD-6.4 6.4 .ds doc-operating-system-FreeBSD-7.0 7.0 .ds doc-operating-system-FreeBSD-7.1 7.1 +.ds doc-operating-system-FreeBSD-7.2 7.2 +.ds doc-operating-system-FreeBSD-7.3 7.3 +.ds doc-operating-system-FreeBSD-8.0 8.0 +.ds doc-operating-system-FreeBSD-8.1 8.1 . .ds doc-operating-system-Darwin-8.0.0 8.0.0 .ds doc-operating-system-Darwin-8.1.0 8.1.0 @@ -540,6 +577,10 @@ .ds doc-operating-system-DragonFly-1.12 1.12 .ds doc-operating-system-DragonFly-1.12.2 1.12.2 .ds doc-operating-system-DragonFly-2.0 2.0 +.ds doc-operating-system-DragonFly-2.2 2.2 +.ds doc-operating-system-DragonFly-2.4 2.4 +.ds doc-operating-system-DragonFly-2.6 2.6 +.ds doc-operating-system-DragonFly-2.8 2.8 . .de Os . ds doc-command-name @@ -569,6 +610,14 @@ . el \ . tm mdoc warning: .Os: Unknown FreeBSD version `\$2' (#\n[.c]) . \}\} +. el \{ .ie "\$1"DragonFly" \{\ +. ds doc-operating-system DragonFly +. if \A\$2 \{\ +. ie d doc-operating-system-DragonFly-\$2 \ +. as doc-operating-system \~\*[doc-operating-system-DragonFly-\$2] +. el \ +. tm mdoc warning: .Os: Unknown DragonFly version `\$2' (#\n[.c]) +. \}\} . el \{ .ie "\$1"NetBSD" \{\ . ds doc-operating-system NetBSD . if \A\$2 \{\ @@ -577,6 +626,14 @@ . el \ . tm mdoc warning: .Os: Unknown NetBSD version `\$2' (#\n[.c]) . \}\} +. el \{ .ie "\$1"OpenBSD" \{\ +. ds doc-operating-system OpenBSD +. if \A\$2 \{\ +. ie d doc-operating-system-OpenBSD-\$2 \ +. as doc-operating-system \~\*[doc-operating-system-OpenBSD-\$2] +. el \ +. tm mdoc warning: .Os: Unknown OpenBSD version `\$2' (#\n[.c]) +. \}\} . el \{ .ie "\$1"Darwin" \{\ . ds doc-operating-system Darwin . if \A\$2 \{\ @@ -589,7 +646,7 @@ . ds doc-operating-system \$1 . if !"\$2"" \ . as doc-operating-system " \$2 -. \}\}\}\}\}\} +. \}\}\}\}\}\}\}\} .. . . Modified: stable/8/contrib/groff/tmac/doc-syms ============================================================================== --- stable/8/contrib/groff/tmac/doc-syms Sun Feb 13 19:07:48 2011 (r218658) +++ stable/8/contrib/groff/tmac/doc-syms Sun Feb 13 19:15:42 2011 (r218659) @@ -637,6 +637,8 @@ .as doc-str-St--p1003.1-2001 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq]) .ds doc-str-St--p1003.1-2004 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1-2004 .as doc-str-St--p1003.1-2004 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq]) +.ds doc-str-St--p1003.1-2008 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1-2008 +.as doc-str-St--p1003.1-2008 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq]) . .\" POSIX Part 2: Shell and Utilities .ds doc-str-St--p1003.2 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.2 Modified: stable/8/contrib/groff/tmac/groff_mdoc.man ============================================================================== --- stable/8/contrib/groff/tmac/groff_mdoc.man Sun Feb 13 19:07:48 2011 (r218658) +++ stable/8/contrib/groff/tmac/groff_mdoc.man Sun Feb 13 19:15:42 2011 (r218659) @@ -44,9 +44,9 @@ .\" for an already extremely slow package. .\" . -.Dd January 5, 2006 -.Os +.Dd November 2, 2010 .Dt GROFF_MDOC 7 +.Os . . .Sh NAME @@ -563,8 +563,8 @@ The body of a man page is easily constru .Bd -literal -offset indent \&.\e" The following commands are required for all man pages. \&.Dd Month day, year -\&.Os [OPERATING_SYSTEM] [version/release] \&.Dt DOCUMENT_TITLE [section number] [architecture/volume] +\&.Os [OPERATING_SYSTEM] [version/release] \&.Sh NAME \&.Nm name \&.Nd one line description of name @@ -600,9 +600,9 @@ The body of a man page is easily constru . The first items in the template are the commands .Ql .Dd , -.Ql .Os , +.Ql .Dt , and -.Ql .Dt ; +.Ql .Os ; the document date, the operating system the man page or subject source is developed or modified for, and the man page title (in .Em upper case ) @@ -856,7 +856,7 @@ is the acronym for the operating system the release ID. . .Bd -ragged -compact -.Bl -tag -width ".No FreeBSD" -offset indent +.Bl -tag -width ".No DragonFly" -offset indent .It ATT 7th, 7, III, 3, V, V.2, V.3, V.4 .It BSD @@ -865,14 +865,19 @@ the release ID. 0.8, 0.8a, 0.9, 0.9a, 1.0, 1.0a, 1.1, 1.2, 1.2a, 1.2b, 1.2c, 1.2d, 1.2e, 1.3, 1.3a, 1.4, 1.4.1, 1.4.2, 1.4.3, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.6, 1.6.1, 1.6.2, 1.6.3, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.1, 3.0, 3.0.1, 3.0.2, 3.1, 4.0, -4.0.1 +4.0.1, 5.0, 5.0.1, 5.0.2 .It FreeBSD 1.0, 1.1, 1.1.5, 1.1.5.1, 2.0, 2.0.5, 2.1, 2.1.5, 2.1.6, 2.1.7, 2.2, 2.2.1, 2.2.2, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 4.0, 4.1, 4.1.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.6.2, 4.7, 4.8, 4.9, 4.10, 4.11, 5.0, 5.1, -5.2, 5.2.1, 5.3, 5.4, 5.5, 6.0, 6.1, 6.2, 6.3, 6.4, 7.0, 7.1 +5.2, 5.2.1, 5.3, 5.4, 5.5, 6.0, 6.1, 6.2, 6.3, 6.4, 7.0, 7.1, 7.2, 7.3, 8.0, +8.1 +.It OpenBSD +2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, +3.5, 3.6, 3.7, 3.8, 3.9, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8 .It DragonFly -1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8, 1.8.1, 1.10, 1.12, 1.12.2, 2.0 +1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8, 1.8.1, 1.10, 1.12, 1.12.2, 2.0, 2.2, +2.4, 2.6, 2.8 .It Darwin 8.0.0, 8.1.0, 8.2.0, 8.3.0, 8.4.0, 8.5.0, 8.6.0, 8.7.0, 8.8.0, 8.9.0, 8.10.0, 8.11.0, 9.0.0, 9.1.0, 9.2.0, 9.3.0, 9.4.0, 9.5.0, 9.6.0 @@ -1588,7 +1593,7 @@ For example, .Ql ".Rv \-std atexit" produces: . -.Bd -ragged -offset -indent +.Bd -ragged -offset indent \# a small hack to suppress a warning message .ds section-old "\*[section] .ds section 3 @@ -1618,7 +1623,7 @@ For example, .Ql ".Ex \-std cat" produces: . -.Bd -ragged -offset -indent +.Bd -ragged -offset indent \# a small hack to suppress a warning message .ds section-old "\*[section] .ds section 1 @@ -1786,6 +1791,11 @@ When called without arguments, .Ql .Nm regurgitates this initial name for the sole purpose of making less work for the author. +.Ql .Nm +causes a line break within the +.Sx SYNOPSIS +section. +.Pp Note: A section two or three document function name is addressed with the .Ql .Nm in the @@ -1974,6 +1984,8 @@ Part 1: System API .St -p1003.1-2001 .It Li \-p1003.1\-2004 .St -p1003.1-2004 +.It Li \-p1003.1\-2008 +.St -p1003.1-2008 .El .Pp . @@ -1993,8 +2005,8 @@ Part 2: Shell and Utilities .Pp . X/Open -.Bl -tag -width ".Li \-p1003.1g\-2000" -compact -offset indent .Pp +.Bl -tag -width ".Li \-p1003.1g\-2000" -compact -offset indent .It Li \-susv2 .St -susv2 .It Li \-susv3 Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/8/gnu/usr.bin/groff/tmac/mdoc.local Sun Feb 13 19:07:48 2011 (r218658) +++ stable/8/gnu/usr.bin/groff/tmac/mdoc.local Sun Feb 13 19:15:42 2011 (r218659) @@ -70,18 +70,11 @@ .ds doc-default-operating-system FreeBSD\~8.2 . .\" FreeBSD releases not found in doc-common -.ds doc-operating-system-FreeBSD-7.2 7.2 -.ds doc-operating-system-FreeBSD-7.3 7.3 -.ds doc-operating-system-FreeBSD-7.4 7.4 -.ds doc-operating-system-FreeBSD-8.0 8.0 -.ds doc-operating-system-FreeBSD-8.1 8.1 .ds doc-operating-system-FreeBSD-8.2 8.2 .ds doc-operating-system-FreeBSD-8.3 8.3 .ds doc-operating-system-FreeBSD-9.0 9.0 . .\" Definitions not (yet) in doc-syms -.ds doc-str-St--p1003.1-2008 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1-2008 -.as doc-str-St--p1003.1-2008 " (\*[Lq]\)\*[Px]\*[doc-str-St].1\*[Rq]) . .ec . From owner-svn-src-stable-8@FreeBSD.ORG Sun Feb 13 19:37:05 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75E24106564A; Sun, 13 Feb 2011 19:37:05 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 642DA8FC08; Sun, 13 Feb 2011 19:37:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1DJb59t049744; Sun, 13 Feb 2011 19:37:05 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1DJb5Kt049742; Sun, 13 Feb 2011 19:37:05 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201102131937.p1DJb5Kt049742@svn.freebsd.org> From: Ed Schouten Date: Sun, 13 Feb 2011 19:37:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218664 - stable/8/usr.bin/who X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2011 19:37:05 -0000 Author: ed Date: Sun Feb 13 19:37:05 2011 New Revision: 218664 URL: http://svn.freebsd.org/changeset/base/218664 Log: Partially merge a change made in r200166. It seems the utmpx fixes for who(1) also contained a small change to make it work properly with the pts/%u naming. Unfortunately, this change was never merged to FreeBSD 8. Properly remove the /dev/ part of the TTY name instead of stripping until the last /. Reported by: Eivind E Tested by: uqs@ Modified: stable/8/usr.bin/who/who.c Modified: stable/8/usr.bin/who/who.c ============================================================================== --- stable/8/usr.bin/who/who.c Sun Feb 13 19:34:48 2011 (r218663) +++ stable/8/usr.bin/who/who.c Sun Feb 13 19:37:05 2011 (r218664) @@ -266,8 +266,8 @@ whoami(FILE *fp) if ((tty = ttyname(STDIN_FILENO)) == NULL) tty = "tty??"; - else if ((p = strrchr(tty, '/')) != NULL) - tty = p + 1; + else if (strncmp(tty, _PATH_DEV, sizeof _PATH_DEV - 1) == 0) + tty += sizeof _PATH_DEV - 1; /* Search utmp for our tty, dump first matching record. */ while (fread(&ut, sizeof(ut), 1, fp) == 1) From owner-svn-src-stable-8@FreeBSD.ORG Sun Feb 13 22:17:49 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBC5B1065670; Sun, 13 Feb 2011 22:17:49 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D80668FC15; Sun, 13 Feb 2011 22:17:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1DMHnve064350; Sun, 13 Feb 2011 22:17:49 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1DMHnkf064348; Sun, 13 Feb 2011 22:17:49 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201102132217.p1DMHnkf064348@svn.freebsd.org> From: Ulrich Spoerlein Date: Sun, 13 Feb 2011 22:17:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218672 - head/gnu/usr.bin/groff/tmac stable/7/gnu/usr.bin/groff/tmac stable/8/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Feb 2011 22:17:50 -0000 Author: uqs Date: Sun Feb 13 22:17:49 2011 New Revision: 218672 URL: http://svn.freebsd.org/changeset/base/218672 Log: Add back soon-to-be-release FreeBSD 7.4 which got clobbered in the previous merges. Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local Changes in other areas also in this revision: Modified: head/gnu/usr.bin/groff/tmac/mdoc.local stable/7/gnu/usr.bin/groff/tmac/mdoc.local Modified: stable/8/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/8/gnu/usr.bin/groff/tmac/mdoc.local Sun Feb 13 22:09:33 2011 (r218671) +++ stable/8/gnu/usr.bin/groff/tmac/mdoc.local Sun Feb 13 22:17:49 2011 (r218672) @@ -70,6 +70,7 @@ .ds doc-default-operating-system FreeBSD\~8.2 . .\" FreeBSD releases not found in doc-common +.ds doc-operating-system-FreeBSD-7.4 7.4 .ds doc-operating-system-FreeBSD-8.2 8.2 .ds doc-operating-system-FreeBSD-8.3 8.3 .ds doc-operating-system-FreeBSD-9.0 9.0 From owner-svn-src-stable-8@FreeBSD.ORG Mon Feb 14 16:36:03 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A3DC106564A; Mon, 14 Feb 2011 16:36:03 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B5888FC14; Mon, 14 Feb 2011 16:36:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1EGa2GC099100; Mon, 14 Feb 2011 16:36:03 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1EGa2Bk099098; Mon, 14 Feb 2011 16:36:02 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201102141636.p1EGa2Bk099098@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 14 Feb 2011 16:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218682 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2011 16:36:03 -0000 Author: bz Date: Mon Feb 14 16:36:02 2011 New Revision: 218682 URL: http://svn.freebsd.org/changeset/base/218682 Log: MFC r218078: Remove duplicate printing of TF_NOPUSH in db_print_tflags(). Modified: stable/8/sys/netinet/tcp_usrreq.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/tcp_usrreq.c ============================================================================== --- stable/8/sys/netinet/tcp_usrreq.c Mon Feb 14 15:36:38 2011 (r218681) +++ stable/8/sys/netinet/tcp_usrreq.c Mon Feb 14 16:36:02 2011 (r218682) @@ -1695,10 +1695,6 @@ db_print_tflags(u_int t_flags) db_printf("%sTF_NOPUSH", comma ? ", " : ""); comma = 1; } - if (t_flags & TF_NOPUSH) { - db_printf("%sTF_NOPUSH", comma ? ", " : ""); - comma = 1; - } if (t_flags & TF_MORETOCOME) { db_printf("%sTF_MORETOCOME", comma ? ", " : ""); comma = 1; From owner-svn-src-stable-8@FreeBSD.ORG Mon Feb 14 16:38:32 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C556C106564A; Mon, 14 Feb 2011 16:38:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BBA58FC1C; Mon, 14 Feb 2011 16:38:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1EGcWlA099272; Mon, 14 Feb 2011 16:38:32 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1EGcWmf099270; Mon, 14 Feb 2011 16:38:32 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201102141638.p1EGcWmf099270@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 14 Feb 2011 16:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218683 - stable/8/sys/compat/linprocfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2011 16:38:32 -0000 Author: bz Date: Mon Feb 14 16:38:32 2011 New Revision: 218683 URL: http://svn.freebsd.org/changeset/base/218683 Log: MFC r218114: Update interface stats counters to match the current format in linux and try to export as much information as we can match. Requested on: Debian GNU/kFreeBSD list (debian-bsd lists.debian.org) 2010-12 Tested by: Mats Erik Andersson (mats.andersson gisladisker.se) Modified: stable/8/sys/compat/linprocfs/linprocfs.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/compat/linprocfs/linprocfs.c ============================================================================== --- stable/8/sys/compat/linprocfs/linprocfs.c Mon Feb 14 16:36:02 2011 (r218682) +++ stable/8/sys/compat/linprocfs/linprocfs.c Mon Feb 14 16:38:32 2011 (r218683) @@ -1214,20 +1214,43 @@ linprocfs_donetdev(PFS_FILL_ARGS) char ifname[16]; /* XXX LINUX_IFNAMSIZ */ struct ifnet *ifp; - sbuf_printf(sb, "%6s|%58s|%s\n%6s|%58s|%58s\n", - "Inter-", " Receive", " Transmit", " face", - "bytes packets errs drop fifo frame compressed", - "bytes packets errs drop fifo frame compressed"); + sbuf_printf(sb, "%6s|%58s|%s\n" + "%6s|%58s|%58s\n", + "Inter-", " Receive", " Transmit", + " face", + "bytes packets errs drop fifo frame compressed multicast", + "bytes packets errs drop fifo colls carrier compressed"); CURVNET_SET(TD_TO_VNET(curthread)); IFNET_RLOCK(); TAILQ_FOREACH(ifp, &V_ifnet, if_link) { linux_ifname(ifp, ifname, sizeof ifname); - sbuf_printf(sb, "%6.6s:", ifname); - sbuf_printf(sb, "%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu ", - 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL); + sbuf_printf(sb, "%6.6s: ", ifname); + sbuf_printf(sb, "%7lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu ", + ifp->if_ibytes, /* rx_bytes */ + ifp->if_ipackets, /* rx_packets */ + ifp->if_ierrors, /* rx_errors */ + ifp->if_iqdrops, /* rx_dropped + + * rx_missed_errors */ + 0UL, /* rx_fifo_errors */ + 0UL, /* rx_length_errors + + * rx_over_errors + + * rx_crc_errors + + * rx_frame_errors */ + 0UL, /* rx_compressed */ + ifp->if_imcasts); /* multicast, XXX-BZ rx only? */ sbuf_printf(sb, "%8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n", - 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL); + ifp->if_obytes, /* tx_bytes */ + ifp->if_opackets, /* tx_packets */ + ifp->if_oerrors, /* tx_errors */ + 0UL, /* tx_dropped */ + 0UL, /* tx_fifo_errors */ + ifp->if_collisions, /* collisions */ + 0UL, /* tx_carrier_errors + + * tx_aborted_errors + + * tx_window_errors + + * tx_heartbeat_errors */ + 0UL); /* tx_compressed */ } IFNET_RUNLOCK(); CURVNET_RESTORE(); From owner-svn-src-stable-8@FreeBSD.ORG Mon Feb 14 16:54:03 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B96AC106564A; Mon, 14 Feb 2011 16:54:03 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FC738FC08; Mon, 14 Feb 2011 16:54:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1EGs3Lk099648; Mon, 14 Feb 2011 16:54:03 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1EGs3TM099645; Mon, 14 Feb 2011 16:54:03 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201102141654.p1EGs3TM099645@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 14 Feb 2011 16:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218684 - in stable/8/sys: conf netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2011 16:54:03 -0000 Author: bz Date: Mon Feb 14 16:54:03 2011 New Revision: 218684 URL: http://svn.freebsd.org/changeset/base/218684 Log: MFC r216466: Bring back (most of) NATM to avoid further bitrot after r186119. Keep three lines disabled which I am unsure if they had been used at all. This will allow us to seek testers and possibly bring it all back. Discussed with: rwatson Modified: stable/8/sys/conf/NOTES stable/8/sys/netinet/if_atm.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/conf/NOTES ============================================================================== --- stable/8/sys/conf/NOTES Mon Feb 14 16:38:32 2011 (r218683) +++ stable/8/sys/conf/NOTES Mon Feb 14 16:54:03 2011 (r218684) @@ -2120,7 +2120,7 @@ device fatm #Fore PCA200E device hatm #Fore/Marconi HE155/622 device patm #IDT77252 cards (ProATM and IDT) device utopia #ATM PHY driver -#options NATM #native ATM +options NATM #native ATM options LIBMBPOOL #needed by patm, iatm Modified: stable/8/sys/netinet/if_atm.c ============================================================================== --- stable/8/sys/netinet/if_atm.c Mon Feb 14 16:38:32 2011 (r218683) +++ stable/8/sys/netinet/if_atm.c Mon Feb 14 16:54:03 2011 (r218684) @@ -229,7 +229,9 @@ atm_rtrequest(int req, struct rtentry *r npcb->npcb_flags |= NPCB_IP; npcb->ipaddr.s_addr = sin->sin_addr.s_addr; /* XXX: move npcb to llinfo when ATM ARP is ready */ +#ifdef __notyet_restored__ rt->rt_llinfo = (caddr_t) npcb; +#endif rt->rt_flags |= RTF_LLINFO; #endif /* @@ -255,7 +257,9 @@ failed: #ifdef NATM if (npcb) { npcb_free(npcb, NPCB_DESTROY); +#ifdef __notyet_restored__ rt->rt_llinfo = NULL; +#endif rt->rt_flags &= ~RTF_LLINFO; } NATM_UNLOCK(); @@ -273,9 +277,11 @@ failed: */ if (rt->rt_flags & RTF_LLINFO) { NATM_LOCK(); +#ifdef __notyet_restored__ npcb_free((struct natmpcb *)rt->rt_llinfo, NPCB_DESTROY); rt->rt_llinfo = NULL; +#endif rt->rt_flags &= ~RTF_LLINFO; NATM_UNLOCK(); } From owner-svn-src-stable-8@FreeBSD.ORG Tue Feb 15 01:33:59 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7940A1065679; Tue, 15 Feb 2011 01:33:59 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 671FC8FC12; Tue, 15 Feb 2011 01:33:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1F1XxOs012676; Tue, 15 Feb 2011 01:33:59 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1F1Xx3x012674; Tue, 15 Feb 2011 01:33:59 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201102150133.p1F1Xx3x012674@svn.freebsd.org> From: Glen Barber Date: Tue, 15 Feb 2011 01:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218692 - stable/8/lib/libc/sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2011 01:33:59 -0000 Author: gjb (doc committer) Date: Tue Feb 15 01:33:59 2011 New Revision: 218692 URL: http://svn.freebsd.org/changeset/base/218692 Log: MFC 212438: Add EINVAL to list of possible return values for cpuset_getaffinity(2). PR: 149978 Approved by: keramida (mentor) Modified: stable/8/lib/libc/sys/cpuset_getaffinity.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/sys/cpuset_getaffinity.2 ============================================================================== --- stable/8/lib/libc/sys/cpuset_getaffinity.2 Mon Feb 14 21:50:51 2011 (r218691) +++ stable/8/lib/libc/sys/cpuset_getaffinity.2 Tue Feb 15 01:33:59 2011 (r218692) @@ -121,6 +121,12 @@ The or .Fa which argument was not a valid value. +.It Bq Er EINVAL +The +.Fa mask +argument specified when calling +.Fn cpuset_setaffinity +was not a valid value. .It Bq Er EDEADLK The .Fn cpuset_setaffinity From owner-svn-src-stable-8@FreeBSD.ORG Tue Feb 15 06:33:35 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7B06106566B; Tue, 15 Feb 2011 06:33:35 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6A568FC15; Tue, 15 Feb 2011 06:33:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1F6XZqZ020274; Tue, 15 Feb 2011 06:33:35 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1F6XZrT020272; Tue, 15 Feb 2011 06:33:35 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201102150633.p1F6XZrT020272@svn.freebsd.org> From: Giorgos Keramidas Date: Tue, 15 Feb 2011 06:33:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218695 - stable/8/usr.bin/top X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2011 06:33:36 -0000 Author: keramida (doc committer) Date: Tue Feb 15 06:33:35 2011 New Revision: 218695 URL: http://svn.freebsd.org/changeset/base/218695 Log: MFC 217746 from /head/usr.bin/top Touch up the sample memory usage numbers a bit, to avoid wrapping on terminal boundary. While here add definition for 'G' and fix the indentation of 'K' units. Submitted by: plunket PR: docs/153614 Modified: stable/8/usr.bin/top/top.local.1 Directory Properties: stable/8/usr.bin/top/ (props changed) Modified: stable/8/usr.bin/top/top.local.1 ============================================================================== --- stable/8/usr.bin/top/top.local.1 Tue Feb 15 05:57:53 2011 (r218694) +++ stable/8/usr.bin/top/top.local.1 Tue Feb 15 06:33:35 2011 (r218695) @@ -5,16 +5,19 @@ The '-H' option will toggle the display of kernel visible thread contexts. At runtime the 'H' key will toggle this mode. The default is OFF. -.SH DESCRIPTION OF MEMORY -Mem: 9220K Active, 1032K Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free +.SH DESCRIPTION OF MEMORY +Mem: 9220K Active, 1M Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out - +.TP .B K: Kilobyte .TP .B M: Megabyte .TP +.B G: +Gigabyte +.TP .B %: 1/100 .TP From owner-svn-src-stable-8@FreeBSD.ORG Tue Feb 15 07:12:41 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EF6410656A3; Tue, 15 Feb 2011 07:12:41 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E04A8FC24; Tue, 15 Feb 2011 07:12:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1F7CfjN021366; Tue, 15 Feb 2011 07:12:41 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1F7Cfrw021364; Tue, 15 Feb 2011 07:12:41 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <201102150712.p1F7Cfrw021364@svn.freebsd.org> From: Giorgos Keramidas Date: Tue, 15 Feb 2011 07:12:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218698 - stable/8/usr.bin/mail X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2011 07:12:41 -0000 Author: keramida (doc committer) Date: Tue Feb 15 07:12:41 2011 New Revision: 218698 URL: http://svn.freebsd.org/changeset/base/218698 Log: MFC 216698 by maxim from /head Fix -u flag description: it takes a username as an argument. PR: docs/153416 Submitted by: Eitan Adler Modified: stable/8/usr.bin/mail/mail.1 Directory Properties: stable/8/usr.bin/mail/ (props changed) Modified: stable/8/usr.bin/mail/mail.1 ============================================================================== --- stable/8/usr.bin/mail/mail.1 Tue Feb 15 07:12:16 2011 (r218697) +++ stable/8/usr.bin/mail/mail.1 Tue Feb 15 07:12:41 2011 (r218698) @@ -156,7 +156,7 @@ line in the mail header. Overrides the .Va record variable, if set. -.It Fl u +.It Fl u Ar user Is equivalent to: .Pp .Dl "mail -f /var/mail/user" From owner-svn-src-stable-8@FreeBSD.ORG Tue Feb 15 20:46:52 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56D66106566B; Tue, 15 Feb 2011 20:46:52 +0000 (UTC) (envelope-from zack@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 451B68FC12; Tue, 15 Feb 2011 20:46:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1FKkqiN043813; Tue, 15 Feb 2011 20:46:52 GMT (envelope-from zack@svn.freebsd.org) Received: (from zack@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1FKkqAR043810; Tue, 15 Feb 2011 20:46:52 GMT (envelope-from zack@svn.freebsd.org) Message-Id: <201102152046.p1FKkqAR043810@svn.freebsd.org> From: Zack Kirsch Date: Tue, 15 Feb 2011 20:46:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218714 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2011 20:46:52 -0000 Author: zack Date: Tue Feb 15 20:46:51 2011 New Revision: 218714 URL: http://svn.freebsd.org/changeset/base/218714 Log: MFC: 217335 Clean up the experimental NFS server replay cache when the module is unloaded. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdcache.c stable/8/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdcache.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdcache.c Tue Feb 15 20:18:52 2011 (r218713) +++ stable/8/sys/fs/nfsserver/nfs_nfsdcache.c Tue Feb 15 20:46:51 2011 (r218714) @@ -727,9 +727,8 @@ nfsrc_freecache(struct nfsrvcache *rp) newnfsstats.srvcache_size--; } -#ifdef notdef /* - * Clean out the cache. Called when the last nfsd terminates. + * Clean out the cache. Called when nfsserver module is unloaded. */ APPLESTATIC void nfsrvd_cleancache(void) @@ -752,7 +751,6 @@ nfsrvd_cleancache(void) nfsrc_tcpsavedreplies = 0; NFSUNLOCKCACHE(); } -#endif /* notdef */ /* * The basic rule is to get rid of entries that are expired. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Tue Feb 15 20:18:52 2011 (r218713) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Tue Feb 15 20:46:51 2011 (r218714) @@ -3117,6 +3117,10 @@ nfsd_modevent(module_t mod, int type, vo #endif nfsd_call_servertimer = NULL; nfsd_call_nfsd = NULL; + + /* Clean the NFS server reply cache */ + nfsrvd_cleancache(); + /* and get rid of the locks */ mtx_destroy(&nfs_cache_mutex); mtx_destroy(&nfs_v4root_mutex); From owner-svn-src-stable-8@FreeBSD.ORG Tue Feb 15 20:53:01 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB807106564A; Tue, 15 Feb 2011 20:53:01 +0000 (UTC) (envelope-from zack@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B9EB88FC16; Tue, 15 Feb 2011 20:53:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1FKr1uc044027; Tue, 15 Feb 2011 20:53:01 GMT (envelope-from zack@svn.freebsd.org) Received: (from zack@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1FKr1Go044025; Tue, 15 Feb 2011 20:53:01 GMT (envelope-from zack@svn.freebsd.org) Message-Id: <201102152053.p1FKr1Go044025@svn.freebsd.org> From: Zack Kirsch Date: Tue, 15 Feb 2011 20:53:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218715 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2011 20:53:01 -0000 Author: zack Date: Tue Feb 15 20:53:01 2011 New Revision: 218715 URL: http://svn.freebsd.org/changeset/base/218715 Log: MFC: 217336 In the experimental NFS server, when converting an open-owner to a lock-owner, start at sequence id 1 instead of 0, to match up with both Solaris and Linux. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Tue Feb 15 20:46:51 2011 (r218714) +++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Tue Feb 15 20:53:01 2011 (r218715) @@ -1922,7 +1922,7 @@ tryagain: */ new_stp->ls_seq = new_stp->ls_opentolockseq; nfsrvd_refcache(new_stp->ls_op); - stateidp->seqid = new_stp->ls_stateid.seqid = 0; + stateidp->seqid = new_stp->ls_stateid.seqid = 1; stateidp->other[0] = new_stp->ls_stateid.other[0] = clp->lc_clientid.lval[0]; stateidp->other[1] = new_stp->ls_stateid.other[1] = From owner-svn-src-stable-8@FreeBSD.ORG Wed Feb 16 05:33:31 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22481106564A; Wed, 16 Feb 2011 05:33:31 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6B26C8FC08; Wed, 16 Feb 2011 05:33:30 +0000 (UTC) Received: by qyg14 with SMTP id 14so189180qyg.13 for ; Tue, 15 Feb 2011 21:33:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:date:from:to:cc:subject:in-reply-to :message-id:references:user-agent:x-openpgp-key-id :x-openpgp-key-fingerprint:mime-version:content-type; bh=3tKcG+Z/4jrQJ6usqtdU7dYWbeb1Aq6OfvKyF4m7VKI=; b=E9b0LXOhr/16QEp6couMNP5vM6v7uhJDj/YBZvh/jbp0ASSPAQu6j9LvXq95yrDq7l h6JAPS1E4kVw6+LQs0flsl80uHEHP+9RfFxJPaHCAXPAGDmq0YA+fHAWimKbfV8RcSwg q+AhMfyrvnvMz089T3izSsr//GVqN9KMjdHlU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=Y5fDHelllnePYq8gIjnLLXriHJIm1BMN1l7H/UsxqZ2yHCn9Yy+Fh0jeAaW/OiyWpX qfWcoNgS5qeA1f3qK+B9rSGDHKrpKo6Swasi+pOxPdyaZ9bvyWPyVEHIowQE3gD+P3wb J9dBJ+OGez716weUDQdTYEuXa9h9KJ3BeChaw= Received: by 10.224.76.85 with SMTP id b21mr160177qak.340.1297832815751; Tue, 15 Feb 2011 21:06:55 -0800 (PST) Received: from disbatch.dataix.local ([99.19.40.173]) by mx.google.com with ESMTPS id r7sm3357249vbx.19.2011.02.15.21.06.48 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Feb 2011 21:06:50 -0800 (PST) Sender: "J. Hellenthal" Date: Wed, 16 Feb 2011 00:06:39 -0500 From: jhell To: Giorgos Keramidas In-Reply-To: <201102150633.p1F6XZrT020272@svn.freebsd.org> Message-ID: References: <201102150633.p1F6XZrT020272@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r218695 - stable/8/usr.bin/top X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2011 05:33:31 -0000 On Tue, 15 Feb 2011 01:33, keramida@ wrote: > Author: keramida (doc committer) > Date: Tue Feb 15 06:33:35 2011 > New Revision: 218695 > URL: http://svn.freebsd.org/changeset/base/218695 > > Log: > MFC 217746 from /head/usr.bin/top > > Touch up the sample memory usage numbers a bit, to avoid wrapping > on terminal boundary. While here add definition for 'G' and fix > the indentation of 'K' units. > > Submitted by: plunket > PR: docs/153614 > > -.SH DESCRIPTION OF MEMORY > -Mem: 9220K Active, 1032K Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free > +.SH DESCRIPTION OF MEMORY > +Mem: 9220K Active, 1M Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free > Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out Maybe being a little picky here but consistency in this might persuade further questions on why Active is using K but yet Inact "being smaller" than that is using M. Might be best to just take some active values straight from a running top(1) output rather than blindly adjusting them. -- jhell From owner-svn-src-stable-8@FreeBSD.ORG Wed Feb 16 06:12:44 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CB3D10656A4; Wed, 16 Feb 2011 06:12:44 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id A81258FC08; Wed, 16 Feb 2011 06:12:43 +0000 (UTC) Received: by qwj9 with SMTP id 9so911667qwj.13 for ; Tue, 15 Feb 2011 22:12:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Nv6nQWAKpNhtWyV0F36yQs/YwvO7eSuVowc7vB3RoQE=; b=XoHJCI377tGCCP1yHI/oo81DrVpCSCwBNSXZuVRdhXC7jcdAOTbvMHZ1PEqG6wAAcc UMGjyhOFT6ByaObXh0A5qMyGtC3i+dpFW1GNBuJrTmJo9lBj8ux03DxuyULitry36K2b Dn8ZNwf/iDq/K+WGo/P1CCjXMyJwsKCnuS/HM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=ZwCtgI0w/rxw79Oq40r4iTeAkzfrtzbKnukO6IXeNJan0vpt7Z9z14aA9qWyAwguTx YPfGyUIzIzDz0+GNVGq3qplOz3kDTOG3DfPVqz10AjhyFNKUORRVGTjfgR8FfD4k38/1 zoyhWReA5AcWC5wgfbqsGHGAaf/jlV8qLqu60= MIME-Version: 1.0 Received: by 10.229.248.198 with SMTP id mh6mr212214qcb.5.1297835430962; Tue, 15 Feb 2011 21:50:30 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.229.102.87 with HTTP; Tue, 15 Feb 2011 21:50:30 -0800 (PST) In-Reply-To: References: <201102150633.p1F6XZrT020272@svn.freebsd.org> Date: Wed, 16 Feb 2011 08:50:30 +0300 X-Google-Sender-Auth: phJtFhwjym39gXpZV4SHWHy24CQ Message-ID: From: Sergey Kandaurov To: jhell Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org, Giorgos Keramidas Subject: Re: svn commit: r218695 - stable/8/usr.bin/top X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2011 06:12:44 -0000 On 16 February 2011 08:06, jhell wrote: > > On Tue, 15 Feb 2011 01:33, keramida@ wrote: >> >> Author: keramida (doc committer) >> Date: Tue Feb 15 06:33:35 2011 >> New Revision: 218695 >> URL: http://svn.freebsd.org/changeset/base/218695 >> >> Log: >> =A0MFC 217746 from /head/usr.bin/top >> >> =A0Touch up the sample memory usage numbers a bit, to avoid wrapping >> =A0on terminal boundary. =A0While here add definition for 'G' and fix >> =A0the indentation of 'K' units. >> >> =A0Submitted by: =A0 plunket >> =A0PR: =A0 =A0 =A0 =A0 =A0 =A0 docs/153614 >> >> -.SH DESCRIPTION OF MEMORY >> -Mem: 9220K Active, 1032K Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Fr= ee >> +.SH DESCRIPTION OF MEMORY >> +Mem: 9220K Active, 1M Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free >> Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out > > Maybe being a little picky here but consistency in this might persuade > further questions on why Active is using K but yet Inact "being smaller" > than that is using M. > > Might be best to just take some active values straight from a running top= (1) > output rather than blindly adjusting them. Well, that was already broken before the change. --=20 wbr, pluknet From owner-svn-src-stable-8@FreeBSD.ORG Wed Feb 16 07:07:24 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55260106564A; Wed, 16 Feb 2011 07:07:24 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id AEF9D8FC08; Wed, 16 Feb 2011 07:07:23 +0000 (UTC) X-Spam-Status: No X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-2.9, required 5, autolearn=not spam, ALL_TRUSTED -1.00, BAYES_00 -1.90) X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-ID: p1G6sSYG003355 Received: from gkeramidas-glaptop.linux.gr (207.47.25.82.static.nextweb.net [207.47.25.82]) (authenticated bits=0) by igloo.linux.gr (8.14.4/8.14.4/Debian-2) with ESMTP id p1G6sSYG003355 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 16 Feb 2011 08:54:35 +0200 From: Giorgos Keramidas To: jhell References: <201102150633.p1F6XZrT020272@svn.freebsd.org> Date: Tue, 15 Feb 2011 22:54:28 -0800 In-Reply-To: (jhell@dataix.net's message of "Wed, 16 Feb 2011 00:06:39 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r218695 - stable/8/usr.bin/top X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2011 07:07:24 -0000 On Wed, 16 Feb 2011 00:06:39 -0500, jhell wrote: > On Tue, 15 Feb 2011 01:33, keramida@ wrote: >> URL: http://svn.freebsd.org/changeset/base/218695 >> >> MFC 217746 from /head/usr.bin/top >> >> Touch up the sample memory usage numbers a bit, to avoid wrapping >> on terminal boundary. While here add definition for 'G' and fix >> the indentation of 'K' units. .. >> -.SH DESCRIPTION OF MEMORY >> -Mem: 9220K Active, 1032K Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free >> +.SH DESCRIPTION OF MEMORY >> +Mem: 9220K Active, 1M Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free >> Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out > > Maybe being a little picky here but consistency in this might persuade > further questions on why Active is using K but yet Inact "being > smaller" than that is using M. > > Might be best to just take some active values straight from a running > top(1) output rather than blindly adjusting them. On Wed, 16 Feb 2011 08:50:30 +0300, Sergey Kandaurov wrote: > Well, that was already broken before the change. It's still not too late to do that. I'll replace the Mem: line with one from my current installation: Mem: 18M Active, 298M Inact, 119M Wired, 220K Cache, 110M Buf, 553M Free Does that look better? From owner-svn-src-stable-8@FreeBSD.ORG Wed Feb 16 08:36:30 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C3331065679; Wed, 16 Feb 2011 08:36:30 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id AC9008FC15; Wed, 16 Feb 2011 08:36:29 +0000 (UTC) Received: by qwj9 with SMTP id 9so1015086qwj.13 for ; Wed, 16 Feb 2011 00:36:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=64/5adsMuBKvLZpFWqll4+yw001N6AERIj4b2WJbEA4=; b=Rmb62L+GhKKC8fTGPJmhEgDMPefdD29ZjGwRDuVPU+ygmNqF+PfvdktCfkZxO4IrU8 eWcSkKVrWlPSdSwJ0oSP7LjQLwIzN/WmBX6p6cRA+3cEA+uIf0LHiBrcoN3/oTRpFYQ8 63qtTTbngqKh5S2tHzp7JQWeufUN98piuMZwc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=gTzl6yDx4wgVQOqWQ+itkxMwxjPpj3bQENLJok2HZt4NWSTnFDurdJ4r225+OPWUla g37cB1aB4hNKVvzqUrWZpE4IZRCxERQ+NdT/pAMcdzcNDmDwMKX1TAcqsiBAPk4qEqJN ksQumJBBlnUx2GAhNeJZ9kGwMFv90P7rTYvvA= MIME-Version: 1.0 Received: by 10.229.248.198 with SMTP id mh6mr372537qcb.5.1297845388573; Wed, 16 Feb 2011 00:36:28 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.229.102.87 with HTTP; Wed, 16 Feb 2011 00:36:28 -0800 (PST) In-Reply-To: References: <201102150633.p1F6XZrT020272@svn.freebsd.org> Date: Wed, 16 Feb 2011 11:36:28 +0300 X-Google-Sender-Auth: OT7-AioVEIYypbSaCAmwh3iTpmM Message-ID: From: Sergey Kandaurov To: Giorgos Keramidas Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org, svn-src-stable@freebsd.org Subject: Re: svn commit: r218695 - stable/8/usr.bin/top X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2011 08:36:30 -0000 On 16 February 2011 09:54, Giorgos Keramidas wrote: > On Wed, 16 Feb 2011 00:06:39 -0500, jhell wrote: >> On Tue, 15 Feb 2011 01:33, keramida@ wrote: >>> URL: http://svn.freebsd.org/changeset/base/218695 >>> >>> =A0MFC 217746 from /head/usr.bin/top >>> >>> =A0Touch up the sample memory usage numbers a bit, to avoid wrapping >>> =A0on terminal boundary. =A0While here add definition for 'G' and fix >>> =A0the indentation of 'K' units. > .. >>> -.SH DESCRIPTION OF MEMORY >>> -Mem: 9220K Active, 1032K Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K F= ree >>> +.SH DESCRIPTION OF MEMORY >>> +Mem: 9220K Active, 1M Inact, 3284K Wired, 1M Cache, 2M Buf, 1320K Free >>> Swap: 91M Total, 79M Free, 13% Inuse, 80K In, 104K Out >> >> Maybe being a little picky here but consistency in this might persuade >> further questions on why Active is using K but yet Inact "being >> smaller" than that is using M. >> >> Might be best to just take some active values straight from a running >> top(1) output rather than blindly adjusting them. > > On Wed, 16 Feb 2011 08:50:30 +0300, Sergey Kandaurov wrote: >> Well, that was already broken before the change. > > It's still not too late to do that. =A0I'll replace the Mem: line with on= e > from my current installation: > > Mem: 18M Active, 298M Inact, 119M Wired, 220K Cache, 110M Buf, 553M Free > > Does that look better? > >From my observations the line length (without trailing '/0') must be in [66= ,71] range (both limits inclusive). Otherwise the line renders incorrectly for m= e. Yours is one character longer. --=20 wbr, pluknet From owner-svn-src-stable-8@FreeBSD.ORG Wed Feb 16 14:25:27 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F265F1065674; Wed, 16 Feb 2011 14:25:26 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E29098FC0A; Wed, 16 Feb 2011 14:25:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1GEPQan072542; Wed, 16 Feb 2011 14:25:26 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1GEPQRI072540; Wed, 16 Feb 2011 14:25:26 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201102161425.p1GEPQRI072540@svn.freebsd.org> From: Ken Smith Date: Wed, 16 Feb 2011 14:25:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218731 - stable/8 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2011 14:25:27 -0000 Author: kensmith Date: Wed Feb 16 14:25:26 2011 New Revision: 218731 URL: http://svn.freebsd.org/changeset/base/218731 Log: Guess when all the bits will be in place for announcing 8.2-RELEASE. Modified: stable/8/UPDATING Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Wed Feb 16 09:26:56 2011 (r218730) +++ stable/8/UPDATING Wed Feb 16 14:25:26 2011 (r218731) @@ -15,6 +15,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20110221: + 8.2-RELEASE. + 20101126: New version of minidump format for amd64 architecture was introduced in r215872. To analyze vmcore files produced by From owner-svn-src-stable-8@FreeBSD.ORG Wed Feb 16 21:10:52 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5209106566C; Wed, 16 Feb 2011 21:10:52 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2F208FC26; Wed, 16 Feb 2011 21:10:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1GLAqHa083843; Wed, 16 Feb 2011 21:10:52 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1GLApac083839; Wed, 16 Feb 2011 21:10:51 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201102162110.p1GLApac083839@svn.freebsd.org> From: Bruce Cran Date: Wed, 16 Feb 2011 21:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218750 - stable/8/games/fortune/datfiles X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2011 21:10:52 -0000 Author: brucec Date: Wed Feb 16 21:10:50 2011 New Revision: 218750 URL: http://svn.freebsd.org/changeset/base/218750 Log: MFC r218650: Move potentially offensive fortune to fortunes-o. PR: bin/137702 Modified: stable/8/games/fortune/datfiles/fortunes stable/8/games/fortune/datfiles/fortunes-o.real Directory Properties: stable/8/games/fortune/ (props changed) Modified: stable/8/games/fortune/datfiles/fortunes ============================================================================== --- stable/8/games/fortune/datfiles/fortunes Wed Feb 16 21:04:47 2011 (r218749) +++ stable/8/games/fortune/datfiles/fortunes Wed Feb 16 21:10:50 2011 (r218750) @@ -38136,10 +38136,6 @@ couldn't compete successfully with poets -- Kilgore Trout (Philip J. Farmer) "Venus on the Half Shell" % -PLATONIC FRIENDSHIP: - What develops when two people get - tired of making love to each other. -% Play Rogue, visit exotic locations, meet strange creatures and kill them. % Modified: stable/8/games/fortune/datfiles/fortunes-o.real ============================================================================== --- stable/8/games/fortune/datfiles/fortunes-o.real Wed Feb 16 21:04:47 2011 (r218749) +++ stable/8/games/fortune/datfiles/fortunes-o.real Wed Feb 16 21:10:50 2011 (r218750) @@ -10487,6 +10487,10 @@ Pile driver, n.: Planned Parenthood: The emission Control Center. % +PLATONIC FRIENDSHIP: + What develops when two people get + tired of making love to each other. +% Playing poker with busty Ms. Ware, He announced as he folded with flair, "I had four of a kind, From owner-svn-src-stable-8@FreeBSD.ORG Wed Feb 16 21:21:23 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A24FC1065672; Wed, 16 Feb 2011 21:21:23 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 907898FC08; Wed, 16 Feb 2011 21:21:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1GLLNvR084188; Wed, 16 Feb 2011 21:21:23 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1GLLNa0084186; Wed, 16 Feb 2011 21:21:23 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201102162121.p1GLLNa0084186@svn.freebsd.org> From: Bruce Cran Date: Wed, 16 Feb 2011 21:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218752 - stable/8/sbin/mdconfig X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2011 21:21:23 -0000 Author: brucec Date: Wed Feb 16 21:21:23 2011 New Revision: 218752 URL: http://svn.freebsd.org/changeset/base/218752 Log: MFC r218652, r218677: Only print the unit number when invoked with the -n flag. PR: bin/144300 Submitted by: arundel Modified: stable/8/sbin/mdconfig/mdconfig.c Directory Properties: stable/8/sbin/mdconfig/ (props changed) Modified: stable/8/sbin/mdconfig/mdconfig.c ============================================================================== --- stable/8/sbin/mdconfig/mdconfig.c Wed Feb 16 21:13:02 2011 (r218751) +++ stable/8/sbin/mdconfig/mdconfig.c Wed Feb 16 21:21:23 2011 (r218752) @@ -373,7 +373,11 @@ md_list(char *units, int opt) found = 1; } gc = &pp->lg_config; - printf("%s", pp->lg_name); + if (nflag && strncmp(pp->lg_name, "md", 2) == 0) + printf("%s", pp->lg_name + 2); + else + printf("%s", pp->lg_name); + if (opt & OPT_VERBOSE || opt & OPT_UNIT) { type = geom_config_get(gc, "type"); if (strcmp(type, "vnode") == 0) From owner-svn-src-stable-8@FreeBSD.ORG Wed Feb 16 21:27:19 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 712FA106564A; Wed, 16 Feb 2011 21:27:19 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F9478FC14; Wed, 16 Feb 2011 21:27:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1GLRJx2084495; Wed, 16 Feb 2011 21:27:19 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1GLRJ3x084493; Wed, 16 Feb 2011 21:27:19 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201102162127.p1GLRJ3x084493@svn.freebsd.org> From: Bruce Cran Date: Wed, 16 Feb 2011 21:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218755 - stable/8/bin/ed X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2011 21:27:19 -0000 Author: brucec Date: Wed Feb 16 21:27:19 2011 New Revision: 218755 URL: http://svn.freebsd.org/changeset/base/218755 Log: MFC r218619: Fix typos. PR: docs/131625 Submitted by: Andrew Wright Modified: stable/8/bin/ed/ed.1 Directory Properties: stable/8/bin/ed/ (props changed) Modified: stable/8/bin/ed/ed.1 ============================================================================== --- stable/8/bin/ed/ed.1 Wed Feb 16 21:24:09 2011 (r218754) +++ stable/8/bin/ed/ed.1 Wed Feb 16 21:27:19 2011 (r218755) @@ -231,7 +231,7 @@ The current line (address) in the buffer The last line in the buffer. .It n The -.Em n Ns th, +.Em n Ns th line in the buffer where .Em n @@ -649,7 +649,7 @@ The mark is not cleared until the line i deleted or otherwise modified. .It (.,.)l Print the addressed lines unambiguously. -If a single line fills for than one screen (as might be the case +If a single line fills more than one screen (as might be the case when viewing a binary file, for instance), a .Dq Li --More-- prompt is printed on the last line. From owner-svn-src-stable-8@FreeBSD.ORG Wed Feb 16 21:41:44 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85F8E106567A; Wed, 16 Feb 2011 21:41:44 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 745218FC15; Wed, 16 Feb 2011 21:41:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1GLfiXB084980; Wed, 16 Feb 2011 21:41:44 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1GLfi0d084978; Wed, 16 Feb 2011 21:41:44 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201102162141.p1GLfi0d084978@svn.freebsd.org> From: Bruce Cran Date: Wed, 16 Feb 2011 21:41:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218758 - stable/8/share/examples/pf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2011 21:41:44 -0000 Author: brucec Date: Wed Feb 16 21:41:44 2011 New Revision: 218758 URL: http://svn.freebsd.org/changeset/base/218758 Log: MFC r218620: If the pf.conf(5) example file is copied when setting up a firewall it's easy to forget about icmp. Update the file to show allowing icmp through the firewall. PR: docs/144096 Modified: stable/8/share/examples/pf/pf.conf Directory Properties: stable/8/share/examples/ (props changed) stable/8/share/examples/etc/ (props changed) stable/8/share/examples/kld/syscall/ (props changed) Modified: stable/8/share/examples/pf/pf.conf ============================================================================== --- stable/8/share/examples/pf/pf.conf Wed Feb 16 21:29:13 2011 (r218757) +++ stable/8/share/examples/pf/pf.conf Wed Feb 16 21:41:44 2011 (r218758) @@ -32,3 +32,4 @@ #pass in on $ext_if proto tcp to ($ext_if) port ssh #pass in log on $ext_if proto tcp to ($ext_if) port smtp #pass out log on $ext_if proto tcp from ($ext_if) to port smtp +#pass in on $ext_if proto icmp to ($ext_if) From owner-svn-src-stable-8@FreeBSD.ORG Wed Feb 16 22:27:51 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 580621065696; Wed, 16 Feb 2011 22:27:51 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (unknown [IPv6:2a01:348:0:15:5d59:5c40:0:1]) by mx1.freebsd.org (Postfix) with ESMTP id DB06F8FC2E; Wed, 16 Feb 2011 22:27:50 +0000 (UTC) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 2D585E75EF; Wed, 16 Feb 2011 22:27:48 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cran.org.uk; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=mail; bh=4Ftaofi2C+M9 wfgr/t5PvxFSd3I=; b=l5vZ/TbOhu8ANVWjlvX3Ja6VvSTbvhVuF4VdBK15RU1T KlxowYW480yGmuGf2hB4pE5lyq2A+UiGnAvTaUVPkEQwu0pq7tHJebYfId4zhRrV SV0d4ffCbDNr5gLXhBz1Tp08jDm0i28cLno2YHR4q+nxx3BUaybD99j08F8OZRQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=cran.org.uk; h=date:from:to :cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=mail; b=CcRb49 eKO9J2Kb1g6S2XN/On7HulxCpQi7TVd+MDOin/37RdZQ8R/eKJd7DJAfP+Ji9qB9 WEXOYB6b5ruJl7gsSFIipvsaeJPb6HG+XbV10EIuWFA4XytZgLutAdv+CLXgSpFC Ug6aOYqEZxoMzqj9w9ptDCBcmG4f8avxCBXSg= Received: from unknown (client-86-31-199-149.oxfd.adsl.virginmedia.com [86.31.199.149]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA id AB062E75A5; Wed, 16 Feb 2011 22:27:47 +0000 (GMT) Date: Wed, 16 Feb 2011 22:27:32 +0000 From: Bruce Cran To: Bruce Cran Message-ID: <20110216222732.000000d1@unknown> In-Reply-To: <201102162141.p1GLfi0d084978@svn.freebsd.org> References: <201102162141.p1GLfi0d084978@svn.freebsd.org> X-Mailer: Claws Mail 3.7.8cvs9 (GTK+ 2.16.6; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r218758 - stable/8/share/examples/pf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2011 22:27:51 -0000 On Wed, 16 Feb 2011 21:41:44 +0000 (UTC) Bruce Cran wrote: > Log: > MFC r218620: > > If the pf.conf(5) example file is copied when setting up a firewall > it's easy to forget about icmp. Update the file to show allowing icmp > through the firewall. > > PR: docs/144096 That should be docs/144986 . -- Bruce Cran From owner-svn-src-stable-8@FreeBSD.ORG Thu Feb 17 10:32:16 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D20C106564A; Thu, 17 Feb 2011 10:32:16 +0000 (UTC) (envelope-from itetcu@FreeBSD.org) Received: from worf.ds9.tecnik93.com (worf.ds9.tecnik93.com [81.196.207.130]) by mx1.freebsd.org (Postfix) with ESMTP id C932F8FC12; Thu, 17 Feb 2011 10:32:15 +0000 (UTC) Received: from User-PC (forte-asig.mediasat.ro [81.181.146.246]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by worf.ds9.tecnik93.com (Postfix) with ESMTPSA id E9F1F22C550B; Thu, 17 Feb 2011 12:13:08 +0200 (EET) Date: Thu, 17 Feb 2011 12:13:08 +0200 From: Ion-Mihai Tetcu To: Bruce Cran Message-Id: <20110217121308.578f7c10.itetcu@FreeBSD.org> In-Reply-To: <201102162110.p1GLApac083839@svn.freebsd.org> References: <201102162110.p1GLApac083839@svn.freebsd.org> X-Mailer: Sylpheed 3.0.3 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r218750 - stable/8/games/fortune/datfiles X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2011 10:32:16 -0000 On Wed, 16 Feb 2011 21:10:51 +0000 (UTC) Bruce Cran wrote: > Author: brucec > Date: Wed Feb 16 21:10:50 2011 > New Revision: 218750 > URL: http://svn.freebsd.org/changeset/base/218750 > > Log: > MFC r218650: > > Move potentially offensive fortune to fortunes-o. > > PR: bin/137702 > +PLATONIC FRIENDSHIP: > + What develops when two people get > + tired of making love to each other. > +% I really fail to understand what could be offensive here, but whatever ... -- Ion-Mihai Tetcu From owner-svn-src-stable-8@FreeBSD.ORG Thu Feb 17 15:56:19 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33342106564A for ; Thu, 17 Feb 2011 15:56:19 +0000 (UTC) (envelope-from sterling@camdensoftware.com) Received: from wh2.interactivevillages.com (wh2.interactivevillages.com [75.125.250.34]) by mx1.freebsd.org (Postfix) with ESMTP id EC6C88FC08 for ; Thu, 17 Feb 2011 15:56:18 +0000 (UTC) Received: from c-24-22-230-24.hsd1.wa.comcast.net ([24.22.230.24] helo=_HOSTNAME_) by wh2.interactivevillages.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1Pq5tm-00081Q-LJ for svn-src-stable-8@freebsd.org; Thu, 17 Feb 2011 07:36:07 -0800 Received: by _HOSTNAME_ (sSMTP sendmail emulation); Thu, 17 Feb 2011 07:36:06 -0800 Date: Thu, 17 Feb 2011 07:36:06 -0800 From: Chip Camden To: svn-src-stable-8@freebsd.org Message-ID: <20110217153606.GB37309@libertas.local.camdensoftware.com> Mail-Followup-To: svn-src-stable-8@freebsd.org References: <201102162110.p1GLApac083839@svn.freebsd.org> <20110217121308.578f7c10.itetcu@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="St7VIuEGZ6dlpu13" Content-Disposition: inline In-Reply-To: <20110217121308.578f7c10.itetcu@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Company: Camden Software Consulting URL: http://camdensoftware.com X-PGP-Key: http://pgp.mit.edu:11371/pks/lookup?search=0xD6DBAF91 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - wh2.interactivevillages.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - camdensoftware.com Subject: Re: svn commit: r218750 - stable/8/games/fortune/datfiles X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2011 15:56:19 -0000 --St7VIuEGZ6dlpu13 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoth Ion-Mihai Tetcu on Thursday, 17 February 2011: > On Wed, 16 Feb 2011 21:10:51 +0000 (UTC) > Bruce Cran wrote: >=20 > > Author: brucec > > Date: Wed Feb 16 21:10:50 2011 > > New Revision: 218750 > > URL: http://svn.freebsd.org/changeset/base/218750 > >=20 > > Log: > > MFC r218650: > > =20 > > Move potentially offensive fortune to fortunes-o. > > =20 > > PR: bin/137702 >=20 > > +PLATONIC FRIENDSHIP: > > + What develops when two people get > > + tired of making love to each other. > > +% >=20 > I really fail to understand what could be offensive here, but > whatever ... >=20 It might be offensive to someone who finds themselves in a Platonic friendship. --=20 Sterling (Chip) Camden | sterling@camdensoftware.com | 2048D/3A978E4F http://chipsquips.com | http://camdensoftware.com | http://chipstips.com --St7VIuEGZ6dlpu13 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQEcBAEBAgAGBQJNXUBmAAoJEIpckszW26+RlkgH/2qlY5514iG/2vm5b4UXw5rW iYFiqqe1a8/D4H24ZvdCBBRKHUVKHX2cp8xtcfPCIPi/x3Z7nm2flI3itNNdiXLp Bv39c4F62M2esBARjo7f1GH0qsA3AZvXKjGgMUIulNuhyU7KfLnRf39W7naUsqq+ nkfzYCFR15fiFqSHU8xq9jiMouB5KLc8h/2VPMJF+rFOV6Tsuta8X/G+r6FDsx39 qDe3zpO64rMVkbNRjyYE3xoTmsdVTYqbvLBclMGTiBXUyTjjDqkZKkxXqP5VwRAn 53l1g61PC5PQGT8C44qJ8X5T7z99MpKGSb2Dp+fBhVwoLYI/+MWpJh+7NichZp8= =HCFW -----END PGP SIGNATURE----- --St7VIuEGZ6dlpu13-- From owner-svn-src-stable-8@FreeBSD.ORG Fri Feb 18 00:02:36 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 458E81065672; Fri, 18 Feb 2011 00:02:36 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 31AA78FC1F; Fri, 18 Feb 2011 00:02:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1I02akW035826; Fri, 18 Feb 2011 00:02:36 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1I02aX7035821; Fri, 18 Feb 2011 00:02:36 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201102180002.p1I02aX7035821@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 18 Feb 2011 00:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218785 - stable/8/lib/libkvm X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2011 00:02:36 -0000 Author: obrien Date: Fri Feb 18 00:02:35 2011 New Revision: 218785 URL: http://svn.freebsd.org/changeset/base/218785 Log: MFC: r214904: bring MIPS minidump support to libkvm Added: stable/8/lib/libkvm/kvm_minidump_mips.c - copied unchanged from r214904, head/lib/libkvm/kvm_minidump_mips.c Modified: stable/8/lib/libkvm/Makefile stable/8/lib/libkvm/kvm_mips.c stable/8/lib/libkvm/kvm_private.h Directory Properties: stable/8/lib/libkvm/ (props changed) Modified: stable/8/lib/libkvm/Makefile ============================================================================== --- stable/8/lib/libkvm/Makefile Thu Feb 17 22:48:22 2011 (r218784) +++ stable/8/lib/libkvm/Makefile Fri Feb 18 00:02:35 2011 (r218785) @@ -11,7 +11,8 @@ CFLAGS+=-DSUN4V SRCS= kvm.c kvm_${MACHINE_ARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \ kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c kvm_vnet.c -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm" +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \ +${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "mips" SRCS+= kvm_minidump_${MACHINE_ARCH}.c .endif INCS= kvm.h Copied: stable/8/lib/libkvm/kvm_minidump_mips.c (from r214904, head/lib/libkvm/kvm_minidump_mips.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/libkvm/kvm_minidump_mips.c Fri Feb 18 00:02:35 2011 (r218785, copy of r214904, head/lib/libkvm/kvm_minidump_mips.c) @@ -0,0 +1,275 @@ +/*- + * Copyright (c) 2010 Oleksandr Tymoshenko + * Copyright (c) 2008 Semihalf, Grzegorz Bernacki + * Copyright (c) 2006 Peter Wemm + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * From: FreeBSD: src/lib/libkvm/kvm_minidump_arm.c r214223 + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * MIPS machine dependent routines for kvm and minidumps. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include + +#include "kvm_private.h" + +struct hpte { + struct hpte *next; + uint64_t pa; + int64_t off; +}; + +#define HPT_SIZE 1024 + +/* minidump must be the first field */ +struct vmstate { + int minidump; /* 1 = minidump mode */ + struct minidumphdr hdr; + void *hpt_head[HPT_SIZE]; + uint32_t *bitmap; + void *ptemap; +}; + +static void +hpt_insert(kvm_t *kd, uint64_t pa, int64_t off) +{ + struct hpte *hpte; + uint32_t fnv = FNV1_32_INIT; + + fnv = fnv_32_buf(&pa, sizeof(pa), fnv); + fnv &= (HPT_SIZE - 1); + hpte = malloc(sizeof(*hpte)); + hpte->pa = pa; + hpte->off = off; + hpte->next = kd->vmst->hpt_head[fnv]; + kd->vmst->hpt_head[fnv] = hpte; +} + +static int64_t +hpt_find(kvm_t *kd, uint64_t pa) +{ + struct hpte *hpte; + uint32_t fnv = FNV1_32_INIT; + + fnv = fnv_32_buf(&pa, sizeof(pa), fnv); + fnv &= (HPT_SIZE - 1); + for (hpte = kd->vmst->hpt_head[fnv]; hpte != NULL; hpte = hpte->next) + if (pa == hpte->pa) + return (hpte->off); + + return (-1); +} + +static int +inithash(kvm_t *kd, uint32_t *base, int len, off_t off) +{ + uint64_t idx, pa; + uint32_t bit, bits; + + for (idx = 0; idx < len / sizeof(*base); idx++) { + bits = base[idx]; + while (bits) { + bit = ffs(bits) - 1; + bits &= ~(1ul << bit); + pa = (idx * sizeof(*base) * NBBY + bit) * PAGE_SIZE; + hpt_insert(kd, pa, off); + off += PAGE_SIZE; + } + } + + return (off); +} + +void +_kvm_minidump_freevtop(kvm_t *kd) +{ + struct vmstate *vm = kd->vmst; + + if (vm->bitmap) + free(vm->bitmap); + if (vm->ptemap) + free(vm->ptemap); + free(vm); + kd->vmst = NULL; +} + +int +_kvm_minidump_initvtop(kvm_t *kd) +{ + u_long pa; + struct vmstate *vmst; + off_t off; + + vmst = _kvm_malloc(kd, sizeof(*vmst)); + if (vmst == 0) { + _kvm_err(kd, kd->program, "cannot allocate vm"); + return (-1); + } + + kd->vmst = vmst; + vmst->minidump = 1; + + off = lseek(kd->pmfd, 0, SEEK_CUR); + if (pread(kd->pmfd, &vmst->hdr, + sizeof(vmst->hdr), 0) != sizeof(vmst->hdr)) { + _kvm_err(kd, kd->program, "cannot read dump header"); + return (-1); + } + + if (strncmp(MINIDUMP_MAGIC, vmst->hdr.magic, + sizeof(vmst->hdr.magic)) != 0) { + _kvm_err(kd, kd->program, "not a minidump for this platform"); + return (-1); + } + if (vmst->hdr.version != MINIDUMP_VERSION) { + _kvm_err(kd, kd->program, "wrong minidump version. " + "Expected %d got %d", MINIDUMP_VERSION, vmst->hdr.version); + return (-1); + } + + /* Skip header and msgbuf */ + off = PAGE_SIZE + round_page(vmst->hdr.msgbufsize); + + vmst->bitmap = _kvm_malloc(kd, vmst->hdr.bitmapsize); + if (vmst->bitmap == NULL) { + _kvm_err(kd, kd->program, "cannot allocate %d bytes for " + "bitmap", vmst->hdr.bitmapsize); + return (-1); + } + + if (pread(kd->pmfd, vmst->bitmap, vmst->hdr.bitmapsize, off) != + vmst->hdr.bitmapsize) { + _kvm_err(kd, kd->program, "cannot read %d bytes for page bitmap", + vmst->hdr.bitmapsize); + return (-1); + } + off += round_page(vmst->hdr.bitmapsize); + + vmst->ptemap = _kvm_malloc(kd, vmst->hdr.ptesize); + if (vmst->ptemap == NULL) { + _kvm_err(kd, kd->program, "cannot allocate %d bytes for " + "ptemap", vmst->hdr.ptesize); + return (-1); + } + + if (pread(kd->pmfd, vmst->ptemap, vmst->hdr.ptesize, off) != + vmst->hdr.ptesize) { + _kvm_err(kd, kd->program, "cannot read %d bytes for ptemap", + vmst->hdr.ptesize); + return (-1); + } + + off += vmst->hdr.ptesize; + + /* Build physical address hash table for sparse pages */ + inithash(kd, vmst->bitmap, vmst->hdr.bitmapsize, off); + + return (0); +} + +int +_kvm_minidump_kvatop(kvm_t *kd, u_long va, off_t *pa) +{ + struct vmstate *vm; + pt_entry_t pte; + u_long offset, pteindex, a; + off_t ofs; + pt_entry_t *ptemap; + int i; + + if (ISALIVE(kd)) { + _kvm_err(kd, 0, "kvm_kvatop called in live kernel!"); + return (0); + } + + offset = va & PAGE_MASK; + /* Operate with page-aligned address */ + va &= ~PAGE_MASK; + + vm = kd->vmst; + ptemap = vm->ptemap; + +#if defined(__mips_n64) + if (va >= MIPS_XKPHYS_START && va < MIPS_XKPHYS_END) + a = (MIPS_XKPHYS_TO_PHYS(va)); + else +#endif + if (va >= MIPS_KSEG0_START && va < MIPS_KSEG0_END) + a = (MIPS_KSEG0_TO_PHYS(va)); + else if (va >= MIPS_KSEG1_START && va < MIPS_KSEG1_END) + a = (MIPS_KSEG1_TO_PHYS(va)); + else if (va >= vm->hdr.kernbase) { + pteindex = (va - vm->hdr.kernbase) >> PAGE_SHIFT; + pte = ptemap[pteindex]; + if (!pte) { + _kvm_err(kd, kd->program, "_kvm_vatop: pte not valid"); + goto invalid; + } + + a = TLBLO_PTE_TO_PA(pte); + + } else { + _kvm_err(kd, kd->program, "_kvm_vatop: virtual address 0x%lx " + "not minidumped", va); + return (0); + } + + ofs = hpt_find(kd, a); + if (ofs == -1) { + _kvm_err(kd, kd->program, "_kvm_vatop: physical " + "address 0x%lx not in minidump", a); + goto invalid; + } + + *pa = ofs + offset; + return (PAGE_SIZE - offset); + + +invalid: + _kvm_err(kd, 0, "invalid address (0x%lx)", va); + return (0); +} Modified: stable/8/lib/libkvm/kvm_mips.c ============================================================================== --- stable/8/lib/libkvm/kvm_mips.c Thu Feb 17 22:48:22 2011 (r218784) +++ stable/8/lib/libkvm/kvm_mips.c Fri Feb 18 00:02:35 2011 (r218785) @@ -49,29 +49,62 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include "kvm_private.h" +/* minidump must be the first item! */ +struct vmstate { + int minidump; /* 1 = minidump mode */ + void *mmapbase; + size_t mmapsize; +}; + void _kvm_freevtop(kvm_t *kd) { - - _kvm_err(kd, 0, "Unimplemented function"); + if (kd->vmst != 0) { + if (kd->vmst->minidump) + return (_kvm_minidump_freevtop(kd)); + if (kd->vmst->mmapbase != NULL) + munmap(kd->vmst->mmapbase, kd->vmst->mmapsize); + free(kd->vmst); + kd->vmst = NULL; + } } int _kvm_initvtop(kvm_t *kd) { + char minihdr[8]; - _kvm_err(kd, 0, "Unimplemented function"); - return (0); + if (!kd->rawdump) { + if (pread(kd->pmfd, &minihdr, 8, 0) == 8) { + if (memcmp(&minihdr, "minidump", 8) == 0) + return (_kvm_minidump_initvtop(kd)); + } else { + _kvm_err(kd, kd->program, "cannot read header"); + return (-1); + } + } + + _kvm_err(kd, 0, "_kvm_initvtop: Unsupported image type"); + return (-1); } int -_kvm_kvatop(kvm_t *kd, u_long va __unused, off_t *pa __unused) +_kvm_kvatop(kvm_t *kd, u_long va , off_t *pa) { - _kvm_err(kd, 0, "Unimplemented function"); + u_long offset = va & (PAGE_SIZE - 1); + struct vmstate *vm = kd->vmst; + + if (kd->vmst->minidump) + return _kvm_minidump_kvatop(kd, va, pa); + + + _kvm_err(kd, 0, "_kvm_kvatop: Unsupported image type"); return (0); } @@ -81,10 +114,8 @@ _kvm_kvatop(kvm_t *kd, u_long va __unuse * have to deal with these NOT being constants! (i.e. m68k) */ int -_kvm_mdopen(kd) - kvm_t *kd; +_kvm_mdopen(kvm_t *kd __unused) { - _kvm_err(kd, 0, "Unimplemented function"); return (0); } Modified: stable/8/lib/libkvm/kvm_private.h ============================================================================== --- stable/8/lib/libkvm/kvm_private.h Thu Feb 17 22:48:22 2011 (r218784) +++ stable/8/lib/libkvm/kvm_private.h Fri Feb 18 00:02:35 2011 (r218785) @@ -104,7 +104,8 @@ uintptr_t _kvm_vnet_validaddr(kvm_t *, u int _kvm_dpcpu_initialized(kvm_t *, int); uintptr_t _kvm_dpcpu_validaddr(kvm_t *, uintptr_t); -#if defined(__amd64__) || defined(__i386__) || defined(__arm__) +#if defined(__amd64__) || defined(__i386__) || defined(__arm__) || \ + defined(__mips__) void _kvm_minidump_freevtop(kvm_t *); int _kvm_minidump_initvtop(kvm_t *); int _kvm_minidump_kvatop(kvm_t *, u_long, off_t *); From owner-svn-src-stable-8@FreeBSD.ORG Fri Feb 18 09:47:58 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D90851065670; Fri, 18 Feb 2011 09:47:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C6BAF8FC0C; Fri, 18 Feb 2011 09:47:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1I9lw84050842; Fri, 18 Feb 2011 09:47:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1I9lwON050840; Fri, 18 Feb 2011 09:47:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201102180947.p1I9lwON050840@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 18 Feb 2011 09:47:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218795 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2011 09:47:59 -0000 Author: kib Date: Fri Feb 18 09:47:58 2011 New Revision: 218795 URL: http://svn.freebsd.org/changeset/base/218795 Log: MFC r218550: For UIO_NOCOPY case of reading request on zfs vnode, which has vm object attached, activate the page after the successful read, and free the page if read was unsuccessfull. Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Feb 18 09:40:13 2011 (r218794) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Feb 18 09:47:58 2011 (r218795) @@ -504,9 +504,15 @@ again: zfs_unmap_page(sf); } VM_OBJECT_LOCK(obj); - if (error == 0) - m->valid = VM_PAGE_BITS_ALL; vm_page_io_finish(m); + vm_page_lock_queues(); + if (error == 0) { + m->valid = VM_PAGE_BITS_ALL; + vm_page_activate(m); + } else + vm_page_free(m); + vm_page_unlock_queues(); + if (error == 0) { uio->uio_resid -= bytes; uio->uio_offset += bytes; From owner-svn-src-stable-8@FreeBSD.ORG Fri Feb 18 16:29:39 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 348AF106566B; Fri, 18 Feb 2011 16:29:39 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1ED108FC18; Fri, 18 Feb 2011 16:29:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1IGTdFk064420; Fri, 18 Feb 2011 16:29:39 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1IGTc8C064411; Fri, 18 Feb 2011 16:29:38 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201102181629.p1IGTc8C064411@svn.freebsd.org> From: "Kenneth D. Merry" Date: Fri, 18 Feb 2011 16:29:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218810 - in stable/8/sys: amd64/conf conf dev/bwn dev/mps dev/siba dev/sis mips/mips modules modules/mps X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2011 16:29:39 -0000 Author: ken Date: Fri Feb 18 16:29:38 2011 New Revision: 218810 URL: http://svn.freebsd.org/changeset/base/218810 Log: MFC: 212420, 212616, 212772, 212802, 213535, 213702, 213704, 213707, 213708, 213743, 213839, 213840, 213882, 213898, 216088, 216227, 216363, 216368: Merge the mps(4) driver into stable/8. This is currently only included in GENERIC on amd64, since that is the only architecture it has been tested on. Added: stable/8/sys/dev/mps/ - copied from r212420, head/sys/dev/mps/ stable/8/sys/modules/mps/ - copied from r212420, head/sys/modules/mps/ Modified: stable/8/sys/amd64/conf/GENERIC stable/8/sys/conf/files stable/8/sys/dev/bwn/if_bwn.c stable/8/sys/dev/mps/mps.c stable/8/sys/dev/mps/mps_ioctl.h stable/8/sys/dev/mps/mps_pci.c stable/8/sys/dev/mps/mps_sas.c stable/8/sys/dev/mps/mps_user.c stable/8/sys/dev/mps/mpsvar.h stable/8/sys/dev/siba/siba_bwn.c stable/8/sys/dev/sis/if_sisreg.h stable/8/sys/mips/mips/mp_machdep.c stable/8/sys/modules/Makefile stable/8/sys/modules/mps/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/conf/GENERIC ============================================================================== --- stable/8/sys/amd64/conf/GENERIC Fri Feb 18 16:21:09 2011 (r218809) +++ stable/8/sys/amd64/conf/GENERIC Fri Feb 18 16:29:38 2011 (r218810) @@ -114,6 +114,7 @@ device hptiop # Highpoint RocketRaid 3 device isp # Qlogic family #device ispfw # Firmware for QLogic HBAs- normally a module device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 #device ncr # NCR/Symbios Logic device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') device trm # Tekram DC395U/UW/F DC315U adapters Modified: stable/8/sys/conf/files ============================================================================== --- stable/8/sys/conf/files Fri Feb 18 16:21:09 2011 (r218809) +++ stable/8/sys/conf/files Fri Feb 18 16:29:38 2011 (r218810) @@ -1303,6 +1303,11 @@ dev/mmc/mmcbr_if.m standard dev/mmc/mmcbus_if.m standard dev/mmc/mmcsd.c optional mmcsd dev/mn/if_mn.c optional mn pci +dev/mps/mps.c optional mps +dev/mps/mps_pci.c optional mps pci +dev/mps/mps_sas.c optional mps +dev/mps/mps_table.c optional mps +dev/mps/mps_user.c optional mps dev/mpt/mpt.c optional mpt dev/mpt/mpt_cam.c optional mpt dev/mpt/mpt_debug.c optional mpt Modified: stable/8/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/8/sys/dev/bwn/if_bwn.c Fri Feb 18 16:21:09 2011 (r218809) +++ stable/8/sys/dev/bwn/if_bwn.c Fri Feb 18 16:29:38 2011 (r218810) @@ -2882,7 +2882,7 @@ bwn_set_channel(struct ieee80211com *ic) error = bwn_switch_band(sc, ic->ic_curchan); if (error) - goto fail;; + goto fail; bwn_mac_suspend(mac); bwn_set_txretry(mac, BWN_RETRY_SHORT, BWN_RETRY_LONG); chan = ieee80211_chan2ieee(ic, ic->ic_curchan); @@ -8260,7 +8260,7 @@ bwn_switch_band(struct bwn_softc *sc, st device_printf(sc->sc_dev, "switching to %s-GHz band\n", IEEE80211_IS_CHAN_2GHZ(chan) ? "2" : "5"); - down_dev = sc->sc_curmac;; + down_dev = sc->sc_curmac; status = down_dev->mac_status; if (status >= BWN_MAC_STATUS_STARTED) bwn_core_stop(down_dev); Modified: stable/8/sys/dev/mps/mps.c ============================================================================== --- head/sys/dev/mps/mps.c Fri Sep 10 15:03:56 2010 (r212420) +++ stable/8/sys/dev/mps/mps.c Fri Feb 18 16:29:38 2011 (r218810) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -380,7 +381,7 @@ mps_request_sync(struct mps_softc *sc, v return (0); } -static void +void mps_enqueue_request(struct mps_softc *sc, struct mps_command *cm) { @@ -607,9 +608,16 @@ mps_alloc_queues(struct mps_softc *sc) static int mps_alloc_replies(struct mps_softc *sc) { - int rsize; + int rsize, num_replies; + + /* + * sc->num_replies should be one less than sc->fqdepth. We need to + * allocate space for sc->fqdepth replies, but only sc->num_replies + * replies can be used at once. + */ + num_replies = max(sc->fqdepth, sc->num_replies); - rsize = sc->facts->ReplyFrameSize * sc->num_replies * 4; + rsize = sc->facts->ReplyFrameSize * num_replies * 4; if (bus_dma_tag_create( sc->mps_parent_dmat, /* parent */ 4, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ @@ -782,11 +790,19 @@ mps_init_queues(struct mps_softc *sc) memset((uint8_t *)sc->post_queue, 0xff, sc->pqdepth * 8); + /* + * According to the spec, we need to use one less reply than we + * have space for on the queue. So sc->num_replies (the number we + * use) should be less than sc->fqdepth (allocated size). + */ if (sc->num_replies >= sc->fqdepth) return (EINVAL); - for (i = 0; i < sc->num_replies; i++) - sc->free_queue[i] = sc->reply_busaddr + i * sc->facts->ReplyFrameSize * 4; + /* + * Initialize all of the free queue entries. + */ + for (i = 0; i < sc->fqdepth; i++) + sc->free_queue[i] = sc->reply_busaddr + (i * sc->facts->ReplyFrameSize * 4); sc->replyfreeindex = sc->num_replies; return (0); @@ -805,6 +821,9 @@ mps_attach(struct mps_softc *sc) snprintf(tmpstr, sizeof(tmpstr), "hw.mps.%d.debug_level", device_get_unit(sc->mps_dev)); TUNABLE_INT_FETCH(tmpstr, &sc->mps_debug); + snprintf(tmpstr, sizeof(tmpstr), "hw.mps.%d.allow_multiple_tm_cmds", + device_get_unit(sc->mps_dev)); + TUNABLE_INT_FETCH(tmpstr, &sc->allow_multiple_tm_cmds); mps_dprint(sc, MPS_TRACE, "%s\n", __func__); @@ -831,6 +850,11 @@ mps_attach(struct mps_softc *sc) OID_AUTO, "debug_level", CTLFLAG_RW, &sc->mps_debug, 0, "mps debug level"); + SYSCTL_ADD_INT(&sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), + OID_AUTO, "allow_multiple_tm_cmds", CTLFLAG_RW, + &sc->allow_multiple_tm_cmds, 0, + "allow multiple simultaneous task management cmds"); + if ((error = mps_transition_ready(sc)) != 0) return (error); @@ -873,6 +897,7 @@ mps_attach(struct mps_softc *sc) sc->facts->MaxReplyDescriptorPostQueueDepth) - 1; TAILQ_INIT(&sc->req_list); TAILQ_INIT(&sc->chain_list); + TAILQ_INIT(&sc->tm_list); if (((error = mps_alloc_queues(sc)) != 0) || ((error = mps_alloc_replies(sc)) != 0) || @@ -898,7 +923,6 @@ mps_attach(struct mps_softc *sc) * replies. */ sc->replypostindex = 0; - sc->replycurindex = 0; mps_regwrite(sc, MPI2_REPLY_FREE_HOST_INDEX_OFFSET, sc->replyfreeindex); mps_regwrite(sc, MPI2_REPLY_POST_HOST_INDEX_OFFSET, 0); @@ -915,7 +939,10 @@ mps_attach(struct mps_softc *sc) /* Attach the subsystems so they can prepare their event masks. */ /* XXX Should be dynamic so that IM/IR and user modules can attach */ if (((error = mps_attach_log(sc)) != 0) || - ((error = mps_attach_sas(sc)) != 0)) { + ((error = mps_attach_sas(sc)) != 0) || + ((error = mps_attach_user(sc)) != 0)) { + mps_printf(sc, "%s failed to attach all subsystems: error %d\n", + __func__, error); mps_free(sc); return (error); } @@ -1199,7 +1226,8 @@ mps_intr_locked(void *data) desc = &sc->post_queue[pq]; flags = desc->Default.ReplyFlags & MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK; - if (flags == MPI2_RPY_DESCRIPT_FLAGS_UNUSED) + if ((flags == MPI2_RPY_DESCRIPT_FLAGS_UNUSED) + || (desc->Words.High == 0xffffffff)) break; switch (flags) { @@ -1212,9 +1240,36 @@ mps_intr_locked(void *data) uint32_t baddr; uint8_t *reply; + /* + * Re-compose the reply address from the address + * sent back from the chip. The ReplyFrameAddress + * is the lower 32 bits of the physical address of + * particular reply frame. Convert that address to + * host format, and then use that to provide the + * offset against the virtual address base + * (sc->reply_frames). + */ + baddr = le32toh(desc->AddressReply.ReplyFrameAddress); reply = sc->reply_frames + - sc->replycurindex * sc->facts->ReplyFrameSize * 4; - baddr = desc->AddressReply.ReplyFrameAddress; + (baddr - ((uint32_t)sc->reply_busaddr)); + /* + * Make sure the reply we got back is in a valid + * range. If not, go ahead and panic here, since + * we'll probably panic as soon as we deference the + * reply pointer anyway. + */ + if ((reply < sc->reply_frames) + || (reply > (sc->reply_frames + + (sc->fqdepth * sc->facts->ReplyFrameSize * 4)))) { + printf("%s: WARNING: reply %p out of range!\n", + __func__, reply); + printf("%s: reply_frames %p, fqdepth %d, " + "frame size %d\n", __func__, + sc->reply_frames, sc->fqdepth, + sc->facts->ReplyFrameSize * 4); + printf("%s: baddr %#x,\n", __func__, baddr); + panic("Reply address out of range"); + } if (desc->AddressReply.SMID == 0) { mps_dispatch_event(sc, baddr, (MPI2_EVENT_NOTIFICATION_REPLY *) reply); @@ -1224,8 +1279,6 @@ mps_intr_locked(void *data) cm->cm_reply_data = desc->AddressReply.ReplyFrameAddress; } - if (++sc->replycurindex >= sc->fqdepth) - sc->replycurindex = 0; break; } case MPI2_RPY_DESCRIPT_FLAGS_TARGETASSIST_SUCCESS: @@ -1270,7 +1323,7 @@ mps_dispatch_event(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *reply) { struct mps_event_handle *eh; - int event, handled = 0;; + int event, handled = 0; event = reply->Event; TAILQ_FOREACH(eh, &sc->event_list, eh_list) { @@ -1365,33 +1418,88 @@ mps_deregister_events(struct mps_softc * return (mps_update_events(sc, NULL, NULL)); } -static void -mps_data_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +/* + * Add a chain element as the next SGE for the specified command. + * Reset cm_sge and cm_sgesize to indicate all the available space. + */ +static int +mps_add_chain(struct mps_command *cm) { - MPI2_SGE_SIMPLE64 *sge; MPI2_SGE_CHAIN32 *sgc; - struct mps_softc *sc; - struct mps_command *cm; struct mps_chain *chain; - u_int i, segsleft, sglspace, dir, flags, sflags; + int space; - cm = (struct mps_command *)arg; - sc = cm->cm_sc; + if (cm->cm_sglsize < MPS_SGC_SIZE) + panic("MPS: Need SGE Error Code\n"); - segsleft = nsegs; - sglspace = cm->cm_sglsize; - sge = (MPI2_SGE_SIMPLE64 *)&cm->cm_sge->MpiSimple; + chain = mps_alloc_chain(cm->cm_sc); + if (chain == NULL) + return (ENOBUFS); + + space = (int)cm->cm_sc->facts->IOCRequestFrameSize * 4; /* - * Set up DMA direction flags. Note no support for - * bi-directional transactions. + * Note: a double-linked list is used to make it easier to + * walk for debugging. */ - sflags = MPI2_SGE_FLAGS_ADDRESS_SIZE; - if (cm->cm_flags & MPS_CM_FLAGS_DATAOUT) { - sflags |= MPI2_SGE_FLAGS_DIRECTION; - dir = BUS_DMASYNC_PREWRITE; - } else - dir = BUS_DMASYNC_PREREAD; + TAILQ_INSERT_TAIL(&cm->cm_chain_list, chain, chain_link); + + sgc = (MPI2_SGE_CHAIN32 *)&cm->cm_sge->MpiChain; + sgc->Length = space; + sgc->NextChainOffset = 0; + sgc->Flags = MPI2_SGE_FLAGS_CHAIN_ELEMENT; + sgc->Address = chain->chain_busaddr; + + cm->cm_sge = (MPI2_SGE_IO_UNION *)&chain->chain->MpiSimple; + cm->cm_sglsize = space; + return (0); +} + +/* + * Add one scatter-gather element (chain, simple, transaction context) + * to the scatter-gather list for a command. Maintain cm_sglsize and + * cm_sge as the remaining size and pointer to the next SGE to fill + * in, respectively. + */ +int +mps_push_sge(struct mps_command *cm, void *sgep, size_t len, int segsleft) +{ + MPI2_SGE_TRANSACTION_UNION *tc = sgep; + MPI2_SGE_SIMPLE64 *sge = sgep; + int error, type; + + type = (tc->Flags & MPI2_SGE_FLAGS_ELEMENT_MASK); + +#ifdef INVARIANTS + switch (type) { + case MPI2_SGE_FLAGS_TRANSACTION_ELEMENT: { + if (len != tc->DetailsLength + 4) + panic("TC %p length %u or %zu?", tc, + tc->DetailsLength + 4, len); + } + break; + case MPI2_SGE_FLAGS_CHAIN_ELEMENT: + /* Driver only uses 32-bit chain elements */ + if (len != MPS_SGC_SIZE) + panic("CHAIN %p length %u or %zu?", sgep, + MPS_SGC_SIZE, len); + break; + case MPI2_SGE_FLAGS_SIMPLE_ELEMENT: + /* Driver only uses 64-bit SGE simple elements */ + sge = sgep; + if (len != MPS_SGE64_SIZE) + panic("SGE simple %p length %u or %zu?", sge, + MPS_SGE64_SIZE, len); + if (((sge->FlagsLength >> MPI2_SGE_FLAGS_SHIFT) & + MPI2_SGE_FLAGS_ADDRESS_SIZE) == 0) + panic("SGE simple %p flags %02x not marked 64-bit?", + sge, sge->FlagsLength >> MPI2_SGE_FLAGS_SHIFT); + + break; + default: + panic("Unexpected SGE %p, flags %02x", tc, tc->Flags); + } +#endif /* * case 1: 1 more segment, enough room for it @@ -1399,70 +1507,164 @@ mps_data_cb(void *arg, bus_dma_segment_t * case 3: >=2 more segments, only enough room for 1 and a chain * case 4: >=1 more segment, enough room for only a chain * case 5: >=1 more segment, no room for anything (error) - */ + */ - for (i = 0; i < nsegs; i++) { + /* + * There should be room for at least a chain element, or this + * code is buggy. Case (5). + */ + if (cm->cm_sglsize < MPS_SGC_SIZE) + panic("MPS: Need SGE Error Code\n"); - /* Case 5 Error. This should never happen. */ - if (sglspace < MPS_SGC_SIZE) { - panic("MPS: Need SGE Error Code\n"); + if (segsleft >= 2 && + cm->cm_sglsize < len + MPS_SGC_SIZE + MPS_SGE64_SIZE) { + /* + * There are 2 or more segments left to add, and only + * enough room for 1 and a chain. Case (3). + * + * Mark as last element in this chain if necessary. + */ + if (type == MPI2_SGE_FLAGS_SIMPLE_ELEMENT) { + sge->FlagsLength |= + (MPI2_SGE_FLAGS_LAST_ELEMENT << MPI2_SGE_FLAGS_SHIFT); } /* - * Case 4, Fill in a chain element, allocate a chain, - * fill in one SGE element, continue. + * Add the item then a chain. Do the chain now, + * rather than on the next iteration, to simplify + * understanding the code. */ - if ((sglspace >= MPS_SGC_SIZE) && (sglspace < MPS_SGE64_SIZE)) { - chain = mps_alloc_chain(sc); - if (chain == NULL) { - /* Resource shortage, roll back! */ - printf("out of chain frames\n"); - return; - } + cm->cm_sglsize -= len; + bcopy(sgep, cm->cm_sge, len); + cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); + return (mps_add_chain(cm)); + } - /* - * Note: a double-linked list is used to make it - * easier to walk for debugging. - */ - TAILQ_INSERT_TAIL(&cm->cm_chain_list, chain,chain_link); + if (segsleft >= 1 && cm->cm_sglsize < len + MPS_SGC_SIZE) { + /* + * 1 or more segment, enough room for only a chain. + * Hope the previous element wasn't a Simple entry + * that needed to be marked with + * MPI2_SGE_FLAGS_LAST_ELEMENT. Case (4). + */ + if ((error = mps_add_chain(cm)) != 0) + return (error); + } - sgc = (MPI2_SGE_CHAIN32 *)sge; - sgc->Length = 128; - sgc->NextChainOffset = 0; - sgc->Flags = MPI2_SGE_FLAGS_CHAIN_ELEMENT; - sgc->Address = chain->chain_busaddr; +#ifdef INVARIANTS + /* Case 1: 1 more segment, enough room for it. */ + if (segsleft == 1 && cm->cm_sglsize < len) + panic("1 seg left and no room? %u versus %zu", + cm->cm_sglsize, len); + + /* Case 2: 2 more segments, enough room for both */ + if (segsleft == 2 && cm->cm_sglsize < len + MPS_SGE64_SIZE) + panic("2 segs left and no room? %u versus %zu", + cm->cm_sglsize, len); +#endif - sge = (MPI2_SGE_SIMPLE64 *)&chain->chain->MpiSimple; - sglspace = 128; - } + if (segsleft == 1 && type == MPI2_SGE_FLAGS_SIMPLE_ELEMENT) { + /* + * Last element of the last segment of the entire + * buffer. + */ + sge->FlagsLength |= ((MPI2_SGE_FLAGS_LAST_ELEMENT | + MPI2_SGE_FLAGS_END_OF_BUFFER | + MPI2_SGE_FLAGS_END_OF_LIST) << MPI2_SGE_FLAGS_SHIFT); + } - flags = MPI2_SGE_FLAGS_SIMPLE_ELEMENT; - sge->FlagsLength = segs[i].ds_len | - ((sflags | flags) << MPI2_SGE_FLAGS_SHIFT); - mps_from_u64(segs[i].ds_addr, &sge->Address); + cm->cm_sglsize -= len; + bcopy(sgep, cm->cm_sge, len); + cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); + return (0); +} - /* Case 1, Fill in one SGE element and break */ - if (segsleft == 1) - break; +/* + * Add one dma segment to the scatter-gather list for a command. + */ +int +mps_add_dmaseg(struct mps_command *cm, vm_paddr_t pa, size_t len, u_int flags, + int segsleft) +{ + MPI2_SGE_SIMPLE64 sge; + + /* + * This driver always uses 64-bit address elements for + * simplicity. + */ + flags |= MPI2_SGE_FLAGS_SIMPLE_ELEMENT | MPI2_SGE_FLAGS_ADDRESS_SIZE; + sge.FlagsLength = len | (flags << MPI2_SGE_FLAGS_SHIFT); + mps_from_u64(pa, &sge.Address); - sglspace -= MPS_SGE64_SIZE; - segsleft--; + return (mps_push_sge(cm, &sge, sizeof sge, segsleft)); +} + +static void +mps_data_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + struct mps_softc *sc; + struct mps_command *cm; + u_int i, dir, sflags; - /* Case 3, prepare for a chain on the next loop */ - if ((segsleft > 0) && (sglspace < MPS_SGE64_SIZE)) - sge->FlagsLength |= - (MPI2_SGE_FLAGS_LAST_ELEMENT << - MPI2_SGE_FLAGS_SHIFT); - - /* Advance to the next element to be filled in. */ - sge++; - } - - /* Last element of the last segment of the entire buffer */ - flags = MPI2_SGE_FLAGS_LAST_ELEMENT | - MPI2_SGE_FLAGS_END_OF_BUFFER | - MPI2_SGE_FLAGS_END_OF_LIST; - sge->FlagsLength |= (flags << MPI2_SGE_FLAGS_SHIFT); + cm = (struct mps_command *)arg; + sc = cm->cm_sc; + + /* + * In this case, just print out a warning and let the chip tell the + * user they did the wrong thing. + */ + if ((cm->cm_max_segs != 0) && (nsegs > cm->cm_max_segs)) { + mps_printf(sc, "%s: warning: busdma returned %d segments, " + "more than the %d allowed\n", __func__, nsegs, + cm->cm_max_segs); + } + + /* + * Set up DMA direction flags. Note that we don't support + * bi-directional transfers, with the exception of SMP passthrough. + */ + sflags = 0; + if (cm->cm_flags & MPS_CM_FLAGS_SMP_PASS) { + /* + * We have to add a special case for SMP passthrough, there + * is no easy way to generically handle it. The first + * S/G element is used for the command (therefore the + * direction bit needs to be set). The second one is used + * for the reply. We'll leave it to the caller to make + * sure we only have two buffers. + */ + /* + * Even though the busdma man page says it doesn't make + * sense to have both direction flags, it does in this case. + * We have one s/g element being accessed in each direction. + */ + dir = BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD; + + /* + * Set the direction flag on the first buffer in the SMP + * passthrough request. We'll clear it for the second one. + */ + sflags |= MPI2_SGE_FLAGS_DIRECTION | + MPI2_SGE_FLAGS_END_OF_BUFFER; + } else if (cm->cm_flags & MPS_CM_FLAGS_DATAOUT) { + sflags |= MPI2_SGE_FLAGS_DIRECTION; + dir = BUS_DMASYNC_PREWRITE; + } else + dir = BUS_DMASYNC_PREREAD; + + for (i = 0; i < nsegs; i++) { + if ((cm->cm_flags & MPS_CM_FLAGS_SMP_PASS) + && (i != 0)) { + sflags &= ~MPI2_SGE_FLAGS_DIRECTION; + } + error = mps_add_dmaseg(cm, segs[i].ds_addr, segs[i].ds_len, + sflags, nsegs - i); + if (error != 0) { + /* Resource shortage, roll back! */ + mps_printf(sc, "out of chain frames\n"); + return; + } + } bus_dmamap_sync(sc->buffer_dmat, cm->cm_dmamap, dir); mps_enqueue_request(sc, cm); @@ -1470,13 +1672,27 @@ mps_data_cb(void *arg, bus_dma_segment_t return; } +static void +mps_data_cb2(void *arg, bus_dma_segment_t *segs, int nsegs, bus_size_t mapsize, + int error) +{ + mps_data_cb(arg, segs, nsegs, error); +} + +/* + * Note that the only error path here is from bus_dmamap_load(), which can + * return EINPROGRESS if it is waiting for resources. + */ int mps_map_command(struct mps_softc *sc, struct mps_command *cm) { MPI2_SGE_SIMPLE32 *sge; int error = 0; - if ((cm->cm_data != NULL) && (cm->cm_length != 0)) { + if (cm->cm_flags & MPS_CM_FLAGS_USE_UIO) { + error = bus_dmamap_load_uio(sc->buffer_dmat, cm->cm_dmamap, + &cm->cm_uio, mps_data_cb2, cm, 0); + } else if ((cm->cm_data != NULL) && (cm->cm_length != 0)) { error = bus_dmamap_load(sc->buffer_dmat, cm->cm_dmamap, cm->cm_data, cm->cm_length, mps_data_cb, cm, 0); } else { @@ -1490,7 +1706,7 @@ mps_map_command(struct mps_softc *sc, st MPI2_SGE_FLAGS_SHIFT; sge->Address = 0; } - mps_enqueue_request(sc, cm); + mps_enqueue_request(sc, cm); } return (error); @@ -1549,9 +1765,9 @@ mps_read_config_page(struct mps_softc *s cm->cm_flags = MPS_CM_FLAGS_SGE_SIMPLE | MPS_CM_FLAGS_DATAIN; cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; + cm->cm_complete_data = params; if (params->callback != NULL) { cm->cm_complete = mps_config_complete; - cm->cm_complete_data = params; return (mps_map_command(sc, cm)); } else { cm->cm_complete = NULL; Modified: stable/8/sys/dev/mps/mps_ioctl.h ============================================================================== --- head/sys/dev/mps/mps_ioctl.h Fri Sep 10 15:03:56 2010 (r212420) +++ stable/8/sys/dev/mps/mps_ioctl.h Fri Feb 18 16:29:38 2011 (r218810) @@ -103,44 +103,4 @@ struct mps_usr_command { #define MPSIO_RAID_ACTION _IOWR('M', 205, struct mps_raid_action) #define MPSIO_MPS_COMMAND _IOWR('M', 210, struct mps_usr_command) -#if defined(__amd64__) -struct mps_cfg_page_req32 { - MPI2_CONFIG_PAGE_HEADER header; - uint32_t page_address; - uint32_t buf; - int len; - uint16_t ioc_status; -}; - -struct mps_ext_cfg_page_req32 { - MPI2_CONFIG_EXTENDED_PAGE_HEADER header; - uint32_t page_address; - uint32_t buf; - int len; - uint16_t ioc_status; -}; - -struct mps_raid_action32 { - uint8_t action; - uint8_t volume_bus; - uint8_t volume_id; - uint8_t phys_disk_num; - uint32_t action_data_word; - uint32_t buf; - int len; - uint32_t volume_status; - uint32_t action_data[4]; - uint16_t action_status; - uint16_t ioc_status; - uint8_t write; -}; - -#define MPSIO_READ_CFG_HEADER32 _IOWR('M', 100, struct mps_cfg_page_req32) -#define MPSIO_READ_CFG_PAGE32 _IOWR('M', 101, struct mps_cfg_page_req32) -#define MPSIO_READ_EXT_CFG_HEADER32 _IOWR('M', 102, struct mps_ext_cfg_page_req32) -#define MPSIO_READ_EXT_CFG_PAGE32 _IOWR('M', 103, struct mps_ext_cfg_page_req32) -#define MPSIO_WRITE_CFG_PAGE32 _IOWR('M', 104, struct mps_cfg_page_req32) -#define MPSIO_RAID_ACTION32 _IOWR('M', 105, struct mps_raid_action32) -#endif - #endif /* !_MPS_IOCTL_H_ */ Modified: stable/8/sys/dev/mps/mps_pci.c ============================================================================== --- head/sys/dev/mps/mps_pci.c Fri Sep 10 15:03:56 2010 (r212420) +++ stable/8/sys/dev/mps/mps_pci.c Fri Feb 18 16:29:38 2011 (r218810) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/8/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Fri Sep 10 15:03:56 2010 (r212420) +++ stable/8/sys/dev/mps/mps_sas.c Fri Feb 18 16:29:38 2011 (r218810) @@ -41,6 +41,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -55,6 +57,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if __FreeBSD_version >= 900026 +#include +#endif #include #include @@ -69,9 +74,11 @@ struct mpssas_target { uint16_t handle; uint8_t linkrate; uint64_t devname; + uint64_t sasaddr; uint32_t devinfo; uint16_t encl_handle; uint16_t encl_slot; + uint16_t parent_handle; int flags; #define MPSSAS_TARGET_INABORT (1 << 0) #define MPSSAS_TARGET_INRESET (1 << 1) @@ -114,6 +121,7 @@ struct mpssas_devprobe { MALLOC_DEFINE(M_MPSSAS, "MPSSAS", "MPS SAS memory"); +static __inline int mpssas_set_lun(uint8_t *lun, u_int ccblun); static struct mpssas_target * mpssas_alloc_target(struct mpssas_softc *, struct mpssas_target *); static struct mpssas_target * mpssas_find_target(struct mpssas_softc *, int, @@ -135,14 +143,64 @@ static void mpssas_probe_device_complete static void mpssas_scsiio_timeout(void *data); static void mpssas_abort_complete(struct mps_softc *sc, struct mps_command *cm); static void mpssas_recovery(struct mps_softc *, struct mps_command *); +static int mpssas_map_tm_request(struct mps_softc *sc, struct mps_command *cm); +static void mpssas_issue_tm_request(struct mps_softc *sc, + struct mps_command *cm); +static void mpssas_tm_complete(struct mps_softc *sc, struct mps_command *cm, + int error); +static int mpssas_complete_tm_request(struct mps_softc *sc, + struct mps_command *cm, int free_cm); static void mpssas_action_scsiio(struct mpssas_softc *, union ccb *); static void mpssas_scsiio_complete(struct mps_softc *, struct mps_command *); -static int mpssas_resetdev(struct mpssas_softc *, struct mps_command *); +#if __FreeBSD_version >= 900026 +static void mpssas_smpio_complete(struct mps_softc *sc, struct mps_command *cm); +static void mpssas_send_smpcmd(struct mpssas_softc *sassc, union ccb *ccb, + uint64_t sasaddr); +static void mpssas_action_smpio(struct mpssas_softc *sassc, union ccb *ccb); +#endif /* __FreeBSD_version >= 900026 */ +static void mpssas_resetdev(struct mpssas_softc *, struct mps_command *); static void mpssas_action_resetdev(struct mpssas_softc *, union ccb *); static void mpssas_resetdev_complete(struct mps_softc *, struct mps_command *); static void mpssas_freeze_device(struct mpssas_softc *, struct mpssas_target *); static void mpssas_unfreeze_device(struct mpssas_softc *, struct mpssas_target *) __unused; +/* + * Abstracted so that the driver can be backwards and forwards compatible + * with future versions of CAM that will provide this functionality. + */ +#define MPS_SET_LUN(lun, ccblun) \ + mpssas_set_lun(lun, ccblun) + +static __inline int +mpssas_set_lun(uint8_t *lun, u_int ccblun) +{ + uint64_t *newlun; + + newlun = (uint64_t *)lun; + *newlun = 0; + if (ccblun <= 0xff) { + /* Peripheral device address method, LUN is 0 to 255 */ + lun[1] = ccblun; + } else if (ccblun <= 0x3fff) { + /* Flat space address method, LUN is <= 16383 */ + scsi_ulto2b(ccblun, lun); + lun[0] |= 0x40; + } else if (ccblun <= 0xffffff) { + /* Extended flat space address method, LUN is <= 16777215 */ + scsi_ulto3b(ccblun, &lun[1]); + /* Extended Flat space address method */ + lun[0] = 0xc0; + /* Length = 1, i.e. LUN is 3 bytes long */ + lun[0] |= 0x10; + /* Extended Address Method */ + lun[0] |= 0x02; + } else { + return (EINVAL); + } + + return (0); +} + static struct mpssas_target * mpssas_alloc_target(struct mpssas_softc *sassc, struct mpssas_target *probe) { @@ -305,6 +363,8 @@ mpssas_probe_device_complete(struct mps_ probe->target.devinfo = buf->DeviceInfo; probe->target.encl_handle = buf->EnclosureHandle; probe->target.encl_slot = buf->Slot; + probe->target.sasaddr = mps_to_u64(&buf->SASAddress); + probe->target.parent_handle = buf->ParentDevHandle; if (buf->DeviceInfo & MPI2_SAS_DEVICE_INFO_DIRECT_ATTACH) { params->page_address = @@ -438,7 +498,7 @@ mpssas_prepare_remove(struct mpssas_soft cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_complete = mpssas_remove_device; cm->cm_targ = targ; - mps_map_command(sc, cm); + mpssas_issue_tm_request(sc, cm); } static void @@ -453,6 +513,9 @@ mpssas_remove_device(struct mps_softc *s reply = (MPI2_SCSI_TASK_MANAGE_REPLY *)cm->cm_reply; handle = cm->cm_targ->handle; + + mpssas_complete_tm_request(sc, cm, /*free_cm*/ 0); + if (reply->IOCStatus != MPI2_IOCSTATUS_SUCCESS) { mps_printf(sc, "Failure 0x%x reseting device 0x%04x\n", reply->IOCStatus, handle); @@ -594,6 +657,7 @@ mps_attach_sas(struct mps_softc *sc) { struct mpssas_softc *sassc; int error = 0; + int num_sim_reqs; mps_dprint(sc, MPS_TRACE, "%s\n", __func__); @@ -603,15 +667,30 @@ mps_attach_sas(struct mps_softc *sc) sc->sassc = sassc; sassc->sc = sc; - if ((sassc->devq = cam_simq_alloc(sc->num_reqs)) == NULL) { + /* + * Tell CAM that we can handle 5 fewer requests than we have + * allocated. If we allow the full number of requests, all I/O + * will halt when we run out of resources. Things work fine with + * just 1 less request slot given to CAM than we have allocated. + * We also need a couple of extra commands so that we can send down + * abort, reset, etc. requests when commands time out. Otherwise + * we could wind up in a situation with sc->num_reqs requests down + * on the card and no way to send an abort. + * + * XXX KDM need to figure out why I/O locks up if all commands are + * used. + */ + num_sim_reqs = sc->num_reqs - 5; + + if ((sassc->devq = cam_simq_alloc(num_sim_reqs)) == NULL) { mps_dprint(sc, MPS_FAULT, "Cannot allocate SIMQ\n"); error = ENOMEM; goto out; } sassc->sim = cam_sim_alloc(mpssas_action, mpssas_poll, "mps", sassc, - device_get_unit(sc->mps_dev), &sc->mps_mtx, sc->num_reqs, sc->num_reqs, - sassc->devq); + device_get_unit(sc->mps_dev), &sc->mps_mtx, num_sim_reqs, + num_sim_reqs, sassc->devq); if (sassc->sim == NULL) { mps_dprint(sc, MPS_FAULT, "Cannot allocate SIM\n"); error = EINVAL; @@ -890,6 +969,11 @@ mpssas_action(struct cam_sim *sim, union case XPT_SCSI_IO: mpssas_action_scsiio(sassc, ccb); return; +#if __FreeBSD_version >= 900026 + case XPT_SMP_IO: + mpssas_action_smpio(sassc, ccb); + return; +#endif /* __FreeBSD_version >= 900026 */ default: ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; break; @@ -928,6 +1012,9 @@ mpssas_scsiio_timeout(void *data) struct mps_softc *sc; struct mps_command *cm; struct mpssas_target *targ; +#if 0 + char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1]; +#endif cm = (struct mps_command *)data; sc = cm->cm_sc; @@ -952,6 +1039,22 @@ mpssas_scsiio_timeout(void *data) xpt_print(ccb->ccb_h.path, "SCSI command timeout on device handle " "0x%04x SMID %d\n", targ->handle, cm->cm_desc.Default.SMID); + /* + * XXX KDM this is useful for debugging purposes, but the existing + * scsi_op_desc() implementation can't handle a NULL value for + * inq_data. So this will remain commented out until I bring in + * those changes as well. + */ +#if 0 + xpt_print(ccb->ccb_h.path, "Timed out command: %s. CDB %s\n", + scsi_op_desc((ccb->ccb_h.flags & CAM_CDB_POINTER) ? + ccb->csio.cdb_io.cdb_ptr[0] : + ccb->csio.cdb_io.cdb_bytes[0], NULL), + scsi_cdb_string((ccb->ccb_h.flags & CAM_CDB_POINTER) ? + ccb->csio.cdb_io.cdb_ptr : + ccb->csio.cdb_io.cdb_bytes, cdb_str, + sizeof(cdb_str))); +#endif /* Inform CAM about the timeout and that recovery is starting. */ #if 0 @@ -983,7 +1086,7 @@ mpssas_abort_complete(struct mps_softc * mps_printf(sc, "%s: abort request on handle %#04x SMID %d " "complete\n", __func__, req->DevHandle, req->TaskMID); - mps_free_command(sc, cm); + mpssas_complete_tm_request(sc, cm, /*free_cm*/ 1); } static void @@ -991,7 +1094,6 @@ mpssas_recovery(struct mps_softc *sc, st { struct mps_command *cm; MPI2_SCSI_TASK_MANAGE_REQUEST *req, *orig_req; - int error; cm = mps_alloc_command(sc); if (cm == NULL) { @@ -1013,25 +1115,204 @@ mpssas_recovery(struct mps_softc *sc, st cm->cm_data = NULL; cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; + mpssas_issue_tm_request(sc, cm); + +} + +/* + * Can return 0 or EINPROGRESS on success. Any other value means failure. + */ +static int +mpssas_map_tm_request(struct mps_softc *sc, struct mps_command *cm) +{ + int error; + + error = 0; + + cm->cm_flags |= MPS_CM_FLAGS_ACTIVE; error = mps_map_command(sc, cm); + if ((error == 0) + || (error == EINPROGRESS)) + sc->tm_cmds_active++; - if (error != 0) { - mps_printf(sc, "%s: error mapping abort request!\n", __func__); - } -#if 0 - error = mpssas_reset(sc, targ, &resetcm); - if ((error != 0) && (error != EBUSY)) { - mps_printf(sc, "Error resetting device!\n"); - mps_unlock(sc); - return; + return (error); +} + +static void +mpssas_issue_tm_request(struct mps_softc *sc, struct mps_command *cm) +{ + int freeze_queue, send_command, error; + + freeze_queue = 0; + send_command = 0; + error = 0; + + mtx_assert(&sc->mps_mtx, MA_OWNED); + + /* + * If there are no other pending task management commands, go + * ahead and send this one. There is a small amount of anecdotal + * evidence that sending lots of task management commands at once + * may cause the controller to lock up. Or, if the user has + * configured the driver (via the allow_multiple_tm_cmds variable) to + * not serialize task management commands, go ahead and send the + * command if even other task management commands are pending. + */ + if (TAILQ_FIRST(&sc->tm_list) == NULL) { + send_command = 1; + freeze_queue = 1; + } else if (sc->allow_multiple_tm_cmds != 0) + send_command = 1; + + TAILQ_INSERT_TAIL(&sc->tm_list, cm, cm_link); + if (send_command != 0) { + /* + * Freeze the SIM queue while we issue the task management + * command. According to the Fusion-MPT 2.0 spec, task + * management requests are serialized, and so the host + * should not send any I/O requests while task management + * requests are pending. + */ + if (freeze_queue != 0) + xpt_freeze_simq(sc->sassc->sim, 1); + + error = mpssas_map_tm_request(sc, cm); + + /* + * At present, there is no error path back from + * mpssas_map_tm_request() (which calls mps_map_command()) + * when cm->cm_data == NULL. But since there is a return + * value, we check it just in case the implementation + * changes later. + */ + if ((error != 0) + && (error != EINPROGRESS)) + mpssas_tm_complete(sc, cm, + MPI2_SCSITASKMGMT_RSP_TM_FAILED); } +} + +static void +mpssas_tm_complete(struct mps_softc *sc, struct mps_command *cm, int error) +{ + MPI2_SCSI_TASK_MANAGE_REPLY *resp; + + resp = (MPI2_SCSI_TASK_MANAGE_REPLY *)cm->cm_reply; - targ->flags |= MPSSAS_TARGET_INRESET; + resp->ResponseCode = error; - cm->cm_complete = mpssas_resettimeout_complete; - cm->cm_complete_data = cm; - mps_map_command(sassc->sc, cm); -#endif + /* + * Call the callback for this command, it will be + * removed from the list and freed via the callback. + */ + cm->cm_complete(sc, cm); +} *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Fri Feb 18 17:41:39 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D530F106566B; Fri, 18 Feb 2011 17:41:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C18AB8FC16; Fri, 18 Feb 2011 17:41:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1IHfd2J066649; Fri, 18 Feb 2011 17:41:39 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1IHfdWs066646; Fri, 18 Feb 2011 17:41:39 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201102181741.p1IHfdWs066646@svn.freebsd.org> From: Glen Barber Date: Fri, 18 Feb 2011 17:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218813 - in stable/8/lib/libc: db/man sys X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2011 17:41:40 -0000 Author: gjb (doc committer) Date: Fri Feb 18 17:41:39 2011 New Revision: 218813 URL: http://svn.freebsd.org/changeset/base/218813 Log: MFC 212441,212492: - Note O_SYNC and O_NOFOLLOW flags in dbopen(3) since r190497. [1] - Bump dates in dbopen(3) and cpuset_getaffinity(2). PR: 150030 [1] Modified: stable/8/lib/libc/db/man/dbopen.3 stable/8/lib/libc/sys/cpuset_getaffinity.2 Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) Modified: stable/8/lib/libc/db/man/dbopen.3 ============================================================================== --- stable/8/lib/libc/db/man/dbopen.3 Fri Feb 18 17:06:06 2011 (r218812) +++ stable/8/lib/libc/db/man/dbopen.3 Fri Feb 18 17:41:39 2011 (r218813) @@ -28,7 +28,7 @@ .\" @(#)dbopen.3 8.5 (Berkeley) 1/2/94 .\" $FreeBSD$ .\" -.Dd January 2, 1994 +.Dd September 10, 2010 .Dt DBOPEN 3 .Os .Sh NAME @@ -78,8 +78,8 @@ arguments are as specified to the .Xr open 2 routine, however, only the -.Dv O_CREAT , O_EXCL , O_EXLOCK , O_NONBLOCK , -.Dv O_RDONLY , O_RDWR , O_SHLOCK +.Dv O_CREAT , O_EXCL , O_EXLOCK , O_NOFOLLOW , O_NONBLOCK , +.Dv O_RDONLY , O_RDWR , O_SHLOCK , O_SYNC and .Dv O_TRUNC flags are meaningful. Modified: stable/8/lib/libc/sys/cpuset_getaffinity.2 ============================================================================== --- stable/8/lib/libc/sys/cpuset_getaffinity.2 Fri Feb 18 17:06:06 2011 (r218812) +++ stable/8/lib/libc/sys/cpuset_getaffinity.2 Fri Feb 18 17:41:39 2011 (r218813) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2010 +.Dd September 10, 2010 .Dt CPUSET 2 .Os .Sh NAME From owner-svn-src-stable-8@FreeBSD.ORG Sat Feb 19 07:39:15 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57A4F106566B; Sat, 19 Feb 2011 07:39:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 43EBF8FC08; Sat, 19 Feb 2011 07:39:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1J7dF2e087915; Sat, 19 Feb 2011 07:39:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1J7dFjO087910; Sat, 19 Feb 2011 07:39:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201102190739.p1J7dFjO087910@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 19 Feb 2011 07:39:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218836 - in stable/8/sys: amd64/amd64 amd64/ia32 i386/i386 kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2011 07:39:15 -0000 Author: kib Date: Sat Feb 19 07:39:14 2011 New Revision: 218836 URL: http://svn.freebsd.org/changeset/base/218836 Log: MFC r218327: Clear the padding when returning context to the usermode. Modified: stable/8/sys/amd64/amd64/machdep.c stable/8/sys/amd64/ia32/ia32_signal.c stable/8/sys/i386/i386/machdep.c stable/8/sys/kern/kern_context.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/amd64/machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/machdep.c Sat Feb 19 03:32:10 2011 (r218835) +++ stable/8/sys/amd64/amd64/machdep.c Sat Feb 19 07:39:14 2011 (r218836) @@ -329,6 +329,9 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, fpstate_drop(td); sf.sf_uc.uc_mcontext.mc_fsbase = td->td_pcb->pcb_fsbase; sf.sf_uc.uc_mcontext.mc_gsbase = td->td_pcb->pcb_gsbase; + bzero(sf.sf_uc.uc_mcontext.mc_spare, + sizeof(sf.sf_uc.uc_mcontext.mc_spare)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -350,6 +353,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* Build the argument list for the signal handler. */ regs->tf_rdi = sig; /* arg 1 in %rdi */ regs->tf_rdx = (register_t)&sfp->sf_uc; /* arg 3 in %rdx */ + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ regs->tf_rsi = (register_t)&sfp->sf_si; /* arg 2 in %rsi */ @@ -2034,6 +2038,7 @@ get_mcontext(struct thread *td, mcontext get_fpcontext(td, mcp); mcp->mc_fsbase = td->td_pcb->pcb_fsbase; mcp->mc_gsbase = td->td_pcb->pcb_gsbase; + bzero(mcp->mc_spare, sizeof(mcp->mc_spare)); return (0); } Modified: stable/8/sys/amd64/ia32/ia32_signal.c ============================================================================== --- stable/8/sys/amd64/ia32/ia32_signal.c Sat Feb 19 03:32:10 2011 (r218835) +++ stable/8/sys/amd64/ia32/ia32_signal.c Sat Feb 19 07:39:14 2011 (r218836) @@ -164,6 +164,8 @@ ia32_get_mcontext(struct thread *td, str ia32_get_fpcontext(td, mcp); mcp->mc_fsbase = td->td_pcb->pcb_fsbase; mcp->mc_gsbase = td->td_pcb->pcb_gsbase; + bzero(mcp->mc_spare1, sizeof(mcp->mc_spare1)); + bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2)); td->td_pcb->pcb_full_iret = 1; return (0); } @@ -230,6 +232,7 @@ freebsd32_getcontext(struct thread *td, PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; PROC_UNLOCK(td->td_proc); + bzero(&uc.__spare__, sizeof(uc.__spare__)); ret = copyout(&uc, uap->ucp, UC_COPY_SIZE); } return (ret); @@ -345,6 +348,11 @@ freebsd4_ia32_sendsig(sig_t catcher, ksi sf.sf_uc.uc_mcontext.mc_es = regs->tf_es; sf.sf_uc.uc_mcontext.mc_fs = regs->tf_fs; sf.sf_uc.uc_mcontext.mc_gs = regs->tf_gs; + bzero(sf.sf_uc.uc_mcontext.mc_fpregs, + sizeof(sf.sf_uc.uc_mcontext.mc_fpregs)); + bzero(sf.sf_uc.uc_mcontext.__spare__, + sizeof(sf.sf_uc.uc_mcontext.__spare__)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -362,6 +370,7 @@ freebsd4_ia32_sendsig(sig_t catcher, ksi /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (u_int32_t)(uintptr_t)&sfp->sf_si; @@ -464,6 +473,7 @@ ia32_sendsig(sig_t catcher, ksiginfo_t * fpstate_drop(td); sf.sf_uc.uc_mcontext.mc_fsbase = td->td_pcb->pcb_fsbase; sf.sf_uc.uc_mcontext.mc_gsbase = td->td_pcb->pcb_gsbase; + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -483,6 +493,7 @@ ia32_sendsig(sig_t catcher, ksiginfo_t * /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (u_int32_t)(uintptr_t)&sfp->sf_si; Modified: stable/8/sys/i386/i386/machdep.c ============================================================================== --- stable/8/sys/i386/i386/machdep.c Sat Feb 19 03:32:10 2011 (r218835) +++ stable/8/sys/i386/i386/machdep.c Sat Feb 19 07:39:14 2011 (r218836) @@ -379,12 +379,14 @@ osendsig(sig_t catcher, ksiginfo_t *ksi, /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_scp = (register_t)&fp->sf_siginfo.si_sc; + bzero(&sf.sf_siginfo, sizeof(sf.sf_siginfo)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_arg2 = (register_t)&fp->sf_siginfo; sf.sf_siginfo.si_signo = sig; sf.sf_siginfo.si_code = ksi->ksi_code; sf.sf_ahu.sf_action = (__osiginfohandler_t *)catcher; + sf.sf_addr = 0; } else { /* Old FreeBSD-style arguments. */ sf.sf_arg2 = ksi->ksi_code; @@ -498,6 +500,11 @@ freebsd4_sendsig(sig_t catcher, ksiginfo sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; sf.sf_uc.uc_mcontext.mc_gs = rgs(); bcopy(regs, &sf.sf_uc.uc_mcontext.mc_fs, sizeof(*regs)); + bzero(sf.sf_uc.uc_mcontext.mc_fpregs, + sizeof(sf.sf_uc.uc_mcontext.mc_fpregs)); + bzero(sf.sf_uc.uc_mcontext.__spare__, + sizeof(sf.sf_uc.uc_mcontext.__spare__)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -517,6 +524,7 @@ freebsd4_sendsig(sig_t catcher, ksiginfo /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (register_t)&sfp->sf_si; @@ -643,6 +651,11 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sdp = &td->td_pcb->pcb_gsd; sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; + bzero(sf.sf_uc.uc_mcontext.mc_spare1, + sizeof(sf.sf_uc.uc_mcontext.mc_spare1)); + bzero(sf.sf_uc.uc_mcontext.mc_spare2, + sizeof(sf.sf_uc.uc_mcontext.mc_spare2)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -664,6 +677,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (register_t)&sfp->sf_si; @@ -3268,7 +3282,8 @@ get_mcontext(struct thread *td, mcontext mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; sdp = &td->td_pcb->pcb_gsd; mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; - + bzero(mcp->mc_spare1, sizeof(mcp->mc_spare1)); + bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2)); return (0); } @@ -3317,6 +3332,7 @@ get_fpcontext(struct thread *td, mcontex #ifndef DEV_NPX mcp->mc_fpformat = _MC_FPFMT_NODEV; mcp->mc_ownedfp = _MC_FPOWNED_NONE; + bzero(mcp->mc_fpstate, sizeof(mcp->mc_fpstate)); #else mcp->mc_ownedfp = npxgetregs(td); bcopy(&td->td_pcb->pcb_user_save, &mcp->mc_fpstate, Modified: stable/8/sys/kern/kern_context.c ============================================================================== --- stable/8/sys/kern/kern_context.c Sat Feb 19 03:32:10 2011 (r218835) +++ stable/8/sys/kern/kern_context.c Sat Feb 19 07:39:14 2011 (r218836) @@ -71,6 +71,7 @@ getcontext(struct thread *td, struct get PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; PROC_UNLOCK(td->td_proc); + bzero(uc.__spare__, sizeof(uc.__spare__)); ret = copyout(&uc, uap->ucp, UC_COPY_SIZE); } return (ret); @@ -107,6 +108,7 @@ swapcontext(struct thread *td, struct sw ret = EINVAL; else { get_mcontext(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); + bzero(uc.__spare__, sizeof(uc.__spare__)); PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; PROC_UNLOCK(td->td_proc); From owner-svn-src-stable-8@FreeBSD.ORG Sat Feb 19 07:45:17 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD8ED106564A; Sat, 19 Feb 2011 07:45:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BF6D8FC0C; Sat, 19 Feb 2011 07:45:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1J7jHbh088109; Sat, 19 Feb 2011 07:45:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1J7jHiK088107; Sat, 19 Feb 2011 07:45:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201102190745.p1J7jHiK088107@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 19 Feb 2011 07:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218837 - stable/8/sys/i386/i386 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2011 07:45:17 -0000 Author: kib Date: Sat Feb 19 07:45:17 2011 New Revision: 218837 URL: http://svn.freebsd.org/changeset/base/218837 Log: MFC r218329: Fix kernel linkage without device npx. Modified: stable/8/sys/i386/i386/machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/i386/i386/machdep.c ============================================================================== --- stable/8/sys/i386/i386/machdep.c Sat Feb 19 07:39:14 2011 (r218836) +++ stable/8/sys/i386/i386/machdep.c Sat Feb 19 07:45:17 2011 (r218837) @@ -3211,7 +3211,11 @@ fill_fpregs(struct thread *td, struct fp KASSERT(td == curthread || TD_IS_SUSPENDED(td), ("not suspended thread %p", td)); +#ifdef DEV_NPX npxgetregs(td); +#else + bzero(fpregs, sizeof(*fpregs)); +#endif #ifdef CPU_ENABLE_SSE if (cpu_fxsr) fill_fpregs_xmm(&td->td_pcb->pcb_user_save.sv_xmm, @@ -3235,7 +3239,9 @@ set_fpregs(struct thread *td, struct fpr #endif /* CPU_ENABLE_SSE */ bcopy(fpregs, &td->td_pcb->pcb_user_save.sv_87, sizeof(*fpregs)); +#ifdef DEV_NPX npxuserinited(td); +#endif return (0); } From owner-svn-src-stable-8@FreeBSD.ORG Sat Feb 19 11:44:46 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65C6D106566B; Sat, 19 Feb 2011 11:44:46 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 541FC8FC15; Sat, 19 Feb 2011 11:44:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1JBikSC094679; Sat, 19 Feb 2011 11:44:46 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1JBikpf094677; Sat, 19 Feb 2011 11:44:46 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201102191144.p1JBikpf094677@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sat, 19 Feb 2011 11:44:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218848 - stable/8/sys/pc98/pc98 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2011 11:44:46 -0000 Author: nyan Date: Sat Feb 19 11:44:46 2011 New Revision: 218848 URL: http://svn.freebsd.org/changeset/base/218848 Log: MFC: revision 218390 Clear the padding when returning context to the usermode. Modified: stable/8/sys/pc98/pc98/machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/pc98/pc98/machdep.c ============================================================================== --- stable/8/sys/pc98/pc98/machdep.c Sat Feb 19 11:44:04 2011 (r218847) +++ stable/8/sys/pc98/pc98/machdep.c Sat Feb 19 11:44:46 2011 (r218848) @@ -314,12 +314,14 @@ osendsig(sig_t catcher, ksiginfo_t *ksi, /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_scp = (register_t)&fp->sf_siginfo.si_sc; + bzero(&sf.sf_siginfo, sizeof(sf.sf_siginfo)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_arg2 = (register_t)&fp->sf_siginfo; sf.sf_siginfo.si_signo = sig; sf.sf_siginfo.si_code = ksi->ksi_code; sf.sf_ahu.sf_action = (__osiginfohandler_t *)catcher; + sf.sf_addr = 0; } else { /* Old FreeBSD-style arguments. */ sf.sf_arg2 = ksi->ksi_code; @@ -433,6 +435,11 @@ freebsd4_sendsig(sig_t catcher, ksiginfo sf.sf_uc.uc_mcontext.mc_onstack = (oonstack) ? 1 : 0; sf.sf_uc.uc_mcontext.mc_gs = rgs(); bcopy(regs, &sf.sf_uc.uc_mcontext.mc_fs, sizeof(*regs)); + bzero(sf.sf_uc.uc_mcontext.mc_fpregs, + sizeof(sf.sf_uc.uc_mcontext.mc_fpregs)); + bzero(sf.sf_uc.uc_mcontext.__spare__, + sizeof(sf.sf_uc.uc_mcontext.__spare__)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -452,6 +459,7 @@ freebsd4_sendsig(sig_t catcher, ksiginfo /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (register_t)&sfp->sf_si; @@ -578,6 +586,11 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sdp = &td->td_pcb->pcb_gsd; sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; + bzero(sf.sf_uc.uc_mcontext.mc_spare1, + sizeof(sf.sf_uc.uc_mcontext.mc_spare1)); + bzero(sf.sf_uc.uc_mcontext.mc_spare2, + sizeof(sf.sf_uc.uc_mcontext.mc_spare2)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -599,6 +612,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* Build the argument list for the signal handler. */ sf.sf_signum = sig; sf.sf_ucontext = (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo = (register_t)&sfp->sf_si; @@ -2599,7 +2613,8 @@ get_mcontext(struct thread *td, mcontext mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; sdp = &td->td_pcb->pcb_gsd; mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; - + bzero(mcp->mc_spare1, sizeof(mcp->mc_spare1)); + bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2)); return (0); } @@ -2648,6 +2663,7 @@ get_fpcontext(struct thread *td, mcontex #ifndef DEV_NPX mcp->mc_fpformat = _MC_FPFMT_NODEV; mcp->mc_ownedfp = _MC_FPOWNED_NONE; + bzero(mcp->mc_fpstate, sizeof(mcp->mc_fpstate)); #else mcp->mc_ownedfp = npxgetregs(td); bcopy(&td->td_pcb->pcb_user_save, &mcp->mc_fpstate, From owner-svn-src-stable-8@FreeBSD.ORG Sat Feb 19 11:47:48 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C57E5106566B; Sat, 19 Feb 2011 11:47:48 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B42668FC14; Sat, 19 Feb 2011 11:47:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1JBlmuV094804; Sat, 19 Feb 2011 11:47:48 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1JBlmiS094802; Sat, 19 Feb 2011 11:47:48 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201102191147.p1JBlmiS094802@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sat, 19 Feb 2011 11:47:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218849 - stable/8/sys/pc98/pc98 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2011 11:47:48 -0000 Author: nyan Date: Sat Feb 19 11:47:48 2011 New Revision: 218849 URL: http://svn.freebsd.org/changeset/base/218849 Log: MFC: revision 218391 Fix linking of the kernel without device npx. Modified: stable/8/sys/pc98/pc98/machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/pc98/pc98/machdep.c ============================================================================== --- stable/8/sys/pc98/pc98/machdep.c Sat Feb 19 11:44:46 2011 (r218848) +++ stable/8/sys/pc98/pc98/machdep.c Sat Feb 19 11:47:48 2011 (r218849) @@ -2542,7 +2542,11 @@ fill_fpregs(struct thread *td, struct fp KASSERT(td == curthread || TD_IS_SUSPENDED(td), ("not suspended thread %p", td)); +#ifdef DEV_NPX npxgetregs(td); +#else + bzero(fpregs, sizeof(*fpregs)); +#endif #ifdef CPU_ENABLE_SSE if (cpu_fxsr) fill_fpregs_xmm(&td->td_pcb->pcb_user_save.sv_xmm, @@ -2566,7 +2570,9 @@ set_fpregs(struct thread *td, struct fpr #endif /* CPU_ENABLE_SSE */ bcopy(fpregs, &td->td_pcb->pcb_user_save.sv_87, sizeof(*fpregs)); +#ifdef DEV_NPX npxuserinited(td); +#endif return (0); }