From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 00:01:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC2A5106564A; Sun, 18 Dec 2011 00:01:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 907D78FC17; Sun, 18 Dec 2011 00:01:43 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:34d8:b0a6:3463:89c2] (unknown [IPv6:2001:7b8:3a7:0:34d8:b0a6:3463:89c2]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DBFAE5C37; Sun, 18 Dec 2011 01:01:42 +0100 (CET) Message-ID: <4EED2D66.3000304@FreeBSD.org> Date: Sun, 18 Dec 2011 01:01:42 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111130 Thunderbird/9.0 MIME-Version: 1.0 To: mdf@FreeBSD.org References: <201112171314.pBHDEjtQ060509@svn.freebsd.org> <4EED0F99.2020306@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228625 - head/usr.bin/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 00:01:44 -0000 On 2011-12-18 00:49, mdf@FreeBSD.org wrote: ... > Also, long long is a bit of a hack that came in before C99 > standardized on a few wider types, and the PRIu64 macros are really > hideous. I agree they're ugly, but C99 should simply have defined length modifiers for int64_t and friends, then the PRI macros could have been avoided. (Although not without backwards compatibility problems, but you would have those anyway. :) From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 00:03:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86DD1106566B; Sun, 18 Dec 2011 00:03:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 761628FC15; Sun, 18 Dec 2011 00:03:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBI033KT082620; Sun, 18 Dec 2011 00:03:03 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBI033gD082618; Sun, 18 Dec 2011 00:03:03 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112180003.pBI033gD082618@svn.freebsd.org> From: Dimitry Andric Date: Sun, 18 Dec 2011 00:03:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228674 - head/usr.sbin/route6d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 00:03:03 -0000 Author: dim Date: Sun Dec 18 00:03:03 2011 New Revision: 228674 URL: http://svn.freebsd.org/changeset/base/228674 Log: In usr.sbin/route6d/route6d.c, use the correct printf length modifier for an ssize_t. MFC after: 1 week Modified: head/usr.sbin/route6d/route6d.c Modified: head/usr.sbin/route6d/route6d.c ============================================================================== --- head/usr.sbin/route6d/route6d.c Sat Dec 17 23:46:47 2011 (r228673) +++ head/usr.sbin/route6d/route6d.c Sun Dec 18 00:03:03 2011 (r228674) @@ -1238,7 +1238,7 @@ riprecv() if (iff_find(ifcp, 'N') != NULL) return; - tracet(1, "Recv(%s): from %s.%d info(%d)\n", + tracet(1, "Recv(%s): from %s.%d info(%zd)\n", ifcp->ifc_name, inet6_n2p(&nh), ntohs(fsock.sin6_port), nn); t = time(NULL); From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 00:24:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0280106567D; Sun, 18 Dec 2011 00:24:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BB768FC19; Sun, 18 Dec 2011 00:24:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBI0OBox083561; Sun, 18 Dec 2011 00:24:11 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBI0OB6e083559; Sun, 18 Dec 2011 00:24:11 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112180024.pBI0OB6e083559@svn.freebsd.org> From: Dimitry Andric Date: Sun, 18 Dec 2011 00:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228675 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 00:24:12 -0000 Author: dim Date: Sun Dec 18 00:24:11 2011 New Revision: 228675 URL: http://svn.freebsd.org/changeset/base/228675 Log: Disable yet another clang warning (-Wconversion) when WARNS <= 3. MFC after: 1 week Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sun Dec 18 00:03:03 2011 (r228674) +++ head/share/mk/bsd.sys.mk Sun Dec 18 00:24:11 2011 (r228675) @@ -62,7 +62,8 @@ CWARNFLAGS += -Wno-pointer-sign . if ${CC:T:Mclang} == "clang" . if ${WARNS} <= 3 CWARNFLAGS += -Wno-tautological-compare -Wno-unused-value\ - -Wno-parentheses-equality -Wno-unused-function + -Wno-parentheses-equality -Wno-unused-function\ + -Wno-conversion . endif . if ${WARNS} <= 2 CWARNFLAGS += -Wno-switch-enum From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 00:34:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56F121065673; Sun, 18 Dec 2011 00:34:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 462898FC15; Sun, 18 Dec 2011 00:34:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBI0YhEW084051; Sun, 18 Dec 2011 00:34:43 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBI0YhXY084049; Sun, 18 Dec 2011 00:34:43 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112180034.pBI0YhXY084049@svn.freebsd.org> From: Dimitry Andric Date: Sun, 18 Dec 2011 00:34:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228677 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 00:34:43 -0000 Author: dim Date: Sun Dec 18 00:34:42 2011 New Revision: 228677 URL: http://svn.freebsd.org/changeset/base/228677 Log: Disable another clang warning (-Wempty-body) when WARNS <= 2. MFC after: 1 week Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sun Dec 18 00:31:06 2011 (r228676) +++ head/share/mk/bsd.sys.mk Sun Dec 18 00:34:42 2011 (r228677) @@ -66,7 +66,7 @@ CWARNFLAGS += -Wno-tautological-compare -Wno-conversion . endif . if ${WARNS} <= 2 -CWARNFLAGS += -Wno-switch-enum +CWARNFLAGS += -Wno-switch-enum -Wno-empty-body . endif . if ${WARNS} <= 1 CWARNFLAGS += -Wno-parentheses From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 00:40:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 559CC106566C; Sun, 18 Dec 2011 00:40:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44BAB8FC17; Sun, 18 Dec 2011 00:40:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBI0eVEG084248; Sun, 18 Dec 2011 00:40:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBI0eVKi084246; Sun, 18 Dec 2011 00:40:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112180040.pBI0eVKi084246@svn.freebsd.org> From: Dimitry Andric Date: Sun, 18 Dec 2011 00:40:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228678 - head/usr.sbin/rpc.ypupdated X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 00:40:31 -0000 Author: dim Date: Sun Dec 18 00:40:30 2011 New Revision: 228678 URL: http://svn.freebsd.org/changeset/base/228678 Log: In usr.sbin/rpc.ypupdated/yp_dbupdate.c, use the appropriate printf length modifier for time_t (after casting it to intmax_t). MFC after: 1 week Modified: head/usr.sbin/rpc.ypupdated/yp_dbupdate.c Modified: head/usr.sbin/rpc.ypupdated/yp_dbupdate.c ============================================================================== --- head/usr.sbin/rpc.ypupdated/yp_dbupdate.c Sun Dec 18 00:34:42 2011 (r228677) +++ head/usr.sbin/rpc.ypupdated/yp_dbupdate.c Sun Dec 18 00:40:30 2011 (r228678) @@ -130,7 +130,7 @@ ypmap_update(char *netname, char *map, u return(rval); } - snprintf(yplastbuf, sizeof(yplastbuf), "%lu", time(NULL)); + snprintf(yplastbuf, sizeof(yplastbuf), "%ju", (intmax_t)time(NULL)); key.data = yp_last; key.size = strlen(yp_last); data.data = (char *)&yplastbuf; From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 00:44:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E5D8106566C; Sun, 18 Dec 2011 00:44:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D5778FC14; Sun, 18 Dec 2011 00:44:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBI0ixcr084418; Sun, 18 Dec 2011 00:44:59 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBI0ixKQ084416; Sun, 18 Dec 2011 00:44:59 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112180044.pBI0ixKQ084416@svn.freebsd.org> From: Dimitry Andric Date: Sun, 18 Dec 2011 00:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228679 - head/usr.sbin/rpc.ypupdated X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 00:44:59 -0000 Author: dim Date: Sun Dec 18 00:44:59 2011 New Revision: 228679 URL: http://svn.freebsd.org/changeset/base/228679 Log: In usr.sbin/rpc.ypupdated/yp_dbupdate.c, include stdint.h, so intmax_t is known, otherwise it won't build. Pointy hat to: dim MFC after: 1 week Modified: head/usr.sbin/rpc.ypupdated/yp_dbupdate.c Modified: head/usr.sbin/rpc.ypupdated/yp_dbupdate.c ============================================================================== --- head/usr.sbin/rpc.ypupdated/yp_dbupdate.c Sun Dec 18 00:40:30 2011 (r228678) +++ head/usr.sbin/rpc.ypupdated/yp_dbupdate.c Sun Dec 18 00:44:59 2011 (r228679) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 00:55:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5F181065677; Sun, 18 Dec 2011 00:55:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C51A48FC12; Sun, 18 Dec 2011 00:55:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBI0tkFD084780; Sun, 18 Dec 2011 00:55:46 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBI0tkCD084778; Sun, 18 Dec 2011 00:55:46 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112180055.pBI0tkCD084778@svn.freebsd.org> From: Dimitry Andric Date: Sun, 18 Dec 2011 00:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228680 - head/usr.sbin/rpc.ypupdated X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 00:55:46 -0000 Author: dim Date: Sun Dec 18 00:55:46 2011 New Revision: 228680 URL: http://svn.freebsd.org/changeset/base/228680 Log: In usr.sbin/rpc.ypupdated/yp_dbupdate.c, since intmax_t is signed, just like time_t, better use %jd instead of %ju. Strangely enough, neither gcc, clang nor gcc 4.6 warn about this discrepancy... MFC after: 1 week Modified: head/usr.sbin/rpc.ypupdated/yp_dbupdate.c Modified: head/usr.sbin/rpc.ypupdated/yp_dbupdate.c ============================================================================== --- head/usr.sbin/rpc.ypupdated/yp_dbupdate.c Sun Dec 18 00:44:59 2011 (r228679) +++ head/usr.sbin/rpc.ypupdated/yp_dbupdate.c Sun Dec 18 00:55:46 2011 (r228680) @@ -131,7 +131,7 @@ ypmap_update(char *netname, char *map, u return(rval); } - snprintf(yplastbuf, sizeof(yplastbuf), "%ju", (intmax_t)time(NULL)); + snprintf(yplastbuf, sizeof(yplastbuf), "%jd", (intmax_t)time(NULL)); key.data = yp_last; key.size = strlen(yp_last); data.data = (char *)&yplastbuf; From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 01:08:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9233106564A; Sun, 18 Dec 2011 01:08:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9850E8FC13; Sun, 18 Dec 2011 01:08:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBI18Pni085191; Sun, 18 Dec 2011 01:08:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBI18PmG085189; Sun, 18 Dec 2011 01:08:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112180108.pBI18PmG085189@svn.freebsd.org> From: Dimitry Andric Date: Sun, 18 Dec 2011 01:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228681 - head/usr.sbin/sa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 01:08:25 -0000 Author: dim Date: Sun Dec 18 01:08:25 2011 New Revision: 228681 URL: http://svn.freebsd.org/changeset/base/228681 Log: In usr.sbin/sa/db.c, avoid warnings about assigning two const char arrays to non-const void pointers, by casting away const explicitly. MFC after: 1 week Modified: head/usr.sbin/sa/db.c Modified: head/usr.sbin/sa/db.c ============================================================================== --- head/usr.sbin/sa/db.c Sun Dec 18 00:55:46 2011 (r228680) +++ head/usr.sbin/sa/db.c Sun Dec 18 01:08:25 2011 (r228681) @@ -79,7 +79,7 @@ db_copy_in(DB **mdb, const char *dbname, /* Obtain/set version. */ version = 1; - key.data = &VERSION_KEY; + key.data = (void*)&VERSION_KEY; key.size = sizeof(VERSION_KEY); rv = DB_GET(ddb, &key, &data, 0); @@ -175,7 +175,7 @@ db_copy_out(DB *mdb, const char *dbname, out: /* Add a version record. */ - key.data = &VERSION_KEY; + key.data = (void*)&VERSION_KEY; key.size = sizeof(VERSION_KEY); version = 2; data.data = &version; From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 01:13:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EB0E106564A; Sun, 18 Dec 2011 01:13:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DEA68FC08; Sun, 18 Dec 2011 01:13:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBI1DMRm085380; Sun, 18 Dec 2011 01:13:22 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBI1DMox085378; Sun, 18 Dec 2011 01:13:22 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112180113.pBI1DMox085378@svn.freebsd.org> From: Dimitry Andric Date: Sun, 18 Dec 2011 01:13:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228682 - head/usr.sbin/sade X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 01:13:22 -0000 Author: dim Date: Sun Dec 18 01:13:21 2011 New Revision: 228682 URL: http://svn.freebsd.org/changeset/base/228682 Log: In usr.sbin/sade/install.c and usr.sbin/sade/label.c, fix a few warnings about format strings not being literals. MFC after: 1 week Modified: head/usr.sbin/sade/install.c Modified: head/usr.sbin/sade/install.c ============================================================================== --- head/usr.sbin/sade/install.c Sun Dec 18 01:08:25 2011 (r228681) +++ head/usr.sbin/sade/install.c Sun Dec 18 01:13:21 2011 (r228682) @@ -104,10 +104,10 @@ performNewfs(PartInfo *pi, char *dname, } if (queue == QUEUE_YES) { - command_shell_add(pi->mountpoint, buffer); + command_shell_add(pi->mountpoint, "%s", buffer); return (0); } else - return (vsystem(buffer)); + return (vsystem("%s", buffer)); } return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 01:14:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AB4B1065679; Sun, 18 Dec 2011 01:14:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49F468FC0A; Sun, 18 Dec 2011 01:14:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBI1EdpE085456; Sun, 18 Dec 2011 01:14:39 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBI1Edw3085454; Sun, 18 Dec 2011 01:14:39 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112180114.pBI1Edw3085454@svn.freebsd.org> From: Dimitry Andric Date: Sun, 18 Dec 2011 01:14:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228683 - head/usr.sbin/sade X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 01:14:39 -0000 Author: dim Date: Sun Dec 18 01:14:38 2011 New Revision: 228683 URL: http://svn.freebsd.org/changeset/base/228683 Log: Forgot to add usr.sbin/sade/label.c in the previous commit. MFC after: 1 week Modified: head/usr.sbin/sade/label.c Modified: head/usr.sbin/sade/label.c ============================================================================== --- head/usr.sbin/sade/label.c Sun Dec 18 01:13:21 2011 (r228682) +++ head/usr.sbin/sade/label.c Sun Dec 18 01:14:38 2011 (r228683) @@ -933,7 +933,7 @@ diskLabel(Device *dev) } if (msg) { if (req) { - msgConfirm(msg); + msgConfirm("%s", msg); clear_wins(); msg = NULL; } From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 01:39:06 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF2B2106564A; Sun, 18 Dec 2011 01:39:06 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id A29348FC14; Sun, 18 Dec 2011 01:39:06 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.5/8.14.2) with ESMTP id pBI1d5Nx021024; Sat, 17 Dec 2011 20:39:05 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.5/8.14.2/Submit) id pBI1d5YS021023; Sat, 17 Dec 2011 20:39:05 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Sat, 17 Dec 2011 20:39:05 -0500 From: David Schultz To: Dimitry Andric Message-ID: <20111218013905.GA20867@zim.MIT.EDU> Mail-Followup-To: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201112172232.pBHMW1Bd079555@svn.freebsd.org> <4EED18B5.8000907@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EED18B5.8000907@FreeBSD.org> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r228668 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 01:39:07 -0000 On Sat, Dec 17, 2011, Dimitry Andric wrote: > On 2011-12-17 23:32, Dimitry Andric wrote: > > Author: dim > > Date: Sat Dec 17 22:32:00 2011 > > New Revision: 228668 > > URL: http://svn.freebsd.org/changeset/base/228668 > > > > Log: > > Revert r228650, and work around the clang false positive with printf > > formats in usr.bin/netstat/atalk.c by conditionally adding NO_WFORMAT to > > the Makefile instead. > > > > MFC after: 1 week > > Requested by: bz Have you been keeping track of the other hacks you've been sprinkling throughout the tree to work around clang bugs, e.g., the one in fsdb? It would be unfortunate if someone else has to waste their time later on figuring out what you did, when we could just as easily have waited a month for the clang bug to be fixed. Incidentally, the "bug" you fixed in telnet/utilities.c is also a false positive; clang doesn't understand that an index into a string constant is also a string constant. By the way, I think it's great that you've found so many actual bugs in the tree. I'm just complaining about a small subset of the changes, which fixed non-bugs. :) From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 01:41:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 092C6106566C; Sun, 18 Dec 2011 01:41:45 +0000 (UTC) (envelope-from das@freebsd.org) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id A54E28FC15; Sun, 18 Dec 2011 01:41:44 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.5/8.14.2) with ESMTP id pBI1fiLc021089; Sat, 17 Dec 2011 20:41:44 -0500 (EST) (envelope-from das@freebsd.org) Received: (from das@localhost) by zim.MIT.EDU (8.14.5/8.14.2/Submit) id pBI1firQ021088; Sat, 17 Dec 2011 20:41:44 -0500 (EST) (envelope-from das@freebsd.org) Date: Sat, 17 Dec 2011 20:41:44 -0500 From: David Schultz To: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20111218014144.GB20867@zim.MIT.EDU> Mail-Followup-To: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201112172232.pBHMW1Bd079555@svn.freebsd.org> <4EED18B5.8000907@FreeBSD.org> <20111218013905.GA20867@zim.MIT.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111218013905.GA20867@zim.MIT.EDU> Cc: Subject: Re: svn commit: r228668 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 01:41:45 -0000 On Sat, Dec 17, 2011, David Schultz wrote: > On Sat, Dec 17, 2011, Dimitry Andric wrote: > > On 2011-12-17 23:32, Dimitry Andric wrote: > > > Author: dim > > > Date: Sat Dec 17 22:32:00 2011 > > > New Revision: 228668 > > > URL: http://svn.freebsd.org/changeset/base/228668 > > > > > > Log: > > > Revert r228650, and work around the clang false positive with printf > > > formats in usr.bin/netstat/atalk.c by conditionally adding NO_WFORMAT to > > > the Makefile instead. > > > > > > MFC after: 1 week > > > > Requested by: bz > > Have you been keeping track of the other hacks you've been > sprinkling throughout the tree to work around clang bugs, e.g., > the one in fsdb? It would be unfortunate if someone else has to > waste their time later on figuring out what you did, when we could > just as easily have waited a month for the clang bug to be fixed. > > Incidentally, the "bug" you fixed in telnet/utilities.c is also a > false positive; clang doesn't understand that an index into a > string constant is also a string constant. > > By the way, I think it's great that you've found so many actual > bugs in the tree. I'm just complaining about a small subset of > the changes, which fixed non-bugs. :) Sorry, one more: In less(1), you cast away a bunch of const qualifiers to fix some warnings, but that seems like a step in the wrong direction. The warnings were complaining about genuinely bad code. Disabling the warnings with casts doesn't make less(1) any better; instead, it guarantees that nobody will ever fix the code. Perhaps the larger question is whether it makes sense to fix non-bugs in contributed code at all. What do we get out of it? Maybe if the contrib software is poorly maintained we'll find a bunch of real bugs that won't be addressed upstream. Otherwise, the diffs are only creating headaches for whoever imports the next version. From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 02:17:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AC72106564A for ; Sun, 18 Dec 2011 02:17:12 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from mo-p00-ob6.rzone.de (mo-p00-ob6.rzone.de [IPv6:2a01:238:20a:202:53f0::1]) by mx1.freebsd.org (Postfix) with ESMTP id E9E6C8FC17 for ; Sun, 18 Dec 2011 02:17:11 +0000 (UTC) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQv0cW+St/nW/afgnrylsiW+xbjV+pgEJ X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de (ip-109-45-171-208.web.vodafone.de [109.45.171.208]) by smtp.strato.de (fruni mo31) (RZmta 26.15 DYNA|AUTH) with (DHE-RSA-AES128-SHA encrypted) ESMTPA id e040a3nBHMYW4v for ; Sun, 18 Dec 2011 03:16:45 +0100 (MET) Received: by britannica.bec.de (sSMTP sendmail emulation); Sun, 18 Dec 2011 03:16:40 +0100 Date: Sun, 18 Dec 2011 03:16:40 +0100 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Message-ID: <20111218021640.GA2436@britannica.bec.de> References: <201112171721.pBHHLloU069166@svn.freebsd.org> <4C98B8D8-99F6-4996-A0FB-C128D9384180@lists.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C98B8D8-99F6-4996-A0FB-C128D9384180@lists.zabbadoz.net> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: svn commit: r228650 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 02:17:12 -0000 On Sat, Dec 17, 2011 at 09:53:56PM +0000, Bjoern A. Zeeb wrote: > > On 17. Dec 2011, at 17:21 , Dimitry Andric wrote: > > > Author: dim > > Date: Sat Dec 17 17:21:47 2011 > > New Revision: 228650 > > URL: http://svn.freebsd.org/changeset/base/228650 > > > > Log: > > In usr.bin/netstat/atalk.c, work around a clang false positive with > > printf format warnings and conditional operators. > > > > This does not sound like a good idea. Make clang work. Strictly speaking, clang is correct here. While the 'h' modifier is effectively a nop due to integer promotion rules, the intention is clearly "I am going to use a unsigned short here". Of course, the bug in the change is that it is using short... Joerg From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 02:19:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A070106566C for ; Sun, 18 Dec 2011 02:19:59 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from mo-p00-ob6.rzone.de (mo-p00-ob6.rzone.de [IPv6:2a01:238:20a:202:53f0::1]) by mx1.freebsd.org (Postfix) with ESMTP id CA74C8FC08 for ; Sun, 18 Dec 2011 02:19:58 +0000 (UTC) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQv0cW+St/nW/afgnrylsiW+xbjV+pgEJ X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de (ip-109-45-171-208.web.vodafone.de [109.45.171.208]) by post.strato.de (mrclete mo17) (RZmta 26.15 DYNA|AUTH) with (DHE-RSA-AES128-SHA encrypted) ESMTPA id w04f9cnBI0gt1W for ; Sun, 18 Dec 2011 03:19:36 +0100 (MET) Received: by britannica.bec.de (sSMTP sendmail emulation); Sun, 18 Dec 2011 03:19:32 +0100 Date: Sun, 18 Dec 2011 03:19:32 +0100 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Message-ID: <20111218021932.GB2436@britannica.bec.de> References: <201112172335.pBHNZk04081607@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201112172335.pBHNZk04081607@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: svn commit: r228670 - head/usr.sbin/pkg_install/updating X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 02:19:59 -0000 On Sat, Dec 17, 2011 at 11:35:46PM +0000, Dimitry Andric wrote: > Modified: head/usr.sbin/pkg_install/updating/main.c > ============================================================================== > --- head/usr.sbin/pkg_install/updating/main.c Sat Dec 17 23:18:14 2011 (r228669) > +++ head/usr.sbin/pkg_install/updating/main.c Sat Dec 17 23:35:46 2011 (r228670) > @@ -141,7 +141,7 @@ main(int argc, char *argv[]) > strcmp(pkgdbdir->d_name, "..") != 0) { > > /* Create path to +CONTENTS file for each installed port */ > - n = strlcpy(tmp_file, pkgdbpath, strlen(pkgdbpath)+1); > + n = strlcpy(tmp_file, pkgdbpath, sizeof(tmp_file)); > n = strlcpy(tmp_file + n, "/", sizeof(tmp_file) - n); > n = strlcat(tmp_file + n, pkgdbdir->d_name, > sizeof(tmp_file) - n); Either use strlcat without the pointer modifications or just go with snprintf in first place. This is bogus... Joerg From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 07:35:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D47F3106564A; Sun, 18 Dec 2011 07:35:28 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 6C83A8FC0C; Sun, 18 Dec 2011 07:35:28 +0000 (UTC) Received: from c211-28-227-231.carlnfd1.nsw.optusnet.com.au (c211-28-227-231.carlnfd1.nsw.optusnet.com.au [211.28.227.231]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pBI7ZOZB007432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Dec 2011 18:35:25 +1100 Date: Sun, 18 Dec 2011 18:35:24 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andriy Gapon In-Reply-To: <201112171508.pBHF8ibC064202@svn.freebsd.org> Message-ID: <20111218173749.N1196@besplex.bde.org> References: <201112171508.pBHF8ibC064202@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228631 - in head/sys: dev/cfe dev/dcons dev/ofw dev/sio dev/syscons dev/uart dev/usb/serial dev/xen/console gdb ia64/ia64 kern mips/adm5120 pc98/cbus powerpc/mambo sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 07:35:28 -0000 On Sat, 17 Dec 2011, Andriy Gapon wrote: > Log: > kern cons: introduce infrastructure for console grabbing by kernel > > At the moment grab and ungrab methods of all console drivers are no-ops. > > Current intended meaning of the calls is that the kernel takes control of > console input. In the future the semantics may be extended to mean that > the calling thread takes full ownership of the console (e.g. console > output from other threads could be suspended). > > Inspired by: bde > MFC after: 2 months Thanks. I didn't keep up with the details. > Modified: head/sys/dev/cfe/cfe_console.c > ============================================================================== > --- head/sys/dev/cfe/cfe_console.c Sat Dec 17 14:55:19 2011 (r228630) > +++ head/sys/dev/cfe/cfe_console.c Sat Dec 17 15:08:43 2011 (r228631) > @@ -76,6 +76,8 @@ static cn_init_t cfe_cninit; > static cn_term_t cfe_cnterm; > static cn_getc_t cfe_cngetc; > static cn_putc_t cfe_cnputc; > +static cn_grab_t cfe_cngrab; > +static cn_ungrab_t cfe_cnungrab; > > CONSOLE_DRIVER(cfe); > > @@ -183,6 +185,18 @@ cfe_cnterm(struct consdev *cp) > > } > > +static void > +cfe_cngrab(struct consdev *cp) > +{ > + > +} > + > +static void > +cfe_cnungrab(struct consdev *cp) > +{ > + > +} > + > static int > cfe_cngetc(struct consdev *cp) > { I prefer NULL function pointers to dummy functions. The horrible CONSOLE_DRIVER() macro gets in the way of this. FreeBSD[3-4] and maybe FreeBSD-2 use the slightly less horrible CONS_DRIVER() macro. FreeBSD-1 uses a normal unobfuscated struct initializer but with an even more horrible implementation (the entry points had to exist and be public functions, so that the initializer could be hard-coded in another file depending on ifdefs for driver existence, and this file was not even generated by config. cdevsw initialization was similarly horrible in FreeBSD-1). > ... > Modified: head/sys/sys/cons.h > ============================================================================== > --- head/sys/sys/cons.h Sat Dec 17 14:55:19 2011 (r228630) > +++ head/sys/sys/cons.h Sat Dec 17 15:08:43 2011 (r228631) > @@ -58,6 +60,10 @@ struct consdev_ops { > /* kernel getchar interface */ > cn_putc_t *cn_putc; > /* kernel putchar interface */ > + cn_grab_t *cn_grab; > + /* grab console for exclusive kernel use */ > + cn_ungrab_t *cn_ungrab; > + /* ungrab console */ > }; > > struct consdev { > @@ -99,6 +105,8 @@ extern struct tty *constty; /* Temporary > .cn_term = name##_cnterm, \ > .cn_getc = name##_cngetc, \ > .cn_putc = name##_cnputc, \ > + .cn_grab = name##_cngrab, \ > + .cn_ungrab = name##_cnungrab, \ > }; \ > CONSOLE_DEVICE(name##_consdev, name##_consdev_ops, NULL) > With C99 initializers, which are already used here, the macros become just obfuscations. The CONSOLE_DEVICE() macro handles the minor problem that without it the driver would have to know the order of the parameters in a macro like the old CONS_DRIVER() one (to invoke such a macro), or the order of struct members including ones not supported by the driver (to declare an initializer). This was only a minor problem, and the macros were silly, since there were approximately a whole 2 console drivers but there were hundreds of generic drivers and dozens of file systems that face the problem without any macros to obfuscate it, and just declared the initializers for the much larger cdevsw and vfsops structs. CONSOLE_DRIVER() has the costs of requiring actual functions with a specific spelling for all entry points. Now C99 initializers under full control of the driver or file system are used for cdevsw and vfsops structs, but the silly macros are still used for console drivers. BTW, there is probably lots of disorder in the C99 initializers. I think most cdevsw initializers are in bad historical order. ufs_vfsops was converted to alphabetical ordering on the struct member name when it was converted to a C99 initializer, but has accreted insertion sort errors for .vfs_cmount in the middle and .vfs_susp_clean at the end. It also has a namespace error for the .vfs_susp_clean entry (the public function for this is not in the ffs_ namespace). Bruce From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 07:48:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77122106566B; Sun, 18 Dec 2011 07:48:42 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id C662C8FC0A; Sun, 18 Dec 2011 07:48:41 +0000 (UTC) Received: from c211-28-227-231.carlnfd1.nsw.optusnet.com.au (c211-28-227-231.carlnfd1.nsw.optusnet.com.au [211.28.227.231]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pBI7mb9p000601 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Dec 2011 18:48:38 +1100 Date: Sun, 18 Dec 2011 18:48:37 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: mdf@freebsd.org In-Reply-To: Message-ID: <20111218183813.H1383@besplex.bde.org> References: <201112171314.pBHDEjtQ060509@svn.freebsd.org> <4EED0F99.2020306@FreeBSD.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-563560353-1324194517=:1383" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r228625 - head/usr.bin/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 07:48:42 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-563560353-1324194517=:1383 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 17 Dec 2011 mdf@freebsd.org wrote: > On Sat, Dec 17, 2011 at 1:54 PM, Dimitry Andric wrote: >> On 2011-12-17 22:32, mdf@FreeBSD.org wrote: >> ... >>>> =A0In usr.bin/csup/auth.c, use the correct number of bytes for zeroing= the >>>> =A0shared secret, and use long long format to snprintf a time_t. >>> If casting is necessary, style prefers intmax_t or uintmax_t, since >>> those are always wide enough. >> >> I don't see anything about that in style(9), maybe it should be added >> then? style(9) decoments the uncouthness of long long and %lld by providing no examples of them. Unfortunately for my cause, it also provides no examples of intmax_t. It is basically just too old to provide examples of either. > Probably; Bruce has mentioned it many times in the past, and as bz@ I tried to get [u]intmax_t used, and [unsigned] long long and [u]quad_t killed, before C99, so that FreeBSD would never use the long long abomination. There was a problem printing the [u]intmax_t's before C99. I don't remember anything that would have worked except %q, and in userland, also %ll. %ll was intentionally left out of the kernel printf(), but this has been broken. > notes, it's a well-defined type with a well-defined conversion > specifier. Also, long long is a bit of a hack that came in before C99 s/a bit of/gross/ > standardized on a few wider types, and the PRIu64 macros are really > hideous. Bruce --0-563560353-1324194517=:1383-- From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 08:14:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68F1D106566B; Sun, 18 Dec 2011 08:14:19 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id 99E908FC12; Sun, 18 Dec 2011 08:14:18 +0000 (UTC) Received: from c211-28-227-231.carlnfd1.nsw.optusnet.com.au (c211-28-227-231.carlnfd1.nsw.optusnet.com.au [211.28.227.231]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pBI8EFmp007987 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Dec 2011 19:14:16 +1100 Date: Sun, 18 Dec 2011 19:14:15 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric In-Reply-To: <4EED2D66.3000304@FreeBSD.org> Message-ID: <20111218184908.H1383@besplex.bde.org> References: <201112171314.pBHDEjtQ060509@svn.freebsd.org> <4EED0F99.2020306@FreeBSD.org> <4EED2D66.3000304@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, mdf@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228625 - head/usr.bin/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 08:14:19 -0000 On Sun, 18 Dec 2011, Dimitry Andric wrote: > On 2011-12-18 00:49, mdf@FreeBSD.org wrote: > ... >> Also, long long is a bit of a hack that came in before C99 >> standardized on a few wider types, and the PRIu64 macros are really >> hideous. > > I agree they're ugly, but C99 should simply have defined length > modifiers for int64_t and friends, then the PRI macros could have been > avoided. (Although not without backwards compatibility problems, but > you would have those anyway. :) Length modifiers for everything would have required more compiler and library support, and more excessive invention of new interfaces, and are almost as bad as PRI* anyway. Both require the programmer to know the type of a foo_t and hard-code this into the printf format. A good way would be %I or %\DWIM which is replaced in the string literal by the appropriate length modifier. (The compiler knows the correct length modifier after doing the same analysis as for warning about the modifier being wrong, and only has to tell the libary instead of the programmer about this.) Something different is needed for message catalogs. I've seen propsed that variadic functions should pass type info for all args, but this would break ABIs. It also takes more space and time than translating %I to a minimal modifier (usually a single letter). Bruce From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 08:31:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE2E91065672; Sun, 18 Dec 2011 08:31:06 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3B9848FC0C; Sun, 18 Dec 2011 08:31:05 +0000 (UTC) Received: from c211-28-227-231.carlnfd1.nsw.optusnet.com.au (c211-28-227-231.carlnfd1.nsw.optusnet.com.au [211.28.227.231]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pBI8V2C9014892 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Dec 2011 19:31:04 +1100 Date: Sun, 18 Dec 2011 19:31:02 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric In-Reply-To: <201112171352.pBHDqr9l061685@svn.freebsd.org> Message-ID: <20111218191653.X1495@besplex.bde.org> References: <201112171352.pBHDqr9l061685@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228626 - head/usr.bin/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 08:31:06 -0000 On Sat, 17 Dec 2011, Dimitry Andric wrote: > Log: > In usr.bin/csup/proto.c, use the correct printf length modifier to print > an off_t. > ... > Modified: head/usr.bin/csup/proto.c > ============================================================================== > --- head/usr.bin/csup/proto.c Sat Dec 17 13:14:44 2011 (r228625) > +++ head/usr.bin/csup/proto.c Sat Dec 17 13:52:53 2011 (r228626) > ... > @@ -751,7 +752,7 @@ proto_printf(struct stream *wr, const ch > break; > case 'O': > off = va_arg(ap, off_t); > - rv = stream_printf(wr, "%llu", off); > + rv = stream_printf(wr, "%" PRId64, off); > break; > case 'S': > s = va_arg(ap, char *); PRId64 is another incorrect printf format. off_t is typedefed so that it can be changed as neccessary. Using PRId64 hard-codes the assumption that it is precisely a 64 bit signed integer. It is indeed a signed integer (POSIX 2001 standard). In 1990 POSIX, it was only required to be a signed arithmetic type, so portable code had to handle the possibility that it was floating point, and on systems with C90 compilers and 32-bit longs, it needed to be floating point for it represent values a bit larger than 2**31-1. In FreeBSD-1, it was 32 bits, so neither of the above would compile. In FreeBSD[2-10], it is 64 bits integral. FreeBSD depended on using a non-C90 compiler even to declare it, and never needed floating point for it, except for strict C90 support it would have needed a compat layer with the int64_t kernel off_t trranslated to a long double userland off_t. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 09:08:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B122E106564A; Sun, 18 Dec 2011 09:08:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 3CCD78FC0A; Sun, 18 Dec 2011 09:08:19 +0000 (UTC) Received: from c211-28-227-231.carlnfd1.nsw.optusnet.com.au (c211-28-227-231.carlnfd1.nsw.optusnet.com.au [211.28.227.231]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pBI98GT6000654 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Dec 2011 20:08:18 +1100 Date: Sun, 18 Dec 2011 20:08:16 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric In-Reply-To: <201112180040.pBI0eVKi084246@svn.freebsd.org> Message-ID: <20111218194714.W1622@besplex.bde.org> References: <201112180040.pBI0eVKi084246@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228678 - head/usr.sbin/rpc.ypupdated X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 09:08:20 -0000 On Sun, 18 Dec 2011, Dimitry Andric wrote: > Log: > In usr.sbin/rpc.ypupdated/yp_dbupdate.c, use the appropriate printf > length modifier for time_t (after casting it to intmax_t). > > MFC after: 1 week > > Modified: > head/usr.sbin/rpc.ypupdated/yp_dbupdate.c > > Modified: head/usr.sbin/rpc.ypupdated/yp_dbupdate.c > ============================================================================== > --- head/usr.sbin/rpc.ypupdated/yp_dbupdate.c Sun Dec 18 00:34:42 2011 (r228677) > +++ head/usr.sbin/rpc.ypupdated/yp_dbupdate.c Sun Dec 18 00:40:30 2011 (r228678) > @@ -130,7 +130,7 @@ ypmap_update(char *netname, char *map, u > return(rval); > } > > - snprintf(yplastbuf, sizeof(yplastbuf), "%lu", time(NULL)); > + snprintf(yplastbuf, sizeof(yplastbuf), "%ju", (intmax_t)time(NULL)); > key.data = yp_last; > key.size = strlen(yp_last); > data.data = (char *)&yplastbuf; It still has a sign mismatch. time_t can be unsigned, but in practice isn't. Now a sign mismatch is certain, since intmax_t is signed but the format is still unsigned. If time() somehow failed, it would return -1 and this is printed as an inscrutable huge number (1844mumble with 64-bit intmax_t). If time_t were unsigned, then there would be another sign error converting it to intmax_t. Casting to intmax_t is silly for time_t, at least for current times. Many places cast to long. This is guaranteed to work until 2038 even on i386. It will keep working past then provided long is enlarged before then. I think long is already 64 bits on all arches that have 64-bit time_t. Determining the appropriate printf modifier for time_t is especially difficult, even in POSIX, since POSIX still allows it to be a floating point type (it now says "integer or real floating type" where it used to say "arithmetic type". C still says "arithmetic type", and that now seems to allow it to be a complex floating point type too). In C, there might be no appropriate modifier, since the encoding is unspecified but code like the above wants seconds [since the Epoch]. Apart from that, determination of the appropriate modifier requires either: A. first determine if it is floating point. If so, cast to long double, etc. else determine if it is signed. If so, cast to intmax_t, etc. else cast to uintmax_t. B. just assume that it is signed integer and cast to the simplest type that works. I prefer plain long. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 12:19:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F0C2106566C; Sun, 18 Dec 2011 12:19:04 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 631A88FC0A; Sun, 18 Dec 2011 12:19:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBICJ4aj008703; Sun, 18 Dec 2011 12:19:04 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBICJ4wF008700; Sun, 18 Dec 2011 12:19:04 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201112181219.pBICJ4wF008700@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 18 Dec 2011 12:19:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228685 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 12:19:04 -0000 Author: pjd Date: Sun Dec 18 12:19:03 2011 New Revision: 228685 URL: http://svn.freebsd.org/changeset/base/228685 Log: Implement replying of ACLs updates. ACL changes should go to ZIL only if the 'sync' property is set to 'always', so replying them is not common. MFC after: 1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c Sun Dec 18 02:10:25 2011 (r228684) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c Sun Dec 18 12:19:03 2011 (r228685) @@ -904,11 +904,15 @@ zfs_replay_setattr(zfsvfs_t *zfsvfs, lr_ return (error); } +extern int zfs_setsecattr(vnode_t *vp, vsecattr_t *vsecp, int flag, cred_t *cr, + caller_context_t *ct); + static int zfs_replay_acl_v0(zfsvfs_t *zfsvfs, lr_acl_v0_t *lr, boolean_t byteswap) { ace_t *ace = (ace_t *)(lr + 1); /* ace array follows lr_acl_t */ vsecattr_t vsa; + vnode_t *vp; znode_t *zp; int error; @@ -927,13 +931,12 @@ zfs_replay_acl_v0(zfsvfs_t *zfsvfs, lr_a vsa.vsa_aclflags = 0; vsa.vsa_aclentp = ace; -#ifdef TODO - error = VOP_SETSECATTR(ZTOV(zp), &vsa, 0, kcred, NULL); -#else - panic("%s:%u: unsupported condition", __func__, __LINE__); -#endif + vp = ZTOV(zp); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + error = zfs_setsecattr(vp, &vsa, 0, kcred, NULL); + VOP_UNLOCK(vp, 0); - VN_RELE(ZTOV(zp)); + VN_RELE(vp); return (error); } @@ -958,6 +961,7 @@ zfs_replay_acl(zfsvfs_t *zfsvfs, lr_acl_ ace_t *ace = (ace_t *)(lr + 1); vsecattr_t vsa; znode_t *zp; + vnode_t *vp; int error; if (byteswap) { @@ -973,7 +977,6 @@ zfs_replay_acl(zfsvfs_t *zfsvfs, lr_acl_ if ((error = zfs_zget(zfsvfs, lr->lr_foid, &zp)) != 0) return (error); -#ifdef TODO bzero(&vsa, sizeof (vsa)); vsa.vsa_mask = VSA_ACE | VSA_ACECNT | VSA_ACE_ACLFLAGS; vsa.vsa_aclcnt = lr->lr_aclcnt; @@ -990,16 +993,16 @@ zfs_replay_acl(zfsvfs_t *zfsvfs, lr_acl_ lr->lr_fuidcnt, lr->lr_domcnt, 0, 0); } - error = VOP_SETSECATTR(ZTOV(zp), &vsa, 0, kcred, NULL); + vp = ZTOV(zp); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + error = zfs_setsecattr(vp, &vsa, 0, kcred, NULL); + VOP_UNLOCK(vp, 0); if (zfsvfs->z_fuid_replay) zfs_fuid_info_free(zfsvfs->z_fuid_replay); -#else - error = EOPNOTSUPP; -#endif zfsvfs->z_fuid_replay = NULL; - VN_RELE(ZTOV(zp)); + VN_RELE(vp); return (error); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Dec 18 02:10:25 2011 (r228684) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Dec 18 12:19:03 2011 (r228685) @@ -5163,7 +5163,7 @@ zfs_getsecattr(vnode_t *vp, vsecattr_t * } /*ARGSUSED*/ -static int +int zfs_setsecattr(vnode_t *vp, vsecattr_t *vsecp, int flag, cred_t *cr, caller_context_t *ct) { From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 12:27:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 461F01065673; Sun, 18 Dec 2011 12:27:46 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A5A18FC13; Sun, 18 Dec 2011 12:27:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBICRj8F009002; Sun, 18 Dec 2011 12:27:45 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBICRjQ3009000; Sun, 18 Dec 2011 12:27:45 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201112181227.pBICRjQ3009000@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 18 Dec 2011 12:27:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228686 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 12:27:46 -0000 Author: pjd Date: Sun Dec 18 12:27:45 2011 New Revision: 228686 URL: http://svn.freebsd.org/changeset/base/228686 Log: From time to time people report space map corruption resulting in panic (ss == NULL) on pool import. I had such a panic recently. With current version of ZFS it is still possible to import the pool in readonly mode and backup all the data, but in case it is impossible for some reason add tunable vfs.zfs.space_map_last_hope, which when set to '1' will tell ZFS to remove colliding range and retry. This seems to have worked for me, but I consider it highly risky to use. MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Sun Dec 18 12:19:03 2011 (r228685) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c Sun Dec 18 12:27:45 2011 (r228686) @@ -29,6 +29,13 @@ #include #include +SYSCTL_DECL(_vfs_zfs); +static int space_map_last_hope; +TUNABLE_INT("vfs.zfs.space_map_last_hope", &space_map_last_hope); +SYSCTL_INT(_vfs_zfs, OID_AUTO, space_map_last_hope, CTLFLAG_RDTUN, + &space_map_last_hope, 0, + "If kernel panic in space_map code on pool import, import the pool in readonly mode and backup all your data before trying this option."); + /* * Space map routines. * NOTE: caller is responsible for all locking. @@ -93,7 +100,7 @@ space_map_add(space_map_t *sm, uint64_t VERIFY(sm->sm_space + size <= sm->sm_size); VERIFY(P2PHASE(start, 1ULL << sm->sm_shift) == 0); VERIFY(P2PHASE(size, 1ULL << sm->sm_shift) == 0); - +again: ssearch.ss_start = start; ssearch.ss_end = end; ss = avl_find(&sm->sm_root, &ssearch, &where); @@ -104,6 +111,23 @@ space_map_add(space_map_t *sm, uint64_t (longlong_t)start, (longlong_t)size); return; } + if (ss != NULL && space_map_last_hope) { + uint64_t sstart, ssize; + + if (ss->ss_start > start) + sstart = ss->ss_start; + else + sstart = start; + if (ss->ss_end > end) + ssize = end - sstart; + else + ssize = ss->ss_end - sstart; + ZFS_LOG(0, + "Removing colliding space_map range (start=%ju end=%ju). Good luck!", + (uintmax_t)sstart, (uintmax_t)(sstart + ssize)); + space_map_remove(sm, sstart, ssize); + goto again; + } /* Make sure we don't overlap with either of our neighbors */ VERIFY(ss == NULL); From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 15:36:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AF7C106564A; Sun, 18 Dec 2011 15:36:22 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A2738FC12; Sun, 18 Dec 2011 15:36:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBIFaMbm014887; Sun, 18 Dec 2011 15:36:22 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBIFaMLC014885; Sun, 18 Dec 2011 15:36:22 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201112181536.pBIFaMLC014885@svn.freebsd.org> From: Sergey Kandaurov Date: Sun, 18 Dec 2011 15:36:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228687 - head/sys/ddb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 15:36:22 -0000 Author: pluknet Date: Sun Dec 18 15:36:21 2011 New Revision: 228687 URL: http://svn.freebsd.org/changeset/base/228687 Log: Use FOREACH_PROC_IN_SYSTEM instead of using its unrolled form. Reviewed by: kib Modified: head/sys/ddb/db_ps.c Modified: head/sys/ddb/db_ps.c ============================================================================== --- head/sys/ddb/db_ps.c Sun Dec 18 12:27:45 2011 (r228686) +++ head/sys/ddb/db_ps.c Sun Dec 18 15:36:21 2011 (r228687) @@ -447,7 +447,7 @@ db_findstack_cmd(db_expr_t addr, boolean return; } - for (p = LIST_FIRST(&allproc); p != NULL; p = LIST_NEXT(p, p_list)) { + FOREACH_PROC_IN_SYSTEM(p) { FOREACH_THREAD_IN_PROC(p, td) { if (td->td_kstack <= saddr && saddr < td->td_kstack + PAGE_SIZE * td->td_kstack_pages) { From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 16:23:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A2F6106566B; Sun, 18 Dec 2011 16:23:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id EDBAA8FC08; Sun, 18 Dec 2011 16:23:12 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:1c1b:9549:1b4:20d] (unknown [IPv6:2001:7b8:3a7:0:1c1b:9549:1b4:20d]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 0976A5C37; Sun, 18 Dec 2011 17:23:12 +0100 (CET) Message-ID: <4EEE136F.5080904@FreeBSD.org> Date: Sun, 18 Dec 2011 17:23:11 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111214 Thunderbird/9.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201112172232.pBHMW1Bd079555@svn.freebsd.org> <4EED18B5.8000907@FreeBSD.org> <20111218013905.GA20867@zim.MIT.EDU> In-Reply-To: <20111218013905.GA20867@zim.MIT.EDU> X-Enigmail-Version: 1.3.4 Content-Type: multipart/mixed; boundary="------------050704080607050203000401" Cc: Subject: Re: svn commit: r228668 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 16:23:13 -0000 This is a multi-part message in MIME format. --------------050704080607050203000401 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 2011-12-18 02:39, David Schultz wrote: ... >>> Log: >>> Revert r228650, and work around the clang false positive with printf >>> formats in usr.bin/netstat/atalk.c by conditionally adding NO_WFORMAT to >>> the Makefile instead. ... > Have you been keeping track of the other hacks you've been > sprinkling throughout the tree to work around clang bugs, e.g., > the one in fsdb? It would be unfortunate if someone else has to > waste their time later on figuring out what you did, when we could > just as easily have waited a month for the clang bug to be fixed. Yes, I will revert the fsdb change too, and add a workaround in the Makefile. Though after talking with a language lawyer type person, it seems that clang was actually right with its original warning. Apparently, if you use ?: with two shorts, the end result always gets promoted to an int, due to the Usual Arithmetic Conversions, so using the "%hu" format is not correct. The following small program demonstrates this: #include int main(void) { printf("%zu\n", sizeof(1 > 2 ? (short)1 : (short)2)); return 0; } It will always print sizeof(int), e.g. 4 on most arches. This is not what most programmers expect, I guess, at least I didn't. :) Since htons() and ntohs() are implemented in our tree with the __bswap macros, which use ?: operators (at least when GNU inline asm and __builtin_constant_p are supported), they will in fact return int, not uint16_t. A better fix is to add explicit casts to the __bswap macros, as per attached patch, which I'm running through a make universe now. (Note that some arches, such as arm and mips already add the explicit casts for the expected __bswap return types.) Would that be OK to commit? > Incidentally, the "bug" you fixed in telnet/utilities.c is also a > false positive; clang doesn't understand that an index into a > string constant is also a string constant. Yes, that is indeed a false positive, although this way of offsetting a format string is a bit too clever, to the point of being unreadable. :) I will create a PR for the clang guys, and revert this, adding NO_WFORMAT to the Makefile as a workaround. --------------050704080607050203000401 Content-Type: text/x-diff; name="bswap-ternary-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bswap-ternary-1.diff" diff --git a/sys/amd64/include/endian.h b/sys/amd64/include/endian.h index de22c8b..60ed226 100644 --- a/sys/amd64/include/endian.h +++ b/sys/amd64/include/endian.h @@ -111,16 +111,16 @@ __bswap16_var(__uint16_t _x) } #define __bswap64(_x) \ - (__builtin_constant_p(_x) ? \ - __bswap64_const((__uint64_t)(_x)) : __bswap64_var(_x)) + ((__uint64_t)(__builtin_constant_p(_x) ? \ + __bswap64_const((__uint64_t)(_x)) : __bswap64_var(_x))) #define __bswap32(_x) \ - (__builtin_constant_p(_x) ? \ - __bswap32_const((__uint32_t)(_x)) : __bswap32_var(_x)) + ((__uint32_t)(__builtin_constant_p(_x) ? \ + __bswap32_const((__uint32_t)(_x)) : __bswap32_var(_x))) #define __bswap16(_x) \ - (__builtin_constant_p(_x) ? \ - __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x)) + ((__uint16_t)(__builtin_constant_p(_x) ? \ + __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x))) #define __htonl(x) __bswap32(x) #define __htons(x) __bswap16(x) diff --git a/sys/i386/include/endian.h b/sys/i386/include/endian.h index c09dfb1..0dbc6a5 100644 --- a/sys/i386/include/endian.h +++ b/sys/i386/include/endian.h @@ -111,16 +111,16 @@ __bswap16_var(__uint16_t _x) } #define __bswap64(_x) \ - (__builtin_constant_p(_x) ? \ - __bswap64_const((__uint64_t)(_x)) : __bswap64_var(_x)) + ((__uint64_t)(__builtin_constant_p(_x) ? \ + __bswap64_const((__uint64_t)(_x)) : __bswap64_var(_x))) #define __bswap32(_x) \ - (__builtin_constant_p(_x) ? \ - __bswap32_const((__uint32_t)(_x)) : __bswap32_var(_x)) + ((__uint32_t)(__builtin_constant_p(_x) ? \ + __bswap32_const((__uint32_t)(_x)) : __bswap32_var(_x))) #define __bswap16(_x) \ - (__builtin_constant_p(_x) ? \ - __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x)) + ((__uint16_t)(__builtin_constant_p(_x) ? \ + __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x))) #define __htonl(x) __bswap32(x) #define __htons(x) __bswap16(x) diff --git a/sys/powerpc/include/endian.h b/sys/powerpc/include/endian.h index 15dd7db..da0a0bb 100644 --- a/sys/powerpc/include/endian.h +++ b/sys/powerpc/include/endian.h @@ -124,12 +124,12 @@ __bswap64_var(__uint64_t _x) ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56))); } -#define __bswap16(x) (__is_constant(x) ? __bswap16_const(x) : \ - __bswap16_var(x)) -#define __bswap32(x) (__is_constant(x) ? __bswap32_const(x) : \ - __bswap32_var(x)) -#define __bswap64(x) (__is_constant(x) ? __bswap64_const(x) : \ - __bswap64_var(x)) +#define __bswap16(x) ((__uint16_t)(__is_constant(x) ? __bswap16_const(x) : \ + __bswap16_var(x))) +#define __bswap32(x) ((__uint32_t)(__is_constant(x) ? __bswap32_const(x) : \ + __bswap32_var(x))) +#define __bswap64(x) ((__uint64_t)(__is_constant(x) ? __bswap64_const(x) : \ + __bswap64_var(x))) #define __htonl(x) ((__uint32_t)(x)) #define __htons(x) ((__uint16_t)(x)) diff --git a/sys/sparc64/include/endian.h b/sys/sparc64/include/endian.h index 2ca467e..d81ec1b 100644 --- a/sys/sparc64/include/endian.h +++ b/sys/sparc64/include/endian.h @@ -109,12 +109,12 @@ __bswap64_var(__uint64_t _x) ((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56))); } -#define __bswap16(x) (__is_constant(x) ? __bswap16_const(x) : \ - __bswap16_var(x)) -#define __bswap32(x) (__is_constant(x) ? __bswap32_const(x) : \ - __bswap32_var(x)) -#define __bswap64(x) (__is_constant(x) ? __bswap64_const(x) : \ - __bswap64_var(x)) +#define __bswap16(x) ((__uint16_t)(__is_constant(x) ? __bswap16_const(x) : \ + __bswap16_var(x))) +#define __bswap32(x) ((__uint32_t)(__is_constant(x) ? __bswap32_const(x) : \ + __bswap32_var(x))) +#define __bswap64(x) ((__uint64_t)(__is_constant(x) ? __bswap64_const(x) : \ + __bswap64_var(x))) #define __htonl(x) ((__uint32_t)(x)) #define __htons(x) ((__uint16_t)(x)) --------------050704080607050203000401-- From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 16:33:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64E811065670; Sun, 18 Dec 2011 16:33:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 245DD8FC13; Sun, 18 Dec 2011 16:33:33 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:1c1b:9549:1b4:20d] (unknown [IPv6:2001:7b8:3a7:0:1c1b:9549:1b4:20d]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 64FC05C37; Sun, 18 Dec 2011 17:33:32 +0100 (CET) Message-ID: <4EEE15DB.6060604@FreeBSD.org> Date: Sun, 18 Dec 2011 17:33:31 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111214 Thunderbird/9.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201112172232.pBHMW1Bd079555@svn.freebsd.org> <4EED18B5.8000907@FreeBSD.org> <20111218013905.GA20867@zim.MIT.EDU> <20111218014144.GB20867@zim.MIT.EDU> In-Reply-To: <20111218014144.GB20867@zim.MIT.EDU> X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r228668 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 16:33:33 -0000 On 2011-12-18 02:41, David Schultz wrote: ... > Sorry, one more: In less(1), you cast away a bunch of const qualifiers > to fix some warnings, but that seems like a step in the wrong > direction. The warnings were complaining about genuinely bad code. > Disabling the warnings with casts doesn't make less(1) any better; > instead, it guarantees that nobody will ever fix the code. Yes, I did it purposefully this way. Constifying the whole program would have much more impact, and increase the probability of a bug sneaking in. That said, if anybody knows if the less maintainer (Mark Nudelman?) is responsive, I have no problem doing a proper const poisoning, and submitting it to him for review. > Perhaps the larger question is whether it makes sense to fix non-bugs > in contributed code at all. What do we get out of it? Maybe if the > contrib software is poorly maintained we'll find a bunch of real bugs > that won't be addressed upstream. Otherwise, the diffs are only creating > headaches for whoever imports the next version. The criterion I use for fixing warnings is rather simple: if the contrib software is compiled with -Werror, then apparently we (or at least some of us :) are interested in the warnings, and they should be fixed. If we are not interested in the warnings, we should just turn off -Werror. Of course, if warnings point to a real problem, and upstream for the contrib software still exists, we should strive for submitting them, and getting them back through imports. That can take a very long time, however, and meanwhile the warnings still block building world with -Werror. Thus, in some cases, it is better to fix them now, and just merge the fixes during import. If upstream accepts our fixes verbatim, they should not conflict anyway. From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 16:53:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BA941065670; Sun, 18 Dec 2011 16:53:03 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A6368FC19; Sun, 18 Dec 2011 16:53:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBIGr3mo017287; Sun, 18 Dec 2011 16:53:03 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBIGr3Tb017284; Sun, 18 Dec 2011 16:53:03 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201112181653.pBIGr3Tb017284@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 18 Dec 2011 16:53:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228688 - head/sys/powerpc/ps3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 16:53:03 -0000 Author: nwhitehorn Date: Sun Dec 18 16:53:03 2011 New Revision: 228688 URL: http://svn.freebsd.org/changeset/base/228688 Log: Add version header to output file. Modified: head/sys/powerpc/ps3/ps3-hv-asm.awk Modified: head/sys/powerpc/ps3/ps3-hv-asm.awk ============================================================================== --- head/sys/powerpc/ps3/ps3-hv-asm.awk Sun Dec 18 15:36:21 2011 (r228687) +++ head/sys/powerpc/ps3/ps3-hv-asm.awk Sun Dec 18 16:53:03 2011 (r228688) @@ -9,6 +9,7 @@ # $FreeBSD$ BEGIN { + printf("/* $FreeBSD$ */\n\n"); printf("#include \n\n"); printf("#define hc .long 0x44000022\n\n"); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 16:53:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2749E1065670; Sun, 18 Dec 2011 16:53:22 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1597E8FC15; Sun, 18 Dec 2011 16:53:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBIGrLCf017334; Sun, 18 Dec 2011 16:53:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBIGrLhp017329; Sun, 18 Dec 2011 16:53:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201112181653.pBIGrLhp017329@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 18 Dec 2011 16:53:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228689 - head/sys/powerpc/ps3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 16:53:22 -0000 Author: nwhitehorn Date: Sun Dec 18 16:53:21 2011 New Revision: 228689 URL: http://svn.freebsd.org/changeset/base/228689 Log: Support infrastructure for X11 on PS3. Submitted by: geoffrey dot levand at mail dot ru MFC after: 1 week Modified: head/sys/powerpc/ps3/ps3-hvcall.S head/sys/powerpc/ps3/ps3-hvcall.h head/sys/powerpc/ps3/ps3-hvcall.master head/sys/powerpc/ps3/ps3_syscons.c Modified: head/sys/powerpc/ps3/ps3-hvcall.S ============================================================================== --- head/sys/powerpc/ps3/ps3-hvcall.S Sun Dec 18 16:53:03 2011 (r228688) +++ head/sys/powerpc/ps3/ps3-hvcall.S Sun Dec 18 16:53:21 2011 (r228689) @@ -1081,13 +1081,25 @@ ASENTRY(lv1_gpu_memory_free) ASENTRY(lv1_gpu_context_allocate) mflr %r0 std %r0,16(%r1) - stdu %r1,-56(%r1) + stdu %r1,-88(%r1) std %r5,48(%r1) + std %r6,56(%r1) + std %r7,64(%r1) + std %r8,72(%r1) + std %r9,80(%r1) li %r11,217 hc extsw %r3,%r3 ld %r11,48(%r1) std %r4,0(%r11) + ld %r11,56(%r1) + std %r5,0(%r11) + ld %r11,64(%r1) + std %r6,0(%r11) + ld %r11,72(%r1) + std %r7,0(%r11) + ld %r11,80(%r1) + std %r8,0(%r11) ld %r1,0(%r1) ld %r0,16(%r1) mtlr %r0 @@ -1144,6 +1156,18 @@ ASENTRY(lv1_gpu_context_intr) mtlr %r0 blr +ASENTRY(lv1_gpu_attribute) + mflr %r0 + std %r0,16(%r1) + stdu %r1,-48(%r1) + li %r11,228 + hc + extsw %r3,%r3 + ld %r1,0(%r1) + ld %r0,16(%r1) + mtlr %r0 + blr + ASENTRY(lv1_get_rtc) mflr %r0 std %r0,16(%r1) Modified: head/sys/powerpc/ps3/ps3-hvcall.h ============================================================================== --- head/sys/powerpc/ps3/ps3-hvcall.h Sun Dec 18 16:53:03 2011 (r228688) +++ head/sys/powerpc/ps3/ps3-hvcall.h Sun Dec 18 16:53:21 2011 (r228689) @@ -124,11 +124,12 @@ int lv1_gpu_device_map(uint64_t dev, uin int lv1_gpu_device_unmap(uint64_t dev); int lv1_gpu_memory_allocate(uint64_t ddr_size, uint64_t zero1, uint64_t zero2, uint64_t zero3, uint64_t zero4, uint64_t *handle, uint64_t *ddr_lpar); int lv1_gpu_memory_free(uint64_t handle); -int lv1_gpu_context_allocate(uint64_t handle, uint64_t , uint64_t *zero); +int lv1_gpu_context_allocate(uint64_t handle, uint64_t flags, uint64_t *chandle, uint64_t *lpar_dma_control, uint64_t *lpar_driver_info, uint64_t *lpar_reports, uint64_t *lpar_reports_size); int lv1_gpu_context_free(uint64_t chandle); int lv1_gpu_context_iomap(uint64_t changle, uint64_t gpu_ioif, uint64_t xdr_lpar, uint64_t fbsize, uint64_t ioflags); int lv1_gpu_context_attribute(uint64_t chandle, uint64_t op, uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4); int lv1_gpu_context_intr(uint64_t chandle, uint64_t *v1); +int lv1_gpu_attribute(uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4, uint64_t p5); int lv1_get_rtc(uint64_t *rtc_val, uint64_t *timebase); int lv1_storage_read(uint64_t dev, uint64_t region, uint64_t sector, uint64_t nsectors, uint64_t flags, uint64_t buf, uint64_t *dma_tag); int lv1_storage_write(uint64_t dev, uint64_t region, uint64_t sector, uint64_t nsectors, uint64_t flags, uint64_t buf, uint64_t *dma_tag); Modified: head/sys/powerpc/ps3/ps3-hvcall.master ============================================================================== --- head/sys/powerpc/ps3/ps3-hvcall.master Sun Dec 18 16:53:03 2011 (r228688) +++ head/sys/powerpc/ps3/ps3-hvcall.master Sun Dec 18 16:53:21 2011 (r228689) @@ -125,11 +125,12 @@ HVCALL 212 lv1_gpu_device_map dev l HVCALL 213 lv1_gpu_device_unmap dev HVCALL 214 lv1_gpu_memory_allocate ddr_size,zero1,zero2,zero3,zero4 handle,ddr_lpar HVCALL 216 lv1_gpu_memory_free handle -HVCALL 217 lv1_gpu_context_allocate handle, zero chandle,lpar_dma_control,lpar_driver_info,lpar_reports,lpar_reports_size +HVCALL 217 lv1_gpu_context_allocate handle,flags chandle,lpar_dma_control,lpar_driver_info,lpar_reports,lpar_reports_size HVCALL 218 lv1_gpu_context_free chandle HVCALL 221 lv1_gpu_context_iomap changle,gpu_ioif,xdr_lpar,fbsize,ioflags HVCALL 225 lv1_gpu_context_attribute chandle,op,p1,p2,p3,p4 HVCALL 227 lv1_gpu_context_intr chandle v1 +HVCALL 228 lv1_gpu_attribute p1,p2,p3,p4,p5 HVCALL 232 lv1_get_rtc UNUSED rtc_val,timebase HVCALL 245 lv1_storage_read dev,region,sector,nsectors,flags,buf dma_tag HVCALL 246 lv1_storage_write dev,region,sector,nsectors,flags,buf dma_tag Modified: head/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- head/sys/powerpc/ps3/ps3_syscons.c Sun Dec 18 16:53:03 2011 (r228688) +++ head/sys/powerpc/ps3/ps3_syscons.c Sun Dec 18 16:53:21 2011 (r228689) @@ -121,6 +121,13 @@ struct ps3fb_softc { u_char *sc_font; int sc_font_height; + + uint64_t sc_fbhandle; + uint64_t sc_fbcontext; + uint64_t sc_dma_control; + uint64_t sc_driver_info; + uint64_t sc_reports; + uint64_t sc_reports_size; }; static video_switch_t ps3fbvidsw = { @@ -276,8 +283,10 @@ ps3fb_configure(int flags) void ps3fb_remap(void) { + struct ps3fb_softc *sc; vm_offset_t va, fb_paddr; - uint64_t fbhandle, fbcontext; + + sc = &ps3fb_softc; lv1_gpu_close(); lv1_gpu_open(0); @@ -290,12 +299,13 @@ ps3fb_remap(void) 0,L1GPU_DISPLAY_SYNC_VSYNC,0,0); lv1_gpu_context_attribute(0, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_SYNC, 1,L1GPU_DISPLAY_SYNC_VSYNC,0,0); - lv1_gpu_memory_allocate(PS3FB_SIZE, 0, 0, 0, 0, &fbhandle, &fb_paddr); - lv1_gpu_context_allocate(fbhandle, 0, &fbcontext); + lv1_gpu_memory_allocate(PS3FB_SIZE, 0, 0, 0, 0, &sc->sc_fbhandle, &fb_paddr); + lv1_gpu_context_allocate(sc->sc_fbhandle, 0, &sc->sc_fbcontext, &sc->sc_dma_control, + &sc->sc_driver_info, &sc->sc_reports, &sc->sc_reports_size); - lv1_gpu_context_attribute(fbcontext, + lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 0, 0, 0, 0); - lv1_gpu_context_attribute(fbcontext, + lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 1, 0, 0, 0); for (va = 0; va < PS3FB_SIZE; va += PAGE_SIZE) @@ -405,6 +415,11 @@ ps3fb_set_mode(video_adapter_t *adp, int ps3fb_blank_display(&sc->sc_va, V_DISPLAY_ON); + lv1_gpu_context_attribute(sc->sc_fbcontext, + L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 0, 0, 0, 0); + lv1_gpu_context_attribute(sc->sc_fbcontext, + L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 1, 0, 0, 0); + return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 17:08:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC299106566C; Sun, 18 Dec 2011 17:08:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A71618FC0C; Sun, 18 Dec 2011 17:08:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBIH8fa8017855; Sun, 18 Dec 2011 17:08:41 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBIH8fcN017845; Sun, 18 Dec 2011 17:08:41 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201112181708.pBIH8fcN017845@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sun, 18 Dec 2011 17:08:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228690 - in vendor/openpam/dist: . bin bin/pamtest bin/su doc doc/man include include/security lib misc modules modules/pam_deny modules/pam_permit modules/pam_unix X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 17:08:41 -0000 Author: des Date: Sun Dec 18 17:08:40 2011 New Revision: 228690 URL: http://svn.freebsd.org/changeset/base/228690 Log: Vendor import of OpenPAM Lycopsida. Added: vendor/openpam/dist/bin/pamtest/ vendor/openpam/dist/bin/pamtest/Makefile.am vendor/openpam/dist/bin/pamtest/Makefile.in vendor/openpam/dist/bin/pamtest/pamtest.1 vendor/openpam/dist/bin/pamtest/pamtest.c vendor/openpam/dist/bin/su/su.1 vendor/openpam/dist/doc/man/openpam_subst.3 vendor/openpam/dist/lib/openpam_check_owner_perms.c vendor/openpam/dist/lib/openpam_constants.c vendor/openpam/dist/lib/openpam_constants.h vendor/openpam/dist/lib/openpam_debug.h vendor/openpam/dist/lib/openpam_strlcmp.h vendor/openpam/dist/lib/openpam_strlcpy.h vendor/openpam/dist/lib/openpam_subst.c Modified: vendor/openpam/dist/CREDITS vendor/openpam/dist/HISTORY vendor/openpam/dist/LICENSE vendor/openpam/dist/Makefile.am vendor/openpam/dist/Makefile.in vendor/openpam/dist/README vendor/openpam/dist/RELNOTES vendor/openpam/dist/aclocal.m4 vendor/openpam/dist/bin/Makefile.am vendor/openpam/dist/bin/Makefile.in vendor/openpam/dist/bin/su/Makefile.am vendor/openpam/dist/bin/su/Makefile.in vendor/openpam/dist/bin/su/su.c vendor/openpam/dist/config.h.in vendor/openpam/dist/configure vendor/openpam/dist/configure.ac vendor/openpam/dist/depcomp vendor/openpam/dist/doc/Makefile.in vendor/openpam/dist/doc/man/Makefile.am vendor/openpam/dist/doc/man/Makefile.in vendor/openpam/dist/doc/man/openpam.3 vendor/openpam/dist/doc/man/openpam_borrow_cred.3 vendor/openpam/dist/doc/man/openpam_free_data.3 vendor/openpam/dist/doc/man/openpam_free_envlist.3 vendor/openpam/dist/doc/man/openpam_get_option.3 vendor/openpam/dist/doc/man/openpam_log.3 vendor/openpam/dist/doc/man/openpam_nullconv.3 vendor/openpam/dist/doc/man/openpam_readline.3 vendor/openpam/dist/doc/man/openpam_restore_cred.3 vendor/openpam/dist/doc/man/openpam_set_option.3 vendor/openpam/dist/doc/man/openpam_ttyconv.3 vendor/openpam/dist/doc/man/pam.3 vendor/openpam/dist/doc/man/pam.conf.5 vendor/openpam/dist/doc/man/pam_acct_mgmt.3 vendor/openpam/dist/doc/man/pam_authenticate.3 vendor/openpam/dist/doc/man/pam_chauthtok.3 vendor/openpam/dist/doc/man/pam_close_session.3 vendor/openpam/dist/doc/man/pam_conv.3 vendor/openpam/dist/doc/man/pam_end.3 vendor/openpam/dist/doc/man/pam_error.3 vendor/openpam/dist/doc/man/pam_get_authtok.3 vendor/openpam/dist/doc/man/pam_get_data.3 vendor/openpam/dist/doc/man/pam_get_item.3 vendor/openpam/dist/doc/man/pam_get_user.3 vendor/openpam/dist/doc/man/pam_getenv.3 vendor/openpam/dist/doc/man/pam_getenvlist.3 vendor/openpam/dist/doc/man/pam_info.3 vendor/openpam/dist/doc/man/pam_open_session.3 vendor/openpam/dist/doc/man/pam_prompt.3 vendor/openpam/dist/doc/man/pam_putenv.3 vendor/openpam/dist/doc/man/pam_set_data.3 vendor/openpam/dist/doc/man/pam_set_item.3 vendor/openpam/dist/doc/man/pam_setcred.3 vendor/openpam/dist/doc/man/pam_setenv.3 vendor/openpam/dist/doc/man/pam_sm_acct_mgmt.3 vendor/openpam/dist/doc/man/pam_sm_authenticate.3 vendor/openpam/dist/doc/man/pam_sm_chauthtok.3 vendor/openpam/dist/doc/man/pam_sm_close_session.3 vendor/openpam/dist/doc/man/pam_sm_open_session.3 vendor/openpam/dist/doc/man/pam_sm_setcred.3 vendor/openpam/dist/doc/man/pam_start.3 vendor/openpam/dist/doc/man/pam_strerror.3 vendor/openpam/dist/doc/man/pam_verror.3 vendor/openpam/dist/doc/man/pam_vinfo.3 vendor/openpam/dist/doc/man/pam_vprompt.3 vendor/openpam/dist/include/Makefile.in vendor/openpam/dist/include/security/Makefile.in vendor/openpam/dist/include/security/openpam.h vendor/openpam/dist/include/security/openpam_version.h vendor/openpam/dist/include/security/pam_appl.h vendor/openpam/dist/include/security/pam_constants.h vendor/openpam/dist/include/security/pam_modules.h vendor/openpam/dist/include/security/pam_types.h vendor/openpam/dist/install-sh vendor/openpam/dist/lib/Makefile.am vendor/openpam/dist/lib/Makefile.in vendor/openpam/dist/lib/openpam_borrow_cred.c vendor/openpam/dist/lib/openpam_configure.c vendor/openpam/dist/lib/openpam_dispatch.c vendor/openpam/dist/lib/openpam_dynamic.c vendor/openpam/dist/lib/openpam_findenv.c vendor/openpam/dist/lib/openpam_free_data.c vendor/openpam/dist/lib/openpam_free_envlist.c vendor/openpam/dist/lib/openpam_get_option.c vendor/openpam/dist/lib/openpam_impl.h vendor/openpam/dist/lib/openpam_load.c vendor/openpam/dist/lib/openpam_log.c vendor/openpam/dist/lib/openpam_nullconv.c vendor/openpam/dist/lib/openpam_readline.c vendor/openpam/dist/lib/openpam_restore_cred.c vendor/openpam/dist/lib/openpam_set_option.c vendor/openpam/dist/lib/openpam_static.c vendor/openpam/dist/lib/openpam_ttyconv.c vendor/openpam/dist/lib/pam_acct_mgmt.c vendor/openpam/dist/lib/pam_authenticate.c vendor/openpam/dist/lib/pam_authenticate_secondary.c vendor/openpam/dist/lib/pam_chauthtok.c vendor/openpam/dist/lib/pam_close_session.c vendor/openpam/dist/lib/pam_end.c vendor/openpam/dist/lib/pam_error.c vendor/openpam/dist/lib/pam_get_authtok.c vendor/openpam/dist/lib/pam_get_data.c vendor/openpam/dist/lib/pam_get_item.c vendor/openpam/dist/lib/pam_get_mapped_authtok.c vendor/openpam/dist/lib/pam_get_mapped_username.c vendor/openpam/dist/lib/pam_get_user.c vendor/openpam/dist/lib/pam_getenv.c vendor/openpam/dist/lib/pam_getenvlist.c vendor/openpam/dist/lib/pam_info.c vendor/openpam/dist/lib/pam_open_session.c vendor/openpam/dist/lib/pam_prompt.c vendor/openpam/dist/lib/pam_putenv.c vendor/openpam/dist/lib/pam_set_data.c vendor/openpam/dist/lib/pam_set_item.c vendor/openpam/dist/lib/pam_set_mapped_authtok.c vendor/openpam/dist/lib/pam_set_mapped_username.c vendor/openpam/dist/lib/pam_setcred.c vendor/openpam/dist/lib/pam_setenv.c vendor/openpam/dist/lib/pam_sm_acct_mgmt.c vendor/openpam/dist/lib/pam_sm_authenticate.c vendor/openpam/dist/lib/pam_sm_authenticate_secondary.c vendor/openpam/dist/lib/pam_sm_chauthtok.c vendor/openpam/dist/lib/pam_sm_close_session.c vendor/openpam/dist/lib/pam_sm_get_mapped_authtok.c vendor/openpam/dist/lib/pam_sm_get_mapped_username.c vendor/openpam/dist/lib/pam_sm_open_session.c vendor/openpam/dist/lib/pam_sm_set_mapped_authtok.c vendor/openpam/dist/lib/pam_sm_set_mapped_username.c vendor/openpam/dist/lib/pam_sm_setcred.c vendor/openpam/dist/lib/pam_start.c vendor/openpam/dist/lib/pam_strerror.c vendor/openpam/dist/lib/pam_verror.c vendor/openpam/dist/lib/pam_vinfo.c vendor/openpam/dist/lib/pam_vprompt.c vendor/openpam/dist/ltmain.sh vendor/openpam/dist/misc/gendoc.pl vendor/openpam/dist/missing vendor/openpam/dist/modules/Makefile.in vendor/openpam/dist/modules/pam_deny/Makefile.in vendor/openpam/dist/modules/pam_deny/pam_deny.c vendor/openpam/dist/modules/pam_permit/Makefile.in vendor/openpam/dist/modules/pam_permit/pam_permit.c vendor/openpam/dist/modules/pam_unix/Makefile.am vendor/openpam/dist/modules/pam_unix/Makefile.in vendor/openpam/dist/modules/pam_unix/pam_unix.c Modified: vendor/openpam/dist/CREDITS ============================================================================== --- vendor/openpam/dist/CREDITS Sun Dec 18 16:53:21 2011 (r228689) +++ vendor/openpam/dist/CREDITS Sun Dec 18 17:08:40 2011 (r228690) @@ -6,10 +6,11 @@ Network Associates, Inc. under DARPA/SP Principal design and development by: - Dag-Erling Smørgrav + Dag-Erling Smørgrav -The following persons (in no particular order) have contributed, directly -or indirectly, with patches, criticism, suggestions, or ideas: +The following persons (in alphabetical order) have contributed, +directly or indirectly, with patches, criticism, suggestions, or +ideas: Andrew Morgan Brian Fundakowski Feldman @@ -20,18 +21,21 @@ or indirectly, with patches, criticism, Emmanuel Dreyfus Eric Melville Gary Winiger + Hubert Feyrer Joe Marcus Clarke Juli Mallett - Hubert Feyrer + Jörg Sonnenberger Mark Murray Mike Petullo Mikhail Teterin - Mikko Työläjärvi + Mikko Työläjärvi + Nick Hibma Robert Watson Ruslan Ermilov + Sebastian Krahmer Solar Designer Takanori Saneto Wojciech A. Koszek Yar Tikhiy -$Id: CREDITS 400 2007-10-24 15:04:23Z des $ +$Id: CREDITS 498 2011-11-21 16:27:04Z des $ Modified: vendor/openpam/dist/HISTORY ============================================================================== --- vendor/openpam/dist/HISTORY Sun Dec 18 16:53:21 2011 (r228689) +++ vendor/openpam/dist/HISTORY Sun Dec 18 17:08:40 2011 (r228690) @@ -1,3 +1,29 @@ +OpenPAM Lycopsida 2011-12-18 + + - ENHANCE: removed static build autodetection, which didn't work + anyway. Use an explicit, user-specified preprocessor variable + instead. + + - ENHANCE: cleaned up the documentation a bit. + + - ENHANCE: added openpam_subst(3), allowing certain PAM items to be + embedded in strings such as prompts. Apply it to the prompts used + by pam_get_user(3) and pam_get_authtok(3). + + - ENHANCE: added support for the user_prompt, authtok_prompt and + oldauthtok_prompt module options, which override the prompts passed + by the module to pam_set_user(3) and pam_get_authtok(3). + + - ENHANCE: rewrote the policy parser to support quoted option values. + + - ENHANCE: added pamtest(1), a tool for testing modules and policies. + + - ENHANCE: added code to check the ownership and permissions of a + module before loading it. + + - ENHANCE: added / improved input validation in many cases, including + the policy file and some function arguments. +============================================================================ OpenPAM Hydrangea 2007-12-21 - ENHANCE: when compiling with GCC, mark up API functions with GCC @@ -21,7 +47,7 @@ OpenPAM Hydrangea 2007-12-21 contexts), since the module cache was the only part of OpenPAM that was not thread-safe. ============================================================================ -OpenPAM Figwort 2005-06-16 +OpenPAM Figwort 2005-06-16 - BUGFIX: Correct several small signedness and initialization bugs discovered during review by the NetBSD team. @@ -327,4 +353,4 @@ OpenPAM Calamite 2002-02-09 First (beta) release. ============================================================================ -$Id: HISTORY 409 2007-12-21 11:38:50Z des $ +$Id: HISTORY 504 2011-12-18 14:11:12Z des $ Modified: vendor/openpam/dist/LICENSE ============================================================================== --- vendor/openpam/dist/LICENSE Sun Dec 18 16:53:21 2011 (r228689) +++ vendor/openpam/dist/LICENSE Sun Dec 18 17:08:40 2011 (r228690) @@ -1,6 +1,6 @@ Copyright (c) 2002-2003 Networks Associates Technology, Inc. -Copyright (c) 2004-2007 Dag-Erling Smørgrav +Copyright (c) 2004-2011 Dag-Erling Smørgrav All rights reserved. This software was developed for the FreeBSD Project by ThinkSec AS and @@ -32,4 +32,4 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$Id: LICENSE 408 2007-12-21 11:36:24Z des $ +$Id: LICENSE 437 2011-09-13 12:00:13Z des $ Modified: vendor/openpam/dist/Makefile.am ============================================================================== --- vendor/openpam/dist/Makefile.am Sun Dec 18 16:53:21 2011 (r228689) +++ vendor/openpam/dist/Makefile.am Sun Dec 18 17:08:40 2011 (r228690) @@ -1,4 +1,6 @@ -# $Id: Makefile.am 395 2007-06-03 20:26:18Z des $ +# $Id: Makefile.am 428 2010-03-09 17:32:17Z des $ + +ACLOCAL_AMFLAGS = -I m4 SUBDIRS = lib bin modules include Modified: vendor/openpam/dist/Makefile.in ============================================================================== --- vendor/openpam/dist/Makefile.in Sun Dec 18 16:53:21 2011 (r228689) +++ vendor/openpam/dist/Makefile.in Sun Dec 18 17:08:40 2011 (r228690) @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,16 +15,13 @@ @SET_MAKE@ -# $Id: Makefile.am 395 2007-06-03 20:26:18Z des $ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ +# $Id: Makefile.am 428 2010-03-09 17:32:17Z des $ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -37,30 +35,36 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -target_triplet = @target@ @WITH_DOC_TRUE@am__append_1 = doc +subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure INSTALL compile config.guess \ - config.sub depcomp install-sh ltmain.sh missing -subdir = . + $(top_srcdir)/configure INSTALL config.guess config.sub \ + depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno + configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = lib bin modules include doc @@ -68,16 +72,39 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCE distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -90,42 +117,50 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPT_LIBS = @CRYPT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DL_LIBS = @DL_LIBS@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAJ = @LIB_MAJ@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -134,19 +169,13 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -WITH_DOC_FALSE = @WITH_DOC_FALSE@ -WITH_DOC_TRUE = @WITH_DOC_TRUE@ -WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@ -WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@ -WITH_SU_FALSE = @WITH_SU_FALSE@ -WITH_SU_TRUE = @WITH_SU_TRUE@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -158,6 +187,7 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -185,12 +215,13 @@ program_transform_name = @program_transf psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ -target = @target@ target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 SUBDIRS = lib bin modules include $(am__append_1) EXTRA_DIST = \ CREDITS \ @@ -212,15 +243,15 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -236,21 +267,22 @@ $(top_builddir)/config.status: $(top_src $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) + $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ @@ -264,8 +296,7 @@ clean-libtool: -rm -rf .libs _libs distclean-libtool: - -rm -f libtool -uninstall-info-am: + -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -274,7 +305,7 @@ uninstall-info-am: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -291,16 +322,15 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -326,16 +356,16 @@ maintainer-clean-recursive: else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -343,14 +373,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -362,93 +392,114 @@ TAGS: tags-recursive $(HEADERS) $(SOURCE list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/misc - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) @@ -457,6 +508,14 @@ dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) @@ -480,13 +539,17 @@ dist dist-all: distdir distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -494,9 +557,11 @@ distcheck: dist mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ @@ -518,13 +583,15 @@ distcheck: dist && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @cd $(distuninstallcheck_dir) \ + @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ @@ -566,6 +633,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -586,18 +654,38 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: install-data-am: +install-dvi: install-dvi-recursive + +install-dvi-am: + install-exec-am: +install-html: install-html-recursive + +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -618,24 +706,27 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-info-am +uninstall-am: -uninstall-info: uninstall-info-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + ctags-recursive install-am install-strip tags-recursive -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-generic clean-libtool clean-recursive \ - ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-recursive distclean-tags distcleancheck distdir \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-generic \ - mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-info-am + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Modified: vendor/openpam/dist/README ============================================================================== --- vendor/openpam/dist/README Sun Dec 18 16:53:21 2011 (r228689) +++ vendor/openpam/dist/README Sun Dec 18 17:08:40 2011 (r228690) @@ -22,6 +22,6 @@ These are some of OpenPAM's features: /usr/local/etc/pam.d/ and /usr/local/etc/pam.conf, in that order; this will be made configurable in a future release. -Please direct bug reports and inquiries to des@freebsd.org. +Please direct bug reports and inquiries to . -$Id: README 320 2006-02-16 20:33:19Z des $ +$Id: README 424 2009-10-29 17:10:22Z des $ Modified: vendor/openpam/dist/RELNOTES ============================================================================== --- vendor/openpam/dist/RELNOTES Sun Dec 18 16:53:21 2011 (r228689) +++ vendor/openpam/dist/RELNOTES Sun Dec 18 17:08:40 2011 (r228690) @@ -1,13 +1,11 @@ - Release notes for OpenPAM Hydrangea + Release notes for OpenPAM Lycopsida =================================== -This release corresponds to the code used in FreeBSD-CURRENT as of the -release date. It has also been tested on several other platforms, and -is expected to work on almost any POSIX-like platform that has GNU -autotools, GNU make and the GNU compiler suite installed. One notable -exception is MacOS X, which ships with a very weird, heavily modified -version of GCC. +This release corresponds to the code used in FreeBSD HEAD as of the +release date, and is also expected to work on almost any POSIX-like +platform that has GNU autotools, GNU make and the GNU compiler suite +installed. The library itself is complete. Documentation exists in the form of man pages for the library functions. These man pages are generated by @@ -18,12 +16,9 @@ of date. The distribution also includes three sample modules (pam_deny, pam_permit and pam_unix) and a sample application (su). These are not intended for actual use, but rather to serve as examples for module or -application developers. +application developers. It also includes a command-line application +(pamtest) which can be used to test policies and modules. -NOTE: to the person who sent me MacOS patches in July 2002: I have -lost your name and email address. Please contact me so I can give you -proper credit for your contribution. +Please direct bug reports and inquiries to . -Please direct bug reports and inquiries to . - -$Id: RELNOTES 404 2007-11-28 12:31:04Z des $ +$Id: RELNOTES 506 2011-12-18 14:25:12Z des $ Modified: vendor/openpam/dist/aclocal.m4 ============================================================================== --- vendor/openpam/dist/aclocal.m4 Sun Dec 18 16:53:21 2011 (r228689) +++ vendor/openpam/dist/aclocal.m4 Sun Dec 18 17:08:40 2011 (r228690) @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,103 +11,206 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) -# serial 51 AC_PROG_LIBTOOL +# serial 57 LT_INIT -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 17:11:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 618DC106564A; Sun, 18 Dec 2011 17:11:19 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 363838FC0C; Sun, 18 Dec 2011 17:11:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBIHBJg6017995; Sun, 18 Dec 2011 17:11:19 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBIHBII9017994; Sun, 18 Dec 2011 17:11:19 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201112181711.pBIHBII9017994@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sun, 18 Dec 2011 17:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228691 - vendor/openpam/LYCOPSIDA X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 17:11:19 -0000 Author: des Date: Sun Dec 18 17:11:18 2011 New Revision: 228691 URL: http://svn.freebsd.org/changeset/base/228691 Log: Tag OpenPAM Lycopsida Added: vendor/openpam/LYCOPSIDA/ - copied from r228690, vendor/openpam/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 17:22:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B70B106566B; Sun, 18 Dec 2011 17:22:46 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3560F8FC0A; Sun, 18 Dec 2011 17:22:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBIHMk7Q018416; Sun, 18 Dec 2011 17:22:46 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBIHMj0b018406; Sun, 18 Dec 2011 17:22:45 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201112181722.pBIHMj0b018406@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sun, 18 Dec 2011 17:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228692 - in head: contrib/openpam contrib/openpam/bin contrib/openpam/bin/pamtest contrib/openpam/bin/su contrib/openpam/doc contrib/openpam/doc/man contrib/openpam/include contrib/ope... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 17:22:46 -0000 Author: des Date: Sun Dec 18 17:22:45 2011 New Revision: 228692 URL: http://svn.freebsd.org/changeset/base/228692 Log: Upgrade to OpenPAM Lycopsida. Added: head/contrib/openpam/bin/pamtest/ - copied from r228691, vendor/openpam/dist/bin/pamtest/ head/contrib/openpam/bin/su/su.1 - copied unchanged from r228691, vendor/openpam/dist/bin/su/su.1 head/contrib/openpam/doc/man/openpam_subst.3 - copied unchanged from r228691, vendor/openpam/dist/doc/man/openpam_subst.3 head/contrib/openpam/lib/openpam_check_owner_perms.c - copied unchanged from r228691, vendor/openpam/dist/lib/openpam_check_owner_perms.c head/contrib/openpam/lib/openpam_constants.c - copied unchanged from r228691, vendor/openpam/dist/lib/openpam_constants.c head/contrib/openpam/lib/openpam_constants.h - copied unchanged from r228691, vendor/openpam/dist/lib/openpam_constants.h head/contrib/openpam/lib/openpam_debug.h - copied unchanged from r228691, vendor/openpam/dist/lib/openpam_debug.h head/contrib/openpam/lib/openpam_strlcmp.h - copied unchanged from r228691, vendor/openpam/dist/lib/openpam_strlcmp.h head/contrib/openpam/lib/openpam_strlcpy.h - copied unchanged from r228691, vendor/openpam/dist/lib/openpam_strlcpy.h head/contrib/openpam/lib/openpam_subst.c - copied unchanged from r228691, vendor/openpam/dist/lib/openpam_subst.c Modified: head/contrib/openpam/CREDITS head/contrib/openpam/HISTORY head/contrib/openpam/LICENSE head/contrib/openpam/Makefile.am head/contrib/openpam/Makefile.in head/contrib/openpam/README head/contrib/openpam/RELNOTES head/contrib/openpam/aclocal.m4 head/contrib/openpam/bin/Makefile.am head/contrib/openpam/bin/Makefile.in head/contrib/openpam/bin/su/Makefile.am head/contrib/openpam/bin/su/Makefile.in head/contrib/openpam/bin/su/su.c head/contrib/openpam/config.h.in head/contrib/openpam/configure head/contrib/openpam/configure.ac head/contrib/openpam/depcomp head/contrib/openpam/doc/Makefile.in head/contrib/openpam/doc/man/Makefile.am head/contrib/openpam/doc/man/Makefile.in head/contrib/openpam/doc/man/openpam.3 head/contrib/openpam/doc/man/openpam_borrow_cred.3 head/contrib/openpam/doc/man/openpam_free_data.3 head/contrib/openpam/doc/man/openpam_free_envlist.3 head/contrib/openpam/doc/man/openpam_get_option.3 head/contrib/openpam/doc/man/openpam_log.3 head/contrib/openpam/doc/man/openpam_nullconv.3 head/contrib/openpam/doc/man/openpam_readline.3 head/contrib/openpam/doc/man/openpam_restore_cred.3 head/contrib/openpam/doc/man/openpam_set_option.3 head/contrib/openpam/doc/man/openpam_ttyconv.3 head/contrib/openpam/doc/man/pam.3 head/contrib/openpam/doc/man/pam.conf.5 head/contrib/openpam/doc/man/pam_acct_mgmt.3 head/contrib/openpam/doc/man/pam_authenticate.3 head/contrib/openpam/doc/man/pam_chauthtok.3 head/contrib/openpam/doc/man/pam_close_session.3 head/contrib/openpam/doc/man/pam_conv.3 head/contrib/openpam/doc/man/pam_end.3 head/contrib/openpam/doc/man/pam_error.3 head/contrib/openpam/doc/man/pam_get_authtok.3 head/contrib/openpam/doc/man/pam_get_data.3 head/contrib/openpam/doc/man/pam_get_item.3 head/contrib/openpam/doc/man/pam_get_user.3 head/contrib/openpam/doc/man/pam_getenv.3 head/contrib/openpam/doc/man/pam_getenvlist.3 head/contrib/openpam/doc/man/pam_info.3 head/contrib/openpam/doc/man/pam_open_session.3 head/contrib/openpam/doc/man/pam_prompt.3 head/contrib/openpam/doc/man/pam_putenv.3 head/contrib/openpam/doc/man/pam_set_data.3 head/contrib/openpam/doc/man/pam_set_item.3 head/contrib/openpam/doc/man/pam_setcred.3 head/contrib/openpam/doc/man/pam_setenv.3 head/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 head/contrib/openpam/doc/man/pam_sm_authenticate.3 head/contrib/openpam/doc/man/pam_sm_chauthtok.3 head/contrib/openpam/doc/man/pam_sm_close_session.3 head/contrib/openpam/doc/man/pam_sm_open_session.3 head/contrib/openpam/doc/man/pam_sm_setcred.3 head/contrib/openpam/doc/man/pam_start.3 head/contrib/openpam/doc/man/pam_strerror.3 head/contrib/openpam/doc/man/pam_verror.3 head/contrib/openpam/doc/man/pam_vinfo.3 head/contrib/openpam/doc/man/pam_vprompt.3 head/contrib/openpam/include/Makefile.in head/contrib/openpam/include/security/Makefile.in head/contrib/openpam/include/security/openpam.h head/contrib/openpam/include/security/openpam_version.h head/contrib/openpam/include/security/pam_appl.h head/contrib/openpam/include/security/pam_constants.h head/contrib/openpam/include/security/pam_modules.h head/contrib/openpam/include/security/pam_types.h head/contrib/openpam/install-sh head/contrib/openpam/lib/Makefile.am head/contrib/openpam/lib/Makefile.in head/contrib/openpam/lib/openpam_borrow_cred.c head/contrib/openpam/lib/openpam_configure.c head/contrib/openpam/lib/openpam_dispatch.c head/contrib/openpam/lib/openpam_dynamic.c head/contrib/openpam/lib/openpam_findenv.c head/contrib/openpam/lib/openpam_free_data.c head/contrib/openpam/lib/openpam_free_envlist.c head/contrib/openpam/lib/openpam_get_option.c head/contrib/openpam/lib/openpam_impl.h head/contrib/openpam/lib/openpam_load.c head/contrib/openpam/lib/openpam_log.c head/contrib/openpam/lib/openpam_nullconv.c head/contrib/openpam/lib/openpam_readline.c head/contrib/openpam/lib/openpam_restore_cred.c head/contrib/openpam/lib/openpam_set_option.c head/contrib/openpam/lib/openpam_static.c head/contrib/openpam/lib/openpam_ttyconv.c head/contrib/openpam/lib/pam_acct_mgmt.c head/contrib/openpam/lib/pam_authenticate.c head/contrib/openpam/lib/pam_authenticate_secondary.c head/contrib/openpam/lib/pam_chauthtok.c head/contrib/openpam/lib/pam_close_session.c head/contrib/openpam/lib/pam_end.c head/contrib/openpam/lib/pam_error.c head/contrib/openpam/lib/pam_get_authtok.c head/contrib/openpam/lib/pam_get_data.c head/contrib/openpam/lib/pam_get_item.c head/contrib/openpam/lib/pam_get_mapped_authtok.c head/contrib/openpam/lib/pam_get_mapped_username.c head/contrib/openpam/lib/pam_get_user.c head/contrib/openpam/lib/pam_getenv.c head/contrib/openpam/lib/pam_getenvlist.c head/contrib/openpam/lib/pam_info.c head/contrib/openpam/lib/pam_open_session.c head/contrib/openpam/lib/pam_prompt.c head/contrib/openpam/lib/pam_putenv.c head/contrib/openpam/lib/pam_set_data.c head/contrib/openpam/lib/pam_set_item.c head/contrib/openpam/lib/pam_set_mapped_authtok.c head/contrib/openpam/lib/pam_set_mapped_username.c head/contrib/openpam/lib/pam_setcred.c head/contrib/openpam/lib/pam_setenv.c head/contrib/openpam/lib/pam_sm_acct_mgmt.c head/contrib/openpam/lib/pam_sm_authenticate.c head/contrib/openpam/lib/pam_sm_authenticate_secondary.c head/contrib/openpam/lib/pam_sm_chauthtok.c head/contrib/openpam/lib/pam_sm_close_session.c head/contrib/openpam/lib/pam_sm_get_mapped_authtok.c head/contrib/openpam/lib/pam_sm_get_mapped_username.c head/contrib/openpam/lib/pam_sm_open_session.c head/contrib/openpam/lib/pam_sm_set_mapped_authtok.c head/contrib/openpam/lib/pam_sm_set_mapped_username.c head/contrib/openpam/lib/pam_sm_setcred.c head/contrib/openpam/lib/pam_start.c head/contrib/openpam/lib/pam_strerror.c head/contrib/openpam/lib/pam_verror.c head/contrib/openpam/lib/pam_vinfo.c head/contrib/openpam/lib/pam_vprompt.c head/contrib/openpam/ltmain.sh head/contrib/openpam/misc/gendoc.pl head/contrib/openpam/missing head/contrib/openpam/modules/Makefile.in head/contrib/openpam/modules/pam_deny/Makefile.in head/contrib/openpam/modules/pam_deny/pam_deny.c head/contrib/openpam/modules/pam_permit/Makefile.in head/contrib/openpam/modules/pam_permit/pam_permit.c head/contrib/openpam/modules/pam_unix/Makefile.am head/contrib/openpam/modules/pam_unix/Makefile.in head/contrib/openpam/modules/pam_unix/pam_unix.c head/lib/libpam/libpam/Makefile Directory Properties: head/contrib/openpam/ (props changed) Modified: head/contrib/openpam/CREDITS ============================================================================== --- head/contrib/openpam/CREDITS Sun Dec 18 17:11:18 2011 (r228691) +++ head/contrib/openpam/CREDITS Sun Dec 18 17:22:45 2011 (r228692) @@ -6,10 +6,11 @@ Network Associates, Inc. under DARPA/SP Principal design and development by: - Dag-Erling Smørgrav + Dag-Erling Smørgrav -The following persons (in no particular order) have contributed, directly -or indirectly, with patches, criticism, suggestions, or ideas: +The following persons (in alphabetical order) have contributed, +directly or indirectly, with patches, criticism, suggestions, or +ideas: Andrew Morgan Brian Fundakowski Feldman @@ -20,18 +21,21 @@ or indirectly, with patches, criticism, Emmanuel Dreyfus Eric Melville Gary Winiger + Hubert Feyrer Joe Marcus Clarke Juli Mallett - Hubert Feyrer + Jörg Sonnenberger Mark Murray Mike Petullo Mikhail Teterin - Mikko Työläjärvi + Mikko Työläjärvi + Nick Hibma Robert Watson Ruslan Ermilov + Sebastian Krahmer Solar Designer Takanori Saneto Wojciech A. Koszek Yar Tikhiy -$Id: CREDITS 400 2007-10-24 15:04:23Z des $ +$Id: CREDITS 498 2011-11-21 16:27:04Z des $ Modified: head/contrib/openpam/HISTORY ============================================================================== --- head/contrib/openpam/HISTORY Sun Dec 18 17:11:18 2011 (r228691) +++ head/contrib/openpam/HISTORY Sun Dec 18 17:22:45 2011 (r228692) @@ -1,3 +1,29 @@ +OpenPAM Lycopsida 2011-12-18 + + - ENHANCE: removed static build autodetection, which didn't work + anyway. Use an explicit, user-specified preprocessor variable + instead. + + - ENHANCE: cleaned up the documentation a bit. + + - ENHANCE: added openpam_subst(3), allowing certain PAM items to be + embedded in strings such as prompts. Apply it to the prompts used + by pam_get_user(3) and pam_get_authtok(3). + + - ENHANCE: added support for the user_prompt, authtok_prompt and + oldauthtok_prompt module options, which override the prompts passed + by the module to pam_set_user(3) and pam_get_authtok(3). + + - ENHANCE: rewrote the policy parser to support quoted option values. + + - ENHANCE: added pamtest(1), a tool for testing modules and policies. + + - ENHANCE: added code to check the ownership and permissions of a + module before loading it. + + - ENHANCE: added / improved input validation in many cases, including + the policy file and some function arguments. +============================================================================ OpenPAM Hydrangea 2007-12-21 - ENHANCE: when compiling with GCC, mark up API functions with GCC @@ -21,7 +47,7 @@ OpenPAM Hydrangea 2007-12-21 contexts), since the module cache was the only part of OpenPAM that was not thread-safe. ============================================================================ -OpenPAM Figwort 2005-06-16 +OpenPAM Figwort 2005-06-16 - BUGFIX: Correct several small signedness and initialization bugs discovered during review by the NetBSD team. @@ -327,4 +353,4 @@ OpenPAM Calamite 2002-02-09 First (beta) release. ============================================================================ -$Id: HISTORY 409 2007-12-21 11:38:50Z des $ +$Id: HISTORY 504 2011-12-18 14:11:12Z des $ Modified: head/contrib/openpam/LICENSE ============================================================================== --- head/contrib/openpam/LICENSE Sun Dec 18 17:11:18 2011 (r228691) +++ head/contrib/openpam/LICENSE Sun Dec 18 17:22:45 2011 (r228692) @@ -1,6 +1,6 @@ Copyright (c) 2002-2003 Networks Associates Technology, Inc. -Copyright (c) 2004-2007 Dag-Erling Smørgrav +Copyright (c) 2004-2011 Dag-Erling Smørgrav All rights reserved. This software was developed for the FreeBSD Project by ThinkSec AS and @@ -32,4 +32,4 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$Id: LICENSE 408 2007-12-21 11:36:24Z des $ +$Id: LICENSE 437 2011-09-13 12:00:13Z des $ Modified: head/contrib/openpam/Makefile.am ============================================================================== --- head/contrib/openpam/Makefile.am Sun Dec 18 17:11:18 2011 (r228691) +++ head/contrib/openpam/Makefile.am Sun Dec 18 17:22:45 2011 (r228692) @@ -1,4 +1,6 @@ -# $Id: Makefile.am 395 2007-06-03 20:26:18Z des $ +# $Id: Makefile.am 428 2010-03-09 17:32:17Z des $ + +ACLOCAL_AMFLAGS = -I m4 SUBDIRS = lib bin modules include Modified: head/contrib/openpam/Makefile.in ============================================================================== --- head/contrib/openpam/Makefile.in Sun Dec 18 17:11:18 2011 (r228691) +++ head/contrib/openpam/Makefile.in Sun Dec 18 17:22:45 2011 (r228692) @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,16 +15,13 @@ @SET_MAKE@ -# $Id: Makefile.am 395 2007-06-03 20:26:18Z des $ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ +# $Id: Makefile.am 428 2010-03-09 17:32:17Z des $ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -37,30 +35,36 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -target_triplet = @target@ @WITH_DOC_TRUE@am__append_1 = doc +subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure INSTALL compile config.guess \ - config.sub depcomp install-sh ltmain.sh missing -subdir = . + $(top_srcdir)/configure INSTALL config.guess config.sub \ + depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno + configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = lib bin modules include doc @@ -68,16 +72,39 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCE distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -90,42 +117,50 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CRYPT_LIBS = @CRYPT_LIBS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ DL_LIBS = @DL_LIBS@ -ECHO = @ECHO@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAJ = @LIB_MAJ@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENPAM_MODULES_DIR = @OPENPAM_MODULES_DIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -134,19 +169,13 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -WITH_DOC_FALSE = @WITH_DOC_FALSE@ -WITH_DOC_TRUE = @WITH_DOC_TRUE@ -WITH_PAM_UNIX_FALSE = @WITH_PAM_UNIX_FALSE@ -WITH_PAM_UNIX_TRUE = @WITH_PAM_UNIX_TRUE@ -WITH_SU_FALSE = @WITH_SU_FALSE@ -WITH_SU_TRUE = @WITH_SU_TRUE@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -158,6 +187,7 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -185,12 +215,13 @@ program_transform_name = @program_transf psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ -target = @target@ target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 SUBDIRS = lib bin modules include $(am__append_1) EXTRA_DIST = \ CREDITS \ @@ -212,15 +243,15 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -236,21 +267,22 @@ $(top_builddir)/config.status: $(top_src $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) + $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ @@ -264,8 +296,7 @@ clean-libtool: -rm -rf .libs _libs distclean-libtool: - -rm -f libtool -uninstall-info-am: + -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -274,7 +305,7 @@ uninstall-info-am: # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -291,16 +322,15 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -326,16 +356,16 @@ maintainer-clean-recursive: else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -343,14 +373,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -362,93 +392,114 @@ TAGS: tags-recursive $(HEADERS) $(SOURCE list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/misc - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) @@ -457,6 +508,14 @@ dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) @@ -480,13 +539,17 @@ dist dist-all: distdir distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -494,9 +557,11 @@ distcheck: dist mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ @@ -518,13 +583,15 @@ distcheck: dist && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @cd $(distuninstallcheck_dir) \ + @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ @@ -566,6 +633,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -586,18 +654,38 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: install-data-am: +install-dvi: install-dvi-recursive + +install-dvi-am: + install-exec-am: +install-html: install-html-recursive + +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -618,24 +706,27 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-info-am +uninstall-am: -uninstall-info: uninstall-info-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + ctags-recursive install-am install-strip tags-recursive -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-generic clean-libtool clean-recursive \ - ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-recursive distclean-tags distcleancheck distdir \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ + dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-generic distclean-hdr \ + distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-generic \ - mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-info-am + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Modified: head/contrib/openpam/README ============================================================================== --- head/contrib/openpam/README Sun Dec 18 17:11:18 2011 (r228691) +++ head/contrib/openpam/README Sun Dec 18 17:22:45 2011 (r228692) @@ -22,6 +22,6 @@ These are some of OpenPAM's features: /usr/local/etc/pam.d/ and /usr/local/etc/pam.conf, in that order; this will be made configurable in a future release. -Please direct bug reports and inquiries to des@freebsd.org. +Please direct bug reports and inquiries to . -$Id: README 320 2006-02-16 20:33:19Z des $ +$Id: README 424 2009-10-29 17:10:22Z des $ Modified: head/contrib/openpam/RELNOTES ============================================================================== --- head/contrib/openpam/RELNOTES Sun Dec 18 17:11:18 2011 (r228691) +++ head/contrib/openpam/RELNOTES Sun Dec 18 17:22:45 2011 (r228692) @@ -1,13 +1,11 @@ - Release notes for OpenPAM Hydrangea + Release notes for OpenPAM Lycopsida =================================== -This release corresponds to the code used in FreeBSD-CURRENT as of the -release date. It has also been tested on several other platforms, and -is expected to work on almost any POSIX-like platform that has GNU -autotools, GNU make and the GNU compiler suite installed. One notable -exception is MacOS X, which ships with a very weird, heavily modified -version of GCC. +This release corresponds to the code used in FreeBSD HEAD as of the +release date, and is also expected to work on almost any POSIX-like +platform that has GNU autotools, GNU make and the GNU compiler suite +installed. The library itself is complete. Documentation exists in the form of man pages for the library functions. These man pages are generated by @@ -18,12 +16,9 @@ of date. The distribution also includes three sample modules (pam_deny, pam_permit and pam_unix) and a sample application (su). These are not intended for actual use, but rather to serve as examples for module or -application developers. +application developers. It also includes a command-line application +(pamtest) which can be used to test policies and modules. -NOTE: to the person who sent me MacOS patches in July 2002: I have -lost your name and email address. Please contact me so I can give you -proper credit for your contribution. +Please direct bug reports and inquiries to . -Please direct bug reports and inquiries to . - -$Id: RELNOTES 404 2007-11-28 12:31:04Z des $ +$Id: RELNOTES 506 2011-12-18 14:25:12Z des $ Modified: head/contrib/openpam/aclocal.m4 ============================================================================== --- head/contrib/openpam/aclocal.m4 Sun Dec 18 17:11:18 2011 (r228691) +++ head/contrib/openpam/aclocal.m4 Sun Dec 18 17:22:45 2011 (r228692) @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,103 +11,206 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. + +m4_define([_LT_COPYING], [dnl +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# GNU Libtool is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# As a special exception to the GNU General Public License, +# if you distribute this file as part of a program or library that +# is built using GNU Libtool, you may include this file under the +# same distribution terms that you use for the rest of that program. +# +# GNU Libtool is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]) -# serial 51 AC_PROG_LIBTOOL +# serial 57 LT_INIT -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If this macro is not defined by Autoconf, define it here. -m4_ifdef([AC_PROVIDE_IFELSE], - [], - [m4_define([AC_PROVIDE_IFELSE], - [m4_ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) +# LT_PREREQ(VERSION) +# ------------------ +# Complain and exit if this libtool version is less that VERSION. +m4_defun([LT_PREREQ], +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, + [m4_default([$3], + [m4_fatal([Libtool version $1 or higher is required], + 63)])], + [$2])]) -# AC_PROG_LIBTOOL -# --------------- -AC_DEFUN([AC_PROG_LIBTOOL], -[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl -dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX -dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. - AC_PROVIDE_IFELSE([AC_PROG_CXX], - [AC_LIBTOOL_CXX], - [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX - ])]) -dnl And a similar setup for Fortran 77 support - AC_PROVIDE_IFELSE([AC_PROG_F77], - [AC_LIBTOOL_F77], - [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 -])]) - -dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. -dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run -dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. - AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], - [AC_LIBTOOL_GCJ], - [ifdef([AC_PROG_GCJ], - [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([A][M_PROG_GCJ], - [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) - ifdef([LT_AC_PROG_GCJ], - [define([LT_AC_PROG_GCJ], - defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) -])])# AC_PROG_LIBTOOL +# _LT_CHECK_BUILDDIR +# ------------------ +# Complain if the absolute build directory name contains unusual characters +m4_defun([_LT_CHECK_BUILDDIR], +[case `pwd` in + *\ * | *\ *) + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; +esac +]) -# _AC_PROG_LIBTOOL -# ---------------- -AC_DEFUN([_AC_PROG_LIBTOOL], -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl -AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl -AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl -AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl +# LT_INIT([OPTIONS]) +# ------------------ +AC_DEFUN([LT_INIT], +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +AC_BEFORE([$0], [LT_LANG])dnl +AC_BEFORE([$0], [LT_OUTPUT])dnl +AC_BEFORE([$0], [LTDL_INIT])dnl +m4_require([_LT_CHECK_BUILDDIR])dnl + +dnl Autoconf doesn't catch unexpanded LT_ macros by default: +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 +dnl unless we require an AC_DEFUNed macro: +AC_REQUIRE([LTOPTIONS_VERSION])dnl +AC_REQUIRE([LTSUGAR_VERSION])dnl +AC_REQUIRE([LTVERSION_VERSION])dnl +AC_REQUIRE([LTOBSOLETE_VERSION])dnl +m4_require([_LT_PROG_LTMAIN])dnl + +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 17:42:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 426991065680; Sun, 18 Dec 2011 17:42:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 316EE8FC18; Sun, 18 Dec 2011 17:42:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBIHgQ8E019061; Sun, 18 Dec 2011 17:42:26 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBIHgQeW019058; Sun, 18 Dec 2011 17:42:26 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112181742.pBIHgQeW019058@svn.freebsd.org> From: Dimitry Andric Date: Sun, 18 Dec 2011 17:42:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228693 - head/sbin/fsdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 17:42:27 -0000 Author: dim Date: Sun Dec 18 17:42:26 2011 New Revision: 228693 URL: http://svn.freebsd.org/changeset/base/228693 Log: Revert r228603, and add the workaround to sbin/fsdb/Makefile instead. MFC after: 1 week Modified: head/sbin/fsdb/Makefile head/sbin/fsdb/fsdbutil.c Modified: head/sbin/fsdb/Makefile ============================================================================== --- head/sbin/fsdb/Makefile Sun Dec 18 17:22:45 2011 (r228692) +++ head/sbin/fsdb/Makefile Sun Dec 18 17:42:26 2011 (r228693) @@ -9,6 +9,10 @@ SRCS= fsdb.c fsdbutil.c \ pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c CFLAGS+= -I${.CURDIR}/../fsck_ffs WARNS?= 2 +.if ${CC:T:Mclang} == "clang" +# Work around a problem with format string warnings and ntohs macros. +NO_WFORMAT= +.endif LDADD= -ledit -ltermcap DPADD= ${LIBEDIT} ${LIBTERMCAP} .PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs Modified: head/sbin/fsdb/fsdbutil.c ============================================================================== --- head/sbin/fsdb/fsdbutil.c Sun Dec 18 17:22:45 2011 (r228692) +++ head/sbin/fsdb/fsdbutil.c Sun Dec 18 17:42:26 2011 (r228693) @@ -193,9 +193,8 @@ printstat(const char *cp, ino_t inum, un blocks = DIP(dp, di_blocks); gen = DIP(dp, di_gen); - printf("LINKCNT=%hd FLAGS=%#x BLKCNT=%jx GEN=%jx\n", - (short)DIP(dp, di_nlink), DIP(dp, di_flags), (intmax_t)blocks, - (intmax_t)gen); + printf("LINKCNT=%hd FLAGS=%#x BLKCNT=%jx GEN=%jx\n", DIP(dp, di_nlink), + DIP(dp, di_flags), (intmax_t)blocks, (intmax_t)gen); } From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 17:48:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B93491065678; Sun, 18 Dec 2011 17:48:54 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A824E8FC0A; Sun, 18 Dec 2011 17:48:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBIHmspP019306; Sun, 18 Dec 2011 17:48:54 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBIHms2f019304; Sun, 18 Dec 2011 17:48:54 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201112181748.pBIHms2f019304@svn.freebsd.org> From: Marius Strobl Date: Sun, 18 Dec 2011 17:48:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228694 - head/sys/dev/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 17:48:54 -0000 Author: marius Date: Sun Dec 18 17:48:54 2011 New Revision: 228694 URL: http://svn.freebsd.org/changeset/base/228694 Log: Fix compilation on sparc64 by actually supplying the bus_dma_tag_t member of the rx_ring to bus_dmamap_sync(9). Given that netmap code tries to obtain the bus addresses of netmap buffers via vtophys(9) instead of using bus_dma(9) it currently has zero chance of actually working on sparc64 though (and for that matter f.e. also not with MACs limited to 32-bit DMA on x86 machines with more than 4GB of RAM). Modified: head/sys/dev/netmap/if_em_netmap.h Modified: head/sys/dev/netmap/if_em_netmap.h ============================================================================== --- head/sys/dev/netmap/if_em_netmap.h Sun Dec 18 17:42:26 2011 (r228693) +++ head/sys/dev/netmap/if_em_netmap.h Sun Dec 18 17:48:54 2011 (r228694) @@ -329,7 +329,7 @@ em_netmap_rxsync(void *a, u_int ring_nr, if ((curr->status & E1000_RXD_STAT_DD) == 0) break; ring->slot[j].len = le16toh(curr->length); - bus_dmamap_sync(rxr->tag, rxr->rx_buffers[l].map, + bus_dmamap_sync(rxr->rxtag, rxr->rx_buffers[l].map, BUS_DMASYNC_POSTREAD); j = (j == lim) ? 0 : j + 1; /* make sure next_to_refresh follows next_to_check */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 20:40:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F021106564A; Sun, 18 Dec 2011 20:40:20 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DB8B8FC1A; Sun, 18 Dec 2011 20:40:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBIKeK5b024523; Sun, 18 Dec 2011 20:40:20 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBIKeKMo024520; Sun, 18 Dec 2011 20:40:20 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201112182040.pBIKeKMo024520@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 18 Dec 2011 20:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228695 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 20:40:20 -0000 Author: pjd Date: Sun Dec 18 20:40:19 2011 New Revision: 228695 URL: http://svn.freebsd.org/changeset/base/228695 Log: Don't use function name as format string. Detected by: clang MFC after: 1 week Modified: head/sbin/hastd/pjdlog.h Modified: head/sbin/hastd/pjdlog.h ============================================================================== --- head/sbin/hastd/pjdlog.h Sun Dec 18 17:48:54 2011 (r228694) +++ head/sbin/hastd/pjdlog.h Sun Dec 18 20:40:19 2011 (r228695) @@ -95,7 +95,7 @@ void pjdlog_abort(const char *func, cons #define PJDLOG_VERIFY(expr) do { \ if (!(expr)) { \ pjdlog_abort(__func__, __FILE__, __LINE__, #expr, \ - __func__); \ + "%s", __func__); \ } \ } while (0) #define PJDLOG_RVERIFY(expr, ...) do { \ From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 20:41:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F836106566C; Sun, 18 Dec 2011 20:41:58 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E63E8FC13; Sun, 18 Dec 2011 20:41:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBIKfwGi024606; Sun, 18 Dec 2011 20:41:58 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBIKfwBs024603; Sun, 18 Dec 2011 20:41:58 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201112182041.pBIKfwBs024603@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 18 Dec 2011 20:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228696 - head/sbin/hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 20:41:58 -0000 Author: pjd Date: Sun Dec 18 20:41:58 2011 New Revision: 228696 URL: http://svn.freebsd.org/changeset/base/228696 Log: Use lex's standard way of not generating unused function. Inspired by: r228555 MFC after: 1 week Modified: head/sbin/hastd/Makefile head/sbin/hastd/token.l Modified: head/sbin/hastd/Makefile ============================================================================== --- head/sbin/hastd/Makefile Sun Dec 18 20:40:19 2011 (r228695) +++ head/sbin/hastd/Makefile Sun Dec 18 20:41:58 2011 (r228696) @@ -27,9 +27,6 @@ CFLAGS+=-DINET .if ${MK_INET6_SUPPORT} != "no" CFLAGS+=-DINET6 .endif -# This is needed to have WARNS > 1. -CFLAGS+=-DYY_NO_UNPUT -CFLAGS+=-DYY_NO_INPUT DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil Modified: head/sbin/hastd/token.l ============================================================================== --- head/sbin/hastd/token.l Sun Dec 18 20:40:19 2011 (r228695) +++ head/sbin/hastd/token.l Sun Dec 18 20:41:58 2011 (r228696) @@ -44,6 +44,9 @@ int lineno; #define DP do { } while (0) %} +%option noinput +%option nounput + %% control { DP; return CONTROL; } pidfile { DP; return PIDFILE; } From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 22:04:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3C6E106566C; Sun, 18 Dec 2011 22:04:55 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1FFC8FC0A; Sun, 18 Dec 2011 22:04:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBIM4tPC027146; Sun, 18 Dec 2011 22:04:55 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBIM4tGc027142; Sun, 18 Dec 2011 22:04:55 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201112182204.pBIM4tGc027142@svn.freebsd.org> From: Baptiste Daroussin Date: Sun, 18 Dec 2011 22:04:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228697 - head/usr.bin/m4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 22:04:56 -0000 Author: bapt (ports committer) Date: Sun Dec 18 22:04:55 2011 New Revision: 228697 URL: http://svn.freebsd.org/changeset/base/228697 Log: Reimplement support for the ** (exponent) gnu extension, make it available thought the -g (mimic gnu) option Reviewed by: cognet Approved by: cognet Discussed with: espie@OpenBSD.org (upstream) Replaced: head/usr.bin/m4/parser.y (contents, props changed) head/usr.bin/m4/tokenizer.l (contents, props changed) Modified: head/usr.bin/m4/eval.c Modified: head/usr.bin/m4/eval.c ============================================================================== --- head/usr.bin/m4/eval.c Sun Dec 18 20:41:58 2011 (r228696) +++ head/usr.bin/m4/eval.c Sun Dec 18 22:04:55 2011 (r228697) @@ -269,8 +269,12 @@ expand_builtin(const char *argv[], int a case INCLTYPE: if (argc > 2) if (!doincl(argv[2])) - err(1, "%s at line %lu: include(%s)", - CURRENT_NAME, CURRENT_LINE, argv[2]); + if (mimic_gnu) + warn("%s at line %lu: include(%s)", + CURRENT_NAME, CURRENT_LINE, argv[2]); + else + err(1, "%s at line %lu: include(%s)", + CURRENT_NAME, CURRENT_LINE, argv[2]); break; case SINCTYPE: Added: head/usr.bin/m4/parser.y ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/m4/parser.y Sun Dec 18 22:04:55 2011 (r228697) @@ -0,0 +1,86 @@ +%{ +/* $OpenBSD: parser.y,v 1.6 2008/08/21 21:00:14 espie Exp $ */ +/* + * Copyright (c) 2004 Marc Espie + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ +#include +#include +#define YYSTYPE int32_t +extern int32_t end_result; +extern int yylex(void); +extern int yyerror(const char *); +extern int yyparse(void); +%} +%token NUMBER +%token ERROR +%left LOR +%left LAND +%left '|' +%left '^' +%left '&' +%left EQ NE +%left '<' LE '>' GE +%left LSHIFT RSHIFT +%right EXPONENT +%left '+' '-' +%left '*' '/' '%' +%right UMINUS UPLUS '!' '~' + +%% + +top : expr { end_result = $1; } + ; +expr : expr '+' expr { $$ = $1 + $3; } + | expr '-' expr { $$ = $1 - $3; } + | expr EXPONENT expr { $$ = pow($1, $3); } + | expr '*' expr { $$ = $1 * $3; } + | expr '/' expr { + if ($3 == 0) { + yyerror("division by zero"); + exit(1); + } + $$ = $1 / $3; + } + | expr '%' expr { + if ($3 == 0) { + yyerror("modulo zero"); + exit(1); + } + $$ = $1 % $3; + } + | expr LSHIFT expr { $$ = $1 << $3; } + | expr RSHIFT expr { $$ = $1 >> $3; } + | expr '<' expr { $$ = $1 < $3; } + | expr '>' expr { $$ = $1 > $3; } + | expr LE expr { $$ = $1 <= $3; } + | expr GE expr { $$ = $1 >= $3; } + | expr EQ expr { $$ = $1 == $3; } + | expr NE expr { $$ = $1 != $3; } + | expr '&' expr { $$ = $1 & $3; } + | expr '^' expr { $$ = $1 ^ $3; } + | expr '|' expr { $$ = $1 | $3; } + | expr LAND expr { $$ = $1 && $3; } + | expr LOR expr { $$ = $1 || $3; } + | '(' expr ')' { $$ = $2; } + | '-' expr %prec UMINUS { $$ = -$2; } + | '+' expr %prec UPLUS { $$ = $2; } + | '!' expr { $$ = !$2; } + | '~' expr { $$ = ~$2; } + | NUMBER + ; +%% + Added: head/usr.bin/m4/tokenizer.l ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/m4/tokenizer.l Sun Dec 18 22:04:55 2011 (r228697) @@ -0,0 +1,112 @@ +%option nounput noinput +%{ +/* $OpenBSD: tokenizer.l,v 1.7 2010/03/22 20:40:44 espie Exp $ */ +/* + * Copyright (c) 2004 Marc Espie + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ +#include "parser.h" +#include +#include +#include +#include +#include + +extern int mimic_gnu; +extern int32_t yylval; + +int32_t number(void); +int32_t parse_radix(void); +extern int yylex(void); +%} + +delim [ \t\n] +ws {delim}+ +hex 0[xX][0-9a-fA-F]+ +oct 0[0-7]* +dec [1-9][0-9]* +radix 0[rR][0-9]+:[0-9a-zA-Z]+ + +%% +{ws} {/* just skip it */} +{hex}|{oct}|{dec} { yylval = number(); return(NUMBER); } +{radix} { if (mimic_gnu) { + yylval = parse_radix(); return(NUMBER); + } else { + return(ERROR); + } + } +"<=" { return(LE); } +">=" { return(GE); } +"<<" { return(LSHIFT); } +">>" { return(RSHIFT); } +"==" { return(EQ); } +"!=" { return(NE); } +"&&" { return(LAND); } +"||" { return(LOR); } +"**" { if (mimic_gnu) { return (EXPONENT); } } +. { return yytext[0]; } +%% + +int32_t +number(void) +{ + long l; + + errno = 0; + l = strtol(yytext, NULL, 0); + if (((l == LONG_MAX || l == LONG_MIN) && errno == ERANGE) || + l > INT32_MAX || l < INT32_MIN) { + fprintf(stderr, "m4: numeric overflow in expr: %s\n", yytext); + } + return l; +} + +int32_t +parse_radix(void) +{ + long base; + char *next; + long l; + int d; + + l = 0; + base = strtol(yytext+2, &next, 0); + if (base > 36 || next == NULL) { + fprintf(stderr, "m4: error in number %s\n", yytext); + } else { + next++; + while (*next != 0) { + if (*next >= '0' && *next <= '9') + d = *next - '0'; + else if (*next >= 'a' && *next <= 'z') + d = *next - 'a' + 10; + else { + assert(*next >= 'A' && *next <= 'Z'); + d = *next - 'A' + 10; + } + if (d >= base) { + fprintf(stderr, + "m4: error in number %s\n", yytext); + return 0; + } + l = base * l + d; + next++; + } + } + return l; +} + From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 23:01:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0334106566C; Sun, 18 Dec 2011 23:01:58 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id A71288FC12; Sun, 18 Dec 2011 23:01:58 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id CE53C25D386D; Sun, 18 Dec 2011 23:01:57 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id E950CBD74AA; Sun, 18 Dec 2011 23:01:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id ydnjl4rtzKnt; Sun, 18 Dec 2011 23:01:54 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id D7D54BD74A9; Sun, 18 Dec 2011 23:01:54 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201112181748.pBIHms2f019304@svn.freebsd.org> Date: Sun, 18 Dec 2011 23:01:54 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <51224283-3DEE-489B-B7AC-61C46FA1CD5F@lists.zabbadoz.net> References: <201112181748.pBIHms2f019304@svn.freebsd.org> To: Marius Strobl X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228694 - head/sys/dev/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 23:01:59 -0000 On 18. Dec 2011, at 17:48 , Marius Strobl wrote: > Author: marius > Date: Sun Dec 18 17:48:54 2011 > New Revision: 228694 > URL: http://svn.freebsd.org/changeset/base/228694 >=20 > Log: > Fix compilation on sparc64 by actually supplying the bus_dma_tag_t = member > of the rx_ring to bus_dmamap_sync(9). Thanks! > Given that netmap code tries to > obtain the bus addresses of netmap buffers via vtophys(9) instead of = using > bus_dma(9) it currently has zero chance of actually working on = sparc64 > though (and for that matter f.e. also not with MACs limited to 32-bit = DMA > on x86 machines with more than 4GB of RAM). >=20 > Modified: > head/sys/dev/netmap/if_em_netmap.h >=20 > Modified: head/sys/dev/netmap/if_em_netmap.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/netmap/if_em_netmap.h Sun Dec 18 17:42:26 2011 = (r228693) > +++ head/sys/dev/netmap/if_em_netmap.h Sun Dec 18 17:48:54 2011 = (r228694) > @@ -329,7 +329,7 @@ em_netmap_rxsync(void *a, u_int ring_nr, > if ((curr->status & E1000_RXD_STAT_DD) =3D=3D 0) > break; > ring->slot[j].len =3D le16toh(curr->length); > - bus_dmamap_sync(rxr->tag, rxr->rx_buffers[l].map, > + bus_dmamap_sync(rxr->rxtag, rxr->rx_buffers[l].map, > BUS_DMASYNC_POSTREAD); > j =3D (j =3D=3D lim) ? 0 : j + 1; > /* make sure next_to_refresh follows next_to_check */ --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Sun Dec 18 23:54:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9200A106566B; Sun, 18 Dec 2011 23:54:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80E718FC15; Sun, 18 Dec 2011 23:54:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBINsWm6030479; Sun, 18 Dec 2011 23:54:32 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBINsWlq030477; Sun, 18 Dec 2011 23:54:32 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112182354.pBINsWlq030477@svn.freebsd.org> From: Dimitry Andric Date: Sun, 18 Dec 2011 23:54:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228698 - head/usr.bin/m4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 23:54:32 -0000 Author: dim Date: Sun Dec 18 23:54:32 2011 New Revision: 228698 URL: http://svn.freebsd.org/changeset/base/228698 Log: Repair breakage after r228697: since m4 now uses pow(3), it needs -lm. Pointy hat to: bapt Modified: head/usr.bin/m4/Makefile Modified: head/usr.bin/m4/Makefile ============================================================================== --- head/usr.bin/m4/Makefile Sun Dec 18 22:04:55 2011 (r228697) +++ head/usr.bin/m4/Makefile Sun Dec 18 23:54:32 2011 (r228698) @@ -6,7 +6,7 @@ PROG= m4 CFLAGS+=-DEXTENDED -I${.CURDIR}/lib -LDADD= -ly -ll +LDADD= -ly -ll -lm # clang needs 1 while with gcc we can use 2 #WARNS= 1 From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 00:12:10 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 175C5106564A; Mon, 19 Dec 2011 00:12:10 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 7924B8FC12; Mon, 19 Dec 2011 00:12:08 +0000 (UTC) Received: from c211-28-227-231.carlnfd1.nsw.optusnet.com.au (c211-28-227-231.carlnfd1.nsw.optusnet.com.au [211.28.227.231]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pBJ0C4vl018626 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Dec 2011 11:12:06 +1100 Date: Mon, 19 Dec 2011 11:12:04 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric In-Reply-To: <4EEE136F.5080904@FreeBSD.org> Message-ID: <20111219080853.X877@besplex.bde.org> References: <201112172232.pBHMW1Bd079555@svn.freebsd.org> <4EED18B5.8000907@FreeBSD.org> <20111218013905.GA20867@zim.MIT.EDU> <4EEE136F.5080904@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228668 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 00:12:10 -0000 On Sun, 18 Dec 2011, Dimitry Andric wrote: > On 2011-12-18 02:39, David Schultz wrote: > ... >>>> Log: >>>> Revert r228650, and work around the clang false positive with printf >>>> formats in usr.bin/netstat/atalk.c by conditionally adding NO_WFORMAT to >>>> the Makefile instead. > ... >> Have you been keeping track of the other hacks you've been >> sprinkling throughout the tree to work around clang bugs, e.g., >> the one in fsdb? It would be unfortunate if someone else has to >> waste their time later on figuring out what you did, when we could >> just as easily have waited a month for the clang bug to be fixed. > > Yes, I will revert the fsdb change too, and add a workaround in the > Makefile. Though after talking with a language lawyer type person, it > seems that clang was actually right with its original warning. > > Apparently, if you use ?: with two shorts, the end result always gets > promoted to an int, due to the Usual Arithmetic Conversions, so using > the "%hu" format is not correct. The following small program > demonstrates this: An expression starting with shorts indeed gets promoted by ?: (or almost any binary or unary operator), but that is irrelevant provided the result of the expression is representable as a short. It also gets promoted by passing it, and the compiler can't tell the difference at that point so it shouldn't warn (since this is the point at which printf() will see it and the purpose of the warning is to check to for things that will cause problems at the level of printf()). For the DIP() expression, as for any typical ?: expression, the result is representable in the same type as the operands if that type is common, since ?: just selects between the operands. (In most cases, the operands in DIP() have different types, but in cases where the ffs1 type has not been expanded, they have the same type, and for nlink_t this type is also (unsigned) short.) If the expesssion involved a more complicated operator like addition, this would not be obvious but might still be true. The compiler could determine this especially easily for constant expressions. It is important that compilers not warn for constant and other expressions that they know won't cause any problems for printf(). Passing sizeof(foo) for a field width is not quite an example, since the width of sizeof(foo) differs from the width of what printf expects (that is, sizeof(int)) on some machines, so you want it warned about always for portable code. The original non-problem could be checked for in a more refined class of warnings, starting with: - -Wbogus-cast[level]: warn if a cast is bogus at the given level. Some possible levels: - 0: bde doesn't like it - 1: compiler maintainer doesn't like it - 100-200: has no effect because it is: - 100: the identity conversion in the abstract machine - 101: the identity conversion in the current machine - 102: same as the default operator promotion in the abstract machine - 103: same as the default operator promotion in the current machine - 104: same as the default parameter promotion in the abstract machine - 105: same as the default parameter promotion in the current machine - 106: same as prototype parameter conversion in the abstract machine - 107: same as prototype parameter conversion in the current machine - 110-119: like 100-109, but changes the type, but then the next operation or cast or parameter type changes the type and also the value back it would have been without any cast at this level, so that the combination is null. This is useful mainly in conjunction with parameter-passing, as an extension of 106-107. We don't want to attach the warning to the final conversion given by a prototye, since the conversion given by prototypes is non-bogus in other contexts. - -Wsubtle-conversion[level]. Sort of the inverse of the above. If you add a cast to quiet a warning from this, then it should probably cause a warning from -Wbogus-cast[level]. I haven't thought this through, but in the present case -Wbogus-cast[114] would warn about casting down DIP() to u_short, since this has no effect because the default parameter promotion will turn it back into int. BTW, the printf format for di_nlink in fsdb is still broken in 2 ways. nlink_t is bogusly unsigned (uint16_t), but the format is %hd (signed short). First way: Using %h at all is broken, since it only works for 16-bit shorts, and nlink_t is a typedef to avoid hard-coding this. Second way: sign mismatch. The top bit of nlink_t is supposed to be unused (LINK_MAX = 32767), so this is relatively harmless, but fsdb is supposed to be able to work on current file systems, so an invalid i_nlink might be > LINK_MAX and then it will be misprinted. An invalid i_nlink of nearly 65535 probably means a "negative" value, and then printing it as signed is better. Both cases can't be handled, so the format should match the type. All of these problems and subtle non-problems can be avoided by not using %h. Just use the format that matches the arg type. This is just %d matching int after the default promotions (either inside DIP() or in parameter passing). This assumes that nlink_t is strictly smaller than int, which is a weaker (though not strictly weaker) assumption than the wrong assumption that it is short. Since it is strictly smaller, it the promotion is non-null and the type loses the signedness. The promoted value is always non-negative since the original type was unsigned, and the same as the original value since the conversion was a promotion. This value can be naturally printed using %d (%u works too, but doesn't match the parameter types, so there are minor subtleties to prove that it works). However, printing the value as non-negative is not bug for bug compatible with the original code, which was essentially: printf("LINKCNT=%hd", dp->di_nlink); This essentially abuses %h to corrupt the type from uint16_t to short (in FreeBSD-1, nlink_t was u_short, so only the sign was corrupted). If you want to pretend that your uint16_t's are actually signed, then the right way to do this is to replace them by checking the top bit in them and then force 2's complement arithmetic: /* XXX assume nlink_t is uint16_t: */ printf("LINKCNT=%d", (dp->di_nlink & 0x8000 ? -1 : 1) * dp->di_nlink); Next best is to assume that implementation-defined behaviour is 2's complement and just cast: /* XXX assume nlink_t is u_short: */ printf("LINKCNT=%d", (short)dp->di_nlink); Now with DIP(), we must cast the original di_nlink's, or equivalently cast DIP() down to u_short first: /* XXX assume nlink_t is u_short: */ printf("LINKCNT=%d", (short)(u_short)DIP(dp, di_nlink))); Here the double cast might be warned about by -Wbogus-cast[mumble], since it has the same effect as directly casting to short, but I left it in for clarity. But I think these complications are excessive here, and fsdb should just use %d on the non-negative DIP(). > #include > > int main(void) > { > printf("%zu\n", sizeof(1 > 2 ? (short)1 : (short)2)); > return 0; > } > > It will always print sizeof(int), e.g. 4 on most arches. This is not > what most programmers expect, I guess, at least I didn't. :) I've always expected this since I fixed type bugs in my compiler :-). I tried hundreds of expressions like the above in various compilers to see what is normal. Another interesting case is cpp expressions. C eventually standardized on only [u_]long arithmetic (now [u]intmax_t) in cpp expressions, but my K&R-ish compiler has fully typed cpp expressions including sizeof(), casts and floating point, so its cpp expressions give the same results as runtime expressions but different results from Standard cpp expressions. This was useful for determining runtime behaviour at compile time. > Since htons() and ntohs() are implemented in our tree with the __bswap > macros, which use ?: operators (at least when GNU inline asm and > __builtin_constant_p are supported), they will in fact return int, not > uint16_t. This is very implementation-dependent, and also broken if that is what they do now: Broken: htons(), etc., are now standardized, and any reasonable standard requires the optional macro versions of them to act as if they were functions. I don't know if POSIX is reasonable here. In the draft7 2001 version, I could only easily find: % 7321 The following shall either be declared as functions, defined as macros, or both. If functions are % 7322 declared, function prototypes shall be provided. % 7323 uint32_t htonl(uint32_t); % 7324 uint16_t htons(uint16_t); % 7325 uint32_t ntohl(uint32_t); % 7326 uint16_t ntohs(uint16_t); Thus if they are implemented as functions, they must return a non-promoted type. Any macro versions should return the same non-promoted type. Some recent implementations changed to using inline functions more. This might have changed the type. There are also the ones with a constant variant. A misimplementation could easily have the constant variant returning a different type to the variable version. And a ?: to select between the constant and variable versions gives the promoted type unless it is cast back down. Very implementation-dependent: Apart from the above, at least i386 used to do __byte_swap_word() entirely in asm except for a statement-expression to give a result of type u_short (later u_int16_t). ntohs was defined as __byte_swap_word in FreeBSD-4 and earlier, and there was no optimization for the constant case to give an ?: expression anywhere in this family of functions. The current implemention uses ?: consistently on i386 at least, so it consistently gives the broken version for __htons() and ntohs(). There used to be function versions of these interfaces. I got someone to clean up some of this. The cleanup was incomplete, but removed most of the function versions in libc. Grepping for ntohs in libc now shows the following vestiges: - most arches still have ntohs in a Symbol.map, although the function doesn't exist. This was apparently missed in the cleanup. - mips still has ntohs in a Makefile.inc and in a ntohs.S. This was apparently uncleaned after the cleanup. > A better fix is to add explicit casts to the __bswap macros, as per > attached patch, which I'm running through a make universe now. (Note > that some arches, such as arm and mips already add the explicit casts > for the expected __bswap return types.) Would that be OK to commit? It seems to be necessary, and should work since even if anyone wants to use ntohs in a cpp expression, it already won't work because it has casts and more in it. Some of the current mess is because jeff needed ntohs etc. to work in static initializers. This prevents using the same inline function version for the constant case as for the variable case (gcc now optimizes the general version nicely for the constant case). I've reported most of the style bugs and bugs in the mess before. The following are most obvious now on i386: - macro args are bogusly named with a leading underscores. Such underscores are only needed to protect namespaces in inline functions. They are just obfuscations in macros. - __bswap16_const() casts its return value back down to __uint16_t. This is useless, since __bswap16_const() is only usable in __bswap16() where the value is immediately promoted back to int. (Note that none of the __bswapN_const() functions is directly usable, since they all intentionally omit casting their arg for readability.) This was apparently an attempt to make the final type __uint16_t. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 01:09:25 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 056261065670; Mon, 19 Dec 2011 01:09:25 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail03.syd.optusnet.com.au (mail03.syd.optusnet.com.au [211.29.132.184]) by mx1.freebsd.org (Postfix) with ESMTP id 940F78FC12; Mon, 19 Dec 2011 01:09:24 +0000 (UTC) Received: from c211-28-227-231.carlnfd1.nsw.optusnet.com.au (c211-28-227-231.carlnfd1.nsw.optusnet.com.au [211.28.227.231]) by mail03.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pBJ19LFf001322 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Dec 2011 12:09:22 +1100 Date: Mon, 19 Dec 2011 12:09:21 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric In-Reply-To: <4EEE136F.5080904@FreeBSD.org> Message-ID: <20111219111309.L877@besplex.bde.org> References: <201112172232.pBHMW1Bd079555@svn.freebsd.org> <4EED18B5.8000907@FreeBSD.org> <20111218013905.GA20867@zim.MIT.EDU> <4EEE136F.5080904@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228668 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 01:09:25 -0000 PS: (review of the actual patch) On Sun, 18 Dec 2011, Dimitry Andric wrote: > A better fix is to add explicit casts to the __bswap macros, as per > attached patch, which I'm running through a make universe now. % diff --git a/sys/amd64/include/endian.h b/sys/amd64/include/endian.h % index de22c8b..60ed226 100644 % --- a/sys/amd64/include/endian.h % +++ b/sys/amd64/include/endian.h % @@ -111,16 +111,16 @@ __bswap16_var(__uint16_t _x) % } % % #define __bswap64(_x) \ % - (__builtin_constant_p(_x) ? \ % - __bswap64_const((__uint64_t)(_x)) : __bswap64_var(_x)) % + ((__uint64_t)(__builtin_constant_p(_x) ? \ % + __bswap64_const((__uint64_t)(_x)) : __bswap64_var(_x))) This has no effect except to enlarge the source code. The binary promotions for ?: are null because the rank of uint64_t is larger than the rank of of u_int. We can know this since we are the amd64 implementation and the amd64 ABI requires 32-bit ints. For some other arches, the ABI is fuzzier, but we only support 32-bit ints so we know the same in practice. % % #define __bswap32(_x) \ % - (__builtin_constant_p(_x) ? \ % - __bswap32_const((__uint32_t)(_x)) : __bswap32_var(_x)) % + ((__uint32_t)(__builtin_constant_p(_x) ? \ % + __bswap32_const((__uint32_t)(_x)) : __bswap32_var(_x))) Similarly. rank(uint32_t) >= rank(u_int). Actually equal now. % % #define __bswap16(_x) \ % - (__builtin_constant_p(_x) ? \ % - __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x)) % + ((__uint16_t)(__builtin_constant_p(_x) ? \ % + __bswap16_const((__uint16_t)(_x)) : __bswap16_var(_x))) This one is needed. It wouldn't be needed with 16-bit ints. The bogus cast of the return value in __bswap16_const() should be removed. See previous mail. Similarly for all other arches. See previous mail. More about the mess here: all of these ?: definitions are MI. All of the __bswapN_const() definitions are MI. They shouldn't be spammed into ${N_ARCH} endian.h files. The former remain MI in your fixed version. But in my shortened version, omitting some casts is MD. So the cleaned up version should not be shortened. > (Note > that some arches, such as arm and mips already add the explicit casts > for the expected __bswap return types.) Would that be OK to commit? That's part of the mess. arm and mips are gratuitously different. Comparing various versions show the following gratuitous differences: - amd64 to i386: - explicit long long constants for i386 only. Style bug and technical problem. - i386 has 2 underscores instead of 1 for the variable in __bswap64_var() - extra blank line on i386 - amd64 to arm: - too many to list. arm still has the horrible __OPTIMIZE__ ifdefs. Its "MI" macros look quite different, and were different in the !__OPTIMIZE__ case since they already had the casts, and are different in the __OPTIMIZE__ case since they don't have ?: then. arm is missing at least 3 rounds of major cleanups. - amd64 to ia64: - ia64 should be closer to amd64 than i386 (no difference except for a couple of asms), but is further away. - ia64 uses bogus __CC_SUPPORTS___INLINE feature test - no optimizations for constants on ia64. Thus, less complexity and the type bugs were missing. - no __cplusplus on ia64. These seem to be just a style bug on amd64. All the functions are static inline (spelled __inline for stylistic reasons), so I think everything has the same semantics for C++ without these ifdefs. - amd64 to mips: - too many to list. mips is closer to arm than to amd64, but doesn't cast the result of ?:. - amd64 to powerpc: - too many to list. Closer in organization to amd64 than to arm or mips, but lexically gratuitously different. The main differences are: - powerpc is missing the cleandown of macro parameter names from x to _x, and - powerpc is missing the cleanup of casting the macro parameters once at the __bswapN() level instead of every time they are referenced at lower levels. After fixing this, it would be mostly better than amd64. - powerpc is missing cleandown from casts (to __uint64_t) to hard long long constants on i386. - sparc64 to powerpc: - almost the same, but shouldn't be: - sparc64 still uses __OPTIMIZE__, but in a clean way - sparc64 uses casts to __uint64_t but since it is always 64-bit, it could use UL suffixes like amd64. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 05:09:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92837106566B; Mon, 19 Dec 2011 05:09:08 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 672508FC0A; Mon, 19 Dec 2011 05:09:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJ5989I041513; Mon, 19 Dec 2011 05:09:08 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJ598Yf041511; Mon, 19 Dec 2011 05:09:08 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201112190509.pBJ598Yf041511@svn.freebsd.org> From: Maxim Konovalov Date: Mon, 19 Dec 2011 05:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228699 - head/sbin/devd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 05:09:08 -0000 Author: maxim Date: Mon Dec 19 05:09:08 2011 New Revision: 228699 URL: http://svn.freebsd.org/changeset/base/228699 Log: o Sort .Xrs. Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 ============================================================================== --- head/sbin/devd/devd.conf.5 Sun Dec 18 23:54:32 2011 (r228698) +++ head/sbin/devd/devd.conf.5 Mon Dec 19 05:09:08 2011 (r228699) @@ -542,5 +542,5 @@ has many additional examples. .Sh SEE ALSO .Xr coretemp 4 , .Xr devfs 5 , -.Xr devd 8 , -.Xr re_format 7 +.Xr re_format 7 , +.Xr devd 8 From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 05:50:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58FAD1065672; Mon, 19 Dec 2011 05:50:35 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46EED8FC13; Mon, 19 Dec 2011 05:50:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJ5oZbd042819; Mon, 19 Dec 2011 05:50:35 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJ5oZn4042815; Mon, 19 Dec 2011 05:50:35 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <201112190550.pBJ5oZn4042815@svn.freebsd.org> From: Maxim Konovalov Date: Mon, 19 Dec 2011 05:50:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228700 - in head: sys/netinet6 usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 05:50:35 -0000 Author: maxim Date: Mon Dec 19 05:50:34 2011 New Revision: 228700 URL: http://svn.freebsd.org/changeset/base/228700 Log: o Convert IPv6 read-only stats sysctls to the read-write ones. o Teach netstat(1) -z to reset these stats sysctls. PR: bin/153206 Reviewed by: glebuis Sponsored by: NGINX, Inc. MFC after: 1 month Modified: head/sys/netinet6/in6_proto.c head/sys/netinet6/ip6_mroute.c head/usr.bin/netstat/inet6.c Modified: head/sys/netinet6/in6_proto.c ============================================================================== --- head/sys/netinet6/in6_proto.c Mon Dec 19 05:09:08 2011 (r228699) +++ head/sys/netinet6/in6_proto.c Mon Dec 19 05:50:34 2011 (r228700) @@ -520,7 +520,7 @@ SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_ &VNET_NAME(ip6_sendredirects), 0, ""); SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_DEFHLIM, hlim, CTLFLAG_RW, &VNET_NAME(ip6_defhlim), 0, ""); -SYSCTL_VNET_STRUCT(_net_inet6_ip6, IPV6CTL_STATS, stats, CTLFLAG_RD, +SYSCTL_VNET_STRUCT(_net_inet6_ip6, IPV6CTL_STATS, stats, CTLFLAG_RW, &VNET_NAME(ip6stat), ip6stat, ""); SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGPACKETS, maxfragpackets, CTLFLAG_RW, &VNET_NAME(ip6_maxfragpackets), 0, ""); @@ -573,7 +573,7 @@ SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_ CTLFLAG_RW, &VNET_NAME(ip6_auto_linklocal), 0, "Default value of per-interface flag for automatically adding an IPv6" " link-local address to interfaces when attached"); -SYSCTL_VNET_STRUCT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, CTLFLAG_RD, +SYSCTL_VNET_STRUCT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, CTLFLAG_RW, &VNET_NAME(rip6stat), rip6stat, ""); SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_PREFER_TEMPADDR, prefer_tempaddr, CTLFLAG_RW, &VNET_NAME(ip6_prefer_tempaddr), 0, ""); @@ -603,7 +603,7 @@ SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6 CTLFLAG_RW, &VNET_NAME(icmp6_rediraccept), 0, ""); SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRTIMEOUT, redirtimeout, CTLFLAG_RW, &VNET_NAME(icmp6_redirtimeout), 0, ""); -SYSCTL_VNET_STRUCT(_net_inet6_icmp6, ICMPV6CTL_STATS, stats, CTLFLAG_RD, +SYSCTL_VNET_STRUCT(_net_inet6_icmp6, ICMPV6CTL_STATS, stats, CTLFLAG_RW, &VNET_NAME(icmp6stat), icmp6stat, ""); SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_PRUNE, nd6_prune, CTLFLAG_RW, &VNET_NAME(nd6_prune), 0, ""); Modified: head/sys/netinet6/ip6_mroute.c ============================================================================== --- head/sys/netinet6/ip6_mroute.c Mon Dec 19 05:09:08 2011 (r228699) +++ head/sys/netinet6/ip6_mroute.c Mon Dec 19 05:50:34 2011 (r228700) @@ -250,7 +250,7 @@ static mifi_t nummifs = 0; static mifi_t reg_mif_num = (mifi_t)-1; static struct pim6stat pim6stat; -SYSCTL_STRUCT(_net_inet6_pim, PIM6CTL_STATS, stats, CTLFLAG_RD, +SYSCTL_STRUCT(_net_inet6_pim, PIM6CTL_STATS, stats, CTLFLAG_RW, &pim6stat, pim6stat, "PIM Statistics (struct pim6stat, netinet6/pim_var.h)"); Modified: head/usr.bin/netstat/inet6.c ============================================================================== --- head/usr.bin/netstat/inet6.c Mon Dec 19 05:09:08 2011 (r228699) +++ head/usr.bin/netstat/inet6.c Mon Dec 19 05:50:34 2011 (r228700) @@ -360,15 +360,17 @@ static char *srcrule_str[] = { void ip6_stats(u_long off, const char *name, int af1 __unused, int proto __unused) { - struct ip6stat ip6stat; + struct ip6stat ip6stat, zerostat; int first, i; size_t len; len = sizeof ip6stat; if (live) { memset(&ip6stat, 0, len); - if (sysctlbyname("net.inet6.ip6.stats", &ip6stat, &len, NULL, - 0) < 0) { + if (zflag) + memset(&zerostat, 0, len); + if (sysctlbyname("net.inet6.ip6.stats", &ip6stat, &len, + zflag ? &zerostat : NULL, zflag ? len : 0) < 0) { if (errno != ENOENT) warn("sysctl: net.inet6.ip6.stats"); return; @@ -840,15 +842,17 @@ static const char *icmp6names[] = { void icmp6_stats(u_long off, const char *name, int af1 __unused, int proto __unused) { - struct icmp6stat icmp6stat; + struct icmp6stat icmp6stat, zerostat; int i, first; size_t len; len = sizeof icmp6stat; if (live) { memset(&icmp6stat, 0, len); + if (zflag) + memset(&zerostat, 0, len); if (sysctlbyname("net.inet6.icmp6.stats", &icmp6stat, &len, - NULL, 0) < 0) { + zflag ? &zerostat : NULL, zflag ? len : 0) < 0) { if (errno != ENOENT) warn("sysctl: net.inet6.icmp6.stats"); return; @@ -1033,14 +1037,16 @@ pim6_stats(u_long off, const char *name, void rip6_stats(u_long off, const char *name, int af1 __unused, int proto __unused) { - struct rip6stat rip6stat; + struct rip6stat rip6stat, zerostat; u_quad_t delivered; size_t len; len = sizeof(rip6stat); if (live) { + if (zflag) + memset(&zerostat, 0, len); if (sysctlbyname("net.inet6.ip6.rip6stats", &rip6stat, &len, - NULL, 0) < 0) { + zflag ? &zerostat : NULL, zflag ? len : 0) < 0) { if (errno != ENOENT) warn("sysctl: net.inet6.ip6.rip6stats"); return; From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 08:46:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id F024C1065670; Mon, 19 Dec 2011 08:46:35 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 2390514DBD9; Mon, 19 Dec 2011 08:46:33 +0000 (UTC) Message-ID: <4EEEF9E8.8090701@FreeBSD.org> Date: Mon, 19 Dec 2011 00:46:32 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Dimitry Andric References: <201112182354.pBINsWlq030477@svn.freebsd.org> In-Reply-To: <201112182354.pBINsWlq030477@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, bapt@FreeBSD.org Subject: Re: svn commit: r228698 - head/usr.bin/m4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 08:46:36 -0000 On 12/18/2011 15:54, Dimitry Andric wrote: > Author: dim > Date: Sun Dec 18 23:54:32 2011 > New Revision: 228698 > URL: http://svn.freebsd.org/changeset/base/228698 > > Log: > Repair breakage after r228697: since m4 now uses pow(3), it needs -lm. > > Pointy hat to: bapt Still seems broken to me: # make cleandir && make obj && make depend && make all /usr/obj/frontier/svn/head/usr.bin/m4 created for /frontier/svn/head/usr.bin/m4 yacc -d -o parser.c /frontier/svn/head/usr.bin/m4/parser.y lex -t /frontier/svn/head/usr.bin/m4/tokenizer.l > tokenizer.c rm -f .depend mkdep -f .depend -a -DEXTENDED -I/frontier/svn/head/usr.bin/m4/lib -std=gnu99 /frontier/svn/head/usr.bin/m4/eval.c /frontier/svn/head/usr.bin/m4/expr.c /frontier/svn/head/usr.bin/m4/look.c /frontier/svn/head/usr.bin/m4/main.c /frontier/svn/head/usr.bin/m4/misc.c /frontier/svn/head/usr.bin/m4/gnum4.c /frontier/svn/head/usr.bin/m4/trace.c parser.c tokenizer.c /frontier/svn/head/usr.bin/m4/lib/ohash_create_entry.c /frontier/svn/head/usr.bin/m4/lib/ohash_delete.c /frontier/svn/head/usr.bin/m4/lib/ohash_do.c /frontier/svn/head/usr.bin/m4/lib/ohash_entries.c /frontier/svn/head/usr.bin/m4/lib/ohash_enum.c /frontier/svn/head/usr.bin/m4/lib/ohash_init.c /frontier/svn/head/usr.bin/m4/lib/ohash_interval.c /frontier/svn/head/usr.bin/m4/lib/ohash_lookup_interval.c /frontier/svn/head/usr.bin/m4/lib/ohash_lookup_memory.c /frontier/svn/head/usr.bin/m4/lib/ohash_qlookup.c /frontier/svn/head/usr.bin/m4/lib/ohash_qlookupi.c echo m4: /usr/lib/libc.a >> .depend cc -O2 -pipe -DEXTENDED -I/frontier/svn/head/usr.bin/m4/lib -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c /frontier/svn/head/usr.bin/m4/eval.c cc1: warnings being treated as errors /frontier/svn/head/usr.bin/m4/eval.c: In function 'expand_builtin': /frontier/svn/head/usr.bin/m4/eval.c:271: warning: suggest explicit braces to avoid ambiguous 'else' *** Error code 1 Stop in /frontier/svn/head/usr.bin/m4. Reverting to r228696 lets it build again. BTW, there seems to be an "issue" with the svn change: svn up -r228696 Updating '.': D parser.y A parser.y D tokenizer.l A tokenizer.l U eval.c U Makefile Updated to revision 228696. r228697 seems to have included "replacing" those 2 files, which seems sub-optimal, and may cause problems for the svn2cvs exporter. bapt, what did you do here? Doug > Modified: > head/usr.bin/m4/Makefile > > Modified: head/usr.bin/m4/Makefile > ============================================================================== > --- head/usr.bin/m4/Makefile Sun Dec 18 22:04:55 2011 (r228697) > +++ head/usr.bin/m4/Makefile Sun Dec 18 23:54:32 2011 (r228698) > @@ -6,7 +6,7 @@ > > PROG= m4 > CFLAGS+=-DEXTENDED -I${.CURDIR}/lib > -LDADD= -ly -ll > +LDADD= -ly -ll -lm > # clang needs 1 while with gcc we can use 2 > #WARNS= 1 > > -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 08:50:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE51C106564A; Mon, 19 Dec 2011 08:50:18 +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 BD45B8FC13; Mon, 19 Dec 2011 08:50:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJ8oId5048332; Mon, 19 Dec 2011 08:50:18 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJ8oIKc048330; Mon, 19 Dec 2011 08:50:18 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201112190850.pBJ8oIKc048330@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 19 Dec 2011 08:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228701 - head/usr.bin/m4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 08:50:18 -0000 Author: bz Date: Mon Dec 19 08:50:17 2011 New Revision: 228701 URL: http://svn.freebsd.org/changeset/base/228701 Log: Unbreak the build after r228697 adding the { } block to make clear which if the else belongs to. Modified: head/usr.bin/m4/eval.c Modified: head/usr.bin/m4/eval.c ============================================================================== --- head/usr.bin/m4/eval.c Mon Dec 19 05:50:34 2011 (r228700) +++ head/usr.bin/m4/eval.c Mon Dec 19 08:50:17 2011 (r228701) @@ -268,13 +268,14 @@ expand_builtin(const char *argv[], int a break; case INCLTYPE: if (argc > 2) - if (!doincl(argv[2])) + if (!doincl(argv[2])) { if (mimic_gnu) warn("%s at line %lu: include(%s)", CURRENT_NAME, CURRENT_LINE, argv[2]); else err(1, "%s at line %lu: include(%s)", CURRENT_NAME, CURRENT_LINE, argv[2]); + } break; case SINCTYPE: From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 08:50:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B53A106564A; Mon, 19 Dec 2011 08:50:59 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id DCE8A8FC15; Mon, 19 Dec 2011 08:50:58 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id A2E8B25D37C3; Mon, 19 Dec 2011 08:50:57 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id C306FBD751D; Mon, 19 Dec 2011 08:50:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id dbzl1LTLqtMJ; Mon, 19 Dec 2011 08:50:55 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 172F0BD751F; Mon, 19 Dec 2011 08:50:55 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <4EEEF9E8.8090701@FreeBSD.org> Date: Mon, 19 Dec 2011 08:50:54 +0000 Content-Transfer-Encoding: 7bit Message-Id: <49201C5C-BE2E-4EAE-9337-33E0DA9054E3@FreeBSD.org> References: <201112182354.pBINsWlq030477@svn.freebsd.org> <4EEEF9E8.8090701@FreeBSD.org> To: Doug Barton X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric , bapt@FreeBSD.org Subject: Re: svn commit: r228698 - head/usr.bin/m4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 08:50:59 -0000 On 19. Dec 2011, at 08:46 , Doug Barton wrote: > On 12/18/2011 15:54, Dimitry Andric wrote: >> Author: dim >> Date: Sun Dec 18 23:54:32 2011 >> New Revision: 228698 >> URL: http://svn.freebsd.org/changeset/base/228698 >> >> Log: >> Repair breakage after r228697: since m4 now uses pow(3), it needs -lm. >> >> Pointy hat to: bapt > > Still seems broken to me: > > # make cleandir && make obj && make depend && make all > /usr/obj/frontier/svn/head/usr.bin/m4 created for > /frontier/svn/head/usr.bin/m4 > yacc -d -o parser.c /frontier/svn/head/usr.bin/m4/parser.y > lex -t /frontier/svn/head/usr.bin/m4/tokenizer.l > tokenizer.c > rm -f .depend > mkdep -f .depend -a -DEXTENDED -I/frontier/svn/head/usr.bin/m4/lib > -std=gnu99 /frontier/svn/head/usr.bin/m4/eval.c > /frontier/svn/head/usr.bin/m4/expr.c > /frontier/svn/head/usr.bin/m4/look.c > /frontier/svn/head/usr.bin/m4/main.c > /frontier/svn/head/usr.bin/m4/misc.c > /frontier/svn/head/usr.bin/m4/gnum4.c > /frontier/svn/head/usr.bin/m4/trace.c parser.c tokenizer.c > /frontier/svn/head/usr.bin/m4/lib/ohash_create_entry.c > /frontier/svn/head/usr.bin/m4/lib/ohash_delete.c > /frontier/svn/head/usr.bin/m4/lib/ohash_do.c > /frontier/svn/head/usr.bin/m4/lib/ohash_entries.c > /frontier/svn/head/usr.bin/m4/lib/ohash_enum.c > /frontier/svn/head/usr.bin/m4/lib/ohash_init.c > /frontier/svn/head/usr.bin/m4/lib/ohash_interval.c > /frontier/svn/head/usr.bin/m4/lib/ohash_lookup_interval.c > /frontier/svn/head/usr.bin/m4/lib/ohash_lookup_memory.c > /frontier/svn/head/usr.bin/m4/lib/ohash_qlookup.c > /frontier/svn/head/usr.bin/m4/lib/ohash_qlookupi.c > echo m4: /usr/lib/libc.a >> .depend > cc -O2 -pipe -DEXTENDED -I/frontier/svn/head/usr.bin/m4/lib -std=gnu99 > -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W > -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes > -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch > -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline > -Wnested-externs -Wredundant-decls -Wold-style-definition > -Wno-pointer-sign -c /frontier/svn/head/usr.bin/m4/eval.c > cc1: warnings being treated as errors > /frontier/svn/head/usr.bin/m4/eval.c: In function 'expand_builtin': > /frontier/svn/head/usr.bin/m4/eval.c:271: warning: suggest explicit > braces to avoid ambiguous 'else' > *** Error code 1 > > Stop in /frontier/svn/head/usr.bin/m4. > > Reverting to r228696 lets it build again. Or running svn up now. -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 09:12:49 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C011D106566B; Mon, 19 Dec 2011 09:12:49 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A3D518FC12; Mon, 19 Dec 2011 09:12:49 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pBJ9CnBN006536; Mon, 19 Dec 2011 09:12:49 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pBJ9CnLD006535; Mon, 19 Dec 2011 09:12:49 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Mon, 19 Dec 2011 10:12:45 +0100 From: Baptiste Daroussin To: "Bjoern A. Zeeb" Message-ID: <20111219091245.GE95392@azathoth.lan> References: <201112182354.pBINsWlq030477@svn.freebsd.org> <4EEEF9E8.8090701@FreeBSD.org> <49201C5C-BE2E-4EAE-9337-33E0DA9054E3@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wchHw8dVAp53YPj8" Content-Disposition: inline In-Reply-To: <49201C5C-BE2E-4EAE-9337-33E0DA9054E3@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Doug Barton , Dimitry Andric , src-committers@FreeBSD.org Subject: Re: svn commit: r228698 - head/usr.bin/m4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 09:12:49 -0000 --wchHw8dVAp53YPj8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 19, 2011 at 08:50:54AM +0000, Bjoern A. Zeeb wrote: >=20 > On 19. Dec 2011, at 08:46 , Doug Barton wrote: >=20 > > On 12/18/2011 15:54, Dimitry Andric wrote: > >> Author: dim > >> Date: Sun Dec 18 23:54:32 2011 > >> New Revision: 228698 > >> URL: http://svn.freebsd.org/changeset/base/228698 > >>=20 > >> Log: > >> Repair breakage after r228697: since m4 now uses pow(3), it needs -lm. > >>=20 > >> Pointy hat to: bapt > >=20 > > Still seems broken to me: > >=20 > > # make cleandir && make obj && make depend && make all > > /usr/obj/frontier/svn/head/usr.bin/m4 created for > > /frontier/svn/head/usr.bin/m4 > > yacc -d -o parser.c /frontier/svn/head/usr.bin/m4/parser.y > > lex -t /frontier/svn/head/usr.bin/m4/tokenizer.l > tokenizer.c > > rm -f .depend > > mkdep -f .depend -a -DEXTENDED -I/frontier/svn/head/usr.bin/m4/lib > > -std=3Dgnu99 /frontier/svn/head/usr.bin/m4/eval.c > > /frontier/svn/head/usr.bin/m4/expr.c > > /frontier/svn/head/usr.bin/m4/look.c > > /frontier/svn/head/usr.bin/m4/main.c > > /frontier/svn/head/usr.bin/m4/misc.c > > /frontier/svn/head/usr.bin/m4/gnum4.c > > /frontier/svn/head/usr.bin/m4/trace.c parser.c tokenizer.c > > /frontier/svn/head/usr.bin/m4/lib/ohash_create_entry.c > > /frontier/svn/head/usr.bin/m4/lib/ohash_delete.c > > /frontier/svn/head/usr.bin/m4/lib/ohash_do.c > > /frontier/svn/head/usr.bin/m4/lib/ohash_entries.c > > /frontier/svn/head/usr.bin/m4/lib/ohash_enum.c > > /frontier/svn/head/usr.bin/m4/lib/ohash_init.c > > /frontier/svn/head/usr.bin/m4/lib/ohash_interval.c > > /frontier/svn/head/usr.bin/m4/lib/ohash_lookup_interval.c > > /frontier/svn/head/usr.bin/m4/lib/ohash_lookup_memory.c > > /frontier/svn/head/usr.bin/m4/lib/ohash_qlookup.c > > /frontier/svn/head/usr.bin/m4/lib/ohash_qlookupi.c > > echo m4: /usr/lib/libc.a >> .depend > > cc -O2 -pipe -DEXTENDED -I/frontier/svn/head/usr.bin/m4/lib -std=3Dgnu= 99 > > -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W > > -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes > > -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch > > -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline > > -Wnested-externs -Wredundant-decls -Wold-style-definition > > -Wno-pointer-sign -c /frontier/svn/head/usr.bin/m4/eval.c > > cc1: warnings being treated as errors > > /frontier/svn/head/usr.bin/m4/eval.c: In function 'expand_builtin': > > /frontier/svn/head/usr.bin/m4/eval.c:271: warning: suggest explicit > > braces to avoid ambiguous 'else' > > *** Error code 1 > >=20 > > Stop in /frontier/svn/head/usr.bin/m4. > >=20 > > Reverting to r228696 lets it build again. >=20 > Or running svn up now. >=20 Sorry about that. regards, Bapt --wchHw8dVAp53YPj8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7vAA0ACgkQ8kTtMUmk6EzO6wCcCe9qyEUVoGR9tC5ZRdMICIdL aqsAoIHsJa3/byQai9LZ3NdH8440EDqH =AsCP -----END PGP SIGNATURE----- --wchHw8dVAp53YPj8-- From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 09:59:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EC5B106564A; Mon, 19 Dec 2011 09:59:10 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id D4C758FC18; Mon, 19 Dec 2011 09:59:09 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1RcZj2-0000c1-5D; Mon, 19 Dec 2011 13:41:40 +0400 Date: Mon, 19 Dec 2011 13:41:40 +0400 From: Slawa Olhovchenkov To: Sam Leffler Message-ID: <20111219094140.GB51886@zxy.spb.ru> References: <200903020228.n222SMD1061919@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200903020228.n222SMD1061919@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r189263 - in head/usr.sbin/wpa: . hostapd hostapd_cli wpa_cli wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 09:59:10 -0000 On Mon, Mar 02, 2009 at 02:28:22AM +0000, Sam Leffler wrote: > Author: sam > Date: Mon Mar 2 02:28:22 2009 > New Revision: 189263 > URL: http://svn.freebsd.org/changeset/base/189263 > > Log: > update to 0.6.8 > > Reviewed by: thompsa > > Modified: > head/usr.sbin/wpa/Makefile.inc > head/usr.sbin/wpa/hostapd/Makefile > head/usr.sbin/wpa/hostapd/driver_freebsd.c > head/usr.sbin/wpa/hostapd_cli/Makefile > head/usr.sbin/wpa/wpa_cli/Makefile > head/usr.sbin/wpa/wpa_supplicant/Makefile > head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c > head/usr.sbin/wpa/wpa_supplicant/driver_wired.c > Modified: head/usr.sbin/wpa/hostapd/Makefile > ============================================================================== > --- head/usr.sbin/wpa/hostapd/Makefile Mon Mar 2 02:26:53 2009 (r189262) > +++ head/usr.sbin/wpa/hostapd/Makefile Mon Mar 2 02:28:22 2009 (r189263) > .if !empty(CFLAGS:M*-DEAP_SERVER) > -SRCS+= eap.c eap_methods.c eap_identity.c > +#SRCS+= eap.c eap_methods.c eap_identity.c EAP_SERVER functionality removed. Why? From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 12:11:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCC8A106566B; Mon, 19 Dec 2011 12:11:07 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB3728FC1A; Mon, 19 Dec 2011 12:11:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJCB7c4056799; Mon, 19 Dec 2011 12:11:07 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJCB7su056797; Mon, 19 Dec 2011 12:11:07 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201112191211.pBJCB7su056797@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 19 Dec 2011 12:11:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228702 - stable/9/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 12:11:08 -0000 Author: ru Date: Mon Dec 19 12:11:07 2011 New Revision: 228702 URL: http://svn.freebsd.org/changeset/base/228702 Log: MFC r228457: The "inet" keyword in the "ifconfig_IF_aliasN" is mandatory for IPv4 aliases to work since network.subr@197139. Approved by: re (bz) Modified: stable/9/share/man/man5/rc.conf.5 Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/9/share/man/man5/rc.conf.5 ============================================================================== --- stable/9/share/man/man5/rc.conf.5 Mon Dec 19 08:50:17 2011 (r228701) +++ stable/9/share/man/man5/rc.conf.5 Mon Dec 19 12:11:07 2011 (r228702) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 23, 2011 +.Dd December 13, 2011 .Dt RC.CONF 5 .Os .Sh NAME @@ -1101,7 +1101,9 @@ ipv4_addrs_ed0="192.0.2.129/27 192.0.2.1 .Pp It is also possible to add IP alias entries using .Xr ifconfig 8 -syntax. +syntax with the +.Dq Li inet +keyword. Assuming that the interface in question was .Li ed0 , it might look @@ -1114,7 +1116,9 @@ ifconfig_ed0_alias1="inet 127.0.0.254 ne And so on. For each .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n -entry that is found, +entry with the +.Dq Li inet +keyword that is found, its contents are passed to .Xr ifconfig 8 . Execution stops at the first unsuccessful access, so if From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 12:50:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C890E106564A; Mon, 19 Dec 2011 12:50:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7CDB8FC13; Mon, 19 Dec 2011 12:50:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJCoCrM058191; Mon, 19 Dec 2011 12:50:12 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJCoCP3058189; Mon, 19 Dec 2011 12:50:12 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112191250.pBJCoCP3058189@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 19 Dec 2011 12:50:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228703 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 12:50:12 -0000 Author: glebius Date: Mon Dec 19 12:50:12 2011 New Revision: 228703 URL: http://svn.freebsd.org/changeset/base/228703 Log: Remove if_carp.ko. /boot/kernel should be upgraded atomically. Requested by: netchild, bz Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Dec 19 12:11:07 2011 (r228702) +++ head/ObsoleteFiles.inc Mon Dec 19 12:50:12 2011 (r228703) @@ -38,8 +38,6 @@ # xargs -n1 | sort | uniq -d; # done -# 20111216: carp(4) module renamed -OLD_FILES+=boot/kernel/if_carp.ko # 20111214: eventtimers(7) moved to eventtimers(4) OLD_FILES+=usr/share/man/man7/eventtimers.7.gz # 20111125: amd(4) removed From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 12:51:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7527D106566C; Mon, 19 Dec 2011 12:51:13 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 643648FC13; Mon, 19 Dec 2011 12:51:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJCpDeg058261; Mon, 19 Dec 2011 12:51:13 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJCpDio058259; Mon, 19 Dec 2011 12:51:13 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201112191251.pBJCpDio058259@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 19 Dec 2011 12:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228704 - releng/9.0/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 12:51:13 -0000 Author: ru Date: Mon Dec 19 12:51:12 2011 New Revision: 228704 URL: http://svn.freebsd.org/changeset/base/228704 Log: MFC r228457: The "inet" keyword in the "ifconfig_IF_aliasN" is mandatory for IPv4 aliases to work since network.subr@197139. Approved by: re (bz) Modified: releng/9.0/share/man/man5/rc.conf.5 Directory Properties: releng/9.0/share/man/man5/ (props changed) Modified: releng/9.0/share/man/man5/rc.conf.5 ============================================================================== --- releng/9.0/share/man/man5/rc.conf.5 Mon Dec 19 12:50:12 2011 (r228703) +++ releng/9.0/share/man/man5/rc.conf.5 Mon Dec 19 12:51:12 2011 (r228704) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 23, 2011 +.Dd December 13, 2011 .Dt RC.CONF 5 .Os .Sh NAME @@ -1101,7 +1101,9 @@ ipv4_addrs_ed0="192.0.2.129/27 192.0.2.1 .Pp It is also possible to add IP alias entries using .Xr ifconfig 8 -syntax. +syntax with the +.Dq Li inet +keyword. Assuming that the interface in question was .Li ed0 , it might look @@ -1114,7 +1116,9 @@ ifconfig_ed0_alias1="inet 127.0.0.254 ne And so on. For each .Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n -entry that is found, +entry with the +.Dq Li inet +keyword that is found, its contents are passed to .Xr ifconfig 8 . Execution stops at the first unsuccessful access, so if From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 13:12:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 544061065677; Mon, 19 Dec 2011 13:12:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42A8A8FC19; Mon, 19 Dec 2011 13:12:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJDCcrH058946; Mon, 19 Dec 2011 13:12:38 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJDCcu6058944; Mon, 19 Dec 2011 13:12:38 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112191312.pBJDCcu6058944@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 19 Dec 2011 13:12:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228705 - stable/9/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 13:12:38 -0000 Author: glebius Date: Mon Dec 19 13:12:37 2011 New Revision: 228705 URL: http://svn.freebsd.org/changeset/base/228705 Log: Merge r228472. For the sake of POLA for the whole 9.x timeline add compatibility support for specifing IPv4 aliases in rc.conf without the "inet" keyword. Approved by: re (bz) Modified: stable/9/etc/network.subr Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/network.subr ============================================================================== --- stable/9/etc/network.subr Mon Dec 19 12:51:12 2011 (r228704) +++ stable/9/etc/network.subr Mon Dec 19 13:12:37 2011 (r228705) @@ -716,9 +716,16 @@ ifalias_ipv4_up() inet\ *) ifconfig $1 ${ifconfig_args} alias && _ret=0 ;; + inet6\ *) + ;; "") break ;; + *) + warn "\$ifconfig_$1_alias${alias} needs " \ + "\"inet\" keyword for an IPv4 address." + ifconfig $1 ${ifconfig_args} alias && _ret=0 + ;; esac alias=$((${alias} + 1)) done From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 13:14:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 283A21065678; Mon, 19 Dec 2011 13:14:58 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1A528FC13; Mon, 19 Dec 2011 13:14:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJDEvSw059069; Mon, 19 Dec 2011 13:14:57 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJDEvhv059067; Mon, 19 Dec 2011 13:14:57 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112191314.pBJDEvhv059067@svn.freebsd.org> From: Gleb Smirnoff Date: Mon, 19 Dec 2011 13:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228706 - releng/9.0/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 13:14:58 -0000 Author: glebius Date: Mon Dec 19 13:14:57 2011 New Revision: 228706 URL: http://svn.freebsd.org/changeset/base/228706 Log: Merge r228472. For the sake of POLA for the whole 9.x timeline add compatibility support for specifing IPv4 aliases in rc.conf without the "inet" keyword. Approved by: re (bz) Modified: releng/9.0/etc/network.subr Directory Properties: releng/9.0/etc/ (props changed) Modified: releng/9.0/etc/network.subr ============================================================================== --- releng/9.0/etc/network.subr Mon Dec 19 13:12:37 2011 (r228705) +++ releng/9.0/etc/network.subr Mon Dec 19 13:14:57 2011 (r228706) @@ -716,9 +716,16 @@ ifalias_ipv4_up() inet\ *) ifconfig $1 ${ifconfig_args} alias && _ret=0 ;; + inet6\ *) + ;; "") break ;; + *) + warn "\$ifconfig_$1_alias${alias} needs " \ + "\"inet\" keyword for an IPv4 address." + ifconfig $1 ${ifconfig_args} alias && _ret=0 + ;; esac alias=$((${alias} + 1)) done From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 13:35:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66D3C106566C; Mon, 19 Dec 2011 13:35:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55D748FC12; Mon, 19 Dec 2011 13:35:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJDZj8U059755; Mon, 19 Dec 2011 13:35:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJDZjY0059753; Mon, 19 Dec 2011 13:35:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112191335.pBJDZjY0059753@svn.freebsd.org> From: Dimitry Andric Date: Mon, 19 Dec 2011 13:35:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228707 - head/usr.sbin/sendmail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 13:35:45 -0000 Author: dim Date: Mon Dec 19 13:35:44 2011 New Revision: 228707 URL: http://svn.freebsd.org/changeset/base/228707 Log: Unfortunately, clang gives warnings about sendmail code that cannot be turned off yet. Since this is contrib code, and we don't really care about the warnings, just turn make them non-fatal for now. MFC after: 1 week Modified: head/usr.sbin/sendmail/Makefile Modified: head/usr.sbin/sendmail/Makefile ============================================================================== --- head/usr.sbin/sendmail/Makefile Mon Dec 19 13:14:57 2011 (r228706) +++ head/usr.sbin/sendmail/Makefile Mon Dec 19 13:35:44 2011 (r228707) @@ -45,6 +45,13 @@ CFLAGS+= -DNETINET6 WARNS?= 1 +.if ${CC:T:Mclang} == "clang" +# Unfortunately, clang gives warnings about sendmail code that cannot +# be turned off yet. Since this is contrib code, and we don't really +# care about the warnings, just make them non-fatal for now. +NO_WERROR= +.endif + DPADD= ${LIBUTIL} ${LIBWRAP} LDADD= -lutil -lwrap From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 13:38:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54E77106564A; Mon, 19 Dec 2011 13:38:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A2C98FC0C; Mon, 19 Dec 2011 13:38:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJDcTUN059878; Mon, 19 Dec 2011 13:38:29 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJDcSUG059876; Mon, 19 Dec 2011 13:38:28 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112191338.pBJDcSUG059876@svn.freebsd.org> From: Dimitry Andric Date: Mon, 19 Dec 2011 13:38:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228708 - head/usr.bin/vacation X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 13:38:30 -0000 Author: dim Date: Mon Dec 19 13:38:28 2011 New Revision: 228708 URL: http://svn.freebsd.org/changeset/base/228708 Log: In usr.bin/vacation/Makefile, fix a typo in the comment about clang warnings. Spotted by: arundel MFC after: 1 week Modified: head/usr.bin/vacation/Makefile Modified: head/usr.bin/vacation/Makefile ============================================================================== --- head/usr.bin/vacation/Makefile Mon Dec 19 13:35:44 2011 (r228707) +++ head/usr.bin/vacation/Makefile Mon Dec 19 13:38:28 2011 (r228708) @@ -14,7 +14,7 @@ WARNS?= 2 .if ${CC:T:Mclang} == "clang" # Unfortunately, clang gives warnings about sendmail code that cannot # be turned off yet. Since this is contrib code, and we don't really -# care about the warnings, just turn make them non-fatal for now. +# care about the warnings, just make them non-fatal for now. NO_WERROR= .endif From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 14:53:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8A38106566B; Mon, 19 Dec 2011 14:53:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C74618FC12; Mon, 19 Dec 2011 14:53:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJErgG5062169; Mon, 19 Dec 2011 14:53:42 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJErgYA062167; Mon, 19 Dec 2011 14:53:42 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112191453.pBJErgYA062167@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 19 Dec 2011 14:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228709 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 14:53:42 -0000 Author: hselasky Date: Mon Dec 19 14:53:42 2011 New Revision: 228709 URL: http://svn.freebsd.org/changeset/base/228709 Log: Add missing unlock of USB controller's lock, when doing shutdown, suspend and resume. Suggested by: avg @ MFC after: 3 days Modified: head/sys/dev/usb/controller/usb_controller.c Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 13:38:28 2011 (r228708) +++ head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 14:53:42 2011 (r228709) @@ -390,6 +390,8 @@ usb_bus_suspend(struct usb_proc_msg *pm) if (udev == NULL || bus->bdev == NULL) return; + USB_BUS_UNLOCK(bus); + bus_generic_shutdown(bus->bdev); usbd_enum_lock(udev); @@ -410,6 +412,8 @@ usb_bus_suspend(struct usb_proc_msg *pm) (bus->methods->set_hw_power_sleep) (bus, USB_HW_POWER_SUSPEND); usbd_enum_unlock(udev); + + USB_BUS_LOCK(bus); } /*------------------------------------------------------------------------* @@ -430,6 +434,8 @@ usb_bus_resume(struct usb_proc_msg *pm) if (udev == NULL || bus->bdev == NULL) return; + USB_BUS_UNLOCK(bus); + usbd_enum_lock(udev); #if 0 DEVMETHOD(usb_take_controller, NULL); /* dummy */ @@ -457,6 +463,8 @@ usb_bus_resume(struct usb_proc_msg *pm) device_printf(bus->bdev, "Could not configure root HUB\n"); usbd_enum_unlock(udev); + + USB_BUS_LOCK(bus); } /*------------------------------------------------------------------------* @@ -477,6 +485,8 @@ usb_bus_shutdown(struct usb_proc_msg *pm if (udev == NULL || bus->bdev == NULL) return; + USB_BUS_UNLOCK(bus); + bus_generic_shutdown(bus->bdev); usbd_enum_lock(udev); @@ -497,6 +507,8 @@ usb_bus_shutdown(struct usb_proc_msg *pm (bus->methods->set_hw_power_sleep) (bus, USB_HW_POWER_SHUTDOWN); usbd_enum_unlock(udev); + + USB_BUS_LOCK(bus); } static void From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 14:55:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00DD0106566C; Mon, 19 Dec 2011 14:55:15 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3E4F8FC14; Mon, 19 Dec 2011 14:55:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJEtEXI062326; Mon, 19 Dec 2011 14:55:14 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJEtEO2062324; Mon, 19 Dec 2011 14:55:14 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201112191455.pBJEtEO2062324@svn.freebsd.org> From: Andriy Gapon Date: Mon, 19 Dec 2011 14:55:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228710 - head/sys/cddl/compat/opensolaris/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 14:55:15 -0000 Author: avg Date: Mon Dec 19 14:55:14 2011 New Revision: 228710 URL: http://svn.freebsd.org/changeset/base/228710 Log: opensolaris compat: fix vcmn_err so that panic(9) produces a proper message ... instead of just a verbatim format string. Reviewed by: pjd MFC after: 1 week Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c ============================================================================== --- head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c Mon Dec 19 14:53:42 2011 (r228709) +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c Mon Dec 19 14:55:14 2011 (r228710) @@ -28,29 +28,35 @@ void vcmn_err(int ce, const char *fmt, va_list adx) { char buf[256]; + const char *prefix; + prefix = NULL; /* silence unwitty compilers */ switch (ce) { case CE_CONT: - snprintf(buf, sizeof(buf), "Solaris(cont): %s\n", fmt); + prefix = "Solaris(cont): "; break; case CE_NOTE: - snprintf(buf, sizeof(buf), "Solaris: NOTICE: %s\n", fmt); + prefix = "Solaris: NOTICE: "; break; case CE_WARN: - snprintf(buf, sizeof(buf), "Solaris: WARNING: %s\n", fmt); + prefix = "Solaris: WARNING: "; break; case CE_PANIC: - snprintf(buf, sizeof(buf), "Solaris(panic): %s\n", fmt); + prefix = "Solaris(panic): "; break; case CE_IGNORE: break; default: panic("Solaris: unknown severity level"); } - if (ce == CE_PANIC) - panic("%s", buf); - if (ce != CE_IGNORE) - vprintf(buf, adx); + if (ce == CE_PANIC) { + vsnprintf(buf, sizeof(buf), fmt, adx); + panic("%s%s", prefix, buf); + } + if (ce != CE_IGNORE) { + printf("%s", prefix); + vprintf(fmt, adx); + } } void From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 15:35:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 682EF106564A; Mon, 19 Dec 2011 15:35:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 568988FC0C; Mon, 19 Dec 2011 15:35:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJFZ6Wi063599; Mon, 19 Dec 2011 15:35:06 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJFZ6hY063597; Mon, 19 Dec 2011 15:35:06 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112191535.pBJFZ6hY063597@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 19 Dec 2011 15:35:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228711 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 15:35:06 -0000 Author: hselasky Date: Mon Dec 19 15:35:05 2011 New Revision: 228711 URL: http://svn.freebsd.org/changeset/base/228711 Log: Add code to wait for USB shutdown to be executed at system shutdown. Add sysctl which can be used to skip this waiting. MFC after: 3 days Modified: head/sys/dev/usb/controller/usb_controller.c Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 14:55:14 2011 (r228710) +++ head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 15:35:05 2011 (r228711) @@ -87,7 +87,12 @@ SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug static int usb_no_boot_wait = 0; TUNABLE_INT("hw.usb.no_boot_wait", &usb_no_boot_wait); SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, &usb_no_boot_wait, 0, - "No device enumerate waiting at boot."); + "No USB device enumerate waiting at boot."); + +static int usb_no_shutdown_wait = 0; +TUNABLE_INT("hw.usb.no_shutdown_wait", &usb_no_shutdown_wait); +SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RDTUN, &usb_no_shutdown_wait, 0, + "No USB device waiting at system shutdown."); static devclass_t usb_devclass; @@ -277,11 +282,20 @@ usb_shutdown(device_t dev) return (0); } + device_printf(bus->bdev, "Controller shutdown\n"); + USB_BUS_LOCK(bus); usb_proc_msignal(&bus->explore_proc, &bus->shutdown_msg[0], &bus->shutdown_msg[1]); + if (usb_no_shutdown_wait == 0) { + /* wait for shutdown callback to be executed */ + usb_proc_mwait(&bus->explore_proc, + &bus->shutdown_msg[0], &bus->shutdown_msg[1]); + } USB_BUS_UNLOCK(bus); + device_printf(bus->bdev, "Controller shutdown complete\n"); + return (0); } From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 15:46:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52F20106566B; Mon, 19 Dec 2011 15:46:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41F6A8FC17; Mon, 19 Dec 2011 15:46:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJFkGSf064021; Mon, 19 Dec 2011 15:46:16 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJFkGHZ064018; Mon, 19 Dec 2011 15:46:16 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112191546.pBJFkGHZ064018@svn.freebsd.org> From: Dimitry Andric Date: Mon, 19 Dec 2011 15:46:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228712 - in head/sbin: hastctl hastd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 15:46:16 -0000 Author: dim Date: Mon Dec 19 15:46:15 2011 New Revision: 228712 URL: http://svn.freebsd.org/changeset/base/228712 Log: Use NO_WCAST_ALIGN for usr.bin/hastctl and usr.bin/hastd; the alignment warnings in sbin/hastd/lzf.c are only emitted for i386 and amd64, and there they can be safely ignored. MFC after: 1 week Modified: head/sbin/hastctl/Makefile head/sbin/hastd/Makefile Modified: head/sbin/hastctl/Makefile ============================================================================== --- head/sbin/hastctl/Makefile Mon Dec 19 15:35:05 2011 (r228711) +++ head/sbin/hastctl/Makefile Mon Dec 19 15:46:15 2011 (r228712) @@ -20,6 +20,7 @@ SRCS+= y.tab.h MAN= hastctl.8 NO_WFORMAT= +NO_WCAST_ALIGN= CFLAGS+=-I${.CURDIR}/../hastd CFLAGS+=-DHAVE_CAPSICUM CFLAGS+=-DINET Modified: head/sbin/hastd/Makefile ============================================================================== --- head/sbin/hastd/Makefile Mon Dec 19 15:35:05 2011 (r228711) +++ head/sbin/hastd/Makefile Mon Dec 19 15:46:15 2011 (r228712) @@ -20,6 +20,7 @@ SRCS+= y.tab.h MAN= hastd.8 hast.conf.5 NO_WFORMAT= +NO_WCAST_ALIGN= CFLAGS+=-I${.CURDIR} CFLAGS+=-DHAVE_CAPSICUM CFLAGS+=-DPROTO_TCP_DEFAULT_PORT=8457 From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 17:32:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 588531065677; Mon, 19 Dec 2011 17:32:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 474238FC1A; Mon, 19 Dec 2011 17:32:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJHWtA3067920; Mon, 19 Dec 2011 17:32:55 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJHWta3067918; Mon, 19 Dec 2011 17:32:55 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112191732.pBJHWta3067918@svn.freebsd.org> From: Dimitry Andric Date: Mon, 19 Dec 2011 17:32:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228713 - head/contrib/tcpdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 17:32:55 -0000 Author: dim Date: Mon Dec 19 17:32:54 2011 New Revision: 228713 URL: http://svn.freebsd.org/changeset/base/228713 Log: In contrib/tcpdump/print-icmp6.c, fix a problem where the comparison against icmp6_hdr::icmp6_type is done incorrectly. (This fix has already been applied upstream, but we do not have the latest version of tcpdump.) MFC after: 1 week Modified: head/contrib/tcpdump/print-icmp6.c Modified: head/contrib/tcpdump/print-icmp6.c ============================================================================== --- head/contrib/tcpdump/print-icmp6.c Mon Dec 19 15:46:15 2011 (r228712) +++ head/contrib/tcpdump/print-icmp6.c Mon Dec 19 17:32:54 2011 (r228713) @@ -350,14 +350,13 @@ icmp6_print(netdissect_options *ndo, printf("ICMP6, %s", tok2str(icmp6_type_values,"unknown icmp6 type (%u)",dp->icmp6_type)); /* display cosmetics: print the packet length for printer that use the vflag now */ - if (vflag && (dp->icmp6_type == - ND_ROUTER_SOLICIT || - ND_ROUTER_ADVERT || - ND_NEIGHBOR_ADVERT || - ND_NEIGHBOR_SOLICIT || - ND_REDIRECT || - ICMP6_HADISCOV_REPLY || - ICMP6_MOBILEPREFIX_ADVERT )) + if (vflag && (dp->icmp6_type == ND_ROUTER_SOLICIT || + dp->icmp6_type == ND_ROUTER_ADVERT || + dp->icmp6_type == ND_NEIGHBOR_ADVERT || + dp->icmp6_type == ND_NEIGHBOR_SOLICIT || + dp->icmp6_type == ND_REDIRECT || + dp->icmp6_type == ICMP6_HADISCOV_REPLY || + dp->icmp6_type == ICMP6_MOBILEPREFIX_ADVERT )) printf(", length %u", length); switch (dp->icmp6_type) { From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 17:33:33 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 036841065672; Mon, 19 Dec 2011 17:33:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id A50A58FC16; Mon, 19 Dec 2011 17:33:31 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA10837; Mon, 19 Dec 2011 19:33:30 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Rch5d-000GBb-R1; Mon, 19 Dec 2011 19:33:29 +0200 Message-ID: <4EEF7569.4010401@FreeBSD.org> Date: Mon, 19 Dec 2011 19:33:29 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111206 Thunderbird/8.0 MIME-Version: 1.0 To: Hans Petter Selasky References: <201112191535.pBJFZ6hY063597@svn.freebsd.org> In-Reply-To: <201112191535.pBJFZ6hY063597@svn.freebsd.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228711 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 17:33:33 -0000 on 19/12/2011 17:35 Hans Petter Selasky said the following: > Author: hselasky > Date: Mon Dec 19 15:35:05 2011 > New Revision: 228711 > URL: http://svn.freebsd.org/changeset/base/228711 > > Log: > Add code to wait for USB shutdown to be executed at system shutdown. > Add sysctl which can be used to skip this waiting. > > MFC after: 3 days Thank you! One comment below. > Modified: > head/sys/dev/usb/controller/usb_controller.c > > Modified: head/sys/dev/usb/controller/usb_controller.c > ============================================================================== > --- head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 14:55:14 2011 (r228710) > +++ head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 15:35:05 2011 (r228711) > @@ -87,7 +87,12 @@ SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug > static int usb_no_boot_wait = 0; > TUNABLE_INT("hw.usb.no_boot_wait", &usb_no_boot_wait); > SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, &usb_no_boot_wait, 0, > - "No device enumerate waiting at boot."); > + "No USB device enumerate waiting at boot."); > + > +static int usb_no_shutdown_wait = 0; > +TUNABLE_INT("hw.usb.no_shutdown_wait", &usb_no_shutdown_wait); > +SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RDTUN, &usb_no_shutdown_wait, 0, Does this knob (as well as the one before it) have to be CTLFLAG_RDTUN? I think that it should pretty safe to make it CTLFLAG_RW | CTLFLAG_TUN. > + "No USB device waiting at system shutdown."); > > static devclass_t usb_devclass; > > @@ -277,11 +282,20 @@ usb_shutdown(device_t dev) > return (0); > } > > + device_printf(bus->bdev, "Controller shutdown\n"); > + > USB_BUS_LOCK(bus); > usb_proc_msignal(&bus->explore_proc, > &bus->shutdown_msg[0], &bus->shutdown_msg[1]); > + if (usb_no_shutdown_wait == 0) { > + /* wait for shutdown callback to be executed */ > + usb_proc_mwait(&bus->explore_proc, > + &bus->shutdown_msg[0], &bus->shutdown_msg[1]); > + } > USB_BUS_UNLOCK(bus); > > + device_printf(bus->bdev, "Controller shutdown complete\n"); > + > return (0); > } > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 17:57:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D940B1065672; Mon, 19 Dec 2011 17:57:46 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 605828FC08; Mon, 19 Dec 2011 17:57:46 +0000 (UTC) Received: by ggnp1 with SMTP id p1so6161048ggn.13 for ; Mon, 19 Dec 2011 09:57:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=oFXugjhWS1jFzHzC4ffN1C0jQampjezhmqzm0EiWW1Q=; b=DHKYxT7pghcTx76hsuh6QD+v4tE6KN10zoR7O1agzGcX6KC3bH4mLAsyqz6FSjzA4R Kv0lN1L0Otm1blj6zD9DdxHjr02MD4UBLbOdne3f3KyKt8UO958xQwbnzAvbbCHH5sAj 7hHWUkICOZ4UpPOPNlZzv3eyFl4zWyejBW74E= MIME-Version: 1.0 Received: by 10.182.36.36 with SMTP id n4mr10832821obj.16.1324317465804; Mon, 19 Dec 2011 09:57:45 -0800 (PST) Received: by 10.182.62.227 with HTTP; Mon, 19 Dec 2011 09:57:45 -0800 (PST) In-Reply-To: <20111219094140.GB51886@zxy.spb.ru> References: <200903020228.n222SMD1061919@svn.freebsd.org> <20111219094140.GB51886@zxy.spb.ru> Date: Mon, 19 Dec 2011 09:57:45 -0800 Message-ID: From: Garrett Cooper To: Slawa Olhovchenkov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Sam Leffler , src-committers@freebsd.org Subject: Re: svn commit: r189263 - in head/usr.sbin/wpa: . hostapd hostapd_cli wpa_cli wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 17:57:46 -0000 On Mon, Dec 19, 2011 at 1:41 AM, Slawa Olhovchenkov wrote: > On Mon, Mar 02, 2009 at 02:28:22AM +0000, Sam Leffler wrote: > >> Author: sam >> Date: Mon Mar =A02 02:28:22 2009 >> New Revision: 189263 >> URL: http://svn.freebsd.org/changeset/base/189263 >> >> Log: >> =A0 update to 0.6.8 >> >> =A0 Reviewed by: =A0 =A0 =A0 =A0thompsa >> >> Modified: >> =A0 head/usr.sbin/wpa/Makefile.inc >> =A0 head/usr.sbin/wpa/hostapd/Makefile >> =A0 head/usr.sbin/wpa/hostapd/driver_freebsd.c >> =A0 head/usr.sbin/wpa/hostapd_cli/Makefile >> =A0 head/usr.sbin/wpa/wpa_cli/Makefile >> =A0 head/usr.sbin/wpa/wpa_supplicant/Makefile >> =A0 head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c >> =A0 head/usr.sbin/wpa/wpa_supplicant/driver_wired.c >> Modified: head/usr.sbin/wpa/hostapd/Makefile >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/usr.sbin/wpa/hostapd/Makefile =A0 =A0 =A0 =A0Mon Mar =A02 02:26= :53 2009 =A0 =A0 =A0 =A0(r189262) >> +++ head/usr.sbin/wpa/hostapd/Makefile =A0 =A0 =A0 =A0Mon Mar =A02 02:28= :22 2009 =A0 =A0 =A0 =A0(r189263) > >> =A0.if !empty(CFLAGS:M*-DEAP_SERVER) >> -SRCS+=3D =A0 =A0 =A0 eap.c eap_methods.c eap_identity.c >> +#SRCS+=3D =A0 =A0 =A0eap.c eap_methods.c eap_identity.c > > EAP_SERVER functionality removed. Why? EAP support is only removed if -DEAP_SERVER isn't in CFLAGS (which seems like a bad idea because it should really be a bsd.own.mk knob). Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 18:08:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AA6B106566C; Mon, 19 Dec 2011 18:08:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F068C8FC08; Mon, 19 Dec 2011 18:08:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJI8Vex069175; Mon, 19 Dec 2011 18:08:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJI8VCO069170; Mon, 19 Dec 2011 18:08:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112191808.pBJI8VCO069170@svn.freebsd.org> From: Dimitry Andric Date: Mon, 19 Dec 2011 18:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228714 - in head/usr.sbin/timed: timed timedc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 18:08:32 -0000 Author: dim Date: Mon Dec 19 18:08:31 2011 New Revision: 228714 URL: http://svn.freebsd.org/changeset/base/228714 Log: In usr.sbin/timed, fix several issues with printf formats: - Cast time_t's to long, and print them with %ld. - Print ptrdiff_t's with %td. - Print ssize_t's and size_t's with %zd and %zu. - Print int32_t's with %d. Also, replace some int variables with the more appropriate size_t. MFC after: 1 week Modified: head/usr.sbin/timed/timed/correct.c head/usr.sbin/timed/timed/networkdelta.c head/usr.sbin/timed/timed/readmsg.c head/usr.sbin/timed/timedc/cmds.c Modified: head/usr.sbin/timed/timed/correct.c ============================================================================== --- head/usr.sbin/timed/timed/correct.c Mon Dec 19 17:32:54 2011 (r228713) +++ head/usr.sbin/timed/timed/correct.c Mon Dec 19 18:08:31 2011 (r228714) @@ -163,7 +163,7 @@ adjclock(corr) } else { syslog(LOG_WARNING, "clock correction %ld sec too large to adjust", - adj.tv_sec); + (long)adj.tv_sec); (void) gettimeofday(&now, 0); timevaladd(&now, corr); if (settimeofday(&now, 0) < 0) Modified: head/usr.sbin/timed/timed/networkdelta.c ============================================================================== --- head/usr.sbin/timed/timed/networkdelta.c Mon Dec 19 17:32:54 2011 (r228713) +++ head/usr.sbin/timed/timed/networkdelta.c Mon Dec 19 18:08:31 2011 (r228714) @@ -137,7 +137,7 @@ networkdelta() } if (trace) - fprintf(fd, "median of %d values starting at %ld is ", + fprintf(fd, "median of %td values starting at %ld is ", xp-&x[0], med); return median(med, &eps, &x[0], xp, 1); } Modified: head/usr.sbin/timed/timed/readmsg.c ============================================================================== --- head/usr.sbin/timed/timed/readmsg.c Mon Dec 19 17:32:54 2011 (r228713) +++ head/usr.sbin/timed/timed/readmsg.c Mon Dec 19 18:08:31 2011 (r228714) @@ -182,7 +182,7 @@ again: if (trace) { fprintf(fd, "readmsg: wait %ld.%6ld at %s\n", - rwait.tv_sec, rwait.tv_usec, date()); + (long)rwait.tv_sec, rwait.tv_usec, date()); /* Notice a full disk, as we flush trace info. * It is better to flush periodically than at * every line because the tracing consists of bursts @@ -214,7 +214,7 @@ again: */ if (n < (ssize_t)(sizeof(struct tsp) - MAXHOSTNAMELEN + 32)) { syslog(LOG_NOTICE, - "short packet (%u/%u bytes) from %s", + "short packet (%zd/%zu bytes) from %s", n, sizeof(struct tsp) - MAXHOSTNAMELEN + 32, inet_ntoa(from.sin_addr)); continue; @@ -486,7 +486,7 @@ print(msg, addr) break; case TSP_ADJTIME: - fprintf(fd, "%s %d %-6u (%ld,%ld) %-15s %s\n", + fprintf(fd, "%s %d %-6u (%d,%d) %-15s %s\n", tsptype[msg->tsp_type], msg->tsp_vers, msg->tsp_seq, Modified: head/usr.sbin/timed/timedc/cmds.c ============================================================================== --- head/usr.sbin/timed/timedc/cmds.c Mon Dec 19 17:32:54 2011 (r228713) +++ head/usr.sbin/timed/timedc/cmds.c Mon Dec 19 18:08:31 2011 (r228714) @@ -267,7 +267,7 @@ msite(argc, argv) int argc; char *argv[]; { - int cc; + ssize_t cc; fd_set ready; struct sockaddr_in dest; int i, length; @@ -333,7 +333,7 @@ msite(argc, argv) */ if (cc < (sizeof(struct tsp) - MAXHOSTNAMELEN + 32)) { fprintf(stderr, - "short packet (%u/%u bytes) from %s\n", + "short packet (%zd/%zu bytes) from %s\n", cc, sizeof(struct tsp) - MAXHOSTNAMELEN + 32, inet_ntoa(from.sin_addr)); continue; @@ -428,7 +428,7 @@ tracing(argc, argv) { int onflag; int length; - int cc; + ssize_t cc; fd_set ready; struct sockaddr_in dest; struct sockaddr_in from; @@ -489,7 +489,7 @@ tracing(argc, argv) * least long enough to hold a 4.3BSD packet. */ if (cc < (sizeof(struct tsp) - MAXHOSTNAMELEN + 32)) { - fprintf(stderr, "short packet (%u/%u bytes) from %s\n", + fprintf(stderr, "short packet (%zd/%zu bytes) from %s\n", cc, sizeof(struct tsp) - MAXHOSTNAMELEN + 32, inet_ntoa(from.sin_addr)); return; From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 18:55:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17558106564A; Mon, 19 Dec 2011 18:55:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFEC48FC0C; Mon, 19 Dec 2011 18:55:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJItD6T070759; Mon, 19 Dec 2011 18:55:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJItDl0070755; Mon, 19 Dec 2011 18:55:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112191855.pBJItDl0070755@svn.freebsd.org> From: John Baldwin Date: Mon, 19 Dec 2011 18:55:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228715 - in head: share/man/man9 sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 18:55:14 -0000 Author: jhb Date: Mon Dec 19 18:55:13 2011 New Revision: 228715 URL: http://svn.freebsd.org/changeset/base/228715 Log: Add a TASK_INITIALIZER() macro that can be used to statically initialize a task structure. Reviewed by: gj MFC after: 2 weeks Modified: head/share/man/man9/Makefile head/share/man/man9/taskqueue.9 head/sys/sys/taskqueue.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Mon Dec 19 18:08:31 2011 (r228714) +++ head/share/man/man9/Makefile Mon Dec 19 18:55:13 2011 (r228715) @@ -1250,6 +1250,7 @@ MLINKS+=sysctl_ctx_init.9 sysctl_ctx_ent sysctl_ctx_init.9 sysctl_ctx_free.9 MLINKS+=SYSINIT.9 SYSUNINIT.9 MLINKS+=taskqueue.9 TASK_INIT.9 \ + taskqueue.9 TASK_INITIALIZER.9 \ taskqueue.9 taskqueue_cancel.9 \ taskqueue.9 taskqueue_create.9 \ taskqueue.9 taskqueue_create_fast.9 \ Modified: head/share/man/man9/taskqueue.9 ============================================================================== --- head/share/man/man9/taskqueue.9 Mon Dec 19 18:08:31 2011 (r228714) +++ head/share/man/man9/taskqueue.9 Mon Dec 19 18:55:13 2011 (r228715) @@ -80,6 +80,7 @@ struct timeout_task; .Ft void .Fn taskqueue_run "struct taskqueue *queue" .Fn TASK_INIT "struct task *task" "int priority" "task_fn_t func" "void *context" +.Fn TASK_INITIALIZER "int priority" "task_fn_t func" "void *context" .Fn TASKQUEUE_DECLARE "name" .Fn TASKQUEUE_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init" .Fn TASKQUEUE_FAST_DEFINE "name" "taskqueue_enqueue_fn enqueue" "void *context" "init" @@ -243,9 +244,14 @@ A convenience macro, is provided to initialise a .Va task structure. +The +.Fn TASK_INITIALIZER +macro generates an initializer for a task structure. A macro .Fn TIMEOUT_TASK_INIT "queue" "timeout_task" "priority" "func" "context" -initializes the timeout_task structure. +initializes the +.Va timeout_task +structure. The values of .Va priority , .Va func , Modified: head/sys/sys/taskqueue.h ============================================================================== --- head/sys/sys/taskqueue.h Mon Dec 19 18:08:31 2011 (r228714) +++ head/sys/sys/taskqueue.h Mon Dec 19 18:55:13 2011 (r228715) @@ -77,6 +77,12 @@ void taskqueue_block(struct taskqueue *q void taskqueue_unblock(struct taskqueue *queue); int taskqueue_member(struct taskqueue *queue, struct thread *td); +#define TASK_INITIALIZER(priority, func, context) \ + { .ta_pending = 0, \ + .ta_priority = (priority), \ + .ta_func = (func), \ + .ta_context = (context) } + /* * Functions for dedicated thread taskqueues */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 19:00:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D89C1106564A; Mon, 19 Dec 2011 19:00:34 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C760C8FC14; Mon, 19 Dec 2011 19:00:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJJ0Yij070964; Mon, 19 Dec 2011 19:00:34 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJJ0YJB070962; Mon, 19 Dec 2011 19:00:34 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112191900.pBJJ0YJB070962@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Dec 2011 19:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228716 - head/sys/dev/fxp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 19:00:34 -0000 Author: yongari Date: Mon Dec 19 19:00:34 2011 New Revision: 228716 URL: http://svn.freebsd.org/changeset/base/228716 Log: TCP header size is represented by number of 32bits words. Fix the TCP header size calculation such that makes TSO engine cache all header(ethernet/IP/TCP) bytes to its internal buffer. While here, remove extra pull up for TCP payload. Unlike some em(4) controllers, fxp(4) does not require such work around for TSO. The two limitations are ethernet/IP/TCP header size should be less than or equal to the size of controller's internal buffer(80 bytes) and these header information should be found in the first fragment of a TSO frame. Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Mon Dec 19 18:55:13 2011 (r228715) +++ head/sys/dev/fxp/if_fxp.c Mon Dec 19 19:00:34 2011 (r228716) @@ -1454,7 +1454,7 @@ fxp_encap(struct fxp_softc *sc, struct m return (ENOBUFS); } tcp = (struct tcphdr *)(mtod(m, char *) + poff); - m = m_pullup(m, poff + sizeof(struct tcphdr) + tcp->th_off); + m = m_pullup(m, poff + (tcp->th_off << 2)); if (m == NULL) { *m_head = NULL; return (ENOBUFS); From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 19:02:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12BE0106564A; Mon, 19 Dec 2011 19:02:37 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 017C18FC1B; Mon, 19 Dec 2011 19:02:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJJ2adW071071; Mon, 19 Dec 2011 19:02:36 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJJ2a8R071069; Mon, 19 Dec 2011 19:02:36 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112191902.pBJJ2a8R071069@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Dec 2011 19:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228717 - head/sys/dev/msk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 19:02:37 -0000 Author: yongari Date: Mon Dec 19 19:02:36 2011 New Revision: 228717 URL: http://svn.freebsd.org/changeset/base/228717 Log: Increase wait time for OP_TCPSTART command processing. It seems 100us is not enough to ensure prefetch unit work. Modified: head/sys/dev/msk/if_msk.c Modified: head/sys/dev/msk/if_msk.c ============================================================================== --- head/sys/dev/msk/if_msk.c Mon Dec 19 19:00:34 2011 (r228716) +++ head/sys/dev/msk/if_msk.c Mon Dec 19 19:02:36 2011 (r228717) @@ -648,8 +648,8 @@ msk_rx_fill(struct msk_if_softc *sc_if, if ((sc_if->msk_flags & MSK_FLAG_DESCV2) == 0 && (sc_if->msk_ifp->if_capenable & IFCAP_RXCSUM) != 0) { /* Wait until controller executes OP_TCPSTART command. */ - for (i = 10; i > 0; i--) { - DELAY(10); + for (i = 100; i > 0; i--) { + DELAY(100); idx = CSR_READ_2(sc_if->msk_softc, Y2_PREF_Q_ADDR(sc_if->msk_rxq, PREF_UNIT_GET_IDX_REG)); From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 19:14:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07E93106564A; Mon, 19 Dec 2011 19:14:07 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id AEC478FC14; Mon, 19 Dec 2011 19:14:06 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Rciez-000JVz-7t; Mon, 19 Dec 2011 23:14:05 +0400 Date: Mon, 19 Dec 2011 23:14:05 +0400 From: Slawa Olhovchenkov To: Garrett Cooper Message-ID: <20111219191405.GO3314@zxy.spb.ru> References: <200903020228.n222SMD1061919@svn.freebsd.org> <20111219094140.GB51886@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Sam Leffler , src-committers@freebsd.org Subject: Re: svn commit: r189263 - in head/usr.sbin/wpa: . hostapd hostapd_cli wpa_cli wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 19:14:07 -0000 On Mon, Dec 19, 2011 at 09:57:45AM -0800, Garrett Cooper wrote: > On Mon, Dec 19, 2011 at 1:41 AM, Slawa Olhovchenkov wrote: > > On Mon, Mar 02, 2009 at 02:28:22AM +0000, Sam Leffler wrote: > > > >> Author: sam > >> Date: Mon Mar š2 02:28:22 2009 > >> New Revision: 189263 > >> URL: http://svn.freebsd.org/changeset/base/189263 > >> > >> Log: > >> š update to 0.6.8 > >> > >> š Reviewed by: š š š šthompsa > >> > >> Modified: > >> š head/usr.sbin/wpa/Makefile.inc > >> š head/usr.sbin/wpa/hostapd/Makefile > >> š head/usr.sbin/wpa/hostapd/driver_freebsd.c > >> š head/usr.sbin/wpa/hostapd_cli/Makefile > >> š head/usr.sbin/wpa/wpa_cli/Makefile > >> š head/usr.sbin/wpa/wpa_supplicant/Makefile > >> š head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c > >> š head/usr.sbin/wpa/wpa_supplicant/driver_wired.c > >> Modified: head/usr.sbin/wpa/hostapd/Makefile > >> ============================================================================== > >> --- head/usr.sbin/wpa/hostapd/Makefile š š š šMon Mar š2 02:26:53 2009 š š š š(r189262) > >> +++ head/usr.sbin/wpa/hostapd/Makefile š š š šMon Mar š2 02:28:22 2009 š š š š(r189263) > > > >> š.if !empty(CFLAGS:M*-DEAP_SERVER) > >> -SRCS+= š š š eap.c eap_methods.c eap_identity.c > >> +#SRCS+= š š šeap.c eap_methods.c eap_identity.c > > > > EAP_SERVER functionality removed. Why? > > EAP support is only removed if -DEAP_SERVER isn't in CFLAGS (which > seems like a bad idea because it should really be a bsd.own.mk knob). Sorry, I don't understand. Some time ago I have in src.conf HOSTAPD_CFLAGS=-DEAP_TLS -DEAP_SERVER and got hostapd witch support EAP metods. Now this is don't work: ===> hostapd (all) make: don't know how to make eap_tls.c. Stop How I can build hostapd witch support EAP metods? From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 19:19:21 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE1C0106566B; Mon, 19 Dec 2011 19:19:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 27C7F8FC15; Mon, 19 Dec 2011 19:19:19 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id VAA12381; Mon, 19 Dec 2011 21:19:18 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Rcik2-000GGM-9q; Mon, 19 Dec 2011 21:19:18 +0200 Message-ID: <4EEF8E34.7010100@FreeBSD.org> Date: Mon, 19 Dec 2011 21:19:16 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111206 Thunderbird/8.0 MIME-Version: 1.0 To: Attilio Rao References: <201104281602.p3SG265H030096@svn.freebsd.org> In-Reply-To: <201104281602.p3SG265H030096@svn.freebsd.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r221173 - in head/sys: amd64/amd64 arm/arm i386/i386 ia64/ia64 kern mips/mips powerpc/powerpc x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 19:19:21 -0000 on 28/04/2011 19:02 Attilio Rao said the following: > Author: attilio > Date: Thu Apr 28 16:02:05 2011 > New Revision: 221173 > URL: http://svn.freebsd.org/changeset/base/221173 > > Log: > Add the watchdogs patting during the (shutdown time) disk syncing and > disk dumping. > With the option SW_WATCHDOG on, these operations are doomed to let > watchdog fire, fi they take too long. > > I implemented the stubs this way because I really want wdog_kern_* > KPI to not be dependant by SW_WATCHDOG being on (and really, the option > only enables watchdog activation in hardclock) and also avoid to > call them when not necessary (avoiding not-volountary watchdog > activations). > > Sponsored by: Sandvine Incorporated > Discussed with: emaste, des > MFC after: 2 weeks Attilio, I wonder what was the reason to put all this patting under SW_WATCHDOG. I think that the code that you added can also be useful without SW_WATCHDOG with hardware watchdog drivers. SW_WATCHDOG is good for debugging, but is not as reliable as hardware watchdogs. Thank you. > Modified: > head/sys/amd64/amd64/minidump_machdep.c > head/sys/arm/arm/dump_machdep.c > head/sys/arm/arm/minidump_machdep.c > head/sys/i386/i386/minidump_machdep.c > head/sys/ia64/ia64/dump_machdep.c > head/sys/kern/kern_shutdown.c > head/sys/kern/vfs_subr.c > head/sys/mips/mips/dump_machdep.c > head/sys/powerpc/powerpc/dump_machdep.c > head/sys/x86/x86/dump_machdep.c > > Modified: head/sys/amd64/amd64/minidump_machdep.c > ============================================================================== > --- head/sys/amd64/amd64/minidump_machdep.c Thu Apr 28 14:55:41 2011 (r221172) > +++ head/sys/amd64/amd64/minidump_machdep.c Thu Apr 28 16:02:05 2011 (r221173) > @@ -27,6 +27,8 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_watchdog.h" > + > #include > #include > #include > @@ -34,6 +36,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#ifdef SW_WATCHDOG > +#include > +#endif > #include > #include > #include > @@ -167,6 +172,9 @@ blk_write(struct dumperinfo *di, char *p > report_progress(progress, dumpsize); > counter &= (1<<24) - 1; > } > +#ifdef SW_WATCHDOG > + wdog_kern_pat(WD_LASTVAL); > +#endif > if (ptr) { > error = dump_write(di, ptr, 0, dumplo, len); > if (error) > > Modified: head/sys/arm/arm/dump_machdep.c > ============================================================================== > --- head/sys/arm/arm/dump_machdep.c Thu Apr 28 14:55:41 2011 (r221172) > +++ head/sys/arm/arm/dump_machdep.c Thu Apr 28 16:02:05 2011 (r221173) > @@ -27,6 +27,8 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_watchdog.h" > + > #include > #include > #include > @@ -35,6 +37,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#ifdef SW_WATCHDOG > +#include > +#endif > #include > #include > #include > @@ -189,6 +194,9 @@ cb_dumpdata(struct md_pa *mdp, int seqnr > cpu_tlb_flushID_SE(0); > cpu_cpwait(); > } > +#ifdef SW_WATCHDOG > + wdog_kern_pat(WD_LASTVAL); > +#endif > error = dump_write(di, > (void *)(pa - (pa & L1_ADDR_BITS)),0, dumplo, sz); > if (error) > > Modified: head/sys/arm/arm/minidump_machdep.c > ============================================================================== > --- head/sys/arm/arm/minidump_machdep.c Thu Apr 28 14:55:41 2011 (r221172) > +++ head/sys/arm/arm/minidump_machdep.c Thu Apr 28 16:02:05 2011 (r221173) > @@ -29,6 +29,8 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_watchdog.h" > + > #include > #include > #include > @@ -36,6 +38,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#ifdef SW_WATCHDOG > +#include > +#endif > #include > #include > #include > @@ -138,6 +143,9 @@ blk_write(struct dumperinfo *di, char *p > counter &= (1<<22) - 1; > } > > +#ifdef SW_WATCHDOG > + wdog_kern_pat(WD_LASTVAL); > +#endif > if (ptr) { > error = dump_write(di, ptr, 0, dumplo, len); > if (error) > > Modified: head/sys/i386/i386/minidump_machdep.c > ============================================================================== > --- head/sys/i386/i386/minidump_machdep.c Thu Apr 28 14:55:41 2011 (r221172) > +++ head/sys/i386/i386/minidump_machdep.c Thu Apr 28 16:02:05 2011 (r221173) > @@ -27,6 +27,8 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_watchdog.h" > + > #include > #include > #include > @@ -34,6 +36,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#ifdef SW_WATCHDOG > +#include > +#endif > #include > #include > #include > @@ -138,6 +143,9 @@ blk_write(struct dumperinfo *di, char *p > printf(" %lld", PG2MB(progress >> PAGE_SHIFT)); > counter &= (1<<24) - 1; > } > +#ifdef SW_WATCHDOG > + wdog_kern_pat(WD_LASTVAL); > +#endif > if (ptr) { > error = dump_write(di, ptr, 0, dumplo, len); > if (error) > > Modified: head/sys/ia64/ia64/dump_machdep.c > ============================================================================== > --- head/sys/ia64/ia64/dump_machdep.c Thu Apr 28 14:55:41 2011 (r221172) > +++ head/sys/ia64/ia64/dump_machdep.c Thu Apr 28 16:02:05 2011 (r221173) > @@ -27,12 +27,17 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_watchdog.h" > + > #include > #include > #include > #include > #include > #include > +#ifdef SW_WATCHDOG > +#include > +#endif > #include > #include > #include > @@ -125,6 +130,9 @@ cb_dumpdata(struct efi_md *mdp, int seqn > printf("%c\b", "|/-\\"[twiddle++ & 3]); > counter &= (1<<24) - 1; > } > +#ifdef SW_WATCHDOG > + wdog_kern_pat(WD_LASTVAL); > +#endif > error = dump_write(di, (void*)pa, 0, dumplo, sz); > if (error) > break; > > Modified: head/sys/kern/kern_shutdown.c > ============================================================================== > --- head/sys/kern/kern_shutdown.c Thu Apr 28 14:55:41 2011 (r221172) > +++ head/sys/kern/kern_shutdown.c Thu Apr 28 16:02:05 2011 (r221173) > @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); > #include "opt_panic.h" > #include "opt_show_busybufs.h" > #include "opt_sched.h" > +#include "opt_watchdog.h" > > #include > #include > @@ -65,6 +66,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#ifdef SW_WATCHDOG > +#include > +#endif > > #include > > @@ -310,6 +314,9 @@ kern_reboot(int howto) > > waittime = 0; > > +#ifdef SW_WATCHDOG > + wdog_kern_pat(WD_LASTVAL); > +#endif > sync(curthread, NULL); > > /* > @@ -335,6 +342,9 @@ kern_reboot(int howto) > if (nbusy < pbusy) > iter = 0; > pbusy = nbusy; > +#ifdef SW_WATCHDOG > + wdog_kern_pat(WD_LASTVAL); > +#endif > sync(curthread, NULL); > > #ifdef PREEMPTION > > Modified: head/sys/kern/vfs_subr.c > ============================================================================== > --- head/sys/kern/vfs_subr.c Thu Apr 28 14:55:41 2011 (r221172) > +++ head/sys/kern/vfs_subr.c Thu Apr 28 16:02:05 2011 (r221173) > @@ -42,6 +42,7 @@ > __FBSDID("$FreeBSD$"); > > #include "opt_ddb.h" > +#include "opt_watchdog.h" > > #include > #include > @@ -72,6 +73,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#ifdef SW_WATCHDOG > +#include > +#endif > > #include > > @@ -1839,6 +1843,10 @@ sched_sync(void) > LIST_INSERT_HEAD(next, bo, bo_synclist); > continue; > } > +#ifdef SW_WATCHDOG > + if (first_printf == 0) > + wdog_kern_pat(WD_LASTVAL); > +#endif > } > if (!LIST_EMPTY(gslp)) { > mtx_unlock(&sync_mtx); > > Modified: head/sys/mips/mips/dump_machdep.c > ============================================================================== > --- head/sys/mips/mips/dump_machdep.c Thu Apr 28 14:55:41 2011 (r221172) > +++ head/sys/mips/mips/dump_machdep.c Thu Apr 28 16:02:05 2011 (r221173) > @@ -27,6 +27,8 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_watchdog.h" > + > #include > #include > #include > @@ -35,6 +37,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#ifdef SW_WATCHDOG > +#include > +#endif > #include > #include > #include > @@ -182,6 +187,9 @@ cb_dumpdata(struct md_pa *mdp, int seqnr > counter &= (1<<24) - 1; > } > > +#ifdef SW_WATCHDOG > + wdog_kern_path(WD_LASTVAL); > +#endif > error = dump_write(di, (void *)(intptr_t)(pa),0, dumplo, sz); /* XXX fix PA */ > if (error) > break; > > Modified: head/sys/powerpc/powerpc/dump_machdep.c > ============================================================================== > --- head/sys/powerpc/powerpc/dump_machdep.c Thu Apr 28 14:55:41 2011 (r221172) > +++ head/sys/powerpc/powerpc/dump_machdep.c Thu Apr 28 16:02:05 2011 (r221173) > @@ -27,6 +27,8 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_watchdog.h" > + > #include > #include > #include > @@ -34,6 +36,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#ifdef SW_WATCHDOG > +#include > +#endif > #include > #include > #include > @@ -129,6 +134,9 @@ cb_dumpdata(struct pmap_md *md, int seqn > printf("%c\b", "|/-\\"[twiddle++ & 3]); > counter &= (1<<24) - 1; > } > +#ifdef SW_WATCHDOG > + wdog_kern_pat(WD_LASTVAL); > +#endif > error = di->dumper(di->priv, (void*)va, 0, dumplo, sz); > pmap_dumpsys_unmap(md, ofs, va); > if (error) > > Modified: head/sys/x86/x86/dump_machdep.c > ============================================================================== > --- head/sys/x86/x86/dump_machdep.c Thu Apr 28 14:55:41 2011 (r221172) > +++ head/sys/x86/x86/dump_machdep.c Thu Apr 28 16:02:05 2011 (r221173) > @@ -27,6 +27,8 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_watchdog.h" > + > #include > #include > #include > @@ -34,6 +36,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#ifdef SW_WATCHDOG > +#include > +#endif > #include > #include > #include > @@ -193,6 +198,9 @@ cb_dumpdata(struct md_pa *mdp, int seqnr > a = pa + i * PAGE_SIZE; > va = pmap_kenter_temporary(trunc_page(a), i); > } > +#ifdef SW_WATCHDOG > + wdog_kern_pat(WD_LASTVAL); > +#endif > error = dump_write(di, va, 0, dumplo, sz); > if (error) > break; -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 19:27:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56AC0106566C; Mon, 19 Dec 2011 19:27:48 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id CD3B58FC14; Mon, 19 Dec 2011 19:27:47 +0000 (UTC) Received: by yenl9 with SMTP id l9so4365471yen.13 for ; Mon, 19 Dec 2011 11:27:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=HniJ5ucDYGdxeCnkhc4C23Cn2fKJGegJ0Hs7i2yEndA=; b=i5fbcJ2QEPQyysk3DP6V7P8H1mJ5I9b9M9Ba/PBjo8hnLMxEYpPnQlhbQ8kVZjlMGY 4oFRgGDXR7c2Mja2/hW5WMMvEeCSRQNbgwBWShu9N0RUbDkh9y3pxUwuB+pPeBEZIkJw CwTQWKKFaa+Lic6Yqp3+8i9hXYMq6CEyYyxfg= Received: by 10.236.78.6 with SMTP id f6mr28263906yhe.109.1324322867179; Mon, 19 Dec 2011 11:27:47 -0800 (PST) Received: from kruse-111.3.ixsystems.com (drawbridge.ixsystems.com. [206.40.55.65]) by mx.google.com with ESMTPS id 5sm49350673anz.14.2011.12.19.11.27.45 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Dec 2011 11:27:46 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Garrett Cooper In-Reply-To: <20111219191405.GO3314@zxy.spb.ru> Date: Mon, 19 Dec 2011 11:27:43 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <200903020228.n222SMD1061919@svn.freebsd.org> <20111219094140.GB51886@zxy.spb.ru> <20111219191405.GO3314@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Sam Leffler , src-committers@freebsd.org Subject: Re: svn commit: r189263 - in head/usr.sbin/wpa: . hostapd hostapd_cli wpa_cli wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 19:27:48 -0000 On Dec 19, 2011, at 11:14 AM, Slawa Olhovchenkov wrote: > On Mon, Dec 19, 2011 at 09:57:45AM -0800, Garrett Cooper wrote: >=20 >> On Mon, Dec 19, 2011 at 1:41 AM, Slawa Olhovchenkov = wrote: >>> On Mon, Mar 02, 2009 at 02:28:22AM +0000, Sam Leffler wrote: >>>=20 >>>> Author: sam >>>> Date: Mon Mar 2 02:28:22 2009 >>>> New Revision: 189263 >>>> URL: http://svn.freebsd.org/changeset/base/189263 >>>>=20 >>>> Log: >>>> update to 0.6.8 >>>>=20 >>>> Reviewed by: thompsa >>>>=20 >>>> Modified: >>>> head/usr.sbin/wpa/Makefile.inc >>>> head/usr.sbin/wpa/hostapd/Makefile >>>> head/usr.sbin/wpa/hostapd/driver_freebsd.c >>>> head/usr.sbin/wpa/hostapd_cli/Makefile >>>> head/usr.sbin/wpa/wpa_cli/Makefile >>>> head/usr.sbin/wpa/wpa_supplicant/Makefile >>>> head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c >>>> head/usr.sbin/wpa/wpa_supplicant/driver_wired.c >>>> Modified: head/usr.sbin/wpa/hostapd/Makefile >>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>>> --- head/usr.sbin/wpa/hostapd/Makefile Mon Mar 2 02:26:53 = 2009 (r189262) >>>> +++ head/usr.sbin/wpa/hostapd/Makefile Mon Mar 2 02:28:22 = 2009 (r189263) >>>=20 >>>> .if !empty(CFLAGS:M*-DEAP_SERVER) >>>> -SRCS+=3D eap.c eap_methods.c eap_identity.c >>>> +#SRCS+=3D eap.c eap_methods.c eap_identity.c >>>=20 >>> EAP_SERVER functionality removed. Why? >>=20 >> EAP support is only removed if -DEAP_SERVER isn't in CFLAGS (which >> seems like a bad idea because it should really be a bsd.own.mk knob). >=20 > Sorry, I don't understand. > Some time ago I have in src.conf HOSTAPD_CFLAGS=3D-DEAP_TLS = -DEAP_SERVER > and got hostapd witch support EAP metods. Now this is don't work: >=20 > =3D=3D=3D> hostapd (all) > make: don't know how to make eap_tls.c. Stop >=20 > How I can build hostapd witch support EAP metods? Missed the commenting out part of the commit. Yeah, that might = not work. Thanks, -Garrett= From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 19:45:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EAF1106566B; Mon, 19 Dec 2011 19:45:12 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id E11A08FC0C; Mon, 19 Dec 2011 19:45:11 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Rcj90-000KHp-KT; Mon, 19 Dec 2011 23:45:06 +0400 Date: Mon, 19 Dec 2011 23:45:06 +0400 From: Slawa Olhovchenkov To: Garrett Cooper Message-ID: <20111219194506.GP3314@zxy.spb.ru> References: <200903020228.n222SMD1061919@svn.freebsd.org> <20111219094140.GB51886@zxy.spb.ru> <20111219191405.GO3314@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Sam Leffler , src-committers@freebsd.org Subject: Re: svn commit: r189263 - in head/usr.sbin/wpa: . hostapd hostapd_cli wpa_cli wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 19:45:12 -0000 On Mon, Dec 19, 2011 at 11:27:43AM -0800, Garrett Cooper wrote: > On Dec 19, 2011, at 11:14 AM, Slawa Olhovchenkov wrote: > > > On Mon, Dec 19, 2011 at 09:57:45AM -0800, Garrett Cooper wrote: > > > >> On Mon, Dec 19, 2011 at 1:41 AM, Slawa Olhovchenkov wrote: > >>> On Mon, Mar 02, 2009 at 02:28:22AM +0000, Sam Leffler wrote: > >>> > >>>> Author: sam > >>>> Date: Mon Mar 2 02:28:22 2009 > >>>> New Revision: 189263 > >>>> URL: http://svn.freebsd.org/changeset/base/189263 > >>>> > >>>> Log: > >>>> update to 0.6.8 > >>>> > >>>> Reviewed by: thompsa > >>>> > >>>> Modified: > >>>> head/usr.sbin/wpa/Makefile.inc > >>>> head/usr.sbin/wpa/hostapd/Makefile > >>>> head/usr.sbin/wpa/hostapd/driver_freebsd.c > >>>> head/usr.sbin/wpa/hostapd_cli/Makefile > >>>> head/usr.sbin/wpa/wpa_cli/Makefile > >>>> head/usr.sbin/wpa/wpa_supplicant/Makefile > >>>> head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c > >>>> head/usr.sbin/wpa/wpa_supplicant/driver_wired.c > >>>> Modified: head/usr.sbin/wpa/hostapd/Makefile > >>>> ============================================================================== > >>>> --- head/usr.sbin/wpa/hostapd/Makefile Mon Mar 2 02:26:53 2009 (r189262) > >>>> +++ head/usr.sbin/wpa/hostapd/Makefile Mon Mar 2 02:28:22 2009 (r189263) > >>> > >>>> .if !empty(CFLAGS:M*-DEAP_SERVER) > >>>> -SRCS+= eap.c eap_methods.c eap_identity.c > >>>> +#SRCS+= eap.c eap_methods.c eap_identity.c > >>> > >>> EAP_SERVER functionality removed. Why? > >> > >> EAP support is only removed if -DEAP_SERVER isn't in CFLAGS (which > >> seems like a bad idea because it should really be a bsd.own.mk knob). > > > > Sorry, I don't understand. > > Some time ago I have in src.conf HOSTAPD_CFLAGS=-DEAP_TLS -DEAP_SERVER > > and got hostapd witch support EAP metods. Now this is don't work: > > > > ===> hostapd (all) > > make: don't know how to make eap_tls.c. Stop > > > > How I can build hostapd witch support EAP metods? > > Missed the commenting out part of the commit. Yeah, that might not work. Some time ago exist two eap_tls.c: /usr/src/contrib/wpa/src/eap_peer/eap_tls.c /usr/src/contrib/wpa/src/eap_server/eap_tls.c Now exist only /usr/src/contrib/wpa/src/eap_peer/eap_tls.c. But /usr/src/contrib/wpa/src/eap_peer/ don't included in SRC path search list and eap_tls.c from eap_peer have extra depends. From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 19:58:50 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C5B11065672; Mon, 19 Dec 2011 19:58:50 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id B73528FC16; Mon, 19 Dec 2011 19:58:49 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id pBJJjGdn051111 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 19 Dec 2011 12:45:18 -0700 (MST) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 From: Warner Losh In-Reply-To: <4ED545A9.8000304@FreeBSD.org> Date: Mon, 19 Dec 2011 12:45:10 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <590FF4B6-8185-4ED3-B72A-240803F7ADF6@bsdimp.com> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> To: Doug Barton X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 19 Dec 2011 12:45:19 -0700 (MST) Cc: svn-src-head@FreeBSD.org, Max Khon , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, =?iso-8859-1?Q?G=E1bor_K=F6vesd=E1n?= Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 19:58:50 -0000 [[ I know it is a bit late here ]] On Nov 29, 2011, at 1:50 PM, Doug Barton wrote: > On 11/29/2011 12:47, G=E1bor K=F6vesd=E1n wrote: >> On 2011.11.29. 20:46, Max Khon wrote: >>> Log: >>> Turn off profiled libs build by default. >>> Can be enabled back using WITH_PROFILE=3Dyes in /etc/src.conf >> I think it was useful. Profiling is useful for developing any piece = of >> software that builds on libc or other common libs, even for software >> that is not directly related to FreeBSD. I think it should be = reverted. >=20 > Since we ask users to read -current, it would be useful if our > developers did too. :) But that's not the place to discuss this... It should have gone through = arch@ not current@ > As Max pointed out in his message about this, the profiled libs are = only > really useful to a tiny percentage of developers. If you need them, > twist the knob. Building them should be off by default. I can't profile my programs effectively without them. Am I now forced = to build profile libs with a full FreeBSD to get them? Seems like a big = step backwards. Warner From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 19:58:54 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43FB7106566B; Mon, 19 Dec 2011 19:58:54 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id E897F8FC1E; Mon, 19 Dec 2011 19:58:53 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id pBJJr2Dj051222 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 19 Dec 2011 12:53:03 -0700 (MST) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=iso-8859-1 From: Warner Losh In-Reply-To: Date: Mon, 19 Dec 2011 12:52:56 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> To: Garrett Cooper X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Mon, 19 Dec 2011 12:53:04 -0700 (MST) Cc: Doug Barton , Max Khon , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, =?iso-8859-1?Q?G=E1bor_K=F6vesd=E1n?= , svn-src-head@FreeBSD.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 19:58:54 -0000 On Nov 29, 2011, at 1:53 PM, Garrett Cooper wrote: > 2011/11/29 Doug Barton : >> On 11/29/2011 12:47, G=E1bor K=F6vesd=E1n wrote: >>> On 2011.11.29. 20:46, Max Khon wrote: >>>> Log: >>>> Turn off profiled libs build by default. >>>> Can be enabled back using WITH_PROFILE=3Dyes in /etc/src.conf >>> I think it was useful. Profiling is useful for developing any piece = of >>> software that builds on libc or other common libs, even for software >>> that is not directly related to FreeBSD. I think it should be = reverted. >>=20 >> Since we ask users to read -current, it would be useful if our >> developers did too. :) >>=20 >> As Max pointed out in his message about this, the profiled libs are = only >> really useful to a tiny percentage of developers. If you need them, >> twist the knob. Building them should be off by default. >=20 > +1. The needs of the many outweigh the needs of the few. As suggested > elsewhere, I think it would also be a good idea to enable it in > tinderbox builds. -1. The needs of the many? Please. Let's break a useful feature = because some people don't understand it and are impatient? That's lame. Enabling it only on tinderbox builds will ensure more accidental = breakage. Warner From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 20:01:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44F26106566C; Mon, 19 Dec 2011 20:01:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19C358FC0C; Mon, 19 Dec 2011 20:01:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJK1LST072986; Mon, 19 Dec 2011 20:01:21 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJK1LaK072984; Mon, 19 Dec 2011 20:01:21 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201112192001.pBJK1LaK072984@svn.freebsd.org> From: Andriy Gapon Date: Mon, 19 Dec 2011 20:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228718 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 20:01:22 -0000 Author: avg Date: Mon Dec 19 20:01:21 2011 New Revision: 228718 URL: http://svn.freebsd.org/changeset/base/228718 Log: ule: ensure that batch timeshare threads are scheduled fairly With the previous code, if the range of priorities for timeshare batch threads was greater than RQ_NQS, then the threads with low priorities in the part of the range above RQ_NQS would be scheduled to the run-queues as if they had high priorities at the beginning of the range. In other words, threads with a nice level of +N could be scheduled as if they had a nice level of -M. Reported by: George Mitchell Reviewed by: jhb Tested by: George Mitchell (earlier version) MFC after: 1 week Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Mon Dec 19 19:02:36 2011 (r228717) +++ head/sys/kern/sched_ule.c Mon Dec 19 20:01:21 2011 (r228718) @@ -125,6 +125,7 @@ static struct td_sched td_sched0; */ #define PRI_TIMESHARE_RANGE (PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE + 1) #define PRI_INTERACT_RANGE ((PRI_TIMESHARE_RANGE - SCHED_PRI_NRESV) / 2) +#define PRI_BATCH_RANGE (PRI_TIMESHARE_RANGE - PRI_INTERACT_RANGE) #define PRI_MIN_INTERACT PRI_MIN_TIMESHARE #define PRI_MAX_INTERACT (PRI_MIN_TIMESHARE + PRI_INTERACT_RANGE - 1) @@ -416,7 +417,6 @@ sched_shouldpreempt(int pri, int cpri, i return (0); } -#define TS_RQ_PPQ (((PRI_MAX_BATCH - PRI_MIN_BATCH) + 1) / RQ_NQS) /* * Add a thread to the actual run-queue. Keeps transferable counts up to * date with what is actually on the run-queue. Selects the correct @@ -449,7 +449,7 @@ tdq_runq_add(struct tdq *tdq, struct thr * realtime. Use the whole queue to represent these values. */ if ((flags & (SRQ_BORROWING|SRQ_PREEMPTED)) == 0) { - pri = (pri - PRI_MIN_BATCH) / TS_RQ_PPQ; + pri = RQ_NQS * (pri - PRI_MIN_BATCH) / PRI_BATCH_RANGE; pri = (pri + tdq->tdq_idx) % RQ_NQS; /* * This effectively shortens the queue by one so we From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 20:09:57 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AE451065673; Mon, 19 Dec 2011 20:09:57 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theravensnest.org [109.169.23.128]) by mx1.freebsd.org (Postfix) with ESMTP id E9DDD8FC12; Mon, 19 Dec 2011 20:09:56 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cwma5-0-0-cust875.7-3.cable.virginmedia.com [86.11.39.108]) (authenticated bits=0) by theravensnest.org (8.14.4/8.14.4) with ESMTP id pBJK9bgs015083 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Mon, 19 Dec 2011 20:09:53 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-1 From: David Chisnall In-Reply-To: <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> Date: Mon, 19 Dec 2011 20:09:32 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.1251.1) Cc: Doug Barton , Garrett Cooper , Max Khon , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, =?iso-8859-1?Q?G=E1bor_K=F6vesd=E1n?= , svn-src-head@FreeBSD.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 20:09:57 -0000 On 19 Dec 2011, at 19:52, Warner Losh wrote: > -1. The needs of the many? Please. Let's break a useful feature = because some people don't understand it and are impatient? That's lame. How useful is gprof-based profiling these days? Now that we have the = DTrace pid provider, don't we have access to much more fine-grained = profiling information without the need for shipping two versions of = every library? David= From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 20:29:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AA031065675; Mon, 19 Dec 2011 20:29:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 698E98FC0A; Mon, 19 Dec 2011 20:29:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJKTpQq073859; Mon, 19 Dec 2011 20:29:51 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJKTpDc073856; Mon, 19 Dec 2011 20:29:51 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112192029.pBJKTpDc073856@svn.freebsd.org> From: Dimitry Andric Date: Mon, 19 Dec 2011 20:29:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228719 - head/usr.sbin/timed/timed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 20:29:51 -0000 Author: dim Date: Mon Dec 19 20:29:50 2011 New Revision: 228719 URL: http://svn.freebsd.org/changeset/base/228719 Log: Some people pointed out long is 32-bit on some arches, while time_t is 64-bit, so better cast time_t to intmax_t, and use the appropriate printf format strings. MFC after: 1 week Modified: head/usr.sbin/timed/timed/correct.c head/usr.sbin/timed/timed/readmsg.c Modified: head/usr.sbin/timed/timed/correct.c ============================================================================== --- head/usr.sbin/timed/timed/correct.c Mon Dec 19 20:01:21 2011 (r228718) +++ head/usr.sbin/timed/timed/correct.c Mon Dec 19 20:29:50 2011 (r228719) @@ -162,8 +162,8 @@ adjclock(corr) } } else { syslog(LOG_WARNING, - "clock correction %ld sec too large to adjust", - (long)adj.tv_sec); + "clock correction %jd sec too large to adjust", + (intmax_t)adj.tv_sec); (void) gettimeofday(&now, 0); timevaladd(&now, corr); if (settimeofday(&now, 0) < 0) Modified: head/usr.sbin/timed/timed/readmsg.c ============================================================================== --- head/usr.sbin/timed/timed/readmsg.c Mon Dec 19 20:01:21 2011 (r228718) +++ head/usr.sbin/timed/timed/readmsg.c Mon Dec 19 20:29:50 2011 (r228719) @@ -181,8 +181,8 @@ again: rwait.tv_usec = 1000000/CLK_TCK; if (trace) { - fprintf(fd, "readmsg: wait %ld.%6ld at %s\n", - (long)rwait.tv_sec, rwait.tv_usec, date()); + fprintf(fd, "readmsg: wait %jd.%6ld at %s\n", + (intmax_t)rwait.tv_sec, rwait.tv_usec, date()); /* Notice a full disk, as we flush trace info. * It is better to flush periodically than at * every line because the tracing consists of bursts From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 20:33:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE14C106564A; Mon, 19 Dec 2011 20:33:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD6C88FC0A; Mon, 19 Dec 2011 20:33:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJKXrkx074041; Mon, 19 Dec 2011 20:33:53 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJKXrrO074038; Mon, 19 Dec 2011 20:33:53 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112192033.pBJKXrrO074038@svn.freebsd.org> From: Dimitry Andric Date: Mon, 19 Dec 2011 20:33:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228720 - head/usr.sbin/timed/timed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 20:33:54 -0000 Author: dim Date: Mon Dec 19 20:33:53 2011 New Revision: 228720 URL: http://svn.freebsd.org/changeset/base/228720 Log: Fix r228719; when you use intmax_t, you need stdint.h. Pointy hat to: dim MFC after: 1 week Modified: head/usr.sbin/timed/timed/globals.h Modified: head/usr.sbin/timed/timed/globals.h ============================================================================== --- head/usr.sbin/timed/timed/globals.h Mon Dec 19 20:29:50 2011 (r228719) +++ head/usr.sbin/timed/timed/globals.h Mon Dec 19 20:33:53 2011 (r228720) @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 20:38:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D545A106566B; Mon, 19 Dec 2011 20:38:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C440E8FC08; Mon, 19 Dec 2011 20:38:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJKcQMa074225; Mon, 19 Dec 2011 20:38:26 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJKcQW1074223; Mon, 19 Dec 2011 20:38:26 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112192038.pBJKcQW1074223@svn.freebsd.org> From: Dimitry Andric Date: Mon, 19 Dec 2011 20:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228721 - head/usr.sbin/uhsoctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 20:38:26 -0000 Author: dim Date: Mon Dec 19 20:38:26 2011 New Revision: 228721 URL: http://svn.freebsd.org/changeset/base/228721 Log: In usr.sbin/uhsoctl/uhsoctl.c, fix a few warnings about format strings not being literals. MFC after: 1 week Modified: head/usr.sbin/uhsoctl/uhsoctl.c Modified: head/usr.sbin/uhsoctl/uhsoctl.c ============================================================================== --- head/usr.sbin/uhsoctl/uhsoctl.c Mon Dec 19 20:33:53 2011 (r228720) +++ head/usr.sbin/uhsoctl/uhsoctl.c Mon Dec 19 20:38:26 2011 (r228721) @@ -340,7 +340,7 @@ logger(int pri, const char *fmt, ...) va_start(ap, fmt); vasprintf(&buf, fmt, ap); if (syslog_open) - syslog(pri, buf); + syslog(pri, "%s", buf); else { switch (pri) { case LOG_INFO: @@ -1174,7 +1174,7 @@ do_connect(struct ctx *ctx, const char * buf = ra.val[0].ptr; if (strstr(buf[0], "+CME ERROR:") != NULL) { buf[0] += 12; - errx(1, buf[0]); + errx(1, "%s", buf[0]); } freeresp(&ra); } else From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 20:41:33 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6828106566C; Mon, 19 Dec 2011 20:41:33 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id A1D2F8FC27; Mon, 19 Dec 2011 20:41:33 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id pBJKfTRn035946; Mon, 19 Dec 2011 12:41:29 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id pBJKfTPP035945; Mon, 19 Dec 2011 12:41:29 -0800 (PST) (envelope-from sgk) Date: Mon, 19 Dec 2011 12:41:29 -0800 From: Steve Kargl To: David Chisnall Message-ID: <20111219204129.GA34783@troutmask.apl.washington.edu> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: Doug Barton , Garrett Cooper , Max Khon , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, G?bor K?vesd?n , svn-src-head@FreeBSD.org, Warner Losh Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 20:41:34 -0000 On Mon, Dec 19, 2011 at 08:09:32PM +0000, David Chisnall wrote: > On 19 Dec 2011, at 19:52, Warner Losh wrote: > > > -1. The needs of the many? Please. Let's break a useful feature because some people don't understand it and are impatient? That's lame. > > How useful is gprof-based profiling these days? Now that we > have the DTrace pid provider, don't we have access to much more > fine-grained profiling information without the need for shipping > two versions of every library? It is quite uesful given that for the last 20 or so years, I can do cc -o z -pg a.c -lm_p ./z gprof -b -l ./z z.gmon | more % cumulative self self total time seconds seconds calls ms/call ms/call name 72.1 0.91 0.91 0 100.00% _mcount [1] 11.1 1.05 0.14 8388608 0.00 0.00 sinf [4] 8.2 1.16 0.10 8388608 0.00 0.00 nextafterf [5] 4.6 1.21 0.06 0 100.00% .mcount (9) to ge the information I want. dtrace(1M) does not seem to contain an example that gives the equivalent information. In fact, the manpage contains no examples, only the statement: See the Solaris Dynamic Tracing Guide for detailed examples of how to use the dtrace utility to perform these tasks. which, of course, is not very useful given that I do not have a Solaris Dynamic Tracing Guide. -- Steve From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 20:44:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C8DF1065670; Mon, 19 Dec 2011 20:44:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77A3B8FC1B; Mon, 19 Dec 2011 20:44:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJKij49074482; Mon, 19 Dec 2011 20:44:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJKijR5074480; Mon, 19 Dec 2011 20:44:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112192044.pBJKijR5074480@svn.freebsd.org> From: Dimitry Andric Date: Mon, 19 Dec 2011 20:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228722 - head/usr.sbin/yp_mkdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 20:44:45 -0000 Author: dim Date: Mon Dec 19 20:44:44 2011 New Revision: 228722 URL: http://svn.freebsd.org/changeset/base/228722 Log: In usr.sbin/yp_mkdb/yp_mkdb.c, cast some printf field width parameters to int, cast time_t to intmax_t, and use the corresponding printf length modifier. MFC after: 1 week Modified: head/usr.sbin/yp_mkdb/yp_mkdb.c Modified: head/usr.sbin/yp_mkdb/yp_mkdb.c ============================================================================== --- head/usr.sbin/yp_mkdb/yp_mkdb.c Mon Dec 19 20:38:26 2011 (r228721) +++ head/usr.sbin/yp_mkdb/yp_mkdb.c Mon Dec 19 20:44:44 2011 (r228722) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -87,7 +88,8 @@ unwind(char *map) key.data = NULL; while (yp_next_record(dbp, &key, &data, 1, 1) == YP_TRUE) - printf("%.*s %.*s\n", key.size,key.data,data.size,data.data); + printf("%.*s %.*s\n", (int)key.size, key.data, (int)data.size, + data.data); (void)(dbp->close)(dbp); return; @@ -218,7 +220,7 @@ main(int argc, char *argv[]) key.data = "YP_LAST_MODIFIED"; key.size = sizeof("YP_LAST_MODIFIED") - 1; - snprintf(buf, sizeof(buf), "%lu", time(NULL)); + snprintf(buf, sizeof(buf), "%jd", (intmax_t)time(NULL)); data.data = (char *)&buf; data.size = strlen(buf); yp_put_record(dbp, &key, &data, 0); From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 20:47:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 093A6106566C; Mon, 19 Dec 2011 20:47:34 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id 72D368FC1A; Mon, 19 Dec 2011 20:47:33 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Rck7P-000LiB-Fb; Tue, 20 Dec 2011 00:47:31 +0400 Date: Tue, 20 Dec 2011 00:47:31 +0400 From: Slawa Olhovchenkov To: Garrett Cooper , Rui Paulo Message-ID: <20111219204731.GA80294@zxy.spb.ru> References: <200903020228.n222SMD1061919@svn.freebsd.org> <20111219094140.GB51886@zxy.spb.ru> <20111219191405.GO3314@zxy.spb.ru> <20111219194506.GP3314@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111219194506.GP3314@zxy.spb.ru> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Sam Leffler , src-committers@freebsd.org Subject: Re: svn commit: r189263 - in head/usr.sbin/wpa: . hostapd hostapd_cli wpa_cli wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 20:47:34 -0000 On Mon, Dec 19, 2011 at 11:45:06PM +0400, Slawa Olhovchenkov wrote: > > >>>> Author: sam > > >>>> Date: Mon Mar 2 02:28:22 2009 > > >>>> New Revision: 189263 > > >>>> URL: http://svn.freebsd.org/changeset/base/189263 > > >>>> > > >>>> Log: > > >>>> update to 0.6.8 > > >>>> > > >>>> Reviewed by: thompsa > > >>>> > > >>>> Modified: > > >>>> head/usr.sbin/wpa/Makefile.inc > > >>>> head/usr.sbin/wpa/hostapd/Makefile > > >>>> head/usr.sbin/wpa/hostapd/driver_freebsd.c > > >>>> head/usr.sbin/wpa/hostapd_cli/Makefile > > >>>> head/usr.sbin/wpa/wpa_cli/Makefile > > >>>> head/usr.sbin/wpa/wpa_supplicant/Makefile > > >>>> head/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c > > >>>> head/usr.sbin/wpa/wpa_supplicant/driver_wired.c > > >>>> Modified: head/usr.sbin/wpa/hostapd/Makefile > > >>>> ============================================================================== > > >>>> --- head/usr.sbin/wpa/hostapd/Makefile Mon Mar 2 02:26:53 2009 (r189262) > > >>>> +++ head/usr.sbin/wpa/hostapd/Makefile Mon Mar 2 02:28:22 2009 (r189263) > > >>> > > >>>> .if !empty(CFLAGS:M*-DEAP_SERVER) > > >>>> -SRCS+= eap.c eap_methods.c eap_identity.c > > >>>> +#SRCS+= eap.c eap_methods.c eap_identity.c > > >>> > > >>> EAP_SERVER functionality removed. Why? > > >> > > >> EAP support is only removed if -DEAP_SERVER isn't in CFLAGS (which > > >> seems like a bad idea because it should really be a bsd.own.mk knob). > > > > > > Sorry, I don't understand. > > > Some time ago I have in src.conf HOSTAPD_CFLAGS=-DEAP_TLS -DEAP_SERVER > > > and got hostapd witch support EAP metods. Now this is don't work: > > > > > > ===> hostapd (all) > > > make: don't know how to make eap_tls.c. Stop > > > > > > How I can build hostapd witch support EAP metods? > > > > Missed the commenting out part of the commit. Yeah, that might not work. > > Some time ago exist two eap_tls.c: > > /usr/src/contrib/wpa/src/eap_peer/eap_tls.c > /usr/src/contrib/wpa/src/eap_server/eap_tls.c > > Now exist only /usr/src/contrib/wpa/src/eap_peer/eap_tls.c. But > /usr/src/contrib/wpa/src/eap_peer/ don't included in SRC path search > list and eap_tls.c from eap_peer have extra depends. This file (and some other files) renamed in commit r214734. And some other files added/splited. Can someone commit next diff: === --- hostapd/Makefile 2011-12-20 00:45:13.000000000 +0400 +++ Makefile.new 2011-12-20 00:28:29.000000000 +0400 @@ -62,13 +62,10 @@ CFLAGS+=-DEAP_TLS -DEAP_PEAP -DEAP_MSCHAPv2 -DEAP_PSK \ -DEAP_TLS_FUNCS -DEAP_TLS_OPENSSL -SRCS+= crypto_openssl.c -SRCS+= eap_tls.c eap_peap.c eap_peap_common.c eap_mschapv2.c \ - eap_psk.c eap_psk_common.c \ - eap_tls_common.c tls_openssl.c ms_funcs.c chap.c +SRCS+= eap_server_psk.c eap_psk_common.c \ + tls_openssl.c aes-encblock.c aes-omac1.c aes-eax.c aes-ctr.c CFLAGS+=-DEAP_TTLS -DEAP_MD5 -SRCS+= eap_ttls.c eap_md5.c .if !empty(CFLAGS:M*-DEAP_GTC) SRCS+= eap_gtc.c From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 23:05:56 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74B591065677; Mon, 19 Dec 2011 23:05:56 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id F2DC08FC0C; Mon, 19 Dec 2011 23:05:54 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.4/8.14.4) with ESMTP id pBJN4jj4068559; Mon, 19 Dec 2011 17:04:45 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.4/8.14.4/Submit) id pBJN4huZ068558; Mon, 19 Dec 2011 17:04:43 -0600 (CST) (envelope-from brooks) Date: Mon, 19 Dec 2011 17:04:43 -0600 From: Brooks Davis To: Steve Kargl Message-ID: <20111219230443.GB66858@lor.one-eyed-alien.net> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> <20111219204129.GA34783@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: <20111219204129.GA34783@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Mon, 19 Dec 2011 23:27:37 +0000 Cc: Doug Barton , Garrett Cooper , Max Khon , svn-src-all@FreeBSD.org, David Chisnall , src-committers@FreeBSD.org, G?bor K?vesd?n , svn-src-head@FreeBSD.org, Warner Losh Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 23:05:56 -0000 --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 19, 2011 at 12:41:29PM -0800, Steve Kargl wrote: > On Mon, Dec 19, 2011 at 08:09:32PM +0000, David Chisnall wrote: > > On 19 Dec 2011, at 19:52, Warner Losh wrote: > >=20 > > > -1. The needs of the many? Please. Let's break a useful feature be= cause some people don't understand it and are impatient? That's lame. > >=20 > > How useful is gprof-based profiling these days? Now that we > > have the DTrace pid provider, don't we have access to much more > > fine-grained profiling information without the need for shipping > > two versions of every library? >=20 > It is quite uesful given that for the last 20 or so years, > I can do=20 >=20 > cc -o z -pg a.c -lm_p > ./z > gprof -b -l ./z z.gmon | more >=20 > % cumulative self self total =20 > time seconds seconds calls ms/call ms/call name =20 > 72.1 0.91 0.91 0 100.00% _mcount [1] > 11.1 1.05 0.14 8388608 0.00 0.00 sinf [4] > 8.2 1.16 0.10 8388608 0.00 0.00 nextafterf [5] > 4.6 1.21 0.06 0 100.00% .mcount (9) >=20 > to ge the information I want. I'd tend to agree that we should leave it on at least in HEAD. > dtrace(1M) does not seem to contain an example that gives the > equivalent information. In fact, the manpage contains no examples, > only the statement: >=20 > See the Solaris Dynamic Tracing Guide for detailed examples > of how to use the dtrace utility to perform these tasks. >=20 > which, of course, is not very useful given that I do not have a > Solaris Dynamic Tracing Guide. http://docs.oracle.com/cd/E19253-01/817-6223/ is it and the first hit in google... -- Brooks --BXVAT5kNtrzKuDFl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFO78MLXY6L6fI4GtQRAm3PAJ9UkGttDijK7lyADYRJE4CpaXPb1QCgwxwW oX05I2HIp2cKgfTSxaRjWjA= =Dln2 -----END PGP SIGNATURE----- --BXVAT5kNtrzKuDFl-- From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 23:39:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15246106566C; Mon, 19 Dec 2011 23:39:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03E8A8FC0A; Mon, 19 Dec 2011 23:39:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJNd8cS080556; Mon, 19 Dec 2011 23:39:08 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBJNd83s080554; Mon, 19 Dec 2011 23:39:08 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112192339.pBJNd83s080554@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 19 Dec 2011 23:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228723 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 23:39:09 -0000 Author: hselasky Date: Mon Dec 19 23:39:08 2011 New Revision: 228723 URL: http://svn.freebsd.org/changeset/base/228723 Log: Make the recently added "no_shutdown_wait" sysctl writeable. Suggested by: avg @ MFC after: 3 days Modified: head/sys/dev/usb/controller/usb_controller.c Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 20:44:44 2011 (r228722) +++ head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 23:39:08 2011 (r228723) @@ -91,7 +91,7 @@ SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wa static int usb_no_shutdown_wait = 0; TUNABLE_INT("hw.usb.no_shutdown_wait", &usb_no_shutdown_wait); -SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RDTUN, &usb_no_shutdown_wait, 0, +SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RW|CTLFLAG_TUN, &usb_no_shutdown_wait, 0, "No USB device waiting at system shutdown."); static devclass_t usb_devclass; From owner-svn-src-all@FreeBSD.ORG Mon Dec 19 23:39:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FAF31065676; Mon, 19 Dec 2011 23:39:52 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.c2i.net [212.247.154.162]) by mx1.freebsd.org (Postfix) with ESMTP id 5D44F8FC1C; Mon, 19 Dec 2011 23:39:51 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe06.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 217997475; Tue, 20 Dec 2011 00:39:49 +0100 From: Hans Petter Selasky To: Andriy Gapon Date: Tue, 20 Dec 2011 00:37:22 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <201112191535.pBJFZ6hY063597@svn.freebsd.org> <4EEF7569.4010401@FreeBSD.org> In-Reply-To: <4EEF7569.4010401@FreeBSD.org> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <201112200037.22286.hselasky@c2i.net> Cc: "svn-src-head@FreeBSD.org" , "svn-src-all@FreeBSD.org" , "src-committers@FreeBSD.org" Subject: Re: svn commit: r228711 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 23:39:52 -0000 On Monday 19 December 2011 18:33:29 Andriy Gapon wrote: > on 19/12/2011 17:35 Hans Petter Selasky said the following: > > Author: hselasky > > Date: Mon Dec 19 15:35:05 2011 > > New Revision: 228711 > > URL: http://svn.freebsd.org/changeset/base/228711 > > > > Log: > > Add code to wait for USB shutdown to be executed at system shutdown. > > Add sysctl which can be used to skip this waiting. > > > > MFC after: 3 days > > Thank you! > One comment below. > > > Modified: > > head/sys/dev/usb/controller/usb_controller.c > > > > Modified: head/sys/dev/usb/controller/usb_controller.c > > ========================================================================= > > ===== --- head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 > > 14:55:14 2011 (r228710) +++ > > head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 15:35:05 > > 2011 (r228711) @@ -87,7 +87,12 @@ SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, > > debug > > > > static int usb_no_boot_wait = 0; > > TUNABLE_INT("hw.usb.no_boot_wait", &usb_no_boot_wait); > > SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, > > &usb_no_boot_wait, 0, > > > > - "No device enumerate waiting at boot."); > > + "No USB device enumerate waiting at boot."); > > + > > +static int usb_no_shutdown_wait = 0; > > +TUNABLE_INT("hw.usb.no_shutdown_wait", &usb_no_shutdown_wait); > > +SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RDTUN, > > &usb_no_shutdown_wait, 0, > > Does this knob (as well as the one before it) have to be CTLFLAG_RDTUN? > I think that it should pretty safe to make it CTLFLAG_RW | CTLFLAG_TUN. No, it does not need to be read only. --HPS From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 00:16:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 316C2106566C; Tue, 20 Dec 2011 00:16:53 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2083F8FC08; Tue, 20 Dec 2011 00:16:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBK0GrdK082308; Tue, 20 Dec 2011 00:16:53 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBK0Gq2e082305; Tue, 20 Dec 2011 00:16:53 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201112200016.pBK0Gq2e082305@svn.freebsd.org> From: Xin LI Date: Tue, 20 Dec 2011 00:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228724 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 00:16:53 -0000 Author: delphij Date: Tue Dec 20 00:16:52 2011 New Revision: 228724 URL: http://svn.freebsd.org/changeset/base/228724 Log: Add comments in NOTES to say what viawd is. Modified: head/sys/amd64/conf/NOTES head/sys/i386/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Mon Dec 19 23:39:08 2011 (r228723) +++ head/sys/amd64/conf/NOTES Tue Dec 20 00:16:52 2011 (r228724) @@ -455,6 +455,7 @@ device tpm # # ichwd: Intel ICH watchdog timer # amdsbwd: AMD SB7xx watchdog timer +# viawd: VIA south bridge watchdog timer # device ichwd device amdsbwd Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Mon Dec 19 23:39:08 2011 (r228723) +++ head/sys/i386/conf/NOTES Tue Dec 20 00:16:52 2011 (r228724) @@ -828,6 +828,7 @@ hint.pcf.0.irq="5" # # ichwd: Intel ICH watchdog timer # amdsbwd: AMD SB7xx watchdog timer +# viawd: VIA south bridge watchdog timer # device ichwd device amdsbwd From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 00:33:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90EF4106564A; Tue, 20 Dec 2011 00:33:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 759C08FC08; Tue, 20 Dec 2011 00:33:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBK0XuTL082939; Tue, 20 Dec 2011 00:33:56 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBK0XuQj082936; Tue, 20 Dec 2011 00:33:56 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112200033.pBK0XuQj082936@svn.freebsd.org> From: Adrian Chadd Date: Tue, 20 Dec 2011 00:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228725 - in head/sys: dev/gpio mips/atheros X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 00:33:56 -0000 Author: adrian Date: Tue Dec 20 00:33:56 2011 New Revision: 228725 URL: http://svn.freebsd.org/changeset/base/228725 Log: Remove these locks - they aren't strictly needed and cause measurable performance issues. * Access to the GPIO bus is already locked by requesting and releasing the bus - thus the lock isn't really needed for each GPIO pin change. * Don't lock and unlock the GPIO bus for -each- i2c access - the i2c bus code is already doing this by calling the upper layer callback to request/release the bus. This thus locks the bus for the entirety of the transaction. TODO: * Further verify that everything is correctly requesting/ releasing the GPIO bus. * Look at how to lock the GPIO pin configuration stuff, potentially by locking/unlocking the bus at the gpiobus layer. Modified: head/sys/dev/gpio/gpioiic.c head/sys/mips/atheros/ar71xx_gpio.c Modified: head/sys/dev/gpio/gpioiic.c ============================================================================== --- head/sys/dev/gpio/gpioiic.c Tue Dec 20 00:16:52 2011 (r228724) +++ head/sys/dev/gpio/gpioiic.c Tue Dec 20 00:33:56 2011 (r228725) @@ -55,7 +55,6 @@ struct gpioiic_softc { device_t sc_dev; device_t sc_busdev; - struct mtx sc_mtx; struct cdev *sc_leddev; int scl_pin; int sda_pin; @@ -148,7 +147,6 @@ gpioiic_setsda(device_t dev, int val) { struct gpioiic_softc *sc = device_get_softc(dev); - GPIOBUS_LOCK_BUS(sc->sc_busdev); if (val == 0) { GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, sc->sda_pin, 0); GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->sda_pin, @@ -157,7 +155,6 @@ gpioiic_setsda(device_t dev, int val) GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->sda_pin, GPIO_PIN_INPUT); } - GPIOBUS_UNLOCK_BUS(sc->sc_busdev); } static void @@ -165,7 +162,6 @@ gpioiic_setscl(device_t dev, int val) { struct gpioiic_softc *sc = device_get_softc(dev); - GPIOBUS_LOCK_BUS(sc->sc_busdev); if (val == 0) { GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, sc->scl_pin, 0); GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->scl_pin, @@ -174,7 +170,6 @@ gpioiic_setscl(device_t dev, int val) GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->scl_pin, GPIO_PIN_INPUT); } - GPIOBUS_UNLOCK_BUS(sc->sc_busdev); } static int @@ -183,11 +178,9 @@ gpioiic_getscl(device_t dev) struct gpioiic_softc *sc = device_get_softc(dev); unsigned int val; - GPIOBUS_LOCK_BUS(sc->sc_busdev); GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->scl_pin, GPIO_PIN_INPUT); GPIOBUS_PIN_GET(sc->sc_busdev, sc->sc_dev, sc->scl_pin, &val); - GPIOBUS_UNLOCK_BUS(sc->sc_busdev); return ((int)val); } @@ -198,11 +191,9 @@ gpioiic_getsda(device_t dev) struct gpioiic_softc *sc = device_get_softc(dev); unsigned int val; - GPIOBUS_LOCK_BUS(sc->sc_busdev); GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->sda_pin, GPIO_PIN_INPUT); GPIOBUS_PIN_GET(sc->sc_busdev, sc->sc_dev, sc->sda_pin, &val); - GPIOBUS_UNLOCK_BUS(sc->sc_busdev); return ((int)val); } @@ -212,13 +203,11 @@ gpioiic_reset(device_t dev, u_char speed { struct gpioiic_softc *sc = device_get_softc(dev); - GPIOBUS_LOCK_BUS(sc->sc_busdev); GPIOBUS_ACQUIRE_BUS(sc->sc_busdev, sc->sc_dev); gpioiic_reset_bus(sc->sc_dev); GPIOBUS_RELEASE_BUS(sc->sc_busdev, sc->sc_dev); - GPIOBUS_UNLOCK_BUS(sc->sc_busdev); return (IIC_ENOADDR); } Modified: head/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- head/sys/mips/atheros/ar71xx_gpio.c Tue Dec 20 00:16:52 2011 (r228724) +++ head/sys/mips/atheros/ar71xx_gpio.c Tue Dec 20 00:33:56 2011 (r228725) @@ -89,17 +89,13 @@ static int ar71xx_gpio_pin_toggle(device static void ar71xx_gpio_function_enable(struct ar71xx_gpio_softc *sc, uint32_t mask) { - GPIO_LOCK(sc); GPIO_SET_BITS(sc, AR71XX_GPIO_FUNCTION, mask); - GPIO_UNLOCK(sc); } static void ar71xx_gpio_function_disable(struct ar71xx_gpio_softc *sc, uint32_t mask) { - GPIO_LOCK(sc); GPIO_CLEAR_BITS(sc, AR71XX_GPIO_FUNCTION, mask); - GPIO_UNLOCK(sc); } static void @@ -109,7 +105,6 @@ ar71xx_gpio_pin_configure(struct ar71xx_ uint32_t mask; mask = 1 << pin->gp_pin; - GPIO_LOCK(sc); /* * Manage input/output @@ -125,8 +120,6 @@ ar71xx_gpio_pin_configure(struct ar71xx_ GPIO_CLEAR_BITS(sc, AR71XX_GPIO_OE, mask); } } - - GPIO_UNLOCK(sc); } static int @@ -253,12 +246,10 @@ ar71xx_gpio_pin_set(device_t dev, uint32 if (i >= sc->gpio_npins) return (EINVAL); - GPIO_LOCK(sc); if (value) GPIO_WRITE(sc, AR71XX_GPIO_SET, (1 << pin)); else GPIO_WRITE(sc, AR71XX_GPIO_CLEAR, (1 << pin)); - GPIO_UNLOCK(sc); return (0); } @@ -277,9 +268,7 @@ ar71xx_gpio_pin_get(device_t dev, uint32 if (i >= sc->gpio_npins) return (EINVAL); - GPIO_LOCK(sc); *val = (GPIO_READ(sc, AR71XX_GPIO_IN) & (1 << pin)) ? 1 : 0; - GPIO_UNLOCK(sc); return (0); } @@ -298,13 +287,11 @@ ar71xx_gpio_pin_toggle(device_t dev, uin if (i >= sc->gpio_npins) return (EINVAL); - GPIO_LOCK(sc); res = (GPIO_READ(sc, AR71XX_GPIO_IN) & (1 << pin)) ? 1 : 0; if (res) GPIO_WRITE(sc, AR71XX_GPIO_CLEAR, (1 << pin)); else GPIO_WRITE(sc, AR71XX_GPIO_SET, (1 << pin)); - GPIO_UNLOCK(sc); return (0); } From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 00:12:05 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 069471065676; Tue, 20 Dec 2011 00:12:05 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id D0B1A8FC08; Tue, 20 Dec 2011 00:12:04 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id pBK0C081051852; Mon, 19 Dec 2011 16:12:00 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id pBK0BxQG051851; Mon, 19 Dec 2011 16:11:59 -0800 (PST) (envelope-from sgk) Date: Mon, 19 Dec 2011 16:11:59 -0800 From: Steve Kargl To: Brooks Davis Message-ID: <20111220001159.GA50555@troutmask.apl.washington.edu> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> <20111219204129.GA34783@troutmask.apl.washington.edu> <20111219230443.GB66858@lor.one-eyed-alien.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111219230443.GB66858@lor.one-eyed-alien.net> User-Agent: Mutt/1.4.2.3i X-Mailman-Approved-At: Tue, 20 Dec 2011 01:30:57 +0000 Cc: Doug Barton , Garrett Cooper , Max Khon , svn-src-all@FreeBSD.org, David Chisnall , src-committers@FreeBSD.org, G?bor K?vesd?n , svn-src-head@FreeBSD.org, Warner Losh Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 00:12:05 -0000 On Mon, Dec 19, 2011 at 05:04:43PM -0600, Brooks Davis wrote: > On Mon, Dec 19, 2011 at 12:41:29PM -0800, Steve Kargl wrote: > > On Mon, Dec 19, 2011 at 08:09:32PM +0000, David Chisnall wrote: > > > On 19 Dec 2011, at 19:52, Warner Losh wrote: > > > > > > > -1. The needs of the many? Please. Let's break a useful feature because some people don't understand it and are impatient? That's lame. > > > > > > How useful is gprof-based profiling these days? Now that we > > > have the DTrace pid provider, don't we have access to much more > > > fine-grained profiling information without the need for shipping > > > two versions of every library? > > > > It is quite uesful given that for the last 20 or so years, > > I can do > > > > cc -o z -pg a.c -lm_p > > ./z > > gprof -b -l ./z z.gmon | more > > > > % cumulative self self total > > time seconds seconds calls ms/call ms/call name > > 72.1 0.91 0.91 0 100.00% _mcount [1] > > 11.1 1.05 0.14 8388608 0.00 0.00 sinf [4] > > 8.2 1.16 0.10 8388608 0.00 0.00 nextafterf [5] > > 4.6 1.21 0.06 0 100.00% .mcount (9) > > > > to ge the information I want. > > I'd tend to agree that we should leave it on at least in HEAD. I think it should be the default on all branches. It adds about 28 MB to /usr/lib and 10 minutes to buildworld on my x86_64 systems, ie., it is in the noise. > > dtrace(1M) does not seem to contain an example that gives the > > equivalent information. In fact, the manpage contains no examples, > > only the statement: > > > > See the Solaris Dynamic Tracing Guide for detailed examples > > of how to use the dtrace utility to perform these tasks. > > > > which, of course, is not very useful given that I do not have a > > Solaris Dynamic Tracing Guide. > > http://docs.oracle.com/cd/E19253-01/817-6223/ is it and the first hit in > google... > Which isn't very useful if the system that I'm working on has no or very limit internet access. A quick scan of Ch. 19, 'profile Provider' does not give anything that looks remotely similar to the above 3 command lines. Ch. 33 'User Process Tracing' isn't any better. Telling a users that getting an execution profile for her code can be done by first learning the D programming language and then reading a 41 Chapter document available on the web isn't too user friendly. And, if I read Chapter 26 of the FreeBSD Handbook correctly: 1) dtrace is experimental 2) one needs to build a kernel with the KDTRACE_HOOKS, DDB_CTF, and possibly KDTRACE_FRAME. 3) one needs to 'kldload dtraceall' module, which is a showstopper for anyone who builds his kernel with 'makeoptions NO_MODULES' -- Steve From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 02:00:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49121106566C; Tue, 20 Dec 2011 02:00:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2EC148FC12; Tue, 20 Dec 2011 02:00:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBK20SCQ085971; Tue, 20 Dec 2011 02:00:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBK20SvC085969; Tue, 20 Dec 2011 02:00:28 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112200200.pBK20SvC085969@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Dec 2011 02:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228726 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 02:00:28 -0000 Author: mav Date: Tue Dec 20 02:00:27 2011 New Revision: 228726 URL: http://svn.freebsd.org/changeset/base/228726 Log: Cast some vendor-specific spell on VIA VT1708S codecs to: - make analog input loopback work; - get access to the mics boost controls. Sponsored by: iXsystems, Inc. MFC after: 1 month Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Tue Dec 20 00:33:56 2011 (r228725) +++ head/sys/dev/sound/pci/hda/hdac.c Tue Dec 20 02:00:27 2011 (r228726) @@ -4971,6 +4971,30 @@ hdac_vendor_patch_parse(struct hdac_devi if (w != NULL) w->connsenable[0] = 0; break; + case HDA_CODEC_VT1708S_0: + case HDA_CODEC_VT1708S_1: + case HDA_CODEC_VT1708S_2: + case HDA_CODEC_VT1708S_3: + case HDA_CODEC_VT1708S_4: + case HDA_CODEC_VT1708S_5: + case HDA_CODEC_VT1708S_6: + case HDA_CODEC_VT1708S_7: + /* + * These codecs have hidden mic boost controls. + */ + w = hdac_widget_get(devinfo, 26); + if (w != NULL) + w->param.inamp_cap = + (40 << HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_SHIFT) | + (3 << HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS_SHIFT) | + (0 << HDA_PARAM_OUTPUT_AMP_CAP_OFFSET_SHIFT); + w = hdac_widget_get(devinfo, 30); + if (w != NULL) + w->param.inamp_cap = + (40 << HDA_PARAM_OUTPUT_AMP_CAP_STEPSIZE_SHIFT) | + (3 << HDA_PARAM_OUTPUT_AMP_CAP_NUMSTEPS_SHIFT) | + (0 << HDA_PARAM_OUTPUT_AMP_CAP_OFFSET_SHIFT); + break; } } @@ -6458,7 +6482,7 @@ hdac_audio_commit(struct hdac_devinfo *d struct hdac_softc *sc = devinfo->codec->sc; struct hdac_widget *w; nid_t cad; - uint32_t gdata, gmask, gdir; + uint32_t id, gdata, gmask, gdir; int commitgpio, numgpio; int i; @@ -6467,6 +6491,16 @@ hdac_audio_commit(struct hdac_devinfo *d if (sc->pci_subvendor == APPLE_INTEL_MAC) hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, 0x7e7, 0), cad); + /* Cast some spells for VIA VT1708S. */ + id = hdac_codec_id(devinfo->codec); + if (id >= HDA_CODEC_VT1708S_0 && id <= HDA_CODEC_VT1708S_7) { + /* Enable Mic Boost Volume controls. */ + hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, + 0xf98, 0x01), cad); + /* Don't bypass mixer. */ + hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, + 0xf88, 0xc0), cad); + } /* Commit controls. */ hdac_audio_ctl_commit(devinfo); @@ -7768,10 +7802,6 @@ hdac_attach2(void *arg) ); hdac_audio_parse(devinfo); HDA_BOOTHVERBOSE( - device_printf(sc->dev, "Parsing Ctls...\n"); - ); - hdac_audio_ctl_parse(devinfo); - HDA_BOOTHVERBOSE( device_printf(sc->dev, "Parsing vendor patch...\n"); ); hdac_vendor_patch_parse(devinfo); @@ -7779,6 +7809,10 @@ hdac_attach2(void *arg) devinfo->function.audio.quirks &= ~quirks_off; HDA_BOOTHVERBOSE( + device_printf(sc->dev, "Parsing Ctls...\n"); + ); + hdac_audio_ctl_parse(devinfo); + HDA_BOOTHVERBOSE( device_printf(sc->dev, "Disabling nonaudio...\n"); ); hdac_audio_disable_nonaudio(devinfo); From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 02:42:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B75E106564A; Tue, 20 Dec 2011 02:42:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A4FC8FC08; Tue, 20 Dec 2011 02:42:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBK2gruU087470; Tue, 20 Dec 2011 02:42:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBK2grrM087468; Tue, 20 Dec 2011 02:42:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112200242.pBK2grrM087468@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Dec 2011 02:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228727 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 02:42:53 -0000 Author: mav Date: Tue Dec 20 02:42:53 2011 New Revision: 228727 URL: http://svn.freebsd.org/changeset/base/228727 Log: Oops, list of IDs is not sequential. Have to list all of them expoicitly. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Tue Dec 20 02:00:27 2011 (r228726) +++ head/sys/dev/sound/pci/hda/hdac.c Tue Dec 20 02:42:53 2011 (r228727) @@ -6491,15 +6491,23 @@ hdac_audio_commit(struct hdac_devinfo *d if (sc->pci_subvendor == APPLE_INTEL_MAC) hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, 0x7e7, 0), cad); - /* Cast some spells for VIA VT1708S. */ id = hdac_codec_id(devinfo->codec); - if (id >= HDA_CODEC_VT1708S_0 && id <= HDA_CODEC_VT1708S_7) { + switch (id) { + case HDA_CODEC_VT1708S_0: + case HDA_CODEC_VT1708S_1: + case HDA_CODEC_VT1708S_2: + case HDA_CODEC_VT1708S_3: + case HDA_CODEC_VT1708S_4: + case HDA_CODEC_VT1708S_5: + case HDA_CODEC_VT1708S_6: + case HDA_CODEC_VT1708S_7: /* Enable Mic Boost Volume controls. */ hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, 0xf98, 0x01), cad); /* Don't bypass mixer. */ hdac_command(sc, HDA_CMD_12BIT(cad, devinfo->nid, 0xf88, 0xc0), cad); + break; } /* Commit controls. */ From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 02:49:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14CEF106566C; Tue, 20 Dec 2011 02:49:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03AC68FC17; Tue, 20 Dec 2011 02:49:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBK2n1HS087716; Tue, 20 Dec 2011 02:49:01 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBK2n1oR087714; Tue, 20 Dec 2011 02:49:01 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112200249.pBK2n1oR087714@svn.freebsd.org> From: Adrian Chadd Date: Tue, 20 Dec 2011 02:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228728 - head/sys/dev/iicbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 02:49:02 -0000 Author: adrian Date: Tue Dec 20 02:49:01 2011 New Revision: 228728 URL: http://svn.freebsd.org/changeset/base/228728 Log: IIC bitbang changes - prepare to make the bit delay configurable; debug print changes. * Right now the delay is hard coded at 10uS. This is a bit long when doing lots of periodic i2c transactions. So create a 'udelay' parameter and initialise it to 10. This can be tuned later. * Add a newline after a transaction finishes, so the debugging output isn't so horrible. Modified: head/sys/dev/iicbus/iicbb.c Modified: head/sys/dev/iicbus/iicbb.c ============================================================================== --- head/sys/dev/iicbus/iicbb.c Tue Dec 20 02:42:53 2011 (r228727) +++ head/sys/dev/iicbus/iicbb.c Tue Dec 20 02:49:01 2011 (r228728) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); struct iicbb_softc { device_t iicbus; + int udelay; /* signal toggle delay in usec */ }; static int iicbb_attach(device_t); @@ -123,6 +124,7 @@ iicbb_attach(device_t dev) sc->iicbus = device_add_child(dev, "iicbus", -1); if (!sc->iicbus) return (ENXIO); + sc->udelay = 10; /* 10 uS default */ bus_generic_attach(dev); return (0); @@ -184,20 +186,18 @@ iicbb_print_child(device_t bus, device_t return (retval); } -#define IIC_DELAY 10 - -#define I2C_SETSDA(dev,val) do { \ +#define I2C_SETSDA(sc,dev,val) do { \ IICBB_SETSDA(device_get_parent(dev), val); \ - DELAY(IIC_DELAY); \ + DELAY(sc->udelay); \ } while (0) #define I2C_SETSCL(dev,val) do { \ iicbb_setscl(dev, val, 100); \ } while (0) -#define I2C_SET(dev,ctrl,data) do { \ +#define I2C_SET(sc,dev,ctrl,data) do { \ I2C_SETSCL(dev, ctrl); \ - I2C_SETSDA(dev, data); \ + I2C_SETSDA(sc, dev, data); \ } while (0) #define I2C_GETSDA(dev) (IICBB_GETSDA(device_get_parent(dev))) @@ -216,34 +216,39 @@ static int i2c_debug = 0; static void iicbb_setscl(device_t dev, int val, int timeout) { + struct iicbb_softc *sc = device_get_softc(dev); int k = 0; IICBB_SETSCL(device_get_parent(dev), val); - DELAY(IIC_DELAY); + DELAY(sc->udelay); while (val && !I2C_GETSCL(dev) && k++ < timeout) { IICBB_SETSCL(device_get_parent(dev), val); - DELAY(IIC_DELAY); + DELAY(sc->udelay); } - + return; } static void iicbb_one(device_t dev, int timeout) { - I2C_SET(dev,0,1); - I2C_SET(dev,1,1); - I2C_SET(dev,0,1); + struct iicbb_softc *sc = device_get_softc(dev); + + I2C_SET(sc,dev,0,1); + I2C_SET(sc,dev,1,1); + I2C_SET(sc,dev,0,1); return; } static void iicbb_zero(device_t dev, int timeout) { - I2C_SET(dev,0,0); - I2C_SET(dev,1,0); - I2C_SET(dev,0,0); + struct iicbb_softc *sc = device_get_softc(dev); + + I2C_SET(sc,dev,0,0); + I2C_SET(sc,dev,1,0); + I2C_SET(sc,dev,0,0); return; } @@ -264,20 +269,21 @@ iicbb_zero(device_t dev, int timeout) static int iicbb_ack(device_t dev, int timeout) { + struct iicbb_softc *sc = device_get_softc(dev); int noack; int k = 0; - - I2C_SET(dev,0,1); - I2C_SET(dev,1,1); + + I2C_SET(sc,dev,0,1); + I2C_SET(sc,dev,1,1); do { noack = I2C_GETSDA(dev); if (!noack) break; - DELAY(10); - k += 10; + DELAY(1); + k++; } while (k < timeout); - I2C_SET(dev,0,1); + I2C_SET(sc,dev,0,1); I2C_DEBUG(printf("%c ",noack?'-':'+')); return (noack); @@ -302,16 +308,17 @@ iicbb_sendbyte(device_t dev, u_char data static u_char iicbb_readbyte(device_t dev, int last, int timeout) { + struct iicbb_softc *sc = device_get_softc(dev); int i; unsigned char data=0; - - I2C_SET(dev,0,1); + + I2C_SET(sc,dev,0,1); for (i=7; i>=0; i--) { - I2C_SET(dev,1,1); + I2C_SET(sc,dev,1,1); if (I2C_GETSDA(dev)) data |= (1<")); + I2C_DEBUG(printf("\n")); return (0); } From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 03:25:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 951BF1065673; Tue, 20 Dec 2011 03:25:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 844138FC15; Tue, 20 Dec 2011 03:25:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBK3PBgP089269; Tue, 20 Dec 2011 03:25:11 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBK3PB4d089267; Tue, 20 Dec 2011 03:25:11 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112200325.pBK3PB4d089267@svn.freebsd.org> From: Adrian Chadd Date: Tue, 20 Dec 2011 03:25:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228729 - head/sys/dev/gpio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 03:25:11 -0000 Author: adrian Date: Tue Dec 20 03:25:11 2011 New Revision: 228729 URL: http://svn.freebsd.org/changeset/base/228729 Log: Fix broken locking that I introduced in the previous commit. Modified: head/sys/dev/gpio/gpioiic.c Modified: head/sys/dev/gpio/gpioiic.c ============================================================================== --- head/sys/dev/gpio/gpioiic.c Tue Dec 20 02:49:01 2011 (r228728) +++ head/sys/dev/gpio/gpioiic.c Tue Dec 20 03:25:11 2011 (r228729) @@ -203,11 +203,13 @@ gpioiic_reset(device_t dev, u_char speed { struct gpioiic_softc *sc = device_get_softc(dev); + GPIOBUS_LOCK_BUS(sc->sc_busdev); GPIOBUS_ACQUIRE_BUS(sc->sc_busdev, sc->sc_dev); gpioiic_reset_bus(sc->sc_dev); GPIOBUS_RELEASE_BUS(sc->sc_busdev, sc->sc_dev); + GPIOBUS_UNLOCK_BUS(sc->sc_busdev); return (IIC_ENOADDR); } From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 04:54:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 415CF1065670; Tue, 20 Dec 2011 04:54:26 +0000 (UTC) (envelope-from wxs@atarininja.org) Received: from syn.atarininja.org (syn.csh.rit.edu [129.21.49.45]) by mx1.freebsd.org (Postfix) with ESMTP id 17EF08FC0A; Tue, 20 Dec 2011 04:54:25 +0000 (UTC) Received: by syn.atarininja.org (Postfix, from userid 1001) id 042025C2E; Mon, 19 Dec 2011 23:35:28 -0500 (EST) Date: Mon, 19 Dec 2011 23:35:27 -0500 From: Wesley Shields To: Dimitry Andric Message-ID: <20111220043527.GA71339@atarininja.org> References: <201112191732.pBJHWta3067918@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201112191732.pBJHWta3067918@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228713 - head/contrib/tcpdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 04:54:26 -0000 On Mon, Dec 19, 2011 at 05:32:55PM +0000, Dimitry Andric wrote: > Author: dim > Date: Mon Dec 19 17:32:54 2011 > New Revision: 228713 > URL: http://svn.freebsd.org/changeset/base/228713 > > Log: > In contrib/tcpdump/print-icmp6.c, fix a problem where the comparison > against icmp6_hdr::icmp6_type is done incorrectly. (This fix has > already been applied upstream, but we do not have the latest version of > tcpdump.) Yet. I have an import of libpcap in the works but became very sidetracked with work the past couple of weeks. I will be focusing on bringing in the new libpcap and tcpdump after the new year. -- WXS From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 06:20:23 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFA8A106566B; Tue, 20 Dec 2011 06:20:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 66FC48FC17; Tue, 20 Dec 2011 06:20:22 +0000 (UTC) Received: from c211-28-227-231.carlnfd1.nsw.optusnet.com.au (c211-28-227-231.carlnfd1.nsw.optusnet.com.au [211.28.227.231]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pBK6KBo6020148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Dec 2011 17:20:13 +1100 Date: Tue, 20 Dec 2011 17:20:11 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh In-Reply-To: <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> Message-ID: <20111220171740.X1005@besplex.bde.org> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-2051676617-1324362011=:1005" Cc: Doug Barton , Garrett Cooper , Max Khon , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, =?iso-8859-1?Q?G=E1bor_K=F6vesd=E1n?= , svn-src-head@FreeBSD.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 06:20:24 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-2051676617-1324362011=:1005 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 19 Dec 2011, Warner Losh wrote: > On Nov 29, 2011, at 1:53 PM, Garrett Cooper wrote: > >> 2011/11/29 Doug Barton : >>> On 11/29/2011 12:47, G=E1bor K=F6vesd=E1n wrote: >>>> On 2011.11.29. 20:46, Max Khon wrote: >>>>> Log: >>>>> Turn off profiled libs build by default. >>>>> Can be enabled back using WITH_PROFILE=3Dyes in /etc/src.conf >>>> I think it was useful. Profiling is useful for developing any piece of >>>> software that builds on libc or other common libs, even for software >>>> that is not directly related to FreeBSD. I think it should be reverted= =2E >>> >>> Since we ask users to read -current, it would be useful if our >>> developers did too. :) >>> >>> As Max pointed out in his message about this, the profiled libs are onl= y >>> really useful to a tiny percentage of developers. If you need them, >>> twist the knob. Building them should be off by default. >> >> +1. The needs of the many outweigh the needs of the few. As suggested >> elsewhere, I think it would also be a good idea to enable it in >> tinderbox builds. > > -1. The needs of the many? Please. Let's break a useful feature becaus= e some people don't understand it and are impatient? That's lame. Don't be silly. Building profiled libraries takes as much as 1 minute. Many would not want to wait that long (if they noticed how long it takes). This is not 1994 when building of profiling libraries was left in because it only took an extra hour or or so. Bruce --0-2051676617-1324362011=:1005-- From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 07:40:51 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EF1B106566C; Tue, 20 Dec 2011 07:40:51 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail11.syd.optusnet.com.au (mail11.syd.optusnet.com.au [211.29.132.192]) by mx1.freebsd.org (Postfix) with ESMTP id 0AB398FC12; Tue, 20 Dec 2011 07:40:50 +0000 (UTC) Received: from c211-28-227-231.carlnfd1.nsw.optusnet.com.au (c211-28-227-231.carlnfd1.nsw.optusnet.com.au [211.28.227.231]) by mail11.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pBK7el36031348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Dec 2011 18:40:48 +1100 Date: Tue, 20 Dec 2011 18:40:47 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric In-Reply-To: <201112192029.pBJKTpDc073856@svn.freebsd.org> Message-ID: <20111220181539.E15364@besplex.bde.org> References: <201112192029.pBJKTpDc073856@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228719 - head/usr.sbin/timed/timed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 07:40:51 -0000 On Mon, 19 Dec 2011, Dimitry Andric wrote: > Log: > Some people pointed out long is 32-bit on some arches, while time_t is > 64-bit, so better cast time_t to intmax_t, and use the appropriate > printf format strings. Some pointed out that long is adequate. It works on all arches until 2038. It works on all arches with 64-bit longs for a measly 292 billion years. timed deals with current times, so times after 2038 can't happen for it yet. So long only fails for arches still using 32-bit longs in 2038. It's not as if casting to intmax_t is correct in all cases. time_t might be unsigned, or floating point. > Modified: head/usr.sbin/timed/timed/correct.c > ============================================================================== > --- head/usr.sbin/timed/timed/correct.c Mon Dec 19 20:01:21 2011 (r228718) > +++ head/usr.sbin/timed/timed/correct.c Mon Dec 19 20:29:50 2011 (r228719) > @@ -162,8 +162,8 @@ adjclock(corr) > } > } else { > syslog(LOG_WARNING, > - "clock correction %ld sec too large to adjust", > - (long)adj.tv_sec); > + "clock correction %jd sec too large to adjust", > + (intmax_t)adj.tv_sec); This is a for time delta, so it doesn't even run out with 32-bit longs in 2038. It runs out when the time difference between systems exceeds 68+ years. If you have such a difference, then you have more problems than misprinting it by truncating it to long. > (void) gettimeofday(&now, 0); > timevaladd(&now, corr); > if (settimeofday(&now, 0) < 0) > Modified: head/usr.sbin/timed/timed/readmsg.c > ============================================================================== > --- head/usr.sbin/timed/timed/readmsg.c Mon Dec 19 20:01:21 2011 (r228718) > +++ head/usr.sbin/timed/timed/readmsg.c Mon Dec 19 20:29:50 2011 (r228719) > @@ -181,8 +181,8 @@ again: > rwait.tv_usec = 1000000/CLK_TCK; > > if (trace) { > - fprintf(fd, "readmsg: wait %ld.%6ld at %s\n", > - (long)rwait.tv_sec, rwait.tv_usec, date()); > + fprintf(fd, "readmsg: wait %jd.%6ld at %s\n", > + (intmax_t)rwait.tv_sec, rwait.tv_usec, date()); This is also for a time difference. It will soon be passed to select() as a timeout. If we are asking for a select timeout of 68+ years, then we have worse problems than misprinting it in debugging code. > /* Notice a full disk, as we flush trace info. > * It is better to flush periodically than at > * every line because the tracing consists of bursts > Supporting time differences of 292 billion years is silly. If you do that, then you should worry about time_t being 128-bit long double, while intmax_t is a mere 64 bits. 128-bit long double can only go up to 3*10**17 billion years before losing precision. But when it does, you should be more careful not to blindly truncate it to intmax_t. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 09:22:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D560106564A; Tue, 20 Dec 2011 09:22:00 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id EF8908FC0C; Tue, 20 Dec 2011 09:21:59 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so3496262obb.13 for ; Tue, 20 Dec 2011 01:21:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=QMSiY1lMNICsZqkRDecdV2hRW6qRwypEZtGI1MAkJLo=; b=dlJhp4SUxTVf3Sy6s/c4uF0mp1rsrHF+4dI+lyQIa386R3rVYRutsdbaHDxqUrFMDm ZGZNlIQG7c4eN4NHo3YiLNJuBkZDoX+xCe+wWZJsuOOHgO50H5mTDvVTh/0vTmFPbWFR Whgw0d0XVOxb2XsOAqsIckOaduSv0KJ8A52pA= MIME-Version: 1.0 Received: by 10.182.115.5 with SMTP id jk5mr982114obb.6.1324372919570; Tue, 20 Dec 2011 01:21:59 -0800 (PST) Received: by 10.182.62.227 with HTTP; Tue, 20 Dec 2011 01:21:59 -0800 (PST) In-Reply-To: <20111220171740.X1005@besplex.bde.org> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> <20111220171740.X1005@besplex.bde.org> Date: Tue, 20 Dec 2011 01:21:59 -0800 Message-ID: From: Garrett Cooper To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Doug Barton , Max Khon , svn-src-all@freebsd.org, src-committers@freebsd.org, =?ISO-8859-1?B?R+Fib3IgS/Z2ZXNk4W4=?= , svn-src-head@freebsd.org, Warner Losh Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 09:22:00 -0000 On Mon, Dec 19, 2011 at 10:20 PM, Bruce Evans wrote: > On Mon, 19 Dec 2011, Warner Losh wrote: > >> On Nov 29, 2011, at 1:53 PM, Garrett Cooper wrote: >> >>> 2011/11/29 Doug Barton : >>>> >>>> On 11/29/2011 12:47, G=E1bor K=F6vesd=E1n wrote: >>>>> >>>>> On 2011.11.29. 20:46, Max Khon wrote: >>>>>> >>>>>> Log: >>>>>> =A0 Turn off profiled libs build by default. >>>>>> =A0 Can be enabled back using WITH_PROFILE=3Dyes in /etc/src.conf >>>>> >>>>> I think it was useful. Profiling is useful for developing any piece o= f >>>>> software that builds on libc or other common libs, even for software >>>>> that is not directly related to FreeBSD. I think it should be reverte= d. >>>> >>>> >>>> Since we ask users to read -current, it would be useful if our >>>> developers did too. :) >>>> >>>> As Max pointed out in his message about this, the profiled libs are on= ly >>>> really useful to a tiny percentage of developers. If you need them, >>>> twist the knob. Building them should be off by default. >>> >>> >>> +1. The needs of the many outweigh the needs of the few. As suggested >>> elsewhere, I think it would also be a good idea to enable it in >>> tinderbox builds. >> >> >> -1. =A0The needs of the many? =A0Please. =A0Let's break a useful feature= because >> some people don't understand it and are impatient? =A0That's lame. > > Don't be silly. =A0Building profiled libraries takes as much as 1 minute. > Many would not want to wait that long (if they noticed how long it takes)= . > This is not 1994 when building of profiling libraries was left in because > it only took an extra hour or or so. The assumption (that isn't clearly stated) is that I am building things on suped up x86 hardware, not arm CPUs, Intel Atoms, etc. On those platforms building superfluous things still do matter (in particular because cross-building some things still isn't doable 100% of the time, but also because flash, some platter media, etc is slow). But I suppose I digress... Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 10:06:40 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 675791065670; Tue, 20 Dec 2011 10:06:40 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theravensnest.org [109.169.23.128]) by mx1.freebsd.org (Postfix) with ESMTP id ED2EB8FC17; Tue, 20 Dec 2011 10:06:39 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cwma5-0-0-cust875.7-3.cable.virginmedia.com [86.11.39.108]) (authenticated bits=0) by theravensnest.org (8.14.4/8.14.4) with ESMTP id pBKA5qeJ021533 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 20 Dec 2011 10:05:52 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-1 From: David Chisnall In-Reply-To: <20111220171740.X1005@besplex.bde.org> Date: Tue, 20 Dec 2011 10:05:49 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> <20111220171740.X1005@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1251.1) Cc: Doug Barton , Garrett Cooper , Max Khon , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, =?iso-8859-1?Q?G=E1bor_K=F6vesd=E1n?= , svn-src-head@FreeBSD.org, Warner Losh Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 10:06:40 -0000 On 20 Dec 2011, at 06:20, Bruce Evans wrote: > Don't be silly. Building profiled libraries takes as much as 1 = minute. > Many would not want to wait that long (if they noticed how long it = takes). > This is not 1994 when building of profiling libraries was left in = because > it only took an extra hour or or so. One of the platforms I use has an 800MHz ARM processor. Building LLVM = (even a release build with asserts disabled and with all of the = cross-compile targets disabled) is an overnight job. On my main laptop, = a release build of LLVM takes about 5 minutes. Please don't assume that just because fast computers exist that they are = the only things people are using. A lot of the more interesting = platforms these days are significantly slower. David= From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 10:18:19 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3642F106566B; Tue, 20 Dec 2011 10:18:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id DBC458FC0A; Tue, 20 Dec 2011 10:18:17 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA26116; Tue, 20 Dec 2011 12:18:16 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Rcwm0-000JCY-0Y; Tue, 20 Dec 2011 12:18:16 +0200 Message-ID: <4EF060E7.5000204@FreeBSD.org> Date: Tue, 20 Dec 2011 12:18:15 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111206 Thunderbird/8.0 MIME-Version: 1.0 To: David Chisnall References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> <20111220171740.X1005@besplex.bde.org> <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> In-Reply-To: <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 10:18:19 -0000 on 20/12/2011 12:05 David Chisnall said the following: > On 20 Dec 2011, at 06:20, Bruce Evans wrote: > >> Don't be silly. Building profiled libraries takes as much as 1 minute. >> Many would not want to wait that long (if they noticed how long it takes). >> This is not 1994 when building of profiling libraries was left in because >> it only took an extra hour or or so. > > One of the platforms I use has an 800MHz ARM processor. Building LLVM (even a release build with asserts disabled and with all of the cross-compile targets disabled) is an overnight job. On my main laptop, a release build of LLVM takes about 5 minutes. > > Please don't assume that just because fast computers exist that they are the only things people are using. A lot of the more interesting platforms these days are significantly slower. I wonder if all the software that runs on the embedded stuff or mobile phones is built on the said hardware. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 11:13:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10BEE106566C; Tue, 20 Dec 2011 11:13:45 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E882A8FC15; Tue, 20 Dec 2011 11:13:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKBDiCE010382; Tue, 20 Dec 2011 11:13:44 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKBDiCC010376; Tue, 20 Dec 2011 11:13:44 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201112201113.pBKBDiCC010376@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Tue, 20 Dec 2011 11:13:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228730 - head/lib/libradius X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 11:13:45 -0000 Author: melifaro Date: Tue Dec 20 11:13:44 2011 New Revision: 228730 URL: http://svn.freebsd.org/changeset/base/228730 Log: Add binding support to libradius(3). Submitted by: Sergey Matveychuk Approved by: ae (mentor) MFC after: 2 weeks Modified: head/lib/libradius/Makefile head/lib/libradius/libradius.3 head/lib/libradius/radlib.c head/lib/libradius/radlib.h head/lib/libradius/radlib_private.h Modified: head/lib/libradius/Makefile ============================================================================== --- head/lib/libradius/Makefile Tue Dec 20 03:25:11 2011 (r228729) +++ head/lib/libradius/Makefile Tue Dec 20 11:13:44 2011 (r228730) @@ -36,6 +36,7 @@ MAN= libradius.3 radius.conf.5 MLINKS+=libradius.3 rad_acct_open.3 \ libradius.3 rad_add_server.3 \ libradius.3 rad_auth_open.3 \ + libradius.3 rad_bind_to.3 \ libradius.3 rad_close.3 \ libradius.3 rad_config.3 \ libradius.3 rad_continue_send_request.3 \ Modified: head/lib/libradius/libradius.3 ============================================================================== --- head/lib/libradius/libradius.3 Tue Dec 20 03:25:11 2011 (r228729) +++ head/lib/libradius/libradius.3 Tue Dec 20 11:13:44 2011 (r228730) @@ -91,6 +91,8 @@ .Fn rad_server_open "int fd" .Ft "const char *" .Fn rad_server_secret "struct rad_handle *h" +.Ft "void" +.Fn rad_bind_to "struct rad_handle *h" "in_addr_t addr" .Ft u_char * .Fn rad_demangle "struct rad_handle *h" "const void *mangled" "size_t mlen" .Ft u_char * @@ -431,6 +433,10 @@ returns the secret shared with the curre supplied rad_handle. .Pp The +.Fn rad_bind_to +assigns a source address for all requests to the current RADIUS server. +.Pp +The .Fn rad_demangle function demangles attributes containing passwords and MS-CHAPv1 MPPE-Keys. The return value is Modified: head/lib/libradius/radlib.c ============================================================================== --- head/lib/libradius/radlib.c Tue Dec 20 03:25:11 2011 (r228729) +++ head/lib/libradius/radlib.c Tue Dec 20 11:13:44 2011 (r228730) @@ -756,9 +756,16 @@ rad_create_request(struct rad_handle *h, clear_password(h); h->authentic_pos = 0; h->out_created = 1; + h->bindto = INADDR_ANY; return 0; } +void +rad_bind_to(struct rad_handle *h, in_addr_t addr) +{ + h->bindto = addr; +} + int rad_create_response(struct rad_handle *h, int code) { @@ -857,7 +864,7 @@ rad_init_send_request(struct rad_handle memset(&sin, 0, sizeof sin); sin.sin_len = sizeof sin; sin.sin_family = AF_INET; - sin.sin_addr.s_addr = INADDR_ANY; + sin.sin_addr.s_addr = h->bindto; sin.sin_port = htons(0); if (bind(h->fd, (const struct sockaddr *)&sin, sizeof sin) == -1) { Modified: head/lib/libradius/radlib.h ============================================================================== --- head/lib/libradius/radlib.h Tue Dec 20 03:25:11 2011 (r228729) +++ head/lib/libradius/radlib.h Tue Dec 20 11:13:44 2011 (r228730) @@ -195,6 +195,7 @@ struct rad_handle *rad_acct_open(void); int rad_add_server(struct rad_handle *, const char *, int, const char *, int, int); struct rad_handle *rad_auth_open(void); +void rad_bind_to(struct rad_handle *, in_addr_t); void rad_close(struct rad_handle *); int rad_config(struct rad_handle *, const char *); int rad_continue_send_request(struct rad_handle *, int, Modified: head/lib/libradius/radlib_private.h ============================================================================== --- head/lib/libradius/radlib_private.h Tue Dec 20 03:25:11 2011 (r228729) +++ head/lib/libradius/radlib_private.h Tue Dec 20 11:13:44 2011 (r228730) @@ -92,6 +92,7 @@ struct rad_handle { int try; /* How many requests we've sent */ int srv; /* Server number we did last */ int type; /* Handle type */ + in_addr_t bindto; /* Bind to address */ }; struct vendor_attribute { From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 11:40:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B8171065670; Tue, 20 Dec 2011 11:40:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78BBE8FC12; Tue, 20 Dec 2011 11:40:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKBeNZl011335; Tue, 20 Dec 2011 11:40:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKBeNKT011331; Tue, 20 Dec 2011 11:40:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112201140.pBKBeNKT011331@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Dec 2011 11:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228731 - in head/share/man: man4 man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 11:40:23 -0000 Author: mav Date: Tue Dec 20 11:40:22 2011 New Revision: 228731 URL: http://svn.freebsd.org/changeset/base/228731 Log: Add eventtimers(9) man page, describing related KPIs. Sponsored by: iXsystems, Inc. MFC after: 1 month Added: head/share/man/man9/eventtimers.9 (contents, props changed) Modified: head/share/man/man4/eventtimers.4 head/share/man/man9/Makefile Modified: head/share/man/man4/eventtimers.4 ============================================================================== --- head/share/man/man4/eventtimers.4 Tue Dec 20 11:13:44 2011 (r228730) +++ head/share/man/man4/eventtimers.4 Tue Dec 20 11:40:22 2011 (r228731) @@ -147,4 +147,5 @@ always generating. .Sh SEE ALSO .Xr atrtc 4 , .Xr attimer 4 , -.Xr hpet 4 +.Xr hpet 4 , +.Xr eventtimers 9 Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Dec 20 11:13:44 2011 (r228730) +++ head/share/man/man9/Makefile Tue Dec 20 11:40:22 2011 (r228731) @@ -102,6 +102,7 @@ MAN= accept_filter.9 \ driver.9 \ DRIVER_MODULE.9 \ EVENTHANDLER.9 \ + eventtimers.9 \ extattr.9 \ fail.9 \ fetch.9 \ @@ -614,6 +615,16 @@ MLINKS+=EVENTHANDLER.9 EVENTHANDLER_DECL EVENTHANDLER.9 eventhandler_prune_list.9 \ EVENTHANDLER.9 EVENTHANDLER_REGISTER.9 \ EVENTHANDLER.9 eventhandler_register.9 +MLINKS+=eventtimers.9 et_register.9 \ + eventtimers.9 et_deregister.9 \ + eventtimers.9 et_ban.9 \ + eventtimers.9 et_find.9 \ + eventtimers.9 et_free.9 \ + eventtimers.9 et_init.9 \ + eventtimers.9 ET_LOCK.9 \ + eventtimers.9 ET_UNLOCK.9 \ + eventtimers.9 et_start.9 \ + eventtimers.9 et_stop.9 MLINKS+=fetch.9 fubyte.9 \ fetch.9 fuswintr.9 \ fetch.9 fuword.9 \ Added: head/share/man/man9/eventtimers.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/eventtimers.9 Tue Dec 20 11:40:22 2011 (r228731) @@ -0,0 +1,236 @@ +.\" +.\" Copyright (c) 2011 Alexander Motin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``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 DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 14, 2011 +.Dt EVENTTIMERS 9 +.Os +.Sh NAME +.Nm eventtimers +.Nd kernel event timers subsystem +.Sh SYNOPSIS +.In sys/timeet.h +.Bd -literal +struct eventtimer; + +typedef int et_start_t(struct eventtimer *et, + struct bintime *first, struct bintime *period); +typedef int et_stop_t(struct eventtimer *et); +typedef void et_event_cb_t(struct eventtimer *et, void *arg); +typedef int et_deregister_cb_t(struct eventtimer *et, void *arg); + +struct eventtimer { + SLIST_ENTRY(eventtimer) et_all; + char *et_name; + int et_flags; +#define ET_FLAGS_PERIODIC 1 +#define ET_FLAGS_ONESHOT 2 +#define ET_FLAGS_PERCPU 4 +#define ET_FLAGS_C3STOP 8 +#define ET_FLAGS_POW2DIV 16 + int et_quality; + int et_active; + u_int64_t et_frequency; + struct bintime et_min_period; + struct bintime et_max_period; + et_start_t *et_start; + et_stop_t *et_stop; + et_event_cb_t *et_event_cb; + et_deregister_cb_t *et_deregister_cb; + void *et_arg; + void *et_priv; + struct sysctl_oid *et_sysctl; +}; +.Ed +.Ft int +.Fn et_register "struct eventtimer *et" +.Ft int +.Fn et_deregister "struct eventtimer *et" +.Fn ET_LOCK +.Fn ET_UNLOCK +.Ft struct eventtimer * +.Fn et_find "const char *name" "int check" "int want" +.Ft int +.Fn et_init "struct eventtimer *et" "et_event_cb_t *event" "et_deregister_cb_t *deregister" "void *arg" +.Ft int +.Fn et_start "struct eventtimer *et" "struct bintime *first" "struct bintime *period" +.Ft int +.Fn et_stop "struct eventtimer *et" +.Ft int +.Fn et_ban "struct eventtimer *et" +.Ft int +.Fn et_free "struct eventtimer *et" +.Sh DESCRIPTION +Event timers are responsible for generating interrupts at specified time +or periodically, to run different time-based events. +Subsystem consists of three main parts: +.Bl -tag +.It Drivers +Manage hardware to generate requested time events. +.It Consumers +.Pa sys/kern/kern_clocksource.c +uses event timers to supply kernel with +.Fn hardclock , +.Fn statclock +and +.Fn profclock +time events. +.It Glue code +.Pa sys/sys/timeet.h , +.Pa sys/kern/kern_et.c +provide APIs for event timer drivers and consumers. +.El +.Sh DRIVER API +Driver API is built around eventtimer structure. +To register its functionality driver allocates that structure and calls +.Fn et_register . +Driver should fill following fields there: +.Bl -tag +.It Va et_name +Unique name of the event timer for management purposes. +.It Va et_flags +Set of flags, describing timer capabilities: +.Bl -tag -width "ET_FLAGS_PERIODIC" -compact +.It ET_FLAGS_PERIODIC +Periodic mode supported. +.It ET_FLAGS_ONESHOT +One-shot mode supported. +.It ET_FLAGS_PERCPU +Timer is per-CPU. +.It ET_FLAGS_C3STOP +Timer may stop in CPU sleep state. +.It ET_FLAGS_POW2DIV +Timer supports only 2^n divisors. +.El +.It Va et_quality +Abstract value to certify whether this timecounter is better than the others. +Higher value means better. +.It Va et_frequency +Timer oscillator's base frequency, if applicable and known. +Used by consumers to predict set of possible frequencies that could be +obtained by dividing it. +Should be zero if not applicable or unknown. +.It Va et_min_period , et_max_period +Minimal and maximal reliably programmable time periods. +.It Va et_start +Driver's timer start function pointer. +.It Va et_stop +Driver's timer stop function pointer. +.It Va et_priv +Driver's private data storage. +.El +.Pp +After the event timer functionality is registered, it is controlled via +.Va et_start +and +.Va et_stop +methods. +.Va et_start +method is called to start the specified event timer. +The last two arguments are used to specify time when events should be +generated. +.Va first +argument specifies time period before the first event generated. +In periodic mode NULL value specifies that first period is equal to the +.Va period +argument value. +.Va period +argument specifies the time period between following events for the +periodic mode. +The NULL value there specifies the one-shot mode. +At least one of these two arguments should be not NULL. +When event time arrive, driver should call +.Va et_event_cb +callback function, passing +.Va et_arg +as the second argument. +.Va et_stop +method is called to stop the specified event timer. +For the per-CPU event timers +.Va et_start +and +.Va et_stop +methods control timers associated with the current CPU. +.Pp +Driver may deregister its functionality by calling +.Fn et_deregister . +.Sh CONSUMER API +.Fn et_find +allows consumer to find available event timer, optionally matching specific +name and/or capability flags. +Consumer may read returned eventtimer structure, but should not modify it. +When wanted event timer is found, +.Fn et_init +should be called for it, submitting +.Va event +and optionally +.Va deregister +callbacks functions, and the opaque argument +.Va arg . +That argument will be passed as argument to the callbacks. +Event callback function will be called on scheduled time events. +It is called from the hardware interrupt context, so no sleep is permitted +there. +Deregister callback function may be called to report consumer that the event +timer functionality is no longer available. +On this call, consumer should stop using event timer before the return. +.Pp +After the timer is found and initialized, it can be controlled via +.Fn et_start +and +.Fn et_stop . +The arguments are the same as described in driver API. +Per-CPU event timers can be controlled only from specific CPUs. +.Pp +.Fn et_ban +allows consumer to mark event timer as broken via clearing both one-shot and +periodic capability flags, if it was somehow detected. +.Fn et_free +is the opposite to +.Fn et_init . +It releases the event timer for other consumers use. +.Pp +.Fn ET_LOCK +and +.Fn ET_UNLOCK +macros should be used to manage +.Xr mutex 9 +lock around +.Fn et_find , +.Fn et_init +and +.Fn et_free +calls to serialize access to the list of the registered event timers and the +pointers returned by +.Fn et_find . +.Fn et_start +and +.Fn et_stop +calls should be serialized in consumer's internal way to avoid concurrent +timer hardware access. +.Sh SEE ALSO +.Xr eventtimers 4 +.Sh AUTHORS +.An Alexander Motin Aq mav@FreeBSD.org From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 12:34:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28AC1106566C; Tue, 20 Dec 2011 12:34:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 174068FC12; Tue, 20 Dec 2011 12:34:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKCYGo8014906; Tue, 20 Dec 2011 12:34:16 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKCYGbl014902; Tue, 20 Dec 2011 12:34:16 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112201234.pBKCYGbl014902@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 20 Dec 2011 12:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228732 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 12:34:17 -0000 Author: glebius Date: Tue Dec 20 12:34:16 2011 New Revision: 228732 URL: http://svn.freebsd.org/changeset/base/228732 Log: - Cover pfsync callouts deletion with PF_LOCK(). - Cover setting up interface between pf and pfsync with PF_LOCK(). Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Tue Dec 20 11:40:22 2011 (r228731) +++ head/sys/contrib/pf/net/if_pfsync.c Tue Dec 20 12:34:16 2011 (r228732) @@ -539,9 +539,13 @@ pfsync_clone_destroy(struct ifnet *ifp) #ifdef __FreeBSD__ EVENTHANDLER_DEREGISTER(ifnet_departure_event, sc->sc_detachtag); + PF_LOCK(); #endif - timeout_del(&sc->sc_bulk_tmo); /* XXX: need PF_LOCK() before */ + timeout_del(&sc->sc_bulk_tmo); timeout_del(&sc->sc_tmo); +#ifdef __FreeBSD__ + PF_UNLOCK(); +#endif #if NCARP > 0 #ifdef notyet #ifdef __FreeBSD__ @@ -3392,6 +3396,7 @@ vnet_pfsync_init(const void *unused) if (error) panic("%s: swi_add %d", __func__, error); + PF_LOCK(); pfsync_state_import_ptr = pfsync_state_import; pfsync_up_ptr = pfsync_up; pfsync_insert_state_ptr = pfsync_insert_state; @@ -3400,6 +3405,7 @@ vnet_pfsync_init(const void *unused) pfsync_clear_states_ptr = pfsync_clear_states; pfsync_state_in_use_ptr = pfsync_state_in_use; pfsync_defer_ptr = pfsync_defer; + PF_UNLOCK(); return (0); } @@ -3410,6 +3416,7 @@ vnet_pfsync_uninit(const void *unused) swi_remove(pfsync_swi.pfsync_swi_cookie); + PF_LOCK(); pfsync_state_import_ptr = NULL; pfsync_up_ptr = NULL; pfsync_insert_state_ptr = NULL; @@ -3418,6 +3425,7 @@ vnet_pfsync_uninit(const void *unused) pfsync_clear_states_ptr = NULL; pfsync_state_in_use_ptr = NULL; pfsync_defer_ptr = NULL; + PF_UNLOCK(); if_clone_detach(&pfsync_cloner); From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 12:34:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CD6E106564A; Tue, 20 Dec 2011 12:34:18 +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 0BB4C8FC08; Tue, 20 Dec 2011 12:34:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKCYHpN014933; Tue, 20 Dec 2011 12:34:17 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKCYH0v014930; Tue, 20 Dec 2011 12:34:17 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112201234.pBKCYH0v014930@svn.freebsd.org> From: Ed Schouten Date: Tue, 20 Dec 2011 12:34:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228733 - head/usr.sbin/makefs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 12:34:18 -0000 Author: ed Date: Tue Dec 20 12:34:17 2011 New Revision: 228733 URL: http://svn.freebsd.org/changeset/base/228733 Log: Small cleanups to panic() prototype. - Let panic() use _Noreturn and __printflike() instead of GCC-specific attributes. - Remove prototype from ffs_subr.c and let it include ffs_extern.h. - Forward declare struct inode to make ffs_extern.h not depend on it. Modified: head/usr.sbin/makefs/ffs/ffs_extern.h head/usr.sbin/makefs/ffs/ffs_subr.c Modified: head/usr.sbin/makefs/ffs/ffs_extern.h ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_extern.h Tue Dec 20 12:34:16 2011 (r228732) +++ head/usr.sbin/makefs/ffs/ffs_extern.h Tue Dec 20 12:34:17 2011 (r228733) @@ -35,6 +35,8 @@ #include "ffs/buf.h" +struct inode; + /* * Structure used to pass around logical block paths generated by * ufs_getlbns and used by truncate and bmap code. @@ -46,8 +48,7 @@ struct indir { }; /* ffs.c */ -void panic(const char *, ...) - __attribute__((__noreturn__,__format__(__printf__,1,2))); +_Noreturn void panic(const char *, ...) __printflike(1, 2); /* ffs_alloc.c */ int ffs_alloc(struct inode *, daddr_t, daddr_t, int, daddr_t *); Modified: head/usr.sbin/makefs/ffs/ffs_subr.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_subr.c Tue Dec 20 12:34:16 2011 (r228732) +++ head/usr.sbin/makefs/ffs/ffs_subr.c Tue Dec 20 12:34:17 2011 (r228733) @@ -38,11 +38,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include "ffs/ffs_extern.h" #include "ffs/ufs_bswap.h" -void panic __P((const char *, ...)) - __attribute__((__noreturn__,__format__(__printf__,1,2))); - /* * Update the frsum fields to reflect addition or deletion * of some frags. From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 13:32:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64A88106564A; Tue, 20 Dec 2011 13:32:57 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 390718FC17; Tue, 20 Dec 2011 13:32:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKDWv4j018045; Tue, 20 Dec 2011 13:32:57 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKDWvc4018043; Tue, 20 Dec 2011 13:32:57 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112201332.pBKDWvc4018043@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 20 Dec 2011 13:32:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228734 - head/contrib/pf/man X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 13:32:57 -0000 Author: glebius Date: Tue Dec 20 13:32:56 2011 New Revision: 228734 URL: http://svn.freebsd.org/changeset/base/228734 Log: - Fix examples to show new CARP style. - Remove OpenBSDisms, add FreeBSDisms. Modified: head/contrib/pf/man/pfsync.4 Modified: head/contrib/pf/man/pfsync.4 ============================================================================== --- head/contrib/pf/man/pfsync.4 Tue Dec 20 12:34:17 2011 (r228733) +++ head/contrib/pf/man/pfsync.4 Tue Dec 20 13:32:56 2011 (r228734) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 17 2009 +.Dd December 20 2011 .Dt PFSYNC 4 .Os .Sh NAME @@ -141,12 +141,11 @@ Interfaces configuration in .Pa /etc/rc.conf : .Bd -literal -offset indent network_interfaces="lo0 sis0 sis1 sis2" -cloned_interfaces="carp0 carp1" ifconfig_sis0="10.0.0.254/24" +ifconfig_sis0_alias0="inet 10.0.0.1/24 vhid 1 pass foo" ifconfig_sis1="192.168.0.254/24" +ifconfig_sis1_alias0="inet 192.168.0.1/24 vhid 2 pass bar" ifconfig_sis2="192.168.254.254/24" -ifconfig_carp0="vhid 1 pass foo 10.0.0.1/24" -ifconfig_carp1="vhid 2 pass bar 192.168.0.1/24" pfsync_enable="YES" pfsync_syncdev="sis2" .Ed @@ -169,13 +168,13 @@ therefore the .Ar advskew on the backup firewall's .Xr carp 4 -interfaces should be set to something higher than +vhids should be set to something higher than the primary's. For example, if firewall B is the backup, its carp1 configuration would look like this: would look like this: .Bd -literal -offset indent -ifconfig_carp1="vhid 2 pass bar advskew 100 192.168.0.1/24" +ifconfig_sis1_alias0="inet 192.168.0.1/24 vhid 2 pass bar advskew 100" .Ed .Pp The following must also be added to @@ -196,18 +195,18 @@ net.inet.carp.preempt=1 .Xr protocols 5 , .Xr rc.conf 5 , .Xr ifconfig 8 , -.Xr ifstated 8 , .Xr tcpdump 1 .Sh HISTORY The .Nm device first appeared in .Ox 3.3 . +It was first imported to +.Fx 5.3 . .Pp The .Nm -protocol and kernel implementation were significantly modified between -.Ox 4.4 -and -.Ox 4.5 . -The two protocols are incompatible and will not interoperate. +protocol and kernel implementation were significantly modified in +.Fx 9.0 . +The newer protocol is not compatible with older one and will not interoperate +with it. From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 13:49:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E94271065672; Tue, 20 Dec 2011 13:49:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6F778FC13; Tue, 20 Dec 2011 13:49:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKDnqiU018664; Tue, 20 Dec 2011 13:49:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKDnqg7018657; Tue, 20 Dec 2011 13:49:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112201349.pBKDnqg7018657@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Dec 2011 13:49:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228735 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 13:49:53 -0000 Author: mav Date: Tue Dec 20 13:49:52 2011 New Revision: 228735 URL: http://svn.freebsd.org/changeset/base/228735 Log: Add apic(4) man page, now mostly to cover its event timer functionality. Added: head/share/man/man4/apic.4 (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/atrtc.4 head/share/man/man4/attimer.4 head/share/man/man4/eventtimers.4 head/share/man/man4/hpet.4 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Dec 20 13:32:56 2011 (r228734) +++ head/share/man/man4/Makefile Tue Dec 20 13:49:52 2011 (r228735) @@ -38,6 +38,7 @@ MAN= aac.4 \ ${_amdtemp.4} \ amr.4 \ an.4 \ + ${_apic.4} \ arcmsr.4 \ ${_asmc.4} \ asr.4 \ @@ -673,6 +674,7 @@ _acpi_sony.4= acpi_sony.4 _acpi_toshiba.4=acpi_toshiba.4 _acpi_wmi.4= acpi_wmi.4 _aesni.4= aesni.4 +_apic.4= apic.4 _atrtc.4= atrtc.4 _attimer.4= attimer.4 _aibs.4= aibs.4 Added: head/share/man/man4/apic.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/apic.4 Tue Dec 20 13:49:52 2011 (r228735) @@ -0,0 +1,78 @@ +.\" Copyright (c) 2011 Alexander Motin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 20, 2011 +.Dt APIC 4 +.Os +.Sh NAME +.Nm apic +.Nd Advanced Programmable Interrupt Controller (APIC) driver +.Sh SYNOPSIS +This driver is a mandatory part of amd64 kernel. +To compile this driver into i386 or pc98 kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device apic" +.Ed +.Pp +The following tunable is settable from the +.Xr loader 8 : +.Bl -ohang +.It Va hint.apic. Ns Ar X Ns Va .clock +controls event timers functionality support. Setting to 0, disables it. +Default value is 1. +.It Va hint.apic. Ns Ar X Ns Va .disabled +Set this to 1 to disable APIC support, falling back to the legacy PIC. +.El +.Sh DESCRIPTION +There are two components in the Intel APIC system, the local APIC (LAPIC) +and the I/O APIC. +There is one LAPIC in each CPU in the system. +There is typically one I/O APIC for each peripheral bus in the system. +.Pp +LAPICs manage all external and interrupts for specific processor in an +SMP system. +In addition, they are able to accept and generate inter-processor interrupts +(IPIs). +.Pp +I/O APICs contain a redirection table, which is used to route the interrupts +they receive from peripheral buses to one or more local APICs. +.Pp +Each LAPIC includes one 32-bit programable timer. +This driver uses them to supply kernel with one event timer named "LAPIC". +Event timer provided by the driver supports both one-shot an periodic modes. +Because of LAPIC nature it is per-CPU. +The timer frequency is not reported by the platform and so automatically +measured by the driver on the first use. +Depending on CPU model this timer may stop in C3 and deeper CPU sleep states. +Driver automatically adjusts event timer priority and reports it to prevent +entering dangerous sleep states when it is used. +.Sh SEE ALSO +.Xr atrtc 4 , +.Xr attimer 4 , +.Xr eventtimers 4 , +.Xr hpet 4 Modified: head/share/man/man4/atrtc.4 ============================================================================== --- head/share/man/man4/atrtc.4 Tue Dec 20 13:32:56 2011 (r228734) +++ head/share/man/man4/atrtc.4 Tue Dec 20 13:49:52 2011 (r228735) @@ -51,6 +51,7 @@ divisors. .Pp Event timer provided by the driver is irrelevant to CPU power states. .Sh SEE ALSO +.Xr apic 4 , .Xr attimer 4 , -.Xr hpet 4 , -.Xr eventtimers 4 +.Xr eventtimers 4 , +.Xr hpet 4 Modified: head/share/man/man4/attimer.4 ============================================================================== --- head/share/man/man4/attimer.4 Tue Dec 20 13:32:56 2011 (r228734) +++ head/share/man/man4/attimer.4 Tue Dec 20 13:49:52 2011 (r228735) @@ -70,6 +70,7 @@ functionality is disabled. .Pp Event timer provided by the driver is irrelevant to CPU power states. .Sh SEE ALSO +.Xr apic 4 , .Xr atrtc 4 , -.Xr hpet 4 , -.Xr eventtimers 4 +.Xr eventtimers 4 , +.Xr hpet 4 Modified: head/share/man/man4/eventtimers.4 ============================================================================== --- head/share/man/man4/eventtimers.4 Tue Dec 20 13:32:56 2011 (r228734) +++ head/share/man/man4/eventtimers.4 Tue Dec 20 13:49:52 2011 (r228735) @@ -145,6 +145,7 @@ and runs in periodic mode, this option h always generating. .El .Sh SEE ALSO +.Xr apic 4 , .Xr atrtc 4 , .Xr attimer 4 , .Xr hpet 4 , Modified: head/share/man/man4/hpet.4 ============================================================================== --- head/share/man/man4/hpet.4 Tue Dec 20 13:32:56 2011 (r228734) +++ head/share/man/man4/hpet.4 Tue Dec 20 13:49:52 2011 (r228735) @@ -94,6 +94,7 @@ group is bound to specific CPU core. Thi of these comparators has own unsharable IRQ. .Sh SEE ALSO .Xr acpi 4 , +.Xr apic 4 , .Xr atrtc 4 , .Xr attimer 4 , .Xr eventtimers 4 From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 13:53:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB6261065672; Tue, 20 Dec 2011 13:53:32 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7B848FC18; Tue, 20 Dec 2011 13:53:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKDrWLk018824; Tue, 20 Dec 2011 13:53:32 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKDrWCj018817; Tue, 20 Dec 2011 13:53:32 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112201353.pBKDrWCj018817@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 20 Dec 2011 13:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228736 - in head: contrib/pf/man share/man/man4 sys/contrib/pf/net sys/net sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 13:53:32 -0000 Author: glebius Date: Tue Dec 20 13:53:31 2011 New Revision: 228736 URL: http://svn.freebsd.org/changeset/base/228736 Log: Restore a feature that was present in 5.x and 6.x, and was cleared in 7.x, 8.x and 9.x with pf(4) imports: pfsync(4) should suppress CARP preemption, while it is running its bulk update. However, reimplement the feature in more elegant manner, that is partially inspired by newer OpenBSD: - Rename term "suppression" to "demotion", to match with OpenBSD. - Keep a global demotion factor, that can be raised by several conditions, for now these are: - interface goes down - carp(4) has problems with ip_output() or ip6_output() - pfsync performs bulk update - Unlike in OpenBSD the demotion factor isn't a counter, but is actual value added to advskew. The adjustment values for particular error conditions are also configurable, and their defaults are maximum advskew value, so a single failure bumps demotion to maximum. This is for POLA compatibility, and should satisfy most users. - Demotion factor is a writable sysctl, so user can do foot shooting, if he desires to. Modified: head/contrib/pf/man/pfsync.4 head/share/man/man4/carp.4 head/sys/contrib/pf/net/if_pfsync.c head/sys/net/if.c head/sys/netinet/ip_carp.c head/sys/netinet/ip_carp.h Modified: head/contrib/pf/man/pfsync.4 ============================================================================== --- head/contrib/pf/man/pfsync.4 Tue Dec 20 13:49:52 2011 (r228735) +++ head/contrib/pf/man/pfsync.4 Tue Dec 20 13:53:31 2011 (r228736) @@ -114,6 +114,23 @@ Either run the pfsync protocol on a trus dedicated to pfsync messages such as a crossover cable between two firewalls, or specify a peer address and protect the traffic with .Xr ipsec 4 . +.Pp +.Nm +has the following +.Xr sysctl 8 +tunables: +.Bl -tag -width ".Va net.pfsync" +.It Va net.pfsync.carp_demotion_factor +Value added to +.Va net.inet.carp.demotion +while +.Nm +tries to perform its bulk update. +See +.Xr carp 4 +for more information. +Default value is 240. +.El .Sh EXAMPLES .Nm and Modified: head/share/man/man4/carp.4 ============================================================================== --- head/share/man/man4/carp.4 Tue Dec 20 13:49:52 2011 (r228735) +++ head/share/man/man4/carp.4 Tue Dec 20 13:53:31 2011 (r228736) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 16, 2011 +.Dd December 20, 2011 .Dt CARP 4 .Os .Sh NAME @@ -121,15 +121,38 @@ Values above 1 enable logging of bad .Nm packets. Default value is 1. -.It Va net.inet.carp.suppress_preempt -A read only value showing the status of preemption suppression. -Preemption can be suppressed if link on an interface is down -or when +.It Va net.inet.carp.demotion +This value shows current level of CARP demotion. +The value is added to the actual advskew sent in announcements for +all vhids. +At normal system operation the demotion factor is zero. +However, problematic conditions raise its level: when +.Nm +experiences problem with sending announcements, when an interface +running a vhid goes down, or while the .Xr pfsync 4 interface is not synchronized. -Value of 0 means that preemption is not suppressed, since no -problems are detected. -Every problem increments suppression counter. +The demotion value is writable, so that user may alter it +depending on some external conditions, for example on status of some +daemon utility. +However, altering the value should be performed with care, do +not conflict with subsystems that adjust demotion factor +automatically: +.Nm +and +.Xr pfsync 4 . +.It Va net.inet.carp.ifdown_demotion_factor +Value added to +.Va net.inet.carp.demotion +when interface running a vhid goes down. +Default value is 240 (maximum advskew value). +.It Va net.inet.carp.senderr_demotion_factor +Value added to +.Va net.inet.carp.demotion +when +.Nm +experiences errors sending its announcements. +Default value is 240 (maximum advskew value). .El .\".Sh ARP level load balancing .\"The Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Tue Dec 20 13:49:52 2011 (r228735) +++ head/sys/contrib/pf/net/if_pfsync.c Tue Dec 20 13:53:31 2011 (r228736) @@ -62,12 +62,6 @@ __FBSDID("$FreeBSD$"); #else #define NPFSYNC 0 #endif - -#ifdef DEV_CARP -#define NCARP DEV_CARP -#else -#define NCARP 0 -#endif #endif /* __FreeBSD__ */ #include @@ -127,12 +121,14 @@ __FBSDID("$FreeBSD$"); #include #endif /* INET6 */ -#ifndef __FreeBSD__ +#ifdef __FreeBSD__ +#include +#else #include "carp.h" -#endif #if NCARP > 0 #include #endif +#endif #include #include @@ -308,11 +304,15 @@ static VNET_DEFINE(struct pfsync_softc * static VNET_DEFINE(struct pfsyncstats, pfsyncstats); #define V_pfsyncstats VNET(pfsyncstats) +static VNET_DEFINE(int, pfsync_carp_adj) = CARP_MAXSKEW; +#define V_pfsync_carp_adj VNET(pfsync_carp_adj) SYSCTL_NODE(_net, OID_AUTO, pfsync, CTLFLAG_RW, 0, "PFSYNC"); SYSCTL_VNET_STRUCT(_net_pfsync, OID_AUTO, stats, CTLFLAG_RW, &VNET_NAME(pfsyncstats), pfsyncstats, "PFSYNC statistics (struct pfsyncstats, net/if_pfsync.h)"); +SYSCTL_INT(_net_pfsync, OID_AUTO, carp_demotion_factor, CTLFLAG_RW, + &VNET_NAME(pfsync_carp_adj), 0, "pfsync's CARP demotion factor adjustment"); #else struct pfsync_softc *pfsyncif = NULL; struct pfsyncstats pfsyncstats; @@ -505,11 +505,11 @@ pfsync_clone_create(struct if_clone *ifc if_attach(ifp); #ifndef __FreeBSD__ if_alloc_sadl(ifp); -#endif #if NCARP > 0 if_addgroup(ifp, "carp"); #endif +#endif #if NBPFILTER > 0 #ifdef __FreeBSD__ @@ -545,14 +545,11 @@ pfsync_clone_destroy(struct ifnet *ifp) timeout_del(&sc->sc_tmo); #ifdef __FreeBSD__ PF_UNLOCK(); -#endif -#if NCARP > 0 -#ifdef notyet -#ifdef __FreeBSD__ - if (!sc->pfsync_sync_ok) + if (!sc->pfsync_sync_ok && carp_demote_adj_p) + (*carp_demote_adj_p)(-V_pfsync_carp_adj, "pfsync destroy"); #else +#if NCARP > 0 if (!pfsync_sync_ok) -#endif carp_group_demote_adj(&sc->sc_if, -1); #endif #endif @@ -1636,19 +1633,16 @@ pfsync_in_bus(struct pfsync_pkt *pkt, st sc->sc_ureq_sent = 0; sc->sc_bulk_tries = 0; timeout_del(&sc->sc_bulkfail_tmo); -#if NCARP > 0 -#ifdef notyet #ifdef __FreeBSD__ - if (!sc->pfsync_sync_ok) + if (!sc->pfsync_sync_ok && carp_demote_adj_p) + (*carp_demote_adj_p)(-V_pfsync_carp_adj, + "pfsync bulk done"); + sc->pfsync_sync_ok = 1; #else +#if NCARP > 0 if (!pfsync_sync_ok) -#endif carp_group_demote_adj(&sc->sc_if, -1); #endif -#endif -#ifdef __FreeBSD__ - sc->pfsync_sync_ok = 1; -#else pfsync_sync_ok = 1; #endif #ifdef __FreeBSD__ @@ -1988,19 +1982,16 @@ pfsyncioctl(struct ifnet *ifp, u_long cm if (sc->sc_sync_if) { /* Request a full state table update. */ sc->sc_ureq_sent = time_uptime; -#if NCARP > 0 -#ifdef notyet #ifdef __FreeBSD__ - if (sc->pfsync_sync_ok) + if (sc->pfsync_sync_ok && carp_demote_adj_p) + (*carp_demote_adj_p)(V_pfsync_carp_adj, + "pfsync bulk start"); + sc->pfsync_sync_ok = 0; #else +#if NCARP > 0 if (pfsync_sync_ok) -#endif carp_group_demote_adj(&sc->sc_if, 1); #endif -#endif -#ifdef __FreeBSD__ - sc->pfsync_sync_ok = 0; -#else pfsync_sync_ok = 0; #endif #ifdef __FreeBSD__ @@ -3159,19 +3150,16 @@ pfsync_bulk_fail(void *arg) /* Pretend like the transfer was ok */ sc->sc_ureq_sent = 0; sc->sc_bulk_tries = 0; -#if NCARP > 0 -#ifdef notyet #ifdef __FreeBSD__ - if (!sc->pfsync_sync_ok) + if (!sc->pfsync_sync_ok && carp_demote_adj_p) + (*carp_demote_adj_p)(-V_pfsync_carp_adj, + "pfsync bulk fail"); + sc->pfsync_sync_ok = 1; #else +#if NCARP > 0 if (!pfsync_sync_ok) -#endif carp_group_demote_adj(&sc->sc_if, -1); #endif -#endif -#ifdef __FreeBSD__ - sc->pfsync_sync_ok = 1; -#else pfsync_sync_ok = 1; #endif #ifdef __FreeBSD__ Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Tue Dec 20 13:49:52 2011 (r228735) +++ head/sys/net/if.c Tue Dec 20 13:53:31 2011 (r228736) @@ -129,6 +129,7 @@ void (*ng_ether_link_state_p)(struct ifn void (*lagg_linkstate_p)(struct ifnet *ifp, int state); /* These are external hooks for CARP. */ void (*carp_linkstate_p)(struct ifnet *ifp); +void (*carp_demote_adj_p)(int, char *); #if defined(INET) || defined(INET6) int (*carp_forus_p)(struct ifnet *ifp, u_char *dhost); int (*carp_output_p)(struct ifnet *ifp, struct mbuf *m, Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Tue Dec 20 13:49:52 2011 (r228735) +++ head/sys/netinet/ip_carp.c Tue Dec 20 13:53:31 2011 (r228736) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -185,22 +186,30 @@ static int proto_reg[] = {-1, -1}; * dereferencing our function pointers. */ -int carp_suppress_preempt = 0; -int carp_opts[CARPCTL_MAXID] = { 0, 1, 0, 1, 0, }; +static int carp_allow = 1; /* Accept incoming CARP packets. */ +static int carp_preempt = 0; /* Preempt slower nodes. */ +static int carp_log = 1; /* Log level. */ +static int carp_demotion = 0; /* Global advskew demotion. */ +static int carp_senderr_adj = CARP_MAXSKEW; /* Send error demotion factor */ +static int carp_ifdown_adj = CARP_MAXSKEW; /* Iface down demotion factor */ + SYSCTL_NODE(_net_inet, IPPROTO_CARP, carp, CTLFLAG_RW, 0, "CARP"); -SYSCTL_INT(_net_inet_carp, CARPCTL_ALLOW, allow, CTLFLAG_RW, - &carp_opts[CARPCTL_ALLOW], 0, "Accept incoming CARP packets"); -SYSCTL_INT(_net_inet_carp, CARPCTL_PREEMPT, preempt, CTLFLAG_RW, - &carp_opts[CARPCTL_PREEMPT], 0, "high-priority backup preemption mode"); -SYSCTL_INT(_net_inet_carp, CARPCTL_LOG, log, CTLFLAG_RW, - &carp_opts[CARPCTL_LOG], 0, "log bad carp packets"); -SYSCTL_INT(_net_inet_carp, OID_AUTO, suppress_preempt, CTLFLAG_RD, - &carp_suppress_preempt, 0, "Preemption is suppressed"); - -struct carpstats carpstats; -SYSCTL_STRUCT(_net_inet_carp, CARPCTL_STATS, stats, CTLFLAG_RW, - &carpstats, carpstats, - "CARP statistics (struct carpstats, netinet/ip_carp.h)"); +SYSCTL_INT(_net_inet_carp, OID_AUTO, allow, CTLFLAG_RW, &carp_allow, 0, + "Accept incoming CARP packets"); +SYSCTL_INT(_net_inet_carp, OID_AUTO, preempt, CTLFLAG_RW, &carp_preempt, 0, + "High-priority backup preemption mode"); +SYSCTL_INT(_net_inet_carp, OID_AUTO, log, CTLFLAG_RW, &carp_log, 0, + "CARP log level"); +SYSCTL_INT(_net_inet_carp, OID_AUTO, demotion, CTLFLAG_RW, &carp_demotion, 0, + "Demotion factor (skew of advskew)"); +SYSCTL_INT(_net_inet_carp, OID_AUTO, senderr_demotion_factor, CTLFLAG_RW, + &carp_senderr_adj, 0, "Send error demotion factor adjustment"); +SYSCTL_INT(_net_inet_carp, OID_AUTO, ifdown_demotion_factor, CTLFLAG_RW, + &carp_ifdown_adj, 0, "Interface down demotion factor adjustment"); + +static struct carpstats carpstats; +SYSCTL_STRUCT(_net_inet_carp, OID_AUTO, stats, CTLFLAG_RW, &carpstats, + carpstats, "CARP statistics (struct carpstats, netinet/ip_carp.h)"); #define CARP_LOCK_INIT(sc) mtx_init(&(sc)->sc_mtx, "carp_softc", \ NULL, MTX_DEF) @@ -216,12 +225,12 @@ SYSCTL_STRUCT(_net_inet_carp, CARPCTL_ST #define CIF_UNLOCK(cif) mtx_unlock(&(cif)->cif_mtx) #define CARP_LOG(...) do { \ - if (carp_opts[CARPCTL_LOG] > 0) \ + if (carp_log > 0) \ log(LOG_INFO, "carp: " __VA_ARGS__); \ } while (0) #define CARP_DEBUG(...) do { \ - if (carp_opts[CARPCTL_LOG] > 1) \ + if (carp_log > 1) \ log(LOG_DEBUG, __VA_ARGS__); \ } while (0) @@ -241,6 +250,10 @@ SYSCTL_STRUCT(_net_inet_carp, CARPCTL_ST CIF_LOCK_ASSERT(ifp->if_carp); \ TAILQ_FOREACH((sc), &(ifp)->if_carp->cif_vrs, sc_list) +#define DEMOTE_ADVSKEW(sc) \ + (((sc)->sc_advskew + carp_demotion > CARP_MAXSKEW) ? \ + CARP_MAXSKEW : ((sc)->sc_advskew + carp_demotion)) + static void carp_input_c(struct mbuf *, struct carp_header *, sa_family_t); static struct carp_softc *carp_alloc(struct ifnet *); @@ -257,9 +270,13 @@ static void carp_send_ad(void *); static void carp_send_ad_locked(struct carp_softc *); static void carp_addroute(struct carp_softc *); static void carp_delroute(struct carp_softc *); +static void carp_send_ad_all(void *, int); +static void carp_demote_adj(int, char *); static LIST_HEAD(, carp_softc) carp_list; static struct mtx carp_mtx; +static struct task carp_sendall_task = + TASK_INITIALIZER(0, carp_send_ad_all, NULL); static __inline uint16_t carp_cksum(struct mbuf *m, int len) @@ -390,7 +407,7 @@ carp_input(struct mbuf *m, int hlen) CARPSTATS_INC(carps_ipackets); - if (!carp_opts[CARPCTL_ALLOW]) { + if (!carp_allow) { m_freem(m); return; } @@ -473,7 +490,7 @@ carp6_input(struct mbuf **mp, int *offp, CARPSTATS_INC(carps_ipackets6); - if (!carp_opts[CARPCTL_ALLOW]) { + if (!carp_allow) { m_freem(m); return (IPPROTO_DONE); } @@ -578,10 +595,7 @@ carp_input_c(struct mbuf *m, struct carp sc->sc_counter = tmp_counter; sc_tv.tv_sec = sc->sc_advbase; - if (carp_suppress_preempt && sc->sc_advskew < 240) - sc_tv.tv_usec = 240 * 1000000 / 256; - else - sc_tv.tv_usec = sc->sc_advskew * 1000000 / 256; + sc_tv.tv_usec = DEMOTE_ADVSKEW(sc) * 1000000 / 256; ch_tv.tv_sec = ch->carp_advbase; ch_tv.tv_usec = ch->carp_advskew * 1000000 / 256; @@ -610,8 +624,7 @@ carp_input_c(struct mbuf *m, struct carp * If we're pre-empting masters who advertise slower than us, * and this one claims to be slower, treat him as down. */ - if (carp_opts[CARPCTL_PREEMPT] && - timevalcmp(&sc_tv, &ch_tv, <)) { + if (carp_preempt && timevalcmp(&sc_tv, &ch_tv, <)) { CARP_LOG("VHID %u@%s: BACKUP -> MASTER " "(preempting a slower master)\n", sc->sc_vhid, @@ -679,26 +692,23 @@ carp_prepare_ad(struct mbuf *m, struct c return (0); } +/* + * To avoid LORs and possible recursions this function shouldn't + * be called directly, but scheduled via taskqueue. + */ static void -carp_send_ad_all(struct carp_softc *badsc) +carp_send_ad_all(void *ctx __unused, int pending __unused) { struct carp_softc *sc; - /* - * Avoid LOR and recursive call to carp_send_ad_locked(). - */ - CARP_UNLOCK(badsc); - mtx_lock(&carp_mtx); LIST_FOREACH(sc, &carp_list, sc_next) - if (sc != badsc && sc->sc_state == MASTER) { + if (sc->sc_state == MASTER) { CARP_LOCK(sc); carp_send_ad_locked(sc); CARP_UNLOCK(sc); } mtx_unlock(&carp_mtx); - - CARP_LOCK(badsc); } static void @@ -724,10 +734,7 @@ carp_send_ad_locked(struct carp_softc *s CARP_LOCK_ASSERT(sc); - if (!carp_suppress_preempt || sc->sc_advskew > 240) - advskew = sc->sc_advskew; - else - advskew = 240; + advskew = DEMOTE_ADVSKEW(sc); tv.tv_sec = sc->sc_advbase; tv.tv_usec = advskew * 1000000 / 256; @@ -797,17 +804,15 @@ carp_send_ad_locked(struct carp_softc *s &sc->sc_carpdev->if_carp->cif_imo, NULL)) { if (sc->sc_sendad_errors < INT_MAX) sc->sc_sendad_errors++; - if (sc->sc_sendad_errors == CARP_SENDAD_MAX_ERRORS) { - carp_suppress_preempt++; - if (carp_suppress_preempt == 1) - carp_send_ad_all(sc); - } + if (sc->sc_sendad_errors == CARP_SENDAD_MAX_ERRORS) + carp_demote_adj(carp_senderr_adj, "send error"); sc->sc_sendad_success = 0; } else { if (sc->sc_sendad_errors >= CARP_SENDAD_MAX_ERRORS) { if (++sc->sc_sendad_success >= CARP_SENDAD_MIN_SUCCESS) { - carp_suppress_preempt--; + carp_demote_adj(-carp_senderr_adj, + "send ok"); sc->sc_sendad_errors = 0; } } else @@ -875,17 +880,16 @@ carp_send_ad_locked(struct carp_softc *s &sc->sc_carpdev->if_carp->cif_im6o, NULL, NULL)) { if (sc->sc_sendad_errors < INT_MAX) sc->sc_sendad_errors++; - if (sc->sc_sendad_errors == CARP_SENDAD_MAX_ERRORS) { - carp_suppress_preempt++; - if (carp_suppress_preempt == 1) - carp_send_ad_all(sc); - } + if (sc->sc_sendad_errors == CARP_SENDAD_MAX_ERRORS) + carp_demote_adj(carp_senderr_adj, + "send6 error"); sc->sc_sendad_success = 0; } else { if (sc->sc_sendad_errors >= CARP_SENDAD_MAX_ERRORS) { if (++sc->sc_sendad_success >= CARP_SENDAD_MIN_SUCCESS) { - carp_suppress_preempt--; + carp_demote_adj(-carp_senderr_adj, + "send6 ok"); sc->sc_sendad_errors = 0; } } else @@ -1479,6 +1483,8 @@ carp_destroy(struct carp_softc *sc) mtx_unlock(&carp_mtx); CARP_LOCK(sc); + if (sc->sc_suppress) + carp_demote_adj(-carp_ifdown_adj, "vhid removed"); callout_drain(&sc->sc_ad_tmo); #ifdef INET callout_drain(&sc->sc_md_tmo); @@ -1914,21 +1920,25 @@ carp_sc_state(struct carp_softc *sc) #endif carp_set_state(sc, INIT); carp_setrun(sc, 0); - if (!sc->sc_suppress) { - carp_suppress_preempt++; - if (carp_suppress_preempt == 1) - carp_send_ad_all(sc); - } + if (!sc->sc_suppress) + carp_demote_adj(carp_ifdown_adj, "interface down"); sc->sc_suppress = 1; } else { carp_set_state(sc, INIT); carp_setrun(sc, 0); if (sc->sc_suppress) - carp_suppress_preempt--; + carp_demote_adj(-carp_ifdown_adj, "interface up"); sc->sc_suppress = 0; } } +static void +carp_demote_adj(int adj, char *reason) +{ + carp_demotion += adj; + CARP_LOG("demoted by %d to %d (%s)\n", adj, carp_demotion, reason); + taskqueue_enqueue(taskqueue_swi, &carp_sendall_task); +} #ifdef INET extern struct domain inetdomain; @@ -1986,6 +1996,9 @@ carp_mod_cleanup(void) carp_linkstate_p = NULL; carp_forus_p = NULL; carp_output_p = NULL; + carp_demote_adj_p = NULL; + mtx_unlock(&carp_mtx); + taskqueue_drain(taskqueue_swi, &carp_sendall_task); mtx_destroy(&carp_mtx); } @@ -2003,6 +2016,7 @@ carp_mod_load(void) carp_ioctl_p = carp_ioctl; carp_attach_p = carp_attach; carp_detach_p = carp_detach; + carp_demote_adj_p = carp_demote_adj; #ifdef INET6 carp_iamatch6_p = carp_iamatch6; carp_macmatch6_p = carp_macmatch6; Modified: head/sys/netinet/ip_carp.h ============================================================================== --- head/sys/netinet/ip_carp.h Tue Dec 20 13:49:52 2011 (r228735) +++ head/sys/netinet/ip_carp.h Tue Dec 20 13:53:31 2011 (r228736) @@ -133,29 +133,13 @@ struct carpreq { #define CARP_STATES "INIT", "BACKUP", "MASTER" #define CARP_MAXSTATE 2 int carpr_advskew; +#define CARP_MAXSKEW 240 int carpr_advbase; unsigned char carpr_key[CARP_KEY_LEN]; }; #define SIOCSVH _IOWR('i', 245, struct ifreq) #define SIOCGVH _IOWR('i', 246, struct ifreq) -/* - * Names for CARP sysctl objects - */ -#define CARPCTL_ALLOW 1 /* accept incoming CARP packets */ -#define CARPCTL_PREEMPT 2 /* high-pri backup preemption mode */ -#define CARPCTL_LOG 3 /* log bad packets */ -#define CARPCTL_STATS 4 /* statistics (read-only) */ -#define CARPCTL_MAXID 5 - -#define CARPCTL_NAMES { \ - { 0, 0 }, \ - { "allow", CTLTYPE_INT }, \ - { "preempt", CTLTYPE_INT }, \ - { "log", CTLTYPE_INT }, \ - { "stats", CTLTYPE_STRUCT }, \ -} - #ifdef _KERNEL int carp_ioctl(struct ifreq *, u_long, struct thread *); int carp_attach(struct ifaddr *, int); @@ -175,6 +159,7 @@ extern int (*carp_ioctl_p)(struct ifreq extern int (*carp_attach_p)(struct ifaddr *, int); extern void (*carp_detach_p)(struct ifaddr *); extern void (*carp_linkstate_p)(struct ifnet *); +extern void (*carp_demote_adj_p)(int, char *); /* net/if_bridge.c net/if_ethersubr.c */ extern int (*carp_forus_p)(struct ifnet *, u_char *); /* net/if_ethersubr.c */ From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 14:12:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AC1D106564A; Tue, 20 Dec 2011 14:12:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39BB28FC0C; Tue, 20 Dec 2011 14:12:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKECp6h019576; Tue, 20 Dec 2011 14:12:51 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKECpWd019574; Tue, 20 Dec 2011 14:12:51 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112201412.pBKECpWd019574@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Dec 2011 14:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228737 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 14:12:51 -0000 Author: mav Date: Tue Dec 20 14:12:50 2011 New Revision: 228737 URL: http://svn.freebsd.org/changeset/base/228737 Log: Remove extra "and" left from earlier version. Modified: head/share/man/man4/apic.4 Modified: head/share/man/man4/apic.4 ============================================================================== --- head/share/man/man4/apic.4 Tue Dec 20 13:53:31 2011 (r228736) +++ head/share/man/man4/apic.4 Tue Dec 20 14:12:50 2011 (r228737) @@ -54,8 +54,7 @@ and the I/O APIC. There is one LAPIC in each CPU in the system. There is typically one I/O APIC for each peripheral bus in the system. .Pp -LAPICs manage all external and interrupts for specific processor in an -SMP system. +LAPICs manage all external interrupts for specific processor in an SMP system. In addition, they are able to accept and generate inter-processor interrupts (IPIs). .Pp From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 14:52:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A55E8106566C; Tue, 20 Dec 2011 14:52:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7C2588FC12; Tue, 20 Dec 2011 14:52:49 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 33AAC46B0D; Tue, 20 Dec 2011 09:52:49 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 750BAB955; Tue, 20 Dec 2011 09:52:48 -0500 (EST) From: John Baldwin To: Alexander Motin Date: Tue, 20 Dec 2011 09:27:52 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201112201412.pBKECpWd019574@svn.freebsd.org> In-Reply-To: <201112201412.pBKECpWd019574@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201112200927.52405.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 20 Dec 2011 09:52:48 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228737 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 14:52:49 -0000 On Tuesday, December 20, 2011 9:12:51 am Alexander Motin wrote: > Author: mav > Date: Tue Dec 20 14:12:50 2011 > New Revision: 228737 > URL: http://svn.freebsd.org/changeset/base/228737 > > Log: > Remove extra "and" left from earlier version. > > Modified: > head/share/man/man4/apic.4 > > Modified: head/share/man/man4/apic.4 > ============================================================================== > --- head/share/man/man4/apic.4 Tue Dec 20 13:53:31 2011 (r228736) > +++ head/share/man/man4/apic.4 Tue Dec 20 14:12:50 2011 (r228737) > @@ -54,8 +54,7 @@ and the I/O APIC. > There is one LAPIC in each CPU in the system. > There is typically one I/O APIC for each peripheral bus in the system. > .Pp > -LAPICs manage all external and interrupts for specific processor in an > -SMP system. > +LAPICs manage all external interrupts for specific processor in an SMP system. > In addition, they are able to accept and generate inter-processor interrupts > (IPIs). > .Pp Hmm, can you call it a "local APIC" rather than LAPIC? The Intel manuals all use the longer form. Also, 'for a specific processor' reads better. Note that some UP systems have CPUs with local APICs as well, so they are not specific to SMP systems. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 15:19:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE0D91065673; Tue, 20 Dec 2011 15:19:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1E8E8FC21; Tue, 20 Dec 2011 15:19:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKFJT3e021826; Tue, 20 Dec 2011 15:19:29 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKFJTwd021822; Tue, 20 Dec 2011 15:19:29 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112201519.pBKFJTwd021822@svn.freebsd.org> From: John Baldwin Date: Tue, 20 Dec 2011 15:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228738 - in head: sys/boot/i386/boot0 usr.sbin/boot0cfg X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 15:19:30 -0000 Author: jhb Date: Tue Dec 20 15:19:29 2011 New Revision: 228738 URL: http://svn.freebsd.org/changeset/base/228738 Log: Allow boot0cfg to force a PXE boot via boot0 on the next boot. - Fix boot0 to check for PXE when using the pre-set setting for the preferred slice. - Update boot0cfg to use slice 6 to select PXE. Accept a 'pxe' argument instead of a number for the 's' option as a way to select PXE as well. Submitted by: Andrew Boyer aboyer averesystems MFC after: 2 weeks Modified: head/sys/boot/i386/boot0/boot0.S head/usr.sbin/boot0cfg/boot0cfg.8 head/usr.sbin/boot0cfg/boot0cfg.c Modified: head/sys/boot/i386/boot0/boot0.S ============================================================================== --- head/sys/boot/i386/boot0/boot0.S Tue Dec 20 14:12:50 2011 (r228737) +++ head/sys/boot/i386/boot0/boot0.S Tue Dec 20 15:19:29 2011 (r228738) @@ -413,6 +413,7 @@ got_key: 3: #endif /* ONLY_F_KEYS */ #endif /* SIO */ +check_selection: cmpb $0x5,%al # F1..F6 or 1..6 ? #ifdef PXE /* enable PXE/INT18 using F6 */ jne 1f; @@ -421,7 +422,6 @@ got_key: #endif /* PXE */ jae beep # Not in F1..F5, beep -check_selection: /* * We have a selection. If it's a bad selection go back to complain. * The bits in MNUOPT were set when the options were printed. Modified: head/usr.sbin/boot0cfg/boot0cfg.8 ============================================================================== --- head/usr.sbin/boot0cfg/boot0cfg.8 Tue Dec 20 14:12:50 2011 (r228737) +++ head/usr.sbin/boot0cfg/boot0cfg.8 Tue Dec 20 15:19:29 2011 (r228738) @@ -146,6 +146,9 @@ Set the default boot selection to .Ar slice . Values between 1 and 4 refer to slices; a value of 5 refers to the option of booting from a second disk. +The special string +.Dq PXE +or a value of 6 can be used to boot via PXE. .It Fl t Ar ticks Set the timeout value to .Ar ticks . Modified: head/usr.sbin/boot0cfg/boot0cfg.c ============================================================================== --- head/usr.sbin/boot0cfg/boot0cfg.c Tue Dec 20 14:12:50 2011 (r228737) +++ head/usr.sbin/boot0cfg/boot0cfg.c Tue Dec 20 15:19:29 2011 (r228738) @@ -169,7 +169,10 @@ main(int argc, char *argv[]) o_flag = 1; break; case 's': - s_arg = argtoi(optarg, 1, 5, 's'); + if (strcasecmp(optarg, "pxe") == 0) + s_arg = 6; + else + s_arg = argtoi(optarg, 1, 6, 's'); break; case 't': t_arg = argtoi(optarg, 1, 0xffff, 't'); @@ -472,8 +475,10 @@ display_mbr(u_int8_t *mbr) printf("default_selection=F%d (", mbr[OFF_OPT] + 1); if (mbr[OFF_OPT] < 4) printf("Slice %d", mbr[OFF_OPT] + 1); - else + else if (mbr[OFF_OPT] == 4) printf("Drive 1"); + else + printf("PXE"); printf(")\n"); } From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 15:19:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADA3C106566B; Tue, 20 Dec 2011 15:19:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98AC98FC13; Tue, 20 Dec 2011 15:19:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKFJXsV021861; Tue, 20 Dec 2011 15:19:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKFJX5S021859; Tue, 20 Dec 2011 15:19:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112201519.pBKFJX5S021859@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Dec 2011 15:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228739 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 15:19:33 -0000 Author: mav Date: Tue Dec 20 15:19:33 2011 New Revision: 228739 URL: http://svn.freebsd.org/changeset/base/228739 Log: s/LAPIC/local APIC/ to closer follow Intel documents. Submitted by: jhb Modified: head/share/man/man4/apic.4 Modified: head/share/man/man4/apic.4 ============================================================================== --- head/share/man/man4/apic.4 Tue Dec 20 15:19:29 2011 (r228738) +++ head/share/man/man4/apic.4 Tue Dec 20 15:19:33 2011 (r228739) @@ -51,20 +51,20 @@ Set this to 1 to disable APIC support, f .Sh DESCRIPTION There are two components in the Intel APIC system, the local APIC (LAPIC) and the I/O APIC. -There is one LAPIC in each CPU in the system. +There is one local APIC in each CPU in the system. There is typically one I/O APIC for each peripheral bus in the system. .Pp -LAPICs manage all external interrupts for specific processor in an SMP system. +Local APICs manage all external interrupts for a specific processor. In addition, they are able to accept and generate inter-processor interrupts (IPIs). .Pp I/O APICs contain a redirection table, which is used to route the interrupts they receive from peripheral buses to one or more local APICs. .Pp -Each LAPIC includes one 32-bit programable timer. +Each local APIC includes one 32-bit programable timer. This driver uses them to supply kernel with one event timer named "LAPIC". Event timer provided by the driver supports both one-shot an periodic modes. -Because of LAPIC nature it is per-CPU. +Because of local APIC nature it is per-CPU. The timer frequency is not reported by the platform and so automatically measured by the driver on the first use. Depending on CPU model this timer may stop in C3 and deeper CPU sleep states. From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 15:50:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 521D8106564A; Tue, 20 Dec 2011 15:50:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B0078FC1C; Tue, 20 Dec 2011 15:50:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKFotZO023044; Tue, 20 Dec 2011 15:50:55 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKFotln023041; Tue, 20 Dec 2011 15:50:55 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201112201550.pBKFotln023041@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 20 Dec 2011 15:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228740 - head/sbin/newfs_msdos X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 15:50:55 -0000 Author: pfg Date: Tue Dec 20 15:50:54 2011 New Revision: 228740 URL: http://svn.freebsd.org/changeset/base/228740 Log: Many style fixes. Remove C99 initializers: they don't help in this case. Set errno to 0 before strtoll() (from NetBSD). PR: 151850 Suggested by: bde Approved by: jhb (Mentor) MFC after: 2 weeks Modified: head/sbin/newfs_msdos/newfs_msdos.8 head/sbin/newfs_msdos/newfs_msdos.c Modified: head/sbin/newfs_msdos/newfs_msdos.8 ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.8 Tue Dec 20 15:19:33 2011 (r228739) +++ head/sbin/newfs_msdos/newfs_msdos.8 Tue Dec 20 15:50:54 2011 (r228740) @@ -180,27 +180,27 @@ For reference purposes, this structure i below. .Bd -literal struct bsbpb { - u_int16_t bps; /* [-S] bytes per sector */ - u_int8_t spc; /* [-c] sectors per cluster */ - u_int16_t res; /* [-r] reserved sectors */ - u_int8_t nft; /* [-n] number of FATs */ - u_int16_t rde; /* [-e] root directory entries */ - u_int16_t sec; /* [-s] total sectors */ - u_int8_t mid; /* [-m] media descriptor */ - u_int16_t spf; /* [-a] sectors per FAT */ - u_int16_t spt; /* [-u] sectors per track */ - u_int16_t hds; /* [-h] drive heads */ - u_int32_t hid; /* [-o] hidden sectors */ - u_int32_t bsec; /* [-s] big total sectors */ + u_int16_t bpbBytesPerSec; /* [-S] bytes per sector */ + u_int8_t bpbSecPerClust; /* [-c] sectors per cluster */ + u_int16_t bpbResSectors; /* [-r] reserved sectors */ + u_int8_t bpbFATs; /* [-n] number of FATs */ + u_int16_t bpbRootDirEnts; /* [-e] root directory entries */ + u_int16_t bpbSectors; /* [-s] total sectors */ + u_int8_t bpbMedia; /* [-m] media descriptor */ + u_int16_t bpbFATsecs; /* [-a] sectors per FAT */ + u_int16_t bpbSecPerTrack; /* [-u] sectors per track */ + u_int16_t bpbHeads; /* [-h] drive heads */ + u_int32_t bpbHiddenSecs; /* [-o] hidden sectors */ + u_int32_t bpbHugeSectors; /* [-s] big total sectors */ }; /* FAT32 extensions */ struct bsxbpb { - u_int32_t bspf; /* [-a] big sectors per FAT */ - u_int16_t xflg; /* control flags */ - u_int16_t vers; /* file system version */ - u_int32_t rdcl; /* root directory start cluster */ - u_int16_t infs; /* [-i] file system info sector */ - u_int16_t bkbs; /* [-k] backup boot sector */ + u_int32_t bpbBigFATsecs; /* [-a] big sectors per FAT */ + u_int16_t bpbExtFlags; /* control flags */ + u_int16_t bpbFSVers; /* file system version */ + u_int32_t bpbRootClust; /* root directory start cluster */ + u_int16_t bpbFSInfo; /* [-i] file system info sector */ + u_int16_t bpbBackup; /* [-k] backup boot sector */ }; .Ed .Sh LIMITATION Modified: head/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.c Tue Dec 20 15:19:33 2011 (r228739) +++ head/sbin/newfs_msdos/newfs_msdos.c Tue Dec 20 15:50:54 2011 (r228740) @@ -66,7 +66,7 @@ static const char rcsid[] = #define MINCLS12 1U /* minimum FAT12 clusters */ #define MINCLS16 0x1000U /* minimum FAT16 clusters */ #define MINCLS32 2U /* minimum FAT32 clusters */ -#define MAXCLS12 0xfedU /* maximum FAT12 clusters */ +#define MAXCLS12 0xfedU /* maximum FAT12 clusters */ #define MAXCLS16 0xfff5U /* maximum FAT16 clusters */ #define MAXCLS32 0xffffff5U /* maximum FAT32 clusters */ @@ -97,7 +97,7 @@ static const char rcsid[] = #define argtox(arg, lo, msg) argtou(arg, lo, UINT_MAX, msg) struct bs { - u_int8_t bsJump[3]; /* bootstrap entry point */ + u_int8_t bsJump[3]; /* bootstrap entry point */ u_int8_t bsOemName[8]; /* OEM name and version */ } __packed; @@ -123,7 +123,7 @@ struct bsxbpb { u_int8_t bpbRootClust[4]; /* root directory start cluster */ u_int8_t bpbFSInfo[2]; /* file system info sector */ u_int8_t bpbBackup[2]; /* backup boot sector */ - u_int8_t bpbReserved[12]; /* reserved */ + u_int8_t bpbReserved[12]; /* reserved */ } __packed; struct bsx { @@ -136,13 +136,13 @@ struct bsx { } __packed; struct de { - u_int8_t deName[11]; /* name and extension */ - u_int8_t deAttributes; /* attributes */ - u_int8_t rsvd[10]; /* reserved */ - u_int8_t deMTime[2]; /* creation time */ - u_int8_t deMDate[2]; /* creation date */ - u_int8_t deStartCluster[2]; /* starting cluster */ - u_int8_t deFileSize[4]; /* size */ + u_int8_t deName[11]; /* name and extension */ + u_int8_t deAttributes; /* attributes */ + u_int8_t rsvd[10]; /* reserved */ + u_int8_t deMTime[2]; /* creation time */ + u_int8_t deMDate[2]; /* creation date */ + u_int8_t deStartCluster[2]; /* starting cluster */ + u_int8_t deFileSize[4]; /* size */ } __packed; struct bpb { @@ -160,29 +160,26 @@ struct bpb { u_int bpbHugeSectors; /* big total sectors */ u_int bpbBigFATsecs; /* big sectors per FAT */ u_int bpbRootClust; /* root directory start cluster */ - u_int bpbFSInfo; /* file system info sector */ - u_int bpbBackup; /* backup boot sector */ + u_int bpbFSInfo; /* file system info sector */ + u_int bpbBackup; /* backup boot sector */ }; #define BPBGAP 0, 0, 0, 0, 0, 0 -#define INIT(a, b, c, d, e, f, g, h, i, j) \ - { .bpbBytesPerSec = a, .bpbSecPerClust = b, .bpbResSectors = c, .bpbFATs = d, .bpbRootDirEnts = e, \ - .bpbSectors = f, .bpbMedia = g, .bpbFATsecs = h, .bpbSecPerTrack = i, .bpbHeads = j, } static struct { const char *name; struct bpb bpb; } const stdfmt[] = { - {"160", INIT(512, 1, 1, 2, 64, 320, 0xfe, 1, 8, 1)}, - {"180", INIT(512, 1, 1, 2, 64, 360, 0xfc, 2, 9, 1)}, - {"320", INIT(512, 2, 1, 2, 112, 640, 0xff, 1, 8, 2)}, - {"360", INIT(512, 2, 1, 2, 112, 720, 0xfd, 2, 9, 2)}, - {"640", INIT(512, 2, 1, 2, 112, 1280, 0xfb, 2, 8, 2)}, - {"720", INIT(512, 2, 1, 2, 112, 1440, 0xf9, 3, 9, 2)}, - {"1200", INIT(512, 1, 1, 2, 224, 2400, 0xf9, 7, 15, 2)}, - {"1232", INIT(1024,1, 1, 2, 192, 1232, 0xfe, 2, 8, 2)}, - {"1440", INIT(512, 1, 1, 2, 224, 2880, 0xf0, 9, 18, 2)}, - {"2880", INIT(512, 2, 1, 2, 240, 5760, 0xf0, 9, 36, 2)} + {"160", {512, 1, 1, 2, 64, 320, 0xfe, 1, 8, 1, BPBGAP}}, + {"180", {512, 1, 1, 2, 64, 360, 0xfc, 2, 9, 1, BPBGAP}}, + {"320", {512, 2, 1, 2, 112, 640, 0xff, 1, 8, 2, BPBGAP}}, + {"360", {512, 2, 1, 2, 112, 720, 0xfd, 2, 9, 2, BPBGAP}}, + {"640", {512, 2, 1, 2, 112, 1280, 0xfb, 2, 8, 2, BPBGAP}}, + {"720", {512, 2, 1, 2, 112, 1440, 0xf9, 3, 9, 2, BPBGAP}}, + {"1200", {512, 1, 1, 2, 224, 2400, 0xf9, 7, 15, 2, BPBGAP}}, + {"1232", {1024,1, 1, 2, 192, 1232, 0xfe, 2, 8, 2, BPBGAP}}, + {"1440", {512, 1, 1, 2, 224, 2880, 0xf0, 9, 18, 2, BPBGAP}}, + {"2880", {512, 2, 1, 2, 240, 5760, 0xf0, 9, 36, 2, BPBGAP}} }; static const u_int8_t bootcode[] = { @@ -494,7 +491,8 @@ main(int argc, char *argv[]) if ((fd1 = open(bname, O_RDONLY)) == -1 || fstat(fd1, &sb)) err(1, "%s", bname); if (!S_ISREG(sb.st_mode) || sb.st_size % bpb.bpbBytesPerSec || - sb.st_size < bpb.bpbBytesPerSec || sb.st_size > bpb.bpbBytesPerSec * MAXU16) + sb.st_size < bpb.bpbBytesPerSec || + sb.st_size > bpb.bpbBytesPerSec * MAXU16) errx(1, "%s: inappropriate file type or format", bname); bss = sb.st_size / bpb.bpbBytesPerSec; } @@ -503,19 +501,23 @@ main(int argc, char *argv[]) if (!fat) { if (bpb.bpbHugeSectors < (bpb.bpbResSectors ? bpb.bpbResSectors : bss) + howmany((RESFTE + (bpb.bpbSecPerClust ? MINCLS16 : MAXCLS12 + 1)) * - ((bpb.bpbSecPerClust ? 16 : 12) / BPN), bpb.bpbBytesPerSec * NPB) * + (bpb.bpbSecPerClust ? 16 : 12) / BPN, + bpb.bpbBytesPerSec * NPB) * bpb.bpbFATs + howmany(bpb.bpbRootDirEnts ? bpb.bpbRootDirEnts : DEFRDE, bpb.bpbBytesPerSec / sizeof(struct de)) + (bpb.bpbSecPerClust ? MINCLS16 : MAXCLS12 + 1) * - (bpb.bpbSecPerClust ? bpb.bpbSecPerClust : howmany(DEFBLK, bpb.bpbBytesPerSec))) + (bpb.bpbSecPerClust ? bpb.bpbSecPerClust : + howmany(DEFBLK, bpb.bpbBytesPerSec))) fat = 12; else if (bpb.bpbRootDirEnts || bpb.bpbHugeSectors < (bpb.bpbResSectors ? bpb.bpbResSectors : bss) + - howmany((RESFTE + MAXCLS16) * 2, bpb.bpbBytesPerSec) * bpb.bpbFATs + + howmany((RESFTE + MAXCLS16) * 2, bpb.bpbBytesPerSec) * + bpb.bpbFATs + howmany(DEFRDE, bpb.bpbBytesPerSec / sizeof(struct de)) + (MAXCLS16 + 1) * - (bpb.bpbSecPerClust ? bpb.bpbSecPerClust : howmany(8192, bpb.bpbBytesPerSec))) + (bpb.bpbSecPerClust ? bpb.bpbSecPerClust : + howmany(8192, bpb.bpbBytesPerSec))) fat = 16; else fat = 32; @@ -539,21 +541,27 @@ main(int argc, char *argv[]) x = bpb.bpbBackup + 1; } if (!bpb.bpbResSectors) - bpb.bpbResSectors = fat == 32 ? MAX(x, MAX(16384 / bpb.bpbBytesPerSec, 4)) : x; + bpb.bpbResSectors = fat == 32 ? + MAX(x, MAX(16384 / bpb.bpbBytesPerSec, 4)) : x; else if (bpb.bpbResSectors < x) - errx(1, "too few reserved sectors (need %d have %d)", x, bpb.bpbResSectors); + errx(1, "too few reserved sectors (need %d have %d)", x, + bpb.bpbResSectors); if (fat != 32 && !bpb.bpbRootDirEnts) bpb.bpbRootDirEnts = DEFRDE; rds = howmany(bpb.bpbRootDirEnts, bpb.bpbBytesPerSec / sizeof(struct de)); if (!bpb.bpbSecPerClust) - for (bpb.bpbSecPerClust = howmany(fat == 16 ? DEFBLK16 : DEFBLK, bpb.bpbBytesPerSec); + for (bpb.bpbSecPerClust = howmany(fat == 16 ? DEFBLK16 : + DEFBLK, bpb.bpbBytesPerSec); bpb.bpbSecPerClust < MAXSPC && bpb.bpbResSectors + howmany((RESFTE + maxcls(fat)) * (fat / BPN), - bpb.bpbBytesPerSec * NPB) * bpb.bpbFATs + + bpb.bpbBytesPerSec * NPB) * + bpb.bpbFATs + rds + - (u_int64_t)(maxcls(fat) + 1) * bpb.bpbSecPerClust <= bpb.bpbHugeSectors; - bpb.bpbSecPerClust <<= 1); + (u_int64_t) (maxcls(fat) + 1) * + bpb.bpbSecPerClust <= bpb.bpbHugeSectors; + bpb.bpbSecPerClust <<= 1) + continue; if (fat != 32 && bpb.bpbBigFATsecs > MAXU16) errx(1, "too many sectors/FAT for FAT12/16"); x1 = bpb.bpbResSectors + rds; @@ -562,7 +570,8 @@ main(int argc, char *argv[]) errx(1, "meta data exceeds file system size"); x1 += x * bpb.bpbFATs; x = (u_int64_t)(bpb.bpbHugeSectors - x1) * bpb.bpbBytesPerSec * NPB / - (bpb.bpbSecPerClust * bpb.bpbBytesPerSec * NPB + fat / BPN * bpb.bpbFATs); + (bpb.bpbSecPerClust * bpb.bpbBytesPerSec * NPB + fat / + BPN * bpb.bpbFATs); x2 = howmany((RESFTE + MIN(x, maxcls(fat))) * (fat / BPN), bpb.bpbBytesPerSec * NPB); if (!bpb.bpbBigFATsecs) { @@ -570,7 +579,8 @@ main(int argc, char *argv[]) x1 += (bpb.bpbBigFATsecs - 1) * bpb.bpbFATs; } cls = (bpb.bpbHugeSectors - x1) / bpb.bpbSecPerClust; - x = (u_int64_t)bpb.bpbBigFATsecs * bpb.bpbBytesPerSec * NPB / (fat / BPN) - RESFTE; + x = (u_int64_t)bpb.bpbBigFATsecs * bpb.bpbBytesPerSec * NPB / (fat / BPN) - + RESFTE; if (cls > x) cls = x; if (bpb.bpbBigFATsecs < x2) @@ -608,7 +618,8 @@ main(int argc, char *argv[]) tm = localtime(&now); if (!(img = malloc(bpb.bpbBytesPerSec))) err(1, NULL); - dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs : bpb.bpbBigFATsecs) * bpb.bpbFATs; + dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs : + bpb.bpbBigFATsecs) * bpb.bpbFATs; memset(&si_sa, 0, sizeof(si_sa)); si_sa.sa_handler = infohandler; if (sigaction(SIGINFO, &si_sa, NULL) == -1) @@ -638,7 +649,8 @@ main(int argc, char *argv[]) } else memset(img, 0, bpb.bpbBytesPerSec); if (!lsn || - (fat == 32 && bpb.bpbBackup != MAXU16 && lsn == bpb.bpbBackup)) { + (fat == 32 && bpb.bpbBackup != MAXU16 && + lsn == bpb.bpbBackup)) { x1 = sizeof(struct bs); bsbpb = (struct bsbpb *)(img + x1); mk2(bsbpb->bpbBytesPerSec, bpb.bpbBytesPerSec); @@ -702,7 +714,8 @@ main(int argc, char *argv[]) mk2(img + MINBPS - 2, DOSMAGIC); } else if (lsn >= bpb.bpbResSectors && lsn < dir && !((lsn - bpb.bpbResSectors) % - (bpb.bpbFATsecs ? bpb.bpbFATsecs : bpb.bpbBigFATsecs))) { + (bpb.bpbFATsecs ? bpb.bpbFATsecs : + bpb.bpbBigFATsecs))) { mk1(img[0], bpb.bpbMedia); for (x = 1; x < fat * (fat == 32 ? 3 : 2) / 8; x++) mk1(img[x], fat == 32 && x % 4 == 3 ? 0x0f : 0xff); @@ -817,16 +830,19 @@ getdiskinfo(int fd, const char *fname, c if (bpb->bpbBytesPerSec) dlp.d_secsize = bpb->bpbBytesPerSec; if (ioctl(fd, DIOCGDINFO, &dlp) == -1) { - if (bpb->bpbBytesPerSec == 0 && ioctl(fd, DIOCGSECTORSIZE, &dlp.d_secsize) == -1) + if (bpb->bpbBytesPerSec == 0 && ioctl(fd, DIOCGSECTORSIZE, + &dlp.d_secsize) == -1) errx(1, "Cannot get sector size, %s", strerror(errno)); dlp.d_secperunit = ms / dlp.d_secsize; - if (bpb->bpbSecPerTrack == 0 && ioctl(fd, DIOCGFWSECTORS, &dlp.d_nsectors) == -1) { + if (bpb->bpbSecPerTrack == 0 && ioctl(fd, DIOCGFWSECTORS, + &dlp.d_nsectors) == -1) { warnx("Cannot get number of sectors per track, %s", strerror(errno)); dlp.d_nsectors = 63; } - if (bpb->bpbHeads == 0 && ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) { + if (bpb->bpbHeads == 0 && + ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) { warnx("Cannot get number of heads, %s", strerror(errno)); if (dlp.d_secperunit <= 63*1*1024) dlp.d_ntracks = 1; @@ -859,7 +875,8 @@ getdiskinfo(int fd, const char *fname, c static void print_bpb(struct bpb *bpb) { - printf("BytesPerSec=%u SecPerClust=%u ResSectors=%u FATs=%u", bpb->bpbBytesPerSec, bpb->bpbSecPerClust, bpb->bpbResSectors, + printf("BytesPerSec=%u SecPerClust=%u ResSectors=%u FATs=%u", + bpb->bpbBytesPerSec, bpb->bpbSecPerClust, bpb->bpbResSectors, bpb->bpbFATs); if (bpb->bpbRootDirEnts) printf(" RootDirEnts=%u", bpb->bpbRootDirEnts); @@ -868,11 +885,13 @@ print_bpb(struct bpb *bpb) printf(" Media=%#x", bpb->bpbMedia); if (bpb->bpbFATsecs) printf(" FATsecs=%u", bpb->bpbFATsecs); - printf(" SecPerTrack=%u Heads=%u HiddenSecs=%u", bpb->bpbSecPerTrack, bpb->bpbHeads, bpb->bpbHiddenSecs); + printf(" SecPerTrack=%u Heads=%u HiddenSecs=%u", bpb->bpbSecPerTrack, + bpb->bpbHeads, bpb->bpbHiddenSecs); if (bpb->bpbHugeSectors) printf(" HugeSectors=%u", bpb->bpbHugeSectors); if (!bpb->bpbFATsecs) { - printf(" FATsecs=%u RootCluster=%u", bpb->bpbBigFATsecs, bpb->bpbRootClust); + printf(" FATsecs=%u RootCluster=%u", bpb->bpbBigFATsecs, + bpb->bpbRootClust); printf(" FSInfo="); printf(bpb->bpbFSInfo == MAXU16 ? "%#x" : "%u", bpb->bpbFSInfo); printf(" Backup="); @@ -919,6 +938,7 @@ argtooff(const char *arg, const char *ms char *s; off_t x; + errno = 0; x = strtoll(arg, &s, 0); /* allow at most one extra char */ if (errno || x < 0 || (s[0] && s[1]) ) @@ -929,30 +949,30 @@ argtooff(const char *arg, const char *ms errx(1, "%s: bad %s", arg, msg); /* notreached */ - case 's': /* sector */ + case 's': /* sector */ case 'S': - x <<= 9; /* times 512 */ + x <<= 9; /* times 512 */ break; - case 'k': /* kilobyte */ + case 'k': /* kilobyte */ case 'K': - x <<= 10; /* times 1024 */ + x <<= 10; /* times 1024 */ break; - case 'm': /* megabyte */ + case 'm': /* megabyte */ case 'M': - x <<= 20; /* times 1024*1024 */ + x <<= 20; /* times 1024*1024 */ break; - case 'g': /* gigabyte */ + case 'g': /* gigabyte */ case 'G': - x <<= 30; /* times 1024*1024*1024 */ + x <<= 30; /* times 1024*1024*1024 */ break; - case 'p': /* partition start */ - case 'P': /* partition start */ - case 'l': /* partition length */ - case 'L': /* partition length */ + case 'p': /* partition start */ + case 'P': + case 'l': /* partition length */ + case 'L': errx(1, "%s: not supported yet %s", arg, msg); /* notreached */ } From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 14:09:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86191106564A; Tue, 20 Dec 2011 14:09:01 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 573B88FC08; Tue, 20 Dec 2011 14:09:01 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 08A8E46B2A; Tue, 20 Dec 2011 09:09:01 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6FA5CB955; Tue, 20 Dec 2011 09:09:00 -0500 (EST) From: John Baldwin To: David Chisnall Date: Tue, 20 Dec 2011 09:08:57 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201111291946.pATJkHMs064094@svn.freebsd.org> <20111220171740.X1005@besplex.bde.org> <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> In-Reply-To: <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112200908.57306.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 20 Dec 2011 09:09:00 -0500 (EST) X-Mailman-Approved-At: Tue, 20 Dec 2011 15:58:56 +0000 Cc: Doug Barton , Garrett Cooper , Max Khon , svn-src-all@freebsd.org, src-committers@freebsd.org, =?iso-8859-1?q?G=E1bor_K=F6vesd=E1n?= , Bruce Evans , svn-src-head@freebsd.org, Warner Losh Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 14:09:01 -0000 On Tuesday, December 20, 2011 5:05:49 am David Chisnall wrote: > On 20 Dec 2011, at 06:20, Bruce Evans wrote: > > > Don't be silly. Building profiled libraries takes as much as 1 minute. > > Many would not want to wait that long (if they noticed how long it takes). > > This is not 1994 when building of profiling libraries was left in because > > it only took an extra hour or or so. > > One of the platforms I use has an 800MHz ARM processor. Building LLVM (even a release build with asserts disabled and with all of the cross-compile targets disabled) is an overnight job. On my main laptop, a release build of LLVM takes about 5 minutes. > > Please don't assume that just because fast computers exist that they are the only things people are using. A lot of the more interesting platforms these days are significantly slower. And I doubt you do a build with a stock /etc/src.conf on such hardware either. The defaults for src.conf should be for the common case, and in the common case profiled library builds are in the noise. I do add WITHOUT_PROFILE to many of my machines in /etc/src.conf, but I still think they should be enabled by default. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 16:26:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0235E106566B; Tue, 20 Dec 2011 16:26:13 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 801CA8FC14; Tue, 20 Dec 2011 16:26:12 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so3836904obb.13 for ; Tue, 20 Dec 2011 08:26:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=aWtJ5WVhN4wZ/xKE31diMIyQaWfa41HaC1A1FaHt3Rk=; b=NpRWcG4Q4rfBPws1lDCAEM1663r3ur2zVci0RRjP90P3y/DsjM9zR4HQAoSf2bdI/b 7JfadP9ooffZea2Dlw2Vagl+OXYohFOQYfH6BByQEzV2RSSRhzMGIkF5fLNq6sCvDXk7 Lm9zrmYPvCWxnyuz/BfVXyn5xkeTtQv77ET6g= MIME-Version: 1.0 Received: by 10.182.139.34 with SMTP id qv2mr2289656obb.46.1324398371617; Tue, 20 Dec 2011 08:26:11 -0800 (PST) Received: by 10.182.62.227 with HTTP; Tue, 20 Dec 2011 08:26:11 -0800 (PST) In-Reply-To: <4EF060E7.5000204@FreeBSD.org> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> <20111220171740.X1005@besplex.bde.org> <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> <4EF060E7.5000204@FreeBSD.org> Date: Tue, 20 Dec 2011 08:26:11 -0800 Message-ID: From: Garrett Cooper To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, David Chisnall Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 16:26:13 -0000 On Tue, Dec 20, 2011 at 2:18 AM, Andriy Gapon wrote: > on 20/12/2011 12:05 David Chisnall said the following: >> On 20 Dec 2011, at 06:20, Bruce Evans wrote: >> >>> Don't be silly. =A0Building profiled libraries takes as much as 1 minut= e. >>> Many would not want to wait that long (if they noticed how long it take= s). >>> This is not 1994 when building of profiling libraries was left in becau= se >>> it only took an extra hour or or so. >> >> One of the platforms I use has an 800MHz ARM processor. =A0Building LLVM= (even a release build with asserts disabled and with all of the cross-comp= ile targets disabled) is an overnight job. =A0On my main laptop, a release = build of LLVM takes about 5 minutes. >> >> Please don't assume that just because fast computers exist that they are= the only things people are using. =A0A lot of the more interesting platfor= ms these days are significantly slower. > > I wonder if all the software that runs on the embedded stuff or mobile ph= ones is > built on the said hardware. world doesn't need to be built on the hardware, but ports still do. Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 17:10:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B720106567C; Tue, 20 Dec 2011 17:10:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 649E38FC12; Tue, 20 Dec 2011 17:10:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKHAZxa026189; Tue, 20 Dec 2011 17:10:35 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKHAZli026183; Tue, 20 Dec 2011 17:10:35 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112201710.pBKHAZli026183@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Dec 2011 17:10:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228741 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 17:10:35 -0000 Author: mav Date: Tue Dec 20 17:10:34 2011 New Revision: 228741 URL: http://svn.freebsd.org/changeset/base/228741 Log: Add timecounters(4) man page alike to eventtimers(4). Added: head/share/man/man4/timecounters.4 (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/attimer.4 head/share/man/man4/eventtimers.4 head/share/man/man4/hpet.4 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Dec 20 15:50:54 2011 (r228740) +++ head/share/man/man4/Makefile Tue Dec 20 17:10:34 2011 (r228741) @@ -445,6 +445,7 @@ MAN= aac.4 \ termios.4 \ textdump.4 \ ti.4 \ + timecounters.4 \ tl.4 \ tnt4882.4 \ ${_tpm.4} \ Modified: head/share/man/man4/attimer.4 ============================================================================== --- head/share/man/man4/attimer.4 Tue Dec 20 15:50:54 2011 (r228740) +++ head/share/man/man4/attimer.4 Tue Dec 20 17:10:34 2011 (r228741) @@ -73,4 +73,5 @@ Event timer provided by the driver is ir .Xr apic 4 , .Xr atrtc 4 , .Xr eventtimers 4 , -.Xr hpet 4 +.Xr hpet 4 , +.Xr timecounters 4 Modified: head/share/man/man4/eventtimers.4 ============================================================================== --- head/share/man/man4/eventtimers.4 Tue Dec 20 15:50:54 2011 (r228740) +++ head/share/man/man4/eventtimers.4 Tue Dec 20 17:10:34 2011 (r228741) @@ -149,4 +149,5 @@ always generating. .Xr atrtc 4 , .Xr attimer 4 , .Xr hpet 4 , +.Xr timecounters 4 , .Xr eventtimers 9 Modified: head/share/man/man4/hpet.4 ============================================================================== --- head/share/man/man4/hpet.4 Tue Dec 20 15:50:54 2011 (r228740) +++ head/share/man/man4/hpet.4 Tue Dec 20 17:10:34 2011 (r228741) @@ -97,7 +97,8 @@ of these comparators has own unsharable .Xr apic 4 , .Xr atrtc 4 , .Xr attimer 4 , -.Xr eventtimers 4 +.Xr eventtimers 4 , +.Xr timecounters 4 .Sh HISTORY The .Nm Added: head/share/man/man4/timecounters.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/timecounters.4 Tue Dec 20 17:10:34 2011 (r228741) @@ -0,0 +1,105 @@ +.\" Copyright (c) 2011 Alexander Motin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 20, 2011 +.Dt TIMECOUNTERS 4 +.Os +.Sh NAME +.Nm timecounters +.Nd kernel time counters subsystem +.Sh SYNOPSIS +Kernel uses several types of time-related devices, such as: real time clocks, +time counters and event timers. +Real time clocks responsible for tracking real world time, mostly when system +is down. +Time counters are responsible for tracking purposes, when system is running. +Event timers are responsible for generating interrupts at specified time or +periodically, to run different time-based events. +This page is about the second. +.Sh DESCRIPTION +Time counters are the lowest level of time tracking in kernel. +They provide monotonically increasing timestamps with known width and +update frequency. +They can overflow, drift, etc and so in raw form used only in very limited +performance-critical places like process scheduler. +.Pp +More usable time is created by scaling the values read from the selected +time counter and combining it with some offset, regularly updated by +.Fn tc_windup +on +.Fn hardclock +invocation. +.Pp +Different platforms provide different kinds of timer hardware. +The goal of the time counters subsystem is to provide unified way to access +that hardware. +.Pp +Each driver implementing time counters, registers them at the subsystem. +It is possible to see the list of present time counters, like this, via +.Va kern.timecounter +sysctl: +.Bd -literal +kern.timecounter.choice: TSC-low(-100) HPET(950) i8254(0) ACPI-fast(900) dummy(-1000000) +kern.timecounter.tc.ACPI-fast.mask: 16777215 +kern.timecounter.tc.ACPI-fast.counter: 13467909 +kern.timecounter.tc.ACPI-fast.frequency: 3579545 +kern.timecounter.tc.ACPI-fast.quality: 900 +kern.timecounter.tc.i8254.mask: 65535 +kern.timecounter.tc.i8254.counter: 62692 +kern.timecounter.tc.i8254.frequency: 1193182 +kern.timecounter.tc.i8254.quality: 0 +kern.timecounter.tc.HPET.mask: 4294967295 +kern.timecounter.tc.HPET.counter: 3013495652 +kern.timecounter.tc.HPET.frequency: 14318180 +kern.timecounter.tc.HPET.quality: 950 +kern.timecounter.tc.TSC-low.mask: 4294967295 +kern.timecounter.tc.TSC-low.counter: 4067509463 +kern.timecounter.tc.TSC-low.frequency: 11458556 +kern.timecounter.tc.TSC-low.quality: -100 +.Ed +.Pp +where: +.Bl -inset +.It Va kern.timecounter.tc. Ns Ar X Ns Va .mask +is a bitmask, defining valid counter bits, +.It Va kern.timecounter.tc. Ns Ar X Ns Va .counter +is a present counter value, +.It Va kern.eventtimer.tc. Ns Ar X Ns Va .frequency +is a counter update frequency, +.It Va kern.eventtimer.tc. Ns Ar X Ns Va .quality +is an integral value, defining how good is this time counter, +comparing to others. +Negative value means that this time counter is broken and should not be used. +.El +.Pp +Time management code of the kernel chooses one time counter from that list. +Current choice can be read and affected via +.Va kern.timecounter.hardware +tunable/sysctl. +.Sh SEE ALSO +.Xr attimer 4 , +.Xr eventtimers 4 , +.Xr hpet 4 From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 17:32:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F499106564A; Tue, 20 Dec 2011 17:32:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A5E28FC1C; Tue, 20 Dec 2011 17:32:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKHWELM027004; Tue, 20 Dec 2011 17:32:14 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKHWEQF027002; Tue, 20 Dec 2011 17:32:14 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112201732.pBKHWEQF027002@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Dec 2011 17:32:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228742 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 17:32:14 -0000 Author: mav Date: Tue Dec 20 17:32:13 2011 New Revision: 228742 URL: http://svn.freebsd.org/changeset/base/228742 Log: Fix copy-paste typo. Modified: head/share/man/man4/timecounters.4 Modified: head/share/man/man4/timecounters.4 ============================================================================== --- head/share/man/man4/timecounters.4 Tue Dec 20 17:10:34 2011 (r228741) +++ head/share/man/man4/timecounters.4 Tue Dec 20 17:32:13 2011 (r228742) @@ -87,9 +87,9 @@ where: is a bitmask, defining valid counter bits, .It Va kern.timecounter.tc. Ns Ar X Ns Va .counter is a present counter value, -.It Va kern.eventtimer.tc. Ns Ar X Ns Va .frequency +.It Va kern.timecounter.tc. Ns Ar X Ns Va .frequency is a counter update frequency, -.It Va kern.eventtimer.tc. Ns Ar X Ns Va .quality +.It Va kern.timecounter.tc. Ns Ar X Ns Va .quality is an integral value, defining how good is this time counter, comparing to others. Negative value means that this time counter is broken and should not be used. From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 17:44:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8F66106564A; Tue, 20 Dec 2011 17:44:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 994568FC0A; Tue, 20 Dec 2011 17:44:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKHiPRk027469; Tue, 20 Dec 2011 17:44:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKHiPbb027464; Tue, 20 Dec 2011 17:44:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112201744.pBKHiPbb027464@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Dec 2011 17:44:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228743 - in head/share/man/man4: . man4.i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 17:44:25 -0000 Author: mav Date: Tue Dec 20 17:44:25 2011 New Revision: 228743 URL: http://svn.freebsd.org/changeset/base/228743 Log: Add some more cross-references. Modified: head/share/man/man4/cpufreq.4 head/share/man/man4/ffclock.4 head/share/man/man4/man4.i386/CPU_ELAN.4 head/share/man/man4/timecounters.4 Modified: head/share/man/man4/cpufreq.4 ============================================================================== --- head/share/man/man4/cpufreq.4 Tue Dec 20 17:32:13 2011 (r228742) +++ head/share/man/man4/cpufreq.4 Tue Dec 20 17:44:25 2011 (r228743) @@ -286,6 +286,7 @@ then it should set all elements to .Dv CPUFREQ_VAL_UNKNOWN . .Sh SEE ALSO .Xr acpi 4 , +.Xr timecounters 4 , .Xr powerd 8 , .Xr sysctl 8 .Sh AUTHORS Modified: head/share/man/man4/ffclock.4 ============================================================================== --- head/share/man/man4/ffclock.4 Tue Dec 20 17:32:13 2011 (r228742) +++ head/share/man/man4/ffclock.4 Tue Dec 20 17:44:25 2011 (r228743) @@ -110,6 +110,7 @@ but currently does nothing. .Xr clock_gettime 2 , .Xr ffclock 2 , .Xr bpf 4 , +.Xr timecounters 4 , .Xr sysctl 8 .Sh HISTORY Feed-forward clock support first appeared in Modified: head/share/man/man4/man4.i386/CPU_ELAN.4 ============================================================================== --- head/share/man/man4/man4.i386/CPU_ELAN.4 Tue Dec 20 17:32:13 2011 (r228742) +++ head/share/man/man4/man4.i386/CPU_ELAN.4 Tue Dec 20 17:44:25 2011 (r228743) @@ -148,6 +148,7 @@ and the GPIO pins which are not available will be disabled. .Sh SEE ALSO .Xr led 4 , +.Xr timecounters 4 , .Xr sysctl 8 .Sh HISTORY The Modified: head/share/man/man4/timecounters.4 ============================================================================== --- head/share/man/man4/timecounters.4 Tue Dec 20 17:32:13 2011 (r228742) +++ head/share/man/man4/timecounters.4 Tue Dec 20 17:44:25 2011 (r228743) @@ -102,4 +102,5 @@ tunable/sysctl. .Sh SEE ALSO .Xr attimer 4 , .Xr eventtimers 4 , +.Xr ffclock 4 , .Xr hpet 4 From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 17:46:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE24C1065672; Tue, 20 Dec 2011 17:46:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (unknown [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 6F9088FC0C; Tue, 20 Dec 2011 17:46:49 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id pBKHed0Z064026 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 20 Dec 2011 10:40:42 -0700 (MST) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) From: Warner Losh In-Reply-To: Date: Tue, 20 Dec 2011 10:40:33 -0700 Message-Id: <91C30101-B401-4B2F-84BE-7BB4AF3D9311@bsdimp.com> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> <20111220171740.X1005@besplex.bde.org> To: Garrett Cooper X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Tue, 20 Dec 2011 10:40:43 -0700 (MST) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Doug Barton , Max Khon , svn-src-all@freebsd.org, src-committers@freebsd.org, =?iso-8859-1?Q?G=E1bor_K=F6vesd=E1n?= , Bruce Evans , svn-src-head@freebsd.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 17:46:50 -0000 On Dec 20, 2011, at 2:21 AM, Garrett Cooper wrote: > > The assumption (that isn't clearly stated) is that I am building > things on suped up x86 hardware, not arm CPUs, Intel Atoms, etc. On > those platforms building superfluous things still do matter (in > particular because cross-building some things still isn't doable 100% > of the time, but also because flash, some platter media, etc is slow). > But I suppose I digress... When is cross building not doable? Please, give examples, not fud. Warner From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 18:11:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00C221065670; Tue, 20 Dec 2011 18:11:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C463D8FC17; Tue, 20 Dec 2011 18:11:56 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 7A94546B32; Tue, 20 Dec 2011 13:11:56 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0FAD7B914; Tue, 20 Dec 2011 13:11:56 -0500 (EST) From: John Baldwin To: Garrett Cooper Date: Tue, 20 Dec 2011 13:11:55 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4EF060E7.5000204@FreeBSD.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112201311.55576.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 20 Dec 2011 13:11:56 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, David Chisnall , Andriy Gapon Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 18:11:57 -0000 On Tuesday, December 20, 2011 11:26:11 am Garrett Cooper wrote: > On Tue, Dec 20, 2011 at 2:18 AM, Andriy Gapon wrote: > > on 20/12/2011 12:05 David Chisnall said the following: > >> On 20 Dec 2011, at 06:20, Bruce Evans wrote: > >> > >>> Don't be silly. Building profiled libraries takes as much as 1 minute. > >>> Many would not want to wait that long (if they noticed how long it takes). > >>> This is not 1994 when building of profiling libraries was left in because > >>> it only took an extra hour or or so. > >> > >> One of the platforms I use has an 800MHz ARM processor. Building LLVM (even a release build with asserts disabled and with all of the cross- compile targets disabled) is an overnight job. On my main laptop, a release build of LLVM takes about 5 minutes. > >> > >> Please don't assume that just because fast computers exist that they are the only things people are using. A lot of the more interesting platforms these days are significantly slower. > > > > I wonder if all the software that runs on the embedded stuff or mobile phones is > > built on the said hardware. > > world doesn't need to be built on the hardware, but ports still do. And the discussion here is about profiled libraries built as part of world, not about ports. :) -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 19:21:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66DD3106564A; Tue, 20 Dec 2011 19:21:47 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id E3EFD8FC18; Tue, 20 Dec 2011 19:21:46 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so3972133obb.13 for ; Tue, 20 Dec 2011 11:21:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=8Ryzh4jvWE4ZPy2BxHsEk60nqdkhgC5WLcU575HOg0g=; b=K+H85tqRoqQIOYtLpUd76OJ4JSLPqBVRbq1cOn4qEVc/9M37bhZ42rXSjxhMk+lBIJ 2RwdIWMYNrR0N9vLU8DFU4EX1vij42mfA6hEiIqpzfHLsr3EmrVlE05THnc/oCVHLxWn M72cKUQJd5axZnaDJikOHjw5Zemnk5mmtiU/A= MIME-Version: 1.0 Received: by 10.182.115.5 with SMTP id jk5mr2948046obb.6.1324408906485; Tue, 20 Dec 2011 11:21:46 -0800 (PST) Received: by 10.182.62.227 with HTTP; Tue, 20 Dec 2011 11:21:46 -0800 (PST) In-Reply-To: <91C30101-B401-4B2F-84BE-7BB4AF3D9311@bsdimp.com> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> <20111220171740.X1005@besplex.bde.org> <91C30101-B401-4B2F-84BE-7BB4AF3D9311@bsdimp.com> Date: Tue, 20 Dec 2011 11:21:46 -0800 Message-ID: From: Garrett Cooper To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Doug Barton , Max Khon , svn-src-all@freebsd.org, src-committers@freebsd.org, =?ISO-8859-1?B?R+Fib3IgS/Z2ZXNk4W4=?= , Bruce Evans , svn-src-head@freebsd.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 19:21:47 -0000 On Tue, Dec 20, 2011 at 9:40 AM, Warner Losh wrote: > > On Dec 20, 2011, at 2:21 AM, Garrett Cooper wrote: > > > =A0=A0=A0The assumption (that isn't clearly stated) is that I am building > things on suped up x86 hardware, not arm CPUs, Intel Atoms, etc. On > those platforms building superfluous things still do matter (in > particular because cross-building some things still isn't doable 100% > of the time, but also because flash, some platter media, etc is slow). > But I suppose I digress... > > > When is cross building not doable? =A0Please, give examples, not fud. ports. -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 19:30:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00DF3106566B; Tue, 20 Dec 2011 19:30:10 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 721978FC13; Tue, 20 Dec 2011 19:30:10 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so3978535obb.13 for ; Tue, 20 Dec 2011 11:30:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=CPN3QEK+spVAGrujgwOZZTX+H+Olewo+qw0BB6c1GnM=; b=kykmIe3Y0gsgPa8xcXrxraDpiiERI9ZZWDF2PaiBxVtJw3kojmVt1JCXJHioXpsnT0 6e9WWc6n4B/5A691w7dZh7+Pc9gYKBuKX9BkICrXWv3QspstQZj6eANxDvA/7wWfJd+X PdXDmQLgT7Iw5tovFfs4c1alN+xhfbfo+pLsA= MIME-Version: 1.0 Received: by 10.182.115.5 with SMTP id jk5mr2968529obb.6.1324409410025; Tue, 20 Dec 2011 11:30:10 -0800 (PST) Received: by 10.182.62.227 with HTTP; Tue, 20 Dec 2011 11:30:09 -0800 (PST) In-Reply-To: References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> <20111220171740.X1005@besplex.bde.org> <91C30101-B401-4B2F-84BE-7BB4AF3D9311@bsdimp.com> Date: Tue, 20 Dec 2011 11:30:09 -0800 Message-ID: From: Garrett Cooper To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Doug Barton , Max Khon , svn-src-all@freebsd.org, src-committers@freebsd.org, =?ISO-8859-1?B?R+Fib3IgS/Z2ZXNk4W4=?= , Bruce Evans , svn-src-head@freebsd.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 19:30:11 -0000 On Tue, Dec 20, 2011 at 11:21 AM, Garrett Cooper wrote= : > On Tue, Dec 20, 2011 at 9:40 AM, Warner Losh wrote: >> >> On Dec 20, 2011, at 2:21 AM, Garrett Cooper wrote: >> >> >> =A0=A0=A0The assumption (that isn't clearly stated) is that I am buildin= g >> things on suped up x86 hardware, not arm CPUs, Intel Atoms, etc. On >> those platforms building superfluous things still do matter (in >> particular because cross-building some things still isn't doable 100% >> of the time, but also because flash, some platter media, etc is slow). >> But I suppose I digress... >> >> >> When is cross building not doable? =A0Please, give examples, not fud. > > ports. Of course, now that I mention it, that's less relevant to this particular discussion. Please ignore above fud if you have access to fast Intel hardware. -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 19:43:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B448106566C; Tue, 20 Dec 2011 19:43:18 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (unknown [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 285BA8FC0C; Tue, 20 Dec 2011 19:43:18 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id pBKJaxPI065008 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 20 Dec 2011 12:37:01 -0700 (MST) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Tue, 20 Dec 2011 12:36:53 -0700 Content-Transfer-Encoding: 7bit Message-Id: References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> <20111220171740.X1005@besplex.bde.org> <91C30101-B401-4B2F-84BE-7BB4AF3D9311@bsdimp.com> To: Garrett Cooper X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Tue, 20 Dec 2011 12:37:02 -0700 (MST) Cc: Doug Barton , Max Khon , svn-src-all@freebsd.org, src-committers@freebsd.org, =?iso-8859-1?Q?G=E1bor_K=F6vesd=E1n?= , Bruce Evans , svn-src-head@freebsd.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 19:43:18 -0000 On Dec 20, 2011, at 12:21 PM, Garrett Cooper wrote: > On Tue, Dec 20, 2011 at 9:40 AM, Warner Losh wrote: >> >> On Dec 20, 2011, at 2:21 AM, Garrett Cooper wrote: >> >> >> The assumption (that isn't clearly stated) is that I am building >> things on suped up x86 hardware, not arm CPUs, Intel Atoms, etc. On >> those platforms building superfluous things still do matter (in >> particular because cross-building some things still isn't doable 100% >> of the time, but also because flash, some platter media, etc is slow). >> But I suppose I digress... >> >> >> When is cross building not doable? Please, give examples, not fud. > > ports. Which affects profiled libraries how? Warner From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 20:02:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40295106564A; Tue, 20 Dec 2011 20:02:08 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2BD848FC0A; Tue, 20 Dec 2011 20:02:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKK28iL032642; Tue, 20 Dec 2011 20:02:08 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKK27sT032639; Tue, 20 Dec 2011 20:02:07 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112202002.pBKK27sT032639@svn.freebsd.org> From: Martin Matuska Date: Tue, 20 Dec 2011 20:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228744 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 20:02:08 -0000 Author: mm Date: Tue Dec 20 20:02:07 2011 New Revision: 228744 URL: http://svn.freebsd.org/changeset/base/228744 Log: Merge vendor revision 3723: Fixes extraction of Zip entries that use length-at-end without specifying either the compressed or uncompressed length. In particular, fixes bsdtar extraction of such files. Obtained from: http://code.google.com/p/libarchive Reported by: Patrick Lamaiziere (freebsd-stable@) MFC after: 1 week Modified: head/lib/libarchive/archive_read_extract.c Modified: head/lib/libarchive/archive_read_extract.c ============================================================================== --- head/lib/libarchive/archive_read_extract.c Tue Dec 20 17:44:25 2011 (r228743) +++ head/lib/libarchive/archive_read_extract.c Tue Dec 20 20:02:07 2011 (r228744) @@ -108,7 +108,7 @@ archive_read_extract2(struct archive *_a if (r != ARCHIVE_OK) /* If _write_header failed, copy the error. */ archive_copy_error(&a->archive, ad); - else if (archive_entry_size(entry) > 0) + else if (!archive_entry_size_is_set(entry) || archive_entry_size(entry) > 0) /* Otherwise, pour data into the entry. */ r = copy_data(_a, ad); r2 = archive_write_finish_entry(ad); From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 20:06:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D479106564A; Tue, 20 Dec 2011 20:06:34 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 459F38FC16; Tue, 20 Dec 2011 20:06:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKK6Ykl032848; Tue, 20 Dec 2011 20:06:34 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKK6XNK032824; Tue, 20 Dec 2011 20:06:33 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112202006.pBKK6XNK032824@svn.freebsd.org> From: Martin Matuska Date: Tue, 20 Dec 2011 20:06:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228745 - in head: lib/libarchive lib/libarchive/test usr.bin/cpio usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 20:06:34 -0000 Author: mm Date: Tue Dec 20 20:06:33 2011 New Revision: 228745 URL: http://svn.freebsd.org/changeset/base/228745 Log: Update libarchive, tar and cpio to version 2.8.5 The following additional vendor revisions are applied: Revision 3740: Use archive_clear_error() to clear the error markers. Obtained from: http://code.google.com/p/libarchive MFC after: 2 weeks Added: head/lib/libarchive/test/test_read_format_iso_Z.c - copied, changed from r228740, head/lib/libarchive/test/test_read_format_iso_gz.c Deleted: head/lib/libarchive/test/test_read_format_iso_gz.c Modified: head/lib/libarchive/archive.h head/lib/libarchive/archive_read.c head/lib/libarchive/archive_read_support_compression_bzip2.c head/lib/libarchive/archive_read_support_compression_uu.c head/lib/libarchive/archive_read_support_format_cpio.c head/lib/libarchive/archive_read_support_format_iso9660.c head/lib/libarchive/archive_read_support_format_tar.c head/lib/libarchive/archive_read_support_format_zip.c head/lib/libarchive/archive_string.h head/lib/libarchive/archive_write_disk.c head/lib/libarchive/archive_write_set_compression_xz.c head/lib/libarchive/archive_write_set_format_ar.c head/lib/libarchive/archive_write_set_format_shar.c head/lib/libarchive/archive_write_set_format_ustar.c head/lib/libarchive/config_freebsd.h head/lib/libarchive/libarchive-formats.5 head/lib/libarchive/libarchive.3 head/lib/libarchive/test/Makefile head/lib/libarchive/test/test_compat_zip.c head/usr.bin/cpio/Makefile head/usr.bin/tar/Makefile head/usr.bin/tar/tree.c Modified: head/lib/libarchive/archive.h ============================================================================== --- head/lib/libarchive/archive.h Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/archive.h Tue Dec 20 20:06:33 2011 (r228745) @@ -52,7 +52,7 @@ /* These should match the types used in 'struct stat' */ #if defined(_WIN32) && !defined(__CYGWIN__) #define __LA_INT64_T __int64 -# if defined(_SSIZE_T_DEFINED) +# if defined(_SSIZE_T_DEFINED) || defined(_SSIZE_T_) # define __LA_SSIZE_T ssize_t # elif defined(_WIN64) # define __LA_SSIZE_T __int64 @@ -98,6 +98,13 @@ # define __LA_DECL #endif +#if defined(__GNUC__) && __GNUC__ >= 3 +#define __LA_PRINTF(fmtarg, firstvararg) \ + __attribute__((__format__ (__printf__, fmtarg, firstvararg))) +#else +#define __LA_PRINTF(fmtarg, firstvararg) /* nothing */ +#endif + #ifdef __cplusplus extern "C" { #endif @@ -129,13 +136,13 @@ extern "C" { * (ARCHIVE_API_VERSION * 1000000 + ARCHIVE_API_FEATURE * 1000) * #endif */ -#define ARCHIVE_VERSION_NUMBER 2008004 +#define ARCHIVE_VERSION_NUMBER 2008005 __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_STRING "libarchive 2.8.4" +#define ARCHIVE_VERSION_STRING "libarchive 2.8.5" __LA_DECL const char * archive_version_string(void); #if ARCHIVE_VERSION_NUMBER < 3000000 @@ -717,7 +724,7 @@ __LA_DECL const char *archive_format_nam __LA_DECL int archive_format(struct archive *); __LA_DECL void archive_clear_error(struct archive *); __LA_DECL void archive_set_error(struct archive *, int _err, - const char *fmt, ...); + const char *fmt, ...) __LA_PRINTF(3, 4); __LA_DECL void archive_copy_error(struct archive *dest, struct archive *src); __LA_DECL int archive_file_count(struct archive *); Modified: head/lib/libarchive/archive_read.c ============================================================================== --- head/lib/libarchive/archive_read.c Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/archive_read.c Tue Dec 20 20:06:33 2011 (r228745) @@ -715,7 +715,7 @@ archive_read_data_block(struct archive * /* * Close the file and release most resources. * - * Be careful: client might just call read_new and then read_finish. + * Be careful: client might just call read_new and then read_free. * Don't assume we actually read anything or performed any non-trivial * initialization. */ Modified: head/lib/libarchive/archive_read_support_compression_bzip2.c ============================================================================== --- head/lib/libarchive/archive_read_support_compression_bzip2.c Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/archive_read_support_compression_bzip2.c Tue Dec 20 20:06:33 2011 (r228745) @@ -350,4 +350,4 @@ bzip2_filter_close(struct archive_read_f return (ret); } -#endif /* HAVE_BZLIB_H */ +#endif /* HAVE_BZLIB_H && BZ_CONFIG_ERROR */ Modified: head/lib/libarchive/archive_read_support_compression_uu.c ============================================================================== --- head/lib/libarchive/archive_read_support_compression_uu.c Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/archive_read_support_compression_uu.c Tue Dec 20 20:06:33 2011 (r228745) @@ -488,9 +488,9 @@ read_more: switch (uudecode->state) { default: case ST_FIND_HEAD: - if (len - nl > 13 && memcmp(b, "begin ", 6) == 0) + if (len - nl >= 11 && memcmp(b, "begin ", 6) == 0) l = 6; - else if (len - nl > 18 && + else if (len - nl >= 18 && memcmp(b, "begin-base64 ", 13) == 0) l = 13; else Modified: head/lib/libarchive/archive_read_support_format_cpio.c ============================================================================== --- head/lib/libarchive/archive_read_support_format_cpio.c Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/archive_read_support_format_cpio.c Tue Dec 20 20:06:33 2011 (r228745) @@ -264,9 +264,9 @@ archive_read_format_cpio_read_header(str /* Compare name to "TRAILER!!!" to test for end-of-archive. */ if (namelength == 11 && strcmp((const char *)h, "TRAILER!!!") == 0) { - /* TODO: Store file location of start of block. */ - archive_set_error(&a->archive, 0, NULL); - return (ARCHIVE_EOF); + /* TODO: Store file location of start of block. */ + archive_clear_error(&a->archive); + return (ARCHIVE_EOF); } /* Detect and record hardlinks to previously-extracted entries. */ Modified: head/lib/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- head/lib/libarchive/archive_read_support_format_iso9660.c Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/archive_read_support_format_iso9660.c Tue Dec 20 20:06:33 2011 (r228745) @@ -934,14 +934,14 @@ read_children(struct archive_read *a, st archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Ignoring out-of-order directory (%s) %jd > %jd", parent->name.s, - iso9660->current_position, - parent->offset); + (intmax_t)iso9660->current_position, + (intmax_t)parent->offset); return (ARCHIVE_WARN); } if (parent->offset + parent->size > iso9660->volume_size) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Directory is beyond end-of-media: %s", - parent->name); + parent->name.s); return (ARCHIVE_WARN); } if (iso9660->current_position < parent->offset) { @@ -1139,7 +1139,7 @@ archive_read_format_iso9660_read_header( if (file->offset + file->size > iso9660->volume_size) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "File is beyond end-of-media: %s", file->name); + "File is beyond end-of-media: %s", file->name.s); iso9660->entry_bytes_remaining = 0; iso9660->entry_sparse_offset = 0; return (ARCHIVE_WARN); @@ -1198,10 +1198,10 @@ archive_read_format_iso9660_read_header( if ((file->mode & AE_IFMT) != AE_IFDIR && file->offset < iso9660->current_position) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, - "Ignoring out-of-order file @%x (%s) %jd < %jd", - file, + "Ignoring out-of-order file (%s) %jd < %jd", iso9660->pathname.s, - file->offset, iso9660->current_position); + (intmax_t)file->offset, + (intmax_t)iso9660->current_position); iso9660->entry_bytes_remaining = 0; iso9660->entry_sparse_offset = 0; return (ARCHIVE_WARN); @@ -1524,8 +1524,8 @@ archive_read_format_iso9660_read_data(st archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Ignoring out-of-order file (%s) %jd < %jd", iso9660->pathname.s, - iso9660->entry_content->offset, - iso9660->current_position); + (intmax_t)iso9660->entry_content->offset, + (intmax_t)iso9660->current_position); *buff = NULL; *size = 0; *offset = iso9660->entry_sparse_offset; @@ -1626,8 +1626,8 @@ parse_file_info(struct archive_read *a, */ if (location > 0 && (location + ((fsize + iso9660->logical_block_size -1) - / iso9660->logical_block_size)) > - (unsigned int)iso9660->volume_block) { + / iso9660->logical_block_size)) + > (uint32_t)iso9660->volume_block) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Invalid location of extent of file"); return (NULL); Modified: head/lib/libarchive/archive_read_support_format_tar.c ============================================================================== --- head/lib/libarchive/archive_read_support_format_tar.c Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/archive_read_support_format_tar.c Tue Dec 20 20:06:33 2011 (r228745) @@ -576,7 +576,7 @@ tar_read_header(struct archive_read *a, h = __archive_read_ahead(a, 512, NULL); if (h != NULL) __archive_read_consume(a, 512); - archive_set_error(&a->archive, 0, NULL); + archive_clear_error(&a->archive); if (a->archive.archive_format_name == NULL) { a->archive.archive_format = ARCHIVE_FORMAT_TAR; a->archive.archive_format_name = "tar"; Modified: head/lib/libarchive/archive_read_support_format_zip.c ============================================================================== --- head/lib/libarchive/archive_read_support_format_zip.c Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/archive_read_support_format_zip.c Tue Dec 20 20:06:33 2011 (r228745) @@ -211,7 +211,7 @@ archive_read_format_zip_bid(struct archi /* Get 4k of data beyond where we stopped. */ buff = __archive_read_ahead(a, offset + 4096, &bytes_avail); - if (bytes_avail < offset + 1) + if (buff == NULL) break; p = (const char *)buff + offset; while (p + 9 < (const char *)buff + bytes_avail) { Modified: head/lib/libarchive/archive_string.h ============================================================================== --- head/lib/libarchive/archive_string.h Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/archive_string.h Tue Dec 20 20:06:33 2011 (r228745) @@ -44,6 +44,8 @@ #include #endif +#include "archive.h" + /* * Basic resizable/reusable string support a la Java's "StringBuffer." * @@ -134,10 +136,11 @@ void __archive_string_free(struct archiv /* Like 'vsprintf', but resizes the underlying string as necessary. */ void __archive_string_vsprintf(struct archive_string *, const char *, - va_list); + va_list) __LA_PRINTF(2, 0); #define archive_string_vsprintf __archive_string_vsprintf -void __archive_string_sprintf(struct archive_string *, const char *, ...); +void __archive_string_sprintf(struct archive_string *, const char *, ...) + __LA_PRINTF(2, 3); #define archive_string_sprintf __archive_string_sprintf /* Allocates a fresh buffer and converts as (assumed to be UTF-8) into it. Modified: head/lib/libarchive/archive_write_disk.c ============================================================================== --- head/lib/libarchive/archive_write_disk.c Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/archive_write_disk.c Tue Dec 20 20:06:33 2011 (r228745) @@ -1730,7 +1730,7 @@ create_dir(struct archive_write_disk *a, if (unlink(path) != 0) { archive_set_error(&a->archive, errno, "Can't create directory '%s': " - "Conflicting file cannot be removed"); + "Conflicting file cannot be removed", path); return (ARCHIVE_FAILED); } } else if (errno != ENOENT && errno != ENOTDIR) { Modified: head/lib/libarchive/archive_write_set_compression_xz.c ============================================================================== --- head/lib/libarchive/archive_write_set_compression_xz.c Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/archive_write_set_compression_xz.c Tue Dec 20 20:06:33 2011 (r228745) @@ -132,9 +132,10 @@ static int archive_compressor_xz_init_stream(struct archive_write *a, struct private_data *state) { + static const lzma_stream lzma_stream_init_data = LZMA_STREAM_INIT; int ret; - state->stream = (lzma_stream)LZMA_STREAM_INIT; + state->stream = lzma_stream_init_data; state->stream.next_out = state->compressed; state->stream.avail_out = state->compressed_buffer_size; if (a->archive.compression_code == ARCHIVE_COMPRESSION_XZ) Modified: head/lib/libarchive/archive_write_set_format_ar.c ============================================================================== --- head/lib/libarchive/archive_write_set_format_ar.c Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/archive_write_set_format_ar.c Tue Dec 20 20:06:33 2011 (r228745) @@ -440,7 +440,7 @@ archive_write_ar_finish_entry(struct arc if (ar->entry_padding != 1) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Padding wrong size: %d should be 1 or 0", - ar->entry_padding); + (int)ar->entry_padding); return (ARCHIVE_WARN); } Modified: head/lib/libarchive/archive_write_set_format_shar.c ============================================================================== --- head/lib/libarchive/archive_write_set_format_shar.c Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/archive_write_set_format_shar.c Tue Dec 20 20:06:33 2011 (r228745) @@ -537,8 +537,7 @@ archive_write_shar_finish_entry(struct a } if ((p = archive_entry_fflags_text(shar->entry)) != NULL) { - archive_string_sprintf(&shar->work, "chflags %s ", - p, archive_entry_pathname(shar->entry)); + archive_string_sprintf(&shar->work, "chflags %s ", p); shar_quote(&shar->work, archive_entry_pathname(shar->entry), 1); archive_strcat(&shar->work, "\n"); Modified: head/lib/libarchive/archive_write_set_format_ustar.c ============================================================================== --- head/lib/libarchive/archive_write_set_format_ustar.c Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/archive_write_set_format_ustar.c Tue Dec 20 20:06:33 2011 (r228745) @@ -168,7 +168,7 @@ archive_write_set_format_ustar(struct ar /* Basic internal sanity test. */ if (sizeof(template_header) != 512) { - archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Internal: template_header wrong size: %d should be 512", sizeof(template_header)); + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Internal: template_header wrong size: %d should be 512", (int)sizeof(template_header)); return (ARCHIVE_FATAL); } Modified: head/lib/libarchive/config_freebsd.h ============================================================================== --- head/lib/libarchive/config_freebsd.h Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/config_freebsd.h Tue Dec 20 20:06:33 2011 (r228745) @@ -68,6 +68,7 @@ #endif #define HAVE_BSDXML_H 1 +#define HAVE_BZLIB_H 1 #define HAVE_CHFLAGS 1 #define HAVE_CHOWN 1 #define HAVE_DECL_EXTATTR_NAMESPACE_USER 1 Modified: head/lib/libarchive/libarchive-formats.5 ============================================================================== --- head/lib/libarchive/libarchive-formats.5 Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/libarchive-formats.5 Tue Dec 20 20:06:33 2011 (r228745) @@ -65,6 +65,7 @@ Later variants have extended this by eit areas of the header record, extending the header to multiple records, or by storing special entries that modify the interpretation of subsequent entries. +.Pp .Bl -tag -width indent .It Cm gnutar The Modified: head/lib/libarchive/libarchive.3 ============================================================================== --- head/lib/libarchive/libarchive.3 Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/libarchive.3 Tue Dec 20 20:06:33 2011 (r228745) @@ -177,6 +177,8 @@ which provides a slightly more efficient You may prefer to use the higher-level .Fn archive_read_data_skip , which reads and discards the data for this entry, +.Fn archive_read_data_to_buffer , +which reads the data into an in-memory buffer, .Fn archive_read_data_to_file , which copies the data to the provided file descriptor, or .Fn archive_read_extract , Modified: head/lib/libarchive/test/Makefile ============================================================================== --- head/lib/libarchive/test/Makefile Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/test/Makefile Tue Dec 20 20:06:33 2011 (r228745) @@ -52,7 +52,7 @@ TESTS= \ test_read_format_gtar_gz.c \ test_read_format_gtar_lzma.c \ test_read_format_gtar_sparse.c \ - test_read_format_iso_gz.c \ + test_read_format_iso_Z.c \ test_read_format_iso_multi_extent.c \ test_read_format_isorr_rr_moved.c \ test_read_format_isojoliet_bz2.c \ Modified: head/lib/libarchive/test/test_compat_zip.c ============================================================================== --- head/lib/libarchive/test/test_compat_zip.c Tue Dec 20 20:02:07 2011 (r228744) +++ head/lib/libarchive/test/test_compat_zip.c Tue Dec 20 20:06:33 2011 (r228745) @@ -67,7 +67,7 @@ finish: #if ARCHIVE_VERSION_NUMBER < 2000000 archive_read_finish(a); #else - assertEqualInt(ARCHIVE_OK, archive_read_finish(a)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); #endif } Copied and modified: head/lib/libarchive/test/test_read_format_iso_Z.c (from r228740, head/lib/libarchive/test/test_read_format_iso_gz.c) ============================================================================== --- head/lib/libarchive/test/test_read_format_iso_gz.c Tue Dec 20 15:50:54 2011 (r228740, copy source) +++ head/lib/libarchive/test/test_read_format_iso_Z.c Tue Dec 20 20:06:33 2011 (r228745) @@ -47,7 +47,7 @@ test1(void) ARCHIVE_COMPRESSION_COMPRESS); assertEqualInt(archive_format(a), ARCHIVE_FORMAT_ISO9660); assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); - assertEqualInt(ARCHIVE_OK, archive_read_finish(a)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); } static @@ -87,10 +87,10 @@ void test2(void) ARCHIVE_COMPRESSION_COMPRESS); assertEqualInt(archive_format(a), ARCHIVE_FORMAT_ISO9660); assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); - assertEqualInt(ARCHIVE_OK, archive_read_finish(a)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); } -DEFINE_TEST(test_read_format_iso_gz) +DEFINE_TEST(test_read_format_iso_Z) { test1(); test2(); Modified: head/usr.bin/cpio/Makefile ============================================================================== --- head/usr.bin/cpio/Makefile Tue Dec 20 20:02:07 2011 (r228744) +++ head/usr.bin/cpio/Makefile Tue Dec 20 20:06:33 2011 (r228745) @@ -3,7 +3,7 @@ .include PROG= bsdcpio -BSDCPIO_VERSION_STRING=2.8.4 +BSDCPIO_VERSION_STRING=2.8.5 SRCS= cpio.c cmdline.c Modified: head/usr.bin/tar/Makefile ============================================================================== --- head/usr.bin/tar/Makefile Tue Dec 20 20:02:07 2011 (r228744) +++ head/usr.bin/tar/Makefile Tue Dec 20 20:06:33 2011 (r228745) @@ -2,7 +2,7 @@ .include PROG= bsdtar -BSDTAR_VERSION_STRING=2.8.4 +BSDTAR_VERSION_STRING=2.8.5 SRCS= bsdtar.c \ cmdline.c \ getdate.c \ Modified: head/usr.bin/tar/tree.c ============================================================================== --- head/usr.bin/tar/tree.c Tue Dec 20 20:02:07 2011 (r228744) +++ head/usr.bin/tar/tree.c Tue Dec 20 20:06:33 2011 (r228745) @@ -48,6 +48,9 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include #endif +#ifdef HAVE_DIRECT_H +#include +#endif #ifdef HAVE_DIRENT_H #include #endif @@ -66,6 +69,9 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_UNISTD_H #include #endif +#if defined(HAVE_WINDOWS_H) && !defined(__CYGWIN__) +#include +#endif #include "tree.h" @@ -76,27 +82,38 @@ __FBSDID("$FreeBSD$"); */ struct tree_entry { + int depth; struct tree_entry *next; struct tree_entry *parent; char *name; size_t dirname_length; dev_t dev; ino_t ino; + int flags; + /* How to return back to the parent of a symlink. */ #ifdef HAVE_FCHDIR - int fd; + int symlink_parent_fd; #elif defined(_WIN32) && !defined(__CYGWIN__) - char *fullpath; + char *symlink_parent_path; #else #error fchdir function required. #endif - int flags; }; /* Definitions for tree_entry.flags bitmap. */ #define isDir 1 /* This entry is a regular directory. */ #define isDirLink 2 /* This entry is a symbolic link to a directory. */ -#define needsPreVisit 4 /* This entry needs to be previsited. */ -#define needsPostVisit 8 /* This entry needs to be postvisited. */ +#define needsFirstVisit 4 /* This is an initial entry. */ +#define needsDescent 8 /* This entry needs to be previsited. */ +#define needsOpen 16 /* This is a directory that needs to be opened. */ +#define needsAscent 32 /* This entry needs to be postvisited. */ + +/* + * On Windows, "first visit" is handled as a pattern to be handed to + * _findfirst(). This is consistent with Windows conventions that + * file patterns are handled within the application. On Posix, + * "first visit" is just returned to the client. + */ /* * Local data for this package. @@ -104,21 +121,28 @@ struct tree_entry { struct tree { struct tree_entry *stack; struct tree_entry *current; +#if defined(HAVE_WINDOWS_H) && !defined(__CYGWIN__) + HANDLE d; + BY_HANDLE_FILE_INFORMATION fileInfo; +#define INVALID_DIR_HANDLE INVALID_HANDLE_VALUE + WIN32_FIND_DATA _findData; + WIN32_FIND_DATA *findData; +#else DIR *d; -#ifdef HAVE_FCHDIR - int initialDirFd; -#elif defined(_WIN32) && !defined(__CYGWIN__) - char *initialDir; +#define INVALID_DIR_HANDLE NULL + struct dirent *de; #endif int flags; int visit_type; int tree_errno; /* Error code from last failed operation. */ + /* Dynamically-sized buffer for holding path */ char *buff; - const char *basename; size_t buff_length; - size_t path_length; - size_t dirname_length; + + const char *basename; /* Last path element */ + size_t dirname_length; /* Leading dir length */ + size_t path_length; /* Total path length */ int depth; int openCount; @@ -129,10 +153,17 @@ struct tree { }; /* Definitions for tree.flags bitmap. */ -#define needsReturn 8 /* Marks first entry as not having been returned yet. */ -#define hasStat 16 /* The st entry is set. */ -#define hasLstat 32 /* The lst entry is set. */ +#define hasStat 16 /* The st entry is valid. */ +#define hasLstat 32 /* The lst entry is valid. */ +#define hasFileInfo 64 /* The Windows fileInfo entry is valid. */ +#if defined(_WIN32) && !defined(__CYGWIN__) +static int +tree_dir_next_windows(struct tree *t, const char *pattern); +#else +static int +tree_dir_next_posix(struct tree *t); +#endif #ifdef HAVE_DIRENT_D_NAMLEN /* BSD extension; avoids need for a strlen() call. */ @@ -141,25 +172,32 @@ struct tree { #define D_NAMELEN(dp) (strlen((dp)->d_name)) #endif -#if 0 #include void tree_dump(struct tree *t, FILE *out) { + char buff[300]; struct tree_entry *te; fprintf(out, "\tdepth: %d\n", t->depth); fprintf(out, "\tbuff: %s\n", t->buff); - fprintf(out, "\tpwd: "); fflush(stdout); system("pwd"); - fprintf(out, "\taccess: %s\n", t->basename); + fprintf(out, "\tpwd: %s\n", getcwd(buff, sizeof(buff))); + fprintf(out, "\tbasename: %s\n", t->basename); fprintf(out, "\tstack:\n"); for (te = t->stack; te != NULL; te = te->next) { - fprintf(out, "\t\tte->name: %s%s%s\n", te->name, - te->flags & needsPreVisit ? "" : " *", - t->current == te ? " (current)" : ""); + fprintf(out, "\t\t%s%d:\"%s\" %s%s%s%s%s%s\n", + t->current == te ? "*" : " ", + te->depth, + te->name, + te->flags & needsFirstVisit ? "V" : "", + te->flags & needsDescent ? "D" : "", + te->flags & needsOpen ? "O" : "", + te->flags & needsAscent ? "A" : "", + te->flags & isDirLink ? "L" : "", + (t->current == te && t->d) ? "+" : "" + ); } } -#endif /* * Add a directory path to the current stack. @@ -172,24 +210,29 @@ tree_push(struct tree *t, const char *pa te = malloc(sizeof(*te)); memset(te, 0, sizeof(*te)); te->next = t->stack; + te->parent = t->current; + if (te->parent) + te->depth = te->parent->depth + 1; t->stack = te; #ifdef HAVE_FCHDIR - te->fd = -1; + te->symlink_parent_fd = -1; + te->name = strdup(path); #elif defined(_WIN32) && !defined(__CYGWIN__) - te->fullpath = NULL; -#endif + te->symlink_parent_path = NULL; te->name = strdup(path); - te->flags = needsPreVisit | needsPostVisit; +#endif + te->flags = needsDescent | needsOpen | needsAscent; te->dirname_length = t->dirname_length; } /* - * Append a name to the current path. + * Append a name to the current dir path. */ static void tree_append(struct tree *t, const char *name, size_t name_length) { char *p; + size_t size_needed; if (t->buff != NULL) t->buff[t->dirname_length] = '\0'; @@ -198,12 +241,16 @@ tree_append(struct tree *t, const char * name_length--; /* Resize pathname buffer as needed. */ - while (name_length + 1 + t->dirname_length >= t->buff_length) { - t->buff_length *= 2; + size_needed = name_length + 1 + t->dirname_length; + if (t->buff_length < size_needed) { if (t->buff_length < 1024) t->buff_length = 1024; + while (t->buff_length < size_needed) + t->buff_length *= 2; t->buff = realloc(t->buff, t->buff_length); } + if (t->buff == NULL) + abort(); p = t->buff + t->dirname_length; t->path_length = t->dirname_length + name_length; /* Add a separating '/' if it's needed. */ @@ -211,7 +258,11 @@ tree_append(struct tree *t, const char * *p++ = '/'; t->path_length ++; } +#if HAVE_STRNCPY_S + strncpy_s(p, t->buff_length - (p - t->buff), name, name_length); +#else strncpy(p, name, name_length); +#endif p[name_length] = '\0'; t->basename = p; } @@ -222,24 +273,55 @@ tree_append(struct tree *t, const char * struct tree * tree_open(const char *path) { +#ifdef HAVE_FCHDIR struct tree *t; t = malloc(sizeof(*t)); memset(t, 0, sizeof(*t)); - tree_append(t, path, strlen(path)); -#ifdef HAVE_FCHDIR - t->initialDirFd = open(".", O_RDONLY); + /* First item is set up a lot like a symlink traversal. */ + tree_push(t, path); + t->stack->flags = needsFirstVisit | isDirLink | needsAscent; + t->stack->symlink_parent_fd = open(".", O_RDONLY); + t->openCount++; + t->d = INVALID_DIR_HANDLE; + return (t); #elif defined(_WIN32) && !defined(__CYGWIN__) - t->initialDir = getcwd(NULL, 0); -#endif - /* - * During most of the traversal, items are set up and then - * returned immediately from tree_next(). That doesn't work - * for the very first entry, so we set a flag for this special - * case. - */ - t->flags = needsReturn; + struct tree *t; + char *cwd = _getcwd(NULL, 0); + char *pathname = strdup(path), *p, *base; + + if (pathname == NULL) + abort(); + for (p = pathname; *p != '\0'; ++p) { + if (*p == '\\') + *p = '/'; + } + base = pathname; + + t = malloc(sizeof(*t)); + memset(t, 0, sizeof(*t)); + /* First item is set up a lot like a symlink traversal. */ + /* printf("Looking for wildcard in %s\n", path); */ + /* TODO: wildcard detection here screws up on \\?\c:\ UNC names */ + if (strchr(base, '*') || strchr(base, '?')) { + // It has a wildcard in it... + // Separate the last element. + p = strrchr(base, '/'); + if (p != NULL) { + *p = '\0'; + chdir(base); + tree_append(t, base, p - base); + t->dirname_length = t->path_length; + base = p + 1; + } + } + tree_push(t, base); + free(pathname); + t->stack->flags = needsFirstVisit | isDirLink | needsAscent; + t->stack->symlink_parent_path = cwd; + t->d = INVALID_DIR_HANDLE; return (t); +#endif } /* @@ -255,22 +337,26 @@ tree_ascend(struct tree *t) t->depth--; if (te->flags & isDirLink) { #ifdef HAVE_FCHDIR - if (fchdir(te->fd) != 0) { + if (fchdir(te->symlink_parent_fd) != 0) { t->tree_errno = errno; r = TREE_ERROR_FATAL; } - close(te->fd); + close(te->symlink_parent_fd); #elif defined(_WIN32) && !defined(__CYGWIN__) - if (chdir(te->fullpath) != 0) { + if (SetCurrentDirectory(te->symlink_parent_path) == 0) { t->tree_errno = errno; r = TREE_ERROR_FATAL; } - free(te->fullpath); - te->fullpath = NULL; + free(te->symlink_parent_path); + te->symlink_parent_path = NULL; #endif t->openCount--; } else { +#if defined(_WIN32) && !defined(__CYGWIN__) + if (SetCurrentDirectory("..") == 0) { +#else if (chdir("..") != 0) { +#endif t->tree_errno = errno; r = TREE_ERROR_FATAL; } @@ -286,16 +372,18 @@ tree_pop(struct tree *t) { struct tree_entry *te; - t->buff[t->dirname_length] = '\0'; + if (t->buff) + t->buff[t->dirname_length] = '\0'; if (t->stack == t->current && t->current != NULL) t->current = t->current->parent; te = t->stack; t->stack = te->next; t->dirname_length = te->dirname_length; - t->basename = t->buff + t->dirname_length; - /* Special case: starting dir doesn't skip leading '/'. */ - if (t->dirname_length > 0) - t->basename++; + if (t->buff) { + t->basename = t->buff + t->dirname_length; + while (t->basename[0] == '/') + t->basename++; + } free(te->name); free(te); } @@ -306,101 +394,179 @@ tree_pop(struct tree *t) int tree_next(struct tree *t) { - struct dirent *de = NULL; int r; /* If we're called again after a fatal error, that's an API * violation. Just crash now. */ if (t->visit_type == TREE_ERROR_FATAL) { - const char *msg = "Unable to continue traversing" - " directory hierarchy after a fatal error."; - write(2, msg, strlen(msg)); - *(volatile int *)0 = 1; /* Deliberate SEGV; NULL pointer dereference. */ - exit(1); /* In case the SEGV didn't work. */ - } - - /* Handle the startup case by returning the initial entry. */ - if (t->flags & needsReturn) { - t->flags &= ~needsReturn; - return (t->visit_type = TREE_REGULAR); + fprintf(stderr, "Unable to continue traversing" + " directory hierarchy after a fatal error."); + abort(); } while (t->stack != NULL) { /* If there's an open dir, get the next entry from there. */ - while (t->d != NULL) { - de = readdir(t->d); - if (de == NULL) { - closedir(t->d); - t->d = NULL; - } else if (de->d_name[0] == '.' - && de->d_name[1] == '\0') { - /* Skip '.' */ - } else if (de->d_name[0] == '.' - && de->d_name[1] == '.' - && de->d_name[2] == '\0') { - /* Skip '..' */ - } else { - /* - * Append the path to the current path - * and return it. - */ - tree_append(t, de->d_name, D_NAMELEN(de)); - t->flags &= ~hasLstat; - t->flags &= ~hasStat; - return (t->visit_type = TREE_REGULAR); - } + if (t->d != INVALID_DIR_HANDLE) { +#if defined(_WIN32) && !defined(__CYGWIN__) + r = tree_dir_next_windows(t, NULL); +#else + r = tree_dir_next_posix(t); +#endif + if (r == 0) + continue; + return (r); } - /* If the current dir needs to be visited, set it up. */ - if (t->stack->flags & needsPreVisit) { + if (t->stack->flags & needsFirstVisit) { +#if defined(_WIN32) && !defined(__CYGWIN__) + char *d = t->stack->name; + t->stack->flags &= ~needsFirstVisit; + if (strchr(d, '*') || strchr(d, '?')) { + r = tree_dir_next_windows(t, d); + if (r == 0) + continue; + return (r); + } + // Not a pattern, handle it as-is... +#endif + /* Top stack item needs a regular visit. */ t->current = t->stack; tree_append(t, t->stack->name, strlen(t->stack->name)); - t->stack->flags &= ~needsPreVisit; + //t->dirname_length = t->path_length; + //tree_pop(t); + t->stack->flags &= ~needsFirstVisit; + return (t->visit_type = TREE_REGULAR); + } else if (t->stack->flags & needsDescent) { + /* Top stack item is dir to descend into. */ + t->current = t->stack; + tree_append(t, t->stack->name, strlen(t->stack->name)); + t->stack->flags &= ~needsDescent; /* If it is a link, set up fd for the ascent. */ if (t->stack->flags & isDirLink) { #ifdef HAVE_FCHDIR - t->stack->fd = open(".", O_RDONLY); -#elif defined(_WIN32) && !defined(__CYGWIN__) - t->stack->fullpath = getcwd(NULL, 0); -#endif + t->stack->symlink_parent_fd = open(".", O_RDONLY); t->openCount++; if (t->openCount > t->maxOpenCount) t->maxOpenCount = t->openCount; +#elif defined(_WIN32) && !defined(__CYGWIN__) + t->stack->symlink_parent_path = _getcwd(NULL, 0); +#endif } t->dirname_length = t->path_length; - if (chdir(t->stack->name) != 0) { +#if defined(_WIN32) && !defined(__CYGWIN__) + if (t->path_length == 259 || !SetCurrentDirectory(t->stack->name) != 0) +#else + if (chdir(t->stack->name) != 0) +#endif + { /* chdir() failed; return error */ tree_pop(t); t->tree_errno = errno; return (t->visit_type = TREE_ERROR_DIR); } t->depth++; - t->d = opendir("."); - if (t->d == NULL) { + return (t->visit_type = TREE_POSTDESCENT); + } else if (t->stack->flags & needsOpen) { + t->stack->flags &= ~needsOpen; +#if defined(_WIN32) && !defined(__CYGWIN__) + r = tree_dir_next_windows(t, "*"); +#else + r = tree_dir_next_posix(t); +#endif + if (r == 0) + continue; + return (r); + } else if (t->stack->flags & needsAscent) { + /* Top stack item is dir and we're done with it. */ + r = tree_ascend(t); + tree_pop(t); + t->visit_type = r != 0 ? r : TREE_POSTASCENT; + return (t->visit_type); + } else { + /* Top item on stack is dead. */ + tree_pop(t); + t->flags &= ~hasLstat; + t->flags &= ~hasStat; + } + } + return (t->visit_type = 0); +} + +#if defined(_WIN32) && !defined(__CYGWIN__) +static int +tree_dir_next_windows(struct tree *t, const char *pattern) +{ + const char *name; + size_t namelen; + int r; + + for (;;) { + if (pattern != NULL) { + t->d = FindFirstFile(pattern, &t->_findData); + if (t->d == INVALID_DIR_HANDLE) { r = tree_ascend(t); /* Undo "chdir" */ tree_pop(t); t->tree_errno = errno; t->visit_type = r != 0 ? r : TREE_ERROR_DIR; return (t->visit_type); } - t->flags &= ~hasLstat; - t->flags &= ~hasStat; - t->basename = "."; - return (t->visit_type = TREE_POSTDESCENT); + t->findData = &t->_findData; + pattern = NULL; + } else if (!FindNextFile(t->d, &t->_findData)) { + FindClose(t->d); + t->d = INVALID_DIR_HANDLE; + t->findData = NULL; + return (0); } + name = t->findData->cFileName; + namelen = strlen(name); + t->flags &= ~hasLstat; + t->flags &= ~hasStat; + if (name[0] == '.' && name[1] == '\0') + continue; + if (name[0] == '.' && name[1] == '.' && name[2] == '\0') + continue; + tree_append(t, name, namelen); + return (t->visit_type = TREE_REGULAR); + } +} +#else +static int +tree_dir_next_posix(struct tree *t) +{ + int r; + const char *name; + size_t namelen; - /* We've done everything necessary for the top stack entry. */ - if (t->stack->flags & needsPostVisit) { - r = tree_ascend(t); + if (t->d == NULL) { + if ((t->d = opendir(".")) == NULL) { + r = tree_ascend(t); /* Undo "chdir" */ tree_pop(t); - t->flags &= ~hasLstat; - t->flags &= ~hasStat; - t->visit_type = r != 0 ? r : TREE_POSTASCENT; + t->tree_errno = errno; + t->visit_type = r != 0 ? r : TREE_ERROR_DIR; return (t->visit_type); } } - return (t->visit_type = 0); + for (;;) { + t->de = readdir(t->d); + if (t->de == NULL) { + closedir(t->d); + t->d = INVALID_DIR_HANDLE; + return (0); + } + name = t->de->d_name; + namelen = D_NAMELEN(t->de); + t->flags &= ~hasLstat; + t->flags &= ~hasStat; + if (name[0] == '.' && name[1] == '\0') + continue; + if (name[0] == '.' && name[1] == '.' && name[2] == '\0') + continue; + tree_append(t, name, namelen); + return (t->visit_type = TREE_REGULAR); + } } +#endif /* * Return error code. @@ -437,25 +603,51 @@ const struct stat * tree_current_stat(struct tree *t) { if (!(t->flags & hasStat)) { - if (stat(t->basename, &t->st) != 0) + if (stat(tree_current_access_path(t), &t->st) != 0) return NULL; t->flags |= hasStat; } return (&t->st); } +#if defined(HAVE_WINDOWS_H) && !defined(__CYGWIN__) +const BY_HANDLE_FILE_INFORMATION * +tree_current_file_information(struct tree *t) +{ + if (!(t->flags & hasFileInfo)) { + HANDLE h = CreateFile(tree_current_access_path(t), + 0, 0, NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, + NULL); + if (h == INVALID_HANDLE_VALUE) + return NULL; + if (!GetFileInformationByHandle(h, &t->fileInfo)) { + CloseHandle(h); + return NULL; + } + CloseHandle(h); + t->flags |= hasFileInfo; + } + return (&t->fileInfo); +} +#endif /* * Get the lstat() data for the entry just returned from tree_next(). */ const struct stat * tree_current_lstat(struct tree *t) { +#if defined(_WIN32) && !defined(__CYGWIN__) + return (tree_current_stat(t)); +#else if (!(t->flags & hasLstat)) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 20:16:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4644106566C; Tue, 20 Dec 2011 20:16:13 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5AE78FC14; Tue, 20 Dec 2011 20:16:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKKGDuF033210; Tue, 20 Dec 2011 20:16:13 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKKGDW2033208; Tue, 20 Dec 2011 20:16:13 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201112202016.pBKKGDW2033208@svn.freebsd.org> From: Alan Cox Date: Tue, 20 Dec 2011 20:16:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228746 - head/sys/i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 20:16:14 -0000 Author: alc Date: Tue Dec 20 20:16:12 2011 New Revision: 228746 URL: http://svn.freebsd.org/changeset/base/228746 Log: The Xen pmap doesn't support superpages. So, there is no point in it initializing structures, like the pv table, that are only used to implement superpages. In fact, some of the unnecessary code in pmap_init() was actually doing harm. It was preventing the kernel from booting on virtual machines with more than 768 MB of memory. Tested by: sbruno Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Tue Dec 20 20:06:33 2011 (r228745) +++ head/sys/i386/xen/pmap.c Tue Dec 20 20:16:12 2011 (r228746) @@ -184,9 +184,6 @@ __FBSDID("$FreeBSD$"); #define PV_STAT(x) do { } while (0) #endif -#define pa_index(pa) ((pa) >> PDRSHIFT) -#define pa_to_pvh(pa) (&pv_table[pa_index(pa)]) - /* * Get PDEs and PTEs for user/kernel address space */ @@ -230,7 +227,6 @@ static int pat_works; /* Is page attri * Data for the pv entry allocation mechanism */ static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; -static struct md_page *pv_table; static int shpgperproc = PMAP_SHPGPERPROC; struct pv_chunk *pv_chunkbase; /* KVA block for pv_chunks */ @@ -278,9 +274,6 @@ SYSCTL_INT(_debug, OID_AUTO, PMAP1unchan static struct mtx PMAP2mutex; static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); -static int pg_ps_enabled; -SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN, &pg_ps_enabled, 0, - "Are large page mappings enabled?"); SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_max, CTLFLAG_RD, &pv_entry_max, 0, "Max number of PV entries"); @@ -636,24 +629,8 @@ pmap_ptelist_init(vm_offset_t *head, voi void pmap_init(void) { - vm_page_t mpte; - vm_size_t s; - int i, pv_npg; /* - * Initialize the vm page array entries for the kernel pmap's - * page table pages. - */ - for (i = 0; i < nkpt; i++) { - mpte = PHYS_TO_VM_PAGE(xpmap_mtop(PTD[i + KPTDI] & PG_FRAME)); - KASSERT(mpte >= vm_page_array && - mpte < &vm_page_array[vm_page_array_size], - ("pmap_init: page table page is out of range")); - mpte->pindex = i + KPTDI; - mpte->phys_addr = xpmap_mtop(PTD[i + KPTDI] & PG_FRAME); - } - - /* * Initialize the address space (zone) for the pv entries. Set a * high water mark so that the system can recover from excessive * numbers of pv entries. @@ -664,26 +641,6 @@ pmap_init(void) pv_entry_max = roundup(pv_entry_max, _NPCPV); pv_entry_high_water = 9 * (pv_entry_max / 10); - /* - * Are large page mappings enabled? - */ - TUNABLE_INT_FETCH("vm.pmap.pg_ps_enabled", &pg_ps_enabled); - - /* - * Calculate the size of the pv head table for superpages. - */ - for (i = 0; phys_avail[i + 1]; i += 2); - pv_npg = round_4mpage(phys_avail[(i - 2) + 1]) / NBPDR; - - /* - * Allocate memory for the pv head table for superpages. - */ - s = (vm_size_t)(pv_npg * sizeof(struct md_page)); - s = round_page(s); - pv_table = (struct md_page *)kmem_alloc(kernel_map, s); - for (i = 0; i < pv_npg; i++) - TAILQ_INIT(&pv_table[i].pv_list); - pv_maxchunks = MAX(pv_entry_max / _NPCPV, maxproc); pv_chunkbase = (struct pv_chunk *)kmem_alloc_nofault(kernel_map, PAGE_SIZE * pv_maxchunks); @@ -3448,21 +3405,15 @@ pmap_page_wired_mappings(vm_page_t m) } /* - * Returns TRUE if the given page is mapped individually or as part of - * a 4mpage. Otherwise, returns FALSE. + * Returns TRUE if the given page is mapped. Otherwise, returns FALSE. */ boolean_t pmap_page_is_mapped(vm_page_t m) { - boolean_t rv; if ((m->oflags & VPO_UNMANAGED) != 0) return (FALSE); - vm_page_lock_queues(); - rv = !TAILQ_EMPTY(&m->md.pv_list) || - !TAILQ_EMPTY(&pa_to_pvh(VM_PAGE_TO_PHYS(m))->pv_list); - vm_page_unlock_queues(); - return (rv); + return (!TAILQ_EMPTY(&m->md.pv_list)); } /* From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 20:17:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E941F106564A; Tue, 20 Dec 2011 20:17:39 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6FFA38FC0A; Tue, 20 Dec 2011 20:17:39 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so4014564obb.13 for ; Tue, 20 Dec 2011 12:17:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=D5+3lCM7OMU+G7iiVNXSpC39xiR3Zue58kSvT9nt8ZQ=; b=l7INsZJIJWliYH18AlSbnHSHUsPEpv23I6ntvwVzm+zwtwrPc3drE2D5eaRTdmY21D KoD+YH60rEkDKH/qlb3y+CizRjo20i2MYeEhZaAXR2Br1lcS6qwKBNOBwpLyvT0NGliG y2YPfLZA+68Sf/cAqdL/Il8rdtPUfZec9JIGY= MIME-Version: 1.0 Received: by 10.182.231.38 with SMTP id td6mr3036193obc.66.1324412258833; Tue, 20 Dec 2011 12:17:38 -0800 (PST) Received: by 10.182.62.227 with HTTP; Tue, 20 Dec 2011 12:17:38 -0800 (PST) In-Reply-To: References: <201111291946.pATJkHMs064094@svn.freebsd.org> <4ED544E1.3050307@t-hosting.hu> <4ED545A9.8000304@FreeBSD.org> <0CAA5754-4FAC-4B87-92B7-439B109473C0@bsdimp.com> <20111220171740.X1005@besplex.bde.org> <91C30101-B401-4B2F-84BE-7BB4AF3D9311@bsdimp.com> Date: Tue, 20 Dec 2011 12:17:38 -0800 Message-ID: From: Garrett Cooper To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Doug Barton , Max Khon , svn-src-all@freebsd.org, src-committers@freebsd.org, =?ISO-8859-1?B?R+Fib3IgS/Z2ZXNk4W4=?= , Bruce Evans , svn-src-head@freebsd.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 20:17:40 -0000 On Tue, Dec 20, 2011 at 11:36 AM, Warner Losh wrote: > > On Dec 20, 2011, at 12:21 PM, Garrett Cooper wrote: > >> On Tue, Dec 20, 2011 at 9:40 AM, Warner Losh wrote: >>> >>> On Dec 20, 2011, at 2:21 AM, Garrett Cooper wrote: >>> >>> >>> =A0 =A0The assumption (that isn't clearly stated) is that I am building >>> things on suped up x86 hardware, not arm CPUs, Intel Atoms, etc. On >>> those platforms building superfluous things still do matter (in >>> particular because cross-building some things still isn't doable 100% >>> of the time, but also because flash, some platter media, etc is slow). >>> But I suppose I digress... >>> >>> >>> When is cross building not doable? =A0Please, give examples, not fud. >> >> ports. > > Which affects profiled libraries how? Please see later comment :/. -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 20:29:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B4BF106566C; Tue, 20 Dec 2011 20:29:46 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4676F8FC0C; Tue, 20 Dec 2011 20:29:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKKTkv5033681; Tue, 20 Dec 2011 20:29:46 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKKTkkJ033679; Tue, 20 Dec 2011 20:29:46 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201112202029.pBKKTkkJ033679@svn.freebsd.org> From: Alan Cox Date: Tue, 20 Dec 2011 20:29:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228747 - head/sys/i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 20:29:46 -0000 Author: alc Date: Tue Dec 20 20:29:45 2011 New Revision: 228747 URL: http://svn.freebsd.org/changeset/base/228747 Log: The size passed to kmem functions should be in terms of bytes and not pages. Avoid an out-of-bounds array access. Reviewed by: cperciva Modified: head/sys/i386/xen/mp_machdep.c Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Tue Dec 20 20:16:12 2011 (r228746) +++ head/sys/i386/xen/mp_machdep.c Tue Dec 20 20:29:45 2011 (r228747) @@ -810,7 +810,7 @@ cpu_initialize_context(unsigned int cpu) { /* vcpu_guest_context_t is too large to allocate on the stack. * Hence we allocate statically and protect it with a lock */ - vm_page_t m[4]; + vm_page_t m[NPGPTD + 2]; static vcpu_guest_context_t ctxt; vm_offset_t boot_stack; vm_offset_t newPTD; @@ -831,8 +831,8 @@ cpu_initialize_context(unsigned int cpu) pmap_zero_page(m[i]); } - boot_stack = kmem_alloc_nofault(kernel_map, 1); - newPTD = kmem_alloc_nofault(kernel_map, NPGPTD); + boot_stack = kmem_alloc_nofault(kernel_map, PAGE_SIZE); + newPTD = kmem_alloc_nofault(kernel_map, NPGPTD * PAGE_SIZE); ma[0] = VM_PAGE_TO_MACH(m[0])|PG_V; #ifdef PAE @@ -854,7 +854,7 @@ cpu_initialize_context(unsigned int cpu) nkpt*sizeof(vm_paddr_t)); pmap_qremove(newPTD, 4); - kmem_free(kernel_map, newPTD, 4); + kmem_free(kernel_map, newPTD, 4 * PAGE_SIZE); /* * map actual idle stack to boot_stack */ From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 20:34:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71E95106564A; Tue, 20 Dec 2011 20:34:03 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C2BA8FC08; Tue, 20 Dec 2011 20:34:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKKY3Jc033882; Tue, 20 Dec 2011 20:34:03 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKKY34v033876; Tue, 20 Dec 2011 20:34:03 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112202034.pBKKY34v033876@svn.freebsd.org> From: Martin Matuska Date: Tue, 20 Dec 2011 20:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228748 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 20:34:03 -0000 Author: mm Date: Tue Dec 20 20:34:02 2011 New Revision: 228748 URL: http://svn.freebsd.org/changeset/base/228748 Log: Sync libarchive with vendor branch release/2.8: 3730: Fix issue 174 (Windows path names, not relevant for FreeBSD) 3734: Merge r1989: archive_clear_error should set errno to 0. 3735: Merge r3247 from trunk: Clear errors before returning from archive_read_support_format_all() 3799: Check the position before dereferencing the pointer. This avoids dereferencing one byte past the end of a string 3824: Merge r3823 from trunk for issue 199 (hang in iso9660 reading) Obtained from: http://code.google.com/p/libarchive MFC after: 2 weeks Modified: head/lib/libarchive/archive_read_support_format_all.c head/lib/libarchive/archive_read_support_format_iso9660.c head/lib/libarchive/archive_string.c head/lib/libarchive/archive_util.c head/lib/libarchive/archive_write_disk.c Modified: head/lib/libarchive/archive_read_support_format_all.c ============================================================================== --- head/lib/libarchive/archive_read_support_format_all.c Tue Dec 20 20:29:45 2011 (r228747) +++ head/lib/libarchive/archive_read_support_format_all.c Tue Dec 20 20:34:02 2011 (r228748) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003-2007 Tim Kientzle + * Copyright (c) 2003-2011 Tim Kientzle * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,5 +39,13 @@ archive_read_support_format_all(struct a archive_read_support_format_tar(a); archive_read_support_format_xar(a); archive_read_support_format_zip(a); + + /* Note: We always return ARCHIVE_OK here, even if some of the + * above return ARCHIVE_WARN. The intent here is to enable + * "as much as possible." Clients who need specific + * compression should enable those individually so they can + * verify the level of support. */ + /* Clear any warning messages set by the above functions. */ + archive_clear_error(a); return (ARCHIVE_OK); } Modified: head/lib/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- head/lib/libarchive/archive_read_support_format_iso9660.c Tue Dec 20 20:29:45 2011 (r228747) +++ head/lib/libarchive/archive_read_support_format_iso9660.c Tue Dec 20 20:34:02 2011 (r228748) @@ -302,6 +302,8 @@ struct file_info { struct file_info *first; struct file_info **last; } rede_files; + /* To check a ininity loop. */ + struct file_info *loop_by; }; struct heap_queue { @@ -2699,8 +2701,14 @@ rede_add_entry(struct file_info *file) struct file_info *re; re = file->parent; - while (re != NULL && !re->re) + while (re != NULL && !re->re) { + /* Sanity check to prevent a infinity loop + * cause by a currupted iso file. */ + if (re->loop_by == file) + return (-1); + re->loop_by = file; re = re->parent; + } if (re == NULL) return (-1); Modified: head/lib/libarchive/archive_string.c ============================================================================== --- head/lib/libarchive/archive_string.c Tue Dec 20 20:29:45 2011 (r228747) +++ head/lib/libarchive/archive_string.c Tue Dec 20 20:34:02 2011 (r228748) @@ -152,7 +152,7 @@ __archive_strncat(struct archive_string /* Like strlen(p), except won't examine positions beyond p[n]. */ s = 0; pp = p; - while (*pp && s < n) { + while (s < n && *pp) { pp++; s++; } Modified: head/lib/libarchive/archive_util.c ============================================================================== --- head/lib/libarchive/archive_util.c Tue Dec 20 20:29:45 2011 (r228747) +++ head/lib/libarchive/archive_util.c Tue Dec 20 20:34:02 2011 (r228748) @@ -155,6 +155,7 @@ archive_clear_error(struct archive *a) { archive_string_empty(&a->error_string); a->error = NULL; + a->archive_error_number = 0; } void Modified: head/lib/libarchive/archive_write_disk.c ============================================================================== --- head/lib/libarchive/archive_write_disk.c Tue Dec 20 20:29:45 2011 (r228747) +++ head/lib/libarchive/archive_write_disk.c Tue Dec 20 20:34:02 2011 (r228748) @@ -1513,6 +1513,22 @@ check_symlinks(struct archive_write_disk } #if defined(_WIN32) || defined(__CYGWIN__) +static int +guidword(const char *p, int n) +{ + int i; + + for (i = 0; i < n; i++) { + if ((*p >= '0' && *p <= '9') || + (*p >= 'a' && *p <= 'f') || + (*p >= 'A' && *p <= 'F')) + p++; + else + return (-1); + } + return (0); +} + /* * 1. Convert a path separator from '\' to '/' . * We shouldn't check multi-byte character directly because some @@ -1521,26 +1537,92 @@ check_symlinks(struct archive_write_disk * 2. Replace unusable characters in Windows with underscore('_'). * See also : http://msdn.microsoft.com/en-us/library/aa365247.aspx */ -static void +static int cleanup_pathname_win(struct archive_write_disk *a) { wchar_t wc; char *p; size_t alen, l; - alen = 0; - l = 0; - for (p = a->name; *p != '\0'; p++) { - ++alen; - if (*p == '\\') - l = 1; + p = a->name; + /* Skip leading "\\.\" or "\\?\" or "\\?\UNC\" or + * "\\?\Volume{GUID}\" + * (absolute path prefixes used by Windows API) */ + if ((p[0] == '\\' || p[0] == '/') && (p[1] == '\\' || p[1] == '/' ) && + (p[2] == '.' || p[2] == '?') && (p[3] == '\\' || p[3] == '/')) + { + /* A path begin with "\\?\UNC\" */ + if (p[2] == '?' && + (p[4] == 'U' || p[4] == 'u') && + (p[5] == 'N' || p[5] == 'n') && + (p[6] == 'C' || p[6] == 'c') && + (p[7] == '\\' || p[7] == '/')) + p += 8; + /* A path begin with "\\?\Volume{GUID}\" */ + else if (p[2] == '?' && + (p[4] == 'V' || p[4] == 'v') && + (p[5] == 'O' || p[5] == 'o') && + (p[6] == 'L' || p[6] == 'l') && + (p[7] == 'U' || p[7] == 'u') && + (p[8] == 'M' || p[8] == 'm') && + (p[9] == 'E' || p[9] == 'e') && + p[10] == '{') { + if (guidword(p+11, 8) == 0 && p[19] == '-' && + guidword(p+20, 4) == 0 && p[24] == '-' && + guidword(p+25, 4) == 0 && p[29] == '-' && + guidword(p+30, 4) == 0 && p[34] == '-' && + guidword(p+35, 12) == 0 && p[47] == '}' && + (p[48] == '\\' || p[48] == '/')) + p += 49; + else + p += 4; + /* A path begin with "\\.\PhysicalDriveX" */ + } else if (p[2] == '.' && + (p[4] == 'P' || p[4] == 'p') && + (p[5] == 'H' || p[5] == 'h') && + (p[6] == 'Y' || p[6] == 'y') && + (p[7] == 'S' || p[7] == 's') && + (p[8] == 'I' || p[8] == 'i') && + (p[9] == 'C' || p[9] == 'c') && + (p[9] == 'A' || p[9] == 'a') && + (p[9] == 'L' || p[9] == 'l') && + (p[9] == 'D' || p[9] == 'd') && + (p[9] == 'R' || p[9] == 'r') && + (p[9] == 'I' || p[9] == 'i') && + (p[9] == 'V' || p[9] == 'v') && + (p[9] == 'E' || p[9] == 'e') && + (p[10] >= '0' && p[10] <= '9') && + p[11] == '\0') { + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Path is a physical drive name"); + return (ARCHIVE_FAILED); + } else + p += 4; + } + + /* Skip leading drive letter from archives created + * on Windows. */ + if (((p[0] >= 'a' && p[0] <= 'z') || + (p[0] >= 'A' && p[0] <= 'Z')) && + p[1] == ':') { + if (p[2] == '\0') { + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "Path is a drive name"); + return (ARCHIVE_FAILED); + } + if (p[2] == '\\' || p[2] == '/') + p += 3; + } + + for (; *p != '\0'; p++) { /* Rewrite the path name if its character is a unusable. */ if (*p == ':' || *p == '*' || *p == '?' || *p == '"' || *p == '<' || *p == '>' || *p == '|') *p = '_'; } - if (alen == 0 || l == 0) - return; + alen = p - a->name; + if (alen == 0 || strchr(a->name, '\\') == NULL) + return (ARCHIVE_OK); /* * Convert path separator. */ @@ -1560,6 +1642,7 @@ cleanup_pathname_win(struct archive_writ p += l; alen -= l; } + return (ARCHIVE_OK); } #endif @@ -1583,7 +1666,8 @@ cleanup_pathname(struct archive_write_di } #if defined(_WIN32) || defined(__CYGWIN__) - cleanup_pathname_win(a); + if (cleanup_pathname_win(a) != ARCHIVE_OK) + return (ARCHIVE_FAILED); #endif /* Skip leading '/'. */ if (*src == '/') From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 20:36:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47D45106566B; Tue, 20 Dec 2011 20:36:01 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 333598FC1A; Tue, 20 Dec 2011 20:36:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKKa1Ip033985; Tue, 20 Dec 2011 20:36:01 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKKa0Bn033983; Tue, 20 Dec 2011 20:36:00 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112202036.pBKKa0Bn033983@svn.freebsd.org> From: Martin Matuska Date: Tue, 20 Dec 2011 20:36:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228749 - head/usr.bin/tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 20:36:01 -0000 Author: mm Date: Tue Dec 20 20:36:00 2011 New Revision: 228749 URL: http://svn.freebsd.org/changeset/base/228749 Log: Sync bsdtar with vendor branch release/2.8: Revision 3769: Merge r3744 from trunk: Correctly return errors when reading an archive using @archive extension. Obtained from: http://code.google.com/p/libarchive MFC after: 2 weeks Modified: head/usr.bin/tar/write.c Modified: head/usr.bin/tar/write.c ============================================================================== --- head/usr.bin/tar/write.c Tue Dec 20 20:34:02 2011 (r228748) +++ head/usr.bin/tar/write.c Tue Dec 20 20:36:00 2011 (r228749) @@ -592,7 +592,7 @@ append_archive(struct bsdtar *bsdtar, st struct archive_entry *in_entry; int e; - while (0 == archive_read_next_header(ina, &in_entry)) { + while (ARCHIVE_OK == (e = archive_read_next_header(ina, &in_entry))) { if (!new_enough(bsdtar, archive_entry_pathname(in_entry), archive_entry_stat(in_entry))) continue; @@ -630,8 +630,7 @@ append_archive(struct bsdtar *bsdtar, st fprintf(stderr, "\n"); } - /* Note: If we got here, we saw no write errors, so return success. */ - return (0); + return (e == ARCHIVE_EOF ? ARCHIVE_OK : e); } /* Helper function to copy data between archives. */ From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 20:37:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B7821065670; Tue, 20 Dec 2011 20:37:18 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 16CC18FC13; Tue, 20 Dec 2011 20:37:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKKbHl7034061; Tue, 20 Dec 2011 20:37:17 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKKbHEi034059; Tue, 20 Dec 2011 20:37:17 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112202037.pBKKbHEi034059@svn.freebsd.org> From: Martin Matuska Date: Tue, 20 Dec 2011 20:37:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228750 - head/usr.bin/cpio/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 20:37:18 -0000 Author: mm Date: Tue Dec 20 20:37:17 2011 New Revision: 228750 URL: http://svn.freebsd.org/changeset/base/228750 Log: Sync bsdcpio with vendor branch release/2.8: Revision 3770: Merge r3768 from trunk: Fix typo in dev/ino verification for cpio formats. Obtained from: http://code.google.com/p/libarchive MFC after: 2 weeks Modified: head/usr.bin/cpio/test/test_option_c.c Modified: head/usr.bin/cpio/test/test_option_c.c ============================================================================== --- head/usr.bin/cpio/test/test_option_c.c Tue Dec 20 20:36:00 2011 (r228749) +++ head/usr.bin/cpio/test/test_option_c.c Tue Dec 20 20:37:17 2011 (r228750) @@ -176,7 +176,7 @@ DEFINE_TEST(test_option_c) assertEqualInt(dev, from_octal(e + 6, 6)); /* Ino must be different from first entry. */ assert(is_octal(e + 12, 6)); /* ino */ - assert(dev != from_octal(e + 12, 6)); + assert(ino != from_octal(e + 12, 6)); #if defined(_WIN32) && !defined(__CYGWIN__) /* Group members bits and others bits do not work. */ assertEqualMem(e + 18, "040777", 6); /* Mode */ From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 20:39:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B44F106566B; Tue, 20 Dec 2011 20:39:01 +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 46C8B8FC0C; Tue, 20 Dec 2011 20:39:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKKd1w6034153; Tue, 20 Dec 2011 20:39:01 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKKd1jc034150; Tue, 20 Dec 2011 20:39:01 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112202039.pBKKd1jc034150@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 20 Dec 2011 20:39:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228751 - head/sbin/fsck_ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 20:39:01 -0000 Author: kib Date: Tue Dec 20 20:39:00 2011 New Revision: 228751 URL: http://svn.freebsd.org/changeset/base/228751 Log: Change the type of real_dev_bsize variable from long to u_int. The DIOCGSECTORSIZE takes u_int * as an argument, using long * causes failures on big-endian targets. Diagnosed by: Michiel Boland PR: sparc64/163460 Tested by: pho (x86), flo (sparc64) MFC after: 1 week Modified: head/sbin/fsck_ffs/fsck.h head/sbin/fsck_ffs/suj.c Modified: head/sbin/fsck_ffs/fsck.h ============================================================================== --- head/sbin/fsck_ffs/fsck.h Tue Dec 20 20:37:17 2011 (r228750) +++ head/sbin/fsck_ffs/fsck.h Tue Dec 20 20:39:00 2011 (r228751) @@ -268,7 +268,7 @@ char snapname[BUFSIZ]; /* when doing sna char *cdevname; /* name of device being checked */ long dev_bsize; /* computed value of DEV_BSIZE */ long secsize; /* actual disk sector size */ -long real_dev_bsize; +u_int real_dev_bsize; /* actual disk sector size, not overriden */ char nflag; /* assume a no response */ char yflag; /* assume a yes response */ int bkgrdflag; /* use a snapshot to run on an active system */ Modified: head/sbin/fsck_ffs/suj.c ============================================================================== --- head/sbin/fsck_ffs/suj.c Tue Dec 20 20:37:17 2011 (r228750) +++ head/sbin/fsck_ffs/suj.c Tue Dec 20 20:39:00 2011 (r228751) @@ -206,7 +206,7 @@ opendisk(const char *devnam) &real_dev_bsize) == -1) real_dev_bsize = secsize; if (debug) - printf("dev_bsize %ld\n", real_dev_bsize); + printf("dev_bsize %u\n", real_dev_bsize); } /* From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 20:56:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A3341065670; Tue, 20 Dec 2011 20:56:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D1AE58FC20; Tue, 20 Dec 2011 20:56:33 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 887AD46B0D; Tue, 20 Dec 2011 15:56:33 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0A7DDB91A; Tue, 20 Dec 2011 15:56:33 -0500 (EST) From: John Baldwin To: Martin Matuska Date: Tue, 20 Dec 2011 15:56:32 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201112202037.pBKKbHEi034059@svn.freebsd.org> In-Reply-To: <201112202037.pBKKbHEi034059@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201112201556.32540.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 20 Dec 2011 15:56:33 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228750 - head/usr.bin/cpio/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 20:56:34 -0000 On Tuesday, December 20, 2011 3:37:17 pm Martin Matuska wrote: > Author: mm > Date: Tue Dec 20 20:37:17 2011 > New Revision: 228750 > URL: http://svn.freebsd.org/changeset/base/228750 > > Log: > Sync bsdcpio with vendor branch release/2.8: > > Revision 3770: > Merge r3768 from trunk: Fix typo in dev/ino verification for cpio formats. > > Obtained from: http://code.google.com/p/libarchive > MFC after: 2 weeks If libarchive is now maintained externally rather than in the tree, is it time for bsdtar, bsdcpio, and libarchive to move to contrib and for vendor imports to be managed as they are for other contrib bits? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 21:16:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CE241065675; Tue, 20 Dec 2011 21:16:50 +0000 (UTC) (envelope-from jgh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2805B8FC15; Tue, 20 Dec 2011 21:16:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKLGoi3035557; Tue, 20 Dec 2011 21:16:50 GMT (envelope-from jgh@svn.freebsd.org) Received: (from jgh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKLGoYs035555; Tue, 20 Dec 2011 21:16:50 GMT (envelope-from jgh@svn.freebsd.org) Message-Id: <201112202116.pBKLGoYs035555@svn.freebsd.org> From: Jason Helfman Date: Tue, 20 Dec 2011 21:16:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228752 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 21:16:50 -0000 Author: jgh (ports committer) Date: Tue Dec 20 21:16:49 2011 New Revision: 228752 URL: http://svn.freebsd.org/changeset/base/228752 Log: Add myself with mentor relationships Add tabthorpe -> crees Approved by: crees (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Dec 20 20:39:00 2011 (r228751) +++ head/share/misc/committers-ports.dot Tue Dec 20 21:16:49 2011 (r228752) @@ -99,6 +99,7 @@ ijliao [label="Ying-Chieh Liao\nijliao@F itetcu [label="Ion-Mihai Tetcu\nitetcu@FreeBSD.org\n2006/06/07"] jacula [label="Giuseppe Pilichi\njacula@FreeBSD.org\n2010/04/05"] jadawin [label="Philippe Audeoud\njadawin@FreeBSD.org\n2008/03/02"] +jgh [label="Jason Helfman\njgh@FreeBSD.org\n2011/12/16"] jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2007/09/12"] jlaffaye [label="Julien Laffaye\njlaffaye@FreeBSD.org\n2011/06/06"] jmelo [label="Jean Milanez Melo\njmelo@FreeBSD.org\n2006/03/31"] @@ -234,6 +235,8 @@ clement -> lawrance clsung -> lwhsu clsung -> tabthorpe +crees -> jgh + delphij -> nemoliu delphij -> rafan @@ -395,6 +398,7 @@ philip -> koitsu rafan -> chinsan rene -> crees +rene -> jgh sahil -> culot sahil -> eadler @@ -422,6 +426,7 @@ tabthorpe -> ashish tabthorpe -> avilla tabthorpe -> avl tabthorpe -> bapt +tabthorpe -> crees tabthorpe -> dhn tabthorpe -> fluffy tabthorpe -> jacula From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 22:27:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88EF11065675; Tue, 20 Dec 2011 22:27:19 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mail.vx.sk (mail.vx.sk [IPv6:2a01:4f8:150:6101::4]) by mx1.freebsd.org (Postfix) with ESMTP id 2038A8FC12; Tue, 20 Dec 2011 22:27:19 +0000 (UTC) Received: from core.vx.sk (localhost [127.0.0.2]) by mail.vx.sk (Postfix) with ESMTP id 4F60617E91; Tue, 20 Dec 2011 23:27:18 +0100 (CET) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail.vx.sk by core.vx.sk (amavisd-new, unix socket) with LMTP id 9ZW9jVH9qncn; Tue, 20 Dec 2011 23:27:15 +0100 (CET) Received: from [10.9.8.1] (188-167-78-15.dynamic.chello.sk [188.167.78.15]) by mail.vx.sk (Postfix) with ESMTPSA id C904017E8B; Tue, 20 Dec 2011 23:27:15 +0100 (CET) Message-ID: <4EF10BC2.2030607@FreeBSD.org> Date: Tue, 20 Dec 2011 23:27:14 +0100 From: Martin Matuska User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: John Baldwin References: <201112202037.pBKKbHEi034059@svn.freebsd.org> <201112201556.32540.jhb@freebsd.org> In-Reply-To: <201112201556.32540.jhb@freebsd.org> X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228750 - head/usr.bin/cpio/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 22:27:19 -0000 On 20.12.2011 21:56, John Baldwin wrote: > On Tuesday, December 20, 2011 3:37:17 pm Martin Matuska wrote: >> Author: mm >> Date: Tue Dec 20 20:37:17 2011 >> New Revision: 228750 >> URL: http://svn.freebsd.org/changeset/base/228750 >> >> Log: >> Sync bsdcpio with vendor branch release/2.8: >> >> Revision 3770: >> Merge r3768 from trunk: Fix typo in dev/ino verification for cpio formats. >> >> Obtained from: http://code.google.com/p/libarchive >> MFC after: 2 weeks > If libarchive is now maintained externally rather than in the tree, is it time > for bsdtar, bsdcpio, and libarchive to move to contrib and for vendor imports > to be managed as they are for other contrib bits? > I agree, this is the right thing to do. I am going to start making appropriate bits under vendor/. -- Martin Matuska FreeBSD committer http://blog.vx.sk From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 22:47:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 896EA106566C; Tue, 20 Dec 2011 22:47:57 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 701A68FC0A; Tue, 20 Dec 2011 22:47:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKMlv2K038703; Tue, 20 Dec 2011 22:47:57 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKMlvYv038696; Tue, 20 Dec 2011 22:47:57 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112202247.pBKMlvYv038696@svn.freebsd.org> From: Martin Matuska Date: Tue, 20 Dec 2011 22:47:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228753 - in vendor/libarchive: . dist dist/build dist/build/autoconf dist/build/cmake dist/build/pkgconfig dist/contrib dist/contrib/psota-benchmark dist/contrib/shar dist/cpio dist/cp... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 22:47:57 -0000 Author: mm Date: Tue Dec 20 22:47:56 2011 New Revision: 228753 URL: http://svn.freebsd.org/changeset/base/228753 Log: Vendor import of libarchive (release/2.8, r3824) Obtained from: http://libarchive.googlecode.com/svn/release/2.8 Added: vendor/libarchive/ vendor/libarchive/dist/ vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/COPYING vendor/libarchive/dist/CTestConfig.cmake vendor/libarchive/dist/INSTALL vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/NEWS vendor/libarchive/dist/README vendor/libarchive/dist/build/ vendor/libarchive/dist/build/autoconf/ vendor/libarchive/dist/build/autoconf/check_stdcall_func.m4 vendor/libarchive/dist/build/autoconf/la_uid_t.m4 vendor/libarchive/dist/build/autogen.sh (contents, props changed) vendor/libarchive/dist/build/bump-version.sh vendor/libarchive/dist/build/clean.sh vendor/libarchive/dist/build/cmake/ vendor/libarchive/dist/build/cmake/AddTest28.cmake vendor/libarchive/dist/build/cmake/CheckFileOffsetBits.c vendor/libarchive/dist/build/cmake/CheckFileOffsetBits.cmake vendor/libarchive/dist/build/cmake/CheckFuncs.cmake vendor/libarchive/dist/build/cmake/CheckFuncs_stub.c.in vendor/libarchive/dist/build/cmake/CheckHeaderDirent.cmake vendor/libarchive/dist/build/cmake/CheckStructMember.cmake vendor/libarchive/dist/build/cmake/CheckTypeExists.cmake vendor/libarchive/dist/build/cmake/FindLZMA.cmake vendor/libarchive/dist/build/cmake/config.h.in vendor/libarchive/dist/build/pkgconfig/ vendor/libarchive/dist/build/pkgconfig/libarchive.pc.in vendor/libarchive/dist/build/version vendor/libarchive/dist/configure.ac vendor/libarchive/dist/contrib/ vendor/libarchive/dist/contrib/README vendor/libarchive/dist/contrib/libarchive.1aix53.spec vendor/libarchive/dist/contrib/libarchive.spec vendor/libarchive/dist/contrib/libarchive_autodetect-st_lib_archive.m4 vendor/libarchive/dist/contrib/psota-benchmark/ vendor/libarchive/dist/contrib/psota-benchmark/results.txt vendor/libarchive/dist/contrib/psota-benchmark/tcp.sh vendor/libarchive/dist/contrib/shar/ vendor/libarchive/dist/contrib/shar/Makefile vendor/libarchive/dist/contrib/shar/shar.1 vendor/libarchive/dist/contrib/shar/shar.c vendor/libarchive/dist/contrib/shar/tree.c vendor/libarchive/dist/contrib/shar/tree.h vendor/libarchive/dist/contrib/shar/tree_config.h vendor/libarchive/dist/contrib/untar.c vendor/libarchive/dist/cpio/ vendor/libarchive/dist/cpio/CMakeLists.txt vendor/libarchive/dist/cpio/bsdcpio.1 vendor/libarchive/dist/cpio/cmdline.c vendor/libarchive/dist/cpio/config_freebsd.h vendor/libarchive/dist/cpio/cpio.c vendor/libarchive/dist/cpio/cpio.h vendor/libarchive/dist/cpio/cpio_platform.h vendor/libarchive/dist/cpio/cpio_windows.c vendor/libarchive/dist/cpio/cpio_windows.h vendor/libarchive/dist/cpio/test/ vendor/libarchive/dist/cpio/test/CMakeLists.txt vendor/libarchive/dist/cpio/test/main.c vendor/libarchive/dist/cpio/test/test.h vendor/libarchive/dist/cpio/test/test_0.c vendor/libarchive/dist/cpio/test/test_basic.c vendor/libarchive/dist/cpio/test/test_cmdline.c vendor/libarchive/dist/cpio/test/test_format_newc.c vendor/libarchive/dist/cpio/test/test_gcpio_compat.c vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref.bin.uu vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref.crc.uu vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref.newc.uu vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref.ustar.uu vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.bin.uu vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.crc.uu vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.newc.uu vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu vendor/libarchive/dist/cpio/test/test_option_B_upper.c vendor/libarchive/dist/cpio/test/test_option_C_upper.c vendor/libarchive/dist/cpio/test/test_option_J_upper.c vendor/libarchive/dist/cpio/test/test_option_L_upper.c vendor/libarchive/dist/cpio/test/test_option_Z_upper.c vendor/libarchive/dist/cpio/test/test_option_a.c vendor/libarchive/dist/cpio/test/test_option_c.c vendor/libarchive/dist/cpio/test/test_option_d.c vendor/libarchive/dist/cpio/test/test_option_f.c vendor/libarchive/dist/cpio/test/test_option_f.cpio.uu vendor/libarchive/dist/cpio/test/test_option_help.c vendor/libarchive/dist/cpio/test/test_option_l.c vendor/libarchive/dist/cpio/test/test_option_lzma.c vendor/libarchive/dist/cpio/test/test_option_m.c vendor/libarchive/dist/cpio/test/test_option_m.cpio.uu vendor/libarchive/dist/cpio/test/test_option_t.c vendor/libarchive/dist/cpio/test/test_option_t.cpio.uu vendor/libarchive/dist/cpio/test/test_option_t.stdout.uu vendor/libarchive/dist/cpio/test/test_option_tv.stdout.uu vendor/libarchive/dist/cpio/test/test_option_u.c vendor/libarchive/dist/cpio/test/test_option_version.c vendor/libarchive/dist/cpio/test/test_option_y.c vendor/libarchive/dist/cpio/test/test_option_z.c vendor/libarchive/dist/cpio/test/test_owner_parse.c vendor/libarchive/dist/cpio/test/test_passthrough_dotdot.c vendor/libarchive/dist/cpio/test/test_passthrough_reverse.c vendor/libarchive/dist/cpio/test/test_pathmatch.c vendor/libarchive/dist/doc/ vendor/libarchive/dist/doc/html/ vendor/libarchive/dist/doc/man/ vendor/libarchive/dist/doc/mdoc2man.awk vendor/libarchive/dist/doc/mdoc2wiki.awk vendor/libarchive/dist/doc/pdf/ vendor/libarchive/dist/doc/text/ vendor/libarchive/dist/doc/update.sh vendor/libarchive/dist/doc/wiki/ vendor/libarchive/dist/examples/ vendor/libarchive/dist/examples/minitar/ vendor/libarchive/dist/examples/minitar/Makefile vendor/libarchive/dist/examples/minitar/README vendor/libarchive/dist/examples/minitar/minitar.c vendor/libarchive/dist/examples/minitar/tree.c vendor/libarchive/dist/examples/minitar/tree.h vendor/libarchive/dist/examples/tarfilter.c vendor/libarchive/dist/examples/untar.c vendor/libarchive/dist/libarchive/ vendor/libarchive/dist/libarchive/CMakeLists.txt vendor/libarchive/dist/libarchive/archive.h vendor/libarchive/dist/libarchive/archive_check_magic.c vendor/libarchive/dist/libarchive/archive_crc32.h vendor/libarchive/dist/libarchive/archive_endian.h vendor/libarchive/dist/libarchive/archive_entry.3 vendor/libarchive/dist/libarchive/archive_entry.c vendor/libarchive/dist/libarchive/archive_entry.h vendor/libarchive/dist/libarchive/archive_entry_copy_bhfi.c vendor/libarchive/dist/libarchive/archive_entry_copy_stat.c vendor/libarchive/dist/libarchive/archive_entry_link_resolver.c vendor/libarchive/dist/libarchive/archive_entry_private.h vendor/libarchive/dist/libarchive/archive_entry_stat.c vendor/libarchive/dist/libarchive/archive_entry_strmode.c vendor/libarchive/dist/libarchive/archive_entry_xattr.c vendor/libarchive/dist/libarchive/archive_hash.h vendor/libarchive/dist/libarchive/archive_platform.h vendor/libarchive/dist/libarchive/archive_private.h vendor/libarchive/dist/libarchive/archive_read.3 vendor/libarchive/dist/libarchive/archive_read.c vendor/libarchive/dist/libarchive/archive_read_data_into_fd.c vendor/libarchive/dist/libarchive/archive_read_disk.3 vendor/libarchive/dist/libarchive/archive_read_disk.c vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c vendor/libarchive/dist/libarchive/archive_read_disk_private.h vendor/libarchive/dist/libarchive/archive_read_disk_set_standard_lookup.c vendor/libarchive/dist/libarchive/archive_read_extract.c vendor/libarchive/dist/libarchive/archive_read_open_fd.c vendor/libarchive/dist/libarchive/archive_read_open_file.c vendor/libarchive/dist/libarchive/archive_read_open_filename.c vendor/libarchive/dist/libarchive/archive_read_open_memory.c vendor/libarchive/dist/libarchive/archive_read_private.h vendor/libarchive/dist/libarchive/archive_read_support_compression_all.c vendor/libarchive/dist/libarchive/archive_read_support_compression_bzip2.c vendor/libarchive/dist/libarchive/archive_read_support_compression_compress.c vendor/libarchive/dist/libarchive/archive_read_support_compression_gzip.c vendor/libarchive/dist/libarchive/archive_read_support_compression_none.c vendor/libarchive/dist/libarchive/archive_read_support_compression_program.c vendor/libarchive/dist/libarchive/archive_read_support_compression_rpm.c vendor/libarchive/dist/libarchive/archive_read_support_compression_uu.c vendor/libarchive/dist/libarchive/archive_read_support_compression_xz.c vendor/libarchive/dist/libarchive/archive_read_support_format_all.c vendor/libarchive/dist/libarchive/archive_read_support_format_ar.c vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c vendor/libarchive/dist/libarchive/archive_read_support_format_empty.c vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c vendor/libarchive/dist/libarchive/archive_read_support_format_raw.c vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c vendor/libarchive/dist/libarchive/archive_string.c vendor/libarchive/dist/libarchive/archive_string.h vendor/libarchive/dist/libarchive/archive_string_sprintf.c vendor/libarchive/dist/libarchive/archive_util.3 vendor/libarchive/dist/libarchive/archive_util.c vendor/libarchive/dist/libarchive/archive_virtual.c vendor/libarchive/dist/libarchive/archive_windows.c vendor/libarchive/dist/libarchive/archive_windows.h vendor/libarchive/dist/libarchive/archive_write.3 vendor/libarchive/dist/libarchive/archive_write.c vendor/libarchive/dist/libarchive/archive_write_disk.3 vendor/libarchive/dist/libarchive/archive_write_disk.c vendor/libarchive/dist/libarchive/archive_write_disk_private.h vendor/libarchive/dist/libarchive/archive_write_disk_set_standard_lookup.c vendor/libarchive/dist/libarchive/archive_write_open_fd.c vendor/libarchive/dist/libarchive/archive_write_open_file.c vendor/libarchive/dist/libarchive/archive_write_open_filename.c vendor/libarchive/dist/libarchive/archive_write_open_memory.c vendor/libarchive/dist/libarchive/archive_write_private.h vendor/libarchive/dist/libarchive/archive_write_set_compression_bzip2.c vendor/libarchive/dist/libarchive/archive_write_set_compression_compress.c vendor/libarchive/dist/libarchive/archive_write_set_compression_gzip.c vendor/libarchive/dist/libarchive/archive_write_set_compression_none.c vendor/libarchive/dist/libarchive/archive_write_set_compression_program.c vendor/libarchive/dist/libarchive/archive_write_set_compression_xz.c vendor/libarchive/dist/libarchive/archive_write_set_format.c vendor/libarchive/dist/libarchive/archive_write_set_format_ar.c vendor/libarchive/dist/libarchive/archive_write_set_format_by_name.c vendor/libarchive/dist/libarchive/archive_write_set_format_cpio.c vendor/libarchive/dist/libarchive/archive_write_set_format_cpio_newc.c vendor/libarchive/dist/libarchive/archive_write_set_format_mtree.c vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c vendor/libarchive/dist/libarchive/archive_write_set_format_shar.c vendor/libarchive/dist/libarchive/archive_write_set_format_ustar.c vendor/libarchive/dist/libarchive/archive_write_set_format_zip.c vendor/libarchive/dist/libarchive/config_freebsd.h vendor/libarchive/dist/libarchive/cpio.5 vendor/libarchive/dist/libarchive/filter_fork.c vendor/libarchive/dist/libarchive/filter_fork.h vendor/libarchive/dist/libarchive/filter_fork_windows.c vendor/libarchive/dist/libarchive/libarchive-formats.5 vendor/libarchive/dist/libarchive/libarchive.3 vendor/libarchive/dist/libarchive/libarchive_internals.3 vendor/libarchive/dist/libarchive/mtree.5 vendor/libarchive/dist/libarchive/tar.5 vendor/libarchive/dist/libarchive/test/ vendor/libarchive/dist/libarchive/test/.cvsignore vendor/libarchive/dist/libarchive/test/CMakeLists.txt vendor/libarchive/dist/libarchive/test/README vendor/libarchive/dist/libarchive/test/main.c vendor/libarchive/dist/libarchive/test/read_open_memory.c vendor/libarchive/dist/libarchive/test/test.h vendor/libarchive/dist/libarchive/test/test_acl_basic.c vendor/libarchive/dist/libarchive/test/test_acl_freebsd.c vendor/libarchive/dist/libarchive/test/test_acl_pax.c vendor/libarchive/dist/libarchive/test/test_archive_api_feature.c vendor/libarchive/dist/libarchive/test/test_bad_fd.c vendor/libarchive/dist/libarchive/test/test_compat_bzip2.c vendor/libarchive/dist/libarchive/test/test_compat_bzip2_1.tbz.uu vendor/libarchive/dist/libarchive/test/test_compat_bzip2_2.tbz.uu vendor/libarchive/dist/libarchive/test/test_compat_cpio.c vendor/libarchive/dist/libarchive/test/test_compat_cpio_1.cpio.uu vendor/libarchive/dist/libarchive/test/test_compat_gtar.c vendor/libarchive/dist/libarchive/test/test_compat_gtar_1.tar.uu vendor/libarchive/dist/libarchive/test/test_compat_gzip.c vendor/libarchive/dist/libarchive/test/test_compat_gzip_1.tgz.uu vendor/libarchive/dist/libarchive/test/test_compat_gzip_2.tgz.uu vendor/libarchive/dist/libarchive/test/test_compat_lzma.c vendor/libarchive/dist/libarchive/test/test_compat_lzma_1.tlz.uu vendor/libarchive/dist/libarchive/test/test_compat_lzma_2.tlz.uu vendor/libarchive/dist/libarchive/test/test_compat_lzma_3.tlz.uu vendor/libarchive/dist/libarchive/test/test_compat_solaris_tar_acl.c vendor/libarchive/dist/libarchive/test/test_compat_solaris_tar_acl.tar.uu vendor/libarchive/dist/libarchive/test/test_compat_tar_hardlink.c vendor/libarchive/dist/libarchive/test/test_compat_tar_hardlink_1.tar.uu vendor/libarchive/dist/libarchive/test/test_compat_xz.c vendor/libarchive/dist/libarchive/test/test_compat_xz_1.txz.uu vendor/libarchive/dist/libarchive/test/test_compat_zip.c vendor/libarchive/dist/libarchive/test/test_compat_zip_1.zip.uu vendor/libarchive/dist/libarchive/test/test_empty_write.c vendor/libarchive/dist/libarchive/test/test_entry.c vendor/libarchive/dist/libarchive/test/test_entry_strmode.c vendor/libarchive/dist/libarchive/test/test_extattr_freebsd.c vendor/libarchive/dist/libarchive/test/test_fuzz.c vendor/libarchive/dist/libarchive/test/test_fuzz_1.iso.Z.uu vendor/libarchive/dist/libarchive/test/test_link_resolver.c vendor/libarchive/dist/libarchive/test/test_open_failure.c vendor/libarchive/dist/libarchive/test/test_open_fd.c vendor/libarchive/dist/libarchive/test/test_open_file.c vendor/libarchive/dist/libarchive/test/test_open_filename.c vendor/libarchive/dist/libarchive/test/test_pax_filename_encoding.c vendor/libarchive/dist/libarchive/test/test_pax_filename_encoding.tar.uu vendor/libarchive/dist/libarchive/test/test_read_compress_program.c vendor/libarchive/dist/libarchive/test/test_read_data_large.c vendor/libarchive/dist/libarchive/test/test_read_disk.c vendor/libarchive/dist/libarchive/test/test_read_disk_entry_from_file.c vendor/libarchive/dist/libarchive/test/test_read_extract.c vendor/libarchive/dist/libarchive/test/test_read_file_nonexistent.c vendor/libarchive/dist/libarchive/test/test_read_format_ar.ar.uu vendor/libarchive/dist/libarchive/test/test_read_format_ar.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_Z.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_be.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_be.cpio.uu vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_bz2.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_gz.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_lzma.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_xz.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_odc.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4_gzip.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4c_Z.c vendor/libarchive/dist/libarchive/test/test_read_format_empty.c vendor/libarchive/dist/libarchive/test/test_read_format_gtar_gz.c vendor/libarchive/dist/libarchive/test/test_read_format_gtar_lzma.c vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse.c vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu vendor/libarchive/dist/libarchive/test/test_read_format_iso.iso.Z.uu vendor/libarchive/dist/libarchive/test/test_read_format_iso_2.iso.Z.uu vendor/libarchive/dist/libarchive/test/test_read_format_iso_Z.c vendor/libarchive/dist/libarchive/test/test_read_format_iso_joliet.iso.Z.uu vendor/libarchive/dist/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu vendor/libarchive/dist/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu vendor/libarchive/dist/libarchive/test/test_read_format_iso_multi_extent.c vendor/libarchive/dist/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu vendor/libarchive/dist/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu vendor/libarchive/dist/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu vendor/libarchive/dist/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu vendor/libarchive/dist/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu vendor/libarchive/dist/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu vendor/libarchive/dist/libarchive/test/test_read_format_isojoliet_bz2.c vendor/libarchive/dist/libarchive/test/test_read_format_isojoliet_long.c vendor/libarchive/dist/libarchive/test/test_read_format_isojoliet_rr.c vendor/libarchive/dist/libarchive/test/test_read_format_isorr_bz2.c vendor/libarchive/dist/libarchive/test/test_read_format_isorr_ce.c vendor/libarchive/dist/libarchive/test/test_read_format_isorr_new_bz2.c vendor/libarchive/dist/libarchive/test/test_read_format_isorr_rr_moved.c vendor/libarchive/dist/libarchive/test/test_read_format_isozisofs_bz2.c vendor/libarchive/dist/libarchive/test/test_read_format_mtree.c vendor/libarchive/dist/libarchive/test/test_read_format_mtree.mtree.uu vendor/libarchive/dist/libarchive/test/test_read_format_pax_bz2.c vendor/libarchive/dist/libarchive/test/test_read_format_raw.c vendor/libarchive/dist/libarchive/test/test_read_format_raw.data.Z.uu vendor/libarchive/dist/libarchive/test/test_read_format_raw.data.uu vendor/libarchive/dist/libarchive/test/test_read_format_tar.c vendor/libarchive/dist/libarchive/test/test_read_format_tar_empty_filename.c vendor/libarchive/dist/libarchive/test/test_read_format_tar_empty_filename.tar.uu vendor/libarchive/dist/libarchive/test/test_read_format_tbz.c vendor/libarchive/dist/libarchive/test/test_read_format_tgz.c vendor/libarchive/dist/libarchive/test/test_read_format_tlz.c vendor/libarchive/dist/libarchive/test/test_read_format_txz.c vendor/libarchive/dist/libarchive/test/test_read_format_tz.c vendor/libarchive/dist/libarchive/test/test_read_format_xar.c vendor/libarchive/dist/libarchive/test/test_read_format_zip.c vendor/libarchive/dist/libarchive/test/test_read_format_zip.zip.uu vendor/libarchive/dist/libarchive/test/test_read_large.c vendor/libarchive/dist/libarchive/test/test_read_pax_truncated.c vendor/libarchive/dist/libarchive/test/test_read_position.c vendor/libarchive/dist/libarchive/test/test_read_truncated.c vendor/libarchive/dist/libarchive/test/test_read_uu.c vendor/libarchive/dist/libarchive/test/test_tar_filenames.c vendor/libarchive/dist/libarchive/test/test_tar_large.c vendor/libarchive/dist/libarchive/test/test_ustar_filenames.c vendor/libarchive/dist/libarchive/test/test_write_compress.c vendor/libarchive/dist/libarchive/test/test_write_compress_bzip2.c vendor/libarchive/dist/libarchive/test/test_write_compress_gzip.c vendor/libarchive/dist/libarchive/test/test_write_compress_lzma.c vendor/libarchive/dist/libarchive/test/test_write_compress_program.c vendor/libarchive/dist/libarchive/test/test_write_compress_xz.c vendor/libarchive/dist/libarchive/test/test_write_disk.c vendor/libarchive/dist/libarchive/test/test_write_disk_failures.c vendor/libarchive/dist/libarchive/test/test_write_disk_hardlink.c vendor/libarchive/dist/libarchive/test/test_write_disk_perms.c vendor/libarchive/dist/libarchive/test/test_write_disk_secure.c vendor/libarchive/dist/libarchive/test/test_write_disk_sparse.c vendor/libarchive/dist/libarchive/test/test_write_disk_symlink.c vendor/libarchive/dist/libarchive/test/test_write_disk_times.c vendor/libarchive/dist/libarchive/test/test_write_format_ar.c vendor/libarchive/dist/libarchive/test/test_write_format_cpio.c vendor/libarchive/dist/libarchive/test/test_write_format_cpio_empty.c vendor/libarchive/dist/libarchive/test/test_write_format_cpio_newc.c vendor/libarchive/dist/libarchive/test/test_write_format_cpio_odc.c vendor/libarchive/dist/libarchive/test/test_write_format_mtree.c vendor/libarchive/dist/libarchive/test/test_write_format_pax.c vendor/libarchive/dist/libarchive/test/test_write_format_shar_empty.c vendor/libarchive/dist/libarchive/test/test_write_format_tar.c vendor/libarchive/dist/libarchive/test/test_write_format_tar_empty.c vendor/libarchive/dist/libarchive/test/test_write_format_tar_ustar.c vendor/libarchive/dist/libarchive/test/test_write_format_zip.c vendor/libarchive/dist/libarchive/test/test_write_format_zip_empty.c vendor/libarchive/dist/libarchive/test/test_write_format_zip_no_compression.c vendor/libarchive/dist/libarchive/test/test_write_open_memory.c vendor/libarchive/dist/libarchive_fe/ vendor/libarchive/dist/libarchive_fe/err.c vendor/libarchive/dist/libarchive_fe/err.h vendor/libarchive/dist/libarchive_fe/lafe_platform.h vendor/libarchive/dist/libarchive_fe/line_reader.c vendor/libarchive/dist/libarchive_fe/line_reader.h vendor/libarchive/dist/libarchive_fe/matching.c vendor/libarchive/dist/libarchive_fe/matching.h vendor/libarchive/dist/libarchive_fe/pathmatch.c vendor/libarchive/dist/libarchive_fe/pathmatch.h vendor/libarchive/dist/tar/ vendor/libarchive/dist/tar/CMakeLists.txt vendor/libarchive/dist/tar/bsdtar.1 vendor/libarchive/dist/tar/bsdtar.c vendor/libarchive/dist/tar/bsdtar.h vendor/libarchive/dist/tar/bsdtar_platform.h vendor/libarchive/dist/tar/bsdtar_windows.c vendor/libarchive/dist/tar/bsdtar_windows.h vendor/libarchive/dist/tar/cmdline.c vendor/libarchive/dist/tar/config_freebsd.h vendor/libarchive/dist/tar/getdate.c vendor/libarchive/dist/tar/read.c vendor/libarchive/dist/tar/subst.c vendor/libarchive/dist/tar/test/ vendor/libarchive/dist/tar/test/CMakeLists.txt vendor/libarchive/dist/tar/test/main.c vendor/libarchive/dist/tar/test/test.h vendor/libarchive/dist/tar/test/test_0.c vendor/libarchive/dist/tar/test/test_basic.c vendor/libarchive/dist/tar/test/test_copy.c vendor/libarchive/dist/tar/test/test_empty_mtree.c vendor/libarchive/dist/tar/test/test_getdate.c vendor/libarchive/dist/tar/test/test_help.c vendor/libarchive/dist/tar/test/test_option_T_upper.c vendor/libarchive/dist/tar/test/test_option_q.c vendor/libarchive/dist/tar/test/test_option_r.c vendor/libarchive/dist/tar/test/test_option_s.c vendor/libarchive/dist/tar/test/test_patterns.c vendor/libarchive/dist/tar/test/test_patterns_2.tar.uu vendor/libarchive/dist/tar/test/test_patterns_3.tar.uu vendor/libarchive/dist/tar/test/test_patterns_4.tar.uu vendor/libarchive/dist/tar/test/test_stdio.c vendor/libarchive/dist/tar/test/test_strip_components.c vendor/libarchive/dist/tar/test/test_symlink_dir.c vendor/libarchive/dist/tar/test/test_version.c vendor/libarchive/dist/tar/test/test_windows.c vendor/libarchive/dist/tar/tree.c vendor/libarchive/dist/tar/tree.h vendor/libarchive/dist/tar/util.c vendor/libarchive/dist/tar/write.c Added: vendor/libarchive/dist/CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/CMakeLists.txt Tue Dec 20 22:47:56 2011 (r228753) @@ -0,0 +1,873 @@ +# +# +PROJECT(libarchive C) +# +CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR) +SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake") +if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libarchive_BINARY_DIR}/bin) +endif() + +# +# Version - read from 'version' file. +# +FILE(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/build/version _version) +STRING(REGEX REPLACE + "^([0-9])[0-9][0-9][0-9][0-9][0-9][0-9][a-z]?$" "\\1" _major ${_version}) +STRING(REGEX REPLACE + "^[0-9]([0-9][0-9][0-9])[0-9][0-9][0-9][a-z]?$" "\\1" _minor ${_version}) +STRING(REGEX REPLACE + "^[0-9][0-9][0-9][0-9]([0-9][0-9][0-9])[a-z]?$" "\\1" _revision ${_version}) +STRING(REGEX REPLACE + "^[0-9][0-9][0-9][0-9][0-9][0-9][0-9]([a-z]?)$" "\\1" _quality ${_version}) +SET(_version_number ${_major}${_minor}${_revision}) +STRING(REGEX REPLACE "[0]*([^0][0-9]*)$" "\\1" _minor ${_minor}) +STRING(REGEX REPLACE "[0]*([^0][0-9]*)$" "\\1" _revision ${_revision}) +# +SET(VERSION "${_major}.${_minor}.${_revision}${_quality}") +SET(BSDCPIO_VERSION_STRING "${VERSION}") +SET(BSDTAR_VERSION_STRING "${VERSION}") +SET(LIBARCHIVE_VERSION_NUMBER "${_version_number}") +SET(LIBARCHIVE_VERSION_STRING "${VERSION}") +# Shared library number +SET(SOVERSION 8) + +# Enable CTest/CDash support +include(CTest) + +# Provide ADD_TEST_28 macro to approximate CMake 2.8 ADD_TEST(NAME). +# TODO: Require CMake 2.8 and drop this workaround (perhaps late 2010). +INCLUDE(AddTest28) + +OPTION(ENABLE_OPENSSL "Enable use of OpenSSL" ON) +OPTION(ENABLE_TAR "Enable tar building" ON) +OPTION(ENABLE_TAR_SHARED "Enable dynamic build of tar" OFF) +OPTION(ENABLE_CPIO "Enable cpio building" ON) +OPTION(ENABLE_CPIO_SHARED "Enable dynamic build of cpio" OFF) +OPTION(ENABLE_XATTR "Enable extended attribute support" ON) +OPTION(ENABLE_ACL "Enable ACL support" ON) +OPTION(ENABLE_TEST "Enable unit and regression tests" ON) + +IF(ENABLE_TEST) + ENABLE_TESTING() +ENDIF(ENABLE_TEST) +IF(WIN32 AND NOT CYGWIN) + # Currently, dynamic build only. + SET(ENABLE_TAR_SHARED ON) + SET(ENABLE_CPIO_SHARED ON) +ENDIF(WIN32 AND NOT CYGWIN) + +IF(WIN32) + SET(_WIN32_WINNT 0x0500 CACHE INTERNAL "Setting _WIN32_WINNT to 0x0500 for Windows 2000 APIs") + SET(WINVER 0x0500 CACHE INTERNAL "Setting WINVER to 0x0500 for Windows 2000 APIs") +ENDIF(WIN32) + +# +INCLUDE(CheckCSourceRuns) +INCLUDE(CheckFileOffsetBits) +INCLUDE(CheckFuncs) +INCLUDE(CheckHeaderDirent) +INCLUDE(CheckIncludeFile) +INCLUDE(CheckIncludeFiles) +INCLUDE(CheckLibraryExists) +INCLUDE(CheckStructMember) +INCLUDE(CheckSymbolExists) +INCLUDE(CheckTypeExists) +INCLUDE(CheckTypeSize) + +# +# Generate list.h +# +MACRO (GENERATE_LIST_H _listfile _cmlist __list_sources) + SET(_argv ${ARGV}) + # Remove _listfile and _cmlist from _argv + LIST(REMOVE_AT _argv 0 1) + IF (NOT EXISTS "${_listfile}" OR + ${_cmlist} IS_NEWER_THAN "${_listfile}") + + MESSAGE(STATUS "Generating ${_listfile}") + FILE(WRITE ${_listfile} "") + FOREACH (testfile ${_argv}) + IF (testfile MATCHES "^test_[^/]+[.]c$") + FILE(STRINGS ${testfile} testvar REGEX "^DEFINE_TEST") + FOREACH (deftest ${testvar}) + FILE(APPEND ${_listfile} "${deftest}\n") + ENDFOREACH (deftest) + ENDIF (testfile MATCHES "^test_[^/]+[.]c$") + ENDFOREACH (testfile) + + ENDIF (NOT EXISTS "${_listfile}" OR + ${_cmlist} IS_NEWER_THAN "${_listfile}") +ENDMACRO (GENERATE_LIST_H) +# +# Generate installation rules for man pages. +# +MACRO (INSTALL_MAN __mans) + FOREACH (_man ${ARGV}) + STRING(REGEX REPLACE "^.+[.]([1-9])" "\\1" _mansect ${_man}) + INSTALL(FILES ${_man} DESTINATION "share/man/man${_mansect}") + ENDFOREACH (_man) +ENDMACRO (INSTALL_MAN __mans) + +# +# Check compress/decompress libraries +# +IF(WIN32 AND NOT CMAKE_CL_64 AND NOT CYGWIN) + # GnuWin32 is only for Win32, not Win64. + SET(__GNUWIN32PATH "C:/Program Files/GnuWin32") +ENDIF(WIN32 AND NOT CMAKE_CL_64 AND NOT CYGWIN) +IF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}") + # You have to add a path availabel DLL file into PATH environment variable. + # Maybe DLL path is "C:/Program Files/GnuWin32/bin". + # The zlib and the bzip2 Setup program have installed programs and DLLs into + # "C:/Program Files/GnuWin32" by default. + # This is convenience setting for Windows. + SET(CMAKE_PREFIX_PATH ${__GNUWIN32PATH} $(CMAKE_PREFIX_PATH)) + # + # If you didn't use Setup program or installed into nonstandard path, + # cmake cannot find out your zlib or bzip2 libraries and include files, + # you should execute cmake with -DCMAKE_PREFIX_PATH option. + # e.g. + # cmake -DCMAKE_PREFIX_PATH= + # + # If compiling error occured in zconf.h, You may need patch to zconf.h. + #--- zconf.h.orig 2005-07-21 00:40:26.000000000 + #+++ zconf.h 2009-01-19 11:39:10.093750000 + #@@ -286,7 +286,7 @@ + # + # #if 1 /* HAVE_UNISTD_H -- this line is updated by ./configure */ + # # include /* for off_t */ + #-# include /* for SEEK_* and off_t */ + #+# include /* for SEEK_* and off_t */ + # # ifdef VMS + # # include /* for off_t */ + # # endif +ENDIF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}") + +SET(ADDITIONAL_LIBS "") +# +# Find ZLIB +# +FIND_PACKAGE(ZLIB) +IF(ZLIB_FOUND) + SET(HAVE_LIBZ 1) + SET(HAVE_ZLIB_H 1) + INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) + IF(WIN32 AND NOT CYGWIN) + SET(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARIES}) + CHECK_C_SOURCE_Runs( + "#ifndef ZLIB_WINAPI\n#define ZLIB_WINAPI\n#endif\n#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" + ZLIB_WINAPI) + ENDIF(WIN32 AND NOT CYGWIN) +ENDIF(ZLIB_FOUND) +MARK_AS_ADVANCED(CLEAR ZLIB_INCLUDE_DIR) +MARK_AS_ADVANCED(CLEAR ZLIB_LIBRARY) +# +# Find BZip2 +# +FIND_PACKAGE(BZip2) +IF(BZIP2_FOUND) + SET(HAVE_LIBBZ2 1) + SET(HAVE_BZLIB_H 1) + INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${BZIP2_LIBRARIES}) +ENDIF(BZIP2_FOUND) +MARK_AS_ADVANCED(CLEAR BZIP2_INCLUDE_DIR) +MARK_AS_ADVANCED(CLEAR BZIP2_LIBRARY) +# +# Find LZMA +# +FIND_PACKAGE(LZMA) +IF(LZMA_FOUND) + SET(HAVE_LIBLZMA 1) + SET(HAVE_LZMA_H 1) + INCLUDE_DIRECTORIES(${LZMA_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${LZMA_LIBRARIES}) + MARK_AS_ADVANCED(CLEAR LZMA_INCLUDE_DIR) + MARK_AS_ADVANCED(CLEAR LZMA_LIBRARY) +ELSEIF(LZMADEC_FOUND) + SET(HAVE_LIBLZMADEC 1) + SET(HAVE_LZMADEC_H 1) + INCLUDE_DIRECTORIES(${LZMADEC_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${LZMADEC_LIBRARIES}) + MARK_AS_ADVANCED(CLEAR LZMADEC_INCLUDE_DIR) + MARK_AS_ADVANCED(CLEAR LZMADEC_LIBRARY) +ELSE(LZMA_FOUND) + MARK_AS_ADVANCED(CLEAR LZMA_INCLUDE_DIR) + MARK_AS_ADVANCED(CLEAR LZMA_LIBRARY) +ENDIF(LZMA_FOUND) + +# +# Check headers +# +CHECK_HEADER_DIRENT() + +SET(INCLUDES "") +MACRO (LA_CHECK_INCLUDE_FILE header var) + CHECK_INCLUDE_FILES("${INCLUDES};${header}" ${var}) + IF (${var}) + SET(INCLUDES ${INCLUDES} ${header}) + ENDIF (${var}) +ENDMACRO (LA_CHECK_INCLUDE_FILE) + +# Some FreeBSD headers assume sys/types.h was already included. +LA_CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H) + +# Alphabetize the rest unless there's a compelling reason +LA_CHECK_INCLUDE_FILE("acl/libacl.h" HAVE_ACL_LIBACL_H) +LA_CHECK_INCLUDE_FILE("ctype.h" HAVE_CTYPE_H) +LA_CHECK_INCLUDE_FILE("direct.h" HAVE_DIRECT_H) +LA_CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H) +LA_CHECK_INCLUDE_FILE("errno.h" HAVE_ERRNO_H) +LA_CHECK_INCLUDE_FILE("ext2fs/ext2_fs.h" HAVE_EXT2FS_EXT2_FS_H) +LA_CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H) +LA_CHECK_INCLUDE_FILE("grp.h" HAVE_GRP_H) +LA_CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H) +LA_CHECK_INCLUDE_FILE("io.h" HAVE_IO_H) +LA_CHECK_INCLUDE_FILE("langinfo.h" HAVE_LANGINFO_H) +LA_CHECK_INCLUDE_FILE("limits.h" HAVE_LIMITS_H) +LA_CHECK_INCLUDE_FILE("linux/fs.h" HAVE_LINUX_FS_H) +LA_CHECK_INCLUDE_FILE("locale.h" HAVE_LOCALE_H) +LA_CHECK_INCLUDE_FILE("memory.h" HAVE_MEMORY_H) +LA_CHECK_INCLUDE_FILE("paths.h" HAVE_PATHS_H) +LA_CHECK_INCLUDE_FILE("poll.h" HAVE_POLL_H) +LA_CHECK_INCLUDE_FILE("process.h" HAVE_PROCESS_H) +LA_CHECK_INCLUDE_FILE("pwd.h" HAVE_PWD_H) +LA_CHECK_INCLUDE_FILE("regex.h" HAVE_REGEX_H) +LA_CHECK_INCLUDE_FILE("signal.h" HAVE_SIGNAL_H) +LA_CHECK_INCLUDE_FILE("stdarg.h" HAVE_STDARG_H) +LA_CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H) +LA_CHECK_INCLUDE_FILE("stdlib.h" HAVE_STDLIB_H) +LA_CHECK_INCLUDE_FILE("string.h" HAVE_STRING_H) +LA_CHECK_INCLUDE_FILE("strings.h" HAVE_STRINGS_H) +LA_CHECK_INCLUDE_FILE("sys/acl.h" HAVE_SYS_ACL_H) +LA_CHECK_INCLUDE_FILE("sys/cdefs.h" HAVE_SYS_CDEFS_H) +LA_CHECK_INCLUDE_FILE("sys/ioctl.h" HAVE_SYS_IOCTL_H) +LA_CHECK_INCLUDE_FILE("sys/mkdev.h" HAVE_SYS_MKDEV_H) +LA_CHECK_INCLUDE_FILE("sys/param.h" HAVE_SYS_PARAM_H) +LA_CHECK_INCLUDE_FILE("sys/poll.h" HAVE_SYS_POLL_H) +LA_CHECK_INCLUDE_FILE("sys/select.h" HAVE_SYS_SELECT_H) +LA_CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H) +LA_CHECK_INCLUDE_FILE("sys/time.h" HAVE_SYS_TIME_H) +LA_CHECK_INCLUDE_FILE("sys/utime.h" HAVE_SYS_UTIME_H) +LA_CHECK_INCLUDE_FILE("sys/wait.h" HAVE_SYS_WAIT_H) +LA_CHECK_INCLUDE_FILE("time.h" HAVE_TIME_H) +LA_CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H) +LA_CHECK_INCLUDE_FILE("utime.h" HAVE_UTIME_H) +LA_CHECK_INCLUDE_FILE("wchar.h" HAVE_WCHAR_H) +LA_CHECK_INCLUDE_FILE("wctype.h" HAVE_WCTYPE_H) +LA_CHECK_INCLUDE_FILE("windows.h" HAVE_WINDOWS_H) + + +# +# Some headers require extra includes when they're available. +# + +# +# Find OpenSSL +# +IF(ENABLE_OPENSSL) + FIND_PACKAGE(OpenSSL) +ENDIF() + +# FreeBSD libmd +CHECK_LIBRARY_EXISTS(md "MD5Init" "" LIBMD_FOUND) +IF(LIBMD_FOUND) + SET(CMAKE_REQUIRED_LIBRARIES "md") + FIND_LIBRARY(LIBMD_LIBRARY NAMES md) + LIST(APPEND ADDITIONAL_LIBS ${LIBMD_LIBRARY}) +ENDIF(LIBMD_FOUND) + +# +# How to prove that HASH functions, which have several names on various +# platforms, can be mapped to archive_{hash name}_init, +# archive_{hash name}_update and archive_{hash name}_final through +# archive_hash.h +# +MACRO(CHECK_MD HASH IMPLEMENTATIONS) + IF(HAVE_SYS_TYPES_H) + SET(HASH_HEADER_CONFIG "#define HAVE_SYS_TYPES_H 1\n") + ELSE(HAVE_SYS_TYPES_H) + SET(HASH_HEADER_CONFIG "") + ENDIF(HAVE_SYS_TYPES_H) + + FOREACH(IMPLEMENTATION ${IMPLEMENTATIONS}) + IF(NOT DEFINED ARCHIVE_HASH_${HASH}_${IMPLEMENTATION}) + STRING(TOLOWER "${HASH}" lower_hash) + STRING(TOUPPER "${HASH}" hash) + + SET(HASH_REQUIRED_INCLUDES) + SET(TRY_HASH_REQUIRED_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_CURRENT_SOURCE_DIR}/libarchive") + SET(HASH_REQUIRED_LIBS) + SET(TRY_HASH_REQUIRED_LIBS) + IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + SET(HASH_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) + SET(TRY_HASH_REQUIRED_INCLUDES + "${TRY_HASH_REQUIRED_INCLUDES};${OPENSSL_INCLUDE_DIR}") + SET(HASH_REQUIRED_LIBS ${OPENSSL_LIBRARIES}) + SET(TRY_HASH_REQUIRED_LIBS + "-DLINK_LIBRARIES:STRING=${OPENSSL_LIBRARIES}") + ELSEIF("${IMPLEMENTATION}" MATCHES "^LIBMD$" AND LIBMD_FOUND) + SET(TRY_HASH_REQUIRED_LIBS + "-DLINK_LIBRARIES:STRING=${LIBMD_LIBRARY}") + ENDIF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + + SET(SOURCE "#define ${hash}_COMPILE_TEST +#define ARCHIVE_HASH_${hash}_${IMPLEMENTATION} +#define __LIBARCHIVE_BUILD +${HASH_HEADER_CONFIG} +#include \"archive_hash.h\" + +int +main(int argc, char **argv) +{ + archive_${lower_hash}_ctx ctx; + + archive_${lower_hash}_init(&ctx); + archive_${lower_hash}_update(&ctx, *argv, argc); + archive_${lower_hash}_final(&ctx, *argv); + return 0; +} +") + + FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_hash_md.c" "${SOURCE}") + MESSAGE(STATUS "Checking support for ARCHIVE_HASH_${HASH}_${IMPLEMENTATION}") + + TRY_COMPILE(ARCHIVE_HASH_${HASH}_${IMPLEMENTATION} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_hash_md.c + CMAKE_FLAGS + "${TRY_HASH_REQUIRED_LIBS}" + "${TRY_HASH_REQUIRED_INCLUDES}" + OUTPUT_VARIABLE OUTPUT) + + IF (ARCHIVE_HASH_${HASH}_${IMPLEMENTATION}) + MESSAGE(STATUS "Checking support for ARCHIVE_HASH_${HASH}_${IMPLEMENTATION} -- found") + IF (HASH_REQUIRED_INCLUDES) + INCLUDE_DIRECTORIES(${HASH_REQUIRED_INCLUDES}) + ENDIF (HASH_REQUIRED_INCLUDES) + IF (HASH_REQUIRED_LIBS) + LIST(APPEND ADDITIONAL_LIBS ${HASH_REQUIRED_LIBS}) + LIST(REMOVE_DUPLICATES ADDITIONAL_LIBS) + ENDIF (HASH_REQUIRED_LIBS) + BREAK() + ENDIF (ARCHIVE_HASH_${HASH}_${IMPLEMENTATION}) + + MESSAGE(STATUS "Checking support for ARCHIVE_HASH_${HASH}_${IMPLEMENTATION} -- not found") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Checking support for ARCHIVE_HASH_${HASH}_${IMPLEMENTATION} failed with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + ELSE(NOT DEFINED ARCHIVE_HASH_${HASH}_${IMPLEMENTATION}) + IF(ARCHIVE_HASH_${HASH}_${IMPLEMENTATION}) + BREAK() + ENDIF(ARCHIVE_HASH_${HASH}_${IMPLEMENTATION}) + ENDIF(NOT DEFINED ARCHIVE_HASH_${HASH}_${IMPLEMENTATION}) + ENDFOREACH(IMPLEMENTATION) +ENDMACRO(CHECK_MD HASH IMPLEMENTATIONS) + +# +# HASH functions on Windows is defined at archive_windows.c, thus we do not +# need the test what the functions can be mapped to archive_{hash name}_init, +# archive_{hash name}_update and archive_{hash name}_final. +# The functions on Windows use CALG_{hash name} macro to create a crypt object +# and then we need to know what CALG_{hash name} macros is available to show +# ARCHIVE_HASH_{hash name}_WIN macros because Windows 2000 and earlier version +# of Windows XP do not support SHA256, SHA384 and SHA512. +# +MACRO(CHECK_HASH_WIN HASH_LIST) + IF(WIN32 AND NOT CYGWIN) + FOREACH(HASH ${HASH_LIST}) + IF(NOT DEFINED ARCHIVE_HASH_${HASH}_WIN) + STRING(TOUPPER "${HASH}" hash) + SET(ALGID "") + IF ("${HASH}" MATCHES "^MD5$") + SET(ALGID "CALG_MD5") + ENDIF ("${HASH}" MATCHES "^MD5$") + IF ("${HASH}" MATCHES "^SHA1$") + SET(ALGID "CALG_SHA1") + ENDIF ("${HASH}" MATCHES "^SHA1$") + IF ("${HASH}" MATCHES "^SHA256$") + SET(ALGID "CALG_SHA_256") + ENDIF ("${HASH}" MATCHES "^SHA256$") + IF ("${HASH}" MATCHES "^SHA384$") + SET(ALGID "CALG_SHA_384") + ENDIF ("${HASH}" MATCHES "^SHA384$") + IF ("${HASH}" MATCHES "^SHA512$") + SET(ALGID "CALG_SHA_512") + ENDIF ("${HASH}" MATCHES "^SHA512$") + + SET(SOURCE "#define ${hash}_COMPILE_TEST +#define _WIN32_WINNT ${_WIN32_WINNT} +#define WINVER ${WINVER} +#include +#include + +int +main(int argc, char **argv) +{ + return ${ALGID}; +} +") + SET(SOURCE_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/check_hash_win.c") + + FILE(WRITE "${SOURCE_FILE}" "${SOURCE}") + MESSAGE(STATUS "Checking support for ARCHIVE_HASH_${HASH}_WIN") + + TRY_COMPILE(ARCHIVE_HASH_${HASH}_WIN + ${CMAKE_BINARY_DIR} + ${SOURCE_FILE} + CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_CURRENT_SOURCE_DIR}/libarchive" + OUTPUT_VARIABLE OUTPUT) + + IF (ARCHIVE_HASH_${HASH}_WIN) + MESSAGE(STATUS + "Checking support for ARCHIVE_HASH_${HASH}_WIN -- found") + ELSE (ARCHIVE_HASH_${HASH}_WIN) + MESSAGE(STATUS + "Checking support for ARCHIVE_HASH_${HASH}_WIN -- not found") + FILE(APPEND + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Checking support for ARCHIVE_HASH_${HASH}_WIN failed with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + ENDIF (ARCHIVE_HASH_${HASH}_WIN) + + ENDIF(NOT DEFINED ARCHIVE_HASH_${HASH}_WIN) + ENDFOREACH(HASH) + ENDIF(WIN32 AND NOT CYGWIN) +ENDMACRO(CHECK_HASH_WIN HASH_LIST) + +# +# Check MD5/RMD160/SHA support +# +CHECK_MD(MD5 "LIBC;LIBMD;LIBSYSTEM;OPENSSL") +CHECK_MD(RMD160 "LIBC;OPENSSL") +CHECK_MD(SHA1 "LIBC;LIBMD;LIBSYSTEM;OPENSSL") +CHECK_MD(SHA256 "LIBC;LIBC2;LIBC3;LIBMD;LIBSYSTEM;OPENSSL") +CHECK_MD(SHA384 "LIBC;LIBC2;LIBC3;LIBSYSTEM;OPENSSL") +CHECK_MD(SHA512 "LIBC;LIBC2;LIBC3;LIBMD;LIBSYSTEM;OPENSSL") +CHECK_HASH_WIN("MD5;SHA1;SHA256;SHA384;SHA512") + +# +# Find Libxml2 +# +FIND_PACKAGE(LibXml2) +IF(LIBXML2_FOUND) + INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${LIBXML2_LIBRARIES}) + SET(HAVE_LIBXML2 1) + # libxml2's include files use iconv.h + # We need a directory path of iconv.h so that it won't fail to check + # "libxml/xmlreader.h". + FIND_PATH(ICONV_INCLUDE_DIR iconv.h) + INCLUDE_DIRECTORIES(${ICONV_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR}) + CHECK_INCLUDE_FILES("libxml/xmlreader.h" HAVE_LIBXML_XMLREADER_H) + SET(CMAKE_REQUIRED_INCLUDES "") +ELSE(LIBXML2_FOUND) + # + # Find Expat + # + FIND_PACKAGE(EXPAT) + IF(EXPAT_FOUND) + INCLUDE_DIRECTORIES(${EXPAT_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${EXPAT_LIBRARIES}) + SET(HAVE_LIBEXPAT 1) + LA_CHECK_INCLUDE_FILE("expat.h" HAVE_EXPAT_H) + ENDIF(EXPAT_FOUND) +ENDIF(LIBXML2_FOUND) + +# +# Check functions +# +CHECK_SYMBOL_EXISTS(CreateHardLinkA "windows.h" HAVE_CREATEHARDLINKA) +CHECK_SYMBOL_EXISTS(CreateHardLinkW "windows.h" HAVE_CREATEHARDLINKW) +CHECK_SYMBOL_EXISTS(_CrtSetReportMode "crtdbg.h" HAVE__CrtSetReportMode) +CHECK_FUNCTION_EXISTS_GLIBC(chflags HAVE_CHFLAGS) +CHECK_FUNCTION_EXISTS_GLIBC(chown HAVE_CHOWN) +CHECK_FUNCTION_EXISTS_GLIBC(chroot HAVE_CHROOT) +CHECK_FUNCTION_EXISTS_GLIBC(fchdir HAVE_FCHDIR) +CHECK_FUNCTION_EXISTS_GLIBC(fchflags HAVE_FCHFLAGS) +CHECK_FUNCTION_EXISTS_GLIBC(fchmod HAVE_FCHMOD) +CHECK_FUNCTION_EXISTS_GLIBC(fchown HAVE_FCHOWN) +CHECK_FUNCTION_EXISTS_GLIBC(fcntl HAVE_FCNTL) +CHECK_FUNCTION_EXISTS_GLIBC(fork HAVE_FORK) +CHECK_FUNCTION_EXISTS_GLIBC(fstat HAVE_FSTAT) +CHECK_FUNCTION_EXISTS_GLIBC(ftruncate HAVE_FTRUNCATE) +CHECK_FUNCTION_EXISTS_GLIBC(futimens HAVE_FUTIMENS) +CHECK_FUNCTION_EXISTS_GLIBC(futimes HAVE_FUTIMES) +CHECK_FUNCTION_EXISTS_GLIBC(geteuid HAVE_GETEUID) +CHECK_FUNCTION_EXISTS_GLIBC(getgrgid_r HAVE_GETGRGID_R) +CHECK_FUNCTION_EXISTS_GLIBC(getgrnam_r HAVE_GETGRNAM_R) +CHECK_FUNCTION_EXISTS_GLIBC(getpwnam_r HAVE_GETPWNAM_R) +CHECK_FUNCTION_EXISTS_GLIBC(getpwuid_r HAVE_GETPWUID_R) +CHECK_FUNCTION_EXISTS_GLIBC(getpid HAVE_GETPID) +CHECK_FUNCTION_EXISTS_GLIBC(lchflags HAVE_LCHFLAGS) +CHECK_FUNCTION_EXISTS_GLIBC(lchmod HAVE_LCHMOD) +CHECK_FUNCTION_EXISTS_GLIBC(lchown HAVE_LCHOWN) +CHECK_FUNCTION_EXISTS_GLIBC(link HAVE_LINK) +CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) +CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) +CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) +CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) +CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) +CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) +CHECK_FUNCTION_EXISTS_GLIBC(nl_langinfo HAVE_NL_LANGINFO) +CHECK_FUNCTION_EXISTS_GLIBC(pipe HAVE_PIPE) +CHECK_FUNCTION_EXISTS_GLIBC(poll HAVE_POLL) +CHECK_FUNCTION_EXISTS_GLIBC(readlink HAVE_READLINK) +CHECK_FUNCTION_EXISTS_GLIBC(select HAVE_SELECT) +CHECK_FUNCTION_EXISTS_GLIBC(setenv HAVE_SETENV) +CHECK_FUNCTION_EXISTS_GLIBC(setlocale HAVE_SETLOCALE) +CHECK_FUNCTION_EXISTS_GLIBC(sigaction HAVE_SIGACTION) +CHECK_FUNCTION_EXISTS_GLIBC(strchr HAVE_STRCHR) +CHECK_FUNCTION_EXISTS_GLIBC(strdup HAVE_STRDUP) +CHECK_FUNCTION_EXISTS_GLIBC(strerror HAVE_STRERROR) +CHECK_FUNCTION_EXISTS_GLIBC(strncpy_s HAVE_STRNCPY_S) +CHECK_FUNCTION_EXISTS_GLIBC(strrchr HAVE_STRRCHR) +CHECK_FUNCTION_EXISTS_GLIBC(symlink HAVE_SYMLINK) +CHECK_FUNCTION_EXISTS_GLIBC(timegm HAVE_TIMEGM) +CHECK_FUNCTION_EXISTS_GLIBC(tzset HAVE_TZSET) +CHECK_FUNCTION_EXISTS_GLIBC(unsetenv HAVE_UNSETENV) +CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) +CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) +CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) +CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) +CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) +CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) +CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) +CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) +CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) +CHECK_SYMBOL_EXISTS(wmemcmp "wchar.h" HAVE_WMEMCMP) +CHECK_SYMBOL_EXISTS(wmemcpy "wchar.h" HAVE_WMEMCPY) + +SET(CMAKE_REQUIRED_LIBRARIES "") +CHECK_SYMBOL_EXISTS(fseeko "stdio.h" HAVE_FSEEKO) +CHECK_SYMBOL_EXISTS(strerror_r "string.h" HAVE_STRERROR_R) +CHECK_SYMBOL_EXISTS(strftime "time.h" HAVE_STRFTIME) +CHECK_SYMBOL_EXISTS(vprintf "stdio.h" HAVE_VPRINTF) +CHECK_SYMBOL_EXISTS(cygwin_conv_path "sys/cygwin.h" HAVE_CYGWIN_CONV_PATH) + +CHECK_SYMBOL_EXISTS(major "sys/mkdev.h" MAJOR_IN_MKDEV) +CHECK_SYMBOL_EXISTS(major "sys/sysmacros.h" MAJOR_IN_SYSMACROS) + +IF(HAVE_STRERROR_R) + SET(HAVE_DECL_STRERROR_R 1) +ENDIF(HAVE_STRERROR_R) + +# +# Check defines +# +SET(headers "limits.h") +IF(HAVE_STDINT_H) + LIST(APPEND headers "stdint.h") +ENDIF(HAVE_STDINT_H) +IF(HAVE_INTTYPES_H) + LIST(APPEND headers "inttypes.h") +ENDIF(HAVE_INTTYPES_H) +CHECK_SYMBOL_EXISTS(EFTYPE "errno.h" HAVE_EFTYPE) +CHECK_SYMBOL_EXISTS(EILSEQ "errno.h" HAVE_EILSEQ) +CHECK_SYMBOL_EXISTS(D_MD_ORDER "langinfo.h" HAVE_D_MD_ORDER) +CHECK_SYMBOL_EXISTS(optarg "unistd.h" HAVE_DECL_OPTARG) +CHECK_SYMBOL_EXISTS(optind "unistd.h" HAVE_DECL_OPTIND) +CHECK_SYMBOL_EXISTS(INT64_MAX "${headers}" HAVE_DECL_INT64_MAX) +CHECK_SYMBOL_EXISTS(INT64_MIN "${headers}" HAVE_DECL_INT64_MIN) +CHECK_SYMBOL_EXISTS(UINT32_MAX "${headers}" HAVE_DECL_UINT32_MAX) +CHECK_SYMBOL_EXISTS(UINT64_MAX "${headers}" HAVE_DECL_UINT64_MAX) +CHECK_SYMBOL_EXISTS(SIZE_MAX "${headers}" HAVE_DECL_SIZE_MAX) +CHECK_SYMBOL_EXISTS(SSIZE_MAX "limits.h" HAVE_DECL_SSIZE_MAX) + +# +# Check struct members +# +# Check for birthtime in struct stat +CHECK_STRUCT_MEMBER("struct stat" st_birthtime + "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_BIRTHTIME) + +# Check for high-resolution timestamps in struct stat +CHECK_STRUCT_MEMBER("struct stat" st_birthtimespec.tv_nsec + "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC) +CHECK_STRUCT_MEMBER("struct stat" st_mtimespec.tv_nsec + "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC) +CHECK_STRUCT_MEMBER("struct stat" st_mtim.tv_nsec + "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) +CHECK_STRUCT_MEMBER("struct stat" st_mtime_n + "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIME_N) +CHECK_STRUCT_MEMBER("struct stat" st_umtime + "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_UMTIME) +CHECK_STRUCT_MEMBER("struct stat" st_mtime_usec + "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_MTIME_USEC) +# Check for block size support in struct stat +CHECK_STRUCT_MEMBER("struct stat" st_blksize + "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_BLKSIZE) +# Check for st_flags in struct stat (BSD fflags) +CHECK_STRUCT_MEMBER("struct stat" st_flags + "sys/types.h;sys/stat.h" HAVE_STRUCT_STAT_ST_FLAGS) +# +# +CHECK_STRUCT_MEMBER("struct tm" tm_sec + "sys/types.h;sys/time.h;time.h" TIME_WITH_SYS_TIME) + +# +# Check for integer types +# +# XXX There must be a way to make this simpler XXXX +# +CHECK_TYPE_SIZE("long long int" LONG_LONG_INT) +CHECK_TYPE_SIZE("unsigned long long" UNSIGNED_LONG_LONG) +CHECK_TYPE_SIZE("unsigned long long int" UNSIGNED_LONG_LONG_INT) + +# +CHECK_TYPE_SIZE(dev_t DEV_T) +IF(NOT HAVE_DEV_T) + IF(MSVC) + SET(dev_t "unsigned int") + ENDIF(MSVC) +ENDIF(NOT HAVE_DEV_T) +# +CHECK_TYPE_SIZE(gid_t GID_T) +IF(NOT HAVE_GID_T) + IF(WIN32) + SET(gid_t "short") + ELSE(WIN32) + SET(gid_t "unsigned int") + ENDIF(WIN32) +ENDIF(NOT HAVE_GID_T) +# +CHECK_TYPE_SIZE(id_t ID_T) +IF(NOT HAVE_ID_T) + IF(WIN32) + SET(id_t "short") + ELSE(WIN32) + SET(id_t "unsigned int") + ENDIF(WIN32) +ENDIF(NOT HAVE_ID_T) +# +CHECK_TYPE_SIZE(int32_t INT32_T) +IF(NOT HAVE_INT32_T) + SET(int32_t "int") +ENDIF(NOT HAVE_INT32_T) +# +CHECK_TYPE_SIZE(int64_t INT64_T) +IF(NOT HAVE_INT64_T) + IF(WIN32) + SET(int64_t __int64) + ENDIF(WIN32) +ENDIF(NOT HAVE_INT64_T) +# +CHECK_TYPE_SIZE(intmax_t INTMAX_T) +IF(NOT HAVE_INTMAX_T) + SET(intmax_t "int64_t") +ENDIF(NOT HAVE_INTMAX_T) +# +CHECK_TYPE_SIZE(mode_t MODE_T) +IF(NOT HAVE_MODE_T) + IF(WIN32) + SET(mode_t "unsigned short") + ELSE(WIN32) + SET(mode_t "int") + ENDIF(WIN32) +ENDIF(NOT HAVE_MODE_T) +# +CHECK_TYPE_SIZE(off_t OFF_T) +IF(NOT HAVE_OFF_T) + SET(off_t "__int64") +ENDIF(NOT HAVE_OFF_T) +# +CHECK_TYPE_SIZE(size_t SIZE_T) +IF(NOT HAVE_SIZE_T) + IF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) + SET(size_t "uint64_t") + ELSE("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) + SET(size_t "uint32_t") + ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) +ENDIF(NOT HAVE_SIZE_T) +# +CHECK_TYPE_SIZE(ssize_t SSIZE_T) +IF(NOT HAVE_SSIZE_T) + IF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) + SET(ssize_t "int64_t") + ELSE("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) + SET(ssize_t "long") + ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) +ENDIF(NOT HAVE_SSIZE_T) +# +CHECK_TYPE_SIZE(uid_t UID_T) +IF(NOT HAVE_UID_T) + IF(WIN32) + SET(uid_t "short") + ELSE(WIN32) + SET(uid_t "unsigned int") + ENDIF(WIN32) +ENDIF(NOT HAVE_UID_T) +# +CHECK_TYPE_SIZE(pid_t PID_T) +IF(NOT HAVE_PID_T) + IF(WIN32) + SET(pid_t "int") + ELSE(WIN32) + MESSAGE(FATAL_ERROR "pid_t doesn't exist on this platform?") + ENDIF(WIN32) +ENDIF(NOT HAVE_PID_T) +# +CHECK_TYPE_SIZE(uint16_t UINT16_T) +IF(NOT HAVE_UINT16_T) + SET(uint16_t "unsigned short") +ENDIF(NOT HAVE_UINT16_T) +# +CHECK_TYPE_SIZE(uint32_t UINT32_T) +IF(NOT HAVE_UINT32_T) + SET(uint32_t "unsigned int") +ENDIF(NOT HAVE_UINT32_T) +# +CHECK_TYPE_SIZE(uint64_t UINT64_T) +IF(NOT HAVE_UINT64_T) + IF(WIN32) + SET(uint64_t "unsigned __int64") + ENDIF(WIN32) +ENDIF(NOT HAVE_UINT64_T) +# +CHECK_TYPE_SIZE(uintmax_t UINTMAX_T) +IF(NOT HAVE_UINTMAX_T) + SET(uintmax_t "uint64_t") +ENDIF(NOT HAVE_UINTMAX_T) +# +CHECK_TYPE_SIZE(intptr_t INTPTR_T) +IF(NOT HAVE_INTPTR_T) + IF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) + SET(intptr_t "int64_t") + ELSE() + SET(intptr_t "int32_t") + ENDIF() +ENDIF(NOT HAVE_INTPTR_T) +# +CHECK_TYPE_SIZE(uintptr_t UINTPTR_T) +IF(NOT HAVE_UINTPTR_T) + IF("${CMAKE_SIZEOF_VOID_P}" EQUAL 8) + SET(uintptr_t "uint64_t") + ELSE() + SET(uintptr_t "uint32_t") + ENDIF() +ENDIF(NOT HAVE_UINTPTR_T) +# +CHECK_TYPE_SIZE(wchar_t SIZEOF_WCHAR_T) +IF(HAVE_SIZEOF_WCHAR_T) + SET(HAVE_WCHAR_T 1) +ENDIF(HAVE_SIZEOF_WCHAR_T) +# +# Check if _FILE_OFFSET_BITS macro needed for large files +# +CHECK_FILE_OFFSET_BITS() + + + +# +# Check for Extended Attribute libraries, headers, and functions +# +IF(ENABLE_XATTR) + LA_CHECK_INCLUDE_FILE(attr/xattr.h HAVE_ATTR_XATTR_H) + LA_CHECK_INCLUDE_FILE(sys/xattr.h HAVE_SYS_XATTR_H) + LA_CHECK_INCLUDE_FILE(sys/extattr.h HAVE_SYS_EXTATTR_H) + CHECK_LIBRARY_EXISTS(attr "setxattr" "" HAVE_ATTR_LIB) + IF(HAVE_ATTR_LIB) + SET(CMAKE_REQUIRED_LIBRARIES "attr") + ENDIF(HAVE_ATTR_LIB) + CHECK_SYMBOL_EXISTS(EXTATTR_NAMESPACE_USER "sys/types.h;sys/extattr.h" HAVE_DECL_EXTATTR_NAMESPACE_USER) + CHECK_FUNCTION_EXISTS_GLIBC(extattr_get_file HAVE_EXTATTR_GET_FILE) + CHECK_FUNCTION_EXISTS_GLIBC(extattr_list_file HAVE_EXTATTR_LIST_FILE) + CHECK_FUNCTION_EXISTS_GLIBC(extattr_set_fd HAVE_EXTATTR_SET_FD) + CHECK_FUNCTION_EXISTS_GLIBC(extattr_set_file HAVE_EXTATTR_SET_FILE) + CHECK_FUNCTION_EXISTS_GLIBC(fsetxattr HAVE_FSETXATTR) + CHECK_FUNCTION_EXISTS_GLIBC(getxattr HAVE_GETXATTR) + CHECK_FUNCTION_EXISTS_GLIBC(lgetxattr HAVE_LGETXATTR) + CHECK_FUNCTION_EXISTS_GLIBC(listxattr HAVE_LISTXATTR) + CHECK_FUNCTION_EXISTS_GLIBC(llistxattr HAVE_LLISTXATTR) + CHECK_FUNCTION_EXISTS_GLIBC(lsetxattr HAVE_LSETXATTR) +ENDIF(ENABLE_XATTR) + +# +# Check for ACL libraries, headers, and functions +# +# The ACL support in libarchive is written against the POSIX1e draft, +# which was never officially approved and varies quite a bit across +# platforms. Worse, some systems have completely non-POSIX acl functions, +# which makes the following checks rather more complex than I would like. +# +IF(ENABLE_ACL) + CHECK_LIBRARY_EXISTS(acl "acl_get_file" "" HAVE_ACL_LIB) + IF(HAVE_ACL_LIB) + SET(CMAKE_REQUIRED_LIBRARIES "acl") + FIND_LIBRARY(ACL_LIBRARY NAMES acl) + LIST(APPEND ADDITIONAL_LIBS ${ACL_LIBRARY}) + ENDIF(HAVE_ACL_LIB) + # + CHECK_FUNCTION_EXISTS_GLIBC(acl_create_entry HAVE_ACL_CREATE_ENTRY) + CHECK_FUNCTION_EXISTS_GLIBC(acl_init HAVE_ACL_INIT) + CHECK_FUNCTION_EXISTS_GLIBC(acl_set_fd HAVE_ACL_SET_FD) + CHECK_FUNCTION_EXISTS_GLIBC(acl_set_fd_np HAVE_ACL_SET_FD_NP) + CHECK_FUNCTION_EXISTS_GLIBC(acl_set_file HAVE_ACL_SET_FILE) + CHECK_TYPE_EXISTS(acl_permset_t "${INCLUDES}" HAVE_ACL_PERMSET_T) + + # The "acl_get_perm()" function was omitted from the POSIX draft. + # (It's a pretty obvious oversight; otherwise, there's no way to + # test for specific permissions in a permset.) Linux uses the obvious + # name, FreeBSD adds _np to mark it as "non-Posix extension." + # Test for both as a double-check that we really have POSIX-style ACL support. + CHECK_SYMBOL_EXISTS(acl_get_perm "${INCLUDES}" HAVE_ACL_GET_PERM) + CHECK_SYMBOL_EXISTS(acl_get_perm_np "${INCLUDES}" HAVE_ACL_GET_PERM_NP) + CHECK_SYMBOL_EXISTS(acl_get_link "${INCLUDES}" HAVE_ACL_GET_LINK) + CHECK_SYMBOL_EXISTS(acl_get_link_np "${INCLUDES}" HAVE_ACL_GET_LINK_NP) + + # MacOS has an acl.h that isn't POSIX. It can be detected by + # checking for ACL_USER + CHECK_SYMBOL_EXISTS(ACL_USER "${INCLUDES}" HAVE_ACL_USER) +ENDIF(ENABLE_ACL) + +# Generate "config.h" from "build/cmake/config.h.in" +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.h.in + ${CMAKE_CURRENT_BINARY_DIR}/config.h) +INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) +ADD_DEFINITIONS(-DHAVE_CONFIG_H) + +# +# Register installation of PDF documents. +# +IF(WIN32 AND NOT CYGWIN) + # + # On Windows platform, It's better that we install PDF documents + # on one's computer. + # These PDF documents are available in the release package. + # + IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doc/pdf) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc/pdf + DESTINATION share/man + FILES_MATCHING PATTERN "*.pdf" + ) + ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doc/pdf) +ENDIF(WIN32 AND NOT CYGWIN) +# +# +# +INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/libarchive) +# +IF(MSVC) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE) +ENDIF(MSVC) +# Especially for early development, we want to be a little +# aggressive about diagnosing build problems; this can get +# relaxed somewhat in final shipping versions. +IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") + ADD_DEFINITIONS(-Wall -Werror) +ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") + +IF(ENABLE_TEST) +ADD_CUSTOM_TARGET(run_all_tests) +ENDIF(ENABLE_TEST) + +add_subdirectory(libarchive) +add_subdirectory(tar) +add_subdirectory(cpio) Added: vendor/libarchive/dist/COPYING ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/COPYING Tue Dec 20 22:47:56 2011 (r228753) @@ -0,0 +1,60 @@ +The libarchive distribution as a whole is Copyright by Tim Kientzle +and is subject to the copyright notice reproduced at the bottom of +this file. + +Each individual file in this distribution should have a clear +copyright/licensing statement at the beginning of the file. If any do +not, please let me know and I will rectify it. The following is +intended to summarize the copyright status of the individual files; +the actual statements in the files are controlling. + +* Except as listed below, all C sources (including .c and .h files) + and documentation files are subject to the copyright notice reproduced + at the bottom of this file. + +* The following source files are also subject in whole or in part to + a 3-clause UC Regents copyright; please read the individual source + files for details: + libarchive/archive_entry.c + libarchive/archive_read_support_compression_compress.c + libarchive/archive_write_set_compression_compress.c + libarchive/mtree.5 + tar/matching.c + +* The following source files are in the public domain: + tar/getdate.c + +* The build files---including Makefiles, configure scripts, + and auxiliary scripts used as part of the compile process---have + widely varying licensing terms. Please check individual files before + distributing them to see if those restrictions apply to you. + +I intend for all new source code to use the license below and hope over +time to replace code with other licenses with new implementations that +do use the license below. The varying licensing of the build scripts +seems to be an unavoidable mess. + + +Copyright (c) 2003-2009 +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer + in this position and unchanged. +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(S) ``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(S) 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. Added: vendor/libarchive/dist/CTestConfig.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/CTestConfig.cmake Tue Dec 20 22:47:56 2011 (r228753) @@ -0,0 +1,11 @@ +# TODO: This file should be moved into the build/cmake directory... + +# The libarchive CDash page appears at +# http://my.cdash.org/index.php?project=libarchive +set(CTEST_PROJECT_NAME "libarchive") +set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") + +set(CTEST_DROP_METHOD "http") +set(CTEST_DROP_SITE "my.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=libarchive") +set(CTEST_DROP_SITE_CDASH TRUE) Added: vendor/libarchive/dist/INSTALL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/INSTALL Tue Dec 20 22:47:56 2011 (r228753) @@ -0,0 +1,30 @@ +More complete build documentation is available on the libarchive +Wiki: http://libarchive.googlecode.com/ + +On most Unix-like systems, you should be able to install libarchive, +bsdtar, and bsdcpio using the following common steps: + ./configure + make + make install + +If you need to customize the target directories or otherwise adjust +the build setting, use + ./configure --help +to list the configure options. + +If you are developing libarchive and need to update the +configure script and other build files: + /bin/sh build/autogen.sh + +To create a distribution, please use the 'distcheck' target: + /bin/sh build/autogen.sh && ./configure && make distcheck + +On non-Unix-like systems, use the "cmake" utility (available from +http://cmake.org/) to generate suitable build files for your platform. +Cmake requires the name of the directory containing CmakeLists.txt and +the "generator" to use for your build environment. For example, to +build with Xcode on Mac OS, you can use the following command: + cmake -G "Xcode" ~/libarchive-download-dir/ +The result will be appropriate makefiles, solution files, or project +files that can be used with the corresponding development tool. +See the libarchive Wiki or the cmake site for further documentation. \ No newline at end of file Added: vendor/libarchive/dist/Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/Makefile.am Tue Dec 20 22:47:56 2011 (r228753) @@ -0,0 +1,630 @@ +## Process this file with automake to produce Makefile.in + +AUTOMAKE_OPTIONS= foreign subdir-objects +ACLOCAL_AMFLAGS = -I build/autoconf + +# +# What to build and install +# +lib_LTLIBRARIES= libarchive.la +noinst_LTLIBRARIES= libarchive_fe.la *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 22:56:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCC93106564A; Tue, 20 Dec 2011 22:56:13 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9DF5D8FC22; Tue, 20 Dec 2011 22:56:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKMuDuP039008; Tue, 20 Dec 2011 22:56:13 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKMuDbD039004; Tue, 20 Dec 2011 22:56:13 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201112202256.pBKMuDbD039004@svn.freebsd.org> From: Eitan Adler Date: Tue, 20 Dec 2011 22:56:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228754 - in head: include lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 22:56:13 -0000 Author: eadler (ports committer) Date: Tue Dec 20 22:56:13 2011 New Revision: 228754 URL: http://svn.freebsd.org/changeset/base/228754 Log: - Add restrict keyword to glob(3) PR: kern/161958 Submitted by: Henning Petersen Approved by: jilles MFC after: 3 days Modified: head/include/glob.h head/lib/libc/gen/glob.3 head/lib/libc/gen/glob.c Modified: head/include/glob.h ============================================================================== --- head/include/glob.h Tue Dec 20 22:47:56 2011 (r228753) +++ head/include/glob.h Tue Dec 20 22:56:13 2011 (r228754) @@ -98,7 +98,8 @@ typedef struct { #endif /* __BSD_VISIBLE */ __BEGIN_DECLS -int glob(const char *, int, int (*)(const char *, int), glob_t *); +int glob(const char * __restrict, int, + int (*)(const char *, int), glob_t * __restrict); void globfree(glob_t *); __END_DECLS Modified: head/lib/libc/gen/glob.3 ============================================================================== --- head/lib/libc/gen/glob.3 Tue Dec 20 22:47:56 2011 (r228753) +++ head/lib/libc/gen/glob.3 Tue Dec 20 22:56:13 2011 (r228754) @@ -30,7 +30,7 @@ .\" @(#)glob.3 8.3 (Berkeley) 4/16/94 .\" $FreeBSD$ .\" -.Dd February 15, 2011 +.Dd December 20, 2011 .Dt GLOB 3 .Os .Sh NAME @@ -42,7 +42,7 @@ .Sh SYNOPSIS .In glob.h .Ft int -.Fn glob "const char *pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t *pglob" +.Fn glob "const char * restrict pattern" "int flags" "int (*errfunc)(const char *, int)" "glob_t * restrict pglob" .Ft void .Fn globfree "glob_t *pglob" .Sh DESCRIPTION Modified: head/lib/libc/gen/glob.c ============================================================================== --- head/lib/libc/gen/glob.c Tue Dec 20 22:47:56 2011 (r228753) +++ head/lib/libc/gen/glob.c Tue Dec 20 22:56:13 2011 (r228754) @@ -168,7 +168,8 @@ static void qprintf(const char *, Char #endif int -glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob) +glob(const char * __restrict pattern, int flags, + int (*errfunc)(const char *, int), glob_t * __restrict pglob) { const char *patnext; size_t limit; From owner-svn-src-all@FreeBSD.ORG Tue Dec 20 22:56:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27B381065676; Tue, 20 Dec 2011 22:56:45 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12DE78FC18; Tue, 20 Dec 2011 22:56:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKMuieY039062; Tue, 20 Dec 2011 22:56:44 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBKMui1v039060; Tue, 20 Dec 2011 22:56:44 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201112202256.pBKMui1v039060@svn.freebsd.org> From: Eitan Adler Date: Tue, 20 Dec 2011 22:56:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228755 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 22:56:45 -0000 Author: eadler (ports committer) Date: Tue Dec 20 22:56:44 2011 New Revision: 228755 URL: http://svn.freebsd.org/changeset/base/228755 Log: - Fix style(9) bugs in glob.c Approved by: jilles Modified: head/lib/libc/gen/glob.c Modified: head/lib/libc/gen/glob.c ============================================================================== --- head/lib/libc/gen/glob.c Tue Dec 20 22:56:13 2011 (r228754) +++ head/lib/libc/gen/glob.c Tue Dec 20 22:56:44 2011 (r228755) @@ -232,9 +232,9 @@ glob(const char * __restrict pattern, in *bufnext = EOS; if (flags & GLOB_BRACE) - return globexp1(patbuf, pglob, &limit); + return (globexp1(patbuf, pglob, &limit)); else - return glob0(patbuf, pglob, &limit); + return (glob0(patbuf, pglob, &limit)); } /* @@ -304,7 +304,7 @@ globexp2(const Char *ptr, const Char *pa /* Non matching braces; just glob the pattern */ if (i != 0 || *pe == EOS) { *rv = glob0(patbuf, pglob, limit); - return 0; + return (0); } for (i = 0, pl = pm = ptr; pm <= pe; pm++) @@ -361,7 +361,7 @@ globexp2(const Char *ptr, const Char *pa break; } *rv = 0; - return 0; + return (0); } @@ -378,7 +378,7 @@ globtilde(const Char *pattern, Char *pat Char *b, *eb; if (*pattern != TILDE || !(pglob->gl_flags & GLOB_TILDE)) - return pattern; + return (pattern); /* * Copy up to the end of the string or / @@ -403,7 +403,7 @@ globtilde(const Char *pattern, Char *pat (pwd = getpwuid(getuid())) != NULL) h = pwd->pw_dir; else - return pattern; + return (pattern); } } else { @@ -411,7 +411,7 @@ globtilde(const Char *pattern, Char *pat * Expand a ~user */ if ((pwd = getpwnam((char*) patbuf)) == NULL) - return pattern; + return (pattern); else h = pwd->pw_dir; } @@ -425,7 +425,7 @@ globtilde(const Char *pattern, Char *pat continue; *b = EOS; - return patbuf; + return (patbuf); } @@ -512,20 +512,20 @@ glob0(const Char *pattern, glob_t *pglob if (((pglob->gl_flags & GLOB_NOCHECK) || ((pglob->gl_flags & GLOB_NOMAGIC) && !(pglob->gl_flags & GLOB_MAGCHAR)))) - return(globextend(pattern, pglob, limit)); + return (globextend(pattern, pglob, limit)); else - return(GLOB_NOMATCH); + return (GLOB_NOMATCH); } if (!(pglob->gl_flags & GLOB_NOSORT)) qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc, pglob->gl_pathc - oldpathc, sizeof(char *), compare); - return(0); + return (0); } static int compare(const void *p, const void *q) { - return(strcmp(*(char **)p, *(char **)q)); + return (strcmp(*(char **)p, *(char **)q)); } static int @@ -535,8 +535,8 @@ glob1(Char *pattern, glob_t *pglob, size /* A null pathname is invalid -- POSIX 1003.1 sect. 2.4. */ if (*pattern == EOS) - return(0); - return(glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, + return (0); + return (glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, pattern, pglob, limit)); } @@ -561,7 +561,7 @@ glob2(Char *pathbuf, Char *pathend, Char if (*pattern == EOS) { /* End of pattern? */ *pathend = EOS; if (g_lstat(pathbuf, &sb, pglob)) - return(0); + return (0); if (((pglob->gl_flags & GLOB_MARK) && pathend[-1] != SEP) && (S_ISDIR(sb.st_mode) @@ -574,7 +574,7 @@ glob2(Char *pathbuf, Char *pathend, Char *pathend = EOS; } ++pglob->gl_matchc; - return(globextend(pathbuf, pglob, limit)); + return (globextend(pathbuf, pglob, limit)); } /* Find end of next segment, copy tentatively to pathend. */ @@ -597,8 +597,8 @@ glob2(Char *pathbuf, Char *pathend, Char *pathend++ = *pattern++; } } else /* Need expansion, recurse. */ - return(glob3(pathbuf, pathend, pathend_last, pattern, p, - pglob, limit)); + return (glob3(pathbuf, pathend, pathend_last, pattern, + p, pglob, limit)); } /* NOTREACHED */ } @@ -635,7 +635,7 @@ glob3(Char *pathbuf, Char *pathend, Char pglob->gl_flags & GLOB_ERR) return (GLOB_ABORTED); } - return(0); + return (0); } err = 0; @@ -683,7 +683,7 @@ glob3(Char *pathbuf, Char *pathend, Char (*pglob->gl_closedir)(dirp); else closedir(dirp); - return(err); + return (err); } @@ -723,7 +723,7 @@ globextend(const Char *path, glob_t *pgl free(pglob->gl_pathv); pglob->gl_pathv = NULL; } - return(GLOB_NOSPACE); + return (GLOB_NOSPACE); } if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) { @@ -745,7 +745,7 @@ globextend(const Char *path, glob_t *pgl pathv[pglob->gl_offs + pglob->gl_pathc++] = copy; } pathv[pglob->gl_offs + pglob->gl_pathc] = NULL; - return(copy == NULL ? GLOB_NOSPACE : 0); + return (copy == NULL ? GLOB_NOSPACE : 0); } /* @@ -765,20 +765,20 @@ match(Char *name, Char *pat, Char *paten switch (c & M_MASK) { case M_ALL: if (pat == patend) - return(1); + return (1); do if (match(name, pat, patend)) - return(1); + return (1); while (*name++ != EOS); - return(0); + return (0); case M_ONE: if (*name++ == EOS) - return(0); + return (0); break; case M_SET: ok = 0; if ((k = *name++) == EOS) - return(0); + return (0); if ((negate_range = ((*pat & M_MASK) == M_NOT)) != EOS) ++pat; while (((c = *pat++) & M_MASK) != M_END) @@ -793,15 +793,15 @@ match(Char *name, Char *pat, Char *paten } else if (c == k) ok = 1; if (ok == negate_range) - return(0); + return (0); break; default: if (*name++ != c) - return(0); + return (0); break; } } - return(*name == EOS); + return (*name == EOS); } /* Free allocated data belonging to a glob_t structure. */ @@ -834,9 +834,9 @@ g_opendir(Char *str, glob_t *pglob) } if (pglob->gl_flags & GLOB_ALTDIRFUNC) - return((*pglob->gl_opendir)(buf)); + return ((*pglob->gl_opendir)(buf)); - return(opendir(buf)); + return (opendir(buf)); } static int @@ -850,7 +850,7 @@ g_lstat(Char *fn, struct stat *sb, glob_ } if (pglob->gl_flags & GLOB_ALTDIRFUNC) return((*pglob->gl_lstat)(buf, sb)); - return(lstat(buf, sb)); + return (lstat(buf, sb)); } static int @@ -863,8 +863,8 @@ g_stat(Char *fn, struct stat *sb, glob_t return (-1); } if (pglob->gl_flags & GLOB_ALTDIRFUNC) - return((*pglob->gl_stat)(buf, sb)); - return(stat(buf, sb)); + return ((*pglob->gl_stat)(buf, sb)); + return (stat(buf, sb)); } static const Char * From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 01:58:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 952E4106564A; Wed, 21 Dec 2011 01:58:35 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 765358FC0A; Wed, 21 Dec 2011 01:58:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBL1wZ5e044936; Wed, 21 Dec 2011 01:58:35 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBL1wZce044933; Wed, 21 Dec 2011 01:58:35 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201112210158.pBL1wZce044933@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 21 Dec 2011 01:58:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228756 - head/contrib/gcc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 01:58:35 -0000 Author: pfg Date: Wed Dec 21 01:58:35 2011 New Revision: 228756 URL: http://svn.freebsd.org/changeset/base/228756 Log: Clean an inconsistency with -ffinite-math-only. Backported from the gcc-4_3-branch, revision 118001, under the GPLv2. This issue was also fixed in Apple's gcc. PR: 157025 Reviewed by: mm Approved by: jhb (mentor) MFC: 2 weeks Modified: head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/builtins.c Modified: head/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- head/contrib/gcc/ChangeLog.gcc43 Tue Dec 20 22:56:44 2011 (r228755) +++ head/contrib/gcc/ChangeLog.gcc43 Wed Dec 21 01:58:35 2011 (r228756) @@ -96,6 +96,14 @@ * doc/invoke.texi: Add entry about geode processor. +2006-10-24 Richard Guenther + + PR middle-end/28796 + * builtins.c (fold_builtin_classify): Use HONOR_INFINITIES + and HONOR_NANS instead of MODE_HAS_INFINITIES and MODE_HAS_NANS + for deciding optimizations in consistency with fold-const.c + (fold_builtin_unordered_cmp): Likewise. + 2006-10-22 H.J. Lu (r117958) * config.gcc (i[34567]86-*-*): Add tmmintrin.h to extra_headers. Modified: head/contrib/gcc/builtins.c ============================================================================== --- head/contrib/gcc/builtins.c Tue Dec 20 22:56:44 2011 (r228755) +++ head/contrib/gcc/builtins.c Wed Dec 21 01:58:35 2011 (r228756) @@ -8720,7 +8720,7 @@ fold_builtin_classify (tree fndecl, tree switch (builtin_index) { case BUILT_IN_ISINF: - if (!MODE_HAS_INFINITIES (TYPE_MODE (TREE_TYPE (arg)))) + if (!HONOR_INFINITIES (TYPE_MODE (TREE_TYPE (arg)))) return omit_one_operand (type, integer_zero_node, arg); if (TREE_CODE (arg) == REAL_CST) @@ -8736,8 +8736,8 @@ fold_builtin_classify (tree fndecl, tree return NULL_TREE; case BUILT_IN_FINITE: - if (!MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg))) - && !MODE_HAS_INFINITIES (TYPE_MODE (TREE_TYPE (arg)))) + if (!HONOR_NANS (TYPE_MODE (TREE_TYPE (arg))) + && !HONOR_INFINITIES (TYPE_MODE (TREE_TYPE (arg)))) return omit_one_operand (type, integer_zero_node, arg); if (TREE_CODE (arg) == REAL_CST) @@ -8750,7 +8750,7 @@ fold_builtin_classify (tree fndecl, tree return NULL_TREE; case BUILT_IN_ISNAN: - if (!MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg)))) + if (!HONOR_NANS (TYPE_MODE (TREE_TYPE (arg)))) return omit_one_operand (type, integer_zero_node, arg); if (TREE_CODE (arg) == REAL_CST) @@ -8833,13 +8833,13 @@ fold_builtin_unordered_cmp (tree fndecl, if (unordered_code == UNORDERED_EXPR) { - if (!MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg0)))) + if (!HONOR_NANS (TYPE_MODE (TREE_TYPE (arg0)))) return omit_two_operands (type, integer_zero_node, arg0, arg1); return fold_build2 (UNORDERED_EXPR, type, arg0, arg1); } - code = MODE_HAS_NANS (TYPE_MODE (TREE_TYPE (arg0))) ? unordered_code - : ordered_code; + code = HONOR_NANS (TYPE_MODE (TREE_TYPE (arg0))) ? unordered_code + : ordered_code; return fold_build1 (TRUTH_NOT_EXPR, type, fold_build2 (code, type, arg0, arg1)); } From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 02:06:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id C944E1065672; Wed, 21 Dec 2011 02:06:28 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 28F531538FD; Wed, 21 Dec 2011 02:06:28 +0000 (UTC) Message-ID: <4EF13F23.9060601@FreeBSD.org> Date: Tue, 20 Dec 2011 18:06:27 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: John Baldwin References: <201111291946.pATJkHMs064094@svn.freebsd.org> <20111220171740.X1005@besplex.bde.org> <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> <201112200908.57306.jhb@freebsd.org> In-Reply-To: <201112200908.57306.jhb@freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 21 Dec 2011 02:11:44 +0000 Cc: src-committers@freebsd.org, Garrett Cooper , Max Khon , svn-src-all@freebsd.org, David Chisnall , =?ISO-8859-1?Q?G=E1bor_K=F6vesd=E1n?= , Bruce Evans , svn-src-head@freebsd.org, Warner Losh Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 02:06:28 -0000 On 12/20/2011 06:08, John Baldwin wrote: > The defaults for src.conf should be for the common case Agreed. The problem we seem to be missing here is that developers are not even statistically significant in measuring "the common case." -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 02:29:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 796731065672; Wed, 21 Dec 2011 02:29:27 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0D9F08FC1D; Wed, 21 Dec 2011 02:29:26 +0000 (UTC) Received: by ghrr16 with SMTP id r16so1580801ghr.13 for ; Tue, 20 Dec 2011 18:29:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=tOI19tAvzkrT6r2s/rAXKd5Xje/nXKjKaTLJ/rLb4Sc=; b=mzQBaYsfp1yfK/O0IPYXwPymXxwSXK8vfzsNMD1Vp/pKeNDW4BLy7RGazzmdnXIUBc rne9DD7xnp8ST+UJWa5SN2Qzflmu0nISE0UchlvsBW4919UMoUvCZTZnl8H9dNaQT29x TRlIzzFJE+VOtZNotVDk8pggQhfgOv2/Vv7R4= MIME-Version: 1.0 Received: by 10.236.178.33 with SMTP id e21mr7689456yhm.4.1324434566271; Tue, 20 Dec 2011 18:29:26 -0800 (PST) Received: by 10.236.110.40 with HTTP; Tue, 20 Dec 2011 18:29:26 -0800 (PST) In-Reply-To: <4EF13F23.9060601@FreeBSD.org> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <20111220171740.X1005@besplex.bde.org> <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> <201112200908.57306.jhb@freebsd.org> <4EF13F23.9060601@FreeBSD.org> Date: Tue, 20 Dec 2011 21:29:26 -0500 Message-ID: From: Ben Kaduk To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 02:29:27 -0000 2011/12/20 Doug Barton : > On 12/20/2011 06:08, John Baldwin wrote: >> The defaults for src.conf should be for the common case > > Agreed. The problem we seem to be missing here is that developers are > not even statistically significant in measuring "the common case." "The common case" of what, though? "People using src.conf", or "people rebuilding world", or just "people using FreeBSD"? The answer may change, depending. -Ben Kaduk From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 02:45:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 249491065670; Wed, 21 Dec 2011 02:45:10 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 54AF6150DA7; Wed, 21 Dec 2011 02:45:08 +0000 (UTC) Message-ID: <4EF14833.1090601@FreeBSD.org> Date: Tue, 20 Dec 2011 18:45:07 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Ben Kaduk References: <201111291946.pATJkHMs064094@svn.freebsd.org> <20111220171740.X1005@besplex.bde.org> <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> <201112200908.57306.jhb@freebsd.org> <4EF13F23.9060601@FreeBSD.org> In-Reply-To: X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 02:45:10 -0000 On 12/20/2011 18:29, Ben Kaduk wrote: > 2011/12/20 Doug Barton : >> On 12/20/2011 06:08, John Baldwin wrote: >>> The defaults for src.conf should be for the common case >> >> Agreed. The problem we seem to be missing here is that developers are >> not even statistically significant in measuring "the common case." > > "The common case" of what, though? "People using src.conf", or > "people rebuilding world", or just "people using FreeBSD"? The latter of course. The overwhelming majority of FreeBSD users will never use profiled libs, and in fact don't even know what they are. It's just useless space being taken up on every install. The defaults should be sensible for our users. The people who actually need to use profiled libs intersects perfectly with the set of people who know how to enable the knob in src.conf. Disabling this by default is a total no-brainer. The fact that it's generated such vehement objection by a miniscule percentage of our user base (read, the developers who still use them) is clearly indicative of a much larger problem. I think Warner summed it up best: "The needs of the many? Please." The battle between the forces who see FreeBSD primarily as a hobby project ("We're the developers, we do what we like because we like it.") vs. those who'd like to move things in a direction that's more focused on the "unwashed masses" who actually use the thing, has been going on for a long time. This issue is a good example. Doug (and a sad one) -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 02:45:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C32891065672; Wed, 21 Dec 2011 02:45:51 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA8118FC22; Wed, 21 Dec 2011 02:45:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBL2jp42046394; Wed, 21 Dec 2011 02:45:51 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBL2jpI7046391; Wed, 21 Dec 2011 02:45:51 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201112210245.pBL2jpI7046391@svn.freebsd.org> From: Rick Macklem Date: Wed, 21 Dec 2011 02:45:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228757 - in head/sys: fs/nfs nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 02:45:51 -0000 Author: rmacklem Date: Wed Dec 21 02:45:51 2011 New Revision: 228757 URL: http://svn.freebsd.org/changeset/base/228757 Log: jwd@ reported a problem via email where the old NFS client would get a reply of EEXIST from an NFS server when a Mkdir RPC was retried, for an NFS over UDP mount. Upon investigation, it was found that the client was retransmitting the Mkdir RPC request over UDP, but with a different xid. As such, the retransmitted message would miss the Duplicate Request Cache in the server, causing it to reply EEXIST. The kernel client side UDP rpc code has two timers. The first one causes a retransmit using the same xid and socket and was set to a fixed value of 3seconds. (The default can be overridden via CLSET_RETRY_TIMEOUT.) The second one creates a new socket and xid and should be larger than the first. However, both NFS clients were setting the second timer to nm_timeo ("timeout=" mount argument), which defaulted to 1second, so the first timer would never time out. This patch fixes both NFS clients so that they set the first timer using nm_timeo and makes the second timer larger than the first one. Reported by: jwd Tested by: jwd Reviewed by: jhb MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonkrpc.c head/sys/nfsclient/nfs_krpc.c Modified: head/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- head/sys/fs/nfs/nfs_commonkrpc.c Wed Dec 21 01:58:35 2011 (r228756) +++ head/sys/fs/nfs/nfs_commonkrpc.c Wed Dec 21 02:45:51 2011 (r228757) @@ -168,6 +168,7 @@ newnfs_connect(struct nfsmount *nmp, str struct socket *so; int one = 1, retries, error = 0; struct thread *td = curthread; + struct timeval timo; /* * We need to establish the socket using the credentials of @@ -264,9 +265,18 @@ newnfs_connect(struct nfsmount *nmp, str CLNT_CONTROL(client, CLSET_INTERRUPTIBLE, &one); if ((nmp->nm_flag & NFSMNT_RESVPORT)) CLNT_CONTROL(client, CLSET_PRIVPORT, &one); - if (NFSHASSOFT(nmp)) - retries = nmp->nm_retry; - else + if (NFSHASSOFT(nmp)) { + if (nmp->nm_sotype == SOCK_DGRAM) + /* + * For UDP, the large timeout for a reconnect + * will be set to "nm_retry * nm_timeo / 2", so + * we only want to do 2 reconnect timeout + * retries. + */ + retries = 2; + else + retries = nmp->nm_retry; + } else retries = INT_MAX; } else { /* @@ -284,6 +294,27 @@ newnfs_connect(struct nfsmount *nmp, str } CLNT_CONTROL(client, CLSET_RETRIES, &retries); + if (nmp != NULL) { + /* + * For UDP, there are 2 timeouts: + * - CLSET_RETRY_TIMEOUT sets the initial timeout for the timer + * that does a retransmit of an RPC request using the same + * socket and xid. This is what you normally want to do, + * since NFS servers depend on "same xid" for their + * Duplicate Request Cache. + * - timeout specified in CLNT_CALL_MBUF(), which specifies when + * retransmits on the same socket should fail and a fresh + * socket created. Each of these timeouts counts as one + * CLSET_RETRIES as set above. + * Set the initial retransmit timeout for UDP. This timeout + * doesn't exist for TCP and the following call just fails, + * which is ok. + */ + timo.tv_sec = nmp->nm_timeo / NFS_HZ; + timo.tv_usec = (nmp->nm_timeo % NFS_HZ) * 1000000 / NFS_HZ; + CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, &timo); + } + mtx_lock(&nrp->nr_mtx); if (nrp->nr_client != NULL) { /* @@ -442,7 +473,7 @@ newnfs_request(struct nfsrv_descript *nd { u_int32_t *tl; time_t waituntil; - int i, j, set_uid = 0, set_sigset = 0; + int i, j, set_uid = 0, set_sigset = 0, timeo; int trycnt, error = 0, usegssname = 0, secflavour = AUTH_SYS; u_int16_t procnum; u_int trylater_delay = 1; @@ -628,6 +659,12 @@ newnfs_request(struct nfsrv_descript *nd } trycnt = 0; tryagain: + /* + * This timeout specifies when a new socket should be created, + * along with new xid values. For UDP, this should be done + * infrequently, since retransmits of RPC requests should normally + * use the same xid. + */ if (nmp == NULL) { timo.tv_usec = 0; if (clp == NULL) @@ -642,8 +679,22 @@ tryagain: else timo.tv_sec = NFS_TCPTIMEO; } else { - timo.tv_sec = nmp->nm_timeo / NFS_HZ; - timo.tv_usec = (nmp->nm_timeo * 1000000) / NFS_HZ; + if (NFSHASSOFT(nmp)) { + /* + * CLSET_RETRIES is set to 2, so this should be + * half of the total timeout required. + */ + timeo = nmp->nm_retry * nmp->nm_timeo / 2; + if (timeo < 1) + timeo = 1; + timo.tv_sec = timeo / NFS_HZ; + timo.tv_usec = (timeo % NFS_HZ) * 1000000 / + NFS_HZ; + } else { + /* For UDP hard mounts, use a large value. */ + timo.tv_sec = NFS_MAXTIMEO / NFS_HZ; + timo.tv_usec = 0; + } } if (rep != NULL) { Modified: head/sys/nfsclient/nfs_krpc.c ============================================================================== --- head/sys/nfsclient/nfs_krpc.c Wed Dec 21 01:58:35 2011 (r228756) +++ head/sys/nfsclient/nfs_krpc.c Wed Dec 21 02:45:51 2011 (r228757) @@ -191,6 +191,7 @@ nfs_connect(struct nfsmount *nmp) struct netconfig *nconf; rpcvers_t vers; int one = 1, retries; + struct timeval timo; /* * We need to establish the socket using the credentials of @@ -258,12 +259,37 @@ nfs_connect(struct nfsmount *nmp) CLNT_CONTROL(client, CLSET_INTERRUPTIBLE, &one); if (nmp->nm_flag & NFSMNT_RESVPORT) CLNT_CONTROL(client, CLSET_PRIVPORT, &one); - if (nmp->nm_flag & NFSMNT_SOFT) - retries = nmp->nm_retry; - else + if ((nmp->nm_flag & NFSMNT_SOFT) != 0) { + if (nmp->nm_sotype == SOCK_DGRAM) + /* + * For UDP, the large timeout for a reconnect will + * be set to "nm_retry * nm_timeo / 2", so we only + * want to do 2 reconnect timeout retries. + */ + retries = 2; + else + retries = nmp->nm_retry; + } else retries = INT_MAX; CLNT_CONTROL(client, CLSET_RETRIES, &retries); + /* + * For UDP, there are 2 timeouts: + * - CLSET_RETRY_TIMEOUT sets the initial timeout for the timer + * that does a retransmit of an RPC request using the same socket + * and xid. This is what you normally want to do, since NFS + * servers depend on "same xid" for their Duplicate Request Cache. + * - timeout specified in CLNT_CALL_MBUF(), which specifies when + * retransmits on the same socket should fail and a fresh socket + * created. Each of these timeouts counts as one CLSET_RETRIES, + * as set above. + * Set the initial retransmit timeout for UDP. This timeout doesn't + * exist for TCP and the following call just fails, which is ok. + */ + timo.tv_sec = nmp->nm_timeo / NFS_HZ; + timo.tv_usec = (nmp->nm_timeo % NFS_HZ) * 1000000 / NFS_HZ; + CLNT_CONTROL(client, CLSET_RETRY_TIMEOUT, &timo); + mtx_lock(&nmp->nm_mtx); if (nmp->nm_client) { /* @@ -411,7 +437,7 @@ nfs_request(struct vnode *vp, struct mbu struct mbuf *md; time_t waituntil; caddr_t dpos; - int error = 0; + int error = 0, timeo; struct timeval now; AUTH *auth = NULL; enum nfs_rto_timer_t timer; @@ -486,8 +512,32 @@ nfs_request(struct vnode *vp, struct mbu nfsstats.rpcrequests++; tryagain: - timo.tv_sec = nmp->nm_timeo / NFS_HZ; - timo.tv_usec = (nmp->nm_timeo * 1000000) / NFS_HZ; + /* + * This timeout specifies when a new socket should be created, + * along with new xid values. For UDP, this should be done + * infrequently, since retransmits of RPC requests should normally + * use the same xid. + */ + if (nmp->nm_sotype == SOCK_DGRAM) { + if ((nmp->nm_flag & NFSMNT_SOFT) != 0) { + /* + * CLSET_RETRIES is set to 2, so this should be half + * of the total timeout required. + */ + timeo = nmp->nm_retry * nmp->nm_timeo / 2; + if (timeo < 1) + timeo = 1; + timo.tv_sec = timeo / NFS_HZ; + timo.tv_usec = (timeo % NFS_HZ) * 1000000 / NFS_HZ; + } else { + /* For UDP hard mounts, use a large value. */ + timo.tv_sec = NFS_MAXTIMEO / NFS_HZ; + timo.tv_usec = 0; + } + } else { + timo.tv_sec = nmp->nm_timeo / NFS_HZ; + timo.tv_usec = (nmp->nm_timeo % NFS_HZ) * 1000000 / NFS_HZ; + } mrep = NULL; stat = CLNT_CALL_MBUF(nmp->nm_client, &ext, (nmp->nm_flag & NFSMNT_NFSV3) ? procnum : nfsv2_procid[procnum], From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 04:55:38 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 374FB1065676; Wed, 21 Dec 2011 04:55:38 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id ECCE58FC1B; Wed, 21 Dec 2011 04:55:37 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id pBL4tbgm099922; Tue, 20 Dec 2011 20:55:37 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id pBL4tbcF099921; Tue, 20 Dec 2011 20:55:37 -0800 (PST) (envelope-from sgk) Date: Tue, 20 Dec 2011 20:55:37 -0800 From: Steve Kargl To: Doug Barton Message-ID: <20111221045537.GA99900@troutmask.apl.washington.edu> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <20111220171740.X1005@besplex.bde.org> <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> <201112200908.57306.jhb@freebsd.org> <4EF13F23.9060601@FreeBSD.org> <4EF14833.1090601@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EF14833.1090601@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ben Kaduk Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 04:55:38 -0000 On Tue, Dec 20, 2011 at 06:45:07PM -0800, Doug Barton wrote: > On 12/20/2011 18:29, Ben Kaduk wrote: > > 2011/12/20 Doug Barton : > >> On 12/20/2011 06:08, John Baldwin wrote: > >>> The defaults for src.conf should be for the common case > >> > >> Agreed. The problem we seem to be missing here is that developers are > >> not even statistically significant in measuring "the common case." > > > > "The common case" of what, though? "People using src.conf", or > > "people rebuilding world", or just "people using FreeBSD"? > > The latter of course. The overwhelming majority of FreeBSD users will > never use profiled libs, and in fact don't even know what they are. It's > just useless space being taken up on every install. The defaults should > be sensible for our users. OK, Doug, we get it! You don't like profiled libraries. You don't use them, and by extension the 'common user' does not use them. -- Steve From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 05:30:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1452D1065673; Wed, 21 Dec 2011 05:30:12 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 998458FC08; Wed, 21 Dec 2011 05:30:11 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so4444199obb.13 for ; Tue, 20 Dec 2011 21:30:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=tNvza69hA67WHLua0Q/fseKlRW6iSN3jfLD13Aw16aE=; b=uPD8oJfljFb8x+/i8mZYy1uLO5COpmNFw2vERHkjx6Smv9JQzrjYoscTQaugwQfUdV Uyw+3BI+/R2vVQ2XG+asj3ha124ySS/ed2eA9daAAMmqa7W3m8Lgux6/95MEyOyubeyY qviit/Ah9wuMpI0nE90gCDhCdBIptkKZ7lJ9s= MIME-Version: 1.0 Received: by 10.182.17.102 with SMTP id n6mr4390778obd.56.1324445411130; Tue, 20 Dec 2011 21:30:11 -0800 (PST) Received: by 10.182.62.227 with HTTP; Tue, 20 Dec 2011 21:30:10 -0800 (PST) In-Reply-To: <20111221045537.GA99900@troutmask.apl.washington.edu> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <20111220171740.X1005@besplex.bde.org> <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> <201112200908.57306.jhb@freebsd.org> <4EF13F23.9060601@FreeBSD.org> <4EF14833.1090601@FreeBSD.org> <20111221045537.GA99900@troutmask.apl.washington.edu> Date: Tue, 20 Dec 2011 21:30:10 -0800 Message-ID: From: Garrett Cooper To: Steve Kargl Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Doug Barton , src-committers@freebsd.org, Ben Kaduk Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 05:30:12 -0000 On Tue, Dec 20, 2011 at 8:55 PM, Steve Kargl wrote: > On Tue, Dec 20, 2011 at 06:45:07PM -0800, Doug Barton wrote: >> On 12/20/2011 18:29, Ben Kaduk wrote: >> > 2011/12/20 Doug Barton : >> >> On 12/20/2011 06:08, John Baldwin wrote: >> >>> The defaults for src.conf should be for the common case >> >> >> >> Agreed. The problem we seem to be missing here is that developers are >> >> not even statistically significant in measuring "the common case." >> > >> > "The common case" of what, though? =A0"People using src.conf", or >> > "people rebuilding world", or just "people using FreeBSD"? >> >> The latter of course. The overwhelming majority of FreeBSD users will >> never use profiled libs, and in fact don't even know what they are. It's >> just useless space being taken up on every install. The defaults should >> be sensible for our users. > > OK, Doug, we get it! You don't like profiled libraries. > You don't use them, and by extension the 'common user' > does not use them. The point that I was trying to drive home (that I think Doug is as well= ) is: - How many FreeBSD users are developers/performance/test engineers who care about this stuff being compiled into the base system? - How many developers use gprof / profiled libraries? - How many developers reroll their world by turning on WITH_PROFILE ? - How often do you use gprof to profile binaries? Smart defaults and better tuning are what we ultimately should be striving for, because again, WITH_PROFILE is a developer and not a end-user / administrator convenience. Those are the individuals we should be tailoring FreeBSD for -- not developers. Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 05:59:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 470DC1065672; Wed, 21 Dec 2011 05:59:33 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 1F8E38FC16; Wed, 21 Dec 2011 05:59:33 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id pBL5xWlX000312; Tue, 20 Dec 2011 21:59:32 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id pBL5xWj8000311; Tue, 20 Dec 2011 21:59:32 -0800 (PST) (envelope-from sgk) Date: Tue, 20 Dec 2011 21:59:32 -0800 From: Steve Kargl To: Garrett Cooper Message-ID: <20111221055932.GA250@troutmask.apl.washington.edu> References: <201111291946.pATJkHMs064094@svn.freebsd.org> <20111220171740.X1005@besplex.bde.org> <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> <201112200908.57306.jhb@freebsd.org> <4EF13F23.9060601@FreeBSD.org> <4EF14833.1090601@FreeBSD.org> <20111221045537.GA99900@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Doug Barton , src-committers@freebsd.org, Ben Kaduk Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 05:59:33 -0000 On Tue, Dec 20, 2011 at 09:30:10PM -0800, Garrett Cooper wrote: > On Tue, Dec 20, 2011 at 8:55 PM, Steve Kargl > wrote: > > On Tue, Dec 20, 2011 at 06:45:07PM -0800, Doug Barton wrote: > >> On 12/20/2011 18:29, Ben Kaduk wrote: > >> > 2011/12/20 Doug Barton : > >> >> On 12/20/2011 06:08, John Baldwin wrote: > >> >>> The defaults for src.conf should be for the common case > >> >> > >> >> Agreed. The problem we seem to be missing here is that developers are > >> >> not even statistically significant in measuring "the common case." > >> > > >> > "The common case" of what, though? ?"People using src.conf", or > >> > "people rebuilding world", or just "people using FreeBSD"? > >> > >> The latter of course. The overwhelming majority of FreeBSD users will > >> never use profiled libs, and in fact don't even know what they are. It's > >> just useless space being taken up on every install. The defaults should > >> be sensible for our users. > > > > OK, Doug, we get it! You don't like profiled libraries. > > You don't use them, and by extension the 'common user' > > does not use them. > > The point that I was trying to drive home (that I think Doug is as well) is: > - How many FreeBSD users are developers/performance/test engineers who > care about this stuff being compiled into the base system? Don't know. I haven't seen a statistically meaningful poll of the FreeBSD user base on which to draw an answer. I suspect that neither you nor Doug have seen such a poll. > - How many developers use gprof / profiled libraries? Unfortunately, too few as evident by some of the code committed to src/. Try timing buildworld WITH_CLANG and WITHOUT_CLANG. > - How many developers reroll their world by turning on WITH_PROFILE ? As of the moment, none. WITH_PROFILE is the default. > - How often do you use gprof to profile binaries? I use profiled libraries all time. Of course, I'm interested in making my numerical codes run as fast as possible, and a profiler does an amazing job of finding the bottlenecks. You can also ask bde and das about my forays into working on libm. > Smart defaults and better tuning are what we ultimately should be > striving for, because again, WITH_PROFILE is a developer and not a > end-user / administrator convenience. Those are the individuals we > should be tailoring FreeBSD for -- not developers. How many end-users/administrators do a buildworld and how often? Neither the time to build profiled libraries nor the diskspace used is significant. Yes, I know you're going to posit that on slow ARM and embedded systems profiled libraries are undesirable. I suspect that an ARM developer has more than just WITHOUT_PROFILE her src.conf. -- Steve From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 08:46:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BFB0106564A; Wed, 21 Dec 2011 08:46:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B1438FC15; Wed, 21 Dec 2011 08:46:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBL8k8DS057641; Wed, 21 Dec 2011 08:46:08 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBL8k8NG057639; Wed, 21 Dec 2011 08:46:08 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112210846.pBL8k8NG057639@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 21 Dec 2011 08:46:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228758 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 08:46:09 -0000 Author: hselasky Date: Wed Dec 21 08:46:08 2011 New Revision: 228758 URL: http://svn.freebsd.org/changeset/base/228758 Log: Fix for race against user-space applications trying to change the configuration on USB HUBs. PR: kern/163091 MFC after: 1 week Modified: head/sys/dev/usb/usb_hub.c Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Wed Dec 21 02:45:51 2011 (r228757) +++ head/sys/dev/usb/usb_hub.c Wed Dec 21 08:46:08 2011 (r228758) @@ -707,6 +707,13 @@ uhub_explore(struct usb_device *udev) DPRINTF("Device is suspended!\n"); return (0); } + + /* + * Make sure we don't race against user-space applications + * like LibUSB: + */ + usbd_enum_lock(udev); + for (x = 0; x != hub->nports; x++) { up = hub->ports + x; portno = x + 1; @@ -784,6 +791,8 @@ uhub_explore(struct usb_device *udev) up->restartcnt = 0; } + usbd_enum_unlock(udev); + /* initial status checked */ sc->sc_flags |= UHUB_FLAG_DID_EXPLORE; From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 09:08:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 444BC106566B; Wed, 21 Dec 2011 09:08:42 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F3E88FC12; Wed, 21 Dec 2011 09:08:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBL98gCo058339; Wed, 21 Dec 2011 09:08:42 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBL98g6P058338; Wed, 21 Dec 2011 09:08:42 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112210908.pBL98g6P058338@svn.freebsd.org> From: Martin Matuska Date: Wed, 21 Dec 2011 09:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228759 - in vendor/libarchive/dist: . build build/autoconf build/cmake build/pkgconfig contrib contrib/psota-benchmark contrib/shar cpio cpio/test doc examples examples/minitar libarch... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 09:08:42 -0000 Author: mm Date: Wed Dec 21 09:08:41 2011 New Revision: 228759 URL: http://svn.freebsd.org/changeset/base/228759 Log: Set svn:eol-style property to native for all text files in vendor/libarchive Modified: Directory Properties: vendor/libarchive/dist/CMakeLists.txt (props changed) vendor/libarchive/dist/COPYING (props changed) vendor/libarchive/dist/CTestConfig.cmake (props changed) vendor/libarchive/dist/INSTALL (props changed) vendor/libarchive/dist/Makefile.am (props changed) vendor/libarchive/dist/NEWS (props changed) vendor/libarchive/dist/README (props changed) vendor/libarchive/dist/build/autoconf/check_stdcall_func.m4 (props changed) vendor/libarchive/dist/build/autoconf/la_uid_t.m4 (props changed) vendor/libarchive/dist/build/autogen.sh (props changed) vendor/libarchive/dist/build/bump-version.sh (props changed) vendor/libarchive/dist/build/clean.sh (props changed) vendor/libarchive/dist/build/cmake/AddTest28.cmake (props changed) vendor/libarchive/dist/build/cmake/CheckFileOffsetBits.c (props changed) vendor/libarchive/dist/build/cmake/CheckFileOffsetBits.cmake (props changed) vendor/libarchive/dist/build/cmake/CheckFuncs.cmake (props changed) vendor/libarchive/dist/build/cmake/CheckFuncs_stub.c.in (props changed) vendor/libarchive/dist/build/cmake/CheckHeaderDirent.cmake (props changed) vendor/libarchive/dist/build/cmake/CheckStructMember.cmake (props changed) vendor/libarchive/dist/build/cmake/CheckTypeExists.cmake (props changed) vendor/libarchive/dist/build/cmake/FindLZMA.cmake (props changed) vendor/libarchive/dist/build/cmake/config.h.in (props changed) vendor/libarchive/dist/build/pkgconfig/libarchive.pc.in (props changed) vendor/libarchive/dist/build/version (props changed) vendor/libarchive/dist/configure.ac (props changed) vendor/libarchive/dist/contrib/README (props changed) vendor/libarchive/dist/contrib/libarchive.1aix53.spec (props changed) vendor/libarchive/dist/contrib/libarchive.spec (props changed) vendor/libarchive/dist/contrib/libarchive_autodetect-st_lib_archive.m4 (props changed) vendor/libarchive/dist/contrib/psota-benchmark/results.txt (props changed) vendor/libarchive/dist/contrib/psota-benchmark/tcp.sh (props changed) vendor/libarchive/dist/contrib/shar/Makefile (props changed) vendor/libarchive/dist/contrib/shar/shar.1 (props changed) vendor/libarchive/dist/contrib/shar/shar.c (props changed) vendor/libarchive/dist/contrib/shar/tree.c (props changed) vendor/libarchive/dist/contrib/shar/tree.h (props changed) vendor/libarchive/dist/contrib/shar/tree_config.h (props changed) vendor/libarchive/dist/contrib/untar.c (props changed) vendor/libarchive/dist/cpio/CMakeLists.txt (props changed) vendor/libarchive/dist/cpio/bsdcpio.1 (props changed) vendor/libarchive/dist/cpio/cmdline.c (props changed) vendor/libarchive/dist/cpio/config_freebsd.h (props changed) vendor/libarchive/dist/cpio/cpio.c (props changed) vendor/libarchive/dist/cpio/cpio.h (props changed) vendor/libarchive/dist/cpio/cpio_platform.h (props changed) vendor/libarchive/dist/cpio/cpio_windows.c (props changed) vendor/libarchive/dist/cpio/cpio_windows.h (props changed) vendor/libarchive/dist/cpio/test/CMakeLists.txt (props changed) vendor/libarchive/dist/cpio/test/main.c (props changed) vendor/libarchive/dist/cpio/test/test.h (props changed) vendor/libarchive/dist/cpio/test/test_0.c (props changed) vendor/libarchive/dist/cpio/test/test_basic.c (props changed) vendor/libarchive/dist/cpio/test/test_cmdline.c (props changed) vendor/libarchive/dist/cpio/test/test_format_newc.c (props changed) vendor/libarchive/dist/cpio/test/test_gcpio_compat.c (props changed) vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref.bin.uu (props changed) vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref.crc.uu (props changed) vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref.newc.uu (props changed) vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref.ustar.uu (props changed) vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.bin.uu (props changed) vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.crc.uu (props changed) vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.newc.uu (props changed) vendor/libarchive/dist/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu (props changed) vendor/libarchive/dist/cpio/test/test_option_B_upper.c (props changed) vendor/libarchive/dist/cpio/test/test_option_C_upper.c (props changed) vendor/libarchive/dist/cpio/test/test_option_J_upper.c (props changed) vendor/libarchive/dist/cpio/test/test_option_L_upper.c (props changed) vendor/libarchive/dist/cpio/test/test_option_Z_upper.c (props changed) vendor/libarchive/dist/cpio/test/test_option_a.c (props changed) vendor/libarchive/dist/cpio/test/test_option_c.c (props changed) vendor/libarchive/dist/cpio/test/test_option_d.c (props changed) vendor/libarchive/dist/cpio/test/test_option_f.c (props changed) vendor/libarchive/dist/cpio/test/test_option_f.cpio.uu (props changed) vendor/libarchive/dist/cpio/test/test_option_help.c (props changed) vendor/libarchive/dist/cpio/test/test_option_l.c (props changed) vendor/libarchive/dist/cpio/test/test_option_lzma.c (props changed) vendor/libarchive/dist/cpio/test/test_option_m.c (props changed) vendor/libarchive/dist/cpio/test/test_option_m.cpio.uu (props changed) vendor/libarchive/dist/cpio/test/test_option_t.c (props changed) vendor/libarchive/dist/cpio/test/test_option_t.cpio.uu (props changed) vendor/libarchive/dist/cpio/test/test_option_t.stdout.uu (props changed) vendor/libarchive/dist/cpio/test/test_option_tv.stdout.uu (props changed) vendor/libarchive/dist/cpio/test/test_option_u.c (props changed) vendor/libarchive/dist/cpio/test/test_option_version.c (props changed) vendor/libarchive/dist/cpio/test/test_option_y.c (props changed) vendor/libarchive/dist/cpio/test/test_option_z.c (props changed) vendor/libarchive/dist/cpio/test/test_owner_parse.c (props changed) vendor/libarchive/dist/cpio/test/test_passthrough_dotdot.c (props changed) vendor/libarchive/dist/cpio/test/test_passthrough_reverse.c (props changed) vendor/libarchive/dist/cpio/test/test_pathmatch.c (props changed) vendor/libarchive/dist/doc/mdoc2man.awk (props changed) vendor/libarchive/dist/doc/mdoc2wiki.awk (props changed) vendor/libarchive/dist/doc/update.sh (props changed) vendor/libarchive/dist/examples/minitar/Makefile (props changed) vendor/libarchive/dist/examples/minitar/README (props changed) vendor/libarchive/dist/examples/minitar/minitar.c (props changed) vendor/libarchive/dist/examples/minitar/tree.c (props changed) vendor/libarchive/dist/examples/minitar/tree.h (props changed) vendor/libarchive/dist/examples/tarfilter.c (props changed) vendor/libarchive/dist/examples/untar.c (props changed) vendor/libarchive/dist/libarchive/CMakeLists.txt (props changed) vendor/libarchive/dist/libarchive/archive.h (props changed) vendor/libarchive/dist/libarchive/archive_check_magic.c (props changed) vendor/libarchive/dist/libarchive/archive_crc32.h (props changed) vendor/libarchive/dist/libarchive/archive_endian.h (props changed) vendor/libarchive/dist/libarchive/archive_entry.3 (props changed) vendor/libarchive/dist/libarchive/archive_entry.c (props changed) vendor/libarchive/dist/libarchive/archive_entry.h (props changed) vendor/libarchive/dist/libarchive/archive_entry_copy_bhfi.c (props changed) vendor/libarchive/dist/libarchive/archive_entry_copy_stat.c (props changed) vendor/libarchive/dist/libarchive/archive_entry_link_resolver.c (props changed) vendor/libarchive/dist/libarchive/archive_entry_private.h (props changed) vendor/libarchive/dist/libarchive/archive_entry_stat.c (props changed) vendor/libarchive/dist/libarchive/archive_entry_strmode.c (props changed) vendor/libarchive/dist/libarchive/archive_entry_xattr.c (props changed) vendor/libarchive/dist/libarchive/archive_hash.h (props changed) vendor/libarchive/dist/libarchive/archive_platform.h (props changed) vendor/libarchive/dist/libarchive/archive_private.h (props changed) vendor/libarchive/dist/libarchive/archive_read.3 (props changed) vendor/libarchive/dist/libarchive/archive_read.c (props changed) vendor/libarchive/dist/libarchive/archive_read_data_into_fd.c (props changed) vendor/libarchive/dist/libarchive/archive_read_disk.3 (props changed) vendor/libarchive/dist/libarchive/archive_read_disk.c (props changed) vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c (props changed) vendor/libarchive/dist/libarchive/archive_read_disk_private.h (props changed) vendor/libarchive/dist/libarchive/archive_read_disk_set_standard_lookup.c (props changed) vendor/libarchive/dist/libarchive/archive_read_extract.c (props changed) vendor/libarchive/dist/libarchive/archive_read_open_fd.c (props changed) vendor/libarchive/dist/libarchive/archive_read_open_file.c (props changed) vendor/libarchive/dist/libarchive/archive_read_open_filename.c (props changed) vendor/libarchive/dist/libarchive/archive_read_open_memory.c (props changed) vendor/libarchive/dist/libarchive/archive_read_private.h (props changed) vendor/libarchive/dist/libarchive/archive_read_support_compression_all.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_compression_bzip2.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_compression_compress.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_compression_gzip.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_compression_none.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_compression_program.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_compression_rpm.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_compression_uu.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_compression_xz.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_format_all.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_format_ar.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_format_empty.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_format_mtree.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_format_raw.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c (props changed) vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c (props changed) vendor/libarchive/dist/libarchive/archive_string.c (props changed) vendor/libarchive/dist/libarchive/archive_string.h (props changed) vendor/libarchive/dist/libarchive/archive_string_sprintf.c (props changed) vendor/libarchive/dist/libarchive/archive_util.3 (props changed) vendor/libarchive/dist/libarchive/archive_util.c (props changed) vendor/libarchive/dist/libarchive/archive_virtual.c (props changed) vendor/libarchive/dist/libarchive/archive_windows.c (props changed) vendor/libarchive/dist/libarchive/archive_windows.h (props changed) vendor/libarchive/dist/libarchive/archive_write.3 (props changed) vendor/libarchive/dist/libarchive/archive_write.c (props changed) vendor/libarchive/dist/libarchive/archive_write_disk.3 (props changed) vendor/libarchive/dist/libarchive/archive_write_disk.c (props changed) vendor/libarchive/dist/libarchive/archive_write_disk_private.h (props changed) vendor/libarchive/dist/libarchive/archive_write_disk_set_standard_lookup.c (props changed) vendor/libarchive/dist/libarchive/archive_write_open_fd.c (props changed) vendor/libarchive/dist/libarchive/archive_write_open_file.c (props changed) vendor/libarchive/dist/libarchive/archive_write_open_filename.c (props changed) vendor/libarchive/dist/libarchive/archive_write_open_memory.c (props changed) vendor/libarchive/dist/libarchive/archive_write_private.h (props changed) vendor/libarchive/dist/libarchive/archive_write_set_compression_bzip2.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_compression_compress.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_compression_gzip.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_compression_none.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_compression_program.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_compression_xz.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_format.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_format_ar.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_format_by_name.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_format_cpio.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_format_cpio_newc.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_format_mtree.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_format_shar.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_format_ustar.c (props changed) vendor/libarchive/dist/libarchive/archive_write_set_format_zip.c (props changed) vendor/libarchive/dist/libarchive/config_freebsd.h (props changed) vendor/libarchive/dist/libarchive/cpio.5 (props changed) vendor/libarchive/dist/libarchive/filter_fork.c (props changed) vendor/libarchive/dist/libarchive/filter_fork.h (props changed) vendor/libarchive/dist/libarchive/filter_fork_windows.c (props changed) vendor/libarchive/dist/libarchive/libarchive-formats.5 (props changed) vendor/libarchive/dist/libarchive/libarchive.3 (props changed) vendor/libarchive/dist/libarchive/libarchive_internals.3 (props changed) vendor/libarchive/dist/libarchive/mtree.5 (props changed) vendor/libarchive/dist/libarchive/tar.5 (props changed) vendor/libarchive/dist/libarchive/test/.cvsignore (props changed) vendor/libarchive/dist/libarchive/test/CMakeLists.txt (props changed) vendor/libarchive/dist/libarchive/test/README (props changed) vendor/libarchive/dist/libarchive/test/main.c (props changed) vendor/libarchive/dist/libarchive/test/read_open_memory.c (props changed) vendor/libarchive/dist/libarchive/test/test.h (props changed) vendor/libarchive/dist/libarchive/test/test_acl_basic.c (props changed) vendor/libarchive/dist/libarchive/test/test_acl_freebsd.c (props changed) vendor/libarchive/dist/libarchive/test/test_acl_pax.c (props changed) vendor/libarchive/dist/libarchive/test/test_archive_api_feature.c (props changed) vendor/libarchive/dist/libarchive/test/test_bad_fd.c (props changed) vendor/libarchive/dist/libarchive/test/test_compat_bzip2.c (props changed) vendor/libarchive/dist/libarchive/test/test_compat_bzip2_1.tbz.uu (props changed) vendor/libarchive/dist/libarchive/test/test_compat_bzip2_2.tbz.uu (props changed) vendor/libarchive/dist/libarchive/test/test_compat_cpio.c (props changed) vendor/libarchive/dist/libarchive/test/test_compat_cpio_1.cpio.uu (props changed) vendor/libarchive/dist/libarchive/test/test_compat_gtar.c (props changed) vendor/libarchive/dist/libarchive/test/test_compat_gtar_1.tar.uu (props changed) vendor/libarchive/dist/libarchive/test/test_compat_gzip.c (props changed) vendor/libarchive/dist/libarchive/test/test_compat_gzip_1.tgz.uu (props changed) vendor/libarchive/dist/libarchive/test/test_compat_gzip_2.tgz.uu (props changed) vendor/libarchive/dist/libarchive/test/test_compat_lzma.c (props changed) vendor/libarchive/dist/libarchive/test/test_compat_lzma_1.tlz.uu (props changed) vendor/libarchive/dist/libarchive/test/test_compat_lzma_2.tlz.uu (props changed) vendor/libarchive/dist/libarchive/test/test_compat_lzma_3.tlz.uu (props changed) vendor/libarchive/dist/libarchive/test/test_compat_solaris_tar_acl.c (props changed) vendor/libarchive/dist/libarchive/test/test_compat_solaris_tar_acl.tar.uu (props changed) vendor/libarchive/dist/libarchive/test/test_compat_tar_hardlink.c (props changed) vendor/libarchive/dist/libarchive/test/test_compat_tar_hardlink_1.tar.uu (props changed) vendor/libarchive/dist/libarchive/test/test_compat_xz.c (props changed) vendor/libarchive/dist/libarchive/test/test_compat_xz_1.txz.uu (props changed) vendor/libarchive/dist/libarchive/test/test_compat_zip.c (props changed) vendor/libarchive/dist/libarchive/test/test_compat_zip_1.zip.uu (props changed) vendor/libarchive/dist/libarchive/test/test_empty_write.c (props changed) vendor/libarchive/dist/libarchive/test/test_entry.c (props changed) vendor/libarchive/dist/libarchive/test/test_entry_strmode.c (props changed) vendor/libarchive/dist/libarchive/test/test_extattr_freebsd.c (props changed) vendor/libarchive/dist/libarchive/test/test_fuzz.c (props changed) vendor/libarchive/dist/libarchive/test/test_fuzz_1.iso.Z.uu (props changed) vendor/libarchive/dist/libarchive/test/test_link_resolver.c (props changed) vendor/libarchive/dist/libarchive/test/test_open_failure.c (props changed) vendor/libarchive/dist/libarchive/test/test_open_fd.c (props changed) vendor/libarchive/dist/libarchive/test/test_open_file.c (props changed) vendor/libarchive/dist/libarchive/test/test_open_filename.c (props changed) vendor/libarchive/dist/libarchive/test/test_pax_filename_encoding.c (props changed) vendor/libarchive/dist/libarchive/test/test_pax_filename_encoding.tar.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_compress_program.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_data_large.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_disk.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_disk_entry_from_file.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_extract.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_file_nonexistent.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_ar.ar.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_ar.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_Z.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_be.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_be.cpio.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_bz2.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_gz.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_lzma.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_bin_xz.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_odc.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4_gzip.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_cpio_svr4c_Z.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_empty.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_gtar_gz.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_gtar_lzma.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_iso.iso.Z.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_iso_2.iso.Z.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_iso_Z.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_iso_joliet.iso.Z.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_iso_multi_extent.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_isojoliet_bz2.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_isojoliet_long.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_isojoliet_rr.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_isorr_bz2.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_isorr_ce.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_isorr_new_bz2.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_isorr_rr_moved.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_isozisofs_bz2.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_mtree.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_mtree.mtree.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_pax_bz2.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_raw.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_raw.data.Z.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_raw.data.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_tar.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_tar_empty_filename.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_tar_empty_filename.tar.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_tbz.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_tgz.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_tlz.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_txz.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_tz.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_xar.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_zip.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_format_zip.zip.uu (props changed) vendor/libarchive/dist/libarchive/test/test_read_large.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_pax_truncated.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_position.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_truncated.c (props changed) vendor/libarchive/dist/libarchive/test/test_read_uu.c (props changed) vendor/libarchive/dist/libarchive/test/test_tar_filenames.c (props changed) vendor/libarchive/dist/libarchive/test/test_tar_large.c (props changed) vendor/libarchive/dist/libarchive/test/test_ustar_filenames.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_compress.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_compress_bzip2.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_compress_gzip.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_compress_lzma.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_compress_program.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_compress_xz.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_disk.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_disk_failures.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_disk_hardlink.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_disk_perms.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_disk_secure.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_disk_sparse.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_disk_symlink.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_disk_times.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_format_ar.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_format_cpio.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_format_cpio_empty.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_format_cpio_newc.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_format_cpio_odc.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_format_mtree.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_format_pax.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_format_shar_empty.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_format_tar.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_format_tar_empty.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_format_tar_ustar.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_format_zip.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_format_zip_empty.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_format_zip_no_compression.c (props changed) vendor/libarchive/dist/libarchive/test/test_write_open_memory.c (props changed) vendor/libarchive/dist/libarchive_fe/err.c (props changed) vendor/libarchive/dist/libarchive_fe/err.h (props changed) vendor/libarchive/dist/libarchive_fe/lafe_platform.h (props changed) vendor/libarchive/dist/libarchive_fe/line_reader.c (props changed) vendor/libarchive/dist/libarchive_fe/line_reader.h (props changed) vendor/libarchive/dist/libarchive_fe/matching.c (props changed) vendor/libarchive/dist/libarchive_fe/matching.h (props changed) vendor/libarchive/dist/libarchive_fe/pathmatch.c (props changed) vendor/libarchive/dist/libarchive_fe/pathmatch.h (props changed) vendor/libarchive/dist/tar/CMakeLists.txt (props changed) vendor/libarchive/dist/tar/bsdtar.1 (props changed) vendor/libarchive/dist/tar/bsdtar.c (props changed) vendor/libarchive/dist/tar/bsdtar.h (props changed) vendor/libarchive/dist/tar/bsdtar_platform.h (props changed) vendor/libarchive/dist/tar/bsdtar_windows.c (props changed) vendor/libarchive/dist/tar/bsdtar_windows.h (props changed) vendor/libarchive/dist/tar/cmdline.c (props changed) vendor/libarchive/dist/tar/config_freebsd.h (props changed) vendor/libarchive/dist/tar/getdate.c (props changed) vendor/libarchive/dist/tar/read.c (props changed) vendor/libarchive/dist/tar/subst.c (props changed) vendor/libarchive/dist/tar/test/CMakeLists.txt (props changed) vendor/libarchive/dist/tar/test/main.c (props changed) vendor/libarchive/dist/tar/test/test.h (props changed) vendor/libarchive/dist/tar/test/test_0.c (props changed) vendor/libarchive/dist/tar/test/test_basic.c (props changed) vendor/libarchive/dist/tar/test/test_copy.c (props changed) vendor/libarchive/dist/tar/test/test_empty_mtree.c (props changed) vendor/libarchive/dist/tar/test/test_getdate.c (props changed) vendor/libarchive/dist/tar/test/test_help.c (props changed) vendor/libarchive/dist/tar/test/test_option_T_upper.c (props changed) vendor/libarchive/dist/tar/test/test_option_q.c (props changed) vendor/libarchive/dist/tar/test/test_option_r.c (props changed) vendor/libarchive/dist/tar/test/test_option_s.c (props changed) vendor/libarchive/dist/tar/test/test_patterns.c (props changed) vendor/libarchive/dist/tar/test/test_patterns_2.tar.uu (props changed) vendor/libarchive/dist/tar/test/test_patterns_3.tar.uu (props changed) vendor/libarchive/dist/tar/test/test_patterns_4.tar.uu (props changed) vendor/libarchive/dist/tar/test/test_stdio.c (props changed) vendor/libarchive/dist/tar/test/test_strip_components.c (props changed) vendor/libarchive/dist/tar/test/test_symlink_dir.c (props changed) vendor/libarchive/dist/tar/test/test_version.c (props changed) vendor/libarchive/dist/tar/test/test_windows.c (props changed) vendor/libarchive/dist/tar/tree.c (props changed) vendor/libarchive/dist/tar/tree.h (props changed) vendor/libarchive/dist/tar/util.c (props changed) vendor/libarchive/dist/tar/write.c (props changed) From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 10:52:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83856106564A; Wed, 21 Dec 2011 10:52:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 729908FC0A; Wed, 21 Dec 2011 10:52:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLAqInS065051; Wed, 21 Dec 2011 10:52:18 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLAqIik065049; Wed, 21 Dec 2011 10:52:18 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201112211052.pBLAqIik065049@svn.freebsd.org> From: Andriy Gapon Date: Wed, 21 Dec 2011 10:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228760 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 10:52:18 -0000 Author: avg Date: Wed Dec 21 10:52:17 2011 New Revision: 228760 URL: http://svn.freebsd.org/changeset/base/228760 Log: adapt usb transfer code for SCHEDULER_STOPPED When SCHEDULER_STOPPED() is true the mtx_owned() call may return an unexpected and thus meaningless result. So, in the code paths that can be reached when SCHEDULER_STOPPED() is true we need to protect the mtx_owned() calls with the SCHEDULER_STOPPED() checks and ensure that an appropriate branch is taken in each case. Reviewed by: hselasky MFC after: 3 months X-MFC after: r228424 Modified: head/sys/dev/usb/usb_transfer.c Modified: head/sys/dev/usb/usb_transfer.c ============================================================================== --- head/sys/dev/usb/usb_transfer.c Wed Dec 21 09:08:41 2011 (r228759) +++ head/sys/dev/usb/usb_transfer.c Wed Dec 21 10:52:17 2011 (r228760) @@ -2150,7 +2150,7 @@ usbd_callback_wrapper(struct usb_xfer_qu struct usb_xfer_root *info = xfer->xroot; USB_BUS_LOCK_ASSERT(info->bus, MA_OWNED); - if (!mtx_owned(info->xfer_mtx)) { + if (!mtx_owned(info->xfer_mtx) && !SCHEDULER_STOPPED()) { /* * Cases that end up here: * @@ -3119,14 +3119,14 @@ usbd_transfer_poll(struct usb_xfer **ppx /* make sure that the BUS mutex is not locked */ drop_bus = 0; - while (mtx_owned(&xroot->udev->bus->bus_mtx)) { + while (mtx_owned(&xroot->udev->bus->bus_mtx) && !SCHEDULER_STOPPED()) { mtx_unlock(&xroot->udev->bus->bus_mtx); drop_bus++; } /* make sure that the transfer mutex is not locked */ drop_xfer = 0; - while (mtx_owned(xroot->xfer_mtx)) { + while (mtx_owned(xroot->xfer_mtx) && !SCHEDULER_STOPPED()) { mtx_unlock(xroot->xfer_mtx); drop_xfer++; } From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 11:09:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D83D1106566C; Wed, 21 Dec 2011 11:09:24 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD4C88FC14; Wed, 21 Dec 2011 11:09:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLB9O4D065623; Wed, 21 Dec 2011 11:09:24 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLB9Oii065622; Wed, 21 Dec 2011 11:09:24 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112211109.pBLB9Oii065622@svn.freebsd.org> From: Martin Matuska Date: Wed, 21 Dec 2011 11:09:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228761 - head/contrib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 11:09:24 -0000 Author: mm Date: Wed Dec 21 11:09:24 2011 New Revision: 228761 URL: http://svn.freebsd.org/changeset/base/228761 Log: Copy libarchive from vendor branch to contrib MFC after: 2 weeks Added: head/contrib/libarchive/ - copied from r228760, vendor/libarchive/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 11:11:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B02B51065672; Wed, 21 Dec 2011 11:11:52 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84C498FC12; Wed, 21 Dec 2011 11:11:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLBBqEV065751; Wed, 21 Dec 2011 11:11:52 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLBBqr5065749; Wed, 21 Dec 2011 11:11:52 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112211111.pBLBBqr5065749@svn.freebsd.org> From: Martin Matuska Date: Wed, 21 Dec 2011 11:11:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228762 - head/contrib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 11:11:52 -0000 Author: mm Date: Wed Dec 21 11:11:51 2011 New Revision: 228762 URL: http://svn.freebsd.org/changeset/base/228762 Log: Add FREEBSD-Xlist and FREEBSD-upgrade to contrib/libarchive MFC after: 2 weeks Added: head/contrib/libarchive/FREEBSD-Xlist (contents, props changed) head/contrib/libarchive/FREEBSD-upgrade (contents, props changed) Added: head/contrib/libarchive/FREEBSD-Xlist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libarchive/FREEBSD-Xlist Wed Dec 21 11:11:51 2011 (r228762) @@ -0,0 +1,25 @@ +$FreeBSD$ +CMakeLists.txt +CTestConfig.cmake +INSTALL +Makefile.am +build +configure.ac +contrib +cpio/CMakeLists.txt +cpio/cpio_windows.c +cpio/cpio_windows.h +cpio/test/CMakeLists.txt +doc +examples +libarchive/CMakeLists.txt +libarchive/archive_windows.c +libarchive/archive_windows.h +libarchive/filter_fork_windows.c +libarchive/test/.cvsignore +libarchive/test/CMakeLists.txt +tar/CMakeLists.txt +tar/bsdtar_windows.c +tar/bsdtar_windows.h +tar/test/CMakeLists.txt +tar/test/test_windows.c Added: head/contrib/libarchive/FREEBSD-upgrade ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libarchive/FREEBSD-upgrade Wed Dec 21 11:11:51 2011 (r228762) @@ -0,0 +1,24 @@ +$FreeBSD$ + +libarchive + +The source code is pulled with svn: + + svn checkout http://libarchive.googlecode.com/svn/release/2.8 + +For the contrib directory files and directories were pruned by: + +sh -c 'for F in `cat FREEBSD-Xlist | grep -v FreeBSD`; do rm -rf ./$F ; done' + +You may check if there are any new files that we don't need. + +The instructions for importing new release and merging to HEAD can be found +at FreeBSD wiki: + + http://wiki.freebsd.org/SubversionPrimer/VendorImports + +To make local changes to xz, simply patch and commit to the trunk +branch (aka HEAD). Never make local changes on the vendor branch. + +mm@FreeBSD.org +21-December-2011 From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 11:13:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B72F1065670; Wed, 21 Dec 2011 11:13:31 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74B4C8FC15; Wed, 21 Dec 2011 11:13:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLBDVJo065926; Wed, 21 Dec 2011 11:13:31 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLBDUlh065831; Wed, 21 Dec 2011 11:13:30 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112211113.pBLBDUlh065831@svn.freebsd.org> From: Martin Matuska Date: Wed, 21 Dec 2011 11:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228763 - in head/contrib/libarchive: . build build/autoconf build/cmake build/pkgconfig contrib contrib/psota-benchmark contrib/shar cpio cpio/test doc examples examples/minitar libarc... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 11:13:31 -0000 Author: mm Date: Wed Dec 21 11:13:29 2011 New Revision: 228763 URL: http://svn.freebsd.org/changeset/base/228763 Log: Set svn:keywords to FreeBSD=%H for contrib/libarchive MFC after: 2 weeks Modified: head/contrib/libarchive/cpio/cmdline.c (contents, props changed) head/contrib/libarchive/cpio/config_freebsd.h (contents, props changed) head/contrib/libarchive/cpio/cpio.c (contents, props changed) head/contrib/libarchive/cpio/cpio.h (contents, props changed) head/contrib/libarchive/cpio/cpio_platform.h (contents, props changed) head/contrib/libarchive/cpio/test/main.c (contents, props changed) head/contrib/libarchive/cpio/test/test.h (contents, props changed) head/contrib/libarchive/cpio/test/test_basic.c (contents, props changed) head/contrib/libarchive/cpio/test/test_format_newc.c (contents, props changed) head/contrib/libarchive/cpio/test/test_gcpio_compat.c (contents, props changed) head/contrib/libarchive/cpio/test/test_option_L_upper.c (contents, props changed) head/contrib/libarchive/cpio/test/test_option_a.c (contents, props changed) head/contrib/libarchive/cpio/test/test_option_tv.stdout.uu (contents, props changed) head/contrib/libarchive/cpio/test/test_option_y.c (contents, props changed) head/contrib/libarchive/cpio/test/test_passthrough_dotdot.c (contents, props changed) head/contrib/libarchive/cpio/test/test_passthrough_reverse.c (contents, props changed) head/contrib/libarchive/libarchive/archive.h (contents, props changed) head/contrib/libarchive/libarchive/archive_check_magic.c (contents, props changed) head/contrib/libarchive/libarchive/archive_crc32.h (contents, props changed) head/contrib/libarchive/libarchive/archive_endian.h (contents, props changed) head/contrib/libarchive/libarchive/archive_entry.3 (contents, props changed) head/contrib/libarchive/libarchive/archive_entry.c (contents, props changed) head/contrib/libarchive/libarchive/archive_entry.h (contents, props changed) head/contrib/libarchive/libarchive/archive_entry_copy_stat.c (contents, props changed) head/contrib/libarchive/libarchive/archive_entry_link_resolver.c (contents, props changed) head/contrib/libarchive/libarchive/archive_entry_private.h (contents, props changed) head/contrib/libarchive/libarchive/archive_entry_stat.c (contents, props changed) head/contrib/libarchive/libarchive/archive_entry_strmode.c (contents, props changed) head/contrib/libarchive/libarchive/archive_entry_xattr.c (contents, props changed) head/contrib/libarchive/libarchive/archive_hash.h (contents, props changed) head/contrib/libarchive/libarchive/archive_platform.h (contents, props changed) head/contrib/libarchive/libarchive/archive_private.h (contents, props changed) head/contrib/libarchive/libarchive/archive_read.3 (contents, props changed) head/contrib/libarchive/libarchive/archive_read.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_data_into_fd.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_disk.3 (contents, props changed) head/contrib/libarchive/libarchive/archive_read_disk.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_disk_private.h (contents, props changed) head/contrib/libarchive/libarchive/archive_read_disk_set_standard_lookup.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_extract.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_open_fd.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_open_file.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_open_filename.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_open_memory.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_private.h (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_compression_all.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_compression_bzip2.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_compression_compress.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_compression_gzip.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_compression_none.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_compression_program.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_compression_uu.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_compression_xz.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_format_all.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_format_ar.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_format_empty.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_format_raw.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_format_tar.c (contents, props changed) head/contrib/libarchive/libarchive/archive_read_support_format_zip.c (contents, props changed) head/contrib/libarchive/libarchive/archive_string.c (contents, props changed) head/contrib/libarchive/libarchive/archive_string.h (contents, props changed) head/contrib/libarchive/libarchive/archive_string_sprintf.c (contents, props changed) head/contrib/libarchive/libarchive/archive_util.3 (contents, props changed) head/contrib/libarchive/libarchive/archive_util.c (contents, props changed) head/contrib/libarchive/libarchive/archive_virtual.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write.3 (contents, props changed) head/contrib/libarchive/libarchive/archive_write.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_disk.3 (contents, props changed) head/contrib/libarchive/libarchive/archive_write_disk.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_disk_private.h (contents, props changed) head/contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_open_fd.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_open_file.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_open_filename.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_open_memory.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_private.h (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_compression_bzip2.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_compression_compress.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_compression_gzip.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_compression_none.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_compression_program.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_compression_xz.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_format.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_format_ar.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_format_by_name.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_format_mtree.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_format_pax.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_format_shar.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_format_ustar.c (contents, props changed) head/contrib/libarchive/libarchive/archive_write_set_format_zip.c (contents, props changed) head/contrib/libarchive/libarchive/config_freebsd.h (contents, props changed) head/contrib/libarchive/libarchive/cpio.5 (contents, props changed) head/contrib/libarchive/libarchive/filter_fork.c (contents, props changed) head/contrib/libarchive/libarchive/filter_fork.h (contents, props changed) head/contrib/libarchive/libarchive/libarchive-formats.5 (contents, props changed) head/contrib/libarchive/libarchive/libarchive.3 (contents, props changed) head/contrib/libarchive/libarchive/libarchive_internals.3 (contents, props changed) head/contrib/libarchive/libarchive/tar.5 (contents, props changed) head/contrib/libarchive/libarchive/test/README (contents, props changed) head/contrib/libarchive/libarchive/test/main.c (contents, props changed) head/contrib/libarchive/libarchive/test/read_open_memory.c (contents, props changed) head/contrib/libarchive/libarchive/test/test.h (contents, props changed) head/contrib/libarchive/libarchive/test/test_acl_basic.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_acl_freebsd.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_acl_pax.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_archive_api_feature.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_bad_fd.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_bzip2.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_bzip2_1.tbz.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_bzip2_2.tbz.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_cpio.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_cpio_1.cpio.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_gtar.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_gtar_1.tar.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_gzip.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_gzip_1.tgz.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_gzip_2.tgz.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_lzma.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_lzma_1.tlz.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_lzma_2.tlz.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_lzma_3.tlz.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_solaris_tar_acl.tar.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_tar_hardlink.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_tar_hardlink_1.tar.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_xz.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_xz_1.txz.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_zip.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_compat_zip_1.zip.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_empty_write.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_entry.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_entry_strmode.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_extattr_freebsd.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_fuzz.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_fuzz_1.iso.Z.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_link_resolver.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_open_fd.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_open_file.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_open_filename.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_pax_filename_encoding.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_pax_filename_encoding.tar.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_compress_program.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_data_large.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_disk.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_disk_entry_from_file.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_extract.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_file_nonexistent.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_ar.ar.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_ar.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_Z.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_be.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_be.cpio.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_bz2.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_gz.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_lzma.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_bin_xz.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_odc.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4c_Z.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_empty.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_gtar_gz.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_gtar_lzma.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_iso.iso.Z.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_iso_Z.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_iso_joliet.iso.Z.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_iso_multi_extent.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_isojoliet_bz2.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_isojoliet_long.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_isojoliet_rr.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_isorr_bz2.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_isorr_ce.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_isorr_new_bz2.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_isorr_rr_moved.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_isozisofs_bz2.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_mtree.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_mtree.mtree.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_pax_bz2.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_raw.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_raw.data.Z.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_raw.data.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_tar.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_tar_empty_filename.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_tar_empty_filename.tar.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_tbz.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_tgz.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_tlz.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_txz.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_tz.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_zip.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_format_zip.zip.uu (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_large.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_pax_truncated.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_position.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_truncated.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_read_uu.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_tar_filenames.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_tar_large.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_ustar_filenames.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_compress.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_compress_bzip2.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_compress_gzip.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_compress_lzma.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_compress_program.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_compress_xz.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_disk.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_disk_failures.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_disk_hardlink.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_disk_perms.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_disk_secure.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_disk_sparse.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_disk_symlink.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_disk_times.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_format_ar.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_format_cpio.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_format_cpio_empty.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_format_cpio_newc.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_format_cpio_odc.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_format_mtree.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_format_shar_empty.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_format_tar.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_format_tar_empty.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_format_tar_ustar.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_format_zip.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_format_zip_empty.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_format_zip_no_compression.c (contents, props changed) head/contrib/libarchive/libarchive/test/test_write_open_memory.c (contents, props changed) head/contrib/libarchive/libarchive_fe/lafe_platform.h (contents, props changed) head/contrib/libarchive/libarchive_fe/matching.c (contents, props changed) head/contrib/libarchive/tar/bsdtar.1 (contents, props changed) head/contrib/libarchive/tar/bsdtar.c (contents, props changed) head/contrib/libarchive/tar/bsdtar.h (contents, props changed) head/contrib/libarchive/tar/bsdtar_platform.h (contents, props changed) head/contrib/libarchive/tar/config_freebsd.h (contents, props changed) head/contrib/libarchive/tar/read.c (contents, props changed) head/contrib/libarchive/tar/subst.c (contents, props changed) head/contrib/libarchive/tar/test/main.c (contents, props changed) head/contrib/libarchive/tar/test/test.h (contents, props changed) head/contrib/libarchive/tar/test/test_0.c (contents, props changed) head/contrib/libarchive/tar/test/test_basic.c (contents, props changed) head/contrib/libarchive/tar/test/test_copy.c (contents, props changed) head/contrib/libarchive/tar/test/test_getdate.c (contents, props changed) head/contrib/libarchive/tar/test/test_help.c (contents, props changed) head/contrib/libarchive/tar/test/test_option_T_upper.c (contents, props changed) head/contrib/libarchive/tar/test/test_option_q.c (contents, props changed) head/contrib/libarchive/tar/test/test_option_s.c (contents, props changed) head/contrib/libarchive/tar/test/test_patterns.c (contents, props changed) head/contrib/libarchive/tar/test/test_stdio.c (contents, props changed) head/contrib/libarchive/tar/test/test_strip_components.c (contents, props changed) head/contrib/libarchive/tar/test/test_symlink_dir.c (contents, props changed) head/contrib/libarchive/tar/test/test_version.c (contents, props changed) head/contrib/libarchive/tar/tree.c (contents, props changed) head/contrib/libarchive/tar/tree.h (contents, props changed) head/contrib/libarchive/tar/util.c (contents, props changed) head/contrib/libarchive/tar/write.c (contents, props changed) Directory Properties: head/contrib/libarchive/CMakeLists.txt (props changed) head/contrib/libarchive/COPYING (props changed) head/contrib/libarchive/CTestConfig.cmake (props changed) head/contrib/libarchive/INSTALL (props changed) head/contrib/libarchive/Makefile.am (props changed) head/contrib/libarchive/NEWS (props changed) head/contrib/libarchive/README (props changed) head/contrib/libarchive/build/autoconf/check_stdcall_func.m4 (props changed) head/contrib/libarchive/build/autoconf/la_uid_t.m4 (props changed) head/contrib/libarchive/build/autogen.sh (props changed) head/contrib/libarchive/build/bump-version.sh (props changed) head/contrib/libarchive/build/clean.sh (props changed) head/contrib/libarchive/build/cmake/AddTest28.cmake (props changed) head/contrib/libarchive/build/cmake/CheckFileOffsetBits.c (props changed) head/contrib/libarchive/build/cmake/CheckFileOffsetBits.cmake (props changed) head/contrib/libarchive/build/cmake/CheckFuncs.cmake (props changed) head/contrib/libarchive/build/cmake/CheckFuncs_stub.c.in (props changed) head/contrib/libarchive/build/cmake/CheckHeaderDirent.cmake (props changed) head/contrib/libarchive/build/cmake/CheckStructMember.cmake (props changed) head/contrib/libarchive/build/cmake/CheckTypeExists.cmake (props changed) head/contrib/libarchive/build/cmake/FindLZMA.cmake (props changed) head/contrib/libarchive/build/cmake/config.h.in (props changed) head/contrib/libarchive/build/pkgconfig/libarchive.pc.in (props changed) head/contrib/libarchive/build/version (props changed) head/contrib/libarchive/configure.ac (props changed) head/contrib/libarchive/contrib/README (props changed) head/contrib/libarchive/contrib/libarchive.1aix53.spec (props changed) head/contrib/libarchive/contrib/libarchive.spec (props changed) head/contrib/libarchive/contrib/libarchive_autodetect-st_lib_archive.m4 (props changed) head/contrib/libarchive/contrib/psota-benchmark/results.txt (props changed) head/contrib/libarchive/contrib/psota-benchmark/tcp.sh (props changed) head/contrib/libarchive/contrib/shar/Makefile (props changed) head/contrib/libarchive/contrib/shar/shar.1 (props changed) head/contrib/libarchive/contrib/shar/shar.c (props changed) head/contrib/libarchive/contrib/shar/tree.c (props changed) head/contrib/libarchive/contrib/shar/tree.h (props changed) head/contrib/libarchive/contrib/shar/tree_config.h (props changed) head/contrib/libarchive/contrib/untar.c (props changed) head/contrib/libarchive/cpio/CMakeLists.txt (props changed) head/contrib/libarchive/cpio/bsdcpio.1 (props changed) head/contrib/libarchive/cpio/cpio_windows.c (props changed) head/contrib/libarchive/cpio/cpio_windows.h (props changed) head/contrib/libarchive/cpio/test/CMakeLists.txt (props changed) head/contrib/libarchive/cpio/test/test_0.c (props changed) head/contrib/libarchive/cpio/test/test_cmdline.c (props changed) head/contrib/libarchive/cpio/test/test_gcpio_compat_ref.bin.uu (props changed) head/contrib/libarchive/cpio/test/test_gcpio_compat_ref.crc.uu (props changed) head/contrib/libarchive/cpio/test/test_gcpio_compat_ref.newc.uu (props changed) head/contrib/libarchive/cpio/test/test_gcpio_compat_ref.ustar.uu (props changed) head/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.bin.uu (props changed) head/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.crc.uu (props changed) head/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.newc.uu (props changed) head/contrib/libarchive/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu (props changed) head/contrib/libarchive/cpio/test/test_option_B_upper.c (props changed) head/contrib/libarchive/cpio/test/test_option_C_upper.c (props changed) head/contrib/libarchive/cpio/test/test_option_J_upper.c (props changed) head/contrib/libarchive/cpio/test/test_option_Z_upper.c (props changed) head/contrib/libarchive/cpio/test/test_option_c.c (props changed) head/contrib/libarchive/cpio/test/test_option_d.c (props changed) head/contrib/libarchive/cpio/test/test_option_f.c (props changed) head/contrib/libarchive/cpio/test/test_option_f.cpio.uu (props changed) head/contrib/libarchive/cpio/test/test_option_help.c (props changed) head/contrib/libarchive/cpio/test/test_option_l.c (props changed) head/contrib/libarchive/cpio/test/test_option_lzma.c (props changed) head/contrib/libarchive/cpio/test/test_option_m.c (props changed) head/contrib/libarchive/cpio/test/test_option_m.cpio.uu (props changed) head/contrib/libarchive/cpio/test/test_option_t.c (props changed) head/contrib/libarchive/cpio/test/test_option_t.cpio.uu (props changed) head/contrib/libarchive/cpio/test/test_option_t.stdout.uu (props changed) head/contrib/libarchive/cpio/test/test_option_u.c (props changed) head/contrib/libarchive/cpio/test/test_option_version.c (props changed) head/contrib/libarchive/cpio/test/test_option_z.c (props changed) head/contrib/libarchive/cpio/test/test_owner_parse.c (props changed) head/contrib/libarchive/cpio/test/test_pathmatch.c (props changed) head/contrib/libarchive/doc/mdoc2man.awk (props changed) head/contrib/libarchive/doc/mdoc2wiki.awk (props changed) head/contrib/libarchive/doc/update.sh (props changed) head/contrib/libarchive/examples/minitar/Makefile (props changed) head/contrib/libarchive/examples/minitar/README (props changed) head/contrib/libarchive/examples/minitar/minitar.c (props changed) head/contrib/libarchive/examples/minitar/tree.c (props changed) head/contrib/libarchive/examples/minitar/tree.h (props changed) head/contrib/libarchive/examples/tarfilter.c (props changed) head/contrib/libarchive/examples/untar.c (props changed) head/contrib/libarchive/libarchive/CMakeLists.txt (props changed) head/contrib/libarchive/libarchive/archive_entry_copy_bhfi.c (props changed) head/contrib/libarchive/libarchive/archive_read_support_compression_rpm.c (props changed) head/contrib/libarchive/libarchive/archive_read_support_format_xar.c (props changed) head/contrib/libarchive/libarchive/archive_windows.c (props changed) head/contrib/libarchive/libarchive/archive_windows.h (props changed) head/contrib/libarchive/libarchive/filter_fork_windows.c (props changed) head/contrib/libarchive/libarchive/mtree.5 (props changed) head/contrib/libarchive/libarchive/test/.cvsignore (props changed) head/contrib/libarchive/libarchive/test/CMakeLists.txt (props changed) head/contrib/libarchive/libarchive/test/test_open_failure.c (props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c (props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu (props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c (props changed) head/contrib/libarchive/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu (props changed) head/contrib/libarchive/libarchive/test/test_read_format_iso_2.iso.Z.uu (props changed) head/contrib/libarchive/libarchive/test/test_read_format_xar.c (props changed) head/contrib/libarchive/libarchive/test/test_write_format_pax.c (props changed) head/contrib/libarchive/libarchive_fe/err.c (props changed) head/contrib/libarchive/libarchive_fe/err.h (props changed) head/contrib/libarchive/libarchive_fe/line_reader.c (props changed) head/contrib/libarchive/libarchive_fe/line_reader.h (props changed) head/contrib/libarchive/libarchive_fe/matching.h (props changed) head/contrib/libarchive/libarchive_fe/pathmatch.c (props changed) head/contrib/libarchive/libarchive_fe/pathmatch.h (props changed) head/contrib/libarchive/tar/CMakeLists.txt (props changed) head/contrib/libarchive/tar/bsdtar_windows.c (props changed) head/contrib/libarchive/tar/bsdtar_windows.h (props changed) head/contrib/libarchive/tar/cmdline.c (props changed) head/contrib/libarchive/tar/getdate.c (props changed) head/contrib/libarchive/tar/test/CMakeLists.txt (props changed) head/contrib/libarchive/tar/test/test_empty_mtree.c (props changed) head/contrib/libarchive/tar/test/test_option_r.c (props changed) head/contrib/libarchive/tar/test/test_patterns_2.tar.uu (props changed) head/contrib/libarchive/tar/test/test_patterns_3.tar.uu (props changed) head/contrib/libarchive/tar/test/test_patterns_4.tar.uu (props changed) head/contrib/libarchive/tar/test/test_windows.c (props changed) Modified: head/contrib/libarchive/cpio/cmdline.c ============================================================================== --- head/contrib/libarchive/cpio/cmdline.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/cmdline.c Wed Dec 21 11:13:29 2011 (r228763) @@ -26,7 +26,7 @@ #include "cpio_platform.h" -__FBSDID("$FreeBSD: src/usr.bin/cpio/cmdline.c,v 1.5 2008/12/06 07:30:40 kientzle Exp $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/cpio/config_freebsd.h ============================================================================== --- head/contrib/libarchive/cpio/config_freebsd.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/config_freebsd.h Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/usr.bin/cpio/config_freebsd.h,v 1.3 2008/12/06 07:30:40 kientzle Exp $ + * $FreeBSD$ */ /* A hand-tooled configuration for FreeBSD. */ Modified: head/contrib/libarchive/cpio/cpio.c ============================================================================== --- head/contrib/libarchive/cpio/cpio.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/cpio.c Wed Dec 21 11:13:29 2011 (r228763) @@ -26,7 +26,7 @@ #include "cpio_platform.h" -__FBSDID("$FreeBSD: src/usr.bin/cpio/cpio.c,v 1.15 2008/12/06 07:30:40 kientzle Exp $"); +__FBSDID("$FreeBSD$"); #include #include Modified: head/contrib/libarchive/cpio/cpio.h ============================================================================== --- head/contrib/libarchive/cpio/cpio.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/cpio.h Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/usr.bin/cpio/cpio.h,v 1.7 2008/12/06 07:30:40 kientzle Exp $ + * $FreeBSD$ */ #ifndef CPIO_H_INCLUDED Modified: head/contrib/libarchive/cpio/cpio_platform.h ============================================================================== --- head/contrib/libarchive/cpio/cpio_platform.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/cpio_platform.h Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/usr.bin/cpio/cpio_platform.h,v 1.2 2008/12/06 07:15:42 kientzle Exp $ + * $FreeBSD$ */ /* Modified: head/contrib/libarchive/cpio/test/main.c ============================================================================== --- head/contrib/libarchive/cpio/test/main.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/test/main.c Wed Dec 21 11:13:29 2011 (r228763) @@ -36,7 +36,7 @@ * TODO: Move this into a separate configuration header, have all test * suites share one copy of this file. */ -__FBSDID("$FreeBSD: src/usr.bin/cpio/test/main.c,v 1.3 2008/08/24 04:58:22 kientzle Exp $"); +__FBSDID("$FreeBSD$"); #define KNOWNREF "test_option_f.cpio.uu" #define ENVBASE "BSDCPIO" /* Prefix for environment variables. */ #define PROGRAM "bsdcpio" /* Name of program being tested. */ Modified: head/contrib/libarchive/cpio/test/test.h ============================================================================== --- head/contrib/libarchive/cpio/test/test.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/test/test.h Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/usr.bin/cpio/test/test.h,v 1.2 2008/06/21 02:17:18 kientzle Exp $ + * $FreeBSD$ */ /* Every test program should #include "test.h" as the first thing. */ Modified: head/contrib/libarchive/cpio/test/test_basic.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_basic.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/test/test_basic.c Wed Dec 21 11:13:29 2011 (r228763) @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_basic.c,v 1.4 2008/08/25 06:39:29 kientzle Exp $"); +__FBSDID("$FreeBSD$"); static void verify_files(const char *msg) Modified: head/contrib/libarchive/cpio/test/test_format_newc.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_format_newc.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/test/test_format_newc.c Wed Dec 21 11:13:29 2011 (r228763) @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_format_newc.c,v 1.2 2008/08/22 02:09:10 kientzle Exp $"); +__FBSDID("$FreeBSD$"); /* Number of bytes needed to pad 'n' to multiple of 'block', assuming * that 'block' is a power of two. This trick can be more easily Modified: head/contrib/libarchive/cpio/test/test_gcpio_compat.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_gcpio_compat.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/test/test_gcpio_compat.c Wed Dec 21 11:13:29 2011 (r228763) @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_gcpio_compat.c,v 1.2 2008/08/22 02:27:06 kientzle Exp $"); +__FBSDID("$FreeBSD$"); static void unpack_test(const char *from, const char *options, const char *se) Modified: head/contrib/libarchive/cpio/test/test_option_L_upper.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_option_L_upper.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/test/test_option_L_upper.c Wed Dec 21 11:13:29 2011 (r228763) @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_option_L.c,v 1.2 2008/08/24 06:21:00 kientzle Exp $"); +__FBSDID("$FreeBSD$"); /* This is a little pointless, as Windows doesn't support symlinks * (except for the seriously crippled CreateSymbolicLink API) so these Modified: head/contrib/libarchive/cpio/test/test_option_a.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_option_a.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/test/test_option_a.c Wed Dec 21 11:13:29 2011 (r228763) @@ -28,7 +28,7 @@ #elif defined(HAVE_SYS_UTIME_H) #include #endif -__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_option_a.c,v 1.3 2008/08/24 06:21:00 kientzle Exp $"); +__FBSDID("$FreeBSD$"); static struct { const char *name; Modified: head/contrib/libarchive/cpio/test/test_option_tv.stdout.uu ============================================================================== --- head/contrib/libarchive/cpio/test/test_option_tv.stdout.uu Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/test/test_option_tv.stdout.uu Wed Dec 21 11:13:29 2011 (r228763) @@ -1,4 +1,4 @@ -$FreeBSD: src/usr.bin/cpio/test/test_option_tv.stdout.uu,v 1.2 2008/11/29 20:22:02 kientzle Exp $ +$FreeBSD$ begin 644 test_option_tv.stdout M+7)W+7(M+7(M+2`@(#$@=&EM("`@("`@=&EM("`@("`@("`@("`@(#`@1&5C /(#,Q("`Q.38Y(&9I;&4* Modified: head/contrib/libarchive/cpio/test/test_option_y.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_option_y.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/test/test_option_y.c Wed Dec 21 11:13:29 2011 (r228763) @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_option_y.c,v 1.2 2008/08/24 06:21:00 kientzle Exp $"); +__FBSDID("$FreeBSD$"); DEFINE_TEST(test_option_y) { Modified: head/contrib/libarchive/cpio/test/test_passthrough_dotdot.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_passthrough_dotdot.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/test/test_passthrough_dotdot.c Wed Dec 21 11:13:29 2011 (r228763) @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_passthrough_dotdot.c,v 1.4 2008/08/24 06:21:00 kientzle Exp $"); +__FBSDID("$FreeBSD$"); /* * Verify that "cpio -p .." works. Modified: head/contrib/libarchive/cpio/test/test_passthrough_reverse.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_passthrough_reverse.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/cpio/test/test_passthrough_reverse.c Wed Dec 21 11:13:29 2011 (r228763) @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "test.h" -__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_passthrough_reverse.c,v 1.2 2008/08/24 06:21:00 kientzle Exp $"); +__FBSDID("$FreeBSD$"); /* * As reported by Bernd Walter: Some people are in the habit of Modified: head/contrib/libarchive/libarchive/archive.h ============================================================================== --- head/contrib/libarchive/libarchive/archive.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive.h Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libarchive/archive.h.in,v 1.50 2008/05/26 17:00:22 kientzle Exp $ + * $FreeBSD$ */ #ifndef ARCHIVE_H_INCLUDED Modified: head/contrib/libarchive/libarchive/archive_check_magic.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_check_magic.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_check_magic.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_check_magic.c 201089 2009-12-28 02:20:23Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_TYPES_H #include Modified: head/contrib/libarchive/libarchive/archive_crc32.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_crc32.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_crc32.h Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: head/lib/libarchive/archive_crc32.h 201102 2009-12-28 03:11:36Z kientzle $ + * $FreeBSD$ */ #ifndef __LIBARCHIVE_BUILD Modified: head/contrib/libarchive/libarchive/archive_endian.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_endian.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_endian.h Wed Dec 21 11:13:29 2011 (r228763) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: head/lib/libarchive/archive_endian.h 201085 2009-12-28 02:17:15Z kientzle $ + * $FreeBSD$ * * Borrowed from FreeBSD's */ Modified: head/contrib/libarchive/libarchive/archive_entry.3 ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry.3 Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_entry.3 Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libarchive/archive_entry.3,v 1.18 2008/05/26 17:00:22 kientzle Exp $ +.\" $FreeBSD$ .\" .Dd May 12, 2008 .Dt archive_entry 3 Modified: head/contrib/libarchive/libarchive/archive_entry.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_entry.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_entry.c 201096 2009-12-28 02:41:27Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include Modified: head/contrib/libarchive/libarchive/archive_entry.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_entry.h Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: head/lib/libarchive/archive_entry.h 201096 2009-12-28 02:41:27Z kientzle $ + * $FreeBSD$ */ #ifndef ARCHIVE_ENTRY_H_INCLUDED Modified: head/contrib/libarchive/libarchive/archive_entry_copy_stat.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry_copy_stat.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_entry_copy_stat.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_entry_copy_stat.c 189466 2009-03-07 00:52:02Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include Modified: head/contrib/libarchive/libarchive/archive_entry_link_resolver.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry_link_resolver.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_entry_link_resolver.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_entry_link_resolver.c 201100 2009-12-28 03:05:31Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include Modified: head/contrib/libarchive/libarchive/archive_entry_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry_private.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_entry_private.h Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: head/lib/libarchive/archive_entry_private.h 201096 2009-12-28 02:41:27Z kientzle $ + * $FreeBSD$ */ #ifndef __LIBARCHIVE_BUILD Modified: head/contrib/libarchive/libarchive/archive_entry_stat.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry_stat.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_entry_stat.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_entry_stat.c 201100 2009-12-28 03:05:31Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include Modified: head/contrib/libarchive/libarchive/archive_entry_strmode.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry_strmode.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_entry_strmode.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry_strmode.c,v 1.4 2008/06/15 05:14:01 kientzle Exp $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include Modified: head/contrib/libarchive/libarchive/archive_entry_xattr.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry_xattr.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_entry_xattr.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_entry_xattr.c 201096 2009-12-28 02:41:27Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include Modified: head/contrib/libarchive/libarchive/archive_hash.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_hash.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_hash.h Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: head/lib/libarchive/archive_hash.h 201171 2009-12-29 06:39:07Z kientzle $ + * $FreeBSD$ */ #ifndef __LIBARCHIVE_BUILD Modified: head/contrib/libarchive/libarchive/archive_platform.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_platform.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_platform.h Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: head/lib/libarchive/archive_platform.h 201090 2009-12-28 02:22:04Z kientzle $ + * $FreeBSD$ */ /* !!ONLY FOR USE INTERNALLY TO LIBARCHIVE!! */ Modified: head/contrib/libarchive/libarchive/archive_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_private.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_private.h Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: head/lib/libarchive/archive_private.h 201098 2009-12-28 02:58:14Z kientzle $ + * $FreeBSD$ */ #ifndef __LIBARCHIVE_BUILD Modified: head/contrib/libarchive/libarchive/archive_read.3 ============================================================================== --- head/contrib/libarchive/libarchive/archive_read.3 Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read.3 Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: head/lib/libarchive/archive_read.3 191595 2009-04-27 20:13:13Z kientzle $ +.\" $FreeBSD$ .\" .Dd April 13, 2009 .Dt archive_read 3 Modified: head/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read.c Wed Dec 21 11:13:29 2011 (r228763) @@ -32,7 +32,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read.c 201157 2009-12-29 05:30:23Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_read_data_into_fd.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_data_into_fd.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_data_into_fd.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_data_into_fd.c,v 1.16 2008/05/23 05:01:29 cperciva Exp $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_TYPES_H #include Modified: head/contrib/libarchive/libarchive/archive_read_disk.3 ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_disk.3 Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_disk.3 Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: head/lib/libarchive/archive_read_disk.3 190957 2009-04-12 05:04:02Z kientzle $ +.\" $FreeBSD$ .\" .Dd March 10, 2009 .Dt archive_read_disk 3 Modified: head/contrib/libarchive/libarchive/archive_read_disk.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_disk.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_disk.c Wed Dec 21 11:13:29 2011 (r228763) @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_disk.c 189429 2009-03-06 04:35:31Z kientzle $"); +__FBSDID("$FreeBSD$"); #include "archive.h" #include "archive_string.h" Modified: head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_disk_entry_from_file.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_disk_entry_from_file.c 201084 2009-12-28 02:14:09Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_TYPES_H /* Mac OSX requires sys/types.h before sys/acl.h. */ Modified: head/contrib/libarchive/libarchive/archive_read_disk_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_disk_private.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_disk_private.h Wed Dec 21 11:13:29 2011 (r228763) @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: head/lib/libarchive/archive_read_disk_private.h 201105 2009-12-28 03:20:54Z kientzle $ + * $FreeBSD$ */ #ifndef __LIBARCHIVE_BUILD Modified: head/contrib/libarchive/libarchive/archive_read_disk_set_standard_lookup.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_disk_set_standard_lookup.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_disk_set_standard_lookup.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_disk_set_standard_lookup.c 201109 2009-12-28 03:30:31Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_TYPES_H #include Modified: head/contrib/libarchive/libarchive/archive_read_extract.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_extract.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_extract.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_extract.c,v 1.61 2008/05/26 17:00:22 kientzle Exp $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_TYPES_H #include Modified: head/contrib/libarchive/libarchive/archive_read_open_fd.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_open_fd.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_open_fd.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_open_fd.c 201103 2009-12-28 03:13:49Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include Modified: head/contrib/libarchive/libarchive/archive_read_open_file.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_open_file.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_open_file.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_open_file.c 201093 2009-12-28 02:28:44Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include Modified: head/contrib/libarchive/libarchive/archive_read_open_filename.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_open_filename.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_open_filename.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_open_filename.c 201093 2009-12-28 02:28:44Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include Modified: head/contrib/libarchive/libarchive/archive_read_open_memory.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_open_memory.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_open_memory.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_open_memory.c,v 1.6 2007/07/06 15:51:59 kientzle Exp $"); +__FBSDID("$FreeBSD$"); #include #include Modified: head/contrib/libarchive/libarchive/archive_read_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_private.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_private.h Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: head/lib/libarchive/archive_read_private.h 201088 2009-12-28 02:18:55Z kientzle $ + * $FreeBSD$ */ #ifndef __LIBARCHIVE_BUILD Modified: head/contrib/libarchive/libarchive/archive_read_support_compression_all.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_compression_all.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_compression_all.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_compression_all.c 201248 2009-12-30 06:12:03Z kientzle $"); +__FBSDID("$FreeBSD$"); #include "archive.h" Modified: head/contrib/libarchive/libarchive/archive_read_support_compression_bzip2.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_compression_bzip2.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_compression_bzip2.c Wed Dec 21 11:13:29 2011 (r228763) @@ -25,7 +25,7 @@ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_compression_bzip2.c 201108 2009-12-28 03:28:21Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_read_support_compression_compress.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_compression_compress.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_compression_compress.c Wed Dec 21 11:13:29 2011 (r228763) @@ -64,7 +64,7 @@ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_compression_compress.c 201094 2009-12-28 02:29:21Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_read_support_compression_gzip.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_compression_gzip.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_compression_gzip.c Wed Dec 21 11:13:29 2011 (r228763) @@ -25,7 +25,7 @@ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_compression_gzip.c 201082 2009-12-28 02:05:28Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H Modified: head/contrib/libarchive/libarchive/archive_read_support_compression_none.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_compression_none.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_compression_none.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_compression_none.c 185679 2008-12-06 06:45:15Z kientzle $"); +__FBSDID("$FreeBSD$"); #include "archive.h" Modified: head/contrib/libarchive/libarchive/archive_read_support_compression_program.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_compression_program.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_compression_program.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_compression_program.c 201112 2009-12-28 06:59:35Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_WAIT_H # include Modified: head/contrib/libarchive/libarchive/archive_read_support_compression_uu.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_compression_uu.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_compression_uu.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_compression_uu.c 201248 2009-12-30 06:12:03Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_read_support_compression_xz.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_compression_xz.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_compression_xz.c Wed Dec 21 11:13:29 2011 (r228763) @@ -26,7 +26,7 @@ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_compression_xz.c 201167 2009-12-29 06:06:20Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_read_support_format_all.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_all.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_format_all.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_all.c 174991 2007-12-30 04:58:22Z kientzle $"); +__FBSDID("$FreeBSD$"); #include "archive.h" Modified: head/contrib/libarchive/libarchive/archive_read_support_format_ar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_ar.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_format_ar.c Wed Dec 21 11:13:29 2011 (r228763) @@ -26,7 +26,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_ar.c 201101 2009-12-28 03:06:27Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include Modified: head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_cpio.c 201163 2009-12-29 05:50:34Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_read_support_format_empty.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_empty.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_format_empty.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_empty.c 191524 2009-04-26 18:24:14Z kientzle $"); +__FBSDID("$FreeBSD$"); #include "archive.h" #include "archive_entry.h" Modified: head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Wed Dec 21 11:13:29 2011 (r228763) @@ -26,7 +26,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_iso9660.c 201246 2009-12-30 05:30:35Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_format_mtree.c Wed Dec 21 11:13:29 2011 (r228763) @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_mtree.c 201165 2009-12-29 05:52:13Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include Modified: head/contrib/libarchive/libarchive/archive_read_support_format_raw.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_raw.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_format_raw.c Wed Dec 21 11:13:29 2011 (r228763) @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_raw.c 201107 2009-12-28 03:25:33Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_read_support_format_tar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_tar.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_format_tar.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_tar.c 201161 2009-12-29 05:44:39Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_read_support_format_zip.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_zip.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_read_support_format_zip.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_read_support_format_zip.c 201102 2009-12-28 03:11:36Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_string.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_string.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_string.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_string.c 201095 2009-12-28 02:33:22Z kientzle $"); +__FBSDID("$FreeBSD$"); /* * Basic resizable string support, to simplify manipulating arbitrary-sized Modified: head/contrib/libarchive/libarchive/archive_string.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_string.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_string.h Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: head/lib/libarchive/archive_string.h 201092 2009-12-28 02:26:06Z kientzle $ + * $FreeBSD$ * */ Modified: head/contrib/libarchive/libarchive/archive_string_sprintf.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_string_sprintf.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_string_sprintf.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_string_sprintf.c 189435 2009-03-06 05:14:55Z kientzle $"); +__FBSDID("$FreeBSD$"); /* * The use of printf()-family functions can be troublesome Modified: head/contrib/libarchive/libarchive/archive_util.3 ============================================================================== --- head/contrib/libarchive/libarchive/archive_util.3 Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_util.3 Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: head/lib/libarchive/archive_util.3 201098 2009-12-28 02:58:14Z kientzle $ +.\" $FreeBSD$ .\" .Dd January 8, 2005 .Dt archive_util 3 Modified: head/contrib/libarchive/libarchive/archive_util.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_util.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_util.c Wed Dec 21 11:13:29 2011 (r228763) @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_util.c 201098 2009-12-28 02:58:14Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_TYPES_H #include Modified: head/contrib/libarchive/libarchive/archive_virtual.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_virtual.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_virtual.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_virtual.c 201098 2009-12-28 02:58:14Z kientzle $"); +__FBSDID("$FreeBSD$"); #include "archive.h" #include "archive_entry.h" Modified: head/contrib/libarchive/libarchive/archive_write.3 ============================================================================== --- head/contrib/libarchive/libarchive/archive_write.3 Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write.3 Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: head/lib/libarchive/archive_write.3 201110 2009-12-28 03:31:29Z kientzle $ +.\" $FreeBSD$ .\" .Dd May 11, 2008 .Dt archive_write 3 Modified: head/contrib/libarchive/libarchive/archive_write.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write.c 201099 2009-12-28 03:03:00Z kientzle $"); +__FBSDID("$FreeBSD$"); /* * This file contains the "essential" portions of the write API, that Modified: head/contrib/libarchive/libarchive/archive_write_disk.3 ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_disk.3 Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_disk.3 Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libarchive/archive_write_disk.3,v 1.4 2008/09/04 05:22:00 kientzle Exp $ +.\" $FreeBSD$ .\" .Dd August 5, 2008 .Dt archive_write_disk 3 Modified: head/contrib/libarchive/libarchive/archive_write_disk.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_disk.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_disk.c Wed Dec 21 11:13:29 2011 (r228763) @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_disk.c 201159 2009-12-29 05:35:40Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_TYPES_H #include Modified: head/contrib/libarchive/libarchive/archive_write_disk_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_disk_private.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_disk_private.h Wed Dec 21 11:13:29 2011 (r228763) @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: head/lib/libarchive/archive_write_disk_private.h 201086 2009-12-28 02:17:53Z kientzle $ + * $FreeBSD$ */ #ifndef __LIBARCHIVE_BUILD Modified: head/contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_disk_set_standard_lookup.c 201083 2009-12-28 02:09:57Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_TYPES_H #include Modified: head/contrib/libarchive/libarchive/archive_write_open_fd.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_open_fd.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_open_fd.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_open_fd.c 201093 2009-12-28 02:28:44Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include Modified: head/contrib/libarchive/libarchive/archive_write_open_file.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_open_file.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_open_file.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_open_file.c,v 1.19 2007/01/09 08:05:56 kientzle Exp $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include Modified: head/contrib/libarchive/libarchive/archive_write_open_filename.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_open_filename.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_open_filename.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_open_filename.c 191165 2009-04-17 00:39:35Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_STAT_H #include Modified: head/contrib/libarchive/libarchive/archive_write_open_memory.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_open_memory.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_open_memory.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_open_memory.c,v 1.3 2007/01/09 08:05:56 kientzle Exp $"); +__FBSDID("$FreeBSD$"); #include #include Modified: head/contrib/libarchive/libarchive/archive_write_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_private.h Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_private.h Wed Dec 21 11:13:29 2011 (r228763) @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: head/lib/libarchive/archive_write_private.h 201155 2009-12-29 05:20:12Z kientzle $ + * $FreeBSD$ */ #ifndef __LIBARCHIVE_BUILD Modified: head/contrib/libarchive/libarchive/archive_write_set_compression_bzip2.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_compression_bzip2.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_set_compression_bzip2.c Wed Dec 21 11:13:29 2011 (r228763) @@ -25,7 +25,7 @@ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_compression_bzip2.c 201091 2009-12-28 02:22:41Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_write_set_compression_compress.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_compression_compress.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_set_compression_compress.c Wed Dec 21 11:13:29 2011 (r228763) @@ -58,7 +58,7 @@ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_compression_compress.c 201111 2009-12-28 03:33:05Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_write_set_compression_gzip.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_compression_gzip.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_set_compression_gzip.c Wed Dec 21 11:13:29 2011 (r228763) @@ -25,7 +25,7 @@ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_compression_gzip.c 201081 2009-12-28 02:04:42Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_write_set_compression_none.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_compression_none.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_set_compression_none.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_compression_none.c 201080 2009-12-28 02:03:54Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_write_set_compression_program.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_compression_program.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_set_compression_program.c Wed Dec 21 11:13:29 2011 (r228763) @@ -25,7 +25,7 @@ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_compression_program.c 201104 2009-12-28 03:14:30Z kientzle $"); +__FBSDID("$FreeBSD$"); /* This capability is only available on POSIX systems. */ #if (!defined(HAVE_PIPE) || !defined(HAVE_FCNTL) || \ Modified: head/contrib/libarchive/libarchive/archive_write_set_compression_xz.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_compression_xz.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_set_compression_xz.c Wed Dec 21 11:13:29 2011 (r228763) @@ -26,7 +26,7 @@ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_compression_xz.c 201108 2009-12-28 03:28:21Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_write_set_format.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_set_format.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format.c 201168 2009-12-29 06:15:32Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_TYPES_H #include Modified: head/contrib/libarchive/libarchive/archive_write_set_format_ar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format_ar.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_set_format_ar.c Wed Dec 21 11:13:29 2011 (r228763) @@ -26,7 +26,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_ar.c 201108 2009-12-28 03:28:21Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_write_set_format_by_name.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format_by_name.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_set_format_by_name.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_by_name.c 201168 2009-12-29 06:15:32Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_SYS_TYPES_H #include Modified: head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c Wed Dec 21 11:13:29 2011 (r228763) @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_cpio.c 201170 2009-12-29 06:34:23Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c Wed Dec 21 11:13:29 2011 (r228763) @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: head/lib/libarchive/archive_write_set_format_cpio_newc.c 201160 2009-12-29 05:41:57Z kientzle $"); +__FBSDID("$FreeBSD$"); #ifdef HAVE_ERRNO_H #include Modified: head/contrib/libarchive/libarchive/archive_write_set_format_mtree.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format_mtree.c Wed Dec 21 11:11:51 2011 (r228762) +++ head/contrib/libarchive/libarchive/archive_write_set_format_mtree.c Wed Dec 21 11:13:29 2011 (r228763) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 11:18:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00D5B106564A; Wed, 21 Dec 2011 11:18:50 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E29078FC1A; Wed, 21 Dec 2011 11:18:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLBInBp066136; Wed, 21 Dec 2011 11:18:49 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLBInRn066135; Wed, 21 Dec 2011 11:18:49 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112211118.pBLBInRn066135@svn.freebsd.org> From: Martin Matuska Date: Wed, 21 Dec 2011 11:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228764 - in head/contrib/libarchive: . build contrib cpio cpio/test doc examples libarchive libarchive/test tar tar/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 11:18:50 -0000 Author: mm Date: Wed Dec 21 11:18:49 2011 New Revision: 228764 URL: http://svn.freebsd.org/changeset/base/228764 Log: Strip unnecessary files and directories from contrib/libarchive according to FREEBSD-Xlist MFC after: 2 weeks Deleted: head/contrib/libarchive/CMakeLists.txt head/contrib/libarchive/CTestConfig.cmake head/contrib/libarchive/INSTALL head/contrib/libarchive/Makefile.am head/contrib/libarchive/build/ head/contrib/libarchive/configure.ac head/contrib/libarchive/contrib/ head/contrib/libarchive/cpio/CMakeLists.txt head/contrib/libarchive/cpio/cpio_windows.c head/contrib/libarchive/cpio/cpio_windows.h head/contrib/libarchive/cpio/test/CMakeLists.txt head/contrib/libarchive/doc/ head/contrib/libarchive/examples/ head/contrib/libarchive/libarchive/CMakeLists.txt head/contrib/libarchive/libarchive/archive_windows.c head/contrib/libarchive/libarchive/archive_windows.h head/contrib/libarchive/libarchive/filter_fork_windows.c head/contrib/libarchive/libarchive/test/.cvsignore head/contrib/libarchive/libarchive/test/CMakeLists.txt head/contrib/libarchive/tar/CMakeLists.txt head/contrib/libarchive/tar/bsdtar_windows.c head/contrib/libarchive/tar/bsdtar_windows.h head/contrib/libarchive/tar/test/CMakeLists.txt head/contrib/libarchive/tar/test/test_windows.c From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 11:49:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A95D106564A; Wed, 21 Dec 2011 11:49:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 887888FC19; Wed, 21 Dec 2011 11:49:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLBnXLE067082; Wed, 21 Dec 2011 11:49:33 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLBnXDc067080; Wed, 21 Dec 2011 11:49:33 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201112211149.pBLBnXDc067080@svn.freebsd.org> From: Andriy Gapon Date: Wed, 21 Dec 2011 11:49:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228765 - head/sys/dev/usb/input X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 11:49:33 -0000 Author: avg Date: Wed Dec 21 11:49:33 2011 New Revision: 228765 URL: http://svn.freebsd.org/changeset/base/228765 Log: ukbd: adjust for SCHEDULER_STOPPED() and overhaul locking code This change is designed to let USB keyboard work in the panic context with stop_scheduler_on_panic=1. Most of change consists of removing mtx_owned() checks where they can be easily avoided. Some additional lock cleanup is performed along the way. A list of the smaller changes: - newbus methods should be executed with Giant already held, just assert this - kbd methods called in the non-polling context should be executed with Giant already held, just assert this - Giant is recursive, so we should just take it where we must have it, without redundant checks if we already have it - thanks to recent syscons changes we don't need to go through the hoops to detect if kernel is going to poll us; polling mode is now clearly separated from non-polling mode - at present the polling mode can be entered by only one thread - document special cases in greater detail Please note that the ukbd code and underlying USB code still lve dangerously in the kdb context by trying to obtain various locks including the Giant. If any of those locks are already held by the stopped threads, then the things would blow up. Another limitation of the ukbd driver is that it is detached before a system enters the halt state. With this commit we can enable kern.stop_scheduler_on_panic by default, that should not introduce any regressions. Reviewed by: hselasky MFC after: 3 months X-MFC after: r228424, r228760 Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Wed Dec 21 11:18:49 2011 (r228764) +++ head/sys/dev/usb/input/ukbd.c Wed Dec 21 11:49:33 2011 (r228765) @@ -198,7 +198,6 @@ struct ukbd_softc { int sc_mode; /* input mode (K_XLATE,K_RAW,K_CODE) */ int sc_state; /* shift/lock key state */ int sc_accents; /* accent key index (> 0) */ - int sc_poll_tick_last; int sc_led_size; int sc_kbd_size; @@ -227,7 +226,6 @@ struct ukbd_softc { uint8_t sc_id_events; uint8_t sc_kbd_id; - uint8_t sc_poll_detected; uint8_t sc_buffer[UKBD_BUFFER_SIZE]; }; @@ -247,6 +245,33 @@ struct ukbd_softc { SCAN_PREFIX_CTL | SCAN_PREFIX_SHIFT) #define SCAN_CHAR(c) ((c) & 0x7f) +#define UKBD_LOCK() mtx_lock(&Giant) +#define UKBD_UNLOCK() mtx_unlock(&Giant) + +#ifdef INVARIANTS + +/* + * Assert that the lock is held in all contexts + * where the code can be executed. + */ +#define UKBD_LOCK_ASSERT() mtx_assert(&Giant, MA_OWNED) + +/* + * Assert that the lock is held in the contexts + * where it really has to be so. + */ +#define UKBD_CTX_LOCK_ASSERT() \ + do { \ + if (!kdb_active && panicstr == NULL) \ + mtx_assert(&Giant, MA_OWNED); \ + } while (0) +#else + +#define UKBD_LOCK_ASSERT() (void)0 +#define UKBD_CTX_LOCK_ASSERT() (void)0 + +#endif + struct ukbd_mods { uint32_t mask, key; }; @@ -339,8 +364,6 @@ static int ukbd_ioctl(keyboard_t *, u_lo static int ukbd_enable(keyboard_t *); static int ukbd_disable(keyboard_t *); static void ukbd_interrupt(struct ukbd_softc *); -static int ukbd_is_polling(struct ukbd_softc *); -static int ukbd_polls_other_thread(struct ukbd_softc *); static void ukbd_event_keyinput(struct ukbd_softc *); static device_probe_t ukbd_probe; @@ -370,7 +393,8 @@ ukbd_start_timer(struct ukbd_softc *sc) static void ukbd_put_key(struct ukbd_softc *sc, uint32_t key) { - mtx_assert(&Giant, MA_OWNED); + + UKBD_CTX_LOCK_ASSERT(); DPRINTF("0x%02x (%d) %s\n", key, key, (key & KEY_RELEASE) ? "released" : "pressed"); @@ -388,52 +412,32 @@ ukbd_put_key(struct ukbd_softc *sc, uint } static void -ukbd_yield(void) -{ - struct thread *td = curthread; - uint32_t old_prio; - - DROP_GIANT(); - - thread_lock(td); - - /* get current priority */ - old_prio = td->td_base_pri; - - /* set new priority */ - sched_prio(td, td->td_user_pri); - - /* cause a task switch */ - mi_switch(SW_INVOL | SWT_RELINQUISH, NULL); - - /* restore priority */ - sched_prio(td, old_prio); - - thread_unlock(td); - - PICKUP_GIANT(); -} - -static void ukbd_do_poll(struct ukbd_softc *sc, uint8_t wait) { - DPRINTFN(2, "polling\n"); - /* update stats about last polling event */ - sc->sc_poll_tick_last = ticks; - sc->sc_poll_detected = 1; + UKBD_CTX_LOCK_ASSERT(); + KASSERT((sc->sc_flags & UKBD_FLAG_POLLING) != 0, + ("ukbd_do_poll called when not polling\n")); + DPRINTFN(2, "polling\n"); - if (kdb_active == 0) { + if (!kdb_active && !SCHEDULER_STOPPED()) { + /* + * In this context the kernel is polling for input, + * but the USB subsystem works in normal interrupt-driven + * mode, so we just wait on the USB threads to do the job. + * Note that we currently hold the Giant, but it's also used + * as the transfer mtx, so we must release it while waiting. + */ while (sc->sc_inputs == 0) { - - /* give USB threads a chance to run */ - ukbd_yield(); - - /* check if we should wait */ + /* + * Give USB threads a chance to run. Note that + * kern_yield performs DROP_GIANT + PICKUP_GIANT. + */ + kern_yield(PRI_UNCHANGED); if (!wait) break; } - return; /* Only poll if KDB is active */ + return; } while (sc->sc_inputs == 0) { @@ -441,7 +445,6 @@ ukbd_do_poll(struct ukbd_softc *sc, uint usbd_transfer_poll(sc->sc_xfer, UKBD_N_TRANSFER); /* Delay-optimised support for repetition of keys */ - if (ukbd_any_key_pressed(sc)) { /* a key is pressed - need timekeeping */ DELAY(1000); @@ -462,16 +465,16 @@ ukbd_get_key(struct ukbd_softc *sc, uint { int32_t c; - mtx_assert(&Giant, MA_OWNED); + UKBD_CTX_LOCK_ASSERT(); + KASSERT((!kdb_active && !SCHEDULER_STOPPED()) + || (sc->sc_flags & UKBD_FLAG_POLLING) != 0, + ("not polling in kdb or panic\n")); if (sc->sc_inputs == 0) { /* start transfer, if not already started */ usbd_transfer_start(sc->sc_xfer[UKBD_INTR_DT]); } - if (ukbd_polls_other_thread(sc)) - return (-1); - if (sc->sc_flags & UKBD_FLAG_POLLING) ukbd_do_poll(sc, wait); @@ -499,6 +502,8 @@ ukbd_interrupt(struct ukbd_softc *sc) uint8_t i; uint8_t j; + UKBD_CTX_LOCK_ASSERT(); + if (sc->sc_ndata.keycode[0] == KEY_ERROR) return; @@ -584,7 +589,9 @@ ukbd_event_keyinput(struct ukbd_softc *s { int c; - if (ukbd_is_polling(sc)) + UKBD_CTX_LOCK_ASSERT(); + + if ((sc->sc_flags & UKBD_FLAG_POLLING) != 0) return; if (sc->sc_inputs == 0) @@ -608,7 +615,7 @@ ukbd_timeout(void *arg) { struct ukbd_softc *sc = arg; - mtx_assert(&Giant, MA_OWNED); + UKBD_LOCK_ASSERT(); sc->sc_time_ms += 25; /* milliseconds */ @@ -656,6 +663,8 @@ ukbd_intr_callback(struct usb_xfer *xfer uint8_t id; int len; + UKBD_LOCK_ASSERT(); + usbd_xfer_status(xfer, &len, NULL, NULL, NULL); pc = usbd_xfer_get_frame(xfer, 0); @@ -842,6 +851,8 @@ ukbd_set_leds_callback(struct usb_xfer * uint8_t any; int len; + UKBD_LOCK_ASSERT(); + #ifdef USB_DEBUG if (ukbd_no_leds) return; @@ -972,6 +983,7 @@ ukbd_probe(device_t dev) int error; uint16_t d_len; + UKBD_LOCK_ASSERT(); DPRINTFN(11, "\n"); if (sw == NULL) { @@ -998,7 +1010,7 @@ ukbd_probe(device_t dev) if (error) return (ENXIO); - /* + /* * NOTE: we currently don't support USB mouse and USB keyboard * on the same USB endpoint. */ @@ -1165,6 +1177,8 @@ ukbd_attach(device_t dev) uint16_t n; uint16_t hid_len; + UKBD_LOCK_ASSERT(); + kbd_init_struct(kbd, UKBD_DRIVER_NAME, KB_OTHER, unit, 0, 0, 0); kbd->kb_data = (void *)sc; @@ -1241,14 +1255,10 @@ ukbd_attach(device_t dev) /* ignore if SETIDLE fails, hence it is not crucial */ usbd_req_set_idle(sc->sc_udev, NULL, sc->sc_iface_index, 0, 0); - mtx_lock(&Giant); - ukbd_ioctl(kbd, KDSETLED, (caddr_t)&sc->sc_state); KBD_INIT_DONE(kbd); - mtx_unlock(&Giant); - if (kbd_register(kbd) < 0) { goto detach; } @@ -1266,15 +1276,10 @@ ukbd_attach(device_t dev) if (bootverbose) { genkbd_diag(kbd, bootverbose); } - /* lock keyboard mutex */ - - mtx_lock(&Giant); /* start the keyboard */ - usbd_transfer_start(sc->sc_xfer[UKBD_INTR_DT]); - mtx_unlock(&Giant); return (0); /* success */ detach: @@ -1288,9 +1293,9 @@ ukbd_detach(device_t dev) struct ukbd_softc *sc = device_get_softc(dev); int error; - DPRINTF("\n"); + UKBD_LOCK_ASSERT(); - mtx_lock(&Giant); + DPRINTF("\n"); sc->sc_flags |= UKBD_FLAG_GONE; @@ -1318,8 +1323,6 @@ ukbd_detach(device_t dev) } sc->sc_kbd.kb_flags = 0; - mtx_unlock(&Giant); - usbd_transfer_unsetup(sc->sc_xfer, UKBD_N_TRANSFER); usb_callout_drain(&sc->sc_callout); @@ -1335,12 +1338,10 @@ ukbd_resume(device_t dev) { struct ukbd_softc *sc = device_get_softc(dev); - mtx_lock(&Giant); + UKBD_LOCK_ASSERT(); ukbd_clear_state(&sc->sc_kbd); - mtx_unlock(&Giant); - return (0); } @@ -1400,15 +1401,11 @@ ukbd_lock(keyboard_t *kbd, int lock) static int ukbd_enable(keyboard_t *kbd) { - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - int retval; - mtx_lock(&Giant); - retval = ukbd_enable(kbd); - mtx_unlock(&Giant); - return (retval); - } + + UKBD_LOCK(); KBD_ACTIVATE(kbd); + UKBD_UNLOCK(); + return (0); } @@ -1416,44 +1413,24 @@ ukbd_enable(keyboard_t *kbd) static int ukbd_disable(keyboard_t *kbd) { - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - int retval; - mtx_lock(&Giant); - retval = ukbd_disable(kbd); - mtx_unlock(&Giant); - return (retval); - } + + UKBD_LOCK(); KBD_DEACTIVATE(kbd); + UKBD_UNLOCK(); + return (0); } /* check if data is waiting */ +/* Currently unused. */ static int ukbd_check(keyboard_t *kbd) { struct ukbd_softc *sc = kbd->kb_data; - if (!KBD_IS_ACTIVE(kbd)) - return (0); + UKBD_CTX_LOCK_ASSERT(); - if (sc->sc_flags & UKBD_FLAG_POLLING) { - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - int retval; - mtx_lock(&Giant); - retval = ukbd_check(kbd); - mtx_unlock(&Giant); - return (retval); - } - } else { - /* XXX the keyboard layer requires Giant */ - if (!mtx_owned(&Giant)) - return (0); - } - - /* check if key belongs to this thread */ - if (ukbd_polls_other_thread(sc)) + if (!KBD_IS_ACTIVE(kbd)) return (0); if (sc->sc_flags & UKBD_FLAG_POLLING) @@ -1472,30 +1449,13 @@ ukbd_check(keyboard_t *kbd) /* check if char is waiting */ static int -ukbd_check_char(keyboard_t *kbd) +ukbd_check_char_locked(keyboard_t *kbd) { struct ukbd_softc *sc = kbd->kb_data; - if (!KBD_IS_ACTIVE(kbd)) - return (0); + UKBD_CTX_LOCK_ASSERT(); - if (sc->sc_flags & UKBD_FLAG_POLLING) { - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - int retval; - mtx_lock(&Giant); - retval = ukbd_check_char(kbd); - mtx_unlock(&Giant); - return (retval); - } - } else { - /* XXX the keyboard layer requires Giant */ - if (!mtx_owned(&Giant)) - return (0); - } - - /* check if key belongs to this thread */ - if (ukbd_polls_other_thread(sc)) + if (!KBD_IS_ACTIVE(kbd)) return (0); if ((sc->sc_composed_char > 0) && @@ -1505,39 +1465,34 @@ ukbd_check_char(keyboard_t *kbd) return (ukbd_check(kbd)); } +static int +ukbd_check_char(keyboard_t *kbd) +{ + int result; + + UKBD_LOCK(); + result = ukbd_check_char_locked(kbd); + UKBD_UNLOCK(); + + return (result); +} /* read one byte from the keyboard if it's allowed */ +/* Currently unused. */ static int ukbd_read(keyboard_t *kbd, int wait) { struct ukbd_softc *sc = kbd->kb_data; int32_t usbcode; - #ifdef UKBD_EMULATE_ATSCANCODE uint32_t keycode; uint32_t scancode; #endif - if (!KBD_IS_ACTIVE(kbd)) - return (-1); - if (sc->sc_flags & UKBD_FLAG_POLLING) { - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - int retval; - mtx_lock(&Giant); - retval = ukbd_read(kbd, wait); - mtx_unlock(&Giant); - return (retval); - } - } else { - /* XXX the keyboard layer requires Giant */ - if (!mtx_owned(&Giant)) - return (-1); - } + UKBD_CTX_LOCK_ASSERT(); - /* check if key belongs to this thread */ - if (ukbd_polls_other_thread(sc)) + if (!KBD_IS_ACTIVE(kbd)) return (-1); #ifdef UKBD_EMULATE_ATSCANCODE @@ -1574,38 +1529,19 @@ ukbd_read(keyboard_t *kbd, int wait) /* read char from the keyboard */ static uint32_t -ukbd_read_char(keyboard_t *kbd, int wait) +ukbd_read_char_locked(keyboard_t *kbd, int wait) { struct ukbd_softc *sc = kbd->kb_data; uint32_t action; uint32_t keycode; int32_t usbcode; - #ifdef UKBD_EMULATE_ATSCANCODE uint32_t scancode; - #endif - if (!KBD_IS_ACTIVE(kbd)) - return (NOKEY); - - if (sc->sc_flags & UKBD_FLAG_POLLING) { - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - int retval; - mtx_lock(&Giant); - retval = ukbd_read_char(kbd, wait); - mtx_unlock(&Giant); - return (retval); - } - } else { - /* XXX the keyboard layer requires Giant */ - if (!mtx_owned(&Giant)) - return (NOKEY); - } + UKBD_CTX_LOCK_ASSERT(); - /* check if key belongs to this thread */ - if (ukbd_polls_other_thread(sc)) + if (!KBD_IS_ACTIVE(kbd)) return (NOKEY); next_code: @@ -1782,39 +1718,32 @@ errkey: return (ERRKEY); } +/* Currently wait is always false. */ +static uint32_t +ukbd_read_char(keyboard_t *kbd, int wait) +{ + uint32_t keycode; + + UKBD_LOCK(); + keycode = ukbd_read_char_locked(kbd, wait); + UKBD_UNLOCK(); + + return (keycode); +} + /* some useful control functions */ static int -ukbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) +ukbd_ioctl_locked(keyboard_t *kbd, u_long cmd, caddr_t arg) { struct ukbd_softc *sc = kbd->kb_data; int i; - #if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \ defined(COMPAT_FREEBSD4) || defined(COMPAT_43) int ival; #endif - if (!mtx_owned(&Giant)) { - /* - * XXX big problem: If scroll lock is pressed and "printf()" - * is called, the CPU will get here, to un-scroll lock the - * keyboard. But if "printf()" acquires the "Giant" lock, - * there will be a locking order reversal problem, so the - * keyboard system must get out of "Giant" first, before the - * CPU can proceed here ... - */ - switch (cmd) { - case KDGKBMODE: - case KDSKBMODE: - /* workaround for Geli */ - mtx_lock(&Giant); - i = ukbd_ioctl(kbd, cmd, arg); - mtx_unlock(&Giant); - return (i); - default: - return (EINVAL); - } - } + + UKBD_LOCK_ASSERT(); switch (cmd) { case KDGKBMODE: /* get keyboard mode */ @@ -1839,7 +1768,7 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, case K_RAW: case K_CODE: if (sc->sc_mode != *(int *)arg) { - if (ukbd_is_polling(sc) == 0) + if ((sc->sc_flags & UKBD_FLAG_POLLING) == 0) ukbd_clear_state(kbd); sc->sc_mode = *(int *)arg; } @@ -1943,19 +1872,44 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, return (0); } +static int +ukbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) +{ + int result; + + /* + * XXX KDGKBSTATE, KDSKBSTATE and KDSETLED can be called from any + * context where printf(9) can be called, which among other things + * includes interrupt filters and threads with any kinds of locks + * already held. For this reason it would be dangerous to acquire + * the Giant here unconditionally. On the other hand we have to + * have it to handle the ioctl. + * So we make our best effort to auto-detect whether we can grab + * the Giant or not. Blame syscons(4) for this. + */ + switch (cmd) { + case KDGKBSTATE: + case KDSKBSTATE: + case KDSETLED: + if (!mtx_owned(&Giant) && !SCHEDULER_STOPPED()) + return (EDEADLK); /* best I could come up with */ + /* FALLTHROUGH */ + default: + UKBD_LOCK(); + result = ukbd_ioctl_locked(kbd, cmd, arg); + UKBD_UNLOCK(); + return (result); + } +} + + /* clear the internal state of the keyboard */ static void ukbd_clear_state(keyboard_t *kbd) { struct ukbd_softc *sc = kbd->kb_data; - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - mtx_lock(&Giant); - ukbd_clear_state(kbd); - mtx_unlock(&Giant); - return; - } + UKBD_CTX_LOCK_ASSERT(); sc->sc_flags &= ~(UKBD_FLAG_COMPOSE | UKBD_FLAG_POLLING); sc->sc_state &= LOCK_MASK; /* preserve locking key state */ @@ -1986,43 +1940,11 @@ ukbd_set_state(keyboard_t *kbd, void *bu } static int -ukbd_is_polling(struct ukbd_softc *sc) -{ - int delta; - - if (sc->sc_flags & UKBD_FLAG_POLLING) - return (1); /* polling */ - - delta = ticks - sc->sc_poll_tick_last; - if ((delta < 0) || (delta >= hz)) { - sc->sc_poll_detected = 0; - return (0); /* not polling */ - } - - return (sc->sc_poll_detected); -} - -static int -ukbd_polls_other_thread(struct ukbd_softc *sc) -{ - return (ukbd_is_polling(sc) && - (sc->sc_poll_thread != curthread)); -} - -static int ukbd_poll(keyboard_t *kbd, int on) { struct ukbd_softc *sc = kbd->kb_data; - if (!mtx_owned(&Giant)) { - /* XXX cludge */ - int retval; - mtx_lock(&Giant); - retval = ukbd_poll(kbd, on); - mtx_unlock(&Giant); - return (retval); - } - + UKBD_LOCK(); if (on) { sc->sc_flags |= UKBD_FLAG_POLLING; sc->sc_poll_thread = curthread; @@ -2030,6 +1952,8 @@ ukbd_poll(keyboard_t *kbd, int on) sc->sc_flags &= ~UKBD_FLAG_POLLING; ukbd_start_timer(sc); /* start timer */ } + UKBD_UNLOCK(); + return (0); } @@ -2038,6 +1962,8 @@ ukbd_poll(keyboard_t *kbd, int on) static void ukbd_set_leds(struct ukbd_softc *sc, uint8_t leds) { + + UKBD_LOCK_ASSERT(); DPRINTF("leds=0x%02x\n", leds); sc->sc_leds = leds; From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 12:07:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E959106566B; Wed, 21 Dec 2011 12:07:15 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D8C48FC1B; Wed, 21 Dec 2011 12:07:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLC7F9N067650; Wed, 21 Dec 2011 12:07:15 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLC7FRX067647; Wed, 21 Dec 2011 12:07:15 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201112211207.pBLC7FRX067647@svn.freebsd.org> From: Gabor Kovesdan Date: Wed, 21 Dec 2011 12:07:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228766 - head/usr.bin/mkesdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 12:07:15 -0000 Author: gabor Date: Wed Dec 21 12:07:14 2011 New Revision: 228766 URL: http://svn.freebsd.org/changeset/base/228766 Log: - Remove a GCC-specific compiler flag that was added before to eliminate some warnings but at the moment does not seem to be necessary. Submitted by: arundel (via private mail) Tested by: arundel MFC after: 1 week Modified: head/usr.bin/mkesdb/Makefile.inc Modified: head/usr.bin/mkesdb/Makefile.inc ============================================================================== --- head/usr.bin/mkesdb/Makefile.inc Wed Dec 21 11:49:33 2011 (r228765) +++ head/usr.bin/mkesdb/Makefile.inc Wed Dec 21 12:07:14 2011 (r228766) @@ -2,5 +2,4 @@ SRCS+= lex.l yacc.y CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mkesdb \ - -I${.CURDIR}/../../lib/libc/iconv \ - --param max-inline-insns-single=64 + -I${.CURDIR}/../../lib/libc/iconv From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 12:21:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F308106566B; Wed, 21 Dec 2011 12:21:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E0D58FC08; Wed, 21 Dec 2011 12:21:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLCLMqE068140; Wed, 21 Dec 2011 12:21:22 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLCLMmN068138; Wed, 21 Dec 2011 12:21:22 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201112211221.pBLCLMmN068138@svn.freebsd.org> From: Andriy Gapon Date: Wed, 21 Dec 2011 12:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228767 - head/sys/dev/syscons X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 12:21:22 -0000 Author: avg Date: Wed Dec 21 12:21:22 2011 New Revision: 228767 URL: http://svn.freebsd.org/changeset/base/228767 Log: sc_cngrab: switch to console vty when possible In the future we may want to perform the switch even if the console is currently in the graphics mode by trying to reset the video adapter first (e.g. by executing vesa/vga bios post). That would probably require some sort of a one-way flag as returning the control of the console back to the interrupted application most likely would result in a mess. Reviewed by: emaste MFC after: 2 months Modified: head/sys/dev/syscons/syscons.c Modified: head/sys/dev/syscons/syscons.c ============================================================================== --- head/sys/dev/syscons/syscons.c Wed Dec 21 12:07:14 2011 (r228766) +++ head/sys/dev/syscons/syscons.c Wed Dec 21 12:21:22 2011 (r228767) @@ -1615,7 +1615,14 @@ sc_cngrab(struct consdev *cp) { scr_stat *scp; + if (!cold && + sc_console->sc->cur_scp->index != sc_console->index && + sc_console->sc->cur_scp->smode.mode == VT_AUTO && + sc_console->smode.mode == VT_AUTO) + sc_switch_scr(sc_console->sc, sc_console->index); + scp = sc_console->sc->cur_scp; + if (scp->sc->kbd == NULL) return; From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 12:39:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A32D5106566C; Wed, 21 Dec 2011 12:39:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90AD38FC08; Wed, 21 Dec 2011 12:39:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLCd9gU068776; Wed, 21 Dec 2011 12:39:09 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLCd9YJ068770; Wed, 21 Dec 2011 12:39:09 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112211239.pBLCd9YJ068770@svn.freebsd.org> From: Gleb Smirnoff Date: Wed, 21 Dec 2011 12:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228768 - in head/sys: net netinet netinet6 sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 12:39:09 -0000 Author: glebius Date: Wed Dec 21 12:39:08 2011 New Revision: 228768 URL: http://svn.freebsd.org/changeset/base/228768 Log: Provide ABI compatibility shim to enable configuring of addresses with ifconfig(8) prior to r228571. Requested by: brooks Modified: head/sys/net/if.h head/sys/netinet/in.c head/sys/netinet6/in6.c head/sys/netinet6/in6_var.h head/sys/sys/sockio.h Modified: head/sys/net/if.h ============================================================================== --- head/sys/net/if.h Wed Dec 21 12:21:22 2011 (r228767) +++ head/sys/net/if.h Wed Dec 21 12:39:08 2011 (r228768) @@ -362,6 +362,14 @@ struct ifaliasreq { int ifra_vhid; }; +/* Compat with pre-10.x */ +struct oifaliasreq { + char ifra_name[IFNAMSIZ]; + struct sockaddr ifra_addr; + struct sockaddr ifra_broadaddr; + struct sockaddr ifra_mask; +}; + struct ifmediareq { char ifm_name[IFNAMSIZ]; /* if name, e.g. "en0" */ int ifm_current; /* current media options */ Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Wed Dec 21 12:21:22 2011 (r228767) +++ head/sys/netinet/in.c Wed Dec 21 12:39:08 2011 (r228768) @@ -223,6 +223,14 @@ in_control(struct socket *so, u_long cmd struct sockaddr_in oldaddr; int error, hostIsNew, iaIsNew, maskIsNew; int iaIsFirst; + u_long ocmd = cmd; + + /* + * Pre-10.x compat: OSIOCAIFADDR passes a shorter + * struct in_aliasreq, without ifra_vhid. + */ + if (cmd == OSIOCAIFADDR) + cmd = SIOCAIFADDR; ia = NULL; iaIsFirst = 0; @@ -253,10 +261,18 @@ in_control(struct socket *so, u_long cmd sizeof(struct sockaddr_in) || ifra->ifra_broadaddr.sin_family != AF_INET)) return (EINVAL); +#if 0 + /* + * ifconfig(8) in pre-10.x doesn't set sin_family for the + * mask. The code is disabled for the 10.x timeline, to + * make SIOCAIFADDR compatible with 9.x ifconfig(8). + * The code should be enabled in 11.x + */ if (ifra->ifra_mask.sin_len != 0 && (ifra->ifra_mask.sin_len != sizeof(struct sockaddr_in) || ifra->ifra_mask.sin_family != AF_INET)) return (EINVAL); +#endif break; case SIOCSIFADDR: case SIOCSIFBRDADDR: @@ -564,7 +580,7 @@ in_control(struct socket *so, u_long cmd } if (hostIsNew || maskIsNew) error = in_ifinit(ifp, ia, &ifra->ifra_addr, 0, - maskIsNew, ifra->ifra_vhid); + maskIsNew, (ocmd == cmd ? ifra->ifra_vhid : 0)); if (error != 0 && iaIsNew) break; Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Wed Dec 21 12:21:22 2011 (r228767) +++ head/sys/netinet6/in6.c Wed Dec 21 12:39:08 2011 (r228768) @@ -275,6 +275,13 @@ in6_control(struct socket *so, u_long cm struct sockaddr_in6 *sa6; int carp_attached = 0; int error; + u_long ocmd = cmd; + + /* + * Compat to make pre-10.x ifconfig(8) operable. + */ + if (cmd == OSIOCAIFADDR_IN6) + cmd = SIOCAIFADDR_IN6; switch (cmd) { case SIOCGETSGCNT_IN6: @@ -654,7 +661,7 @@ in6_control(struct socket *so, u_long cm break; } - if (ifra->ifra_vhid > 0) { + if (cmd == ocmd && ifra->ifra_vhid > 0) { if (carp_attach_p != NULL) error = (*carp_attach_p)(&ia->ia_ifa, ifra->ifra_vhid); Modified: head/sys/netinet6/in6_var.h ============================================================================== --- head/sys/netinet6/in6_var.h Wed Dec 21 12:21:22 2011 (r228767) +++ head/sys/netinet6/in6_var.h Wed Dec 21 12:39:08 2011 (r228768) @@ -290,6 +290,16 @@ struct in6_aliasreq { int ifra_vhid; }; +/* pre-10.x compat */ +struct oin6_aliasreq { + char ifra_name[IFNAMSIZ]; + struct sockaddr_in6 ifra_addr; + struct sockaddr_in6 ifra_dstaddr; + struct sockaddr_in6 ifra_prefixmask; + int ifra_flags; + struct in6_addrlifetime ifra_lifetime; +}; + /* prefix type macro */ #define IN6_PREFIX_ND 1 #define IN6_PREFIX_RR 2 @@ -410,7 +420,8 @@ struct in6_rrenumreq { #define SIOCGIFNETMASK_IN6 _IOWR('i', 37, struct in6_ifreq) #define SIOCDIFADDR_IN6 _IOW('i', 25, struct in6_ifreq) -#define SIOCAIFADDR_IN6 _IOW('i', 26, struct in6_aliasreq) +#define OSIOCAIFADDR_IN6 _IOW('i', 26, struct oin6_aliasreq) +#define SIOCAIFADDR_IN6 _IOW('i', 27, struct in6_aliasreq) #define SIOCSIFPHYADDR_IN6 _IOW('i', 70, struct in6_aliasreq) #define SIOCGIFPSRCADDR_IN6 _IOWR('i', 71, struct in6_ifreq) Modified: head/sys/sys/sockio.h ============================================================================== --- head/sys/sys/sockio.h Wed Dec 21 12:21:22 2011 (r228767) +++ head/sys/sys/sockio.h Wed Dec 21 12:39:08 2011 (r228768) @@ -68,8 +68,7 @@ #define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */ #define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */ #define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */ -#define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */ - +#define OSIOCAIFADDR _IOW('i', 26, struct oifaliasreq)/* add/chg IF alias */ #define SIOCALIFADDR _IOW('i', 27, struct if_laddrreq) /* add IF addr */ #define SIOCGLIFADDR _IOWR('i', 28, struct if_laddrreq) /* get IF addr */ #define SIOCDLIFADDR _IOW('i', 29, struct if_laddrreq) /* delete IF addr */ @@ -81,6 +80,7 @@ #define SIOCSIFNAME _IOW('i', 40, struct ifreq) /* set IF name */ #define SIOCSIFDESCR _IOW('i', 41, struct ifreq) /* set ifnet descr */ #define SIOCGIFDESCR _IOWR('i', 42, struct ifreq) /* get ifnet descr */ +#define SIOCAIFADDR _IOW('i', 43, struct ifaliasreq)/* add/chg IF alias */ #define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */ #define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 12:46:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EA621065670; Wed, 21 Dec 2011 12:46:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id F21A58FC0C; Wed, 21 Dec 2011 12:46:00 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id A70B746B06; Wed, 21 Dec 2011 07:46:00 -0500 (EST) Received: from John-Baldwins-MacBook-Air.local (unknown [50.128.51.150]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D0B31B99D; Wed, 21 Dec 2011 07:45:59 -0500 (EST) Message-ID: <4EF1D507.7040402@FreeBSD.org> Date: Wed, 21 Dec 2011 07:45:59 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Doug Barton References: <201111291946.pATJkHMs064094@svn.freebsd.org> <20111220171740.X1005@besplex.bde.org> <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> <201112200908.57306.jhb@freebsd.org> <4EF13F23.9060601@FreeBSD.org> In-Reply-To: <4EF13F23.9060601@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 21 Dec 2011 07:46:00 -0500 (EST) X-Mailman-Approved-At: Wed, 21 Dec 2011 12:49:50 +0000 Cc: src-committers@freebsd.org, Garrett Cooper , Max Khon , svn-src-all@freebsd.org, David Chisnall , =?ISO-8859-1?Q?G=E1bor_K=F6vesd=E1n?= , Bruce Evans , svn-src-head@freebsd.org, Warner Losh Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 12:46:01 -0000 On 12/20/11 9:06 PM, Doug Barton wrote: > On 12/20/2011 06:08, John Baldwin wrote: >> The defaults for src.conf should be for the common case > > Agreed. The problem we seem to be missing here is that developers are > not even statistically significant in measuring "the common case." Users using freebsd-update don't care (they aren't building the world). Having the profiled libraries installed does not negatively impact users. However, it requires extra effort for application developers (not necessarily just kernel developers) who want to profile the applications they are working on. I think application developers is a larger portion of our userbase than you are allowing for. However, that notwithstanding, profiled libraries are not actually costing users anything (except for ones who build world by hand), but removing them from default installs does remove functionality. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 12:59:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7D4D106566B; Wed, 21 Dec 2011 12:59:09 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D640C8FC13; Wed, 21 Dec 2011 12:59:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLCx98x069454; Wed, 21 Dec 2011 12:59:09 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLCx97E069452; Wed, 21 Dec 2011 12:59:09 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112211259.pBLCx97E069452@svn.freebsd.org> From: Martin Matuska Date: Wed, 21 Dec 2011 12:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228769 - in head/contrib/libarchive: . cpio libarchive tar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 12:59:10 -0000 Author: mm Date: Wed Dec 21 12:59:09 2011 New Revision: 228769 URL: http://svn.freebsd.org/changeset/base/228769 Log: Remove config_freebsd.h and add to FREEBSD-Xlist This file is common for libarchive, cpio and tar and is going to be located outside of contrib (lib/libarchive) Deleted: head/contrib/libarchive/cpio/config_freebsd.h head/contrib/libarchive/libarchive/config_freebsd.h head/contrib/libarchive/tar/config_freebsd.h Modified: head/contrib/libarchive/FREEBSD-Xlist Modified: head/contrib/libarchive/FREEBSD-Xlist ============================================================================== --- head/contrib/libarchive/FREEBSD-Xlist Wed Dec 21 12:39:08 2011 (r228768) +++ head/contrib/libarchive/FREEBSD-Xlist Wed Dec 21 12:59:09 2011 (r228769) @@ -9,17 +9,20 @@ contrib cpio/CMakeLists.txt cpio/cpio_windows.c cpio/cpio_windows.h +cpio/config_freebsd.h cpio/test/CMakeLists.txt doc examples libarchive/CMakeLists.txt libarchive/archive_windows.c libarchive/archive_windows.h +libarchive/config_freebsd.h libarchive/filter_fork_windows.c libarchive/test/.cvsignore libarchive/test/CMakeLists.txt tar/CMakeLists.txt tar/bsdtar_windows.c tar/bsdtar_windows.h +tar/config_freebsd.h tar/test/CMakeLists.txt tar/test/test_windows.c From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 14:58:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A55D6106564A; Wed, 21 Dec 2011 14:58:44 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 941AE8FC17; Wed, 21 Dec 2011 14:58:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLEwixT073412; Wed, 21 Dec 2011 14:58:44 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLEwikX073410; Wed, 21 Dec 2011 14:58:44 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112211458.pBLEwikX073410@svn.freebsd.org> From: Martin Matuska Date: Wed, 21 Dec 2011 14:58:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228770 - in head/contrib/libarchive: . libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 14:58:44 -0000 Author: mm Date: Wed Dec 21 14:58:44 2011 New Revision: 228770 URL: http://svn.freebsd.org/changeset/base/228770 Log: Remove libarchive/archive_entry_copy_bhfi.c and libarchive/mtree.5 Add these files to FREEBSD-Xlist MFC after: 2 weeks Deleted: head/contrib/libarchive/libarchive/archive_entry_copy_bhfi.c head/contrib/libarchive/libarchive/mtree.5 Modified: head/contrib/libarchive/FREEBSD-Xlist Modified: head/contrib/libarchive/FREEBSD-Xlist ============================================================================== --- head/contrib/libarchive/FREEBSD-Xlist Wed Dec 21 12:59:09 2011 (r228769) +++ head/contrib/libarchive/FREEBSD-Xlist Wed Dec 21 14:58:44 2011 (r228770) @@ -14,10 +14,12 @@ cpio/test/CMakeLists.txt doc examples libarchive/CMakeLists.txt +libarchive/archive_entry_copy_bhfi.c libarchive/archive_windows.c libarchive/archive_windows.h libarchive/config_freebsd.h libarchive/filter_fork_windows.c +libarchive/mtree.5 libarchive/test/.cvsignore libarchive/test/CMakeLists.txt tar/CMakeLists.txt From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 15:02:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A29F3106566B; Wed, 21 Dec 2011 15:02:37 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 919448FC12; Wed, 21 Dec 2011 15:02:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLF2bAG073598; Wed, 21 Dec 2011 15:02:37 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLF2b6P073596; Wed, 21 Dec 2011 15:02:37 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112211502.pBLF2b6P073596@svn.freebsd.org> From: Martin Matuska Date: Wed, 21 Dec 2011 15:02:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228771 - head/contrib/libarchive/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 15:02:37 -0000 Author: mm Date: Wed Dec 21 15:02:37 2011 New Revision: 228771 URL: http://svn.freebsd.org/changeset/base/228771 Log: Partial merge of r224691 from lib/libarchive: Add compatibility for ISO images created with unfixed makefs that violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD. This allows tar to read FreeBSD distribution ISO images created with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1). MFC after: 2 weeks Modified: head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Modified: head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Wed Dec 21 14:58:44 2011 (r228770) +++ head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Wed Dec 21 15:02:37 2011 (r228771) @@ -895,8 +895,10 @@ isPVD(struct iso9660 *iso9660, const uns return (0); /* Reserved field must be 0. */ + /* FreeBSD: makefs erroneously created images with 0x20 */ for (i = 0; i < PVD_reserved4_size; ++i) - if (h[PVD_reserved4_offset + i] != 0) + if (h[PVD_reserved4_offset + i] != 0 && + h[PVD_reserved4_offset + i] != 32) return (0); /* Reserved field must be 0. */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 15:06:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D63C0106566B; Wed, 21 Dec 2011 15:06:01 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C54418FC0A; Wed, 21 Dec 2011 15:06:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLF61dC073734; Wed, 21 Dec 2011 15:06:01 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLF61AE073731; Wed, 21 Dec 2011 15:06:01 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112211506.pBLF61AE073731@svn.freebsd.org> From: Martin Matuska Date: Wed, 21 Dec 2011 15:06:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228772 - head/contrib/libarchive/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 15:06:01 -0000 Author: mm Date: Wed Dec 21 15:06:01 2011 New Revision: 228772 URL: http://svn.freebsd.org/changeset/base/228772 Log: Add missing integer casts to comparsions in libarchive read. MFC after: 2 weeks Modified: head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c head/contrib/libarchive/libarchive/archive_read_support_format_xar.c Modified: head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Wed Dec 21 15:02:37 2011 (r228771) +++ head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Wed Dec 21 15:06:01 2011 (r228772) @@ -1628,7 +1628,8 @@ parse_file_info(struct archive_read *a, */ if (location > 0 && (location + ((fsize + iso9660->logical_block_size -1) - / iso9660->logical_block_size)) > iso9660->volume_block) { + / iso9660->logical_block_size)) + > (uint32_t)iso9660->volume_block) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Invalid location of extent of file"); return (NULL); Modified: head/contrib/libarchive/libarchive/archive_read_support_format_xar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_xar.c Wed Dec 21 15:02:37 2011 (r228771) +++ head/contrib/libarchive/libarchive/archive_read_support_format_xar.c Wed Dec 21 15:06:01 2011 (r228772) @@ -2530,8 +2530,8 @@ xml_data(void *userData, const char *s, #if DEBUG { char buff[1024]; - if (len > sizeof(buff)-1) - len = sizeof(buff)-1; + if (len > (int)sizeof(buff)-1) + len = (int)sizeof(buff)-1; memcpy(buff, s, len); buff[len] = 0; fprintf(stderr, "\tlen=%d:\"%s\"\n", len, buff); From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 15:18:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C926106566C; Wed, 21 Dec 2011 15:18:53 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A0EA8FC12; Wed, 21 Dec 2011 15:18:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLFIrkG074191; Wed, 21 Dec 2011 15:18:53 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLFIq5W074166; Wed, 21 Dec 2011 15:18:52 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112211518.pBLFIq5W074166@svn.freebsd.org> From: Martin Matuska Date: Wed, 21 Dec 2011 15:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228773 - in head/contrib/libarchive/libarchive: . test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 15:18:53 -0000 Author: mm Date: Wed Dec 21 15:18:52 2011 New Revision: 228773 URL: http://svn.freebsd.org/changeset/base/228773 Log: Merge FreeBSD changes from lib/libarchive to contrib/libarchive: r204111 (uqs): Fix common misspelling of hierarchy r208027 (uqs): mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the bottom of the manpages and order them consistently. GNU groff doesn't care about the ordering, and doesn't even mention CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put them. r208291 (uqs): mdoc: consistently spell our email addresses r209031 (uqs): mdoc nitpicking: the title argument shall be uppercase r214822 (kientzle): Clarify the naming: Methods that free an object should be called "free". Retain the old "finish" names to preserve source compatibility for now. r214905 (kientzle): If the Zip reader doesn't see a PK signature block because there's inter-entry garbage, just scan forward to find the next one. This allows us to handle a lot of Zip archives that have been modified in-place. Thanks to: Gleb Kurtsou for sending me a sample archive r216258 (kientzle): Don't write data into an empty "file." In particular, this check avoids a warning when extracting directory entries from certain GNU tar archives that store directory contents. r225525 (kientzle): Fix cpio on ARM. MFC after: 2 weeks Added: head/contrib/libarchive/libarchive/test/test_compat_zip_2.zip.uu - copied unchanged from r214905, head/lib/libarchive/test/test_compat_zip_2.zip.uu Modified: head/contrib/libarchive/libarchive/archive.h head/contrib/libarchive/libarchive/archive_entry.3 head/contrib/libarchive/libarchive/archive_private.h head/contrib/libarchive/libarchive/archive_read.3 head/contrib/libarchive/libarchive/archive_read.c head/contrib/libarchive/libarchive/archive_read_disk.3 head/contrib/libarchive/libarchive/archive_read_disk.c head/contrib/libarchive/libarchive/archive_read_extract.c head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c head/contrib/libarchive/libarchive/archive_read_support_format_zip.c head/contrib/libarchive/libarchive/archive_util.3 head/contrib/libarchive/libarchive/archive_virtual.c head/contrib/libarchive/libarchive/archive_write.3 head/contrib/libarchive/libarchive/archive_write.c head/contrib/libarchive/libarchive/archive_write_disk.3 head/contrib/libarchive/libarchive/archive_write_disk.c head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c head/contrib/libarchive/libarchive/cpio.5 head/contrib/libarchive/libarchive/libarchive-formats.5 head/contrib/libarchive/libarchive/libarchive.3 head/contrib/libarchive/libarchive/tar.5 head/contrib/libarchive/libarchive/test/test_acl_freebsd.c head/contrib/libarchive/libarchive/test/test_compat_zip.c Directory Properties: head/contrib/libarchive/libarchive/ (props changed) Modified: head/contrib/libarchive/libarchive/archive.h ============================================================================== --- head/contrib/libarchive/libarchive/archive.h Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive.h Wed Dec 21 15:18:52 2011 (r228773) @@ -493,11 +493,10 @@ __LA_DECL void archive_read_extract_set /* Close the file and release most resources. */ __LA_DECL int archive_read_close(struct archive *); /* Release all resources and destroy the object. */ -/* Note that archive_read_finish will call archive_read_close for you. */ -#if ARCHIVE_VERSION_NUMBER < 2000000 -/* Erroneously declared to return void in libarchive 1.x */ -__LA_DECL void archive_read_finish(struct archive *); -#else +/* Note that archive_read_free will call archive_read_close for you. */ +__LA_DECL int archive_read_free(struct archive *); +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* Synonym for archive_read_free() for backwards compatibility. */ __LA_DECL int archive_read_finish(struct archive *); #endif @@ -514,7 +513,7 @@ __LA_DECL int archive_read_finish(stru * - archive_write_header to write the header * - archive_write_data to write the entry data * 5) archive_write_close to close the output - * 6) archive_write_finish to cleanup the writer and release resources + * 6) archive_write_free to cleanup the writer and release resources */ __LA_DECL struct archive *archive_write_new(void); __LA_DECL int archive_write_set_bytes_per_block(struct archive *, @@ -595,13 +594,12 @@ __LA_DECL __LA_SSIZE_T archive_write_da #endif __LA_DECL int archive_write_finish_entry(struct archive *); __LA_DECL int archive_write_close(struct archive *); -#if ARCHIVE_VERSION_NUMBER < 2000000 -/* Return value was incorrect in libarchive 1.x. */ -__LA_DECL void archive_write_finish(struct archive *); -#else -/* Libarchive 2.x and later returns an error if this fails. */ -/* It can fail if the archive wasn't already closed, in which case - * archive_write_finish() will implicitly call archive_write_close(). */ + +/* This can fail if the archive wasn't already closed, in which case + * archive_write_free() will implicitly call archive_write_close(). */ +__LA_DECL int archive_write_free(struct archive *); +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* Synonym for archive_write_free() for backwards compatibility. */ __LA_DECL int archive_write_finish(struct archive *); #endif @@ -630,7 +628,7 @@ __LA_DECL int archive_write_set_options * - construct an appropriate struct archive_entry structure * - archive_write_header to create the file/dir/etc on disk * - archive_write_data to write the entry data - * 4) archive_write_finish to cleanup the writer and release resources + * 4) archive_write_free to cleanup the writer and release resources * * In particular, you can use this in conjunction with archive_read() * to pull entries out of an archive and create them on disk. Modified: head/contrib/libarchive/libarchive/archive_entry.3 ============================================================================== --- head/contrib/libarchive/libarchive/archive_entry.3 Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_entry.3 Wed Dec 21 15:18:52 2011 (r228773) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd May 12, 2008 -.Dt archive_entry 3 +.Dt ARCHIVE_ENTRY 3 .Os .Sh NAME .Nm archive_entry_acl_add_entry , Modified: head/contrib/libarchive/libarchive/archive_private.h ============================================================================== --- head/contrib/libarchive/libarchive/archive_private.h Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_private.h Wed Dec 21 15:18:52 2011 (r228773) @@ -58,7 +58,7 @@ struct archive_vtable { int (*archive_close)(struct archive *); - int (*archive_finish)(struct archive *); + int (*archive_free)(struct archive *); int (*archive_write_header)(struct archive *, struct archive_entry *); int (*archive_write_finish_entry)(struct archive *); Modified: head/contrib/libarchive/libarchive/archive_read.3 ============================================================================== --- head/contrib/libarchive/libarchive/archive_read.3 Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_read.3 Wed Dec 21 15:18:52 2011 (r228773) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd April 13, 2009 -.Dt archive_read 3 +.Dt ARCHIVE_READ 3 .Os .Sh NAME .Nm archive_read_new , @@ -69,7 +69,7 @@ .Nm archive_read_extract2 , .Nm archive_read_extract_set_progress_callback , .Nm archive_read_close , -.Nm archive_read_finish +.Nm archive_read_free .Nd functions for reading streaming archives .Sh SYNOPSIS .In archive.h @@ -196,7 +196,7 @@ .Ft int .Fn archive_read_close "struct archive *" .Ft int -.Fn archive_read_finish "struct archive *" +.Fn archive_read_free "struct archive *" .Sh DESCRIPTION These functions provide a complete API for reading streaming archives. The general process is to first create the @@ -457,7 +457,7 @@ object and the archive_entry object so t can be retrieved for the progress display. .It Fn archive_read_close Complete the archive and invoke the close callback. -.It Fn archive_read_finish +.It Fn archive_read_free Invokes .Fn archive_read_close if it was not invoked manually, then release all resources. @@ -600,7 +600,7 @@ list_archive(const char *name) printf("%s\en",archive_entry_pathname(entry)); archive_read_data_skip(a); } - archive_read_finish(a); + archive_read_free(a); free(mydata); } Modified: head/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read.c Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_read.c Wed Dec 21 15:18:52 2011 (r228773) @@ -60,7 +60,7 @@ static int choose_format(struct archive_ static int cleanup_filters(struct archive_read *); static struct archive_vtable *archive_read_vtable(void); static int _archive_read_close(struct archive *); -static int _archive_read_finish(struct archive *); +static int _archive_read_free(struct archive *); static struct archive_vtable * archive_read_vtable(void) @@ -69,7 +69,7 @@ archive_read_vtable(void) static int inited = 0; if (!inited) { - av.archive_finish = _archive_read_finish; + av.archive_free = _archive_read_free; av.archive_close = _archive_read_close; } return (&av); @@ -779,7 +779,7 @@ cleanup_filters(struct archive_read *a) * Release memory and other resources. */ static int -_archive_read_finish(struct archive *_a) +_archive_read_free(struct archive *_a) { struct archive_read *a = (struct archive_read *)_a; int i; @@ -787,7 +787,7 @@ _archive_read_finish(struct archive *_a) int r = ARCHIVE_OK; __archive_check_magic(_a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_ANY, - "archive_read_finish"); + "archive_read_free"); if (a->archive.state != ARCHIVE_STATE_CLOSED) r = archive_read_close(&a->archive); Modified: head/contrib/libarchive/libarchive/archive_read_disk.3 ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_disk.3 Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_read_disk.3 Wed Dec 21 15:18:52 2011 (r228773) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd March 10, 2009 -.Dt archive_read_disk 3 +.Dt ARCHIVE_READ_DISK 3 .Os .Sh NAME .Nm archive_read_disk_new , @@ -39,7 +39,7 @@ .Nm archive_read_disk_set_gname_lookup , .Nm archive_read_disk_set_standard_lookup , .Nm archive_read_close , -.Nm archive_read_finish +.Nm archive_read_free .Nd functions for reading objects from disk .Sh SYNOPSIS .In archive.h @@ -81,7 +81,7 @@ .Ft int .Fn archive_read_close "struct archive *" .Ft int -.Fn archive_read_finish "struct archive *" +.Fn archive_read_free "struct archive *" .Sh DESCRIPTION These functions provide an API for reading information about objects on disk. @@ -178,9 +178,9 @@ This affects the file ownership fields a object. .It Fn archive_read_close This currently does nothing. -.It Fn archive_write_finish +.It Fn archive_read_free Invokes -.Fn archive_write_close +.Fn archive_read_close if it was not invoked manually, then releases all resources. .El More information about the @@ -213,7 +213,7 @@ file_to_archive(struct archive *a, const while ((bytes_read = read(fd, buff, sizeof(buff))) > 0) archive_write_data(a, buff, bytes_read); archive_write_finish_entry(a); - archive_read_finish(ard); + archive_read_free(ard); archive_entry_free(entry); } .Ed @@ -276,7 +276,7 @@ and first appeared in The .Nm libarchive library was written by -.An Tim Kientzle Aq kientzle@freebsd.org . +.An Tim Kientzle Aq kientzle@FreeBSD.org . .Sh BUGS The .Dq standard Modified: head/contrib/libarchive/libarchive/archive_read_disk.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_disk.c Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_read_disk.c Wed Dec 21 15:18:52 2011 (r228773) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); #include "archive_private.h" #include "archive_read_disk_private.h" -static int _archive_read_finish(struct archive *); +static int _archive_read_free(struct archive *); static int _archive_read_close(struct archive *); static const char *trivial_lookup_gname(void *, gid_t gid); static const char *trivial_lookup_uname(void *, uid_t uid); @@ -45,7 +45,7 @@ archive_read_disk_vtable(void) static int inited = 0; if (!inited) { - av.archive_finish = _archive_read_finish; + av.archive_free = _archive_read_free; av.archive_close = _archive_read_close; } return (&av); @@ -129,7 +129,7 @@ archive_read_disk_new(void) } static int -_archive_read_finish(struct archive *_a) +_archive_read_free(struct archive *_a) { struct archive_read_disk *a = (struct archive_read_disk *)_a; Modified: head/contrib/libarchive/libarchive/archive_read_extract.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_extract.c Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_read_extract.c Wed Dec 21 15:18:52 2011 (r228773) @@ -173,10 +173,7 @@ archive_read_extract_cleanup(struct arch { int ret = ARCHIVE_OK; -#if ARCHIVE_API_VERSION > 1 - ret = -#endif - archive_write_finish(a->extract->ad); + ret = archive_write_free(a->extract->ad); free(a->extract); a->extract = NULL; return (ret); Modified: head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Wed Dec 21 15:18:52 2011 (r228773) @@ -54,7 +54,7 @@ struct cpio_bin_header { unsigned char c_mtime[4]; unsigned char c_namesize[2]; unsigned char c_filesize[4]; -}; +} __packed; struct cpio_odc_header { char c_magic[6]; @@ -68,7 +68,7 @@ struct cpio_odc_header { char c_mtime[11]; char c_namesize[6]; char c_filesize[11]; -}; +} __packed; struct cpio_newc_header { char c_magic[6]; @@ -85,7 +85,7 @@ struct cpio_newc_header { char c_rdevminor[8]; char c_namesize[8]; char c_crc[8]; -}; +} __packed; struct links_entry { struct links_entry *next; Modified: head/contrib/libarchive/libarchive/archive_read_support_format_zip.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_zip.c Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_read_support_format_zip.c Wed Dec 21 15:18:52 2011 (r228773) @@ -128,6 +128,7 @@ static int archive_read_format_zip_read_ static int archive_read_format_zip_read_data_skip(struct archive_read *a); static int archive_read_format_zip_read_header(struct archive_read *, struct archive_entry *); +static int search_next_signature(struct archive_read *); static int zip_read_data_deflate(struct archive_read *a, const void **buff, size_t *size, off_t *offset); static int zip_read_data_none(struct archive_read *a, const void **buff, @@ -317,10 +318,17 @@ archive_read_format_zip_read_header(stru signature = (const char *)h; } + /* If we don't see a PK signature here, scan forward. */ if (signature[0] != 'P' || signature[1] != 'K') { - archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, - "Bad ZIP file"); - return (ARCHIVE_FATAL); + r = search_next_signature(a); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Bad ZIP file"); + return (ARCHIVE_FATAL); + } + if ((h = __archive_read_ahead(a, 4, NULL)) == NULL) + return (ARCHIVE_FATAL); + signature = (const char *)h; } /* @@ -375,6 +383,42 @@ archive_read_format_zip_read_header(stru } static int +search_next_signature(struct archive_read *a) +{ + const void *h; + const char *p, *q; + size_t skip; + ssize_t bytes; + int64_t skipped = 0; + + for (;;) { + h = __archive_read_ahead(a, 4, &bytes); + if (h == NULL) + return (ARCHIVE_FATAL); + p = h; + q = p + bytes; + + while (p + 4 <= q) { + if (p[0] == 'P' && p[1] == 'K') { + if ((p[2] == '\001' && p[3] == '\002') + || (p[2] == '\003' && p[3] == '\004') + || (p[2] == '\005' && p[3] == '\006') + || (p[2] == '\007' && p[3] == '\010') + || (p[2] == '0' && p[3] == '0')) { + skip = p - (const char *)h; + __archive_read_consume(a, skip); + return (ARCHIVE_OK); + } + } + ++p; + } + skip = p - (const char *)h; + __archive_read_consume(a, skip); + skipped += skip; + } +} + +static int zip_read_file_header(struct archive_read *a, struct archive_entry *entry, struct zip *zip) { @@ -888,6 +932,9 @@ process_extra(const void* extra, struct if (datasize >= 4) zip->gid = archive_le16dec(p + offset + 2); break; + case 0x7875: + /* Info-Zip Unix Extra Field (type 3) "ux". */ + break; default: break; } Modified: head/contrib/libarchive/libarchive/archive_util.3 ============================================================================== --- head/contrib/libarchive/libarchive/archive_util.3 Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_util.3 Wed Dec 21 15:18:52 2011 (r228773) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd January 8, 2005 -.Dt archive_util 3 +.Dt ARCHIVE_UTIL 3 .Os .Sh NAME .Nm archive_clear_error , Modified: head/contrib/libarchive/libarchive/archive_virtual.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_virtual.c Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_virtual.c Wed Dec 21 15:18:52 2011 (r228773) @@ -42,26 +42,35 @@ archive_read_close(struct archive *a) return ((a->vtable->archive_close)(a)); } -#if ARCHIVE_API_VERSION > 1 int -archive_write_finish(struct archive *a) +archive_write_free(struct archive *a) { - return ((a->vtable->archive_finish)(a)); + return ((a->vtable->archive_free)(a)); } -#else -/* Temporarily allow library to compile with either 1.x or 2.0 API. */ -void + +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* For backwards compatibility; will be removed with libarchive 4.0. */ +int archive_write_finish(struct archive *a) { - (void)(a->vtable->archive_finish)(a); + return ((a->vtable->archive_free)(a)); } #endif int +archive_read_free(struct archive *a) +{ + return ((a->vtable->archive_free)(a)); +} + +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* For backwards compatibility; will be removed with libarchive 4.0. */ +int archive_read_finish(struct archive *a) { - return ((a->vtable->archive_finish)(a)); + return ((a->vtable->archive_free)(a)); } +#endif int archive_write_header(struct archive *a, struct archive_entry *entry) @@ -76,12 +85,7 @@ archive_write_finish_entry(struct archiv return ((a->vtable->archive_write_finish_entry)(a)); } -#if ARCHIVE_API_VERSION > 1 ssize_t -#else -/* Temporarily allow library to compile with either 1.x or 2.0 API. */ -int -#endif archive_write_data(struct archive *a, const void *buff, size_t s) { return ((a->vtable->archive_write_data)(a, buff, s)); Modified: head/contrib/libarchive/libarchive/archive_write.3 ============================================================================== --- head/contrib/libarchive/libarchive/archive_write.3 Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_write.3 Wed Dec 21 15:18:52 2011 (r228773) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd May 11, 2008 -.Dt archive_write 3 +.Dt ARCHIVE_WRITE 3 .Os .Sh NAME .Nm archive_write_new , @@ -55,7 +55,7 @@ .Nm archive_write_data , .Nm archive_write_finish_entry , .Nm archive_write_close , -.Nm archive_write_finish +.Nm archive_write_free .Nd functions for creating archives .Sh SYNOPSIS .In archive.h @@ -125,7 +125,7 @@ .Ft int .Fn archive_write_close "struct archive *" .Ft int -.Fn archive_write_finish "struct archive *" +.Fn archive_write_free "struct archive *" .Sh DESCRIPTION These functions provide a complete API for creating streaming archive files. @@ -363,16 +363,16 @@ and as needed. .It Fn archive_write_close Complete the archive and invoke the close callback. -.It Fn archive_write_finish +.It Fn archive_write_free Invokes .Fn archive_write_close -if it was not invoked manually, then releases all resources. -Note that this function was declared to return -.Ft void -in libarchive 1.x, which made it impossible to detect errors when +if necessary, then releases all resources. +If you need detailed information about .Fn archive_write_close -was invoked implicitly from this function. -This is corrected beginning with libarchive 2.0. +failures, you should be careful to call it separately, as +you cannot obtain error information after +.Fn archive_write_free +returns. .El More information about the .Va struct archive @@ -529,7 +529,7 @@ write_archive(const char *outname, const archive_entry_free(entry); filename++; } - archive_write_finish(a); + archive_write_free(a); } int main(int argc, const char **argv) @@ -580,7 +580,7 @@ may include .Fn archive_write_data , .Fn archive_write_close , or -.Fn archive_write_finish . +.Fn archive_write_free . The client callback can call .Fn archive_set_error to provide values that can then be retrieved by Modified: head/contrib/libarchive/libarchive/archive_write.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write.c Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_write.c Wed Dec 21 15:18:52 2011 (r228773) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); static struct archive_vtable *archive_write_vtable(void); static int _archive_write_close(struct archive *); -static int _archive_write_finish(struct archive *); +static int _archive_write_free(struct archive *); static int _archive_write_header(struct archive *, struct archive_entry *); static int _archive_write_finish_entry(struct archive *); static ssize_t _archive_write_data(struct archive *, const void *, size_t); @@ -73,7 +73,7 @@ archive_write_vtable(void) if (!inited) { av.archive_close = _archive_write_close; - av.archive_finish = _archive_write_finish; + av.archive_free = _archive_write_free; av.archive_write_header = _archive_write_header; av.archive_write_finish_entry = _archive_write_finish_entry; av.archive_write_data = _archive_write_data; @@ -383,13 +383,13 @@ _archive_write_close(struct archive *_a) * Destroy the archive structure. */ static int -_archive_write_finish(struct archive *_a) +_archive_write_free(struct archive *_a) { struct archive_write *a = (struct archive_write *)_a; int r = ARCHIVE_OK; __archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC, - ARCHIVE_STATE_ANY, "archive_write_finish"); + ARCHIVE_STATE_ANY, "archive_write_free"); if (a->archive.state != ARCHIVE_STATE_CLOSED) r = archive_write_close(&a->archive); Modified: head/contrib/libarchive/libarchive/archive_write_disk.3 ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_disk.3 Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_write_disk.3 Wed Dec 21 15:18:52 2011 (r228773) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd August 5, 2008 -.Dt archive_write_disk 3 +.Dt ARCHIVE_WRITE_DISK 3 .Os .Sh NAME .Nm archive_write_disk_new , @@ -38,7 +38,7 @@ .Nm archive_write_data , .Nm archive_write_finish_entry , .Nm archive_write_close , -.Nm archive_write_finish +.Nm archive_write_free .Nd functions for creating objects on disk .Sh SYNOPSIS .In archive.h @@ -73,7 +73,7 @@ .Ft int .Fn archive_write_close "struct archive *" .Ft int -.Fn archive_write_finish "struct archive *" +.Fn archive_write_free "struct archive *" .Sh DESCRIPTION These functions provide a complete API for creating objects on disk from @@ -239,7 +239,7 @@ The .Nm library maintains a list of all such deferred attributes and sets them when this function is invoked. -.It Fn archive_write_finish +.It Fn archive_write_free Invokes .Fn archive_write_close if it was not invoked manually, then releases all resources. @@ -339,7 +339,7 @@ In particular, the directory .Pa aa is created as well as the final object .Pa bb . -In theory, this can be exploited to create an entire directory heirarchy +In theory, this can be exploited to create an entire directory hierarchy with a single request. Of course, this does not work if the .Cm ARCHIVE_EXTRACT_NODOTDOT @@ -371,5 +371,5 @@ compact implementation when appropriate. .Pp There should be a corresponding .Nm archive_read_disk -interface that walks a directory heirarchy and returns archive +interface that walks a directory hierarchy and returns archive entry objects. \ No newline at end of file Modified: head/contrib/libarchive/libarchive/archive_write_disk.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_disk.c Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_write_disk.c Wed Dec 21 15:18:52 2011 (r228773) @@ -252,7 +252,7 @@ static ssize_t write_data_block(struct a static struct archive_vtable *archive_write_disk_vtable(void); static int _archive_write_close(struct archive *); -static int _archive_write_finish(struct archive *); +static int _archive_write_free(struct archive *); static int _archive_write_header(struct archive *, struct archive_entry *); static int _archive_write_finish_entry(struct archive *); static ssize_t _archive_write_data(struct archive *, const void *, size_t); @@ -291,7 +291,7 @@ archive_write_disk_vtable(void) if (!inited) { av.archive_close = _archive_write_close; - av.archive_finish = _archive_write_finish; + av.archive_free = _archive_write_free; av.archive_write_header = _archive_write_header; av.archive_write_finish_entry = _archive_write_finish_entry; av.archive_write_data = _archive_write_data; @@ -1295,7 +1295,7 @@ _archive_write_close(struct archive *_a) } static int -_archive_write_finish(struct archive *_a) +_archive_write_free(struct archive *_a) { struct archive_write_disk *a = (struct archive_write_disk *)_a; int ret; Modified: head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c Wed Dec 21 15:18:52 2011 (r228773) @@ -74,7 +74,7 @@ struct cpio_header { char c_mtime[11]; char c_namesize[6]; char c_filesize[11]; -}; +} __packed; /* * Set output format to 'cpio' format. Modified: head/contrib/libarchive/libarchive/cpio.5 ============================================================================== --- head/contrib/libarchive/libarchive/cpio.5 Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/cpio.5 Wed Dec 21 15:18:52 2011 (r228773) @@ -268,31 +268,6 @@ data, including ACLs and extended attrib entries in cpio archives. .Pp XXX Others? XXX -.Sh BUGS -The -.Dq CRC -format is mis-named, as it uses a simple checksum and -not a cyclic redundancy check. -.Pp -The old binary format is limited to 16 bits for user id, -group id, device, and inode numbers. -It is limited to 4 gigabyte file sizes. -.Pp -The old ASCII format is limited to 18 bits for -the user id, group id, device, and inode numbers. -It is limited to 8 gigabyte file sizes. -.Pp -The new ASCII format is limited to 4 gigabyte file sizes. -.Pp -None of the cpio formats store user or group names, -which are essential when moving files between systems with -dissimilar user or group numbering. -.Pp -Especially when writing older cpio variants, it may be necessary -to map actual device/inode values to synthesized values that -fit the available fields. -With very large filesystems, this may be necessary even for -the newer formats. .Sh SEE ALSO .Xr cpio 1 , .Xr tar 5 @@ -323,3 +298,28 @@ license. The character format was adopted as part of .St -p1003.1-88 . XXX when did "newc" appear? Who invented it? When did HP come out with their variant? When did Sun introduce ACLs and extended attributes? XXX +.Sh BUGS +The +.Dq CRC +format is mis-named, as it uses a simple checksum and +not a cyclic redundancy check. +.Pp +The old binary format is limited to 16 bits for user id, +group id, device, and inode numbers. +It is limited to 4 gigabyte file sizes. +.Pp +The old ASCII format is limited to 18 bits for +the user id, group id, device, and inode numbers. +It is limited to 8 gigabyte file sizes. +.Pp +The new ASCII format is limited to 4 gigabyte file sizes. +.Pp +None of the cpio formats store user or group names, +which are essential when moving files between systems with +dissimilar user or group numbering. +.Pp +Especially when writing older cpio variants, it may be necessary +to map actual device/inode values to synthesized values that +fit the available fields. +With very large filesystems, this may be necessary even for +the newer formats. Modified: head/contrib/libarchive/libarchive/libarchive-formats.5 ============================================================================== --- head/contrib/libarchive/libarchive/libarchive-formats.5 Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/libarchive-formats.5 Wed Dec 21 15:18:52 2011 (r228773) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd December 27, 2009 -.Dt libarchive-formats 5 +.Dt LIBARCHIVE-FORMATS 5 .Os .Sh NAME .Nm libarchive-formats Modified: head/contrib/libarchive/libarchive/libarchive.3 ============================================================================== --- head/contrib/libarchive/libarchive/libarchive.3 Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/libarchive.3 Wed Dec 21 15:18:52 2011 (r228773) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 19, 2006 +.Dd July 17, 2010 .Dt LIBARCHIVE 3 .Os .Sh NAME @@ -61,13 +61,14 @@ GNU-format tar archives, .It most common cpio archive formats, .It -ISO9660 CD images (with or without RockRidge extensions), +ISO9660 CD images (including RockRidge and Joliet extensions), .It Zip archives. .El The library automatically detects archives compressed with .Xr gzip 1 , .Xr bzip2 1 , +.Xr xz 1 , or .Xr compress 1 and decompresses them transparently. @@ -87,6 +88,8 @@ archives, .It POSIX octet-oriented cpio archives, .It +Zip archive, +.It two different variants of shar archives. .El Pax interchange format is an extension of the tar archive format that @@ -168,12 +171,12 @@ You can use (which works much like the .Xr read 2 system call) -to read this data from the archive. +to read this data from the archive, or +.Fn archive_read_data_block +which provides a slightly more efficient interface. You may prefer to use the higher-level .Fn archive_read_data_skip , which reads and discards the data for this entry, -.Fn archive_read_data_to_buffer , -which reads the data into an in-memory buffer, .Fn archive_read_data_to_file , which copies the data to the provided file descriptor, or .Fn archive_read_extract , @@ -192,7 +195,7 @@ Once you have finished reading data from should call .Fn archive_read_close to close the archive, then call -.Fn archive_read_finish +.Fn archive_read_free to release all resources, including all memory allocated by the library. .Pp The @@ -230,12 +233,34 @@ You can then use to write the actual data. .Pp After all entries have been written, use the -.Fn archive_write_finish +.Fn archive_write_free function to release all resources. .Pp The .Xr archive_write 3 manual page provides more detailed calling information for this API. +.Sh WRITING ENTRIES TO DISK +The +.Xr archive_write_disk 3 +API allows you to write +.Xr archive_entry 3 +objects to disk using the same API used by +.Xr archive_write 3 . +The +.Xr archive_write_disk 3 +API is used internally by +.Fn archive_read_extract ; +using it directly can provide greater control over how entries +get written to disk. +This API also makes it possible to share code between +archive-to-archive copy and archive-to-disk extraction +operations. +.Sh READING ENTRIES FROM DISK +The +.Xr archive_read_disk 3 +provides some support for populating +.Xr archive_entry 3 +objects from information in the filesystem. .Sh DESCRIPTION Detailed descriptions of each function are provided by the corresponding manual pages. @@ -259,7 +284,9 @@ In particular, pax interchange format ca in arbitrary character sets that exceed .Va PATH_MAX . .Sh RETURN VALUES -Most functions return zero on success, non-zero on error. +Most functions return +.Cm ARCHIVE_OK +(zero) on success, non-zero on error. The return value indicates the general severity of the error, ranging from .Cm ARCHIVE_WARN , @@ -329,3 +356,14 @@ stored in an is supported by all formats. For example, cpio formats do not support nanosecond timestamps; old tar formats do not support large device numbers. +.Pp +The +.Xr archive_read_disk 3 +API should support iterating over filesystems; +that would make it possible to share code among +disk-to-archive, archive-to-archive, archive-to-disk, +and disk-to-disk operations. +Currently, it only supports reading the +information for a single file. +(Which is still quite useful, as it hides a lot +of system-specific details.) Modified: head/contrib/libarchive/libarchive/tar.5 ============================================================================== --- head/contrib/libarchive/libarchive/tar.5 Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/tar.5 Wed Dec 21 15:18:52 2011 (r228773) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd December 27, 2009 -.Dt tar 5 +.Dt TAR 5 .Os .Sh NAME .Nm tar Modified: head/contrib/libarchive/libarchive/test/test_acl_freebsd.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_acl_freebsd.c Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/test/test_acl_freebsd.c Wed Dec 21 15:18:52 2011 (r228773) @@ -220,6 +220,11 @@ DEFINE_TEST(test_acl_freebsd) skipping("ACL tests require that ACL support be enabled on the filesystem"); return; } + if (n != 0 && errno == EINVAL) { + close(fd); + skipping("POSIX.1e ACL tests require that POSIX.1e ACL support be enabled on the filesystem"); + return; + } failure("acl_set_fd(): errno = %d (%s)", errno, strerror(errno)); assertEqualInt(0, n); Modified: head/contrib/libarchive/libarchive/test/test_compat_zip.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_compat_zip.c Wed Dec 21 15:06:01 2011 (r228772) +++ head/contrib/libarchive/libarchive/test/test_compat_zip.c Wed Dec 21 15:18:52 2011 (r228773) @@ -71,10 +71,43 @@ finish: #endif } +/* + * Verify that we skip junk between entries. The compat_zip_2.zip file + * has several bytes of junk between 'file1' and 'file2'. Such + * junk is routinely introduced by some Zip writers when they manipulate + * existing zip archives. + */ +static void +test_compat_zip_2(void) +{ + char name[] = "test_compat_zip_2.zip"; + struct archive_entry *ae; + struct archive *a; + + assert((a = archive_read_new()) != NULL); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_compression_all(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); + extract_reference_file(name); + assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, name, 10240)); + + /* Read first entry. */ + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("file1", archive_entry_pathname(ae)); + + /* Read first entry. */ + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("file2", archive_entry_pathname(ae)); + + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualInt(ARCHIVE_OK, archive_read_close(a)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); +} + DEFINE_TEST(test_compat_zip) { test_compat_zip_1(); + test_compat_zip_2(); } Copied: head/contrib/libarchive/libarchive/test/test_compat_zip_2.zip.uu (from r214905, head/lib/libarchive/test/test_compat_zip_2.zip.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libarchive/libarchive/test/test_compat_zip_2.zip.uu Wed Dec 21 15:18:52 2011 (r228773, copy of r214905, head/lib/libarchive/test/test_compat_zip_2.zip.uu) @@ -0,0 +1,10 @@ +$FreeBSD$ + +begin 644 test_compat_zip_2.zip +M4$L#!`H``````'V59CT````````````````%````9FEL93$M2E5.2RU02P,$ +M"@``````@95F/<>D!,D&````!@````4```!F:6QE,F9I;&4R"E!+`0(>`PH` +M`````'V59CT````````````````%``````````````"D@0````!F:6QE,5!+ +M`0(>`PH``````(&59CW'I`3)!@````8````%``````````````"D@2D```!F +::6QE,E!+!08``````@`"`&8```!2```````` +` +end From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 15:20:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A02D3106568E; Wed, 21 Dec 2011 15:20:17 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F1078FC12; Wed, 21 Dec 2011 15:20:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLFKHqO074285; Wed, 21 Dec 2011 15:20:17 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLFKHmD074282; Wed, 21 Dec 2011 15:20:17 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112211520.pBLFKHmD074282@svn.freebsd.org> From: Martin Matuska Date: Wed, 21 Dec 2011 15:20:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228774 - head/contrib/libarchive/libarchive_fe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 15:20:17 -0000 Author: mm Date: Wed Dec 21 15:20:17 2011 New Revision: 228774 URL: http://svn.freebsd.org/changeset/base/228774 Log: Add $FreeBSD$ to libarchive_fe headers where missing. MFC after: 2 weeks Modified: head/contrib/libarchive/libarchive_fe/err.h head/contrib/libarchive/libarchive_fe/line_reader.h Modified: head/contrib/libarchive/libarchive_fe/err.h ============================================================================== --- head/contrib/libarchive/libarchive_fe/err.h Wed Dec 21 15:18:52 2011 (r228773) +++ head/contrib/libarchive/libarchive_fe/err.h Wed Dec 21 15:20:17 2011 (r228774) @@ -21,6 +21,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef LAFE_ERR_H Modified: head/contrib/libarchive/libarchive_fe/line_reader.h ============================================================================== --- head/contrib/libarchive/libarchive_fe/line_reader.h Wed Dec 21 15:18:52 2011 (r228773) +++ head/contrib/libarchive/libarchive_fe/line_reader.h Wed Dec 21 15:20:17 2011 (r228774) @@ -21,6 +21,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef LAFE_LINE_READER_H From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 15:22:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A03F106564A; Wed, 21 Dec 2011 15:22:06 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 590358FC1B; Wed, 21 Dec 2011 15:22:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLFM6MA074398; Wed, 21 Dec 2011 15:22:06 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLFM6aE074396; Wed, 21 Dec 2011 15:22:06 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112211522.pBLFM6aE074396@svn.freebsd.org> From: Martin Matuska Date: Wed, 21 Dec 2011 15:22:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228775 - head/contrib/libarchive/libarchive_fe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 15:22:06 -0000 Author: mm Date: Wed Dec 21 15:22:05 2011 New Revision: 228775 URL: http://svn.freebsd.org/changeset/base/228775 Log: Merge FreeBSD changes from usr.bin/tar to contrib/libarchive/libarchive_fe: r213469: Recognize both ! and ^ as markers for negated character classes. MFC after: 2 weeks Modified: head/contrib/libarchive/libarchive_fe/pathmatch.c Directory Properties: head/contrib/libarchive/libarchive_fe/ (props changed) Modified: head/contrib/libarchive/libarchive_fe/pathmatch.c ============================================================================== --- head/contrib/libarchive/libarchive_fe/pathmatch.c Wed Dec 21 15:20:17 2011 (r228774) +++ head/contrib/libarchive/libarchive_fe/pathmatch.c Wed Dec 21 15:22:05 2011 (r228775) @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD$"); /* * Check whether a character 'c' is matched by a list specification [...]: - * * Leading '!' negates the class. + * * Leading '!' or '^' negates the class. * * - is a range of characters * * \ removes any special meaning for * @@ -60,7 +60,7 @@ pm_list(const char *start, const char *e (void)flags; /* UNUSED */ /* If this is a negated class, return success for nomatch. */ - if (*p == '!' && p < end) { + if ((*p == '!' || *p == '^') && p < end) { match = 0; nomatch = 1; ++p; From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 15:30:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82F0F106566C; Wed, 21 Dec 2011 15:30:50 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 700308FC0A; Wed, 21 Dec 2011 15:30:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLFUo5s074707; Wed, 21 Dec 2011 15:30:50 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLFUoTu074700; Wed, 21 Dec 2011 15:30:50 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112211530.pBLFUoTu074700@svn.freebsd.org> From: Martin Matuska Date: Wed, 21 Dec 2011 15:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228776 - in head/contrib/libarchive/tar: . test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 15:30:50 -0000 Author: mm Date: Wed Dec 21 15:30:49 2011 New Revision: 228776 URL: http://svn.freebsd.org/changeset/base/228776 Log: Merge FreeBSD changes from usr.bin/tar to contrib/libarchive/tar: r204111 (uqs): Fix common misspelling of hierarchy r207786 (kientzle): Various manpage updates, including many long-option synonyms that were previously undocumented. r208028 (uqs): mdoc: move remaining sections into consistent order This pertains mostly to FILES, HISTORY, EXIT STATUS and AUTHORS sections. r209152 (kientzle): If the compressed data is larger than the uncompressed, report the compression ratio as 0% instead of displaying nonsense triggered by numeric overflow. This is common when dealing with uncompressed files when the I/O blocking causes there to be small transient differences in the accounting. r210720 (joel): Fix typos. r223541 (kientzle): If there is a read error reading Y/N confirmation from the keyboard, exit immediately with an error. If there is an error opening or reading a file to put into the archive, set the return value for a deferred error exit. r223573 (kientzle): The --newer-than test should descend into old directories to look for new files. r226636 (kientzle): Typo from previous commit. Urgh. r224153 (mm, partial): Update bsdtar.1 manpage MFC after: 2 weeks Modified: head/contrib/libarchive/tar/bsdtar.1 head/contrib/libarchive/tar/read.c head/contrib/libarchive/tar/test/test_option_s.c head/contrib/libarchive/tar/tree.c head/contrib/libarchive/tar/util.c head/contrib/libarchive/tar/write.c Directory Properties: head/contrib/libarchive/tar/ (props changed) Modified: head/contrib/libarchive/tar/bsdtar.1 ============================================================================== --- head/contrib/libarchive/tar/bsdtar.1 Wed Dec 21 15:22:05 2011 (r228775) +++ head/contrib/libarchive/tar/bsdtar.1 Wed Dec 21 15:30:49 2011 (r228776) @@ -50,8 +50,8 @@ .Sh DESCRIPTION .Nm creates and manipulates streaming archive files. -This implementation can extract from tar, pax, cpio, zip, jar, ar, -and ISO 9660 cdrom images and can create tar, pax, cpio, ar, +This implementation can extract from tar, pax, cpio, zip, jar, ar, xar, +rpm and ISO 9660 cdrom images and can create tar, pax, cpio, ar, zip, and shar archives. .Pp The first synopsis form shows a @@ -67,6 +67,8 @@ is a mode indicator from the following l .Bl -tag -compact -width indent .It Fl c Create a new archive containing the specified items. +The long option form is +.Fl Fl create . .It Fl r Like .Fl c , @@ -75,8 +77,12 @@ Note that this only works on uncompresse The .Fl f option is required. +The long option form is +.Fl Fl append . .It Fl t List archive contents to stdout. +The long option form is +.Fl Fl list . .It Fl u Like .Fl r , @@ -86,11 +92,15 @@ Note that this only works on uncompresse The .Fl f option is required. +The long form is +.Fl Fl update . .It Fl x Extract to disk from the archive. If a file with the same name appears more than once in the archive, each copy will be extracted, with later copies overwriting (replacing) earlier copies. +The long option form is +.Fl Fl extract . .El .Pp In @@ -127,14 +137,18 @@ In contrast, .Dl Nm Fl c Fl f Pa - Pa newfile Pa original.tar creates a new archive with only two entries. Similarly, -.Dl Nm Fl czf Pa - Fl -format Cm pax Cm @ Ns Pa - +.Dl Nm Fl czf Pa - Fl Fl format Cm pax Cm @ Ns Pa - reads an archive from standard input (whose format will be determined automatically) and converts it into a gzip-compressed pax-format archive on stdout. In this way, .Nm can be used to convert archives from one format to another. -.It Fl b Ar blocksize +.It Fl B , Fl Fl read-full-blocks +Ignored for compatibility with other +.Xr tar 1 +implementations. +.It Fl b Ar blocksize , Fl Fl block-size Ar blocksize Specify the block size, in 512-byte records, for tape drive I/O. As a rule, this argument is only needed when reading from or writing to tape drives, and usually not even then as the default block size of @@ -144,21 +158,22 @@ In c and r mode, this changes the direct the following files. In x mode, change directories after opening the archive but before extracting entries from the archive. -.It Fl -check-links -(c and r modes only) -Issue a warning message unless all links to each file are archived. -.It Fl -chroot +.It Fl Fl chroot (x mode only) .Fn chroot to the current directory after processing any .Fl C options and before extracting any files. -.It Fl -exclude Ar pattern +.It Fl Fl disable-copyfile +Mac OS X specific. +Disable the use of +.Xr copyfile 3 . +.It Fl Fl exclude Ar pattern Do not process files or directories that match the specified pattern. Note that exclusions take precedence over patterns or filenames specified on the command line. -.It Fl -format Ar format +.It Fl Fl format Ar format (c, r, u mode only) Use the specified format for the created archive. Supported formats include @@ -172,16 +187,18 @@ Other formats may also be supported; see for more information about currently-supported formats. In r and u modes, when extending an existing archive, the format specified here must be compatible with the format of the existing archive on disk. -.It Fl f Ar file +.It Fl f Ar file , Fl Fl file Ar file Read the archive from or write the archive to the specified file. The filename can be .Pa - for standard input or standard output. -If not specified, the default tape device will be used. -(On +The default varies by system; +on .Fx , -the default tape device is -.Pa /dev/sa0 . ) +the default is +.Pa /dev/sa0 ; +on Linux, the default is +.Pa /dev/st0 . .It Fl Fl gid Ar id Use the provided group id number. On extract, this overrides the group id in the archive; @@ -214,25 +231,36 @@ Synonym for .It Fl I Synonym for .Fl T . -.It Fl -include Ar pattern +.It Fl Fl help +Show usage. +.It Fl Fl include Ar pattern Process only files or directories that match the specified pattern. Note that exclusions specified with -.Fl -exclude +.Fl Fl exclude take precedence over inclusions. If no inclusions are explicitly specified, all entries are processed by default. The -.Fl -include +.Fl Fl include option is especially useful when filtering archives. For example, the command -.Dl Nm Fl c Fl f Pa new.tar Fl -include='*foo*' Cm @ Ns Pa old.tgz +.Dl Nm Fl c Fl f Pa new.tar Fl Fl include='*foo*' Cm @ Ns Pa old.tgz creates a new archive .Pa new.tar containing only the entries from .Pa old.tgz containing the string .Sq foo . -.It Fl j +.It Fl J , Fl Fl xz +(c mode only) +Compress the resulting archive with +.Xr xz 1 . +In extract or list modes, this option is ignored. +Note that, unlike other +.Nm tar +implementations, this implementation recognizes XZ compression +automatically when reading archives. +.It Fl j , Fl Fl bzip , Fl Fl bzip2 , Fl Fl bunzip2 (c mode only) Compress the resulting archive with .Xr bzip2 1 . @@ -241,68 +269,71 @@ Note that, unlike other .Nm tar implementations, this implementation recognizes bzip2 compression automatically when reading archives. -.It Fl k +.It Fl k , Fl Fl keep-old-files (x mode only) Do not overwrite existing files. In particular, if a file appears more than once in an archive, later copies will not overwrite earlier copies. -.It Fl -keep-newer-files +.It Fl Fl keep-newer-files (x mode only) Do not overwrite existing files that are newer than the versions appearing in the archive being extracted. -.It Fl L +.It Fl L , Fl Fl dereference (c and r mode only) All symbolic links will be followed. Normally, symbolic links are archived as such. With this option, the target of the link will be archived instead. -.It Fl l -This is a synonym for the -.Fl -check-links -option. -.It Fl m +.It Fl l , Fl Fl check-links +(c and r modes only) +Issue a warning message unless all links to each file are archived. +.It Fl Fl lzma +(c mode only) Compress the resulting archive with the original LZMA algorithm. +Use of this option is discouraged and new archives should be created with +.Fl Fl xz +instead. +Note that, unlike other +.Nm tar +implementations, this implementation recognizes LZMA compression +automatically when reading archives. +.It Fl m , Fl Fl modification-time (x mode only) Do not extract modification time. By default, the modification time is set to the time stored in the archive. -.It Fl n +.It Fl n , Fl Fl norecurse , Fl Fl no-recursion (c, r, u modes only) Do not recursively archive the contents of directories. -.It Fl -newer Ar date +.It Fl Fl newer Ar date (c, r, u modes only) Only include files and directories newer than the specified date. This compares ctime entries. -.It Fl -newer-mtime Ar date +.It Fl Fl newer-mtime Ar date (c, r, u modes only) Like -.Fl -newer , +.Fl Fl newer , except it compares mtime entries instead of ctime entries. -.It Fl -newer-than Pa file +.It Fl Fl newer-than Pa file (c, r, u modes only) Only include files and directories newer than the specified file. This compares ctime entries. -.It Fl -newer-mtime-than Pa file +.It Fl Fl newer-mtime-than Pa file (c, r, u modes only) Like -.Fl -newer-than , +.Fl Fl newer-than , except it compares mtime entries instead of ctime entries. -.It Fl -nodump +.It Fl Fl nodump (c and r modes only) Honor the nodump file flag by skipping this file. -.It Fl -null +.It Fl Fl null (use with -.Fl I , -.Fl T , +.Fl I or -.Fl X ) +.Fl T ) Filenames or patterns are separated by null characters, not by newlines. This is often used to read filenames output by the .Fl print0 option to .Xr find 1 . -.It Fl -numeric-owner -(x mode only) -Ignore symbolic user and group names when restoring archives to disk, -only numeric uid and gid values will be obeyed. .It Fl Fl no-same-owner (x mode only) Do not extract owner and group IDs. @@ -330,7 +361,7 @@ On extract, it causes user and group nam to be ignored in favor of the numeric user and group ids. On create, it causes user and group names to not be stored in the archive. -.It Fl O +.It Fl O , Fl Fl to-stdout (x, t modes only) In extract (-x) mode, files will be written to standard out rather than being extracted to disk. @@ -349,11 +380,11 @@ the archive will be discarded. .It Fl o (c, r, u mode) A synonym for -.Fl -format Ar ustar -.It Fl -one-file-system +.Fl Fl format Ar ustar +.It Fl Fl one-file-system (c, r, and u modes) Do not cross mount points. -.It Fl -options Ar options +.It Fl Fl options Ar options Select optional behaviors for particular modules. The argument is a text string containing comma-separated keywords and values. @@ -424,7 +455,7 @@ Supported values are store (uncompressed .El If a provided option is not supported by any module, that is a fatal error. -.It Fl P +.It Fl P , Fl Fl absolute-paths Preserve pathnames. By default, absolute pathnames (those that begin with a / character) have the leading slash removed both when creating archives @@ -435,21 +466,22 @@ will refuse to extract archive entries w .Pa .. or whose target directory would be altered by a symlink. This option suppresses these behaviors. -.It Fl p +.It Fl p , Fl Fl insecure , Fl Fl preserve-permissions (x mode only) Preserve file permissions. Attempt to restore the full permissions, including owner, file modes, file flags and ACLs, if available, for each item extracted from the archive. -By default, newly-created files are owned by the user running -.Nm , -the file mode is restored for newly-created regular files, and -all other types of entries receive default permissions. -If +This is the default, if .Nm -is being run by root, the default is to restore the owner unless the -.Fl o -option is also specified. -.It Fl q ( Fl -fast-read ) +is being run by root and can be overriden by also specifying +.Fl Fl no-same-owner +and +.Fl Fl no-same-permissions . +.It Fl Fl posix +(c, r, u mode only) +Synonym for +.Fl Fl format Ar pax +.It Fl q , Fl Fl fast-read (x and t mode only) Extract or list only the first archive entry that matches each pattern or filename operand. @@ -463,8 +495,16 @@ This option is provided as a performance Extract files as sparse files. For every block on disk, check first if it contains only NULL bytes and seek over it otherwise. -This works similiar to the conv=sparse option of dd. -.It Fl -strip-components Ar count +This works similar to the conv=sparse option of dd. +.It Fl Fl same-owner +(x mode only) +Extract owner and group IDs. +This is the reverse of +.Fl Fl no-same-owner +and the default behavior if +.Nm +is run as root. +.It Fl Fl strip-components Ar count (x mode only) Remove the specified number of leading path elements. Pathnames with fewer elements will be silently skipped. @@ -496,7 +536,7 @@ of symbolic links. The optional trailing p specifies that after a successful substitution the original path name and the new path name should be printed to standard error. -.It Fl T Ar filename +.It Fl T Ar filename , Fl Fl files-from Ar filename In x or t mode, .Nm will read the list of names to be extracted from @@ -510,20 +550,26 @@ The special name on a line by itself will cause the current directory to be changed to the directory specified on the following line. Names are terminated by newlines unless -.Fl -null +.Fl Fl null is specified. Note that -.Fl -null +.Fl Fl null also disables the special handling of lines containing .Dq -C . -.It Fl U +.It Fl Fl totals +(c, r, u mode only) +After archiving all files, print a summary to stderr. +.It Fl U , Fl Fl unlink , Fl Fl unlink-first (x mode only) Unlink files before creating them. -Without this option, -.Nm -overwrites existing files, which preserves existing hardlinks. -With this option, existing hardlinks will be broken, as will any -symlink that would affect the location of an extracted file. +This can be a minor performance optimization if most files +already exist, but can make things slower if most files +do not already exist. +This flag also causes +.Nm +to remove intervening directory symlinks instead of +reporting an error. +See the SECURITY section below for more details. .It Fl Fl uid Ar id Use the provided user id number and ignore the user name from the archive. @@ -547,7 +593,7 @@ the name is not verified against the sys Pipe the input (in x or t mode) or the output (in c mode) through .Pa program instead of using the builtin compression support. -.It Fl v +.It Fl v , Fl Fl verbose Produce verbose output. In create and extract modes, .Nm @@ -560,18 +606,18 @@ will produce output similar to that of Additional .Fl v options will provide additional detail. -.It Fl -version +.It Fl Fl version Print version of .Nm and .Nm libarchive , and exit. -.It Fl w +.It Fl w , Fl Fl confirmation , Fl Fl interactive Ask for confirmation for every action. -.It Fl X Ar filename +.It Fl X Ar filename , Fl Fl exclude-from Ar filename Read a list of exclusion patterns from the specified file. See -.Fl -exclude +.Fl Fl exclude for more information about the handling of exclusions. .It Fl y (c mode only) @@ -582,27 +628,25 @@ Note that, unlike other .Nm tar implementations, this implementation recognizes bzip2 compression automatically when reading archives. -.It Fl z +.It Fl Z , Fl Fl compress , Fl Fl uncompress (c mode only) Compress the resulting archive with -.Xr gzip 1 . +.Xr compress 1 . In extract or list modes, this option is ignored. Note that, unlike other .Nm tar -implementations, this implementation recognizes gzip compression +implementations, this implementation recognizes compress compression automatically when reading archives. -.It Fl Z +.It Fl z , Fl Fl gunzip , Fl Fl gzip (c mode only) Compress the resulting archive with -.Xr compress 1 . +.Xr gzip 1 . In extract or list modes, this option is ignored. Note that, unlike other .Nm tar -implementations, this implementation recognizes compress compression +implementations, this implementation recognizes gzip compression automatically when reading archives. .El -.Sh EXIT STATUS -.Ex -std .Sh ENVIRONMENT The following environment variables affect the execution of .Nm : @@ -613,25 +657,21 @@ See .Xr environ 7 for more information. .It Ev TAPE -The default tape device. +The default device. The .Fl f option overrides this. +Please see the description of the +.Fl f +option above for more details. .It Ev TZ The timezone to use when displaying dates. See .Xr environ 7 for more information. .El -.Sh FILES -.Bl -tag -width ".Ev BLOCKSIZE" -.It Pa /dev/sa0 -The default tape device, if not overridden by the -.Ev TAPE -environment variable or the -.Fl f -option. -.El +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES The following creates a new archive called @@ -694,9 +734,9 @@ permissions, or names that differ from e .Dl $ tar -cvf output.tar @input.mtree .Pp The -.Fl -newer +.Fl Fl newer and -.Fl -newer-mtime +.Fl Fl newer-mtime switches accept a variety of common date and time specifications, including .Dq 12 Mar 2005 7:14:29pm , .Dq 2005-03-12 19:14 , @@ -705,7 +745,7 @@ and .Dq 19:14 PST May 1 . .Pp The -.Fl -options +.Fl Fl options argument can be used to control various details of archive generation or reading. For example, you can generate mtree output which only contains @@ -713,9 +753,9 @@ For example, you can generate mtree outp and .Cm uid keywords: -.Dl Nm Fl cf Pa file.tar Fl -format=mtree Fl -options='!all,type,time,uid' Pa dir +.Dl Nm Fl cf Pa file.tar Fl Fl format=mtree Fl Fl options='!all,type,time,uid' Pa dir or you can set the compression level used by gzip or xz compression: -.Dl Nm Fl czf Pa file.tar Fl -options='compression-level=9' . +.Dl Nm Fl czf Pa file.tar Fl Fl options='compression-level=9' . For more details, see the explanation of the .Fn archive_read_set_options and @@ -861,6 +901,7 @@ components, or symlinks to other directo .Xr mt 1 , .Xr pax 1 , .Xr shar 1 , +.Xr xz 1 , .Xr libarchive 3 , .Xr libarchive-formats 5 , .Xr tar 5 @@ -870,7 +911,7 @@ in .St -p1003.1-96 but was dropped from .St -p1003.1-2001 . -The options used by this implementation were developed by surveying a +The options supported by this implementation were developed by surveying a number of existing tar implementations as well as the old POSIX specification for tar and the current POSIX specification for pax. .Pp @@ -896,6 +937,9 @@ beginning with This is a complete re-implementation based on the .Xr libarchive 3 library. +It was first released with +.Fx 5.4 +in May, 2005. .Sh BUGS This program follows .St -p1003.1-96 @@ -905,7 +949,7 @@ option. Note that GNU tar prior to version 1.15 treated .Fl l as a synonym for the -.Fl -one-file-system +.Fl Fl one-file-system option. .Pp The @@ -983,6 +1027,3 @@ Converting between dissimilar archive fo convention can cause hard link information to be lost. (This is a consequence of the incompatible ways that different archive formats store hardlink information.) -.Pp -There are alternative long options for many of the short options that -are deliberately not documented. Modified: head/contrib/libarchive/tar/read.c ============================================================================== --- head/contrib/libarchive/tar/read.c Wed Dec 21 15:22:05 2011 (r228775) +++ head/contrib/libarchive/tar/read.c Wed Dec 21 15:30:49 2011 (r228776) @@ -103,6 +103,7 @@ progress_func(void *cookie) struct archive *a = progress_data->archive; struct archive_entry *entry = progress_data->entry; uint64_t comp, uncomp; + int compression; if (!need_report()) return; @@ -112,9 +113,13 @@ progress_func(void *cookie) if (a != NULL) { comp = archive_position_compressed(a); uncomp = archive_position_uncompressed(a); + if (comp > uncomp) + compression = 0; + else + compression = (int)((uncomp - comp) * 100 / uncomp); fprintf(stderr, "In: %s bytes, compression %d%%;", - tar_i64toa(comp), (int)((uncomp - comp) * 100 / uncomp)); + tar_i64toa(comp), compression); fprintf(stderr, " Out: %d files, %s bytes\n", archive_file_count(a), tar_i64toa(uncomp)); } @@ -214,7 +219,7 @@ read_archive(struct bsdtar *bsdtar, char } if (bsdtar->uname) archive_entry_set_uname(entry, bsdtar->uname); - if (bsdtar->gname >= 0) + if (bsdtar->gname) archive_entry_set_gname(entry, bsdtar->gname); /* Modified: head/contrib/libarchive/tar/test/test_option_s.c ============================================================================== --- head/contrib/libarchive/tar/test/test_option_s.c Wed Dec 21 15:22:05 2011 (r228775) +++ head/contrib/libarchive/tar/test/test_option_s.c Wed Dec 21 15:30:49 2011 (r228776) @@ -44,7 +44,7 @@ DEFINE_TEST(test_option_s) { struct stat st; - /* Create a sample file heirarchy. */ + /* Create a sample file hierarchy. */ assertMakeDir("in", 0755); assertMakeDir("in/d1", 0755); assertEqualInt(0, mkfile("in/d1/foo", "foo")); Modified: head/contrib/libarchive/tar/tree.c ============================================================================== --- head/contrib/libarchive/tar/tree.c Wed Dec 21 15:22:05 2011 (r228775) +++ head/contrib/libarchive/tar/tree.c Wed Dec 21 15:30:49 2011 (r228776) @@ -401,7 +401,7 @@ tree_next(struct tree *t) * violation. Just crash now. */ if (t->visit_type == TREE_ERROR_FATAL) { fprintf(stderr, "Unable to continue traversing" - " directory heirarchy after a fatal error."); + " directory hierarchy after a fatal error."); abort(); } Modified: head/contrib/libarchive/tar/util.c ============================================================================== --- head/contrib/libarchive/tar/util.c Wed Dec 21 15:22:05 2011 (r228775) +++ head/contrib/libarchive/tar/util.c Wed Dec 21 15:30:49 2011 (r228776) @@ -226,7 +226,11 @@ yes(const char *fmt, ...) fflush(stderr); l = read(2, buff, sizeof(buff) - 1); - if (l <= 0) + if (l < 0) { + fprintf(stderr, "Keyboard read failed\n"); + exit(1); + } + if (l == 0) return (0); buff[l] = 0; Modified: head/contrib/libarchive/tar/write.c ============================================================================== --- head/contrib/libarchive/tar/write.c Wed Dec 21 15:22:05 2011 (r228775) +++ head/contrib/libarchive/tar/write.c Wed Dec 21 15:30:49 2011 (r228776) @@ -751,6 +751,9 @@ write_hierarchy(struct bsdtar *bsdtar, s break; } + if (bsdtar->option_no_subdirs) + descend = 0; + /* * Are we about to cross to a new filesystem? */ @@ -763,7 +766,6 @@ write_hierarchy(struct bsdtar *bsdtar, s } else if (descend == 0) { /* We're not descending, so no need to check. */ } else if (bsdtar->option_dont_traverse_mounts) { - /* User has asked us not to cross mount points. */ descend = 0; } else { /* We're prepared to cross a mount point. */ @@ -790,8 +792,15 @@ write_hierarchy(struct bsdtar *bsdtar, s * In -u mode, check that the file is newer than what's * already in the archive; in all modes, obey --newerXXX flags. */ - if (!new_enough(bsdtar, name, st)) + if (!new_enough(bsdtar, name, st)) { + if (!descend) + continue; + if (bsdtar->option_interactive && + !yes("add '%s'", name)) + continue; + tree_descend(tree); continue; + } archive_entry_free(entry); entry = archive_entry_new(); @@ -885,8 +894,7 @@ write_hierarchy(struct bsdtar *bsdtar, s !yes("add '%s'", name)) continue; - /* Note: if user vetoes, we won't descend. */ - if (descend && !bsdtar->option_no_subdirs) + if (descend) tree_descend(tree); /* @@ -936,6 +944,7 @@ write_entry_backend(struct bsdtar *bsdta const char *pathname = archive_entry_sourcepath(entry); fd = open(pathname, O_RDONLY | O_BINARY); if (fd == -1) { + bsdtar->return_value = 1; if (!bsdtar->verbose) lafe_warnc(errno, "%s: could not open file", pathname); @@ -982,15 +991,21 @@ report_write(struct bsdtar *bsdtar, stru struct archive_entry *entry, int64_t progress) { uint64_t comp, uncomp; + int compression; + if (bsdtar->verbose) fprintf(stderr, "\n"); comp = archive_position_compressed(a); uncomp = archive_position_uncompressed(a); fprintf(stderr, "In: %d files, %s bytes;", archive_file_count(a), tar_i64toa(uncomp)); + if (comp > uncomp) + compression = 0; + else + compression = (int)((uncomp - comp) * 100 / uncomp); fprintf(stderr, " Out: %s bytes, compression %d%%\n", - tar_i64toa(comp), (int)((uncomp - comp) * 100 / uncomp)); + tar_i64toa(comp), compression); /* Can't have two calls to tar_i64toa() pending, so split the output. */ safe_fprintf(stderr, "Current: %s (%s", archive_entry_pathname(entry), @@ -1031,6 +1046,12 @@ write_file_data(struct bsdtar *bsdtar, s progress += bytes_written; bytes_read = read(fd, bsdtar->buff, FILEDATABUFLEN); } + if (bytes_read < 0) { + lafe_warnc(errno, + "%s: Read error", + archive_entry_pathname(entry)); + bsdtar->return_value = 1; + } return 0; } From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 15:33:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E22171065679; Wed, 21 Dec 2011 15:33:13 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5DE48FC1D; Wed, 21 Dec 2011 15:33:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLFXDv7074835; Wed, 21 Dec 2011 15:33:13 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLFXDh5074830; Wed, 21 Dec 2011 15:33:13 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112211533.pBLFXDh5074830@svn.freebsd.org> From: Martin Matuska Date: Wed, 21 Dec 2011 15:33:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228777 - head/contrib/libarchive/cpio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 15:33:14 -0000 Author: mm Date: Wed Dec 21 15:33:13 2011 New Revision: 228777 URL: http://svn.freebsd.org/changeset/base/228777 Log: Merge FreeBSD changes from usr.bin/cpio to contrib/libarchive/cpio: r204111 (uqs): Fix common misspelling of hierarchy r211054 (kientzle); Fix -R when used with -p. Previously, the uname and gname weren't overwritten, so the disk restore would use those to lookup the original uid/gid again. Clearing the uname and gname prevents this. r212263 (gjb): Fix typo in bsdcpio manual: s/libarchive_formats/libarchive-formats MFC after: 2 weeks Modified: head/contrib/libarchive/cpio/bsdcpio.1 head/contrib/libarchive/cpio/cmdline.c head/contrib/libarchive/cpio/cpio.c head/contrib/libarchive/cpio/cpio.h Directory Properties: head/contrib/libarchive/cpio/ (props changed) Modified: head/contrib/libarchive/cpio/bsdcpio.1 ============================================================================== --- head/contrib/libarchive/cpio/bsdcpio.1 Wed Dec 21 15:30:49 2011 (r228776) +++ head/contrib/libarchive/cpio/bsdcpio.1 Wed Dec 21 15:33:13 2011 (r228777) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 21, 2007 +.Dd September 5, 2010 .Dt BSDCPIO 1 .Os .Sh NAME @@ -140,7 +140,7 @@ The POSIX.1 tar format. The default format is .Ar odc . See -.Xr libarchive_formats 5 +.Xr libarchive-formats 5 for more complete information about the formats currently supported by the underlying .Xr libarchive 3 @@ -295,7 +295,7 @@ for more information. .Sh EXAMPLES The .Nm -command is traditionally used to copy file heirarchies in conjunction +command is traditionally used to copy file hierarchies in conjunction with the .Xr find 1 command. Modified: head/contrib/libarchive/cpio/cmdline.c ============================================================================== --- head/contrib/libarchive/cpio/cmdline.c Wed Dec 21 15:30:49 2011 (r228776) +++ head/contrib/libarchive/cpio/cmdline.c Wed Dec 21 15:33:13 2011 (r228777) @@ -285,6 +285,8 @@ cpio_getopt(struct cpio *cpio) * A period can be used instead of the colon. * * Sets uid/gid return as appropriate, -1 indicates uid/gid not specified. + * TODO: If the spec uses uname/gname, then return those to the caller + * as well. If the spec provides uid/gid, just return names as NULL. * * Returns NULL if no error, otherwise returns error string for display. * Modified: head/contrib/libarchive/cpio/cpio.c ============================================================================== --- head/contrib/libarchive/cpio/cpio.c Wed Dec 21 15:30:49 2011 (r228776) +++ head/contrib/libarchive/cpio/cpio.c Wed Dec 21 15:33:13 2011 (r228777) @@ -273,15 +273,21 @@ main(int argc, char *argv[]) cpio->quiet = 1; break; case 'R': /* GNU cpio, also --owner */ + /* TODO: owner_parse should return uname/gname + * also; use that to set [ug]name_override. */ errmsg = owner_parse(cpio->optarg, &uid, &gid); if (errmsg) { lafe_warnc(-1, "%s", errmsg); usage(); } - if (uid != -1) + if (uid != -1) { cpio->uid_override = uid; - if (gid != -1) + cpio->uname_override = NULL; + } + if (gid != -1) { cpio->gid_override = gid; + cpio->gname_override = NULL; + } break; case 'r': /* POSIX 1997 */ cpio->option_rename = 1; @@ -575,10 +581,14 @@ file_to_archive(struct cpio *cpio, const return (r); } - if (cpio->uid_override >= 0) + if (cpio->uid_override >= 0) { archive_entry_set_uid(entry, cpio->uid_override); - if (cpio->gid_override >= 0) + archive_entry_set_uname(entry, cpio->uname_override); + } + if (cpio->gid_override >= 0) { archive_entry_set_gid(entry, cpio->gid_override); + archive_entry_set_gname(entry, cpio->gname_override); + } /* * Generate a destination path for this entry. Modified: head/contrib/libarchive/cpio/cpio.h ============================================================================== --- head/contrib/libarchive/cpio/cpio.h Wed Dec 21 15:30:49 2011 (r228776) +++ head/contrib/libarchive/cpio/cpio.h Wed Dec 21 15:33:13 2011 (r228777) @@ -68,7 +68,9 @@ struct cpio { size_t pass_destpath_alloc; char *pass_destpath; int uid_override; + char *uname_override; int gid_override; + char *gname_override; int day_first; /* true if locale prefers day/mon */ /* If >= 0, then close this when done. */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 15:59:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29001106566B; Wed, 21 Dec 2011 15:59:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F256E8FC0C; Wed, 21 Dec 2011 15:59:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLFxInq075817; Wed, 21 Dec 2011 15:59:18 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLFxICX075814; Wed, 21 Dec 2011 15:59:18 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112211559.pBLFxICX075814@svn.freebsd.org> From: Dimitry Andric Date: Wed, 21 Dec 2011 15:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228779 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 15:59:19 -0000 Author: dim Date: Wed Dec 21 15:59:18 2011 New Revision: 228779 URL: http://svn.freebsd.org/changeset/base/228779 Log: Start selectively disabling a few kernel build warnings for clang, since there are some places in the kernel where fixing them is too disruptive, or where there is a false positive. In this case, disable -Wconstant-conversion for two aic7xxx-related files, as they get the following warning on i386 (and possibly on other 32-bit arches): sys/dev/aic7xxx/ahc_pci.c:112:10: warning: implicit conversion from 'long long' to 'bus_addr_t' (aka 'unsigned int') changes value from 549755813887 to 4294967295 [-Wconstant-conversion] ? 0x7FFFFFFFFFLL ~~^~~~~~~~~~~~~~ This is a false positive, since the code only passes the 0x7FFFFFFFFFLL argument, if sizeof(bus_addr_t) is larger than 4 (e.g. on 64 bit arches, or when PAE is enabled on i386). The code could be refactored to do compile-time checks, but that is more disruptive. MFC after: 1 week Modified: head/sys/conf/files head/sys/conf/kern.mk Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Dec 21 15:40:26 2011 (r228778) +++ head/sys/conf/files Wed Dec 21 15:59:18 2011 (r228779) @@ -508,8 +508,10 @@ dev/aic/aic.c optional aic dev/aic/aic_pccard.c optional aic pccard dev/aic7xxx/ahc_eisa.c optional ahc eisa dev/aic7xxx/ahc_isa.c optional ahc isa -dev/aic7xxx/ahc_pci.c optional ahc pci -dev/aic7xxx/ahd_pci.c optional ahd pci +dev/aic7xxx/ahc_pci.c optional ahc pci \ + compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" +dev/aic7xxx/ahd_pci.c optional ahd pci \ + compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" dev/aic7xxx/aic7770.c optional ahc dev/aic7xxx/aic79xx.c optional ahd pci dev/aic7xxx/aic79xx_osm.c optional ahd pci Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Wed Dec 21 15:40:26 2011 (r228778) +++ head/sys/conf/kern.mk Wed Dec 21 15:59:18 2011 (r228779) @@ -11,6 +11,13 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wn # The following flags are next up for working on: # -Wextra +# Disable a few warnings for clang, since there are several places in the +# kernel where fixing them is more trouble than it is worth, or where there is +# a false positive. +.if ${CC:T:Mclang} == "clang" +NO_WCONSTANT_CONVERSION= -Wno-constant-conversion +.endif + # # On i386, do not align the stack to 16-byte boundaries. Otherwise GCC 2.95 # and above adds code to the entry and exit point of every function to align the From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 16:36:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA4E9106566C; Wed, 21 Dec 2011 16:36:07 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C68638FC13; Wed, 21 Dec 2011 16:36:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLGa7fB077042; Wed, 21 Dec 2011 16:36:07 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLGa7Z1077025; Wed, 21 Dec 2011 16:36:07 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201112211636.pBLGa7Z1077025@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 21 Dec 2011 16:36:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228780 - in head/contrib/libstdc++: . config/os/aix include/bits include/ext include/tr1 libsupc++ src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 16:36:08 -0000 Author: pfg Date: Wed Dec 21 16:36:07 2011 New Revision: 228780 URL: http://svn.freebsd.org/changeset/base/228780 Log: Update libstdc++ with small updates from the latest rev. (135556) from the gcc 4.2 branch. The libraries in the gcc-4_2-branch remained under the LGPLv2. The changes can be reproduced with the following command: svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_2-branch/libstdc++-v3 -r 127959:135556 Reviewed by: mm Approved by: jhb (mentor) MFC after: 2 weeks Modified: head/contrib/libstdc++/ChangeLog head/contrib/libstdc++/config/os/aix/os_defines.h head/contrib/libstdc++/include/bits/allocator.h head/contrib/libstdc++/include/bits/basic_string.h head/contrib/libstdc++/include/bits/fstream.tcc head/contrib/libstdc++/include/bits/locale_facets.tcc head/contrib/libstdc++/include/ext/atomicity.h head/contrib/libstdc++/include/ext/codecvt_specializations.h head/contrib/libstdc++/include/ext/concurrence.h head/contrib/libstdc++/include/ext/vstring.h head/contrib/libstdc++/include/tr1/boost_shared_ptr.h head/contrib/libstdc++/include/tr1/random head/contrib/libstdc++/libsupc++/eh_personality.cc head/contrib/libstdc++/libsupc++/typeinfo head/contrib/libstdc++/src/valarray-inst.cc Modified: head/contrib/libstdc++/ChangeLog ============================================================================== --- head/contrib/libstdc++/ChangeLog Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/ChangeLog Wed Dec 21 16:36:07 2011 (r228780) @@ -1,3 +1,133 @@ +2008-05-19 Release Manager + + * GCC 4.2.4 released. + +2008-03-13 David Edelsohn + + Backport from mainline: + 2008-01-26 David Edelsohn + + PR target/34794 + * config/os/aix/os_defines.h: Define __COMPATMATH__. + +2008-02-14 Kaveh R. Ghazi + + * testsuite/27_io/fpos/14320-1.cc: Check for "long long" and + remove XFAIL. + +2008-02-01 Release Manager + + * GCC 4.2.3 released. + +2008-01-06 Ted Phelps + + PR c++/34152 + * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Check + _GLIBCXX_HAVE_GETIPINFO instead of HAVE_GETIPINFO. + +2008-01-05 Paolo Carlini + + PR libstdc++/34680 + + Revert: + 2007-12-17 Jonathan Wakely + * include/bits/locale_facets.tcc (has_facet, use_facet): Simplify + RTTI checks. + + 2007-12-14 Benjamin Kosnik + + PR libstdc++/30127 + PR libstdc++/34449 + * include/bits/locale_facets.tcc (use_facet): Check facet hierarchy. + (has_facet): Same. + * testsuite/22_locale/global_templates/user_facet_hierarchies.cc: New. + * testsuite/22_locale/global_templates/ + standard_facet_hierarchies.cc: New. + +2007-12-17 Jonathan Wakely + + * include/bits/locale_facets.tcc (has_facet, use_facet): Simplify + RTTI checks. + +2007-12-17 Benjamin Kosnik + + * testsuite/22_locale/global_templates/ + standard_facet_hierarchies.cc: Fix for generic locale model. + +2007-12-14 Benjamin Kosnik + + PR libstdc++/30127 + PR libstdc++/34449 + * include/bits/locale_facets.tcc (use_facet): Check facet hierarchy. + (has_facet): Same. + * testsuite/22_locale/global_templates/user_facet_hierarchies.cc: New. + * testsuite/22_locale/global_templates/ + standard_facet_hierarchies.cc: New. + +2007-11-26 Paolo Carlini + + * include/bits/locale_facets.tcc (num_put<>::_M_insert_int): When + ios_base::showpos and the type is signed and the value is zero, + prepend +. + * testsuite/22_locale/num_put/put/char/12.cc: New. + * testsuite/22_locale/num_put/put/wchar_t/12.cc: Likewise. + +2007-10-20 Paolo Carlini + + * include/tr1/random + (uniform_int<>::_M_call(_UniformRandomNumberGenerator&, result_type, + result_type, true_type)): Fix small thinko. + +2007-10-19 Paolo Carlini + + PR libstdc++/33815 + * include/tr1/random + (uniform_int<>::_M_call(_UniformRandomNumberGenerator&, result_type, + result_type, true_type)): Avoid the modulo (which uses the low-order + bits). + +2007-10-18 Paolo Carlini + + PR libstdc++/33807 + * include/bits/allocator.h (operator==(const allocator<_Tp>&, + const allocator<_Tp>&), operator!=(const allocator<_Tp>&, + const allocator<_Tp>&)): Add. + * testsuite/20_util/memory/allocator/33807.cc: New. + +2007-10-14 Jonathan Wakely + + * docs/html/Makefile: Follow up to libstdc++/14991, remove target. + +2007-10-14 Jonathan Wakely + + * src/valarray-inst.cc, include/ext/atomicity.h, + include/ext/concurrence.h, include/bits/basic_string.h, + include/bits/fstream.tcc, include/ext/vstring.h: Fix comment typos. + +2007-10-14 Jonathan Wakely + + * include/tr1_impl/boost_shared_ptr.h: (__weak_ptr::lock()): Add + missing template argument. + * testsuite/tr1/2_general_utilities/memory/shared_ptr/ + explicit_instantiation/2.cc: New. + * testsuite/tr1/2_general_utilities/memory/weak_ptr/ + explicit_instantiation/2.cc: New. + +2007-10-11 Paolo Carlini + + PR libstdc++/33734 + * include/ext/codecvt_specializations.h (encoding_state::good, + init, destroy): Use cast notation instead of reinterpret_cast. + +2007-10-07 Release Manager + + * GCC 4.2.2 released. + +2007-10-06 Benjamin Kosnik + + PR libstdc++/33678 + * libsupc++/typeinfo (typeinfo): Revert ordering of virtual components. + 2007-08-28 Paolo Carlini PR libstdc++/33128 Modified: head/contrib/libstdc++/config/os/aix/os_defines.h ============================================================================== --- head/contrib/libstdc++/config/os/aix/os_defines.h Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/config/os/aix/os_defines.h Wed Dec 21 16:36:07 2011 (r228780) @@ -1,6 +1,6 @@ // Specific definitions for AIX -*- C++ -*- -// Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc. +// Copyright (C) 2000, 2002, 2005, 2008 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -48,4 +48,9 @@ #define _ALL_SOURCE #endif +// C99 math +#ifndef __COMPATMATH__ +#define __COMPATMATH__ +#endif + #endif Modified: head/contrib/libstdc++/include/bits/allocator.h ============================================================================== --- head/contrib/libstdc++/include/bits/allocator.h Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/include/bits/allocator.h Wed Dec 21 16:36:07 2011 (r228780) @@ -115,11 +115,21 @@ _GLIBCXX_BEGIN_NAMESPACE(std) operator==(const allocator<_T1>&, const allocator<_T2>&) { return true; } + template + inline bool + operator==(const allocator<_Tp>&, const allocator<_Tp>&) + { return true; } + template inline bool operator!=(const allocator<_T1>&, const allocator<_T2>&) { return false; } + template + inline bool + operator!=(const allocator<_Tp>&, const allocator<_Tp>&) + { return false; } + // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. // NB: This syntax is a GNU extension. Modified: head/contrib/libstdc++/include/bits/basic_string.h ============================================================================== --- head/contrib/libstdc++/include/bits/basic_string.h Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/include/bits/basic_string.h Wed Dec 21 16:36:07 2011 (r228780) @@ -1672,7 +1672,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Find position of a character of C substring. * @param s String containing characters to locate. - * @param pos Index of character to search from (default 0). + * @param pos Index of character to search from. * @param n Number of characters from s to search for. * @return Index of first occurrence. * @@ -1733,7 +1733,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Find last position of a character of C substring. * @param s C string containing characters to locate. - * @param pos Index of character to search back from (default end). + * @param pos Index of character to search back from. * @param n Number of characters from s to search for. * @return Index of last occurrence. * @@ -1764,7 +1764,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Find last position of a character. * @param c Character to locate. - * @param pos Index of character to search back from (default 0). + * @param pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a pos, searches backward for @a c within this string. @@ -1794,7 +1794,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Find position of a character not in C substring. * @param s C string containing characters to avoid. - * @param pos Index of character to search from (default 0). + * @param pos Index of character to search from. * @param n Number of characters from s to consider. * @return Index of first occurrence. * @@ -1839,8 +1839,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Find last position of a character not in string. * @param str String containing characters to avoid. - * @param pos Index of character to search from (default 0). - * @return Index of first occurrence. + * @param pos Index of character to search back from (default end). + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in @a str within this string. If found, returns the index @@ -1853,9 +1853,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Find last position of a character not in C substring. * @param s C string containing characters to avoid. - * @param pos Index of character to search from (default 0). + * @param pos Index of character to search back from. * @param n Number of characters from s to consider. - * @return Index of first occurrence. + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in the first @a n characters of @a s within this string. @@ -1866,10 +1866,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const; /** - * @brief Find position of a character not in C string. + * @brief Find last position of a character not in C string. * @param s C string containing characters to avoid. - * @param pos Index of character to search from (default 0). - * @return Index of first occurrence. + * @param pos Index of character to search back from (default end). + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in @a s within this string. If found, returns the index @@ -1885,8 +1885,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Find last position of a different character. * @param c Character to avoid. - * @param pos Index of character to search from (default 0). - * @return Index of first occurrence. + * @param pos Index of character to search back from (default end). + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character other than * @a c within this string. If found, returns the index where it was Modified: head/contrib/libstdc++/include/bits/fstream.tcc ============================================================================== --- head/contrib/libstdc++/include/bits/fstream.tcc Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/include/bits/fstream.tcc Wed Dec 21 16:36:07 2011 (r228780) @@ -194,7 +194,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) const bool __testin = _M_mode & ios_base::in; if (__testin && !_M_writing) { - // Check for pback madness, and if so swich back to the + // Check for pback madness, and if so switch back to the // normal buffers and jet outta here before expensive // fileops happen... _M_destroy_pback(); Modified: head/contrib/libstdc++/include/bits/locale_facets.tcc ============================================================================== --- head/contrib/libstdc++/include/bits/locale_facets.tcc Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/include/bits/locale_facets.tcc Wed Dec 21 16:36:07 2011 (r228780) @@ -1,6 +1,7 @@ // Locale support -*- C++ -*- -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +// 2006, 2007, 2008 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -117,6 +118,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) return static_cast(*__facets[__i]); } + // Routine to access a cache for the facet. If the cache didn't // exist before, it gets constructed on the fly. template @@ -1015,13 +1017,13 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE if (__builtin_expect(__dec, true)) { // Decimal. - if (__v > 0) + if (__v >= 0) { if (__flags & ios_base::showpos && numeric_limits<_ValueT>::is_signed) *--__cs = __lit[__num_base::_S_oplus], ++__len; } - else if (__v) + else *--__cs = __lit[__num_base::_S_ominus], ++__len; } else if (__flags & ios_base::showbase && __v) Modified: head/contrib/libstdc++/include/ext/atomicity.h ============================================================================== --- head/contrib/libstdc++/include/ext/atomicity.h Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/include/ext/atomicity.h Wed Dec 21 16:36:07 2011 (r228780) @@ -42,7 +42,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) // Functions for portable atomic access. - // To abstract locking primatives across all thread policies, use: + // To abstract locking primitives across all thread policies, use: // __exchange_and_add_dispatch // __atomic_add_dispatch #ifdef _GLIBCXX_ATOMIC_BUILTINS Modified: head/contrib/libstdc++/include/ext/codecvt_specializations.h ============================================================================== --- head/contrib/libstdc++/include/ext/codecvt_specializations.h Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/include/ext/codecvt_specializations.h Wed Dec 21 16:36:07 2011 (r228780) @@ -128,7 +128,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) bool good() const throw() { - const descriptor_type __err = reinterpret_cast(-1); + const descriptor_type __err = (iconv_t)(-1); bool __test = _M_in_desc && _M_in_desc != __err; __test &= _M_out_desc && _M_out_desc != __err; return __test; @@ -166,7 +166,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) void init() { - const descriptor_type __err = reinterpret_cast(-1); + const descriptor_type __err = (iconv_t)(-1); const bool __have_encodings = _M_int_enc.size() && _M_ext_enc.size(); if (!_M_in_desc && __have_encodings) { @@ -199,7 +199,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) void destroy() throw() { - const descriptor_type __err = reinterpret_cast(-1); + const descriptor_type __err = (iconv_t)(-1); if (_M_in_desc && _M_in_desc != __err) { iconv_close(_M_in_desc); Modified: head/contrib/libstdc++/include/ext/concurrence.h ============================================================================== --- head/contrib/libstdc++/include/ext/concurrence.h Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/include/ext/concurrence.h Wed Dec 21 16:36:07 2011 (r228780) @@ -46,7 +46,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) // Available locking policies: // _S_single single-threaded code that doesn't need to be locked. // _S_mutex multi-threaded code that requires additional support - // from gthr.h or abstraction layers in concurrance.h. + // from gthr.h or abstraction layers in concurrence.h. // _S_atomic multi-threaded code using atomic operations. enum _Lock_policy { _S_single, _S_mutex, _S_atomic }; Modified: head/contrib/libstdc++/include/ext/vstring.h ============================================================================== --- head/contrib/libstdc++/include/ext/vstring.h Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/include/ext/vstring.h Wed Dec 21 16:36:07 2011 (r228780) @@ -1407,7 +1407,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * @brief Find position of a character of C substring. * @param s String containing characters to locate. - * @param pos Index of character to search from (default 0). + * @param pos Index of character to search from. * @param n Number of characters from s to search for. * @return Index of first occurrence. * @@ -1468,7 +1468,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * @brief Find last position of a character of C substring. * @param s C string containing characters to locate. - * @param pos Index of character to search back from (default end). + * @param pos Index of character to search back from. * @param n Number of characters from s to search for. * @return Index of last occurrence. * @@ -1499,7 +1499,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * @brief Find last position of a character. * @param c Character to locate. - * @param pos Index of character to search back from (default 0). + * @param pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a pos, searches backward for @a c within this string. @@ -1529,7 +1529,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * @brief Find position of a character not in C substring. * @param s C string containing characters to avoid. - * @param pos Index of character to search from (default 0). + * @param pos Index of character to search from. * @param n Number of characters from s to consider. * @return Index of first occurrence. * @@ -1574,8 +1574,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * @brief Find last position of a character not in string. * @param str String containing characters to avoid. - * @param pos Index of character to search from (default 0). - * @return Index of first occurrence. + * @param pos Index of character to search back from (default end). + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in @a str within this string. If found, returns the index @@ -1589,9 +1589,9 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * @brief Find last position of a character not in C substring. * @param s C string containing characters to avoid. - * @param pos Index of character to search from (default 0). + * @param pos Index of character to search back from. * @param n Number of characters from s to consider. - * @return Index of first occurrence. + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in the first @a n characters of @a s within this string. @@ -1602,10 +1602,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const; /** - * @brief Find position of a character not in C string. + * @brief Find last position of a character not in C string. * @param s C string containing characters to avoid. - * @param pos Index of character to search from (default 0). - * @return Index of first occurrence. + * @param pos Index of character to search back from (default end). + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in @a s within this string. If found, returns the index @@ -1621,8 +1621,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) /** * @brief Find last position of a different character. * @param c Character to avoid. - * @param pos Index of character to search from (default 0). - * @return Index of first occurrence. + * @param pos Index of character to search back from (default end). + * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character other than * @a c within this string. If found, returns the index where it was Modified: head/contrib/libstdc++/include/tr1/boost_shared_ptr.h ============================================================================== --- head/contrib/libstdc++/include/tr1/boost_shared_ptr.h Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/include/tr1/boost_shared_ptr.h Wed Dec 21 16:36:07 2011 (r228780) @@ -857,7 +857,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) // Q: How can we get here? // A: Another thread may have invalidated r after the // use_count test above. - return __shared_ptr(); + return __shared_ptr(); } #else Modified: head/contrib/libstdc++/include/tr1/random ============================================================================== --- head/contrib/libstdc++/include/tr1/random Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/include/tr1/random Wed Dec 21 16:36:07 2011 (r228780) @@ -1618,10 +1618,15 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) result_type _M_call(_UniformRandomNumberGenerator& __urng, result_type __min, result_type __max, true_type) - { + { + // XXX Must be fixed to also work when __urng.max() - __urng.min() + // is smaller than __max - __min. typedef typename __gnu_cxx::__add_unsigned::__type __utype; - return result_type(__utype(__urng()) % (__max - __min + 1)) + __min; + return result_type((__max - __min + 1.0L) + * (__utype(__urng()) - __utype(__urng.min())) + / (__utype(__urng.max()) + - __utype(__urng.min()) + 1.0L)) + __min; } template Modified: head/contrib/libstdc++/libsupc++/eh_personality.cc ============================================================================== --- head/contrib/libstdc++/libsupc++/eh_personality.cc Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/libsupc++/eh_personality.cc Wed Dec 21 16:36:07 2011 (r228780) @@ -1,5 +1,5 @@ // -*- C++ -*- The GNU C++ exception personality routine. -// Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2006, 2008 Free Software Foundation, Inc. // // This file is part of GCC. // @@ -434,7 +434,7 @@ PERSONALITY_FUNCTION (int version, // Parse the LSDA header. p = parse_lsda_header (context, language_specific_data, &info); info.ttype_base = base_of_encoded_value (info.ttype_encoding, context); -#ifdef HAVE_GETIPINFO +#ifdef _GLIBCXX_HAVE_GETIPINFO ip = _Unwind_GetIPInfo (context, &ip_before_insn); #else ip = _Unwind_GetIP (context); Modified: head/contrib/libstdc++/libsupc++/typeinfo ============================================================================== --- head/contrib/libstdc++/libsupc++/typeinfo Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/libsupc++/typeinfo Wed Dec 21 16:36:07 2011 (r228780) @@ -99,7 +99,13 @@ namespace std #endif bool operator!=(const type_info& __arg) const { return !operator==(__arg); } - + + // Return true if this is a pointer type of some kind + virtual bool __is_pointer_p() const; + + // Return true if this is a function type + virtual bool __is_function_p() const; + // Try and catch a thrown type. Store an adjusted pointer to the // caught type in THR_OBJ. If THR_TYPE is not a pointer type, then // THR_OBJ points to the thrown object. If THR_TYPE is a pointer @@ -113,12 +119,6 @@ namespace std virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, void **__obj_ptr) const; - // Return true if this is a pointer type of some kind - virtual bool __is_pointer_p() const; - - // Return true if this is a function type - virtual bool __is_function_p() const; - protected: const char *__name; Modified: head/contrib/libstdc++/src/valarray-inst.cc ============================================================================== --- head/contrib/libstdc++/src/valarray-inst.cc Wed Dec 21 15:59:18 2011 (r228779) +++ head/contrib/libstdc++/src/valarray-inst.cc Wed Dec 21 16:36:07 2011 (r228780) @@ -68,7 +68,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) __gslice_to_index(size_t __o, const valarray& __l, const valarray& __s, valarray& __i) { - // There are as much as dimensions as there are strides. + // There are as many dimensions as there are strides. size_t __n = __l.size(); // Get a buffer to hold current multi-index as we go through From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 16:38:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84922106566C; Wed, 21 Dec 2011 16:38:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73FC28FC15; Wed, 21 Dec 2011 16:38:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLGccvT077144; Wed, 21 Dec 2011 16:38:38 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLGccDC077141; Wed, 21 Dec 2011 16:38:38 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112211638.pBLGccDC077141@svn.freebsd.org> From: Dimitry Andric Date: Wed, 21 Dec 2011 16:38:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228781 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 16:38:38 -0000 Author: dim Date: Wed Dec 21 16:38:37 2011 New Revision: 228781 URL: http://svn.freebsd.org/changeset/base/228781 Log: When building with clang, disable -Warray-bounds for sys/dev/asr/asr.c, as it gets the following warning: sys/dev/asr/asr.c:1836:29: warning: array index of '58' indexes past the end of an array (that contains 1 element) [-Warray-bounds] while ((len > 0) && (sg < &((PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE) ^ sys/dev/asr/i2omsg.h:934:8: note: array 'Simple' declared here I2O_SGE_SIMPLE_ELEMENT Simple[1]; ^ This is a false positive, since I2O_SG_ELEMENT::Simple is not declared as a C99 flexible array member, but in the old (but more portable) way. At run-time, the proper number of array elements will hopefully have been allocated. MFC after: 1 week Modified: head/sys/conf/files head/sys/conf/kern.mk Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Dec 21 16:36:07 2011 (r228780) +++ head/sys/conf/files Wed Dec 21 16:38:37 2011 (r228781) @@ -531,7 +531,8 @@ dev/an/if_an.c optional an dev/an/if_an_isa.c optional an isa dev/an/if_an_pccard.c optional an pccard dev/an/if_an_pci.c optional an pci -dev/asr/asr.c optional asr pci +dev/asr/asr.c optional asr pci \ + compile-with "${NORMAL_C} ${NO_WARRAY_BOUNDS}" # dev/ata/ata_if.m optional ata | atacore dev/ata/ata-all.c optional ata | atacore Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Wed Dec 21 16:36:07 2011 (r228780) +++ head/sys/conf/kern.mk Wed Dec 21 16:38:37 2011 (r228781) @@ -16,6 +16,7 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wn # a false positive. .if ${CC:T:Mclang} == "clang" NO_WCONSTANT_CONVERSION= -Wno-constant-conversion +NO_WARRAY_BOUNDS= -Wno-array-bounds .endif # From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 16:47:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C744B106566B; Wed, 21 Dec 2011 16:47:01 +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 B68978FC0C; Wed, 21 Dec 2011 16:47:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLGl1kH077442; Wed, 21 Dec 2011 16:47:01 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLGl1G1077440; Wed, 21 Dec 2011 16:47:01 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112211647.pBLGl1G1077440@svn.freebsd.org> From: Ed Schouten Date: Wed, 21 Dec 2011 16:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228782 - head/sys/boot/i386/libi386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 16:47:01 -0000 Author: ed Date: Wed Dec 21 16:47:01 2011 New Revision: 228782 URL: http://svn.freebsd.org/changeset/base/228782 Log: Make the RTC checking for QEMU even more aggressive. At work, where we use use KVM+QEMU, we notice that pxeboot is pratically impossible because of network timeouts. This is due to the fact that the RTC code makes aggressive jumps. Two RTC reads does not seem to be sufficient. Change the code to check for 8 identical RTC values. Sponsored by: Kumina bv Modified: head/sys/boot/i386/libi386/time.c Modified: head/sys/boot/i386/libi386/time.c ============================================================================== --- head/sys/boot/i386/libi386/time.c Wed Dec 21 16:38:37 2011 (r228781) +++ head/sys/boot/i386/libi386/time.c Wed Dec 21 16:47:01 2011 (r228782) @@ -62,7 +62,7 @@ bios_seconds(void) * Some BIOSes (notably qemu) don't correctly read the RTC * registers in an atomic way, sometimes returning bogus values. * Therefore we "debounce" the reading by accepting it only when - * we got two identical values in succession. + * we got 8 identical values in succession. * * If we pass midnight, don't wrap back to 0. */ @@ -71,14 +71,16 @@ time(time_t *t) { static time_t lasttime; time_t now, check; - int try; + int same, try; - try = 0; + same = try = 0; check = bios_seconds(); do { now = check; check = bios_seconds(); - } while (now != check && ++try < 1000); + if (check != now) + same = 0; + } while (++same < 8 && ++try < 1000); if (now < lasttime) now += 24 * 3600; From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 16:56:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E02881065673; Wed, 21 Dec 2011 16:56:18 +0000 (UTC) (envelope-from andrey@zonov.org) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id F14808FC13; Wed, 21 Dec 2011 16:56:17 +0000 (UTC) Received: by wgbds13 with SMTP id ds13so10855707wgb.1 for ; Wed, 21 Dec 2011 08:56:16 -0800 (PST) Received: by 10.216.131.72 with SMTP id l50mr9308367wei.28.1324484993469; Wed, 21 Dec 2011 08:29:53 -0800 (PST) Received: from [10.254.254.77] (ppp95-165-154-46.pppoe.spdop.ru. [95.165.154.46]) by mx.google.com with ESMTPS id fq7sm6422690wbb.1.2011.12.21.08.29.49 (version=SSLv3 cipher=OTHER); Wed, 21 Dec 2011 08:29:53 -0800 (PST) Message-ID: <4EF2097D.10203@zonov.org> Date: Wed, 21 Dec 2011 20:29:49 +0400 From: Andrey Zonov User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: Jack F Vogel References: <201112100708.pBA78qSp070948@svn.freebsd.org> In-Reply-To: <201112100708.pBA78qSp070948@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228387 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 16:56:19 -0000 Could you please back sysctls from r223676 for igb? On 10.12.2011 11:08, Jack F Vogel wrote: > Author: jfv > Date: Sat Dec 10 07:08:52 2011 > New Revision: 228387 > URL: http://svn.freebsd.org/changeset/base/228387 > -- Andrey Zonov From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 17:01:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4768106566B; Wed, 21 Dec 2011 17:01:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B99508FC0A; Wed, 21 Dec 2011 17:01:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLH1DLj077985; Wed, 21 Dec 2011 17:01:13 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLH1DpL077981; Wed, 21 Dec 2011 17:01:13 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112211701.pBLH1DpL077981@svn.freebsd.org> From: Dimitry Andric Date: Wed, 21 Dec 2011 17:01:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228783 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 17:01:14 -0000 Author: dim Date: Wed Dec 21 17:01:13 2011 New Revision: 228783 URL: http://svn.freebsd.org/changeset/base/228783 Log: When building with clang, disable -Wshift-count-negative and -Wshift-count-overflow for sys/dev/ath/ath_hal/ah_regdomain.c, as it gets multiple instances of the following warnings: In file included from sys/dev/ath/ath_hal/ah_regdomain.c:99: sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:69:15: warning: shift count is negative [-Wshift-count-negative] .chan11a = BM4(F1_4950_4980, ^~~~~~~~~~~~~~~~~ sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:41:4: note: expanded from: W1(_fa) | W1(_fb) | W1(_fc) | W1(_fd) } ^ sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:34:45: note: expanded from: (((_a) > 63 && (_a) < 128 ? (((uint64_t) 1)<<((_a)-64)) : (uint64_t) 0)) ^ ~~~~~~~~~ and: In file included from sys/dev/ath/ath_hal/ah_regdomain.c:99: sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:629:15: error: shift count >= width of type [-Werror,-Wshift-count-overflow] .chan11a = BM4(W2_5260_5320, ^~~~~~~~~~~~~~~~~ sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:40:34: note: expanded from: { W0(_fa) | W0(_fb) | W0(_fc) | W0(_fd), \ ^ sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:32:44: note: expanded from: (((_a) >= 0 && (_a) < 64 ? (((uint64_t) 1)<<(_a)) : (uint64_t) 0)) ^ ~~~~ Both warnings are false positives, caused by LLVM PR 10030. For global initializations, clang fails to detect that the branch of the ternary operator causing the warning is dead. MFC after: 1 week Modified: head/sys/conf/files head/sys/conf/kern.mk Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Dec 21 16:47:01 2011 (r228782) +++ head/sys/conf/files Wed Dec 21 17:01:13 2011 (r228783) @@ -613,7 +613,7 @@ dev/ath/ath_hal/ah_eeprom_9287.c \ optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_regdomain.c optional ath \ - compile-with "${NORMAL_C} -I$S/dev/ath" + compile-with "${NORMAL_C} ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW} -I$S/dev/ath" # ar5210 dev/ath/ath_hal/ar5210/ar5210_attach.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Wed Dec 21 16:47:01 2011 (r228782) +++ head/sys/conf/kern.mk Wed Dec 21 17:01:13 2011 (r228783) @@ -17,6 +17,8 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wn .if ${CC:T:Mclang} == "clang" NO_WCONSTANT_CONVERSION= -Wno-constant-conversion NO_WARRAY_BOUNDS= -Wno-array-bounds +NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative +NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow .endif # From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 17:03:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26F50106566C; Wed, 21 Dec 2011 17:03:31 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 166AD8FC08; Wed, 21 Dec 2011 17:03:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLH3U3A078087; Wed, 21 Dec 2011 17:03:30 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLH3Um5078085; Wed, 21 Dec 2011 17:03:30 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201112211703.pBLH3Um5078085@svn.freebsd.org> From: Jaakko Heinonen Date: Wed, 21 Dec 2011 17:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228784 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 17:03:31 -0000 Author: jh Date: Wed Dec 21 17:03:30 2011 New Revision: 228784 URL: http://svn.freebsd.org/changeset/base/228784 Log: Follow style(9) more closely in the example. Modified: head/share/man/man9/sbuf.9 Modified: head/share/man/man9/sbuf.9 ============================================================================== --- head/share/man/man9/sbuf.9 Wed Dec 21 17:01:13 2011 (r228783) +++ head/share/man/man9/sbuf.9 Wed Dec 21 17:03:30 2011 (r228784) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 9, 2011 +.Dd December 21, 2011 .Dt SBUF 9 .Os .Sh NAME @@ -495,8 +495,8 @@ TAILQ_FOREACH(foo, &foolist, list) { sbuf_printf(sb, " Address: %s\en", foo->address); sbuf_printf(sb, " Zip: %s\en", foo->zipcode); } -if (sbuf_finish(sb)) /* Check for any and all errors */ - err(1,"Could not generate message"); +if (sbuf_finish(sb) != 0) /* Check for any and all errors */ + err(1, "Could not generate message"); transmit_msg(sbuf_data(sb), sbuf_len(sb)); sbuf_delete(sb); .Ed From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 17:16:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32E651065670; Wed, 21 Dec 2011 17:16:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1817D8FC18; Wed, 21 Dec 2011 17:16:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLHGhaB078510; Wed, 21 Dec 2011 17:16:43 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLHGhDH078507; Wed, 21 Dec 2011 17:16:43 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112211716.pBLHGhDH078507@svn.freebsd.org> From: Dimitry Andric Date: Wed, 21 Dec 2011 17:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228785 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 17:16:44 -0000 Author: dim Date: Wed Dec 21 17:16:43 2011 New Revision: 228785 URL: http://svn.freebsd.org/changeset/base/228785 Log: Fix shift overflow problem in sys/dev/ath/ath_hal/ar5210/ar5210_power.c and sys/dev/ath/ath_hal/ar5211/ar5211_power.c: sys/dev/ath/ath_hal/ar5210/ar5210_power.c:36:3: warning: signed shift result (0x200000000) requires 35 bits to represent, but 'int' only has 32 bits [-Wshift-overflow] OS_REG_RMW_FIELD(ah, AR_SCR, AR_SCR_SLE, AR_SCR_SLE_ALLOW); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sys/dev/ath/ath_hal/ah_internal.h:472:42: note: expanded from: (OS_REG_READ(_a, _r) &~ (_f)) | (((_v) << _f##_S) & (_f))) ^ sys/dev/ath/ah_osdep.h:127:49: note: expanded from: (bus_space_handle_t)(_ah)->ah_sh, (_reg), (_val)) ^~~~ The AR_SCR_SLE_{WAKE,SLP,NORM} values are pre-shifted in ar5210reg.h and ar5211reg.h, while they should be unshifted, like in ar5212reg.h. Then, when the OS_REG_RMW_FIELD() macro shifts them again, the values will overflow, becoming effectively zero. MFC after: 1 week Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Wed Dec 21 17:03:30 2011 (r228784) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Wed Dec 21 17:16:43 2011 (r228785) @@ -245,9 +245,9 @@ #define AR_SCR_SLDUR 0x0000ffff /* sleep duration */ #define AR_SCR_SLE 0x00030000 /* sleep enable */ #define AR_SCR_SLE_S 16 -#define AR_SCR_SLE_WAKE 0x00000000 /* force wake */ -#define AR_SCR_SLE_SLP 0x00010000 /* force sleep */ -#define AR_SCR_SLE_ALLOW 0x00020000 /* allow to control sleep */ +#define AR_SCR_SLE_WAKE 0 /* force wake */ +#define AR_SCR_SLE_SLP 1 /* force sleep */ +#define AR_SCR_SLE_ALLOW 2 /* allow to control sleep */ #define AR_SCR_BITS "\20\20SLE_SLP\21SLE_ALLOW" #define AR_INTPEND_IP 0x00000001 /* interrupt pending */ Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Wed Dec 21 17:03:30 2011 (r228784) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Wed Dec 21 17:16:43 2011 (r228785) @@ -618,9 +618,9 @@ #define AR_SCR_SLDUR_S 0 #define AR_SCR_SLE 0x00030000 /* sleep enable mask */ #define AR_SCR_SLE_S 16 /* sleep enable bits shift */ -#define AR_SCR_SLE_WAKE 0x00000000 /* force wake */ -#define AR_SCR_SLE_SLP 0x00010000 /* force sleep */ -#define AR_SCR_SLE_NORM 0x00020000 /* sleep logic normal operation */ +#define AR_SCR_SLE_WAKE 0 /* force wake */ +#define AR_SCR_SLE_SLP 1 /* force sleep */ +#define AR_SCR_SLE_NORM 2 /* sleep logic normal operation */ #define AR_SCR_SLE_UNITS 0x00000008 /* SCR units/TU */ #define AR_SCR_BITS "\20\20SLE_SLP\21SLE" From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 17:36:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2884106564A; Wed, 21 Dec 2011 17:36:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9703D8FC08; Wed, 21 Dec 2011 17:36:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLHajML079132; Wed, 21 Dec 2011 17:36:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLHaj8O079129; Wed, 21 Dec 2011 17:36:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112211736.pBLHaj8O079129@svn.freebsd.org> From: Dimitry Andric Date: Wed, 21 Dec 2011 17:36:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228786 - in head/sys/dev/ath/ath_hal: ar5212 ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 17:36:45 -0000 Author: dim Date: Wed Dec 21 17:36:45 2011 New Revision: 228786 URL: http://svn.freebsd.org/changeset/base/228786 Log: Fix enum conversion problems in sys/dev/ath/ath_hal/ar5212/ar5212_misc.c and sys/dev/ath/ath_hal/ar5416/ar5416_misc.c: sys/dev/ath/ath_hal/ar5212/ar5212_misc.c:577:24: warning: implicit conversion from enumeration type 'HAL_STATUS' to different enumeration type 'HAL_BOOL' [-Wconversion] return HAL_EINVAL; ~~~~~~ ^~~~~~~~~~ and: sys/dev/ath/ath_hal/ar5416/ar5416_misc.c:164:9: warning: implicit conversion from enumeration type 'HAL_STATUS' to different enumeration type 'HAL_BOOL' [-Wconversion] return HAL_OK; ~~~~~~ ^~~~~~ In both cases, enums HAL_BOOL and HAL_STATUS are mixed up. MFC after: 1 week Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Wed Dec 21 17:16:43 2011 (r228785) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Wed Dec 21 17:36:45 2011 (r228786) @@ -574,7 +574,7 @@ ar5212SetDecompMask(struct ath_hal *ah, struct ath_hal_5212 *ahp = AH5212(ah); if (keyidx >= HAL_DECOMP_MASK_SIZE) - return HAL_EINVAL; + return AH_FALSE; OS_REG_WRITE(ah, AR_DCM_A, keyidx); OS_REG_WRITE(ah, AR_DCM_D, en ? AR_DCM_D_EN : 0); ahp->ah_decompMask[keyidx] = en; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Wed Dec 21 17:16:43 2011 (r228785) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Wed Dec 21 17:36:45 2011 (r228786) @@ -161,7 +161,7 @@ ar5416SetAntennaSwitch(struct ath_hal *a HAL_BOOL ar5416SetDecompMask(struct ath_hal *ah, uint16_t keyidx, int en) { - return HAL_OK; + return AH_TRUE; } /* Setup coverage class */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 17:51:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1168106564A; Wed, 21 Dec 2011 17:51:49 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B04E48FC08; Wed, 21 Dec 2011 17:51:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLHpnb8079606; Wed, 21 Dec 2011 17:51:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLHpn2E079604; Wed, 21 Dec 2011 17:51:49 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201112211751.pBLHpn2E079604@svn.freebsd.org> From: Eitan Adler Date: Wed, 21 Dec 2011 17:51:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228787 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 17:51:49 -0000 Author: eadler (ports committer) Date: Wed Dec 21 17:51:49 2011 New Revision: 228787 URL: http://svn.freebsd.org/changeset/base/228787 Log: - Remove extra space Submitted by: Davide Italiano Approved by: brucec Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Wed Dec 21 17:36:45 2011 (r228786) +++ head/sys/dev/hwpmc/hwpmc_core.c Wed Dec 21 17:51:49 2011 (r228787) @@ -1721,7 +1721,7 @@ iap_allocate_pmc(int cpu, int ri, struct if (core_cputype == PMC_CPU_INTEL_COREI7 && ev == PMC_EV_IAP_EVENT_BBH_01H) return (EINVAL); - if ( a->pm_md.pm_iap.pm_iap_rsp & ~IA_OFFCORE_RSP_MASK) + if (a->pm_md.pm_iap.pm_iap_rsp & ~IA_OFFCORE_RSP_MASK) return (EINVAL); pm->pm_md.pm_iap.pm_iap_rsp = a->pm_md.pm_iap.pm_iap_rsp & IA_OFFCORE_RSP_MASK; From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 18:46:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A8471065672; Wed, 21 Dec 2011 18:46:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 715988FC13; Wed, 21 Dec 2011 18:46:29 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 294AD46B1A; Wed, 21 Dec 2011 13:46:29 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8EEE6B964; Wed, 21 Dec 2011 13:46:28 -0500 (EST) From: John Baldwin To: Andrey Zonov Date: Wed, 21 Dec 2011 13:46:27 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201112100708.pBA78qSp070948@svn.freebsd.org> <4EF2097D.10203@zonov.org> In-Reply-To: <4EF2097D.10203@zonov.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201112211346.27395.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 21 Dec 2011 13:46:28 -0500 (EST) Cc: Jack F Vogel , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228387 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 18:46:29 -0000 On Wednesday, December 21, 2011 11:29:49 am Andrey Zonov wrote: > Could you please back sysctls from r223676 for igb? Oof, I even sent those ahead of time explicitly so they could be merged into Intel's tree to avoid this exact problem. :( > On 10.12.2011 11:08, Jack F Vogel wrote: > > Author: jfv > > Date: Sat Dec 10 07:08:52 2011 > > New Revision: 228387 > > URL: http://svn.freebsd.org/changeset/base/228387 > > > > -- > Andrey Zonov > > -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 18:50:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 0DDB11065672; Wed, 21 Dec 2011 18:50:43 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 85EF514DDC9; Wed, 21 Dec 2011 18:50:42 +0000 (UTC) Message-ID: <4EF22A82.3090305@FreeBSD.org> Date: Wed, 21 Dec 2011 10:50:42 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Steve Kargl References: <201111291946.pATJkHMs064094@svn.freebsd.org> <20111220171740.X1005@besplex.bde.org> <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> <201112200908.57306.jhb@freebsd.org> <4EF13F23.9060601@FreeBSD.org> <4EF14833.1090601@FreeBSD.org> <20111221045537.GA99900@troutmask.apl.washington.edu> <20111221055932.GA250@troutmask.apl.washington.edu> In-Reply-To: <20111221055932.GA250@troutmask.apl.washington.edu> X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Garrett Cooper , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ben Kaduk Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 18:50:43 -0000 On 12/20/2011 9:59 PM, Steve Kargl wrote: > On Tue, Dec 20, 2011 at 09:30:10PM -0800, Garrett Cooper wrote: >> On Tue, Dec 20, 2011 at 8:55 PM, Steve Kargl >> wrote: >>> On Tue, Dec 20, 2011 at 06:45:07PM -0800, Doug Barton wrote: >>>> On 12/20/2011 18:29, Ben Kaduk wrote: >>>>> 2011/12/20 Doug Barton : >>>>>> On 12/20/2011 06:08, John Baldwin wrote: >>>>>>> The defaults for src.conf should be for the common case >>>>>> >>>>>> Agreed. The problem we seem to be missing here is that developers are >>>>>> not even statistically significant in measuring "the common case." >>>>> >>>>> "The common case" of what, though? ?"People using src.conf", or >>>>> "people rebuilding world", or just "people using FreeBSD"? >>>> >>>> The latter of course. The overwhelming majority of FreeBSD users will >>>> never use profiled libs, and in fact don't even know what they are. It's >>>> just useless space being taken up on every install. The defaults should >>>> be sensible for our users. >>> >>> OK, Doug, we get it! You don't like profiled libraries. >>> You don't use them, and by extension the 'common user' >>> does not use them. It's not about me. :) (And by extension, it's not about you either.) >> The point that I was trying to drive home (that I think Doug is as well) is: >> - How many FreeBSD users are developers/performance/test engineers who >> care about this stuff being compiled into the base system? > > Don't know. I haven't seen a statistically meaningful poll of > the FreeBSD user base on which to draw an answer. I suspect that > neither you nor Doug have seen such a poll. Oh please. It doesn't take a poll to know that the overwhelming majority of FreeBSD installs are servers or end-user systems. > Neither the time to build profiled libraries nor the diskspace > used is significant. Great, so why is it such a problem for you to build them? Doug -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 19:48:20 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 939471065676; Wed, 21 Dec 2011 19:48:20 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 6BCE78FC15; Wed, 21 Dec 2011 19:48:20 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id pBLJmK6x016860; Wed, 21 Dec 2011 11:48:20 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id pBLJmJdJ016859; Wed, 21 Dec 2011 11:48:19 -0800 (PST) (envelope-from sgk) Date: Wed, 21 Dec 2011 11:48:19 -0800 From: Steve Kargl To: Doug Barton Message-ID: <20111221194819.GA14294@troutmask.apl.washington.edu> References: <20111220171740.X1005@besplex.bde.org> <8CCE4DDE-B203-42FF-A2FA-9106403DE077@FreeBSD.org> <201112200908.57306.jhb@freebsd.org> <4EF13F23.9060601@FreeBSD.org> <4EF14833.1090601@FreeBSD.org> <20111221045537.GA99900@troutmask.apl.washington.edu> <20111221055932.GA250@troutmask.apl.washington.edu> <4EF22A82.3090305@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EF22A82.3090305@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: Garrett Cooper , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ben Kaduk Subject: Re: svn commit: r228143 - in head: . share/mk tools/build/options X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 19:48:20 -0000 On Wed, Dec 21, 2011 at 10:50:42AM -0800, Doug Barton wrote: > On 12/20/2011 9:59 PM, Steve Kargl wrote: > > On Tue, Dec 20, 2011 at 09:30:10PM -0800, Garrett Cooper wrote: > >> On Tue, Dec 20, 2011 at 8:55 PM, Steve Kargl > >> wrote: > >>> On Tue, Dec 20, 2011 at 06:45:07PM -0800, Doug Barton wrote: > >>>> On 12/20/2011 18:29, Ben Kaduk wrote: > >>>>> 2011/12/20 Doug Barton : > >>>>>> On 12/20/2011 06:08, John Baldwin wrote: > >>>>>>> The defaults for src.conf should be for the common case > >>>>>> > >>>>>> Agreed. The problem we seem to be missing here is that developers are > >>>>>> not even statistically significant in measuring "the common case." > >>>>> > >>>>> "The common case" of what, though? ?"People using src.conf", or > >>>>> "people rebuilding world", or just "people using FreeBSD"? > >>>> > >>>> The latter of course. The overwhelming majority of FreeBSD users will > >>>> never use profiled libs, and in fact don't even know what they are. It's > >>>> just useless space being taken up on every install. The defaults should > >>>> be sensible for our users. > >>> > >>> OK, Doug, we get it! You don't like profiled libraries. > >>> You don't use them, and by extension the 'common user' > >>> does not use them. > > It's not about me. :) (And by extension, it's not about you either.) > >i> Thi point that I was trying to drive home (that I think Doug is as well) is: > >> - How many FreeBSD users are developers/performance/test engineers who > >> care about this stuff being compiled into the base system? > > > > Don't know. I haven't seen a statistically meaningful poll of > > the FreeBSD user base on which to draw an answer. I suspect that > > neither you nor Doug have seen such a poll. > > Oh please. It doesn't take a poll to know that the overwhelming majority > of FreeBSD installs are servers or end-user systems. Well, let's take it to a logical conclusion. What other knobs should default to off? WITHOUT_TOOLCHAIN may be appropriate for the segment of the user base who simply want a server. Clearly, end-users, who do not need profiled libraries, do not do software development so this knob seems appropriate. Well, if these end-users aren't doing software development, we might as well set WITHOUT_MAKE. My experience with 'common users' and reading through freebsd-questions suggests that manpages are useless, so please set WITHOUT_MAN. And since we aren't building manpages, we might as well set WITHOUT_GROFF. There, the system is neutered for the convenience of our end-users. > > Neither the time to build profiled libraries nor the diskspace > > used is significant. > > Great, so why is it such a problem for you to build them? > It is not a problem because the libraries are built by default. :-) Of course, there is the converse. Why is it a problem for you to turn off building profiled libaries? -- Steve From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 20:10:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E3541065673; Wed, 21 Dec 2011 20:10:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C94A8FC15; Wed, 21 Dec 2011 20:10:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLKACZV083961; Wed, 21 Dec 2011 20:10:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLKACRJ083958; Wed, 21 Dec 2011 20:10:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112212010.pBLKACRJ083958@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Dec 2011 20:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228788 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 20:10:12 -0000 Author: jhb Date: Wed Dec 21 20:10:11 2011 New Revision: 228788 URL: http://svn.freebsd.org/changeset/base/228788 Log: Restore the sysctl changes from 223676 and 227309 lost in the previous import: - Add read-only sysctls for all of the tunables supported by the igb and em drivers. - Make the per-instance 'enable_aim' sysctl truly per-instance by having it change a per-instance variable (which is used to control AIM) rather than having all of the per-instance sysctls operate on a single global variable. While here, restore the previously existing hw.igb.rx_processing_limit tunable as it is very useful to be able to set a default tunable that applies to all adapters in the system. Modified: head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_igb.h Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Wed Dec 21 17:51:49 2011 (r228787) +++ head/sys/dev/e1000/if_igb.c Wed Dec 21 20:10:11 2011 (r228788) @@ -299,11 +299,17 @@ MODULE_DEPEND(igb, ether, 1, 1, 1); * Tunable default values. *********************************************************************/ +static SYSCTL_NODE(_hw, OID_AUTO, igb, CTLFLAG_RD, 0, "IGB driver parameters"); + /* Descriptor defaults */ static int igb_rxd = IGB_DEFAULT_RXD; static int igb_txd = IGB_DEFAULT_TXD; TUNABLE_INT("hw.igb.rxd", &igb_rxd); TUNABLE_INT("hw.igb.txd", &igb_txd); +SYSCTL_INT(_hw_igb, OID_AUTO, rxd, CTLFLAG_RDTUN, &igb_rxd, 0, + "Number of receive descriptors per queue"); +SYSCTL_INT(_hw_igb, OID_AUTO, txd, CTLFLAG_RDTUN, &igb_txd, 0, + "Number of transmit descriptors per queue"); /* ** AIM: Adaptive Interrupt Moderation @@ -313,6 +319,8 @@ TUNABLE_INT("hw.igb.txd", &igb_txd); */ static int igb_enable_aim = TRUE; TUNABLE_INT("hw.igb.enable_aim", &igb_enable_aim); +SYSCTL_INT(_hw_igb, OID_AUTO, enable_aim, CTLFLAG_RW, &igb_enable_aim, 0, + "Enable adaptive interrupt moderation"); /* * MSIX should be the default for best performance, @@ -320,12 +328,16 @@ TUNABLE_INT("hw.igb.enable_aim", &igb_en */ static int igb_enable_msix = 1; TUNABLE_INT("hw.igb.enable_msix", &igb_enable_msix); +SYSCTL_INT(_hw_igb, OID_AUTO, enable_msix, CTLFLAG_RDTUN, &igb_enable_msix, 0, + "Enable MSI-X interrupts"); /* ** Tuneable Interrupt rate */ static int igb_max_interrupt_rate = 8000; TUNABLE_INT("hw.igb.max_interrupt_rate", &igb_max_interrupt_rate); +SYSCTL_INT(_hw_igb, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, + &igb_max_interrupt_rate, 0, "Maximum interrupts per second"); /* ** Header split causes the packet header to @@ -337,6 +349,8 @@ TUNABLE_INT("hw.igb.max_interrupt_rate", */ static int igb_header_split = FALSE; TUNABLE_INT("hw.igb.hdr_split", &igb_header_split); +SYSCTL_INT(_hw_igb, OID_AUTO, header_split, CTLFLAG_RDTUN, &igb_header_split, 0, + "Enable receive mbuf header split"); /* ** This will autoconfigure based on @@ -344,6 +358,15 @@ TUNABLE_INT("hw.igb.hdr_split", &igb_hea */ static int igb_num_queues = 0; TUNABLE_INT("hw.igb.num_queues", &igb_num_queues); +SYSCTL_INT(_hw_igb, OID_AUTO, num_queues, CTLFLAG_RDTUN, &igb_num_queues, 0, + "Number of queues to configure, 0 indicates autoconfigure"); + +/* How many packets rxeof tries to clean at a time */ +static int igb_rx_process_limit = 100; +TUNABLE_INT("hw.igb.rx_process_limit", &igb_rx_process_limit); +SYSCTL_INT(_hw_igb, OID_AUTO, rx_process_limit, CTLFLAG_RDTUN, + &igb_rx_process_limit, 0, + "Maximum number of received packets to process at a time, -1 means unlimited"); /********************************************************************* * Device identification routine @@ -430,10 +453,9 @@ igb_attach(device_t dev) OID_AUTO, "nvm", CTLTYPE_INT|CTLFLAG_RW, adapter, 0, igb_sysctl_nvm_info, "I", "NVM Information"); - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "enable_aim", CTLTYPE_INT|CTLFLAG_RW, - &igb_enable_aim, 1, "Interrupt Moderation"); + igb_set_sysctl_value(adapter, "enable_aim", + "Interrupt Moderation", &adapter->enable_aim, + igb_enable_aim); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), @@ -464,7 +486,7 @@ igb_attach(device_t dev) /* Sysctl for limiting the amount of work done in the taskqueue */ igb_set_sysctl_value(adapter, "rx_processing_limit", "max number of rx packets to process", - &adapter->rx_process_limit, 100); + &adapter->rx_process_limit, igb_rx_process_limit); /* * Validate number of transmit and receive descriptors. It @@ -1463,7 +1485,7 @@ igb_msix_que(void *arg) more_rx = igb_rxeof(que, adapter->rx_process_limit, NULL); - if (igb_enable_aim == FALSE) + if (adapter->enable_aim == FALSE) goto no_calc; /* ** Do Adaptive Interrupt Moderation: Modified: head/sys/dev/e1000/if_igb.h ============================================================================== --- head/sys/dev/e1000/if_igb.h Wed Dec 21 17:51:49 2011 (r228787) +++ head/sys/dev/e1000/if_igb.h Wed Dec 21 20:10:11 2011 (r228788) @@ -405,6 +405,7 @@ struct adapter { u16 link_duplex; u32 smartspeed; u32 dmac; + int enable_aim; /* Interface queues */ struct igb_queue *queues; From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 20:23:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1AE9106564A; Wed, 21 Dec 2011 20:23:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 905E98FC0C; Wed, 21 Dec 2011 20:23:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLKN3L3084463; Wed, 21 Dec 2011 20:23:03 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLKN3NK084460; Wed, 21 Dec 2011 20:23:03 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112212023.pBLKN3NK084460@svn.freebsd.org> From: Dimitry Andric Date: Wed, 21 Dec 2011 20:23:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228789 - in head/sys/modules/aic7xxx: ahc/ahc_pci ahd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 20:23:03 -0000 Author: dim Date: Wed Dec 21 20:23:03 2011 New Revision: 228789 URL: http://svn.freebsd.org/changeset/base/228789 Log: Amend r228779 by also disabling -Wconstant-conversion warnings for the aic7xxx module. MFC after: 1 week Modified: head/sys/modules/aic7xxx/ahc/ahc_pci/Makefile head/sys/modules/aic7xxx/ahd/Makefile Modified: head/sys/modules/aic7xxx/ahc/ahc_pci/Makefile ============================================================================== --- head/sys/modules/aic7xxx/ahc/ahc_pci/Makefile Wed Dec 21 20:10:11 2011 (r228788) +++ head/sys/modules/aic7xxx/ahc/ahc_pci/Makefile Wed Dec 21 20:23:03 2011 (r228789) @@ -12,5 +12,6 @@ SRCS+= device_if.h bus_if.h pci_if.h SRCS+= opt_scsi.h opt_cam.h opt_aic7xxx.h CFLAGS+= -I${.CURDIR}/../../../../dev/aic7xxx -I.. +CWARNFLAGS+= ${NO_WCONSTANT_CONVERSION} .include Modified: head/sys/modules/aic7xxx/ahd/Makefile ============================================================================== --- head/sys/modules/aic7xxx/ahd/Makefile Wed Dec 21 20:10:11 2011 (r228788) +++ head/sys/modules/aic7xxx/ahd/Makefile Wed Dec 21 20:23:03 2011 (r228789) @@ -32,6 +32,7 @@ SRCS= ${GENSRCS} SRCS+= aic79xx.c aic79xx_osm.c aic79xx_pci.c ahd_pci.c SRCS+= opt_scsi.h opt_aic79xx.h opt_cam.h opt_ddb.h SRCS+= device_if.h bus_if.h pci_if.h +CWARNFLAGS+= ${NO_WCONSTANT_CONVERSION} CLEANFILES= ${GENSRCS} From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 20:27:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 060571065673; Wed, 21 Dec 2011 20:27:42 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE2538FC0A; Wed, 21 Dec 2011 20:27:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLKRfkr084641; Wed, 21 Dec 2011 20:27:41 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLKRfPK084637; Wed, 21 Dec 2011 20:27:41 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201112212027.pBLKRfPK084637@svn.freebsd.org> From: Eitan Adler Date: Wed, 21 Dec 2011 20:27:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228790 - in head/usr.sbin: fwcontrol newsyslog ypserv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 20:27:42 -0000 Author: eadler (ports committer) Date: Wed Dec 21 20:27:41 2011 New Revision: 228790 URL: http://svn.freebsd.org/changeset/base/228790 Log: - Remove extraneous null ptr deref checks - Fix memory leak Submitted by: Slono Slono Approved by: jhb MFC after: 1 week Modified: head/usr.sbin/fwcontrol/fwcontrol.c head/usr.sbin/newsyslog/newsyslog.c head/usr.sbin/ypserv/yp_main.c Modified: head/usr.sbin/fwcontrol/fwcontrol.c ============================================================================== --- head/usr.sbin/fwcontrol/fwcontrol.c Wed Dec 21 20:23:03 2011 (r228789) +++ head/usr.sbin/fwcontrol/fwcontrol.c Wed Dec 21 20:27:41 2011 (r228790) @@ -152,8 +152,7 @@ str2node(int fd, const char *nodestr) fweui2eui64(&data->dev[i].eui, &tmpeui); if (memcmp(&eui, &tmpeui, sizeof(struct eui64)) == 0) { node = data->dev[i].dst; - if (data != NULL) - free(data); + free(data); goto gotnode; } } Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Wed Dec 21 20:23:03 2011 (r228789) +++ head/usr.sbin/newsyslog/newsyslog.c Wed Dec 21 20:27:41 2011 (r228790) @@ -1946,9 +1946,10 @@ do_zipwork(struct zipwork_entry *zwork) char zresult[MAXPATHLEN]; int c; + assert(zwork != NULL); pgm_path = NULL; strlcpy(zresult, zwork->zw_fname, sizeof(zresult)); - if (zwork != NULL && zwork->zw_conf != NULL && + if (zwork->zw_conf != NULL && zwork->zw_conf->compress > COMPRESS_NONE) for (c = 1; c < COMPRESS_TYPES; c++) { if (zwork->zw_conf->compress == c) { Modified: head/usr.sbin/ypserv/yp_main.c ============================================================================== --- head/usr.sbin/ypserv/yp_main.c Wed Dec 21 20:23:03 2011 (r228789) +++ head/usr.sbin/ypserv/yp_main.c Wed Dec 21 20:27:41 2011 (r228790) @@ -256,6 +256,7 @@ create_service(const int sock, const str const struct __rpc_sockinfo *si) { int error; + char *sname; SVCXPRT *transp; struct addrinfo hints, *res, *res0; @@ -263,6 +264,7 @@ create_service(const int sock, const str struct bindaddrlistent *blep; struct netbuf svcaddr; + sname = NULL; SLIST_INIT(&sle_head); memset(&hints, 0, sizeof(hints)); memset(&svcaddr, 0, sizeof(svcaddr)); @@ -342,7 +344,6 @@ create_service(const int sock, const str if (strncmp("0", servname, 1) == 0) { struct sockaddr *sap; socklen_t slen; - char *sname; sname = malloc(NI_MAXSERV); if (sname == NULL) { @@ -362,6 +363,7 @@ create_service(const int sock, const str strerror(errno)); freeaddrinfo(res0); close(s); + free(sname); return -1; } error = getnameinfo(sap, slen, @@ -373,6 +375,7 @@ create_service(const int sock, const str strerror(errno)); freeaddrinfo(res0); close(s); + free(sname); return -1; } servname = sname; @@ -441,7 +444,7 @@ create_service(const int sock, const str } /* XXX: ignore error intentionally */ rpcb_set(YPPROG, YPVERS, nconf, &svcaddr); - + free (sname); freeaddrinfo(res0); return 0; } From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 20:39:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 8232A1065676; Wed, 21 Dec 2011 20:39:14 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id CAB1B14E408; Wed, 21 Dec 2011 20:39:13 +0000 (UTC) Message-ID: <4EF243F2.7030000@FreeBSD.org> Date: Wed, 21 Dec 2011 12:39:14 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Eitan Adler References: <201112212027.pBLKRfPK084637@svn.freebsd.org> In-Reply-To: <201112212027.pBLKRfPK084637@svn.freebsd.org> X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228790 - in head/usr.sbin: fwcontrol newsyslog ypserv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 20:39:14 -0000 On 12/21/2011 12:27 PM, Eitan Adler wrote: > Author: eadler (ports committer) > Date: Wed Dec 21 20:27:41 2011 > New Revision: 228790 > URL: http://svn.freebsd.org/changeset/base/228790 > > Log: > - Remove extraneous null ptr deref checks A better way to write this commit log would be, "Remove null pointer checks that are extraneous because ..." 2/3 why, 1/3 what. > - Fix memory leak Should this perhaps have been a separate commit? Doug -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 20:41:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99B36106564A; Wed, 21 Dec 2011 20:41:06 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 817E38FC17; Wed, 21 Dec 2011 20:41:04 +0000 (UTC) Received: by lahl5 with SMTP id l5so4397796lah.13 for ; Wed, 21 Dec 2011 12:41:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=k8/ByALdWoimyjg1pACvBMu0pf93TJJh7jYd3E2gOGA=; b=n3xXcKYvb3FMjJxPrrndFfccXA0J7/d7V16ITuG1C3c/lE/MKUZVId8XWW1lgeKg5I oaJd7lWI+MdyQ8M7V9++zHvtYHOoo2IGxbxKFQG4/ATt8dPwxds4XQcFVGb/xpwgYVj1 anMkz6Ju9MA0Xl0w2upGi54V5K/Lg2gCeWgBc= Received: by 10.152.103.51 with SMTP id ft19mr6993430lab.42.1324500064125; Wed, 21 Dec 2011 12:41:04 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.152.129.8 with HTTP; Wed, 21 Dec 2011 12:40:33 -0800 (PST) In-Reply-To: <4EF243F2.7030000@FreeBSD.org> References: <201112212027.pBLKRfPK084637@svn.freebsd.org> <4EF243F2.7030000@FreeBSD.org> From: Eitan Adler Date: Wed, 21 Dec 2011 15:40:33 -0500 X-Google-Sender-Auth: 6enZDyhREk8_pNqJnwwQRq2L2yQ Message-ID: To: Doug Barton Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228790 - in head/usr.sbin: fwcontrol newsyslog ypserv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 20:41:06 -0000 On Wed, Dec 21, 2011 at 3:39 PM, Doug Barton wrote: > A better way to write this commit log would be, "Remove null pointer > checks that are extraneous because ..." =C2=A02/3 why, 1/3 what. Noted. >> =C2=A0 - Fix memory leak > > Should this perhaps have been a separate commit? Probably. I'll be more careful next time. --=20 Eitan Adler Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 20:42:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id D30E0106566B; Wed, 21 Dec 2011 20:42:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 1EF791529A0; Wed, 21 Dec 2011 20:42:50 +0000 (UTC) Message-ID: <4EF244CA.8040108@FreeBSD.org> Date: Wed, 21 Dec 2011 12:42:50 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Eitan Adler References: <201112212027.pBLKRfPK084637@svn.freebsd.org> <4EF243F2.7030000@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228790 - in head/usr.sbin: fwcontrol newsyslog ypserv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 20:42:50 -0000 On 12/21/2011 12:40 PM, Eitan Adler wrote: > On Wed, Dec 21, 2011 at 3:39 PM, Doug Barton wrote: >> A better way to write this commit log would be, "Remove null pointer >> checks that are extraneous because ..." 2/3 why, 1/3 what. > > Noted. Thanks. However, I was perhaps too subtle in asking you to actually explain why they were not needed. :) >>> - Fix memory leak >> >> Should this perhaps have been a separate commit? > > Probably. I'll be more careful next time. Awesome! Doug -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 20:47:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6986A106566C; Wed, 21 Dec 2011 20:47:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 544B88FC15; Wed, 21 Dec 2011 20:47:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLKlPOx085281; Wed, 21 Dec 2011 20:47:25 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLKlPUF085279; Wed, 21 Dec 2011 20:47:25 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201112212047.pBLKlPUF085279@svn.freebsd.org> From: Eitan Adler Date: Wed, 21 Dec 2011 20:47:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228791 - head/usr.sbin/ypserv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 20:47:25 -0000 Author: eadler (ports committer) Date: Wed Dec 21 20:47:24 2011 New Revision: 228791 URL: http://svn.freebsd.org/changeset/base/228791 Log: - Fix style(9) bug I introduced in the last commit Approved by: jhb Modified: head/usr.sbin/ypserv/yp_main.c Modified: head/usr.sbin/ypserv/yp_main.c ============================================================================== --- head/usr.sbin/ypserv/yp_main.c Wed Dec 21 20:27:41 2011 (r228790) +++ head/usr.sbin/ypserv/yp_main.c Wed Dec 21 20:47:24 2011 (r228791) @@ -444,7 +444,7 @@ create_service(const int sock, const str } /* XXX: ignore error intentionally */ rpcb_set(YPPROG, YPVERS, nconf, &svcaddr); - free (sname); + free(sname); freeaddrinfo(res0); return 0; } From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 20:49:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EA48106564A; Wed, 21 Dec 2011 20:49:40 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6A9948FC12; Wed, 21 Dec 2011 20:49:38 +0000 (UTC) Received: by lahl5 with SMTP id l5so4401672lah.13 for ; Wed, 21 Dec 2011 12:49:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=b1bIYzqgzDSCvdpWl7VA3CSLn4g9IXkUBeallX7bYTo=; b=KKV/bla3QzzY+X44stYag8kuXbUibKQk57U5EtaYr142ncBEV/TzMpGTPgWcy0FBoG 4v0YOydQkPQioTcYwV6ZA8BGFPXyUNuWDX/tRqDGaOAyDtTU8rODH7hKyRX4PqpI4I2R /sNQfJ7yNP02I8bDfcbLC9qPIDwyRzT8R1OLw= Received: by 10.152.128.196 with SMTP id nq4mr7416830lab.35.1324500578115; Wed, 21 Dec 2011 12:49:38 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.152.129.8 with HTTP; Wed, 21 Dec 2011 12:49:07 -0800 (PST) In-Reply-To: <4EF244CA.8040108@FreeBSD.org> References: <201112212027.pBLKRfPK084637@svn.freebsd.org> <4EF243F2.7030000@FreeBSD.org> <4EF244CA.8040108@FreeBSD.org> From: Eitan Adler Date: Wed, 21 Dec 2011 15:49:07 -0500 X-Google-Sender-Auth: Lc27vM2fo8r1xv8YXVYywQLXR-A Message-ID: To: Doug Barton Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228790 - in head/usr.sbin: fwcontrol newsyslog ypserv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 20:49:40 -0000 On Wed, Dec 21, 2011 at 3:42 PM, Doug Barton wrote: > On 12/21/2011 12:40 PM, Eitan Adler wrote: >> On Wed, Dec 21, 2011 at 3:39 PM, Doug Barton wrote: >>> A better way to write this commit log would be, "Remove null pointer >>> checks that are extraneous because ..." =C2=A02/3 why, 1/3 what. >> >> Noted. > > Thanks. However, I was perhaps too subtle in asking you to actually > explain why they were not needed. =C2=A0:) - free never requires a null check - zwork is dereferenced in the line before the null check --=20 Eitan Adler Ports committer X11, Bugbusting teams From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 21:52:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0256B1065670; Wed, 21 Dec 2011 21:52:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 83FE38FC0A; Wed, 21 Dec 2011 21:52:05 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so10746126vbb.13 for ; Wed, 21 Dec 2011 13:52:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=IbyYDXBl8TTuM0qUQYlQO3hOfNF2lCbKWQGeVZS+WUM=; b=vtpuPXdOs6xIhj9O+OkHV5O7z1sQmNe57UcQrumH33T1S23vO2WWxIMPw3c3GdD15j UFxmENILpUw0o0tP55MhdrOW9yN/4zOOnI1xo835Pim6Egf/oE2pEyIf7bdH1HwLqMqa EHJBcsSNEqWe3OJHBVhJcRRVZ4Jw9wfWsqp8M= MIME-Version: 1.0 Received: by 10.52.22.193 with SMTP id g1mr1416109vdf.77.1324504324830; Wed, 21 Dec 2011 13:52:04 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.158.104 with HTTP; Wed, 21 Dec 2011 13:52:04 -0800 (PST) In-Reply-To: <201112211716.pBLHGhDH078507@svn.freebsd.org> References: <201112211716.pBLHGhDH078507@svn.freebsd.org> Date: Wed, 21 Dec 2011 13:52:04 -0800 X-Google-Sender-Auth: Pxia-fiooV7nuxnPDVlE7f7Uv_E Message-ID: From: Adrian Chadd To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228785 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 21:52:06 -0000 Erm, why did you do this without first getting clearance from someone who has the hardware to test it? Just because it looks obviously wrong to you, doesn't at all mean that it's "wrong". It's quite possible that the driver _requires_ those bits to be written to the hardware as 0. I'd appreciate it if would please revert this and other ath/hal changes until I've had time to research them and test them out. Thanks, Adrian On 21 December 2011 09:16, Dimitry Andric wrote: > Author: dim > Date: Wed Dec 21 17:16:43 2011 > New Revision: 228785 > URL: http://svn.freebsd.org/changeset/base/228785 > > Log: > =A0Fix shift overflow problem in sys/dev/ath/ath_hal/ar5210/ar5210_power.= c > =A0and sys/dev/ath/ath_hal/ar5211/ar5211_power.c: > > =A0sys/dev/ath/ath_hal/ar5210/ar5210_power.c:36:3: warning: signed shift = result (0x200000000) requires 35 bits to represent, but 'int' only has 32 b= its [-Wshift-overflow] > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0OS_REG_RMW_FIELD(ah, AR_SCR, AR_SCR_SL= E, AR_SCR_SLE_ALLOW); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~~~~~~~~ > =A0sys/dev/ath/ath_hal/ah_internal.h:472:42: note: expanded from: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(OS_REG_READ(_a, _r) &~ (_f)) | (((_v)= << _f##_S) & (_f))) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ^ > =A0sys/dev/ath/ah_osdep.h:127:49: note: expanded from: > =A0 =A0 =A0 =A0 =A0 =A0 =A0(bus_space_handle_t)(_ah)->ah_sh, (_reg), (_va= l)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ^~~~ > > =A0The AR_SCR_SLE_{WAKE,SLP,NORM} values are pre-shifted in ar5210reg.h a= nd > =A0ar5211reg.h, while they should be unshifted, like in ar5212reg.h. =A0T= hen, > =A0when the OS_REG_RMW_FIELD() macro shifts them again, the values will > =A0overflow, becoming effectively zero. > > =A0MFC after: 1 week > > Modified: > =A0head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h > =A0head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h > > Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Wed Dec 21 17:03:30 2011 = =A0 =A0 =A0 =A0(r228784) > +++ head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Wed Dec 21 17:16:43 2011 = =A0 =A0 =A0 =A0(r228785) > @@ -245,9 +245,9 @@ > =A0#define =A0 =A0 =A0 =A0AR_SCR_SLDUR =A0 =A0 =A0 =A0 =A0 =A00x0000ffff = =A0 =A0 =A0/* sleep duration */ > =A0#define =A0 =A0 =A0 =A0AR_SCR_SLE =A0 =A0 =A0 =A0 =A0 =A0 =A00x0003000= 0 =A0 =A0 =A0/* sleep enable */ > =A0#define =A0 =A0 =A0 =A0AR_SCR_SLE_S =A0 =A0 =A0 =A0 =A0 =A016 > -#define =A0 =A0 =A0 =A0AR_SCR_SLE_WAKE =A0 =A0 =A0 =A0 0x00000000 =A0 = =A0 =A0/* force wake */ > -#define =A0 =A0 =A0 =A0AR_SCR_SLE_SLP =A0 =A0 =A0 =A0 =A00x00010000 =A0 = =A0 =A0/* force sleep */ > -#define =A0 =A0 =A0 =A0AR_SCR_SLE_ALLOW =A0 =A0 =A0 =A00x00020000 =A0 = =A0 =A0/* allow to control sleep */ > +#define =A0 =A0 =A0 =A0AR_SCR_SLE_WAKE =A0 =A0 =A0 =A0 0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 /* force wake */ > +#define =A0 =A0 =A0 =A0AR_SCR_SLE_SLP =A0 =A0 =A0 =A0 =A01 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 /* force sleep */ > +#define =A0 =A0 =A0 =A0AR_SCR_SLE_ALLOW =A0 =A0 =A0 =A02 =A0 =A0 =A0 =A0= =A0 =A0 =A0 /* allow to control sleep */ > =A0#define =A0 =A0 =A0 =A0AR_SCR_BITS =A0 =A0 "\20\20SLE_SLP\21SLE_ALLOW" > > =A0#define =A0 =A0 =A0 =A0AR_INTPEND_IP =A0 =A0 =A0 =A0 =A0 0x00000001 = =A0 =A0 =A0/* interrupt pending */ > > Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Wed Dec 21 17:03:30 2011 = =A0 =A0 =A0 =A0(r228784) > +++ head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Wed Dec 21 17:16:43 2011 = =A0 =A0 =A0 =A0(r228785) > @@ -618,9 +618,9 @@ > =A0#define =A0 =A0 =A0 =A0AR_SCR_SLDUR_S =A00 > =A0#define =A0 =A0 =A0 =A0AR_SCR_SLE =A0 =A0 =A00x00030000 =A0 =A0 =A0/* = sleep enable mask */ > =A0#define =A0 =A0 =A0 =A0AR_SCR_SLE_S =A0 =A016 =A0 =A0 =A0 =A0 =A0 =A0 = =A0/* sleep enable bits shift */ > -#define =A0 =A0 =A0 =A0AR_SCR_SLE_WAKE 0x00000000 =A0 =A0 =A0/* force wa= ke */ > -#define =A0 =A0 =A0 =A0AR_SCR_SLE_SLP =A00x00010000 =A0 =A0 =A0/* force = sleep */ > -#define =A0 =A0 =A0 =A0AR_SCR_SLE_NORM 0x00020000 =A0 =A0 =A0/* sleep lo= gic normal operation */ > +#define =A0 =A0 =A0 =A0AR_SCR_SLE_WAKE 0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* = force wake */ > +#define =A0 =A0 =A0 =A0AR_SCR_SLE_SLP =A01 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /= * force sleep */ > +#define =A0 =A0 =A0 =A0AR_SCR_SLE_NORM 2 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* = sleep logic normal operation */ > =A0#define =A0 =A0 =A0 =A0AR_SCR_SLE_UNITS =A0 =A0 =A0 =A00x00000008 =A0 = =A0 =A0/* SCR units/TU */ > =A0#define =A0 =A0 =A0 =A0AR_SCR_BITS =A0 =A0 "\20\20SLE_SLP\21SLE" > From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 22:00:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20097106566C; Wed, 21 Dec 2011 22:00:45 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E57088FC0A; Wed, 21 Dec 2011 22:00:44 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 9B42846B06; Wed, 21 Dec 2011 17:00:44 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2DDAEB941; Wed, 21 Dec 2011 17:00:44 -0500 (EST) From: John Baldwin To: Adrian Chadd Date: Wed, 21 Dec 2011 17:00:42 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201112211716.pBLHGhDH078507@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112211700.42772.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 21 Dec 2011 17:00:44 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r228785 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 22:00:45 -0000 On Wednesday, December 21, 2011 4:52:04 pm Adrian Chadd wrote: > Erm, why did you do this without first getting clearance from someone > who has the hardware to test it? > > Just because it looks obviously wrong to you, doesn't at all mean that > it's "wrong". It's quite possible that the driver _requires_ those > bits to be written to the hardware as 0. > > > I'd appreciate it if would please revert this and other ath/hal > changes until I've had time to research them and test them out. I agree it should be reviewed, but if you are seriously depending on the fact that the shifted values are beyond the edge of the word boundary and so the result "wraps" to zero, then I'd question the sanity of your code. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 22:07:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F13EE1065675; Wed, 21 Dec 2011 22:07:50 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 547458FC1A; Wed, 21 Dec 2011 22:07:50 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so10677864vcb.13 for ; Wed, 21 Dec 2011 14:07:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=gWVDyTu8QT1JEIIMm5xnjCqI4F49O3bgJ+qKnmwoO7U=; b=H3qOKZ1kMMtuHvXvndvZQy+ys8TDRSeh2p3ctNHwPSLdSLL6oPEX8ZqY6UNQQe40t9 HsjukqjEs//JPQX2y4bhSfbD3ZhrGKaCxjh0OqnYyr0bh++YZjAzC5c7u4uLLxMcN8A2 PXJIpahThItOUBziEiDbMCWu6Z1WYgE7p1tl4= MIME-Version: 1.0 Received: by 10.220.232.10 with SMTP id js10mr6185709vcb.2.1324505269686; Wed, 21 Dec 2011 14:07:49 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.158.104 with HTTP; Wed, 21 Dec 2011 14:07:49 -0800 (PST) In-Reply-To: <201112211700.42772.jhb@freebsd.org> References: <201112211716.pBLHGhDH078507@svn.freebsd.org> <201112211700.42772.jhb@freebsd.org> Date: Wed, 21 Dec 2011 14:07:49 -0800 X-Google-Sender-Auth: zITTYWdgukXCc2FJNS1KPz9hKtA Message-ID: From: Adrian Chadd To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r228785 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 22:07:51 -0000 On 21 December 2011 14:00, John Baldwin wrote: > I agree it should be reviewed, but if you are seriously depending on > the fact that the shifted values are beyond the edge of the word boundary > and so the result "wraps" to zero, then I'd question the sanity of your code. I agree, but this is all "there be dragons" :) adrian From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 22:13:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 516F91065679; Wed, 21 Dec 2011 22:13:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CEAE8FC16; Wed, 21 Dec 2011 22:13:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLMDp1O087973; Wed, 21 Dec 2011 22:13:51 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLMDpno087971; Wed, 21 Dec 2011 22:13:51 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112212213.pBLMDpno087971@svn.freebsd.org> From: Dimitry Andric Date: Wed, 21 Dec 2011 22:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228793 - head/sys/modules/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 22:13:51 -0000 Author: dim Date: Wed Dec 21 22:13:50 2011 New Revision: 228793 URL: http://svn.freebsd.org/changeset/base/228793 Log: Amend r228783 by also disabling -Wshift-count-negative -Wshift-count-overflow warnings for the ath module. MFC after: 1 week Modified: head/sys/modules/ath/Makefile Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Wed Dec 21 21:39:30 2011 (r228792) +++ head/sys/modules/ath/Makefile Wed Dec 21 22:13:50 2011 (r228793) @@ -139,6 +139,7 @@ SRCS+= amrr.c SRCS+= dfs_null.c CFLAGS+= -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal +CWARNFLAGS+= ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW} opt_ah.h: echo '#define AH_SUPPORT_AR5416 1' > $@ From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 22:49:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2AB8106566B; Wed, 21 Dec 2011 22:49:16 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D68C8FC12; Wed, 21 Dec 2011 22:49:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBLMnGUg089074; Wed, 21 Dec 2011 22:49:16 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBLMnGkj089072; Wed, 21 Dec 2011 22:49:16 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201112212249.pBLMnGkj089072@svn.freebsd.org> From: Kirk McKusick Date: Wed, 21 Dec 2011 22:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228794 - head/sbin/newfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 22:49:16 -0000 Author: mckusick Date: Wed Dec 21 22:49:16 2011 New Revision: 228794 URL: http://svn.freebsd.org/changeset/base/228794 Log: Reduce NFPI by half to keep the default number of inodes the same with the now default 32K/4K filesystem the same as the number of inodes in the previously default 16K/2K filesystem. PR: bin/16265 Reported by: Olivier Cochard-Labbe MFC: 4 weeks (9 is the only affected branch) Modified: head/sbin/newfs/newfs.h Modified: head/sbin/newfs/newfs.h ============================================================================== --- head/sbin/newfs/newfs.h Wed Dec 21 22:13:50 2011 (r228793) +++ head/sbin/newfs/newfs.h Wed Dec 21 22:49:16 2011 (r228794) @@ -70,7 +70,7 @@ * We allocate one inode slot per NFPI fragments, expecting this * to be far more than we will ever need. */ -#define NFPI 4 +#define NFPI 2 /* * variables set up by front end. From owner-svn-src-all@FreeBSD.ORG Wed Dec 21 23:27:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id A486F1065675; Wed, 21 Dec 2011 23:27:54 +0000 (UTC) Date: Wed, 21 Dec 2011 23:27:54 +0000 From: Alexander Best To: John Baldwin Message-ID: <20111221232754.GA51331@freebsd.org> References: <201112211716.pBLHGhDH078507@svn.freebsd.org> <201112211700.42772.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201112211700.42772.jhb@freebsd.org> Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, Dimitry Andric , svn-src-all@freebsd.org Subject: Re: svn commit: r228785 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 23:27:54 -0000 On Wed Dec 21 11, John Baldwin wrote: > On Wednesday, December 21, 2011 4:52:04 pm Adrian Chadd wrote: > > Erm, why did you do this without first getting clearance from someone > > who has the hardware to test it? > > > > Just because it looks obviously wrong to you, doesn't at all mean that > > it's "wrong". It's quite possible that the driver _requires_ those > > bits to be written to the hardware as 0. > > > > > > I'd appreciate it if would please revert this and other ath/hal > > changes until I've had time to research them and test them out. > > I agree it should be reviewed, but if you are seriously depending on > the fact that the shifted values are beyond the edge of the word boundary > and so the result "wraps" to zero, then I'd question the sanity of your code. i disagree. the commits should stay. after all this is HEAD. this way all developers running HEAD and with the appropriate ath hardware will test the changes. if dim@ really broke something, people will notice. the changes should *not* be MFC'ed. but if no one complains until 10.0-RELEASE, it's very unlikely he broke something. plus...does it make a different, if you test HEAD with the changes present or test HEAD with the changes integrated via patches? one way or the other you can test the changes and *if* something broke, the commits can be reverted. cheers. alex > > -- > John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 03:36:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 887FE106564A; Thu, 22 Dec 2011 03:36:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 742238FC08; Thu, 22 Dec 2011 03:36:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBM3ase5098295; Thu, 22 Dec 2011 03:36:54 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBM3ashY098293; Thu, 22 Dec 2011 03:36:54 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201112220336.pBM3ashY098293@svn.freebsd.org> From: Eitan Adler Date: Thu, 22 Dec 2011 03:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228795 - head/usr.sbin/pw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 03:36:54 -0000 Author: eadler (ports committer) Date: Thu Dec 22 03:36:54 2011 New Revision: 228795 URL: http://svn.freebsd.org/changeset/base/228795 Log: - document the -l option to usermod PR: docs/161588 Submitted by: "Luchesar V. ILIEV" Approved by: gjb MFC after: 1 week Modified: head/usr.sbin/pw/pw.8 Modified: head/usr.sbin/pw/pw.8 ============================================================================== --- head/usr.sbin/pw/pw.8 Wed Dec 21 22:49:16 2011 (r228794) +++ head/usr.sbin/pw/pw.8 Thu Dec 22 03:36:54 2011 (r228795) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 30, 2007 +.Dd December 21, 2011 .Dt PW 8 .Os .Sh NAME @@ -714,6 +714,17 @@ are also removed if the user's uid is un system. .Pp The +.Ar usermod +command adds one additional option: +.Bl -tag -width "-G grouplist" +.It Fl l Ar name +This option allows changing of an existing account name to +.Ql \&name . +The new name must not already exist, and any attempt to duplicate an +existing account name will be rejected. +.El +.Pp +The .Ar usershow command allows viewing of an account in one of two formats. By default, the format is identical to the format used in From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 06:31:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C895106564A; Thu, 22 Dec 2011 06:31:29 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 876838FC0A; Thu, 22 Dec 2011 06:31:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBM6VTFE003777; Thu, 22 Dec 2011 06:31:29 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBM6VT6g003775; Thu, 22 Dec 2011 06:31:29 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201112220631.pBM6VT6g003775@svn.freebsd.org> From: Kevin Lo Date: Thu, 22 Dec 2011 06:31:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228796 - head/sys/fs/msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 06:31:29 -0000 Author: kevlo Date: Thu Dec 22 06:31:29 2011 New Revision: 228796 URL: http://svn.freebsd.org/changeset/base/228796 Log: Discarding local array based on return values Modified: head/sys/fs/msdosfs/msdosfs_conv.c Modified: head/sys/fs/msdosfs/msdosfs_conv.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_conv.c Thu Dec 22 03:36:54 2011 (r228795) +++ head/sys/fs/msdosfs/msdosfs_conv.c Thu Dec 22 06:31:29 2011 (r228796) @@ -61,9 +61,9 @@ extern struct iconv_functions *msdosfs_iconv; static int mbsadjpos(const char **, size_t, size_t, int, int, void *handle); -static u_char * dos2unixchr(const u_char **, size_t *, int, struct msdosfsmount *); +static u_char * dos2unixchr(u_char *, const u_char **, size_t *, int, struct msdosfsmount *); static u_int16_t unix2doschr(const u_char **, size_t *, struct msdosfsmount *); -static u_char * win2unixchr(u_int16_t, struct msdosfsmount *); +static u_char * win2unixchr(u_char *, u_int16_t, struct msdosfsmount *); static u_int16_t unix2winchr(const u_char **, size_t *, int, struct msdosfsmount *); /* @@ -242,7 +242,7 @@ dos2unixfn(dn, un, lower, pmp) { size_t i; int thislong = 0; - u_char *c; + u_char *c, tmpbuf[5]; /* * If first char of the filename is SLOT_E5 (0x05), then the real @@ -257,8 +257,8 @@ dos2unixfn(dn, un, lower, pmp) * Copy the name portion into the unix filename string. */ for (i = 8; i > 0 && *dn != ' ';) { - c = dos2unixchr((const u_char **)&dn, &i, lower & LCASE_BASE, - pmp); + c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i, + lower & LCASE_BASE, pmp); while (*c != '\0') { *un++ = *c++; thislong++; @@ -274,7 +274,7 @@ dos2unixfn(dn, un, lower, pmp) *un++ = '.'; thislong++; for (i = 3; i > 0 && *dn != ' ';) { - c = dos2unixchr((const u_char **)&dn, &i, + c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i, lower & LCASE_EXT, pmp); while (*c != '\0') { *un++ = *c++; @@ -648,7 +648,7 @@ win2unixfn(nbp, wep, chksum, pmp) int chksum; struct msdosfsmount *pmp; { - u_char *c; + u_char *c, tmpbuf[5]; u_int8_t *cp; u_int8_t *np, name[WIN_CHARS * 3 + 1]; u_int16_t code; @@ -683,7 +683,7 @@ win2unixfn(nbp, wep, chksum, pmp) *np = '\0'; return -1; default: - c = win2unixchr(code, pmp); + c = win2unixchr(tmpbuf, code, pmp); while (*c != '\0') *np++ = *c++; break; @@ -701,7 +701,7 @@ win2unixfn(nbp, wep, chksum, pmp) *np = '\0'; return -1; default: - c = win2unixchr(code, pmp); + c = win2unixchr(tmpbuf, code, pmp); while (*c != '\0') *np++ = *c++; break; @@ -719,7 +719,7 @@ win2unixfn(nbp, wep, chksum, pmp) *np = '\0'; return -1; default: - c = win2unixchr(code, pmp); + c = win2unixchr(tmpbuf, code, pmp); while (*c != '\0') *np++ = *c++; break; @@ -812,9 +812,9 @@ mbsadjpos(const char **instr, size_t inl * Convert DOS char to Local char */ static u_char * -dos2unixchr(const u_char **instr, size_t *ilen, int lower, struct msdosfsmount *pmp) +dos2unixchr(u_char *outbuf, const u_char **instr, size_t *ilen, int lower, struct msdosfsmount *pmp) { - u_char c, *outp, outbuf[5]; + u_char c, *outp; size_t len, olen; outp = outbuf; @@ -933,9 +933,9 @@ unix2doschr(const u_char **instr, size_t * Convert Windows char to Local char */ static u_char * -win2unixchr(u_int16_t wc, struct msdosfsmount *pmp) +win2unixchr(u_char *outbuf, u_int16_t wc, struct msdosfsmount *pmp) { - u_char *inp, *outp, inbuf[3], outbuf[5]; + u_char *inp, *outp, inbuf[3]; size_t ilen, olen, len; outp = outbuf; From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 06:54:19 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CACD11065673; Thu, 22 Dec 2011 06:54:19 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 9F8328FC1B; Thu, 22 Dec 2011 06:54:19 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id pBM6Tqtj081515; Thu, 22 Dec 2011 06:29:52 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.119] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id m6ua3zwpspydkp2x9bdyge8b5n; Thu, 22 Dec 2011 06:29:51 +0000 (UTC) (envelope-from tim@kientzle.com) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: <4EF10BC2.2030607@FreeBSD.org> Date: Wed, 21 Dec 2011 22:29:50 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <7507BEAA-C4F1-4A78-A11D-3BF4566B1366@kientzle.com> References: <201112202037.pBKKbHEi034059@svn.freebsd.org> <201112201556.32540.jhb@freebsd.org> <4EF10BC2.2030607@FreeBSD.org> To: Martin Matuska X-Mailer: Apple Mail (2.1251.1) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin Subject: Re: svn commit: r228750 - head/usr.bin/cpio/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 06:54:19 -0000 On Dec 20, 2011, at 2:27 PM, Martin Matuska wrote: > On 20.12.2011 21:56, John Baldwin wrote: >> On Tuesday, December 20, 2011 3:37:17 pm Martin Matuska wrote: >>> Author: mm >>> Date: Tue Dec 20 20:37:17 2011 >>> New Revision: 228750 >>> URL: http://svn.freebsd.org/changeset/base/228750 >>>=20 >>> Log: >>> Sync bsdcpio with vendor branch release/2.8: >>>=20 >>> Revision 3770: >>> Merge r3768 from trunk: Fix typo in dev/ino verification for cpio = formats. >>>=20 >>> Obtained from: http://code.google.com/p/libarchive >>> MFC after: 2 weeks >> If libarchive is now maintained externally rather than in the tree, = is it time=20 >> for bsdtar, bsdcpio, and libarchive to move to contrib and for vendor = imports=20 >> to be managed as they are for other contrib bits? >>=20 > I agree, this is the right thing to do. I am going to start making > appropriate bits under vendor/. Thanks for tackling this, Martin. It's long overdue. Tim From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 07:21:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 022A110656ED; Thu, 22 Dec 2011 07:21:07 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3E2D88FC13; Thu, 22 Dec 2011 07:21:05 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so11197969vcb.13 for ; Wed, 21 Dec 2011 23:21:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=4IK1w6Els7qqecXhUsxJjgdwjG7TJqU82l2S1U0Lscw=; b=VWoXC3ff/FTIK57MbLzB6h2x0xA/ZMZF1rPYetTRZ+iN0fHAI8+0voG3iYHVjdGajZ shckldPNWVVUWZ3osJqY/dSxFzZnBTIGzZuclnXePyw14OXMgpg1+nE3ic4Spc/6KXxF dZJIf1Hi49iMnivfc/xcQoTk/tEvQwcVWQ3dE= MIME-Version: 1.0 Received: by 10.220.232.10 with SMTP id js10mr6965728vcb.2.1324538465385; Wed, 21 Dec 2011 23:21:05 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.158.104 with HTTP; Wed, 21 Dec 2011 23:21:05 -0800 (PST) In-Reply-To: <20111221232754.GA51331@freebsd.org> References: <201112211716.pBLHGhDH078507@svn.freebsd.org> <201112211700.42772.jhb@freebsd.org> <20111221232754.GA51331@freebsd.org> Date: Wed, 21 Dec 2011 23:21:05 -0800 X-Google-Sender-Auth: 2R4B0FkT5EBifs6ry7nyTi8FsJQ Message-ID: From: Adrian Chadd To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric , John Baldwin Subject: Re: svn commit: r228785 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 07:21:07 -0000 On 21 December 2011 15:27, Alexander Best wrote: >> I agree it should be reviewed, but if you are seriously depending on >> the fact that the shifted values are beyond the edge of the word boundary >> and so the result "wraps" to zero, then I'd question the sanity of your code. > > i disagree. > > the commits should stay. after all this is HEAD. this way all developers > running HEAD and with the appropriate ath hardware will test the changes. if > dim@ really broke something, people will notice. > > the changes should *not* be MFC'ed. but if no one complains until 10.0-RELEASE, > it's very unlikely he broke something. > > plus...does it make a different, if you test HEAD with the changes present or > test HEAD with the changes integrated via patches? > > one way or the other you can test the changes and *if* something broke, the > commits can be reverted. Hi, This makes a mockery of the concept of "maintainers" :-) The idea of committing stuff into directories that others actively maintain and claim responsibility of is a bit ridiculous. So here - I'm asking that the commits be reverted until I've sat down and tested it on the AR5210/AR5211 cards I've acquired. Thanks, Adrian From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 08:42:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D623106564A; Thu, 22 Dec 2011 08:42:08 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF0CC8FC0A; Thu, 22 Dec 2011 08:42:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBM8g8p1007724; Thu, 22 Dec 2011 08:42:08 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBM8g8aF007717; Thu, 22 Dec 2011 08:42:08 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112220842.pBM8g8aF007717@svn.freebsd.org> From: Martin Matuska Date: Thu, 22 Dec 2011 08:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228797 - in head: lib/libarchive lib/libarchive/libarchive_fe lib/libarchive/test usr.bin/cpio usr.bin/cpio/test usr.bin/tar usr.bin/tar/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 08:42:09 -0000 Author: mm Date: Thu Dec 22 08:42:07 2011 New Revision: 228797 URL: http://svn.freebsd.org/changeset/base/228797 Log: Use contrib sources for building libarchive, tar and cpio. Make "make test" fully operational. MFC after: 2 weeks Deleted: head/lib/libarchive/COPYING head/lib/libarchive/README head/lib/libarchive/archive.h head/lib/libarchive/archive_check_magic.c head/lib/libarchive/archive_crc32.h head/lib/libarchive/archive_endian.h head/lib/libarchive/archive_entry.3 head/lib/libarchive/archive_entry.c head/lib/libarchive/archive_entry.h head/lib/libarchive/archive_entry_copy_stat.c head/lib/libarchive/archive_entry_link_resolver.c head/lib/libarchive/archive_entry_private.h head/lib/libarchive/archive_entry_stat.c head/lib/libarchive/archive_entry_strmode.c head/lib/libarchive/archive_entry_xattr.c head/lib/libarchive/archive_hash.h head/lib/libarchive/archive_platform.h head/lib/libarchive/archive_private.h head/lib/libarchive/archive_read.3 head/lib/libarchive/archive_read.c head/lib/libarchive/archive_read_data_into_fd.c head/lib/libarchive/archive_read_disk.3 head/lib/libarchive/archive_read_disk.c head/lib/libarchive/archive_read_disk_entry_from_file.c head/lib/libarchive/archive_read_disk_private.h head/lib/libarchive/archive_read_disk_set_standard_lookup.c head/lib/libarchive/archive_read_extract.c head/lib/libarchive/archive_read_open_fd.c head/lib/libarchive/archive_read_open_file.c head/lib/libarchive/archive_read_open_filename.c head/lib/libarchive/archive_read_open_memory.c head/lib/libarchive/archive_read_private.h head/lib/libarchive/archive_read_support_compression_all.c head/lib/libarchive/archive_read_support_compression_bzip2.c head/lib/libarchive/archive_read_support_compression_compress.c head/lib/libarchive/archive_read_support_compression_gzip.c head/lib/libarchive/archive_read_support_compression_none.c head/lib/libarchive/archive_read_support_compression_program.c head/lib/libarchive/archive_read_support_compression_rpm.c head/lib/libarchive/archive_read_support_compression_uu.c head/lib/libarchive/archive_read_support_compression_xz.c head/lib/libarchive/archive_read_support_format_all.c head/lib/libarchive/archive_read_support_format_ar.c head/lib/libarchive/archive_read_support_format_cpio.c head/lib/libarchive/archive_read_support_format_empty.c head/lib/libarchive/archive_read_support_format_iso9660.c head/lib/libarchive/archive_read_support_format_mtree.c head/lib/libarchive/archive_read_support_format_raw.c head/lib/libarchive/archive_read_support_format_tar.c head/lib/libarchive/archive_read_support_format_xar.c head/lib/libarchive/archive_read_support_format_zip.c head/lib/libarchive/archive_string.c head/lib/libarchive/archive_string.h head/lib/libarchive/archive_string_sprintf.c head/lib/libarchive/archive_util.3 head/lib/libarchive/archive_util.c head/lib/libarchive/archive_virtual.c head/lib/libarchive/archive_write.3 head/lib/libarchive/archive_write.c head/lib/libarchive/archive_write_disk.3 head/lib/libarchive/archive_write_disk.c head/lib/libarchive/archive_write_disk_private.h head/lib/libarchive/archive_write_disk_set_standard_lookup.c head/lib/libarchive/archive_write_open_fd.c head/lib/libarchive/archive_write_open_file.c head/lib/libarchive/archive_write_open_filename.c head/lib/libarchive/archive_write_open_memory.c head/lib/libarchive/archive_write_private.h head/lib/libarchive/archive_write_set_compression_bzip2.c head/lib/libarchive/archive_write_set_compression_compress.c head/lib/libarchive/archive_write_set_compression_gzip.c head/lib/libarchive/archive_write_set_compression_none.c head/lib/libarchive/archive_write_set_compression_program.c head/lib/libarchive/archive_write_set_compression_xz.c head/lib/libarchive/archive_write_set_format.c head/lib/libarchive/archive_write_set_format_ar.c head/lib/libarchive/archive_write_set_format_by_name.c head/lib/libarchive/archive_write_set_format_cpio.c head/lib/libarchive/archive_write_set_format_cpio_newc.c head/lib/libarchive/archive_write_set_format_mtree.c head/lib/libarchive/archive_write_set_format_pax.c head/lib/libarchive/archive_write_set_format_shar.c head/lib/libarchive/archive_write_set_format_ustar.c head/lib/libarchive/archive_write_set_format_zip.c head/lib/libarchive/cpio.5 head/lib/libarchive/filter_fork.c head/lib/libarchive/filter_fork.h head/lib/libarchive/libarchive-formats.5 head/lib/libarchive/libarchive.3 head/lib/libarchive/libarchive_fe/ head/lib/libarchive/libarchive_internals.3 head/lib/libarchive/tar.5 head/lib/libarchive/test/.cvsignore head/lib/libarchive/test/README head/lib/libarchive/test/main.c head/lib/libarchive/test/read_open_memory.c head/lib/libarchive/test/test.h head/lib/libarchive/test/test_acl_basic.c head/lib/libarchive/test/test_acl_freebsd.c head/lib/libarchive/test/test_acl_pax.c head/lib/libarchive/test/test_archive_api_feature.c head/lib/libarchive/test/test_bad_fd.c head/lib/libarchive/test/test_compat_bzip2.c head/lib/libarchive/test/test_compat_bzip2_1.tbz.uu head/lib/libarchive/test/test_compat_bzip2_2.tbz.uu head/lib/libarchive/test/test_compat_cpio.c head/lib/libarchive/test/test_compat_cpio_1.cpio.uu head/lib/libarchive/test/test_compat_gtar.c head/lib/libarchive/test/test_compat_gtar_1.tar.uu head/lib/libarchive/test/test_compat_gzip.c head/lib/libarchive/test/test_compat_gzip_1.tgz.uu head/lib/libarchive/test/test_compat_gzip_2.tgz.uu head/lib/libarchive/test/test_compat_lzma.c head/lib/libarchive/test/test_compat_lzma_1.tlz.uu head/lib/libarchive/test/test_compat_lzma_2.tlz.uu head/lib/libarchive/test/test_compat_lzma_3.tlz.uu head/lib/libarchive/test/test_compat_solaris_tar_acl.c head/lib/libarchive/test/test_compat_solaris_tar_acl.tar.uu head/lib/libarchive/test/test_compat_tar_hardlink.c head/lib/libarchive/test/test_compat_tar_hardlink_1.tar.uu head/lib/libarchive/test/test_compat_xz.c head/lib/libarchive/test/test_compat_xz_1.txz.uu head/lib/libarchive/test/test_compat_zip.c head/lib/libarchive/test/test_compat_zip_1.zip.uu head/lib/libarchive/test/test_compat_zip_2.zip.uu head/lib/libarchive/test/test_empty_write.c head/lib/libarchive/test/test_entry.c head/lib/libarchive/test/test_entry_strmode.c head/lib/libarchive/test/test_extattr_freebsd.c head/lib/libarchive/test/test_fuzz.c head/lib/libarchive/test/test_fuzz_1.iso.Z.uu head/lib/libarchive/test/test_link_resolver.c head/lib/libarchive/test/test_open_failure.c head/lib/libarchive/test/test_open_fd.c head/lib/libarchive/test/test_open_file.c head/lib/libarchive/test/test_open_filename.c head/lib/libarchive/test/test_pax_filename_encoding.c head/lib/libarchive/test/test_pax_filename_encoding.tar.uu head/lib/libarchive/test/test_read_compress_program.c head/lib/libarchive/test/test_read_data_large.c head/lib/libarchive/test/test_read_disk.c head/lib/libarchive/test/test_read_disk_entry_from_file.c head/lib/libarchive/test/test_read_extract.c head/lib/libarchive/test/test_read_file_nonexistent.c head/lib/libarchive/test/test_read_format_ar.ar.uu head/lib/libarchive/test/test_read_format_ar.c head/lib/libarchive/test/test_read_format_cpio_bin.c head/lib/libarchive/test/test_read_format_cpio_bin_Z.c head/lib/libarchive/test/test_read_format_cpio_bin_be.c head/lib/libarchive/test/test_read_format_cpio_bin_be.cpio.uu head/lib/libarchive/test/test_read_format_cpio_bin_bz2.c head/lib/libarchive/test/test_read_format_cpio_bin_gz.c head/lib/libarchive/test/test_read_format_cpio_bin_lzma.c head/lib/libarchive/test/test_read_format_cpio_bin_xz.c head/lib/libarchive/test/test_read_format_cpio_odc.c head/lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.c head/lib/libarchive/test/test_read_format_cpio_svr4_bzip2_rpm.rpm.uu head/lib/libarchive/test/test_read_format_cpio_svr4_gzip.c head/lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.c head/lib/libarchive/test/test_read_format_cpio_svr4_gzip_rpm.rpm.uu head/lib/libarchive/test/test_read_format_cpio_svr4c_Z.c head/lib/libarchive/test/test_read_format_empty.c head/lib/libarchive/test/test_read_format_gtar_gz.c head/lib/libarchive/test/test_read_format_gtar_lzma.c head/lib/libarchive/test/test_read_format_gtar_sparse.c head/lib/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu head/lib/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu head/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu head/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu head/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu head/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10_modified.tar.uu head/lib/libarchive/test/test_read_format_iso.iso.Z.uu head/lib/libarchive/test/test_read_format_iso_2.iso.Z.uu head/lib/libarchive/test/test_read_format_iso_Z.c head/lib/libarchive/test/test_read_format_iso_joliet.iso.Z.uu head/lib/libarchive/test/test_read_format_iso_joliet_long.iso.Z.uu head/lib/libarchive/test/test_read_format_iso_joliet_rockridge.iso.Z.uu head/lib/libarchive/test/test_read_format_iso_multi_extent.c head/lib/libarchive/test/test_read_format_iso_multi_extent.iso.Z.uu head/lib/libarchive/test/test_read_format_iso_rockridge.iso.Z.uu head/lib/libarchive/test/test_read_format_iso_rockridge_ce.iso.Z.uu head/lib/libarchive/test/test_read_format_iso_rockridge_new.iso.Z.uu head/lib/libarchive/test/test_read_format_iso_rockridge_rr_moved.iso.Z.uu head/lib/libarchive/test/test_read_format_iso_zisofs.iso.Z.uu head/lib/libarchive/test/test_read_format_isojoliet_bz2.c head/lib/libarchive/test/test_read_format_isojoliet_long.c head/lib/libarchive/test/test_read_format_isojoliet_rr.c head/lib/libarchive/test/test_read_format_isorr_bz2.c head/lib/libarchive/test/test_read_format_isorr_ce.c head/lib/libarchive/test/test_read_format_isorr_new_bz2.c head/lib/libarchive/test/test_read_format_isorr_rr_moved.c head/lib/libarchive/test/test_read_format_isozisofs_bz2.c head/lib/libarchive/test/test_read_format_mtree.c head/lib/libarchive/test/test_read_format_mtree.mtree.uu head/lib/libarchive/test/test_read_format_pax_bz2.c head/lib/libarchive/test/test_read_format_raw.c head/lib/libarchive/test/test_read_format_raw.data.Z.uu head/lib/libarchive/test/test_read_format_raw.data.uu head/lib/libarchive/test/test_read_format_tar.c head/lib/libarchive/test/test_read_format_tar_empty_filename.c head/lib/libarchive/test/test_read_format_tar_empty_filename.tar.uu head/lib/libarchive/test/test_read_format_tbz.c head/lib/libarchive/test/test_read_format_tgz.c head/lib/libarchive/test/test_read_format_tlz.c head/lib/libarchive/test/test_read_format_txz.c head/lib/libarchive/test/test_read_format_tz.c head/lib/libarchive/test/test_read_format_xar.c head/lib/libarchive/test/test_read_format_zip.c head/lib/libarchive/test/test_read_format_zip.zip.uu head/lib/libarchive/test/test_read_large.c head/lib/libarchive/test/test_read_pax_truncated.c head/lib/libarchive/test/test_read_position.c head/lib/libarchive/test/test_read_truncated.c head/lib/libarchive/test/test_read_uu.c head/lib/libarchive/test/test_tar_filenames.c head/lib/libarchive/test/test_tar_large.c head/lib/libarchive/test/test_ustar_filenames.c head/lib/libarchive/test/test_write_compress.c head/lib/libarchive/test/test_write_compress_bzip2.c head/lib/libarchive/test/test_write_compress_gzip.c head/lib/libarchive/test/test_write_compress_lzma.c head/lib/libarchive/test/test_write_compress_program.c head/lib/libarchive/test/test_write_compress_xz.c head/lib/libarchive/test/test_write_disk.c head/lib/libarchive/test/test_write_disk_failures.c head/lib/libarchive/test/test_write_disk_hardlink.c head/lib/libarchive/test/test_write_disk_perms.c head/lib/libarchive/test/test_write_disk_secure.c head/lib/libarchive/test/test_write_disk_sparse.c head/lib/libarchive/test/test_write_disk_symlink.c head/lib/libarchive/test/test_write_disk_times.c head/lib/libarchive/test/test_write_format_ar.c head/lib/libarchive/test/test_write_format_cpio.c head/lib/libarchive/test/test_write_format_cpio_empty.c head/lib/libarchive/test/test_write_format_cpio_newc.c head/lib/libarchive/test/test_write_format_cpio_odc.c head/lib/libarchive/test/test_write_format_mtree.c head/lib/libarchive/test/test_write_format_pax.c head/lib/libarchive/test/test_write_format_shar_empty.c head/lib/libarchive/test/test_write_format_tar.c head/lib/libarchive/test/test_write_format_tar_empty.c head/lib/libarchive/test/test_write_format_tar_ustar.c head/lib/libarchive/test/test_write_format_zip.c head/lib/libarchive/test/test_write_format_zip_empty.c head/lib/libarchive/test/test_write_format_zip_no_compression.c head/lib/libarchive/test/test_write_open_memory.c head/usr.bin/cpio/bsdcpio.1 head/usr.bin/cpio/cmdline.c head/usr.bin/cpio/cpio.c head/usr.bin/cpio/cpio.h head/usr.bin/cpio/cpio_platform.h head/usr.bin/cpio/test/main.c head/usr.bin/cpio/test/test.h head/usr.bin/cpio/test/test_0.c head/usr.bin/cpio/test/test_basic.c head/usr.bin/cpio/test/test_cmdline.c head/usr.bin/cpio/test/test_format_newc.c head/usr.bin/cpio/test/test_gcpio_compat.c head/usr.bin/cpio/test/test_gcpio_compat_ref.bin.uu head/usr.bin/cpio/test/test_gcpio_compat_ref.crc.uu head/usr.bin/cpio/test/test_gcpio_compat_ref.newc.uu head/usr.bin/cpio/test/test_gcpio_compat_ref.ustar.uu head/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.bin.uu head/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.crc.uu head/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.newc.uu head/usr.bin/cpio/test/test_gcpio_compat_ref_nosym.ustar.uu head/usr.bin/cpio/test/test_option_B_upper.c head/usr.bin/cpio/test/test_option_C_upper.c head/usr.bin/cpio/test/test_option_J_upper.c head/usr.bin/cpio/test/test_option_L_upper.c head/usr.bin/cpio/test/test_option_Z_upper.c head/usr.bin/cpio/test/test_option_a.c head/usr.bin/cpio/test/test_option_c.c head/usr.bin/cpio/test/test_option_d.c head/usr.bin/cpio/test/test_option_f.c head/usr.bin/cpio/test/test_option_f.cpio.uu head/usr.bin/cpio/test/test_option_help.c head/usr.bin/cpio/test/test_option_l.c head/usr.bin/cpio/test/test_option_lzma.c head/usr.bin/cpio/test/test_option_m.c head/usr.bin/cpio/test/test_option_m.cpio.uu head/usr.bin/cpio/test/test_option_t.c head/usr.bin/cpio/test/test_option_t.cpio.uu head/usr.bin/cpio/test/test_option_t.stdout.uu head/usr.bin/cpio/test/test_option_tv.stdout.uu head/usr.bin/cpio/test/test_option_u.c head/usr.bin/cpio/test/test_option_version.c head/usr.bin/cpio/test/test_option_y.c head/usr.bin/cpio/test/test_option_z.c head/usr.bin/cpio/test/test_owner_parse.c head/usr.bin/cpio/test/test_passthrough_dotdot.c head/usr.bin/cpio/test/test_passthrough_reverse.c head/usr.bin/cpio/test/test_pathmatch.c head/usr.bin/tar/COPYING head/usr.bin/tar/bsdtar.1 head/usr.bin/tar/bsdtar.c head/usr.bin/tar/bsdtar.h head/usr.bin/tar/bsdtar_platform.h head/usr.bin/tar/cmdline.c head/usr.bin/tar/getdate.c head/usr.bin/tar/read.c head/usr.bin/tar/subst.c head/usr.bin/tar/test/main.c head/usr.bin/tar/test/test.h head/usr.bin/tar/test/test_0.c head/usr.bin/tar/test/test_basic.c head/usr.bin/tar/test/test_copy.c head/usr.bin/tar/test/test_empty_mtree.c head/usr.bin/tar/test/test_getdate.c head/usr.bin/tar/test/test_help.c head/usr.bin/tar/test/test_option_T_upper.c head/usr.bin/tar/test/test_option_q.c head/usr.bin/tar/test/test_option_r.c head/usr.bin/tar/test/test_option_s.c head/usr.bin/tar/test/test_patterns.c head/usr.bin/tar/test/test_patterns_2.tar.uu head/usr.bin/tar/test/test_patterns_3.tar.uu head/usr.bin/tar/test/test_patterns_4.tar.uu head/usr.bin/tar/test/test_stdio.c head/usr.bin/tar/test/test_strip_components.c head/usr.bin/tar/test/test_symlink_dir.c head/usr.bin/tar/test/test_version.c head/usr.bin/tar/tree.c head/usr.bin/tar/tree.h head/usr.bin/tar/util.c head/usr.bin/tar/write.c Modified: head/lib/libarchive/Makefile head/lib/libarchive/test/Makefile head/usr.bin/cpio/Makefile head/usr.bin/cpio/test/Makefile head/usr.bin/tar/Makefile head/usr.bin/tar/test/Makefile Modified: head/lib/libarchive/Makefile ============================================================================== --- head/lib/libarchive/Makefile Thu Dec 22 06:31:29 2011 (r228796) +++ head/lib/libarchive/Makefile Thu Dec 22 08:42:07 2011 (r228797) @@ -1,6 +1,8 @@ # $FreeBSD$ .include +LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive + LIB= archive DPADD= ${LIBZ} LDADD= -lz @@ -20,7 +22,7 @@ LDADD+= -lbsdxml # It has no real relation to the libarchive version number. SHLIB_MAJOR= 5 -CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" +CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\" CFLAGS+= -I${.OBJDIR} .if ${MK_OPENSSL} != "no" @@ -32,6 +34,8 @@ DPADD+= ${LIBMD} LDADD+= -lmd .endif +.PATH: ${LIBARCHIVEDIR}/libarchive + # Headers to be installed in /usr/include INCS= archive.h archive_entry.h @@ -273,8 +277,11 @@ MLINKS+= archive_write_disk.3 archive_wr MLINKS+= archive_write_disk.3 archive_write_disk_set_user_lookup.3 MLINKS+= libarchive.3 archive.3 -.PHONY: check test +.PHONY: check test clean-test check test: - cd ${.CURDIR}/test && make test + cd ${.CURDIR}/test && make obj && make test + +clean-test: + cd ${.CURDIR}/test && make clean .include Modified: head/lib/libarchive/test/Makefile ============================================================================== --- head/lib/libarchive/test/Makefile Thu Dec 22 06:31:29 2011 (r228796) +++ head/lib/libarchive/test/Makefile Thu Dec 22 08:42:07 2011 (r228797) @@ -1,8 +1,23 @@ # $FreeBSD$ -# Where to find the libarchive sources -LA_SRCDIR=${.CURDIR}/.. +LIBARCHIVEDIR= ${.CURDIR}/../../../contrib/libarchive +NO_MAN=yes + +PROG=libarchive_test +INTERNALPROG=yes # Don't install this; it's just for testing +DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML} +LDADD= -L ${.OBJDIR}/.. -larchive +LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml +CFLAGS+= -g +CFLAGS+= -I${.CURDIR}/.. -I${LIBARCHIVEDIR} -I${.OBJDIR} +CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 + +# Uncomment to link against dmalloc +#LDADD+= -L/usr/local/lib -ldmalloc +#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC + +.PATH: ${LIBARCHIVEDIR}/libarchive/test TESTS= \ test_acl_basic.c \ test_acl_freebsd.c \ @@ -120,28 +135,14 @@ SRCS= \ main.c \ read_open_memory.c -NO_MAN=yes - -PROG=libarchive_test -INTERNALPROG=yes # Don't install this; it's just for testing -DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML} -LDADD= -L ${.OBJDIR}/.. -larchive -LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml -CFLAGS+= -g -CFLAGS+= -I${LA_SRCDIR} -I. -CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 - -# Uncomment to link against dmalloc -#LDADD+= -L/usr/local/lib -ldmalloc -#CFLAGS+= -I/usr/local/include -DUSE_DMALLOC - # Build libarchive_test and run it. check test: libarchive_test - ./libarchive_test -r ${.CURDIR} + ./libarchive_test -r ${LIBARCHIVEDIR}/libarchive/test # list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines list.h: ${TESTS} Makefile - (cd ${.CURDIR}; cat test_*.c) | grep DEFINE_TEST > list.h + (cd ${LIBARCHIVEDIR}/libarchive/test; cat test_*.c) | \ + grep DEFINE_TEST > ${.OBJDIR}/list.h CLEANFILES += *.out *.o *.core *~ list.h .dirstamp .depend CLEANDIRS += .deps .libs Modified: head/usr.bin/cpio/Makefile ============================================================================== --- head/usr.bin/cpio/Makefile Thu Dec 22 06:31:29 2011 (r228796) +++ head/usr.bin/cpio/Makefile Thu Dec 22 08:42:07 2011 (r228797) @@ -2,17 +2,20 @@ .include +LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive + PROG= bsdcpio BSDCPIO_VERSION_STRING=2.8.5 +.PATH: ${LIBARCHIVEDIR}/cpio SRCS= cpio.c cmdline.c -.PATH: ${.CURDIR}/../../lib/libarchive/libarchive_fe +.PATH: ${LIBARCHIVEDIR}/libarchive_fe SRCS+= err.c line_reader.c matching.c pathmatch.c CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\" -CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../lib/libarchive/libarchive_fe +CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\" +CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/libarchive_fe .ifdef RELEASE_CRUNCH # FreeBSD's installer uses cpio in crunched binaries that are @@ -32,9 +35,12 @@ LDADD+= -lmd SYMLINKS=bsdcpio ${BINDIR}/cpio MLINKS= bsdcpio.1 cpio.1 -.PHONY: check test +.PHONY: check test clean-test check test: $(PROG) bsdcpio.1.gz - cd ${.CURDIR}/test && make clean test + cd ${.CURDIR}/test && make obj && make test + +clean-test: + cd ${.CURDIR}/test && make clean .include Modified: head/usr.bin/cpio/test/Makefile ============================================================================== --- head/usr.bin/cpio/test/Makefile Thu Dec 22 06:31:29 2011 (r228796) +++ head/usr.bin/cpio/test/Makefile Thu Dec 22 08:42:07 2011 (r228797) @@ -1,14 +1,14 @@ # $FreeBSD$ -# Where to find the cpio sources (for the internal unit tests) -CPIO_SRCDIR=${.CURDIR}/.. +LIBARCHIVEDIR= ${.CURDIR}/../../../contrib/libarchive -.PATH: ${CPIO_SRCDIR} +.PATH: ${LIBARCHIVEDIR}/cpio CPIO_SRCS= cmdline.c -.PATH: ${.CURDIR}/../../../lib/libarchive/libarchive_fe +.PATH: ${LIBARCHIVEDIR}/libarchive_fe CPIO_SRCS+= err.c pathmatch.c +.PATH: ${LIBARCHIVEDIR}/cpio/test TESTS= \ test_0.c \ test_basic.c \ @@ -49,29 +49,30 @@ NO_MAN=yes PROG=bsdcpio_test DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA} -CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" -CFLAGS+= -I.. +CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../config_freebsd.h\" +CFLAGS+= -I${.CURDIR}/.. LDADD= -larchive -lz -lbz2 -llzma #CFLAGS+= -static -g -O2 -Wall CFLAGS+= -g -O2 -Wall CFLAGS+= -I${.OBJDIR} -CFLAGS+= -I${CPIO_SRCDIR} -CFLAGS+= -I${.CURDIR}/../../../lib/libarchive/libarchive_fe +CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/libarchive_fe # Uncomment to link against dmalloc #LDADD+= -L/usr/local/lib -ldmalloc #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC check test: bsdcpio_test - ${.OBJDIR}/bsdcpio_test -p ${.OBJDIR}/../bsdcpio -r ${.CURDIR} + ${.OBJDIR}/bsdcpio_test -p ${.OBJDIR}/../bsdcpio \ + -r ${LIBARCHIVEDIR}/cpio/test ${.OBJDIR}/list.h list.h: ${TESTS} Makefile - (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h + (cd ${LIBARCHIVEDIR}/cpio/test; cat ${TESTS}) | \ + grep DEFINE_TEST > ${.OBJDIR}/list.h clean: rm -f ${CLEANFILES} rm -f *~ -chmod -R +w /tmp/bsdcpio_test.* - rm -rf /tmp/bsdcpio_test.* + rm -rf /tmp/bsdcpio_test .include Modified: head/usr.bin/tar/Makefile ============================================================================== --- head/usr.bin/tar/Makefile Thu Dec 22 06:31:29 2011 (r228796) +++ head/usr.bin/tar/Makefile Thu Dec 22 08:42:07 2011 (r228797) @@ -1,8 +1,12 @@ # $FreeBSD$ .include +LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive + PROG= bsdtar BSDTAR_VERSION_STRING=2.8.5 + +.PATH: ${LIBARCHIVEDIR}/tar SRCS= bsdtar.c \ cmdline.c \ getdate.c \ @@ -12,7 +16,7 @@ SRCS= bsdtar.c \ util.c \ write.c -.PATH: ${.CURDIR}/../../lib/libarchive/libarchive_fe +.PATH: ${LIBARCHIVEDIR}/libarchive_fe SRCS+= err.c \ line_reader.c \ matching.c \ @@ -29,15 +33,18 @@ LDADD+= -lmd .endif CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\" -CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../lib/libarchive -CFLAGS+= -I${.CURDIR}/../../lib/libarchive/libarchive_fe +CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\" +CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBARCHIVEDIR}/libarchive +CFLAGS+= -I${LIBARCHIVEDIR}/libarchive_fe SYMLINKS= bsdtar ${BINDIR}/tar MLINKS= bsdtar.1 tar.1 DEBUG_FLAGS=-g -.PHONY: check test +.PHONY: check test clean-test check test: $(PROG) bsdtar.1.gz - cd ${.CURDIR}/test && make test + cd ${.CURDIR}/test && make obj && make test + +clean-test: + cd ${.CURDIR}/test && make clean .include Modified: head/usr.bin/tar/test/Makefile ============================================================================== --- head/usr.bin/tar/test/Makefile Thu Dec 22 06:31:29 2011 (r228796) +++ head/usr.bin/tar/test/Makefile Thu Dec 22 08:42:07 2011 (r228797) @@ -1,13 +1,13 @@ # $FreeBSD$ -# Where to find the tar sources (for the internal unit tests) -TAR_SRCDIR=${.CURDIR}/.. -.PATH: ${TAR_SRCDIR} +LIBARCHIVEDIR= ${.CURDIR}/../../../contrib/libarchive +.PATH: ${LIBARCHIVEDIR}/tar # Some tar sources are pulled in for white-box tests -TAR_SRCS= \ +TAR_SRCS= \ getdate.c +.PATH: ${LIBARCHIVEDIR}/tar/test TESTS= \ test_0.c \ test_basic.c \ @@ -26,7 +26,7 @@ TESTS= \ test_version.c # Build the test program -SRCS= ${TAR_SRCS} \ +SRCS= ${TAR_SRCS} \ ${TESTS} \ list.h \ main.c @@ -37,24 +37,25 @@ NO_MAN=yes PROG=bsdtar_test DPADD=${LIBARCHIVE} ${LIBBZ2} ${LIBZ} ${LIBLZMA} -CFLAGS+= -DPLATFORM_CONFIG_H=\"config_freebsd.h\" -CFLAGS+= -I.. +CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../config_freebsd.h\" LDADD= -larchive -lz -lbz2 -llzma CFLAGS+= -static -g -O2 -Wall -CFLAGS+= -I${.OBJDIR} -CFLAGS+= -I${TAR_SRCDIR} +CFLAGS+= -I${.CURDIR}/.. -I${.OBJDIR} +CFLAGS+= -I${LIBARCHIVEDIR}/tar # Uncomment to link against dmalloc #LDADD+= -L/usr/local/lib -ldmalloc #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC check test: bsdtar_test - ./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${.CURDIR} + ./bsdtar_test -p ${.OBJDIR}/../bsdtar -r ${LIBARCHIVEDIR}/tar/test list.h: ${TESTS} Makefile - (cd ${.CURDIR}; cat ${TESTS}) | grep DEFINE_TEST > list.h + (cd ${LIBARCHIVEDIR}/tar/test; cat ${TESTS}) | \ + grep DEFINE_TEST > ${.OBJDIR}/list.h clean: + rm -f ${CLEANFILES} rm -f *.out rm -f *.o rm -f *.core From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 08:43:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B5ED106564A; Thu, 22 Dec 2011 08:43:16 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 880C08FC18; Thu, 22 Dec 2011 08:43:15 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so11283666vcb.13 for ; Thu, 22 Dec 2011 00:43:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=cka/d5oka/tJZc3rwvqtn2k6EZOGn9V3EWhoBrJCZwM=; b=bpMiAmFCIcxhbMUgENaTuZWsiWH+RYrwkX/F/Qi+5jgtkhRHrQcrNWF/jA73ByCb46 F44VPZa82YqXAzJR2WWwJfk1mdGNAbCwdsM9O7ylJq/h5TGBJ+L9kdeLSHV2h6Hk46Hs O/13uMbR5H7JbFvKrhyv+ZeYTtj9YhxcoRpMU= MIME-Version: 1.0 Received: by 10.52.114.232 with SMTP id jj8mr5456927vdb.94.1324543394651; Thu, 22 Dec 2011 00:43:14 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.158.104 with HTTP; Thu, 22 Dec 2011 00:43:14 -0800 (PST) In-Reply-To: <201112211701.pBLH1DpL077981@svn.freebsd.org> References: <201112211701.pBLH1DpL077981@svn.freebsd.org> Date: Thu, 22 Dec 2011 00:43:14 -0800 X-Google-Sender-Auth: PQVCWJon46E0dzKtWaPFxHdhjS4 Message-ID: From: Adrian Chadd To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228783 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 08:43:16 -0000 .. and once this LLVM regression has been fixed, do you plan on reverting this change to conf? Adrian On 21 December 2011 09:01, Dimitry Andric wrote: > Author: dim > Date: Wed Dec 21 17:01:13 2011 > New Revision: 228783 > URL: http://svn.freebsd.org/changeset/base/228783 > > Log: > =A0When building with clang, disable -Wshift-count-negative and > =A0-Wshift-count-overflow for sys/dev/ath/ath_hal/ah_regdomain.c, as it > =A0gets multiple instances of the following warnings: > > =A0In file included from sys/dev/ath/ath_hal/ah_regdomain.c:99: > =A0sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:69:15: warning: shift= count is negative [-Wshift-count-negative] > =A0 =A0 =A0 =A0 =A0 .chan11a =A0 =A0 =A0 =A0 =A0 =A0 =A0 =3D BM4(F1_4950_= 4980, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0^~= ~~~~~~~~~~~~~~~ > =A0sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:41:4: note: expanded = from: > =A0 =A0 =A0 =A0 =A0 =A0W1(_fa) | W1(_fb) | W1(_fc) | W1(_fd) } > =A0 =A0 =A0 =A0 =A0 =A0^ > =A0sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:34:45: note: expanded= from: > =A0 =A0 =A0 =A0 =A0(((_a) > 63 && (_a) < 128 ? (((uint64_t) 1)<<((_a)-64)= ) : (uint64_t) 0)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ^ ~~~~~~~~~ > > =A0and: > > =A0In file included from sys/dev/ath/ath_hal/ah_regdomain.c:99: > =A0sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:629:15: error: shift = count >=3D width of type [-Werror,-Wshift-count-overflow] > =A0 =A0 =A0 =A0 =A0 .chan11a =A0 =A0 =A0 =A0 =A0 =A0 =A0 =3D BM4(W2_5260_= 5320, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0^~= ~~~~~~~~~~~~~~~ > =A0sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:40:34: note: expanded= from: > =A0 =A0 =A0 =A0 =A0{ W0(_fa) | W0(_fb) | W0(_fc) | W0(_fd), =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0^ > =A0sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:32:44: note: expanded= from: > =A0 =A0 =A0 =A0 =A0(((_a) >=3D 0 && (_a) < 64 ? (((uint64_t) 1)<<(_a)) : = (uint64_t) 0)) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0^ ~~~~ > > =A0Both warnings are false positives, caused by LLVM PR 10030. =A0For glo= bal > =A0initializations, clang fails to detect that the branch of the ternary > =A0operator causing the warning is dead. > > =A0MFC after: =A0 =A01 week > > Modified: > =A0head/sys/conf/files > =A0head/sys/conf/kern.mk > > Modified: head/sys/conf/files > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/files Wed Dec 21 16:47:01 2011 =A0 =A0 =A0 =A0(r228782) > +++ head/sys/conf/files Wed Dec 21 17:01:13 2011 =A0 =A0 =A0 (r228783) > @@ -613,7 +613,7 @@ dev/ath/ath_hal/ah_eeprom_9287.c \ > =A0 =A0 =A0 =A0optional ath_hal | ath_ar9287 \ > =A0 =A0 =A0 =A0compile-with "${NORMAL_C} -I$S/dev/ath" > =A0dev/ath/ath_hal/ah_regdomain.c optional ath \ > - =A0 =A0 =A0 compile-with "${NORMAL_C} -I$S/dev/ath" > + =A0 =A0 =A0 compile-with "${NORMAL_C} ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_= WSHIFT_COUNT_OVERFLOW} -I$S/dev/ath" > =A0# ar5210 > =A0dev/ath/ath_hal/ar5210/ar5210_attach.c =A0 =A0 =A0 =A0 optional ath_ha= l | ath_ar5210 \ > =A0 =A0 =A0 =A0compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_ha= l" > > Modified: head/sys/conf/kern.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/kern.mk =A0 =A0 =A0 Wed Dec 21 16:47:01 2011 =A0 =A0 = =A0 =A0(r228782) > +++ head/sys/conf/kern.mk =A0 =A0 =A0 Wed Dec 21 17:01:13 2011 =A0 =A0 = =A0 (r228783) > @@ -17,6 +17,8 @@ CWARNFLAGS?=3D =A0-Wall -Wredundant-decls -Wn > =A0.if ${CC:T:Mclang} =3D=3D "clang" > =A0NO_WCONSTANT_CONVERSION=3D =A0 =A0 =A0 -Wno-constant-conversion > =A0NO_WARRAY_BOUNDS=3D =A0 =A0 =A0 =A0 =A0 =A0 =A0-Wno-array-bounds > +NO_WSHIFT_COUNT_NEGATIVE=3D =A0 =A0 =A0-Wno-shift-count-negative > +NO_WSHIFT_COUNT_OVERFLOW=3D =A0 =A0 =A0-Wno-shift-count-overflow > =A0.endif > > =A0# From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 09:27:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F3EC106566C; Thu, 22 Dec 2011 09:27:17 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 1B1BB8FC0A; Thu, 22 Dec 2011 09:27:16 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id A8AC2F9F; Thu, 22 Dec 2011 10:27:15 +0100 (CET) Date: Thu, 22 Dec 2011 10:26:13 +0100 From: Pawel Jakub Dawidek To: Alexander Best Message-ID: <20111222092613.GC1676@garage.freebsd.pl> References: <201112211716.pBLHGhDH078507@svn.freebsd.org> <201112211700.42772.jhb@freebsd.org> <20111221232754.GA51331@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7qSK/uQB79J36Y4o" Content-Disposition: inline In-Reply-To: <20111221232754.GA51331@freebsd.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Adrian Chadd , src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, Dimitry Andric , svn-src-head@freebsd.org Subject: Re: svn commit: r228785 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 09:27:17 -0000 --7qSK/uQB79J36Y4o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 21, 2011 at 11:27:54PM +0000, Alexander Best wrote: > the commits should stay. after all this is HEAD. this way all developers > running HEAD and with the appropriate ath hardware will test the changes.= if > dim@ really broke something, people will notice. >=20 > the changes should *not* be MFC'ed. but if no one complains until 10.0-RE= LEASE, > it's very unlikely he broke something. >=20 > plus...does it make a different, if you test HEAD with the changes presen= t or > test HEAD with the changes integrated via patches? >=20 > one way or the other you can test the changes and *if* something broke, t= he > commits can be reverted. Is this a joke? Having HEAD as stable as possible is very important. That's the only way to actually expect people (including developers (including myself!)) to run HEAD on their laptops and less important servers. Those people get upset as any other user if their systems stop working, because untested changes are being committed. This is not to pick on Dimitry, but on those who actually believe that it is ok to commit untested changes to HEAD. IT IS NOT. Maybe you are just confused, because the place you are looking for seems to be junkyard, but not HEAD, NEVER HEAD! BTW. This is a lesson we learned from 5-CURRENT. It was so unstable that nobody wanted to run it, and so unstable it was even hard to test changes on it. In turn it was becoming even more unstable, because people kept committing more untested code. Please, do never, ever encourage evil like that or I'll turn on mean Pawel:) --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --7qSK/uQB79J36Y4o Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk7y97UACgkQForvXbEpPzQFJQCg0jyxkvDWJMSpPUInOT1dD7S9 1GcAoJf4jBRxjypnkTRaqnLSa59S4Dgz =QN/H -----END PGP SIGNATURE----- --7qSK/uQB79J36Y4o-- From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 09:36:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 048051065688; Thu, 22 Dec 2011 09:36:38 +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 E7CC98FC0C; Thu, 22 Dec 2011 09:36:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBM9abYu009473; Thu, 22 Dec 2011 09:36:37 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBM9abps009471; Thu, 22 Dec 2011 09:36:37 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112220936.pBM9abps009471@svn.freebsd.org> From: Ed Schouten Date: Thu, 22 Dec 2011 09:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228798 - head/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 09:36:38 -0000 Author: ed Date: Thu Dec 22 09:36:37 2011 New Revision: 228798 URL: http://svn.freebsd.org/changeset/base/228798 Log: Add placeholder code for prepending pathnames to tftp. At work we have a single tftp server that provides installation data for a variety of operating systems. I'd rather place our FreeBSD-related files in a subdirectory, instead of the root. It would be nice if this setting could be run-time configurable, but at least in our specific case, this is not possible, as pxeboot is chainloaded through pxelinux. Sponsored by: Kumina bv Modified: head/lib/libstand/tftp.c Modified: head/lib/libstand/tftp.c ============================================================================== --- head/lib/libstand/tftp.c Thu Dec 22 08:42:07 2011 (r228797) +++ head/lib/libstand/tftp.c Thu Dec 22 09:36:37 2011 (r228798) @@ -292,8 +292,15 @@ tftp_makereq(struct tftp_handle *h) wbuf.t.th_opcode = htons((u_short) RRQ); wtail = wbuf.t.th_stuff; l = strlen(h->path); +#ifdef TFTP_PREPEND_PATH + if (l > FNAME_SIZE - (sizeof(TFTP_PREPEND_PATH) - 1)) + return (ENAMETOOLONG); + bcopy(TFTP_PREPEND_PATH, wtail, sizeof(TFTP_PREPEND_PATH) - 1); + wtail += sizeof(TFTP_PREPEND_PATH) - 1; +#else if (l > FNAME_SIZE) return (ENAMETOOLONG); +#endif bcopy(h->path, wtail, l + 1); wtail += l + 1; bcopy("octet", wtail, 6); From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 10:13:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 171DE1065670; Thu, 22 Dec 2011 10:13:11 +0000 (UTC) Date: Thu, 22 Dec 2011 10:13:11 +0000 From: Alexander Best To: Pawel Jakub Dawidek Message-ID: <20111222101311.GA21964@freebsd.org> References: <201112211716.pBLHGhDH078507@svn.freebsd.org> <201112211700.42772.jhb@freebsd.org> <20111221232754.GA51331@freebsd.org> <20111222092613.GC1676@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111222092613.GC1676@garage.freebsd.pl> Cc: Adrian Chadd , src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, Dimitry Andric , svn-src-head@freebsd.org Subject: Re: svn commit: r228785 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 10:13:11 -0000 On Thu Dec 22 11, Pawel Jakub Dawidek wrote: > On Wed, Dec 21, 2011 at 11:27:54PM +0000, Alexander Best wrote: > > the commits should stay. after all this is HEAD. this way all developers > > running HEAD and with the appropriate ath hardware will test the changes. if > > dim@ really broke something, people will notice. > > > > the changes should *not* be MFC'ed. but if no one complains until 10.0-RELEASE, > > it's very unlikely he broke something. > > > > plus...does it make a different, if you test HEAD with the changes present or > > test HEAD with the changes integrated via patches? > > > > one way or the other you can test the changes and *if* something broke, the > > commits can be reverted. > > Is this a joke? Having HEAD as stable as possible is very important. > That's the only way to actually expect people (including developers > (including myself!)) to run HEAD on their laptops and less important > servers. Those people get upset as any other user if their systems stop > working, because untested changes are being committed. > > This is not to pick on Dimitry, but on those who actually believe that > it is ok to commit untested changes to HEAD. IT IS NOT. Maybe you are > just confused, because the place you are looking for seems to be > junkyard, but not HEAD, NEVER HEAD! > > BTW. This is a lesson we learned from 5-CURRENT. It was so unstable that > nobody wanted to run it, and so unstable it was even hard to test > changes on it. In turn it was becoming even more unstable, because > people kept committing more untested code. > > Please, do never, ever encourage evil like that or I'll turn on mean Pawel:) sure i understand your concerns and i completely agree that HEAD is not a playground for experimental changes. however dim@'s changes don't seem that disruptive. plus: reverting them and letting adrian@ test the patches on his own poses a cathedral-policy, whereas letting everybody who is running HEAD test them, seems more of a bazar-way. ;) cheers. alex > > -- > Pawel Jakub Dawidek http://www.wheelsystems.com > FreeBSD committer http://www.FreeBSD.org > Am I Evil? Yes, I Am! http://yomoli.com From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 13:07:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9B3F106566C; Thu, 22 Dec 2011 13:07:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C11A38FC16; Thu, 22 Dec 2011 13:07:38 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 5CC6146B1A; Thu, 22 Dec 2011 08:07:38 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D6ECCB93F; Thu, 22 Dec 2011 08:07:37 -0500 (EST) From: John Baldwin To: Kevin Lo Date: Thu, 22 Dec 2011 07:39:29 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201112220631.pBM6VT6g003775@svn.freebsd.org> In-Reply-To: <201112220631.pBM6VT6g003775@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201112220739.29940.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 22 Dec 2011 08:07:37 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228796 - head/sys/fs/msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 13:07:39 -0000 On Thursday, December 22, 2011 1:31:29 am Kevin Lo wrote: > Author: kevlo > Date: Thu Dec 22 06:31:29 2011 > New Revision: 228796 > URL: http://svn.freebsd.org/changeset/base/228796 > > Log: > Discarding local array based on return values Is this an incomplete log message? This doesn't really explain (to me at least) what this change does or why it is doing it. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 13:07:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25E35106564A; Thu, 22 Dec 2011 13:07:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id EF2908FC17; Thu, 22 Dec 2011 13:07:39 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id A77CA46B09; Thu, 22 Dec 2011 08:07:39 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 15C5CB955; Thu, 22 Dec 2011 08:07:39 -0500 (EST) From: John Baldwin To: Martin Matuska Date: Thu, 22 Dec 2011 07:40:45 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201112220842.pBM8g8aF007717@svn.freebsd.org> In-Reply-To: <201112220842.pBM8g8aF007717@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201112220740.45572.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 22 Dec 2011 08:07:39 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228797 - in head: lib/libarchive lib/libarchive/libarchive_fe lib/libarchive/test usr.bin/cpio usr.bin/cpio/test usr.bin/tar usr.bin/tar/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 13:07:40 -0000 On Thursday, December 22, 2011 3:42:08 am Martin Matuska wrote: > Author: mm > Date: Thu Dec 22 08:42:07 2011 > New Revision: 228797 > URL: http://svn.freebsd.org/changeset/base/228797 > > Log: > Use contrib sources for building libarchive, tar and cpio. > Make "make test" fully operational. > > MFC after: 2 weeks Thanks for doing all this work! Hopefully it will make future imports of libarchive easier. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 13:07:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB47B1065670; Thu, 22 Dec 2011 13:07:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AF1C58FC18; Thu, 22 Dec 2011 13:07:41 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 6682646B0A; Thu, 22 Dec 2011 08:07:41 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D5915B93F; Thu, 22 Dec 2011 08:07:40 -0500 (EST) From: John Baldwin To: Alexander Best Date: Thu, 22 Dec 2011 08:02:27 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201112211716.pBLHGhDH078507@svn.freebsd.org> <201112211700.42772.jhb@freebsd.org> <20111221232754.GA51331@freebsd.org> In-Reply-To: <20111221232754.GA51331@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112220802.27434.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 22 Dec 2011 08:07:40 -0500 (EST) Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, Dimitry Andric , svn-src-all@freebsd.org Subject: Re: svn commit: r228785 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 13:07:42 -0000 On Wednesday, December 21, 2011 6:27:54 pm Alexander Best wrote: > On Wed Dec 21 11, John Baldwin wrote: > > On Wednesday, December 21, 2011 4:52:04 pm Adrian Chadd wrote: > > > Erm, why did you do this without first getting clearance from someone > > > who has the hardware to test it? > > > > > > Just because it looks obviously wrong to you, doesn't at all mean that > > > it's "wrong". It's quite possible that the driver _requires_ those > > > bits to be written to the hardware as 0. > > > > > > > > > I'd appreciate it if would please revert this and other ath/hal > > > changes until I've had time to research them and test them out. > > > > I agree it should be reviewed, but if you are seriously depending on > > the fact that the shifted values are beyond the edge of the word boundary > > and so the result "wraps" to zero, then I'd question the sanity of your code. > > i disagree. You don't think changes should be reviewed (that's what I said above, I did not necessarily say it should be reverted)? That's way out in left field if that is what you really think. As for reverting the changes, I think they are small enough that is probably a bit overboard unless someone else reports an actual problem with them. (Specifically, I don't think the bar is high enough in this case to warrant a reversion.) However, I think that for future changes, Dimitry should get these sort of changes reviewed before committing them. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 13:47:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3AB8106566C; Thu, 22 Dec 2011 13:47:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B838A8FC1A; Thu, 22 Dec 2011 13:47:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMDlal9019349; Thu, 22 Dec 2011 13:47:36 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMDlaEt019346; Thu, 22 Dec 2011 13:47:36 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112221347.pBMDlaEt019346@svn.freebsd.org> From: Dimitry Andric Date: Thu, 22 Dec 2011 13:47:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228799 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 13:47:37 -0000 Author: dim Date: Thu Dec 22 13:47:36 2011 New Revision: 228799 URL: http://svn.freebsd.org/changeset/base/228799 Log: Revert r228785. We'll need to work around the warnings in another way. Requested by: adrian MFC after: 1 week Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Thu Dec 22 09:36:37 2011 (r228798) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Thu Dec 22 13:47:36 2011 (r228799) @@ -245,9 +245,9 @@ #define AR_SCR_SLDUR 0x0000ffff /* sleep duration */ #define AR_SCR_SLE 0x00030000 /* sleep enable */ #define AR_SCR_SLE_S 16 -#define AR_SCR_SLE_WAKE 0 /* force wake */ -#define AR_SCR_SLE_SLP 1 /* force sleep */ -#define AR_SCR_SLE_ALLOW 2 /* allow to control sleep */ +#define AR_SCR_SLE_WAKE 0x00000000 /* force wake */ +#define AR_SCR_SLE_SLP 0x00010000 /* force sleep */ +#define AR_SCR_SLE_ALLOW 0x00020000 /* allow to control sleep */ #define AR_SCR_BITS "\20\20SLE_SLP\21SLE_ALLOW" #define AR_INTPEND_IP 0x00000001 /* interrupt pending */ Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Thu Dec 22 09:36:37 2011 (r228798) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Thu Dec 22 13:47:36 2011 (r228799) @@ -618,9 +618,9 @@ #define AR_SCR_SLDUR_S 0 #define AR_SCR_SLE 0x00030000 /* sleep enable mask */ #define AR_SCR_SLE_S 16 /* sleep enable bits shift */ -#define AR_SCR_SLE_WAKE 0 /* force wake */ -#define AR_SCR_SLE_SLP 1 /* force sleep */ -#define AR_SCR_SLE_NORM 2 /* sleep logic normal operation */ +#define AR_SCR_SLE_WAKE 0x00000000 /* force wake */ +#define AR_SCR_SLE_SLP 0x00010000 /* force sleep */ +#define AR_SCR_SLE_NORM 0x00020000 /* sleep logic normal operation */ #define AR_SCR_SLE_UNITS 0x00000008 /* SCR units/TU */ #define AR_SCR_BITS "\20\20SLE_SLP\21SLE" From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 14:06:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 428D8106566C; Thu, 22 Dec 2011 14:06:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id BD4FC8FC12; Thu, 22 Dec 2011 14:06:10 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:64be:2ed2:2384:1368] (unknown [IPv6:2001:7b8:3a7:0:64be:2ed2:2384:1368]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DF7D75C37; Thu, 22 Dec 2011 15:06:09 +0100 (CET) Message-ID: <4EF33951.2010109@FreeBSD.org> Date: Thu, 22 Dec 2011 15:06:09 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111214 Thunderbird/9.0 MIME-Version: 1.0 To: Adrian Chadd References: <201112211701.pBLH1DpL077981@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228783 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 14:06:11 -0000 On 2011-12-22 09:43, Adrian Chadd wrote: > On 21 December 2011 09:01, Dimitry Andric wrote: >> Author: dim >> Date: Wed Dec 21 17:01:13 2011 >> New Revision: 228783 >> URL: http://svn.freebsd.org/changeset/base/228783 ... >> Both warnings are false positives, caused by LLVM PR 10030. For global >> initializations, clang fails to detect that the branch of the ternary >> operator causing the warning is dead. > .. and once this LLVM regression has been fixed, do you plan on > reverting this change to conf? Yes. The LLVM PR (really a Clang bug) can be followed here: http://llvm.org/bugs/show_bug.cgi?id=10030 Since it is in there for quite some time already, I assume the problem is rather tricky to fix. From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 14:09:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E12BA106566C; Thu, 22 Dec 2011 14:09:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFF758FC0A; Thu, 22 Dec 2011 14:09:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBME9800020113; Thu, 22 Dec 2011 14:09:08 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBME980v020110; Thu, 22 Dec 2011 14:09:08 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112221409.pBME980v020110@svn.freebsd.org> From: Dimitry Andric Date: Thu, 22 Dec 2011 14:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228800 - in head/sys/dev/ath/ath_hal: ar5212 ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 14:09:09 -0000 Author: dim Date: Thu Dec 22 14:09:08 2011 New Revision: 228800 URL: http://svn.freebsd.org/changeset/base/228800 Log: Revert r228786. We'll need to work around the warnings in another way. Requested by: adrian MFC after: 1 week Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Thu Dec 22 13:47:36 2011 (r228799) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Thu Dec 22 14:09:08 2011 (r228800) @@ -574,7 +574,7 @@ ar5212SetDecompMask(struct ath_hal *ah, struct ath_hal_5212 *ahp = AH5212(ah); if (keyidx >= HAL_DECOMP_MASK_SIZE) - return AH_FALSE; + return HAL_EINVAL; OS_REG_WRITE(ah, AR_DCM_A, keyidx); OS_REG_WRITE(ah, AR_DCM_D, en ? AR_DCM_D_EN : 0); ahp->ah_decompMask[keyidx] = en; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Dec 22 13:47:36 2011 (r228799) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Dec 22 14:09:08 2011 (r228800) @@ -161,7 +161,7 @@ ar5416SetAntennaSwitch(struct ath_hal *a HAL_BOOL ar5416SetDecompMask(struct ath_hal *ah, uint16_t keyidx, int en) { - return AH_TRUE; + return HAL_OK; } /* Setup coverage class */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 15:03:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 121DE106566B; Thu, 22 Dec 2011 15:03:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 019788FC08; Thu, 22 Dec 2011 15:03:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMF3m0x021932; Thu, 22 Dec 2011 15:03:48 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMF3m0w021930; Thu, 22 Dec 2011 15:03:48 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112221503.pBMF3m0w021930@svn.freebsd.org> From: Dimitry Andric Date: Thu, 22 Dec 2011 15:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228801 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 15:03:49 -0000 Author: dim Date: Thu Dec 22 15:03:48 2011 New Revision: 228801 URL: http://svn.freebsd.org/changeset/base/228801 Log: Remove -mfancy-math from LIB32CPUFLAGS for amd64. It has been default for our gcc since more than three years (see r181534, which is also in stable/9 and stable/8). This flag used to be for the benefit of the old in-kernel math emulator, which was removed more than eight years ago. Pointed out by: arundel MFC after: 1 week Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Dec 22 14:09:08 2011 (r228800) +++ head/Makefile.inc1 Thu Dec 22 15:03:48 2011 (r228801) @@ -276,7 +276,6 @@ LIB32CPUFLAGS= -march=i686 -mmmx -msse - .else LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif -LIB32CPUFLAGS+= -mfancy-math-387 LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \ MACHINE_CPU="i686 mmx sse sse2" \ LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \ From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 15:13:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B30D106564A; Thu, 22 Dec 2011 15:13:33 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A34D8FC12; Thu, 22 Dec 2011 15:13:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMFDWdX022297; Thu, 22 Dec 2011 15:13:32 GMT (envelope-from fabient@svn.freebsd.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMFDWCN022294; Thu, 22 Dec 2011 15:13:32 GMT (envelope-from fabient@svn.freebsd.org) Message-Id: <201112221513.pBMFDWCN022294@svn.freebsd.org> From: Fabien Thomas Date: Thu, 22 Dec 2011 15:13:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228802 - head/sys/dev/viawd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 15:13:33 -0000 Author: fabient Date: Thu Dec 22 15:13:32 2011 New Revision: 228802 URL: http://svn.freebsd.org/changeset/base/228802 Log: Correctly spell my email address. Modified: head/sys/dev/viawd/viawd.c head/sys/dev/viawd/viawd.h Modified: head/sys/dev/viawd/viawd.c ============================================================================== --- head/sys/dev/viawd/viawd.c Thu Dec 22 15:03:48 2011 (r228801) +++ head/sys/dev/viawd/viawd.c Thu Dec 22 15:13:32 2011 (r228802) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Fabien Thomas + * Copyright (c) 2011 Fabien Thomas * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/sys/dev/viawd/viawd.h ============================================================================== --- head/sys/dev/viawd/viawd.h Thu Dec 22 15:03:48 2011 (r228801) +++ head/sys/dev/viawd/viawd.h Thu Dec 22 15:13:32 2011 (r228802) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2011 Fabien Thomas + * Copyright (c) 2011 Fabien Thomas * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 15:33:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E89F6106564A; Thu, 22 Dec 2011 15:33:41 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC5E28FC0A; Thu, 22 Dec 2011 15:33:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMFXf82022991; Thu, 22 Dec 2011 15:33:41 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMFXfC4022989; Thu, 22 Dec 2011 15:33:41 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201112221533.pBMFXfC4022989@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 22 Dec 2011 15:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228803 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 15:33:42 -0000 Author: luigi Date: Thu Dec 22 15:33:41 2011 New Revision: 228803 URL: http://svn.freebsd.org/changeset/base/228803 Log: put back netmap support, deleted by mistake in a previous commit Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Thu Dec 22 15:13:32 2011 (r228802) +++ head/sys/dev/e1000/if_igb.c Thu Dec 22 15:33:41 2011 (r228803) @@ -368,6 +368,9 @@ SYSCTL_INT(_hw_igb, OID_AUTO, rx_process &igb_rx_process_limit, 0, "Maximum number of received packets to process at a time, -1 means unlimited"); +#ifdef DEV_NETMAP /* see ixgbe.c for details */ +#include +#endif /* DEV_NETMAP */ /********************************************************************* * Device identification routine * @@ -664,6 +667,9 @@ igb_attach(device_t dev) if (error) goto err_late; +#ifdef DEV_NETMAP + igb_netmap_attach(adapter); +#endif /* DEV_NETMAP */ INIT_DEBUGOUT("igb_attach: end"); return (0); @@ -742,6 +748,9 @@ igb_detach(device_t dev) callout_drain(&adapter->timer); +#ifdef DEV_NETMAP + netmap_detach(adapter->ifp); +#endif /* DEV_NETMAP */ igb_free_pci_resources(adapter); bus_generic_detach(dev); if_free(ifp); @@ -3279,9 +3288,16 @@ igb_setup_transmit_ring(struct tx_ring * struct adapter *adapter = txr->adapter; struct igb_tx_buffer *txbuf; int i; +#ifdef DEV_NETMAP + struct netmap_adapter *na = NA(adapter->ifp); + struct netmap_slot *slot; +#endif /* DEV_NETMAP */ /* Clear the old descriptor contents */ IGB_TX_LOCK(txr); +#ifdef DEV_NETMAP + slot = netmap_reset(na, NR_TX, txr->me, 0); +#endif /* DEV_NETMAP */ bzero((void *)txr->tx_base, (sizeof(union e1000_adv_tx_desc)) * adapter->num_tx_desc); /* Reset indices */ @@ -3298,6 +3314,17 @@ igb_setup_transmit_ring(struct tx_ring * m_freem(txbuf->m_head); txbuf->m_head = NULL; } +#ifdef DEV_NETMAP + if (slot) { + /* slot si is mapped to the i-th NIC-ring entry */ + int si = i + na->tx_rings[txr->me].nkr_hwofs; + + if (si < 0) + si += na->num_tx_desc; + netmap_load_map(txr->txtag, txbuf->map, + NMB(slot + si), na->buff_size); + } +#endif /* DEV_NETMAP */ /* clear the watch index */ txbuf->next_eop = -1; } @@ -3664,6 +3691,19 @@ igb_txeof(struct tx_ring *txr) IGB_TX_LOCK_ASSERT(txr); +#ifdef DEV_NETMAP + if (ifp->if_capenable & IFCAP_NETMAP) { + struct netmap_adapter *na = NA(ifp); + + selwakeuppri(&na->tx_rings[txr->me].si, PI_NET); + IGB_TX_UNLOCK(txr); + IGB_CORE_LOCK(adapter); + selwakeuppri(&na->tx_rings[na->num_queues + 1].si, PI_NET); + IGB_CORE_UNLOCK(adapter); + IGB_TX_LOCK(txr); + return FALSE; + } +#endif /* DEV_NETMAP */ if (txr->tx_avail == adapter->num_tx_desc) { txr->queue_status = IGB_QUEUE_IDLE; return FALSE; @@ -3987,6 +4027,10 @@ igb_setup_receive_ring(struct rx_ring *r bus_dma_segment_t pseg[1], hseg[1]; struct lro_ctrl *lro = &rxr->lro; int rsize, nsegs, error = 0; +#ifdef DEV_NETMAP + struct netmap_adapter *na = NA(rxr->adapter->ifp); + struct netmap_slot *slot; +#endif /* DEV_NETMAP */ adapter = rxr->adapter; dev = adapter->dev; @@ -3994,6 +4038,9 @@ igb_setup_receive_ring(struct rx_ring *r /* Clear the ring contents */ IGB_RX_LOCK(rxr); +#ifdef DEV_NETMAP + slot = netmap_reset(na, NR_RX, rxr->me, 0); +#endif /* DEV_NETMAP */ rsize = roundup2(adapter->num_rx_desc * sizeof(union e1000_adv_rx_desc), IGB_DBA_ALIGN); bzero((void *)rxr->rx_base, rsize); @@ -4012,6 +4059,22 @@ igb_setup_receive_ring(struct rx_ring *r struct mbuf *mh, *mp; rxbuf = &rxr->rx_buffers[j]; +#ifdef DEV_NETMAP + if (slot) { + /* slot sj is mapped to the i-th NIC-ring entry */ + int sj = j + na->rx_rings[rxr->me].nkr_hwofs; + void *addr; + + if (sj < 0) + sj += na->num_rx_desc; + addr = NMB(slot + sj); + netmap_load_map(rxr->ptag, + rxbuf->pmap, addr, na->buff_size); + /* Update descriptor */ + rxr->rx_base[j].read.pkt_addr = htole64(vtophys(addr)); + continue; + } +#endif /* DEV_NETMAP */ if (rxr->hdr_split == FALSE) goto skip_head; @@ -4296,6 +4359,26 @@ igb_initialize_receive_units(struct adap for (int i = 0; i < adapter->num_queues; i++) { rxr = &adapter->rx_rings[i]; E1000_WRITE_REG(hw, E1000_RDH(i), rxr->next_to_check); +#ifdef DEV_NETMAP + /* + * an init() while a netmap client is active must + * preserve the rx buffers passed to userspace. + * In this driver it means we adjust RDT to + * somthing different from next_to_refresh + * (which is not used in netmap mode). + */ + if (ifp->if_capenable & IFCAP_NETMAP) { + struct netmap_adapter *na = NA(adapter->ifp); + struct netmap_kring *kring = &na->rx_rings[i]; + int t = rxr->next_to_refresh - kring->nr_hwavail; + + if (t >= adapter->num_rx_desc) + t -= adapter->num_rx_desc; + else if (t < 0) + t += adapter->num_rx_desc; + E1000_WRITE_REG(hw, E1000_RDT(i), t); + } else +#endif /* DEV_NETMAP */ E1000_WRITE_REG(hw, E1000_RDT(i), rxr->next_to_refresh); } return; @@ -4474,6 +4557,19 @@ igb_rxeof(struct igb_queue *que, int cou bus_dmamap_sync(rxr->rxdma.dma_tag, rxr->rxdma.dma_map, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); +#ifdef DEV_NETMAP + if (ifp->if_capenable & IFCAP_NETMAP) { + struct netmap_adapter *na = NA(ifp); + + selwakeuppri(&na->rx_rings[rxr->me].si, PI_NET); + IGB_RX_UNLOCK(rxr); + IGB_CORE_LOCK(adapter); + selwakeuppri(&na->rx_rings[na->num_queues + 1].si, PI_NET); + IGB_CORE_UNLOCK(adapter); + return (0); + } +#endif /* DEV_NETMAP */ + /* Main clean loop */ for (i = rxr->next_to_check; count != 0;) { struct mbuf *sendmp, *mh, *mp; From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 16:01:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2671106566B; Thu, 22 Dec 2011 16:01:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1E108FC13; Thu, 22 Dec 2011 16:01:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMG1Aqj023875; Thu, 22 Dec 2011 16:01:10 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMG1A1C023873; Thu, 22 Dec 2011 16:01:10 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112221601.pBMG1A1C023873@svn.freebsd.org> From: John Baldwin Date: Thu, 22 Dec 2011 16:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228804 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 16:01:11 -0000 Author: jhb Date: Thu Dec 22 16:01:10 2011 New Revision: 228804 URL: http://svn.freebsd.org/changeset/base/228804 Log: Use TASK_INITIALIZER() for dev_dtr_task rather than a dedicated SYSINIT(). Modified: head/sys/kern/kern_conf.c Modified: head/sys/kern/kern_conf.c ============================================================================== --- head/sys/kern/kern_conf.c Thu Dec 22 15:33:41 2011 (r228803) +++ head/sys/kern/kern_conf.c Thu Dec 22 16:01:10 2011 (r228804) @@ -55,6 +55,7 @@ struct mtx devmtx; static void destroy_devl(struct cdev *dev); static int destroy_dev_sched_cbl(struct cdev *dev, void (*cb)(void *), void *arg); +static void destroy_dev_tq(void *ctx, int pending); static int make_dev_credv(int flags, struct cdev **dres, struct cdevsw *devsw, int unit, struct ucred *cr, uid_t uid, gid_t gid, int mode, const char *fmt, va_list ap); @@ -1298,7 +1299,7 @@ clone_cleanup(struct clonedevs **cdp) static TAILQ_HEAD(, cdev_priv) dev_ddtr = TAILQ_HEAD_INITIALIZER(dev_ddtr); -static struct task dev_dtr_task; +static struct task dev_dtr_task = TASK_INITIALIZER(0, destroy_dev_tq, NULL); static void destroy_dev_tq(void *ctx, int pending) @@ -1386,15 +1387,6 @@ drain_dev_clone_events(void) sx_xunlock(&clone_drain_lock); } -static void -devdtr_init(void *dummy __unused) -{ - - TASK_INIT(&dev_dtr_task, 0, destroy_dev_tq, NULL); -} - -SYSINIT(devdtr, SI_SUB_DEVFS, SI_ORDER_SECOND, devdtr_init, NULL); - #include "opt_ddb.h" #ifdef DDB #include From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 16:16:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BC871065678; Thu, 22 Dec 2011 16:16:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0ABEA8FC19; Thu, 22 Dec 2011 16:16:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMGGCaf024389; Thu, 22 Dec 2011 16:16:12 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMGGCDa024386; Thu, 22 Dec 2011 16:16:12 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112221616.pBMGGCDa024386@svn.freebsd.org> From: Dimitry Andric Date: Thu, 22 Dec 2011 16:16:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228805 - in head/sys/modules/aic7xxx: ahc/ahc_pci ahd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 16:16:13 -0000 Author: dim Date: Thu Dec 22 16:16:12 2011 New Revision: 228805 URL: http://svn.freebsd.org/changeset/base/228805 Log: Disable -Wconstant-conversion warnings for the aic7xxx module in a more fine-grained way: only add the option for the specific .c files that need them, like via sys/conf/files. MFC after: 1 week Modified: head/sys/modules/aic7xxx/ahc/ahc_pci/Makefile head/sys/modules/aic7xxx/ahd/Makefile Modified: head/sys/modules/aic7xxx/ahc/ahc_pci/Makefile ============================================================================== --- head/sys/modules/aic7xxx/ahc/ahc_pci/Makefile Thu Dec 22 16:01:10 2011 (r228804) +++ head/sys/modules/aic7xxx/ahc/ahc_pci/Makefile Thu Dec 22 16:16:12 2011 (r228805) @@ -12,6 +12,8 @@ SRCS+= device_if.h bus_if.h pci_if.h SRCS+= opt_scsi.h opt_cam.h opt_aic7xxx.h CFLAGS+= -I${.CURDIR}/../../../../dev/aic7xxx -I.. -CWARNFLAGS+= ${NO_WCONSTANT_CONVERSION} .include + +CWARNFLAGS.ahc_pci.c= ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} Modified: head/sys/modules/aic7xxx/ahd/Makefile ============================================================================== --- head/sys/modules/aic7xxx/ahd/Makefile Thu Dec 22 16:01:10 2011 (r228804) +++ head/sys/modules/aic7xxx/ahd/Makefile Thu Dec 22 16:16:12 2011 (r228805) @@ -32,8 +32,10 @@ SRCS= ${GENSRCS} SRCS+= aic79xx.c aic79xx_osm.c aic79xx_pci.c ahd_pci.c SRCS+= opt_scsi.h opt_aic79xx.h opt_cam.h opt_ddb.h SRCS+= device_if.h bus_if.h pci_if.h -CWARNFLAGS+= ${NO_WCONSTANT_CONVERSION} CLEANFILES= ${GENSRCS} .include + +CWARNFLAGS.ahd_pci.c= ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 16:31:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5060B106566C; Thu, 22 Dec 2011 16:31:01 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id AA9AB8FC1C; Thu, 22 Dec 2011 16:31:00 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so11949884vbb.13 for ; Thu, 22 Dec 2011 08:31:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=G6P79DUFVAKSFhhhdBfh7Os2bEu48/Q/MEn/keRNlwg=; b=j4uNAdtQWZFsX5FCqnteSoBXdZpM++ggBjKxRODrxVfhUf65V1wPcpfGGKIPVZuEP8 BEMNtsI0Uq9QUR6y9nPc2yApipGTv3tgmU3qwfSFd3cbJFIgZ0kYdzwMRE1Vm6wZRdCy ziq8rGE/gkr6PXHOwVsEshvEd+3VsWYZtOscg= MIME-Version: 1.0 Received: by 10.52.94.75 with SMTP id da11mr6127776vdb.111.1324571460000; Thu, 22 Dec 2011 08:31:00 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.158.104 with HTTP; Thu, 22 Dec 2011 08:30:59 -0800 (PST) In-Reply-To: <201112221409.pBME980v020110@svn.freebsd.org> References: <201112221409.pBME980v020110@svn.freebsd.org> Date: Thu, 22 Dec 2011 08:30:59 -0800 X-Google-Sender-Auth: jvgDb4jXxa-Gobv2-vFjRaNL1h4 Message-ID: From: Adrian Chadd To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228800 - in head/sys/dev/ath/ath_hal: ar5212 ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 16:31:01 -0000 Just to be silly :) I reviewed this patchset early this morning and it's fi= ne. Nothing in the FreeBSD HAL uses the compression code, so unless someone out there has proprietary extensions which does, this patch is fine. I promise to get the AR5210 and AR5211 stuff tested tonight. The AR5210 at least works fine with -9 and -HEAD before the patch; the AR5211 is broken when trying to do WPA so I'll have to fix that first. Thanks, Adrian On 22 December 2011 06:09, Dimitry Andric wrote: > Author: dim > Date: Thu Dec 22 14:09:08 2011 > New Revision: 228800 > URL: http://svn.freebsd.org/changeset/base/228800 > > Log: > =A0Revert r228786. =A0We'll need to work around the warnings in another w= ay. > > =A0Requested by: adrian > =A0MFC after: =A0 =A01 week > > Modified: > =A0head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c > =A0head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c > > Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c =A0 =A0 =A0 Thu Dec 22 = 13:47:36 2011 =A0 =A0 =A0 =A0(r228799) > +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c =A0 =A0 =A0 Thu Dec 22 = 14:09:08 2011 =A0 =A0 =A0 =A0(r228800) > @@ -574,7 +574,7 @@ ar5212SetDecompMask(struct ath_hal *ah, > =A0 =A0 =A0 =A0struct ath_hal_5212 *ahp =3D AH5212(ah); > > =A0 =A0 =A0 =A0 if (keyidx >=3D HAL_DECOMP_MASK_SIZE) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return AH_FALSE; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return HAL_EINVAL; > =A0 =A0 =A0 =A0 OS_REG_WRITE(ah, AR_DCM_A, keyidx); > =A0 =A0 =A0 =A0 OS_REG_WRITE(ah, AR_DCM_D, en ? AR_DCM_D_EN : 0); > =A0 =A0 =A0 =A0 ahp->ah_decompMask[keyidx] =3D en; > > Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c =A0 =A0 =A0 Thu Dec 22 = 13:47:36 2011 =A0 =A0 =A0 =A0(r228799) > +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c =A0 =A0 =A0 Thu Dec 22 = 14:09:08 2011 =A0 =A0 =A0 =A0(r228800) > @@ -161,7 +161,7 @@ ar5416SetAntennaSwitch(struct ath_hal *a > =A0HAL_BOOL > =A0ar5416SetDecompMask(struct ath_hal *ah, uint16_t keyidx, int en) > =A0{ > - =A0 =A0 =A0 return AH_TRUE; > + =A0 =A0 =A0 return HAL_OK; > =A0} > > =A0/* Setup coverage class */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 16:40:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 304EB1065670; Thu, 22 Dec 2011 16:40:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04F518FC0C; Thu, 22 Dec 2011 16:40:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMGeZ3i025240; Thu, 22 Dec 2011 16:40:35 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMGeZod025237; Thu, 22 Dec 2011 16:40:35 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112221640.pBMGeZod025237@svn.freebsd.org> From: Alexander Motin Date: Thu, 22 Dec 2011 16:40:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228808 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 16:40:36 -0000 Author: mav Date: Thu Dec 22 16:40:35 2011 New Revision: 228808 URL: http://svn.freebsd.org/changeset/base/228808 Log: Make cd driver to handle Audio CDs, reporting their 2352 bytes sectors to GEOM and using READ CD command for reading data, same as acd driver does. Audio CDs identified by checking respective bit of the control field of the first track in TOC. This fixes bunch of error messages during boot (GEOM taste) with Audio CD inserted and allows to grab Audio CD image using just dd. MFC after: 1 month Modified: head/sys/cam/scsi/scsi_all.h head/sys/cam/scsi/scsi_cd.c Modified: head/sys/cam/scsi/scsi_all.h ============================================================================== --- head/sys/cam/scsi/scsi_all.h Thu Dec 22 16:36:08 2011 (r228807) +++ head/sys/cam/scsi/scsi_all.h Thu Dec 22 16:40:35 2011 (r228808) @@ -932,6 +932,7 @@ struct ata_pass_16 { #define WRITE_12 0xAA #define WRITE_VERIFY_12 0xAE #define READ_ELEMENT_STATUS 0xB8 +#define READ_CD 0xBE /* Maintenance In Service Action Codes */ #define REPORT_IDENTIFYING_INFRMATION 0x05 Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Thu Dec 22 16:36:08 2011 (r228807) +++ head/sys/cam/scsi/scsi_cd.c Thu Dec 22 16:40:35 2011 (r228808) @@ -1483,6 +1483,11 @@ cdstart(struct cam_periph *periph, union /* dxfer_len */ bp->bio_bcount, /* sense_len */ SSD_FULL_SIZE, /* timeout */ 30000); + /* Use READ CD command for audio tracks. */ + if (softc->params.blksize == 2352) { + start_ccb->csio.cdb_io.cdb_bytes[0] = READ_CD; + start_ccb->csio.cdb_io.cdb_bytes[9] = 0xf8; + } start_ccb->ccb_h.ccb_state = CD_CCB_BUFFER_IO; @@ -2880,6 +2885,13 @@ cdcheckmedia(struct cam_periph *periph) softc->flags |= CD_FLAG_VALID_TOC; + /* If the first track is audio, correct sector size. */ + if ((softc->toc.entries[0].control & 4) == 0) { + softc->disk->d_sectorsize = softc->params.blksize = 2352; + softc->disk->d_mediasize = + (off_t)softc->params.blksize * softc->params.disksize; + } + bailout: /* From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 18:08:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 9DF7B1065673; Thu, 22 Dec 2011 18:08:52 +0000 (UTC) Date: Thu, 22 Dec 2011 18:08:52 +0000 From: Alexander Best To: John Baldwin Message-ID: <20111222180852.GA6965@freebsd.org> References: <201112211716.pBLHGhDH078507@svn.freebsd.org> <201112211700.42772.jhb@freebsd.org> <20111221232754.GA51331@freebsd.org> <201112220802.27434.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201112220802.27434.jhb@freebsd.org> Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, Dimitry Andric , svn-src-all@freebsd.org Subject: Re: svn commit: r228785 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:08:52 -0000 On Thu Dec 22 11, John Baldwin wrote: > On Wednesday, December 21, 2011 6:27:54 pm Alexander Best wrote: > > On Wed Dec 21 11, John Baldwin wrote: > > > On Wednesday, December 21, 2011 4:52:04 pm Adrian Chadd wrote: > > > > Erm, why did you do this without first getting clearance from someone > > > > who has the hardware to test it? > > > > > > > > Just because it looks obviously wrong to you, doesn't at all mean that > > > > it's "wrong". It's quite possible that the driver _requires_ those > > > > bits to be written to the hardware as 0. > > > > > > > > > > > > I'd appreciate it if would please revert this and other ath/hal > > > > changes until I've had time to research them and test them out. > > > > > > I agree it should be reviewed, but if you are seriously depending on > > > the fact that the shifted values are beyond the edge of the word boundary > > > and so the result "wraps" to zero, then I'd question the sanity of your code. > > > > i disagree. > > You don't think changes should be reviewed (that's what I said above, I did > not necessarily say it should be reverted)? That's way out in left field if > that is what you really think. no of course not. let's handle it this way: keep the commits and adrian@ and everybody else can test dim@'s changes. if the commits broke anything, they should be reverted. the next time dim@ is about to touch non trivial code or code that is being maintained by a certain developer, he should post his patches to some mailinglist (-wireless@ in this case) and cc that particular developer (adrian@ in this case). no hard feelings. ;) cheers. alex > > As for reverting the changes, I think they are small enough that is probably > a bit overboard unless someone else reports an actual problem with them. > (Specifically, I don't think the bar is high enough in this case to warrant a > reversion.) However, I think that for future changes, Dimitry should get > these sort of changes reviewed before committing them. > > -- > John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 18:10:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCBF3106564A; Thu, 22 Dec 2011 18:10:15 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ABBD78FC27; Thu, 22 Dec 2011 18:10:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMIAFkX028055; Thu, 22 Dec 2011 18:10:15 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMIAFlo028054; Thu, 22 Dec 2011 18:10:15 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201112221810.pBMIAFlo028054@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 22 Dec 2011 18:10:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228809 - vendor/openpam/dist/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:10:15 -0000 Author: des Date: Thu Dec 22 18:10:15 2011 New Revision: 228809 URL: http://svn.freebsd.org/changeset/base/228809 Log: Merge upstream r509: don't log an error in the common case (ENOENT). Modified: vendor/openpam/dist/lib/openpam_check_owner_perms.c Modified: vendor/openpam/dist/lib/openpam_check_owner_perms.c ============================================================================== --- vendor/openpam/dist/lib/openpam_check_owner_perms.c Thu Dec 22 16:40:35 2011 (r228808) +++ vendor/openpam/dist/lib/openpam_check_owner_perms.c Thu Dec 22 18:10:15 2011 (r228809) @@ -104,9 +104,11 @@ openpam_check_path_owner_perms(const cha len = strlen(pathbuf); while (len > 0) { if (stat(pathbuf, &sb) != 0) { - serrno = errno; - openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); - errno = serrno; + if (errno != ENOENT) { + serrno = errno; + openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); + errno = serrno; + } return (-1); } if ((sb.st_uid != root && sb.st_uid != arbitrator) || From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 18:12:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6B3C1065673; Thu, 22 Dec 2011 18:12:51 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C5F0A8FC14; Thu, 22 Dec 2011 18:12:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMICpEl028195; Thu, 22 Dec 2011 18:12:51 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMICpkr028193; Thu, 22 Dec 2011 18:12:51 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201112221812.pBMICpkr028193@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 22 Dec 2011 18:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228810 - head/contrib/openpam/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:12:51 -0000 Author: des Date: Thu Dec 22 18:12:51 2011 New Revision: 228810 URL: http://svn.freebsd.org/changeset/base/228810 Log: Merge upstream r509: don't log an error in the common case (ENOENT). Modified: head/contrib/openpam/lib/openpam_check_owner_perms.c Directory Properties: head/contrib/openpam/ (props changed) Modified: head/contrib/openpam/lib/openpam_check_owner_perms.c ============================================================================== --- head/contrib/openpam/lib/openpam_check_owner_perms.c Thu Dec 22 18:10:15 2011 (r228809) +++ head/contrib/openpam/lib/openpam_check_owner_perms.c Thu Dec 22 18:12:51 2011 (r228810) @@ -104,9 +104,11 @@ openpam_check_path_owner_perms(const cha len = strlen(pathbuf); while (len > 0) { if (stat(pathbuf, &sb) != 0) { - serrno = errno; - openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); - errno = serrno; + if (errno != ENOENT) { + serrno = errno; + openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); + errno = serrno; + } return (-1); } if ((sb.st_uid != root && sb.st_uid != arbitrator) || From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 18:22:21 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 453FD106566C; Thu, 22 Dec 2011 18:22:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id B74638FC1D; Thu, 22 Dec 2011 18:22:20 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pBMIMJUH092830; Thu, 22 Dec 2011 22:22:19 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pBMIMJvd092829; Thu, 22 Dec 2011 22:22:19 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 22 Dec 2011 22:22:19 +0400 From: Gleb Smirnoff To: Dag-Erling Smorgrav Message-ID: <20111222182219.GS80057@FreeBSD.org> References: <201112221810.pBMIAFlo028054@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201112221810.pBMIAFlo028054@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-vendor@FreeBSD.org Subject: Re: svn commit: r228809 - vendor/openpam/dist/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:22:21 -0000 Dag-Erling, On Thu, Dec 22, 2011 at 06:10:15PM +0000, Dag-Erling Smorgrav wrote: D> Author: des D> Date: Thu Dec 22 18:10:15 2011 D> New Revision: 228809 D> URL: http://svn.freebsd.org/changeset/base/228809 D> D> Log: D> Merge upstream r509: don't log an error in the common case (ENOENT). D> D> Modified: D> vendor/openpam/dist/lib/openpam_check_owner_perms.c D> D> Modified: vendor/openpam/dist/lib/openpam_check_owner_perms.c D> ============================================================================== D> --- vendor/openpam/dist/lib/openpam_check_owner_perms.c Thu Dec 22 16:40:35 2011 (r228808) D> +++ vendor/openpam/dist/lib/openpam_check_owner_perms.c Thu Dec 22 18:10:15 2011 (r228809) D> @@ -104,9 +104,11 @@ openpam_check_path_owner_perms(const cha D> len = strlen(pathbuf); D> while (len > 0) { D> if (stat(pathbuf, &sb) != 0) { D> - serrno = errno; D> - openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); D> - errno = serrno; D> + if (errno != ENOENT) { D> + serrno = errno; D> + openpam_log(PAM_LOG_ERROR, "%s: %m", pathbuf); D> + errno = serrno; D> + } D> return (-1); D> } D> if ((sb.st_uid != root && sb.st_uid != arbitrator) || I haven't yet tested this, but code looks like it is not going to print anything in a case I don't have /usr/local/bin/pam_foo.so, while purpose of the patch is to avoid logging of failure to open /usr/local/bin/pam_foo.so.5. Although openpam_dynamic() will do some logging of errno value, the name of the failed file won't be logged. If I got a lot of modules configured, then I can't figure out which one is ENOENT. IMHO, some no_log flag should be passed down from the try_dlopen() to fix the issue correctly. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 18:24:42 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2A221065675; Thu, 22 Dec 2011 18:24:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 85E068FC19; Thu, 22 Dec 2011 18:24:41 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id UAA20092; Thu, 22 Dec 2011 20:24:39 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RdnJn-00009J-Di; Thu, 22 Dec 2011 20:24:39 +0200 Message-ID: <4EF375E5.2010809@FreeBSD.org> Date: Thu, 22 Dec 2011 20:24:37 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111206 Thunderbird/8.0 MIME-Version: 1.0 To: Alexander Motin References: <201112221640.pBMGeZod025237@svn.freebsd.org> In-Reply-To: <201112221640.pBMGeZod025237@svn.freebsd.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228808 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:24:42 -0000 on 22/12/2011 18:40 Alexander Motin said the following: > Author: mav > Date: Thu Dec 22 16:40:35 2011 > New Revision: 228808 > URL: http://svn.freebsd.org/changeset/base/228808 > > Log: > Make cd driver to handle Audio CDs, reporting their 2352 bytes sectors to > GEOM and using READ CD command for reading data, same as acd driver does. > Audio CDs identified by checking respective bit of the control field of > the first track in TOC. > > This fixes bunch of error messages during boot (GEOM taste) with Audio CD > inserted and allows to grab Audio CD image using just dd. Thank you! What about CDs with mixed audio and data tracks? I don't ask for any support, just curious if our users could run into any troubles with those. > MFC after: 1 month > > Modified: > head/sys/cam/scsi/scsi_all.h > head/sys/cam/scsi/scsi_cd.c > > Modified: head/sys/cam/scsi/scsi_all.h > ============================================================================== > --- head/sys/cam/scsi/scsi_all.h Thu Dec 22 16:36:08 2011 (r228807) > +++ head/sys/cam/scsi/scsi_all.h Thu Dec 22 16:40:35 2011 (r228808) > @@ -932,6 +932,7 @@ struct ata_pass_16 { > #define WRITE_12 0xAA > #define WRITE_VERIFY_12 0xAE > #define READ_ELEMENT_STATUS 0xB8 > +#define READ_CD 0xBE > > /* Maintenance In Service Action Codes */ > #define REPORT_IDENTIFYING_INFRMATION 0x05 > > Modified: head/sys/cam/scsi/scsi_cd.c > ============================================================================== > --- head/sys/cam/scsi/scsi_cd.c Thu Dec 22 16:36:08 2011 (r228807) > +++ head/sys/cam/scsi/scsi_cd.c Thu Dec 22 16:40:35 2011 (r228808) > @@ -1483,6 +1483,11 @@ cdstart(struct cam_periph *periph, union > /* dxfer_len */ bp->bio_bcount, > /* sense_len */ SSD_FULL_SIZE, > /* timeout */ 30000); > + /* Use READ CD command for audio tracks. */ > + if (softc->params.blksize == 2352) { > + start_ccb->csio.cdb_io.cdb_bytes[0] = READ_CD; > + start_ccb->csio.cdb_io.cdb_bytes[9] = 0xf8; > + } > start_ccb->ccb_h.ccb_state = CD_CCB_BUFFER_IO; > > > @@ -2880,6 +2885,13 @@ cdcheckmedia(struct cam_periph *periph) > > softc->flags |= CD_FLAG_VALID_TOC; > > + /* If the first track is audio, correct sector size. */ > + if ((softc->toc.entries[0].control & 4) == 0) { > + softc->disk->d_sectorsize = softc->params.blksize = 2352; > + softc->disk->d_mediasize = > + (off_t)softc->params.blksize * softc->params.disksize; > + } > + > bailout: > > /* -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 18:27:09 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDDCA106566B; Thu, 22 Dec 2011 18:27:09 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id F3DB98FC08; Thu, 22 Dec 2011 18:27:08 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 984696DE1; Thu, 22 Dec 2011 18:27:05 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 57C8F81BB; Thu, 22 Dec 2011 19:27:05 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Gleb Smirnoff References: <201112221810.pBMIAFlo028054@svn.freebsd.org> <20111222182219.GS80057@FreeBSD.org> Date: Thu, 22 Dec 2011 19:27:05 +0100 In-Reply-To: <20111222182219.GS80057@FreeBSD.org> (Gleb Smirnoff's message of "Thu, 22 Dec 2011 22:22:19 +0400") Message-ID: <86bor0sbra.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-vendor@FreeBSD.org Subject: Re: svn commit: r228809 - vendor/openpam/dist/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:27:10 -0000 Gleb Smirnoff writes: > I haven't yet tested this, but code looks like it is not going to print > anything in a case I don't have /usr/local/bin/pam_foo.so, while purpose > of the patch is to avoid logging of failure to open > /usr/local/bin/pam_foo.so.5. > > Although openpam_dynamic() will do some logging of errno value, the name > of the failed file won't be logged. If I got a lot of modules configured, > then I can't figure out which one is ENOENT. > > IMHO, some no_log flag should be passed down from the try_dlopen() to fix > the issue correctly. Index: openpam_dynamic.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- openpam_dynamic.c (revision 509) +++ openpam_dynamic.c (working copy) @@ -124,7 +124,7 @@ dlclose(dlh); FREE(module); err: - openpam_log(PAM_LOG_ERROR, "%m"); + openpam_log(PAM_LOG_ERROR, "%s: %m", path); return (NULL); } =20 DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 18:31:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DECAA106564A; Thu, 22 Dec 2011 18:31:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD9228FC18; Thu, 22 Dec 2011 18:31:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMIVlZZ028816; Thu, 22 Dec 2011 18:31:47 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMIVlIZ028813; Thu, 22 Dec 2011 18:31:47 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112221831.pBMIVlIZ028813@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 22 Dec 2011 18:31:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228811 - in head/sys: contrib/pf/net modules/pfsync X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:31:48 -0000 Author: glebius Date: Thu Dec 22 18:31:47 2011 New Revision: 228811 URL: http://svn.freebsd.org/changeset/base/228811 Log: In FreeBSD we always have bpf(4) API, either real or stub. No need in detecting presense of 'device bpf'. Modified: head/sys/contrib/pf/net/if_pfsync.c head/sys/modules/pfsync/Makefile Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 18:12:51 2011 (r228810) +++ head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 18:31:47 2011 (r228811) @@ -45,17 +45,12 @@ #ifdef __FreeBSD__ #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_bpf.h" #include "opt_pf.h" #include __FBSDID("$FreeBSD$"); -#ifdef DEV_BPF -#define NBPFILTER DEV_BPF -#else -#define NBPFILTER 0 -#endif +#define NBPFILTER 1 #ifdef DEV_PFSYNC #define NPFSYNC DEV_PFSYNC Modified: head/sys/modules/pfsync/Makefile ============================================================================== --- head/sys/modules/pfsync/Makefile Thu Dec 22 18:12:51 2011 (r228810) +++ head/sys/modules/pfsync/Makefile Thu Dec 22 18:31:47 2011 (r228811) @@ -6,7 +6,7 @@ KMOD= pfsync SRCS= if_pfsync.c \ - opt_pf.h opt_inet.h opt_inet6.h opt_bpf.h + opt_pf.h opt_inet.h opt_inet6.h CFLAGS+= -I${.CURDIR}/../../contrib/pf SRCS+= bus_if.h device_if.h @@ -24,9 +24,6 @@ opt_inet6.h: echo "#define INET6 1" > ${.TARGET} .endif -opt_bpf.h: - echo "#define DEV_BPF 1" > ${.TARGET} - .if defined(VIMAGE) opt_global.h: echo "#define VIMAGE 1" >> ${.TARGET} From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 18:33:37 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20EB0106566B; Thu, 22 Dec 2011 18:33:37 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 711EE8FC19; Thu, 22 Dec 2011 18:33:34 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 87E546DEF; Thu, 22 Dec 2011 18:33:30 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 68A5281D2; Thu, 22 Dec 2011 19:33:30 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Gleb Smirnoff References: <201112221810.pBMIAFlo028054@svn.freebsd.org> <20111222182219.GS80057@FreeBSD.org> <86bor0sbra.fsf@ds4.des.no> Date: Thu, 22 Dec 2011 19:33:30 +0100 In-Reply-To: <86bor0sbra.fsf@ds4.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8rg?= =?utf-8?Q?rav=22's?= message of "Thu, 22 Dec 2011 19:27:05 +0100") Message-ID: <867h1osbgl.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-vendor@FreeBSD.org Subject: Re: svn commit: r228809 - vendor/openpam/dist/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:33:37 -0000 Actually, there is no good general solution, because the rtld does not set errno. Here's what I came up with: Index: openpam_dynamic.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- openpam_dynamic.c (revision 509) +++ openpam_dynamic.c (working copy) @@ -63,10 +63,15 @@ static void * try_dlopen(const char *modfn) { + void *dlh; =20 if (openpam_check_path_owner_perms(modfn) !=3D 0) return (NULL); - return (dlopen(modfn, RTLD_NOW)); + if ((dlh =3D dlopen(modfn, RTLD_NOW)) =3D=3D NULL) { + openpam_log(PAM_LOG_DEBUG, "%s: %s", modfn, dlerror()); + errno =3D 0; + } + return (dlh); } =20=20=20=20=20 /* @@ -124,7 +129,8 @@ dlclose(dlh); FREE(module); err: - openpam_log(PAM_LOG_ERROR, "%m"); + if (errno !=3D 0) + openpam_log(PAM_LOG_ERROR, "%s: %m", path); return (NULL); } =20 I'll wait for your feedback before I commit it. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 18:40:07 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16945106564A; Thu, 22 Dec 2011 18:40:07 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 7C1798FC12; Thu, 22 Dec 2011 18:40:06 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pBMIcj69092963; Thu, 22 Dec 2011 22:38:45 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pBMIcjxX092962; Thu, 22 Dec 2011 22:38:45 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 22 Dec 2011 22:38:45 +0400 From: Gleb Smirnoff To: Dag-Erling Sm??rgrav Message-ID: <20111222183845.GT80057@FreeBSD.org> References: <201112221810.pBMIAFlo028054@svn.freebsd.org> <20111222182219.GS80057@FreeBSD.org> <86bor0sbra.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <86bor0sbra.fsf@ds4.des.no> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-vendor@FreeBSD.org Subject: Re: svn commit: r228809 - vendor/openpam/dist/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:40:07 -0000 On Thu, Dec 22, 2011 at 07:27:05PM +0100, Dag-Erling Sm??rgrav wrote: D> Gleb Smirnoff writes: D> > I haven't yet tested this, but code looks like it is not going to print D> > anything in a case I don't have /usr/local/bin/pam_foo.so, while purpose D> > of the patch is to avoid logging of failure to open D> > /usr/local/bin/pam_foo.so.5. D> > D> > Although openpam_dynamic() will do some logging of errno value, the name D> > of the failed file won't be logged. If I got a lot of modules configured, D> > then I can't figure out which one is ENOENT. D> > D> > IMHO, some no_log flag should be passed down from the try_dlopen() to fix D> > the issue correctly. D> D> Index: openpam_dynamic.c D> =================================================================== D> --- openpam_dynamic.c (revision 509) D> +++ openpam_dynamic.c (working copy) D> @@ -124,7 +124,7 @@ D> dlclose(dlh); D> FREE(module); D> err: D> - openpam_log(PAM_LOG_ERROR, "%m"); D> + openpam_log(PAM_LOG_ERROR, "%s: %m", path); D> return (NULL); D> } If you don't mind, I'd prefer printing vpath here. Looks like in some cases the path may be not absolute, and informing user of open failure is more useful when an exact path where open failed is logged. This would require shifting FREE(vpath) down the function, I hope this isn't a problem. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 18:44:16 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E7DB106564A; Thu, 22 Dec 2011 18:44:16 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id A488A8FC16; Thu, 22 Dec 2011 18:44:15 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pBMIgwMI092987; Thu, 22 Dec 2011 22:42:58 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pBMIgwQG092986; Thu, 22 Dec 2011 22:42:58 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 22 Dec 2011 22:42:58 +0400 From: Gleb Smirnoff To: Dag-Erling Sm??rgrav Message-ID: <20111222184258.GU80057@FreeBSD.org> References: <201112221810.pBMIAFlo028054@svn.freebsd.org> <20111222182219.GS80057@FreeBSD.org> <86bor0sbra.fsf@ds4.des.no> <867h1osbgl.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <867h1osbgl.fsf@ds4.des.no> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-vendor@FreeBSD.org Subject: Re: svn commit: r228809 - vendor/openpam/dist/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:44:16 -0000 On Thu, Dec 22, 2011 at 07:33:30PM +0100, Dag-Erling Sm??rgrav wrote: D> Actually, there is no good general solution, because the rtld does not D> set errno. Here's what I came up with: D> D> Index: openpam_dynamic.c D> =================================================================== D> --- openpam_dynamic.c (revision 509) D> +++ openpam_dynamic.c (working copy) D> @@ -63,10 +63,15 @@ D> static void * D> try_dlopen(const char *modfn) D> { D> + void *dlh; D> D> if (openpam_check_path_owner_perms(modfn) != 0) D> return (NULL); D> - return (dlopen(modfn, RTLD_NOW)); D> + if ((dlh = dlopen(modfn, RTLD_NOW)) == NULL) { D> + openpam_log(PAM_LOG_DEBUG, "%s: %s", modfn, dlerror()); D> + errno = 0; D> + } D> + return (dlh); D> } Why not PAM_LOG_ERROR? D> /* D> @@ -124,7 +129,8 @@ D> dlclose(dlh); D> FREE(module); D> err: D> - openpam_log(PAM_LOG_ERROR, "%m"); D> + if (errno != 0) D> + openpam_log(PAM_LOG_ERROR, "%s: %m", path); D> return (NULL); D> } I think vpath is better choice here, as explained in previous mail D> I'll wait for your feedback before I commit it. Thanks! -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 18:48:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4671106566C; Thu, 22 Dec 2011 18:48:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3B2C8FC0A; Thu, 22 Dec 2011 18:48:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMImLow029348; Thu, 22 Dec 2011 18:48:21 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMImLi0029346; Thu, 22 Dec 2011 18:48:21 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112221848.pBMImLi0029346@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 22 Dec 2011 18:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228812 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:48:22 -0000 Author: glebius Date: Thu Dec 22 18:48:21 2011 New Revision: 228812 URL: http://svn.freebsd.org/changeset/base/228812 Log: Use a better log message for master down event. Modified: head/sys/netinet/ip_carp.c Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Thu Dec 22 18:31:47 2011 (r228811) +++ head/sys/netinet/ip_carp.c Thu Dec 22 18:48:21 2011 (r228812) @@ -1082,7 +1082,7 @@ carp_master_down(void *v) CARP_LOCK_ASSERT(sc); if (sc->sc_state == BACKUP) { - CARP_LOG("VHID %u@%s: BACKUP -> MASTER (preempting)\n", + CARP_LOG("VHID %u@%s: BACKUP -> MASTER (master down)\n", sc->sc_vhid, sc->sc_carpdev->if_xname); carp_master_down_locked(sc); From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 18:51:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71B69106566B; Thu, 22 Dec 2011 18:51:36 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60EE08FC0C; Thu, 22 Dec 2011 18:51:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMIpaXg029487; Thu, 22 Dec 2011 18:51:36 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMIpaY5029485; Thu, 22 Dec 2011 18:51:36 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112221851.pBMIpaY5029485@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 22 Dec 2011 18:51:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228813 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:51:36 -0000 Author: glebius Date: Thu Dec 22 18:51:35 2011 New Revision: 228813 URL: http://svn.freebsd.org/changeset/base/228813 Log: We really mean MTU of the real interface here, not of our pseudo. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 18:48:21 2011 (r228812) +++ head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 18:51:35 2011 (r228813) @@ -2655,7 +2655,7 @@ pfsync_request_update(u_int32_t creatori nlen += sizeof(struct pfsync_subheader); #ifdef __FreeBSD__ - if (sc->sc_len + nlen > sc->sc_ifp->if_mtu) { + if (sc->sc_len + nlen > sc->sc_sync_if->if_mtu) { #else if (sc->sc_len + nlen > sc->sc_if.if_mtu) { #endif From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 18:56:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 450FE106574A; Thu, 22 Dec 2011 18:56:28 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19FB38FC12; Thu, 22 Dec 2011 18:56:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMIuRCh029687; Thu, 22 Dec 2011 18:56:27 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMIuRqP029685; Thu, 22 Dec 2011 18:56:27 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112221856.pBMIuRqP029685@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 22 Dec 2011 18:56:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228814 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:56:28 -0000 Author: glebius Date: Thu Dec 22 18:56:27 2011 New Revision: 228814 URL: http://svn.freebsd.org/changeset/base/228814 Log: Merge couple more fixes from OpenBSD to bulk processing: revision 1.118 date: 2009/03/23 06:19:59; author: dlg; state: Exp; lines: +8 -6 wait an appropriate amount of time before giving up on a bulk update, rather than giving up after a hardcoded 5 seconds (which is generally much too short an interval for a bulk update). pointed out by david@, eyeballed by mcbride@ revision 1.171 date: 2011/10/31 22:02:52; author: mikeb; state: Exp; lines: +2 -1 Don't forget to cancel bulk update failure timeout when destroying an interface. Problem report and fix from Erik Lax, thanks! Start a brief note of revisions merged from OpenBSD. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 18:51:35 2011 (r228813) +++ head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 18:56:27 2011 (r228814) @@ -42,6 +42,11 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +/* + * Revisions picked from OpenBSD after revision 1.110 import: + * 1.118, 1.124, 1.148, 1.149, 1.151, 1.171 - fixes to bulk updates + */ + #ifdef __FreeBSD__ #include "opt_inet.h" #include "opt_inet6.h" @@ -536,6 +541,7 @@ pfsync_clone_destroy(struct ifnet *ifp) EVENTHANDLER_DEREGISTER(ifnet_departure_event, sc->sc_detachtag); PF_LOCK(); #endif + timeout_del(&sc->sc_bulkfail_tmo); timeout_del(&sc->sc_bulk_tmo); timeout_del(&sc->sc_tmo); #ifdef __FreeBSD__ @@ -1604,14 +1610,16 @@ pfsync_in_bus(struct pfsync_pkt *pkt, st switch (bus->status) { case PFSYNC_BUS_START: #ifdef __FreeBSD__ - callout_reset(&sc->sc_bulkfail_tmo, 5 * hz, pfsync_bulk_fail, - V_pfsyncif); + callout_reset(&sc->sc_bulkfail_tmo, 4 * hz + + pf_pool_limits[PF_LIMIT_STATES].limit / + ((sc->sc_sync_if->if_mtu - PFSYNC_MINPKT) / + sizeof(struct pfsync_state)), + pfsync_bulk_fail, V_pfsyncif); #else - timeout_add_sec(&sc->sc_bulkfail_tmo, 5); /* XXX magic */ -#endif -#ifdef XXX + timeout_add(&sc->sc_bulkfail_tmo, 4 * hz + pf_pool_limits[PF_LIMIT_STATES].limit / - (PFSYNC_BULKPACKETS * sc->sc_maxcount)); + ((sc->sc_if.if_mtu - PFSYNC_MINPKT) / + sizeof(struct pfsync_state))); #endif #ifdef __FreeBSD__ if (V_pf_status.debug >= PF_DEBUG_MISC) From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 19:05:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A4351065673; Thu, 22 Dec 2011 19:05:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F3738FC17; Thu, 22 Dec 2011 19:05:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMJ5xQU030093; Thu, 22 Dec 2011 19:05:59 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMJ5x39030091; Thu, 22 Dec 2011 19:05:59 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112221905.pBMJ5x39030091@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 22 Dec 2011 19:05:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228815 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 19:05:59 -0000 Author: glebius Date: Thu Dec 22 19:05:58 2011 New Revision: 228815 URL: http://svn.freebsd.org/changeset/base/228815 Log: Merge from OpenBSD: revision 1.120 date: 2009/04/04 13:09:29; author: dlg; state: Exp; lines: +5 -5 use time_uptime instead of time_second internally. time_uptime isnt affected by adjusting the clock. revision 1.175 date: 2011/11/25 12:52:10; author: dlg; state: Exp; lines: +3 -3 use time_uptime to set state creation values as time_second can be skewed at runtime by things like date(1) and ntpd. time_uptime is monotonic and therefore more useful to compare against. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 18:56:27 2011 (r228814) +++ head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 19:05:58 2011 (r228815) @@ -45,6 +45,7 @@ /* * Revisions picked from OpenBSD after revision 1.110 import: * 1.118, 1.124, 1.148, 1.149, 1.151, 1.171 - fixes to bulk updates + * 1.120, 1.175 - use monotonic time_uptime */ #ifdef __FreeBSD__ @@ -664,7 +665,7 @@ pfsync_state_export(struct pfsync_state /* copy from state */ strlcpy(sp->ifname, st->kif->pfik_name, sizeof(sp->ifname)); bcopy(&st->rt_addr, &sp->rt_addr, sizeof(sp->rt_addr)); - sp->creation = htonl(time_second - st->creation); + sp->creation = htonl(time_uptime - st->creation); sp->expire = pf_state_expires(st); if (sp->expire <= time_second) sp->expire = htonl(0); @@ -815,7 +816,7 @@ pfsync_state_import(struct pfsync_state /* copy to state */ bcopy(&sp->rt_addr, &st->rt_addr, sizeof(st->rt_addr)); - st->creation = time_second - ntohl(sp->creation); + st->creation = time_uptime - ntohl(sp->creation); st->expire = time_second; if (sp->expire) { /* XXX No adaptive scaling. */ @@ -838,7 +839,7 @@ pfsync_state_import(struct pfsync_state st->anchor.ptr = NULL; st->rt_kif = NULL; - st->pfsync_time = time_second; + st->pfsync_time = time_uptime; st->sync_state = PFSYNC_S_NONE; /* XXX when we have nat_rule/anchors, use STATE_INC_COUNTERS */ @@ -1330,7 +1331,7 @@ pfsync_in_upd(struct pfsync_pkt *pkt, st pf_state_peer_ntoh(&sp->dst, &st->dst); st->expire = ntohl(sp->expire) + time_second; st->timeout = sp->timeout; - st->pfsync_time = time_second; + st->pfsync_time = time_uptime; } #ifdef __FreeBSD__ PF_UNLOCK(); @@ -1440,7 +1441,7 @@ pfsync_in_upd_c(struct pfsync_pkt *pkt, pf_state_peer_ntoh(&up->dst, &st->dst); st->expire = ntohl(up->expire) + time_second; st->timeout = up->timeout; - st->pfsync_time = time_second; + st->pfsync_time = time_uptime; } #ifdef __FreeBSD__ PF_UNLOCK(); @@ -2621,7 +2622,7 @@ pfsync_update_state(struct pf_state *st) st->sync_state); } - if (sync || (time_second - st->pfsync_time) < 2) { + if (sync || (time_uptime - st->pfsync_time) < 2) { pfsync_upds++; #ifdef __FreeBSD__ pfsync_sendout(); From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 19:09:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9733106566B; Thu, 22 Dec 2011 19:09:55 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8B748FC1B; Thu, 22 Dec 2011 19:09:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMJ9tsj030235; Thu, 22 Dec 2011 19:09:55 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMJ9tSa030233; Thu, 22 Dec 2011 19:09:55 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112221909.pBMJ9tSa030233@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 22 Dec 2011 19:09:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228816 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 19:09:55 -0000 Author: glebius Date: Thu Dec 22 19:09:55 2011 New Revision: 228816 URL: http://svn.freebsd.org/changeset/base/228816 Log: Merge from OpenBSD: revision 1.122 date: 2009/05/13 01:01:34; author: dlg; state: Exp; lines: +6 -4 only keep track of the number of updates on tcp connections. state sync on all the other protocols is simply pushing the timeouts along which has a resolution of 1 second, so it isnt going to be hurt by pfsync taking up to a second to send it over. keep track of updates on tcp still though, their windows need constant attention. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 19:05:58 2011 (r228815) +++ head/sys/contrib/pf/net/if_pfsync.c Thu Dec 22 19:09:55 2011 (r228816) @@ -46,6 +46,7 @@ * Revisions picked from OpenBSD after revision 1.110 import: * 1.118, 1.124, 1.148, 1.149, 1.151, 1.171 - fixes to bulk updates * 1.120, 1.175 - use monotonic time_uptime + * 1.122 - reduce number of updates for non-TCP sessions */ #ifdef __FreeBSD__ @@ -2605,9 +2606,11 @@ pfsync_update_state(struct pf_state *st) case PFSYNC_S_INS: /* we're already handling it */ - st->sync_updates++; - if (st->sync_updates >= sc->sc_maxupdates) - sync = 1; + if (st->key[PF_SK_WIRE]->proto == IPPROTO_TCP) { + st->sync_updates++; + if (st->sync_updates >= sc->sc_maxupdates) + sync = 1; + } break; case PFSYNC_S_IACK: From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 19:19:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC8E01065670; Thu, 22 Dec 2011 19:19:43 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 20CA28FC17; Thu, 22 Dec 2011 19:19:42 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so12071209vcb.13 for ; Thu, 22 Dec 2011 11:19:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=+18d4ECnwF34E/5SwacvUHXvI1F+Tply1+hh7M1x0vk=; b=ElInfm3oJx+HqeQGym3l+nUaB+9GOPtItNf8pzxA0buGa7kq+qU+eD13FAefmrcRDj DqWofITdgtrMZBfTsGM1Op77PTuAvc6sYMOE/z5skW4pq5mJPvK3qtmaWmtA5qzRp6aT MqXZr5uizhcVDZRP3qfJXmigLtcd+VtsUER0c= MIME-Version: 1.0 Received: by 10.52.24.11 with SMTP id q11mr6424152vdf.83.1324581582395; Thu, 22 Dec 2011 11:19:42 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.36.5 with HTTP; Thu, 22 Dec 2011 11:19:42 -0800 (PST) In-Reply-To: <20111222180852.GA6965@freebsd.org> References: <201112211716.pBLHGhDH078507@svn.freebsd.org> <201112211700.42772.jhb@freebsd.org> <20111221232754.GA51331@freebsd.org> <201112220802.27434.jhb@freebsd.org> <20111222180852.GA6965@freebsd.org> Date: Thu, 22 Dec 2011 11:19:42 -0800 X-Google-Sender-Auth: DutceoOatymlI55UJoGOqRuea7E Message-ID: From: Adrian Chadd To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric , John Baldwin Subject: Re: svn commit: r228785 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 19:19:43 -0000 On 22 December 2011 10:08, Alexander Best wrote: >> You don't think changes should be reviewed (that's what I said above, I = did >> not necessarily say it should be reverted)? =A0That's way out in left fi= eld if >> that is what you really think. > > no of course not. let's handle it this way: > > keep the commits and adrian@ and everybody else can test dim@'s > changes. if the commits broke anything, they should be reverted. Well, he's already reverted them. I've reviewed the HAL_TRUE -> HAL_OK change, that's fine. Nothing uses that particular bit of code in the HAL at the moment (and if someone wants to support the payload compression code for the AR5212 era devices, please let me know :) I'll test out the shift register changes tonight and see if I can dig up the AR5210/AR5211 datasheets internally. Once I've verified it's right, I'll commit the change. > the next time dim@ is about to touch non trivial code or code that is bei= ng > maintained by a certain developer, he should post his patches to some > mailinglist (-wireless@ in this case) and cc that particular developer > (adrian@ in this case). Yup. You guys already did that in November, so thankyou for that. I just hadn't until recently found equipment to test it out. > no hard feelings. ;) Oh there's no hard feelings. None whatsoever. :-) There, resolved! Time for a cool, refreshing glass of orange juice. Adrian From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 19:34:39 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 946A2106564A; Thu, 22 Dec 2011 19:34:39 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 1937A8FC12; Thu, 22 Dec 2011 19:34:38 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 85E406E27; Thu, 22 Dec 2011 19:34:32 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 30A2081DE; Thu, 22 Dec 2011 20:34:30 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Gleb Smirnoff References: <201112221810.pBMIAFlo028054@svn.freebsd.org> <20111222182219.GS80057@FreeBSD.org> <86bor0sbra.fsf@ds4.des.no> <867h1osbgl.fsf@ds4.des.no> <20111222184258.GU80057@FreeBSD.org> Date: Thu, 22 Dec 2011 20:34:29 +0100 In-Reply-To: <20111222184258.GU80057@FreeBSD.org> (Gleb Smirnoff's message of "Thu, 22 Dec 2011 22:42:58 +0400") Message-ID: <8639ccs8my.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-vendor@FreeBSD.org Subject: Re: svn commit: r228809 - vendor/openpam/dist/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 19:34:39 -0000 Gleb Smirnoff writes: > "Dag-Erling Sm=C3=B8rgrav" writes: > > @@ -63,10 +63,15 @@ > > static void * > > try_dlopen(const char *modfn) > > { > > + void *dlh; > >=20=20 > > if (openpam_check_path_owner_perms(modfn) !=3D 0) > > return (NULL); > > - return (dlopen(modfn, RTLD_NOW)); > > + if ((dlh =3D dlopen(modfn, RTLD_NOW)) =3D=3D NULL) { > > + openpam_log(PAM_LOG_DEBUG, "%s: %s", modfn, dlerror()); > > + errno =3D 0; > > + } > > + return (dlh); > > } > > Why not PAM_LOG_ERROR? copy-paste mistake > > /* > > @@ -124,7 +129,8 @@ > > dlclose(dlh); > > FREE(module); > > err: > > - openpam_log(PAM_LOG_ERROR, "%m"); > > + if (errno !=3D 0) > > + openpam_log(PAM_LOG_ERROR, "%s: %m", path); > > return (NULL); > > } > > I think vpath is better choice here, as explained in previous mail At this point, vpath is either NULL or garbage. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 19:47:19 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CBD5106564A; Thu, 22 Dec 2011 19:47:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 9D50C8FC16; Thu, 22 Dec 2011 19:47:17 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id VAA21106; Thu, 22 Dec 2011 21:47:15 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Rdobj-0000Cy-It; Thu, 22 Dec 2011 21:47:15 +0200 Message-ID: <4EF3890B.6020408@FreeBSD.org> Date: Thu, 22 Dec 2011 21:46:19 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111206 Thunderbird/8.0 MIME-Version: 1.0 To: Alexander Motin References: <201112221640.pBMGeZod025237@svn.freebsd.org> <4EF375E5.2010809@FreeBSD.org> <4EF387F4.9050008@FreeBSD.org> In-Reply-To: <4EF387F4.9050008@FreeBSD.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228808 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 19:47:19 -0000 on 22/12/2011 21:41 Alexander Motin said the following: > On 22.12.2011 20:24, Andriy Gapon wrote: >> on 22/12/2011 18:40 Alexander Motin said the following: >>> Author: mav >>> Date: Thu Dec 22 16:40:35 2011 >>> New Revision: 228808 >>> URL: http://svn.freebsd.org/changeset/base/228808 >>> >>> Log: >>> Make cd driver to handle Audio CDs, reporting their 2352 bytes sectors to >>> GEOM and using READ CD command for reading data, same as acd driver does. >>> Audio CDs identified by checking respective bit of the control field of >>> the first track in TOC. >>> >>> This fixes bunch of error messages during boot (GEOM taste) with Audio CD >>> inserted and allows to grab Audio CD image using just dd. >> >> Thank you! >> What about CDs with mixed audio and data tracks? >> I don't ask for any support, just curious if our users could run into any >> troubles with those. > > If data track is the first (I don't know whether it is mandatory, but wiki tells > it is usual), the whole disk will be handled as data by the driver and work as > before (only data part will be readable). If it can be not the first, then I am > not sure how acd driver works with it, but we can just make check a bit more > strict, switching to data if found it anywhere on disk. Any way I don't think we > will see many Mixed Mode CDs in the future, while Audio CDs are still on market. > > If you worry about audio extraction of Mixed Mode CDs, then quick look on > mplayer and it's underlying cdparanoia and libcdio shows that they are > extracting audio data talking directly to the drive using SCSI commands, so cd > driver is irrelevant for them. So this change is mostly about staying consistent > when possible with a small blood. Yes, I agree. As I've said I wasn't asking for any new capabilities, just wanted to make that no new edge cases are introduced. BTW, acd(4) ... not sure which tense I should use here ... used to create individual devices for each track - e.g. acd0t1, acd0t2 - where each track could have its own properties. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 19:52:12 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F8F4106566C; Thu, 22 Dec 2011 19:52:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 8E96B8FC12; Thu, 22 Dec 2011 19:52:11 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pBMJoraA093532; Thu, 22 Dec 2011 23:50:53 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pBMJorKB093531; Thu, 22 Dec 2011 23:50:53 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 22 Dec 2011 23:50:53 +0400 From: Gleb Smirnoff To: Dag-Erling Sm??rgrav Message-ID: <20111222195053.GA80057@FreeBSD.org> References: <201112221810.pBMIAFlo028054@svn.freebsd.org> <20111222182219.GS80057@FreeBSD.org> <86bor0sbra.fsf@ds4.des.no> <867h1osbgl.fsf@ds4.des.no> <20111222184258.GU80057@FreeBSD.org> <8639ccs8my.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="5L6AZ1aJH5mDrqCQ" Content-Disposition: inline In-Reply-To: <8639ccs8my.fsf@ds4.des.no> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-vendor@FreeBSD.org Subject: Re: svn commit: r228809 - vendor/openpam/dist/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 19:52:12 -0000 --5L6AZ1aJH5mDrqCQ Content-Type: text/plain; charset=koi8-r Content-Disposition: inline On Thu, Dec 22, 2011 at 08:34:29PM +0100, Dag-Erling Sm??rgrav wrote: D> > > /* D> > > @@ -124,7 +129,8 @@ D> > > dlclose(dlh); D> > > FREE(module); D> > > err: D> > > - openpam_log(PAM_LOG_ERROR, "%m"); D> > > + if (errno != 0) D> > > + openpam_log(PAM_LOG_ERROR, "%s: %m", path); D> > > return (NULL); D> > > } D> > D> > I think vpath is better choice here, as explained in previous mail D> D> At this point, vpath is either NULL or garbage. Here is my variant attached. It is silent on success, printing these on failure: Dec 22 23:49:39 projcarp1 sshd[3208]: in openpam_dynamic(): /usr/local/lib/pam_ldap.so: No such file or directory Dec 22 23:49:39 projcarp1 sshd[3208]: in openpam_load_module(): no /usr/local/lib/pam_ldap.so found -- Totus tuus, Glebius. --5L6AZ1aJH5mDrqCQ Content-Type: text/x-diff; charset=koi8-r Content-Disposition: attachment; filename="openpam_dynamic.c.diff" Index: openpam_dynamic.c =================================================================== --- openpam_dynamic.c (revision 228816) +++ openpam_dynamic.c (working copy) @@ -63,12 +63,17 @@ static void * try_dlopen(const char *modfn) { + void *dlh; if (openpam_check_path_owner_perms(modfn) != 0) return (NULL); - return (dlopen(modfn, RTLD_NOW)); + if ((dlh = dlopen(modfn, RTLD_NOW)) == NULL) { + openpam_log(PAM_LOG_ERROR, "%s: %s", modfn, dlerror()); + errno = 0; + } + return (dlh); } - + /* * OpenPAM internal * @@ -83,7 +88,7 @@ const char *prefix; char *vpath; void *dlh; - int i, serrno; + int i; dlh = NULL; @@ -100,9 +105,6 @@ *strrchr(vpath, '.') = '\0'; dlh = try_dlopen(vpath); } - serrno = errno; - FREE(vpath); - errno = serrno; if (dlh == NULL) goto err; if ((module = calloc(1, sizeof *module)) == NULL) @@ -118,13 +120,16 @@ openpam_log(PAM_LOG_DEBUG, "%s: %s(): %s", path, pam_sm_func_name[i], dlerror()); } + FREE(vpath); return (module); buf_err: if (dlh != NULL) dlclose(dlh); FREE(module); err: - openpam_log(PAM_LOG_ERROR, "%m"); + if (errno != 0) + openpam_log(PAM_LOG_ERROR, "%s: %m", path); + FREE(vpath); return (NULL); } --5L6AZ1aJH5mDrqCQ-- From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 19:58:59 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFC5A106566B; Thu, 22 Dec 2011 19:58:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 6DC9C8FC12; Thu, 22 Dec 2011 19:58:59 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pBMJvfxS093598; Thu, 22 Dec 2011 23:57:41 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pBMJvf7S093597; Thu, 22 Dec 2011 23:57:41 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 22 Dec 2011 23:57:41 +0400 From: Gleb Smirnoff To: Dag-Erling Sm??rgrav Message-ID: <20111222195741.GB80057@FreeBSD.org> References: <201112221810.pBMIAFlo028054@svn.freebsd.org> <20111222182219.GS80057@FreeBSD.org> <86bor0sbra.fsf@ds4.des.no> <867h1osbgl.fsf@ds4.des.no> <20111222184258.GU80057@FreeBSD.org> <8639ccs8my.fsf@ds4.des.no> <20111222195053.GA80057@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="7J16OGEJ/mt06A90" Content-Disposition: inline In-Reply-To: <20111222195053.GA80057@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-vendor@FreeBSD.org Subject: Re: svn commit: r228809 - vendor/openpam/dist/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 19:59:00 -0000 --7J16OGEJ/mt06A90 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline On Thu, Dec 22, 2011 at 11:50:53PM +0400, Gleb Smirnoff wrote: T> Here is my variant attached. Sorry, this one is correct. -- Totus tuus, Glebius. --7J16OGEJ/mt06A90 Content-Type: text/x-diff; charset=koi8-r Content-Disposition: attachment; filename="openpam_dynamic.c.diff" Index: openpam_dynamic.c =================================================================== --- openpam_dynamic.c (revision 228816) +++ openpam_dynamic.c (working copy) @@ -63,12 +63,17 @@ static void * try_dlopen(const char *modfn) { + void *dlh; if (openpam_check_path_owner_perms(modfn) != 0) return (NULL); - return (dlopen(modfn, RTLD_NOW)); + if ((dlh = dlopen(modfn, RTLD_NOW)) == NULL) { + openpam_log(PAM_LOG_ERROR, "%s: %s", modfn, dlerror()); + errno = 0; + } + return (dlh); } - + /* * OpenPAM internal * @@ -83,7 +88,7 @@ const char *prefix; char *vpath; void *dlh; - int i, serrno; + int i; dlh = NULL; @@ -100,9 +105,6 @@ *strrchr(vpath, '.') = '\0'; dlh = try_dlopen(vpath); } - serrno = errno; - FREE(vpath); - errno = serrno; if (dlh == NULL) goto err; if ((module = calloc(1, sizeof *module)) == NULL) @@ -118,13 +120,16 @@ openpam_log(PAM_LOG_DEBUG, "%s: %s(): %s", path, pam_sm_func_name[i], dlerror()); } + FREE(vpath); return (module); buf_err: if (dlh != NULL) dlclose(dlh); FREE(module); err: - openpam_log(PAM_LOG_ERROR, "%m"); + if (errno != 0) + openpam_log(PAM_LOG_ERROR, "%s: %m", vpath); + FREE(vpath); return (NULL); } --7J16OGEJ/mt06A90-- From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 20:05:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C34C2106564A; Thu, 22 Dec 2011 20:05:54 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id CC5CB8FC12; Thu, 22 Dec 2011 20:05:53 +0000 (UTC) Received: by eaaf13 with SMTP id f13so11144383eaa.13 for ; Thu, 22 Dec 2011 12:05:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=PjA5dNfBguOArfbyySlW+EJiKdNjGptWAZdAwQRLi9g=; b=TLRvaVg86oRbHuuCKEyicI66A1KR20Zo+qzRgnV8A+tvpc4aBSHfIdamGcxK0AC7vd OjOjfW0U2GCltCD0Q5pEYqz0/5xzcSImys/diCFKwik94TpCDOCCkAhhmv2I0yLGVE0a i/1r/cwaqgWbTBN+jcRgdFiPEvZQXi4RYZgmg= Received: by 10.205.127.12 with SMTP id gy12mr3695767bkc.108.1324584352768; Thu, 22 Dec 2011 12:05:52 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id a17sm20332655bkz.7.2011.12.22.12.05.51 (version=SSLv3 cipher=OTHER); Thu, 22 Dec 2011 12:05:52 -0800 (PST) Sender: Alexander Motin Message-ID: <4EF38D96.3040601@FreeBSD.org> Date: Thu, 22 Dec 2011 22:05:42 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111112 Thunderbird/8.0 MIME-Version: 1.0 To: Andriy Gapon References: <201112221640.pBMGeZod025237@svn.freebsd.org> <4EF375E5.2010809@FreeBSD.org> <4EF387F4.9050008@FreeBSD.org> <4EF3890B.6020408@FreeBSD.org> In-Reply-To: <4EF3890B.6020408@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228808 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 20:05:54 -0000 On 22.12.2011 21:46, Andriy Gapon wrote: > BTW, acd(4) ... not sure which tense I should use here ... used to create > individual devices for each track - e.g. acd0t1, acd0t2 - where each track could > have its own properties. Yes, I know. But that's a bigger blood, and I am not sure we need it. I am not sure that this approach is correct for data tracks, as up to my present understanding, later data tracks may address data on previous ones, so they can not reside on different devices. For audio tracks it could be more useful, but do you know applications using this? -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 20:12:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29D85106566B; Thu, 22 Dec 2011 20:12:35 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 659948FC08; Thu, 22 Dec 2011 20:12:34 +0000 (UTC) Received: by eekc50 with SMTP id c50so10406156eek.13 for ; Thu, 22 Dec 2011 12:12:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=hACawBSk3yU+GUs6Dew5vq2OOVzooNcSFp6aYiHXtFc=; b=FCPtrl5m8binZxbLX44Sz6/9YOZ41eS9TH83uGWNiaM1M1iqt2M025eGaAwFiKVUZ0 FzNF6MUKOiZsO0q+tdL/ZaHW7TOFimqaLG+N4vEXsItHlJfCMd3qzjLlYxC5Qo+R6+mf maiwMS2QeQK94gdl+RnpoFbyZVUsTvPUp9wVY= Received: by 10.213.4.138 with SMTP id 10mr5515063ebr.19.1324582910969; Thu, 22 Dec 2011 11:41:50 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id 76sm38112234eeh.0.2011.12.22.11.41.48 (version=SSLv3 cipher=OTHER); Thu, 22 Dec 2011 11:41:50 -0800 (PST) Sender: Alexander Motin Message-ID: <4EF387F4.9050008@FreeBSD.org> Date: Thu, 22 Dec 2011 21:41:40 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111112 Thunderbird/8.0 MIME-Version: 1.0 To: Andriy Gapon References: <201112221640.pBMGeZod025237@svn.freebsd.org> <4EF375E5.2010809@FreeBSD.org> In-Reply-To: <4EF375E5.2010809@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228808 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 20:12:35 -0000 On 22.12.2011 20:24, Andriy Gapon wrote: > on 22/12/2011 18:40 Alexander Motin said the following: >> Author: mav >> Date: Thu Dec 22 16:40:35 2011 >> New Revision: 228808 >> URL: http://svn.freebsd.org/changeset/base/228808 >> >> Log: >> Make cd driver to handle Audio CDs, reporting their 2352 bytes sectors to >> GEOM and using READ CD command for reading data, same as acd driver does. >> Audio CDs identified by checking respective bit of the control field of >> the first track in TOC. >> >> This fixes bunch of error messages during boot (GEOM taste) with Audio CD >> inserted and allows to grab Audio CD image using just dd. > > Thank you! > What about CDs with mixed audio and data tracks? > I don't ask for any support, just curious if our users could run into any > troubles with those. If data track is the first (I don't know whether it is mandatory, but wiki tells it is usual), the whole disk will be handled as data by the driver and work as before (only data part will be readable). If it can be not the first, then I am not sure how acd driver works with it, but we can just make check a bit more strict, switching to data if found it anywhere on disk. Any way I don't think we will see many Mixed Mode CDs in the future, while Audio CDs are still on market. If you worry about audio extraction of Mixed Mode CDs, then quick look on mplayer and it's underlying cdparanoia and libcdio shows that they are extracting audio data talking directly to the drive using SCSI commands, so cd driver is irrelevant for them. So this change is mostly about staying consistent when possible with a small blood. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 20:27:40 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A803106566B; Thu, 22 Dec 2011 20:27:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 5449B8FC12; Thu, 22 Dec 2011 20:27:39 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id WAA21745; Thu, 22 Dec 2011 22:27:38 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RdpEn-0000Et-Fz; Thu, 22 Dec 2011 22:27:37 +0200 Message-ID: <4EF39280.9030907@FreeBSD.org> Date: Thu, 22 Dec 2011 22:26:40 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111206 Thunderbird/8.0 MIME-Version: 1.0 To: Alexander Motin References: <201112221640.pBMGeZod025237@svn.freebsd.org> <4EF375E5.2010809@FreeBSD.org> <4EF387F4.9050008@FreeBSD.org> <4EF3890B.6020408@FreeBSD.org> <4EF38D96.3040601@FreeBSD.org> In-Reply-To: <4EF38D96.3040601@FreeBSD.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228808 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 20:27:40 -0000 on 22/12/2011 22:05 Alexander Motin said the following: > On 22.12.2011 21:46, Andriy Gapon wrote: >> BTW, acd(4) ... not sure which tense I should use here ... used to create >> individual devices for each track - e.g. acd0t1, acd0t2 - where each track could >> have its own properties. > > Yes, I know. But that's a bigger blood, and I am not sure we need it. I am not > sure that this approach is correct for data tracks, as up to my present > understanding, later data tracks may address data on previous ones, so they can > not reside on different devices. For audio tracks it could be more useful, but > do you know applications using this? I have never researched this. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 21:54:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4CBD106564A; Thu, 22 Dec 2011 21:54:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B37A08FC13; Thu, 22 Dec 2011 21:54:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMLsrxa035374; Thu, 22 Dec 2011 21:54:53 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMLsrx7035371; Thu, 22 Dec 2011 21:54:53 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112222154.pBMLsrx7035371@svn.freebsd.org> From: Adrian Chadd Date: Thu, 22 Dec 2011 21:54:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228817 - in head/sys/dev/ath/ath_hal: ar5212 ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 21:54:53 -0000 Author: adrian Date: Thu Dec 22 21:54:53 2011 New Revision: 228817 URL: http://svn.freebsd.org/changeset/base/228817 Log: Use the correct types when calling the decompression mask function. There's currently no public code which uses this feature and the current reference driver doesn't enable this feature at all. It's possible it was used by a previous version of the driver and that indeed it should return HAL_STATUS; but at this point I'm happy to require that they complain and submit a patch. This was found by LLVM compile-time type checking. Submitted by: dim Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Thu Dec 22 19:09:55 2011 (r228816) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Thu Dec 22 21:54:53 2011 (r228817) @@ -574,7 +574,7 @@ ar5212SetDecompMask(struct ath_hal *ah, struct ath_hal_5212 *ahp = AH5212(ah); if (keyidx >= HAL_DECOMP_MASK_SIZE) - return HAL_EINVAL; + return AH_FALSE; OS_REG_WRITE(ah, AR_DCM_A, keyidx); OS_REG_WRITE(ah, AR_DCM_D, en ? AR_DCM_D_EN : 0); ahp->ah_decompMask[keyidx] = en; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Dec 22 19:09:55 2011 (r228816) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Dec 22 21:54:53 2011 (r228817) @@ -161,7 +161,7 @@ ar5416SetAntennaSwitch(struct ath_hal *a HAL_BOOL ar5416SetDecompMask(struct ath_hal *ah, uint16_t keyidx, int en) { - return HAL_OK; + return AH_TRUE; } /* Setup coverage class */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 23:40:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEE40106564A; Thu, 22 Dec 2011 23:40:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E3E38FC16; Thu, 22 Dec 2011 23:40:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMNeqbL038614; Thu, 22 Dec 2011 23:40:52 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMNeq0e038612; Thu, 22 Dec 2011 23:40:52 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112222340.pBMNeq0e038612@svn.freebsd.org> From: Dimitry Andric Date: Thu, 22 Dec 2011 23:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228818 - head/sys/modules/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 23:40:52 -0000 Author: dim Date: Thu Dec 22 23:40:52 2011 New Revision: 228818 URL: http://svn.freebsd.org/changeset/base/228818 Log: Disable various warnings for the ath module in a more fine-grained way: only add the option for the specific .c files that need them, like via sys/conf/files. MFC after: 1 week Modified: head/sys/modules/ath/Makefile Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Thu Dec 22 21:54:53 2011 (r228817) +++ head/sys/modules/ath/Makefile Thu Dec 22 23:40:52 2011 (r228818) @@ -139,9 +139,11 @@ SRCS+= amrr.c SRCS+= dfs_null.c CFLAGS+= -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal -CWARNFLAGS+= ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW} opt_ah.h: echo '#define AH_SUPPORT_AR5416 1' > $@ .include + +CWARNFLAGS.ah_regdomain.c= ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Thu Dec 22 23:50:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69A521065687; Thu, 22 Dec 2011 23:50:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E77F8FC08; Thu, 22 Dec 2011 23:50:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMNoW5r038944; Thu, 22 Dec 2011 23:50:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMNoW7B038942; Thu, 22 Dec 2011 23:50:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112222350.pBMNoW7B038942@svn.freebsd.org> From: Alexander Motin Date: Thu, 22 Dec 2011 23:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228819 - head/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 23:50:32 -0000 Author: mav Date: Thu Dec 22 23:50:31 2011 New Revision: 228819 URL: http://svn.freebsd.org/changeset/base/228819 Log: Update list of 4K physical sector hard drives. Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Thu Dec 22 23:40:52 2011 (r228818) +++ head/sys/cam/ata/ata_da.c Thu Dec 22 23:50:31 2011 (r228819) @@ -165,6 +165,11 @@ static struct ada_quirk_entry ada_quirk_ }, { /* Samsung Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "SAMSUNG HD155UI*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* Samsung Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "*", "SAMSUNG HD204UI*", "*" }, /*quirks*/ADA_Q_4K }, @@ -174,6 +179,16 @@ static struct ada_quirk_entry ada_quirk_ /*quirks*/ADA_Q_4K }, { + /* Seagate Barracuda Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST???DM*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* Seagate Barracuda Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST????DM*", "*" }, + /*quirks*/ADA_Q_4K + }, + { /* Seagate Momentus Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST9500423AS*", "*" }, /*quirks*/ADA_Q_4K @@ -185,6 +200,16 @@ static struct ada_quirk_entry ada_quirk_ }, { /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST9640423AS*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST9640424AS*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST9750420AS*", "*" }, /*quirks*/ADA_Q_4K }, @@ -194,6 +219,11 @@ static struct ada_quirk_entry ada_quirk_ /*quirks*/ADA_Q_4K }, { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST9750423AS*", "*" }, + /*quirks*/ADA_Q_4K + }, + { /* Seagate Momentus Thin Advanced Format (4k) drives */ { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST???LT*", "*" }, /*quirks*/ADA_Q_4K From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 00:10:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 743BC106566B; Fri, 23 Dec 2011 00:10:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6247F8FC0C; Fri, 23 Dec 2011 00:10:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN0AHkr039644; Fri, 23 Dec 2011 00:10:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN0AHxv039642; Fri, 23 Dec 2011 00:10:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112230010.pBN0AHxv039642@svn.freebsd.org> From: Alexander Motin Date: Fri, 23 Dec 2011 00:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228820 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 00:10:17 -0000 Author: mav Date: Fri Dec 23 00:10:17 2011 New Revision: 228820 URL: http://svn.freebsd.org/changeset/base/228820 Log: Merge to da driver quirks hinting 4K physical sector sizes for SATA disks connected via SAS or USB. Unluckily I've found that SAS (mps) and USB-SATA I have translate models in different ways, requiring twice more quirks. Unluckily for Hitachi, their model names are trimmed on SAS, making impossible to identify 4K sector drives that way. Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Dec 22 23:50:31 2011 (r228819) +++ head/sys/cam/scsi/scsi_da.c Fri Dec 23 00:10:17 2011 (r228820) @@ -89,7 +89,8 @@ typedef enum { DA_Q_NONE = 0x00, DA_Q_NO_SYNC_CACHE = 0x01, DA_Q_NO_6_BYTE = 0x02, - DA_Q_NO_PREVENT = 0x04 + DA_Q_NO_PREVENT = 0x04, + DA_Q_4K = 0x08 } da_quirks; typedef enum { @@ -112,6 +113,8 @@ struct disk_params { u_int8_t secs_per_track; u_int32_t secsize; /* Number of bytes/sector */ u_int64_t sectors; /* total number sectors */ + u_int stripesize; + u_int stripeoffset; }; struct da_softc { @@ -564,7 +567,223 @@ static struct da_quirk_entry da_quirk_ta */ {T_DIRECT, SIP_MEDIA_REMOVABLE, "Sony", "Sony DSC", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE | DA_Q_NO_PREVENT - } + }, + /* ATA/SATA devices over SAS/USB/... */ + { + /* Hitachi Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "Hitachi", "H??????????E3*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Samsung Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "SAMSUNG HD155UI*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Samsung Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "SAMSUNG", "HD155UI*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Samsung Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "SAMSUNG HD204UI*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Samsung Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "SAMSUNG", "HD204UI*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Barracuda Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST????DL*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Barracuda Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ST????DL", "*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Barracuda Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST???DM*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Barracuda Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ST???DM*", "*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Barracuda Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST????DM*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Barracuda Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ST????DM", "*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST9500423AS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ST950042", "3AS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST9500424AS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ST950042", "4AS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST9640423AS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ST964042", "3AS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST9640424AS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ST964042", "4AS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST9750420AS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ST975042", "0AS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST9750422AS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ST975042", "2AS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST9750423AS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ST975042", "3AS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Thin Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST???LT*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* Seagate Momentus Thin Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ST???LT*", "*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Caviar Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD????RS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Caviar Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "??RS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Caviar Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD????RX*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Caviar Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "??RX*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Caviar Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD??????RS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Caviar Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "????RS*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Caviar Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD??????RX*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Caviar Green Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "????RX*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Scorpio Black Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD???PKT*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Scorpio Black Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "?PKT*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Scorpio Black Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD?????PKT*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Scorpio Black Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "???PKT*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Scorpio Blue Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD???PVT*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Scorpio Blue Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "?PVT*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Scorpio Blue Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "WDC WD?????PVT*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* WDC Scorpio Blue Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "WDC WD??", "???PVT*", "*" }, + /*quirks*/DA_Q_4K + }, }; static disk_strategy_t dastrategy; @@ -585,7 +804,7 @@ static int daerror(union ccb *ccb, u_i static void daprevent(struct cam_periph *periph, int action); static int dagetcapacity(struct cam_periph *periph); static void dasetgeom(struct cam_periph *periph, uint32_t block_len, - uint64_t maxsector); + uint64_t maxsector, u_int lbppbe, u_int lalba); static timeout_t dasendorderedtag; static void dashutdown(void *arg, int howto); @@ -687,6 +906,8 @@ daopen(struct disk *dp) softc->disk->d_sectorsize = softc->params.secsize; softc->disk->d_mediasize = softc->params.secsize * (off_t)softc->params.sectors; + softc->disk->d_stripesize = softc->params.stripesize; + softc->disk->d_stripeoffset = softc->params.stripeoffset; /* XXX: these are not actually "firmware" values, so they may be wrong */ softc->disk->d_fwsectors = softc->params.secs_per_track; softc->disk->d_fwheads = softc->params.heads; @@ -1741,7 +1962,7 @@ dadone(struct cam_periph *periph, union announce_buf[0] = '\0'; cam_periph_invalidate(periph); } else { - dasetgeom(periph, block_size, maxsector); + dasetgeom(periph, block_size, maxsector, 0, 0); dp = &softc->params; snprintf(announce_buf, sizeof(announce_buf), "%juMB (%ju %u byte sectors: %dH %dS/T " @@ -2066,7 +2287,7 @@ done: (uintmax_t) block_len); error = EINVAL; } else - dasetgeom(periph, block_len, maxsector); + dasetgeom(periph, block_len, maxsector, 0, 0); } xpt_release_ccb(ccb); @@ -2077,7 +2298,8 @@ done: } static void -dasetgeom(struct cam_periph *periph, uint32_t block_len, uint64_t maxsector) +dasetgeom(struct cam_periph *periph, uint32_t block_len, uint64_t maxsector, + u_int lbppbe, u_int lalba) { struct ccb_calc_geometry ccg; struct da_softc *softc; @@ -2088,6 +2310,16 @@ dasetgeom(struct cam_periph *periph, uin dp = &softc->params; dp->secsize = block_len; dp->sectors = maxsector + 1; + if (lbppbe > 0) { + dp->stripesize = block_len << lbppbe; + dp->stripeoffset = dp->stripesize - block_len * lalba; + } else if (softc->quirks & DA_Q_4K) { + dp->stripesize = 4096; + dp->stripeoffset = 0; + } else { + dp->stripesize = 0; + dp->stripeoffset = 0; + } /* * Have the controller provide us with a geometry * for this disk. The only time the geometry From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 00:23:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7024F106564A; Fri, 23 Dec 2011 00:23:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5F4C18FC15; Fri, 23 Dec 2011 00:23:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN0NbEi040163; Fri, 23 Dec 2011 00:23:37 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN0NbRJ040161; Fri, 23 Dec 2011 00:23:37 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112230023.pBN0NbRJ040161@svn.freebsd.org> From: Dimitry Andric Date: Fri, 23 Dec 2011 00:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228822 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 00:23:37 -0000 Author: dim Date: Fri Dec 23 00:23:37 2011 New Revision: 228822 URL: http://svn.freebsd.org/changeset/base/228822 Log: When building the kernel with clang, it produces several warnings which might be useful in some cases, but which are not severe enough to error out the whole kernel build. Display them anyway, so there is at least some incentive to fix them eventually. Start with -Wtautological-compare warnings. These usually occur when people check if unsigned quantities are negative, or similar cases. To clean these up would be painful, and might give problems if the base type which is compared against changes to signed later on. MFC after: 1 week Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Fri Dec 23 00:19:17 2011 (r228821) +++ head/sys/conf/kern.mk Fri Dec 23 00:23:37 2011 (r228822) @@ -19,6 +19,10 @@ NO_WCONSTANT_CONVERSION= -Wno-constant-c NO_WARRAY_BOUNDS= -Wno-array-bounds NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow +# Several other warnings which might be useful in some cases, but not severe +# enough to error out the whole kernel build. Display them anyway, so there is +# some incentive to fix them eventually. +CWARNFLAGS+= -Wno-error-tautological-compare .endif # From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 00:29:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1DF01065675; Fri, 23 Dec 2011 00:29:01 +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 AF0B18FC08; Fri, 23 Dec 2011 00:29:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN0T1tN040358; Fri, 23 Dec 2011 00:29:01 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN0T1lQ040354; Fri, 23 Dec 2011 00:29:01 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201112230029.pBN0T1lQ040354@svn.freebsd.org> From: Glen Barber Date: Fri, 23 Dec 2011 00:29:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228823 - in head/usr.bin: ar hexdump rctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 00:29:01 -0000 Author: gjb (doc committer) Date: Fri Dec 23 00:29:01 2011 New Revision: 228823 URL: http://svn.freebsd.org/changeset/base/228823 Log: Formatting fixes: hexdump/od.1: - Enclose tabbed content in quotes [1] ar/ar.1: - Enclose tabbed content in quotes [1] rctl/rctl.8: - Enclose tabbed content in quotes [1] - Start a sentence on a newline [2] Reported by: manlint [1], igor [2] MFC after: 1 week X-MFC-after: 9.0-RELEASE Modified: head/usr.bin/ar/ar.1 head/usr.bin/hexdump/od.1 head/usr.bin/rctl/rctl.8 Modified: head/usr.bin/ar/ar.1 ============================================================================== --- head/usr.bin/ar/ar.1 Fri Dec 23 00:23:37 2011 (r228822) +++ head/usr.bin/ar/ar.1 Fri Dec 23 00:29:01 2011 (r228823) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 17, 2010 +.Dd December 22, 2011 .Dt AR 1 .Os .Sh NAME @@ -414,7 +414,7 @@ character. The .Dq Li * and -.Dq Li "\;" +.Dq Li "\&;" characters start a comment. Comments extend till the end of the line. .Pp Modified: head/usr.bin/hexdump/od.1 ============================================================================== --- head/usr.bin/hexdump/od.1 Fri Dec 23 00:23:37 2011 (r228822) +++ head/usr.bin/hexdump/od.1 Fri Dec 23 00:29:01 2011 (r228823) @@ -28,7 +28,7 @@ .\" @(#)od.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd February 18, 2010 +.Dd December 22, 2011 .Dt OD 1 .Os .Sh NAME @@ -146,12 +146,12 @@ Named characters .Pq Tn ASCII . Control characters are displayed using the following names: .Bl -column "000 NUL" "001 SOH" "002 STX" "003 ETX" "004 EOT" "005 ENQ" -.It 000 NUL 001 SOH 002 STX 003 ETX 004 EOT 005 ENQ -.It 006 ACK 007 BEL 008 BS 009 HT 00A NL 00B VT -.It 00C FF 00D CR 00E SO 00F SI 010 DLE 011 DC1 -.It 012 DC2 013 DC3 014 DC4 015 NAK 016 SYN 017 ETB -.It 018 CAN 019 EM 01A SUB 01B ESC 01C FS 01D GS -.It 01E RS 01F US 020 SP 07F DEL +.It "000 NUL 001 SOH 002 STX 003 ETX 004 EOT 005 ENQ" +.It "006 ACK 007 BEL 008 BS 009 HT 00A NL 00B VT" +.It "00C FF 00D CR 00E SO 00F SI 010 DLE 011 DC1" +.It "012 DC2 013 DC3 014 DC4 015 NAK 016 SYN 017 ETB" +.It "018 CAN 019 EM 01A SUB 01B ESC 01C FS 01D GS" +.It "01E RS 01F US 020 SP 07F DEL" .El .It Cm c Characters in the default character set. Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Fri Dec 23 00:23:37 2011 (r228822) +++ head/usr.bin/rctl/rctl.8 Fri Dec 23 00:29:01 2011 (r228823) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2011 +.Dd December 22, 2011 .Dt RCTL 8 .Os .Sh NAME @@ -89,8 +89,8 @@ Syntax for a rule is subject:subject-id: Subject defines the kind of entity the rule applies to. It can be either process, user, login class, or jail. .Pp -Subject ID identifies the subject. It can be user name, -numerical user ID, login class name, or jail name. +Subject ID identifies the subject. +It can be user name, numerical user ID, login class name, or jail name. .Pp Resource identifies the resource the rule controls. .Pp @@ -122,35 +122,35 @@ A filter that matches all defined rules .Pp .Sh RESOURCES .Bl -column -offset 3n "pseudoterminals" -.It cputime CPU time, in seconds -.It datasize data size, in bytes -.It stacksize stack size, in bytes -.It coredumpsize core dump size, in bytes -.It memoryuse resident set size, in bytes -.It memorylocked locked memory, in bytes -.It maxproc number of processes -.It openfiles file descriptor table size -.It vmemoryuse address space limit, in bytes -.It pseudoterminals number of PTYs -.It swapuse swap usage, in bytes -.It nthr number of threads -.It msgqqueued number of queued SysV messages -.It msgqsize SysV message queue size, in bytes -.It nmsgq number of SysV message queues -.It nsem number of SysV semaphores -.It nsemop number of SysV semaphores modified in a single semop(2) call -.It nshm number of SysV shared memory segments -.It shmsize SysV shared memory size, in bytes -.It wallclock wallclock time, in seconds +.It "cputime CPU time, in seconds" +.It "datasize data size, in bytes" +.It "stacksize stack size, in bytes" +.It "coredumpsize core dump size, in bytes" +.It "memoryuse resident set size, in bytes" +.It "memorylocked locked memory, in bytes" +.It "maxproc number of processes" +.It "openfiles file descriptor table size" +.It "vmemoryuse address space limit, in bytes" +.It "pseudoterminals number of PTYs" +.It "swapuse swap usage, in bytes" +.It "nthr number of threads" +.It "msgqqueued number of queued SysV messages" +.It "msgqsize SysV message queue size, in bytes" +.It "nmsgq number of SysV message queues" +.It "nsem number of SysV semaphores" +.It "nsemop number of SysV semaphores modified in a single semop(2) call" +.It "nshm number of SysV shared memory segments" +.It "shmsize SysV shared memory size, in bytes" +.It "wallclock wallclock time, in seconds" .El .Pp .Sh ACTIONS .Bl -column -offset 3n "pseudoterminals" -.It deny deny the allocation; not supported for cpu and wallclock -.It log log a warning to the console -.It devctl send notification to +.It "deny deny the allocation; not supported for cpu and wallclock" +.It "log log a warning to the console" +.It "devctl send notification to" .Xr devd 8 -.It sig* e.g. sigterm; send a signal to the offending process +.It "sig* e.g. sigterm; send a signal to the offending process" .El .Pp See From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 00:31:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9EEE106564A; Fri, 23 Dec 2011 00:31:26 +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 992318FC19; Fri, 23 Dec 2011 00:31:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN0VQY0040477; Fri, 23 Dec 2011 00:31:26 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN0VQnL040475; Fri, 23 Dec 2011 00:31:26 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201112230031.pBN0VQnL040475@svn.freebsd.org> From: Glen Barber Date: Fri, 23 Dec 2011 00:31:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228824 - head/usr.bin/ar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 00:31:26 -0000 Author: gjb (doc committer) Date: Fri Dec 23 00:31:26 2011 New Revision: 228824 URL: http://svn.freebsd.org/changeset/base/228824 Log: Whitespace cleanup: ar/ar.1: - Remove trailing whitespace Reported by: igor MFC after: 1 week X-MFC-With: r228823 Modified: head/usr.bin/ar/ar.1 Modified: head/usr.bin/ar/ar.1 ============================================================================== --- head/usr.bin/ar/ar.1 Fri Dec 23 00:29:01 2011 (r228823) +++ head/usr.bin/ar/ar.1 Fri Dec 23 00:31:26 2011 (r228824) @@ -198,11 +198,11 @@ from the archive specified by argument The archive's symbol table, if present, is updated to reflect the new contents of the archive. .It Fl D -When used in combination with the +When used in combination with the .Fl r or .Fl q -option, insert 0's instead of the real mtime, uid and gid values +option, insert 0's instead of the real mtime, uid and gid values and 0644 instead of file mode from the members named by arguments .Ar . This ensures that checksums on the resulting archives are reproducible @@ -531,7 +531,7 @@ using MRI librarian commands, use the fo .Bd -literal -offset indent create ex.a * specify the output archive addmod ex1.o ex2.o * add modules -save * save pending changes +save * save pending changes end * exit the utility .Ed .Sh DIAGNOSTICS From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 00:33:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0BAA1065676 for ; Fri, 23 Dec 2011 00:33:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from glenbarber.us (onyx.glenbarber.us [199.48.134.227]) by mx1.freebsd.org (Postfix) with SMTP id 63D4A8FC1F for ; Fri, 23 Dec 2011 00:33:24 +0000 (UTC) Received: (qmail 90798 invoked by uid 0); 22 Dec 2011 19:33:23 -0500 Received: from unknown (HELO glenbarber.us) (75.146.225.65) by 0 with SMTP; 22 Dec 2011 19:33:23 -0500 Date: Thu, 22 Dec 2011 19:33:21 -0500 From: Glen Barber To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20111223003321.GB14581@glenbarber.us> References: <201112230029.pBN0T1lQ040354@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="+g7M9IMkV8truYOl" Content-Disposition: inline In-Reply-To: <201112230029.pBN0T1lQ040354@svn.freebsd.org> X-Operating-System: FreeBSD 9.0-PRERELEASE amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: Re: svn commit: r228823 - in head/usr.bin: ar hexdump rctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 00:33:24 -0000 --+g7M9IMkV8truYOl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 23, 2011 at 12:29:01AM +0000, Glen Barber wrote: > hexdump/od.1: > - Enclose tabbed content in quotes [1] [...] > Modified: head/usr.bin/ar/ar.1 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.bin/ar/ar.1 Fri Dec 23 00:23:37 2011 (r228822) > +++ head/usr.bin/ar/ar.1 Fri Dec 23 00:29:01 2011 (r228823) > @@ -23,7 +23,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd May 17, 2010 > +.Dd December 22, 2011 > .Dt AR 1 > .Os > .Sh NAME > @@ -414,7 +414,7 @@ character. > The > .Dq Li * > and > -.Dq Li "\;" > +.Dq Li "\&;" > characters start a comment. > Comments extend till the end of the line. > .Pp >=20 Bah, that should have read "fix an escape character sequence." Glen --+g7M9IMkV8truYOl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iQEcBAEBCAAGBQJO88xRAAoJEFJPDDeguUajnSIIAKoHZVVhMGTmOquBoUOwtbDH irbILYCrU3XzigPfcZCgSJP3qhzzNEurHCnaAAKjxeP4eAWG6uyHUR53e9aMUGK5 6EJymlmCZC1F+PHiOSOkzd0llMgwbbp0G9cqlVHb+SVho9LHJbL63fe2XQ0REbUN bzZGfl5j9dFZxJDomRnrX3Jr2z65AbAkSufM3Gz2hpyTehDOdJKpfVxxZcCFsUUZ XUg6ajc+kEygtnGlfLW132Q04EtHja1BysZKQIGMyreAftWcQcuDv86emdpdYlTM SQLcYFn1MXDeP2eg3O6sxpFworCpLi+0xW97KA6WEQjaik8oBCCOcmeT1UyOVGU= =z6XI -----END PGP SIGNATURE----- --+g7M9IMkV8truYOl-- From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 00:43:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id C16201065670; Fri, 23 Dec 2011 00:43:41 +0000 (UTC) Date: Fri, 23 Dec 2011 00:43:41 +0000 From: Alexander Best To: Dimitry Andric Message-ID: <20111223004341.GA59309@freebsd.org> References: <201112230023.pBN0NbRJ040161@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline In-Reply-To: <201112230023.pBN0NbRJ040161@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228822 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 00:43:41 -0000 --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri Dec 23 11, Dimitry Andric wrote: > Author: dim > Date: Fri Dec 23 00:23:37 2011 > New Revision: 228822 > URL: http://svn.freebsd.org/changeset/base/228822 > > Log: > When building the kernel with clang, it produces several warnings which > might be useful in some cases, but which are not severe enough to error > out the whole kernel build. Display them anyway, so there is at least > some incentive to fix them eventually. > > Start with -Wtautological-compare warnings. These usually occur when > people check if unsigned quantities are negative, or similar cases. To > clean these up would be painful, and might give problems if the base > type which is compared against changes to signed later on. ... or is signed on one arch, but unsigned on another. ;) any reason you add -Wno-error-tautological-compare to CWARNFLAGS seperately and not in the upper CWARNFLAGS?= definition? the way you implemented it here makes it impossible to specify custom CWARNFLAGS, where users might want to keep -Wtautological-compare as an error and not turn it into a warning. i already sent you the following patch, which takes a different approach towards the issue you're trying to solve. of course it's debatable, whether -Wno-error-tautological-compare should be mandatory, or not. -fno-strict-aliasing e.g. is a flag which also gets appended (only to COPTFLAGS) even when users set custom COPTFLAGS cheers. alex > > MFC after: 1 week > > Modified: > head/sys/conf/kern.mk > > Modified: head/sys/conf/kern.mk > ============================================================================== > --- head/sys/conf/kern.mk Fri Dec 23 00:19:17 2011 (r228821) > +++ head/sys/conf/kern.mk Fri Dec 23 00:23:37 2011 (r228822) > @@ -19,6 +19,10 @@ NO_WCONSTANT_CONVERSION= -Wno-constant-c > NO_WARRAY_BOUNDS= -Wno-array-bounds > NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative > NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow > +# Several other warnings which might be useful in some cases, but not severe > +# enough to error out the whole kernel build. Display them anyway, so there is > +# some incentive to fix them eventually. > +CWARNFLAGS+= -Wno-error-tautological-compare > .endif > > # --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="kern.conf.diff" Index: conf/kern.mk =================================================================== --- conf/kern.mk (revision 228556) +++ conf/kern.mk (working copy) @@ -1,12 +1,24 @@ # $FreeBSD$ # +# Clang implies -Wtautological-compare when -Wall was specified. Since this +# will produce errors for valid code, we need to disable -Wtautological-compare. +# GCC doesn't recognize this warning, nor does it have a similar warning flag. +# However specifying -Wextra implies -Wtautological-compare semantics. +# +.if ${CC:T:Mclang} == "clang" +NO_TAUTCOMP= -Wno-tautological-compare +.else +NO_TAUTCOMP= +.endif + +# # Warning flags for compiling the kernel and components of the kernel: # CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ -Wundef -Wno-pointer-sign -fformat-extensions \ - -Wmissing-include-dirs -fdiagnostics-show-option + -Wmissing-include-dirs -fdiagnostics-show-option ${NO_TAUTCOMP} # # The following flags are next up for working on: # -Wextra --vkogqOf2sHV7VnPd-- From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 00:46:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 28942106566C; Fri, 23 Dec 2011 00:46:23 +0000 (UTC) Date: Fri, 23 Dec 2011 00:46:23 +0000 From: Alexander Best To: Dimitry Andric Message-ID: <20111223004623.GA63192@freebsd.org> References: <201112230023.pBN0NbRJ040161@svn.freebsd.org> <20111223004341.GA59309@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111223004341.GA59309@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228822 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 00:46:23 -0000 On Fri Dec 23 11, Alexander Best wrote: > On Fri Dec 23 11, Dimitry Andric wrote: > > Author: dim > > Date: Fri Dec 23 00:23:37 2011 > > New Revision: 228822 > > URL: http://svn.freebsd.org/changeset/base/228822 > > > > Log: > > When building the kernel with clang, it produces several warnings which > > might be useful in some cases, but which are not severe enough to error > > out the whole kernel build. Display them anyway, so there is at least > > some incentive to fix them eventually. > > > > Start with -Wtautological-compare warnings. These usually occur when > > people check if unsigned quantities are negative, or similar cases. To > > clean these up would be painful, and might give problems if the base > > type which is compared against changes to signed later on. > > ... or is signed on one arch, but unsigned on another. ;) > > any reason you add -Wno-error-tautological-compare to CWARNFLAGS seperately > and not in the upper CWARNFLAGS?= definition? the way you implemented it here > makes it impossible to specify custom CWARNFLAGS, where users might want to > keep -Wtautological-compare as an error and not turn it into a warning. > > i already sent you the following patch, which takes a different approach > towards the issue you're trying to solve. > > of course it's debatable, whether -Wno-error-tautological-compare should be > mandatory, or not. -fno-strict-aliasing e.g. is a flag which also gets appended > (only to COPTFLAGS) even when users set custom COPTFLAGS > > cheers. > alex > > > > > MFC after: 1 week > > > > Modified: > > head/sys/conf/kern.mk > > > > Modified: head/sys/conf/kern.mk > > ============================================================================== > > --- head/sys/conf/kern.mk Fri Dec 23 00:19:17 2011 (r228821) > > +++ head/sys/conf/kern.mk Fri Dec 23 00:23:37 2011 (r228822) > > @@ -19,6 +19,10 @@ NO_WCONSTANT_CONVERSION= -Wno-constant-c > > NO_WARRAY_BOUNDS= -Wno-array-bounds > > NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative > > NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow > > +# Several other warnings which might be useful in some cases, but not severe > > +# enough to error out the whole kernel build. Display them anyway, so there is > > +# some incentive to fix them eventually. > > +CWARNFLAGS+= -Wno-error-tautological-compare > > .endif > > > > # > Index: conf/kern.mk > =================================================================== > --- conf/kern.mk (revision 228556) > +++ conf/kern.mk (working copy) > @@ -1,12 +1,24 @@ > # $FreeBSD$ > > # > +# Clang implies -Wtautological-compare when -Wall was specified. Since this > +# will produce errors for valid code, we need to disable -Wtautological-compare. > +# GCC doesn't recognize this warning, nor does it have a similar warning flag. > +# However specifying -Wextra implies -Wtautological-compare semantics. > +# > +.if ${CC:T:Mclang} == "clang" > +NO_TAUTCOMP= -Wno-tautological-compare s/-Wno-tautological-compare/-Wno-error-tautological-compare/ sorry. > +.else > +NO_TAUTCOMP= > +.endif > + > +# > # Warning flags for compiling the kernel and components of the kernel: > # > CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ > -Wundef -Wno-pointer-sign -fformat-extensions \ > - -Wmissing-include-dirs -fdiagnostics-show-option > + -Wmissing-include-dirs -fdiagnostics-show-option ${NO_TAUTCOMP} > # > # The following flags are next up for working on: > # -Wextra From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 01:39:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF748106564A; Fri, 23 Dec 2011 01:39:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9D428FC14; Fri, 23 Dec 2011 01:39:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN1dATw042479; Fri, 23 Dec 2011 01:39:10 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN1dAC2042477; Fri, 23 Dec 2011 01:39:10 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201112230139.pBN1dAC2042477@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 23 Dec 2011 01:39:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228825 - head/sys/dev/cxgb/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 01:39:10 -0000 Author: np Date: Fri Dec 23 01:39:10 2011 New Revision: 228825 URL: http://svn.freebsd.org/changeset/base/228825 Log: Fix return value of function. Submitted by: Dan McGregor Modified: head/sys/dev/cxgb/common/cxgb_aq100x.c Modified: head/sys/dev/cxgb/common/cxgb_aq100x.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_aq100x.c Fri Dec 23 00:31:26 2011 (r228824) +++ head/sys/dev/cxgb/common/cxgb_aq100x.c Fri Dec 23 01:39:10 2011 (r228825) @@ -232,7 +232,7 @@ aq100x_power_down(struct cphy *phy, int err = t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, BMCR_PDOWN, off ? BMCR_PDOWN : 0); if (err || off) - return (v); + return (err); msleep(300); do { From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 01:56:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD6C51065672; Fri, 23 Dec 2011 01:56:25 +0000 (UTC) (envelope-from ghelmer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 971FF8FC14; Fri, 23 Dec 2011 01:56:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN1uPWG043042; Fri, 23 Dec 2011 01:56:25 GMT (envelope-from ghelmer@svn.freebsd.org) Received: (from ghelmer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN1uPs5043040; Fri, 23 Dec 2011 01:56:25 GMT (envelope-from ghelmer@svn.freebsd.org) Message-Id: <201112230156.pBN1uPs5043040@svn.freebsd.org> From: Guy Helmer Date: Fri, 23 Dec 2011 01:56:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228826 - head/lib/libc/yp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 01:56:25 -0000 Author: ghelmer Date: Fri Dec 23 01:56:25 2011 New Revision: 228826 URL: http://svn.freebsd.org/changeset/base/228826 Log: Handle failures to malloc memory to hold key or val copies. PR: bin/83348 Modified: head/lib/libc/yp/xdryp.c Modified: head/lib/libc/yp/xdryp.c ============================================================================== --- head/lib/libc/yp/xdryp.c Fri Dec 23 01:39:10 2011 (r228825) +++ head/lib/libc/yp/xdryp.c Fri Dec 23 01:56:25 2011 (r228826) @@ -82,10 +82,21 @@ xdr_ypresp_all_seq(XDR *xdrs, u_long *ob switch (status) { case YP_TRUE: key = (char *)malloc(out.ypresp_all_u.val.key.keydat_len + 1); + if (key == NULL) { + xdr_free((xdrproc_t)xdr_ypresp_all, &out); + *objp = YP_YPERR; + return (FALSE); + } bcopy(out.ypresp_all_u.val.key.keydat_val, key, out.ypresp_all_u.val.key.keydat_len); key[out.ypresp_all_u.val.key.keydat_len] = '\0'; val = (char *)malloc(out.ypresp_all_u.val.val.valdat_len + 1); + if (val == NULL) { + free(key); + xdr_free((xdrproc_t)xdr_ypresp_all, &out); + *objp = YP_YPERR; + return (FALSE); + } bcopy(out.ypresp_all_u.val.val.valdat_val, val, out.ypresp_all_u.val.val.valdat_len); val[out.ypresp_all_u.val.val.valdat_len] = '\0'; From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 02:04:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63B8C106566B; Fri, 23 Dec 2011 02:04:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33CEA8FC12; Fri, 23 Dec 2011 02:04:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN24asm043342; Fri, 23 Dec 2011 02:04:36 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN24aEX043340; Fri, 23 Dec 2011 02:04:36 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201112230204.pBN24aEX043340@svn.freebsd.org> From: Rick Macklem Date: Fri, 23 Dec 2011 02:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228827 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 02:04:36 -0000 Author: rmacklem Date: Fri Dec 23 02:04:35 2011 New Revision: 228827 URL: http://svn.freebsd.org/changeset/base/228827 Log: During investigation of an NFSv4 client crash reported by glebius@, jhb@ spotted that nfscl_getstateid() might modify credentials when called from nfsrpc_read() for the case where p != NULL, whereas nfsrpc_read() only did a crdup() to get new credentials for p == NULL. This bug was introduced by r195510, since pre-r195510 nfscl_getstateid() only modified credentials for the p == NULL case. This patch modifies nfsrpc_read()/nfsrpc_write() so that they do crdup() for the p != NULL case. It is conceivable that this bug caused the crash reported by glebius@, but that will not be determined for some time, since the crash occurred after about 1month of operation. Tested by: glebius Reviewed by: jhb MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Fri Dec 23 01:56:25 2011 (r228826) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Fri Dec 23 02:04:35 2011 (r228827) @@ -1232,8 +1232,7 @@ nfsrpc_read(vnode_t vp, struct uio *uiop newcred = cred; if (NFSHASNFSV4(nmp)) { nfhp = np->n_fhp; - if (p == NULL) - newcred = NFSNEWCRED(cred); + newcred = NFSNEWCRED(cred); } retrycnt = 0; do { @@ -1263,7 +1262,7 @@ nfsrpc_read(vnode_t vp, struct uio *uiop expireret == 0 && clidrev != 0 && retrycnt < 4)); if (error && retrycnt >= 4) error = EIO; - if (NFSHASNFSV4(nmp) && p == NULL) + if (NFSHASNFSV4(nmp)) NFSFREECRED(newcred); return (error); } @@ -1384,8 +1383,7 @@ nfsrpc_write(vnode_t vp, struct uio *uio clidrev = nmp->nm_clp->nfsc_clientidrev; newcred = cred; if (NFSHASNFSV4(nmp)) { - if (p == NULL) - newcred = NFSNEWCRED(cred); + newcred = NFSNEWCRED(cred); nfhp = np->n_fhp; } retrycnt = 0; @@ -1435,7 +1433,7 @@ nfsrpc_write(vnode_t vp, struct uio *uio ((error == NFSERR_STALESTATEID || error == NFSERR_STALEDONTRECOVER) && called_from_strategy != 0))) error = EIO; - if (NFSHASNFSV4(nmp) && p == NULL) + if (NFSHASNFSV4(nmp)) NFSFREECRED(newcred); return (error); } From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 02:13:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 726021065670; Fri, 23 Dec 2011 02:13:42 +0000 (UTC) (envelope-from ghelmer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 536AF8FC0C; Fri, 23 Dec 2011 02:13:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN2DgUX043640; Fri, 23 Dec 2011 02:13:42 GMT (envelope-from ghelmer@svn.freebsd.org) Received: (from ghelmer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN2DgIa043638; Fri, 23 Dec 2011 02:13:42 GMT (envelope-from ghelmer@svn.freebsd.org) Message-Id: <201112230213.pBN2DgIa043638@svn.freebsd.org> From: Guy Helmer Date: Fri, 23 Dec 2011 02:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228828 - head/lib/libc/yp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 02:13:42 -0000 Author: ghelmer Date: Fri Dec 23 02:13:42 2011 New Revision: 228828 URL: http://svn.freebsd.org/changeset/base/228828 Log: Handle malloc failures in yplib.c. PR: bin/83349 Modified: head/lib/libc/yp/yplib.c Modified: head/lib/libc/yp/yplib.c ============================================================================== --- head/lib/libc/yp/yplib.c Fri Dec 23 02:04:35 2011 (r228827) +++ head/lib/libc/yp/yplib.c Fri Dec 23 02:13:42 2011 (r228828) @@ -331,6 +331,8 @@ _yp_dobind(char *dom, struct dom_binding if (ysd == NULL) { ysd = (struct dom_binding *)malloc(sizeof *ysd); + if (ysd == NULL) + return (YPERR_RESRC); bzero((char *)ysd, sizeof *ysd); ysd->dom_socket = -1; ysd->dom_vers = 0; @@ -683,11 +685,18 @@ yp_match(char *indomain, char *inmap, co */ *outvallen = yprv.val.valdat_len; *outval = (char *)malloc(*outvallen+1); + if (*outval == NULL) { + _yp_unbind(ysd); + *outvallen = 0; + YPUNLOCK(); + return (YPERR_RESRC); + } bcopy(yprv.val.valdat_val, *outval, *outvallen); (*outval)[*outvallen] = '\0'; YPUNLOCK(); return (0); } + _yp_unbind(ysd); #endif again: @@ -713,6 +722,13 @@ again: if (!(r = ypprot_err(yprv.stat))) { *outvallen = yprv.val.valdat_len; *outval = (char *)malloc(*outvallen+1); + if (*outval == NULL) { + _yp_unbind(ysd); + *outvallen = 0; + xdr_free((xdrproc_t)xdr_ypresp_val, &yprv); + YPUNLOCK(); + return (YPERR_RESRC); + } bcopy(yprv.val.valdat_val, *outval, *outvallen); (*outval)[*outvallen] = '\0'; #ifdef YPMATCHCACHE @@ -791,10 +807,25 @@ again: if (!(r = ypprot_err(yprkv.stat))) { *outkeylen = yprkv.key.keydat_len; *outkey = (char *)malloc(*outkeylen+1); + if (*outkey == NULL) { + _yp_unbind(ysd); + *outkeylen = 0; + xdr_free((xdrproc_t)xdr_ypresp_key_val, &yprkv); + YPUNLOCK(); + return (YPERR_RESRC); + } bcopy(yprkv.key.keydat_val, *outkey, *outkeylen); (*outkey)[*outkeylen] = '\0'; *outvallen = yprkv.val.valdat_len; *outval = (char *)malloc(*outvallen+1); + if (*outval == NULL) { + free(*outkey); + _yp_unbind(ysd); + *outkeylen = *outvallen = 0; + xdr_free((xdrproc_t)xdr_ypresp_key_val, &yprkv); + YPUNLOCK(); + return (YPERR_RESRC); + } bcopy(yprkv.val.valdat_val, *outval, *outvallen); (*outval)[*outvallen] = '\0'; } @@ -851,10 +882,25 @@ again: if (!(r = ypprot_err(yprkv.stat))) { *outkeylen = yprkv.key.keydat_len; *outkey = (char *)malloc(*outkeylen+1); + if (*outkey == NULL) { + _yp_unbind(ysd); + *outkeylen = 0; + xdr_free((xdrproc_t)xdr_ypresp_key_val, &yprkv); + YPUNLOCK(); + return (YPERR_RESRC); + } bcopy(yprkv.key.keydat_val, *outkey, *outkeylen); (*outkey)[*outkeylen] = '\0'; *outvallen = yprkv.val.valdat_len; *outval = (char *)malloc(*outvallen+1); + if (*outval == NULL) { + free(*outkey); + _yp_unbind(ysd); + *outkeylen = *outvallen = 0; + xdr_free((xdrproc_t)xdr_ypresp_key_val, &yprkv); + YPUNLOCK(); + return (YPERR_RESRC); + } bcopy(yprkv.val.valdat_val, *outval, *outvallen); (*outval)[*outvallen] = '\0'; } From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 02:21:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74AD11065670; Fri, 23 Dec 2011 02:21:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60A098FC08; Fri, 23 Dec 2011 02:21:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN2LMJQ043931; Fri, 23 Dec 2011 02:21:22 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN2LMkV043929; Fri, 23 Dec 2011 02:21:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112230221.pBN2LMkV043929@svn.freebsd.org> From: Adrian Chadd Date: Fri, 23 Dec 2011 02:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228829 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 02:21:22 -0000 Author: adrian Date: Fri Dec 23 02:21:22 2011 New Revision: 228829 URL: http://svn.freebsd.org/changeset/base/228829 Log: Add a temporary debugging statement in order to try and identify what's going on with the occasional garbage rs_antenna field reported by AR9285 users. I've discovered that the 11n NICs only fill out the entire RX status descriptor on the final descriptor in an aggregate. Some of the fields (notably RSSI) are complete nonsense for A-MPDU subframes. This may be another example of this. The driver doesn't currently toss out statistics for non-final aggregate frames. It's likely that this should be done. If any users hit this particular debugging message they should report it immediately to freebsd-wireless@freebsd.org - please ensure you have ATH_DEBUG enabled so it prints out the full receive descriptor. PR: kern/163312 Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Dec 23 02:13:42 2011 (r228828) +++ head/sys/dev/ath/if_ath.c Fri Dec 23 02:21:22 2011 (r228829) @@ -4111,6 +4111,35 @@ rx_accept: m->m_pkthdr.len = len; } + /* + * Validate rs->rs_antenna. + * + * Some users w/ AR9285 NICs have reported crashes + * here because rs_antenna field is bogusly large. + * Let's enforce the maximum antenna limit of 8 + * (and it shouldn't be hard coded, but that's a + * separate problem) and if there's an issue, print + * out an error and adjust rs_antenna to something + * sensible. + * + * This code should be removed once the actual + * root cause of the issue has been identified. + * For example, it may be that the rs_antenna + * field is only valid for the lsat frame of + * an aggregate and it just happens that it is + * "mostly" right. (This is a general statement - + * the majority of the statistics are only valid + * for the last frame in an aggregate. + */ + if (rs->rs_antenna > 7) { + device_printf(sc->sc_dev, "%s: rs_antenna > 7 (%d)\n", + __func__, rs->rs_antenna); +#ifdef ATH_DEBUG + ath_printrxbuf(sc, bf, 0, status == HAL_OK); +#endif /* ATH_DEBUG */ + rs->rs_antenna = 0; /* XXX better than nothing */ + } + ifp->if_ipackets++; sc->sc_stats.ast_ant_rx[rs->rs_antenna]++; From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 02:40:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03B59106566B; Fri, 23 Dec 2011 02:40:36 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2A4A8FC08; Fri, 23 Dec 2011 02:40:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN2eZsn044610; Fri, 23 Dec 2011 02:40:35 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN2eZbw044608; Fri, 23 Dec 2011 02:40:35 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112230240.pBN2eZbw044608@svn.freebsd.org> From: Adrian Chadd Date: Fri, 23 Dec 2011 02:40:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228830 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 02:40:36 -0000 Author: adrian Date: Fri Dec 23 02:40:35 2011 New Revision: 228830 URL: http://svn.freebsd.org/changeset/base/228830 Log: Make some more of the 11n specific code conditional. This doesn't fix compilation w/out AH_SUPPORT_AR5416 as all of the software aggregation support in if_ath_tx.c and 11n code in if_ath_tx_ht.c touches the 11n specific fields. I'll work on that later. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Dec 23 02:21:22 2011 (r228829) +++ head/sys/dev/ath/if_ath.c Fri Dec 23 02:40:35 2011 (r228830) @@ -3962,6 +3962,7 @@ ath_rx_proc(struct ath_softc *sc, int re npkts++; /* These aren't specifically errors */ +#ifdef AH_SUPPORT_AR5416 if (rs->rs_flags & HAL_RX_GI) sc->sc_stats.ast_rx_halfgi++; if (rs->rs_flags & HAL_RX_2040) @@ -3974,6 +3975,7 @@ ath_rx_proc(struct ath_softc *sc, int re sc->sc_stats.ast_rx_decrypt_busy_err++; if (rs->rs_flags & HAL_RX_HI_RX_CHAIN) sc->sc_stats.ast_rx_hi_rx_chain++; +#endif /* AH_SUPPORT_AR5416 */ if (rs->rs_status != 0) { if (rs->rs_status & HAL_RXERR_CRC) @@ -4191,8 +4193,10 @@ rx_accept: IEEE80211_KEYIX_NONE : rs->rs_keyix); sc->sc_lastrs = rs; +#ifdef AH_SUPPORT_AR5416 if (rs->rs_isaggr) sc->sc_stats.ast_rx_agg++; +#endif /* AH_SUPPORT_AR5416 */ if (ni != NULL) { /* From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 02:57:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D632106566B; Fri, 23 Dec 2011 02:57:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 870DF8FC0A; Fri, 23 Dec 2011 02:57:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN2vIHO045275; Fri, 23 Dec 2011 02:57:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN2vIH0045273; Fri, 23 Dec 2011 02:57:18 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112230257.pBN2vIH0045273@svn.freebsd.org> From: Adrian Chadd Date: Fri, 23 Dec 2011 02:57:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228831 - head/tools/tools/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 02:57:18 -0000 Author: adrian Date: Fri Dec 23 02:57:18 2011 New Revision: 228831 URL: http://svn.freebsd.org/changeset/base/228831 Log: Add in ath_ee_9287_print. Modified: head/tools/tools/ath/Makefile Modified: head/tools/tools/ath/Makefile ============================================================================== --- head/tools/tools/ath/Makefile Fri Dec 23 02:40:35 2011 (r228830) +++ head/tools/tools/ath/Makefile Fri Dec 23 02:57:18 2011 (r228831) @@ -1,7 +1,7 @@ # $FreeBSD$ SUBDIR= arcode athdebug athdecode athkey athpoke athprom athrd athregs -SUBDIR+= athstats ath_ee_v14_print ath_prom_read ath_ee_v4k_print -SUBDIR+= athradar +SUBDIR+= athstats ath_prom_read ath_radar +SUBDIR+= ath_ee_v14_print ath_ee_v4k_print ath_ee_9287_print .include From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 03:59:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 615F5106564A; Fri, 23 Dec 2011 03:59:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C1568FC14; Fri, 23 Dec 2011 03:59:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN3xoA9047396; Fri, 23 Dec 2011 03:59:50 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN3xoFh047394; Fri, 23 Dec 2011 03:59:50 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112230359.pBN3xoFh047394@svn.freebsd.org> From: Adrian Chadd Date: Fri, 23 Dec 2011 03:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228832 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 03:59:50 -0000 Author: adrian Date: Fri Dec 23 03:59:49 2011 New Revision: 228832 URL: http://svn.freebsd.org/changeset/base/228832 Log: Rework this ugly mess that tries to handle reset serialisation. Some users were reporting concurrent resets _were_ occuring - ie, either two ath_reset()s ran at the same time (likely one on each CPU) or ath_reset() versus ath_chan_change(). Instead, this now tries to grab the serialisation semaphore and will pause() for a while if it fails. It will always eventually succeed though and will log an error if it hits the recursion situation. All of this stuff needs to die a horrible death at some point and be replaced with a properly serialising method of programming this stuff (eg using the net80211 taskqueue for all of this stuff.) The trouble is figuring out how to handle the concurrent ioctl() based things without introducing more LORs (which is another reason why I haven't just wrapped all of this stuff in large, long-lived locks, a-la what Linux can get away with.) MFC after: Absolutely, positively never. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Dec 23 02:57:18 2011 (r228831) +++ head/sys/dev/ath/if_ath.c Fri Dec 23 03:59:49 2011 (r228832) @@ -1898,6 +1898,70 @@ ath_txrx_start(struct ath_softc *sc) taskqueue_unblock(sc->sc_tq); } +/* + * Grab the reset lock, and wait around until noone else + * is trying to do anything with it. + * + * This is totally horrible but we can't hold this lock for + * long enough to do TX/RX or we end up with net80211/ip stack + * LORs and eventual deadlock. + * + * "dowait" signals whether to spin, waiting for the reset + * lock count to reach 0. This should (for now) only be used + * during the reset path, as the rest of the code may not + * be locking-reentrant enough to behave correctly. + * + * Another, cleaner way should be found to serialise all of + * these operations. + */ +#define MAX_RESET_ITERATIONS 10 +static int +ath_reset_grablock(struct ath_softc *sc, int dowait) +{ + int w = 0; + int i = MAX_RESET_ITERATIONS; + + ATH_PCU_LOCK_ASSERT(sc); + do { + if (sc->sc_inreset_cnt == 0) { + w = 1; + break; + } + if (dowait == 0) { + w = 0; + break; + } + ATH_PCU_UNLOCK(sc); + pause("ath_reset_grablock", 1); + i--; + ATH_PCU_LOCK(sc); + } while (i > 0); + + /* + * We always increment the refcounter, regardless + * of whether we succeeded to get it in an exclusive + * way. + */ + sc->sc_inreset_cnt++; + + if (i <= 0) + device_printf(sc->sc_dev, + "%s: didn't finish after %d iterations\n", + __func__, MAX_RESET_ITERATIONS); + + if (w == 0) + device_printf(sc->sc_dev, + "%s: warning, recursive reset path!\n", + __func__); + + return w; +} +#undef MAX_RESET_ITERATIONS + +/* + * XXX TODO: write ath_reset_releaselock + */ + static void ath_stop(struct ifnet *ifp) { @@ -1926,18 +1990,15 @@ ath_reset(struct ifnet *ifp, ATH_RESET_T DPRINTF(sc, ATH_DEBUG_RESET, "%s: called\n", __func__); - /* XXX ensure ATH_LOCK isn't held; ath_rx_proc can't be locked */ + /* Ensure ATH_LOCK isn't held; ath_rx_proc can't be locked */ ATH_PCU_UNLOCK_ASSERT(sc); ATH_UNLOCK_ASSERT(sc); ATH_PCU_LOCK(sc); - /* XXX if we're already inside a reset, print out a big warning */ - if (sc->sc_inreset_cnt > 0) { - device_printf(sc->sc_dev, - "%s: concurrent ath_reset()! Danger!\n", + if (ath_reset_grablock(sc, 1) == 0) { + device_printf(sc->sc_dev, "%s: concurrent reset! Danger!\n", __func__); } - sc->sc_inreset_cnt++; ath_hal_intrset(ah, 0); /* disable interrupts */ ATH_PCU_UNLOCK(sc); @@ -5250,10 +5311,10 @@ ath_chan_set(struct ath_softc *sc, struc /* Treat this as an interface reset */ ATH_PCU_LOCK(sc); - if (sc->sc_inreset_cnt > 0) - device_printf(sc->sc_dev, "%s: danger! concurrent reset!\n", + if (ath_reset_grablock(sc, 1) == 0) { + device_printf(sc->sc_dev, "%s: concurrent reset! Danger!\n", __func__); - sc->sc_inreset_cnt++; + } if (chan != sc->sc_curchan) { dointr = 1; /* XXX only do this if inreset_cnt is 1? */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 04:05:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C44DE106564A; Fri, 23 Dec 2011 04:05:39 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE0F28FC08; Fri, 23 Dec 2011 04:05:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN45d7O047630; Fri, 23 Dec 2011 04:05:39 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN45dTg047628; Fri, 23 Dec 2011 04:05:39 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112230405.pBN45dTg047628@svn.freebsd.org> From: Adrian Chadd Date: Fri, 23 Dec 2011 04:05:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228833 - head/sys/dev/ath/ath_hal/ar9002 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 04:05:39 -0000 Author: adrian Date: Fri Dec 23 04:05:39 2011 New Revision: 228833 URL: http://svn.freebsd.org/changeset/base/228833 Log: Remove unused #define's. Pointy hat to: adrian, for not properly reading things when he copied ar9285.h to ar9287.h. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287.h Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9287.h Fri Dec 23 03:59:49 2011 (r228832) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287.h Fri Dec 23 04:05:39 2011 (r228833) @@ -45,9 +45,7 @@ struct ath_hal_9287 { #define AH9287(_ah) ((struct ath_hal_9287 *)(_ah)) #define AR9287_DEFAULT_RXCHAINMASK 3 -#define AR9285_DEFAULT_RXCHAINMASK 1 #define AR9287_DEFAULT_TXCHAINMASK 3 -#define AR9285_DEFAULT_TXCHAINMASK 1 #define AR_PHY_CCA_NOM_VAL_9287_2GHZ -112 #define AR_PHY_CCA_NOM_VAL_9287_5GHZ -112 From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 08:32:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2E921065670; Fri, 23 Dec 2011 08:32:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD5618FC17; Fri, 23 Dec 2011 08:32:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN8Wrpt055718; Fri, 23 Dec 2011 08:32:53 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN8Wrkr055716; Fri, 23 Dec 2011 08:32:53 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112230832.pBN8Wrkr055716@svn.freebsd.org> From: Adrian Chadd Date: Fri, 23 Dec 2011 08:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228834 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 08:32:53 -0000 Author: adrian Date: Fri Dec 23 08:32:53 2011 New Revision: 228834 URL: http://svn.freebsd.org/changeset/base/228834 Log: Port over some GPIO and LED fixes. * As a preparation for AR9287 GPIO support, add in the AR9287 GPIO mask. * Fix the association mask values; these are post-shift values but were being shifted in twice. This resulted in some garbage being written in the wrong place and the link LED (at least on my d-link AR5416 NIC) giving totally incorrect blink patterns. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Fri Dec 23 04:05:39 2011 (r228833) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Fri Dec 23 08:32:53 2011 (r228834) @@ -203,9 +203,9 @@ #define AR_MAC_LED_MODE_POWON 5 /* Power LED on (s/w control) */ #define AR_MAC_LED_MODE_NETON 6 /* Network LED on (s/w control) */ #define AR_MAC_LED_ASSOC 0x00000c00 -#define AR_MAC_LED_ASSOC_NONE 0x00000000 /* STA is not associated or trying */ -#define AR_MAC_LED_ASSOC_ACTIVE 0x00000400 /* STA is associated */ -#define AR_MAC_LED_ASSOC_PEND 0x00000800 /* STA is trying to associate */ +#define AR_MAC_LED_ASSOC_NONE 0x0 /* STA is not associated or trying */ +#define AR_MAC_LED_ASSOC_ACTIVE 0x1 /* STA is associated */ +#define AR_MAC_LED_ASSOC_PEND 0x2 /* STA is trying to associate */ #define AR_MAC_LED_ASSOC_S 10 #define AR_WA_UNTIE_RESET_EN 0x00008000 /* ena PCI reset to POR */ @@ -504,6 +504,8 @@ #define AR928X_GPIO_IN_VAL_S 10 #define AR9285_GPIO_IN_VAL 0x00FFF000 #define AR9285_GPIO_IN_VAL_S 12 +#define AR9287_GPIO_IN_VAL 0x003FF800 +#define AR9287_GPIO_IN_VAL_S 11 #define AR_GPIO_OE_OUT_DRV 0x3 /* 2 bit mask shifted by 2*bitpos */ #define AR_GPIO_OE_OUT_DRV_NO 0x0 /* tristate */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 08:50:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B06C1065678; Fri, 23 Dec 2011 08:50:27 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 161928FC17; Fri, 23 Dec 2011 08:50:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN8oQcd056292; Fri, 23 Dec 2011 08:50:26 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN8oQTc056290; Fri, 23 Dec 2011 08:50:26 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112230850.pBN8oQTc056290@svn.freebsd.org> From: Martin Matuska Date: Fri, 23 Dec 2011 08:50:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228835 - head/contrib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 08:50:27 -0000 Author: mm Date: Fri Dec 23 08:50:26 2011 New Revision: 228835 URL: http://svn.freebsd.org/changeset/base/228835 Log: Fix typo s/xz/libarchive/ Reported by: Emil Mikulic (private e-mail) MFC after: 12 days Modified: head/contrib/libarchive/FREEBSD-upgrade Modified: head/contrib/libarchive/FREEBSD-upgrade ============================================================================== --- head/contrib/libarchive/FREEBSD-upgrade Fri Dec 23 08:32:53 2011 (r228834) +++ head/contrib/libarchive/FREEBSD-upgrade Fri Dec 23 08:50:26 2011 (r228835) @@ -17,7 +17,7 @@ at FreeBSD wiki: http://wiki.freebsd.org/SubversionPrimer/VendorImports -To make local changes to xz, simply patch and commit to the trunk +To make local changes to libarchive, simply patch and commit to the trunk branch (aka HEAD). Never make local changes on the vendor branch. mm@FreeBSD.org From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 08:53:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AAD9106566B; Fri, 23 Dec 2011 08:53:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 294EE8FC0C; Fri, 23 Dec 2011 08:53:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN8rNB8056419; Fri, 23 Dec 2011 08:53:23 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN8rMb3056417; Fri, 23 Dec 2011 08:53:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112230853.pBN8rMb3056417@svn.freebsd.org> From: Adrian Chadd Date: Fri, 23 Dec 2011 08:53:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228836 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 08:53:23 -0000 Author: adrian Date: Fri Dec 23 08:53:22 2011 New Revision: 228836 URL: http://svn.freebsd.org/changeset/base/228836 Log: Port over some more GPIO fixes from the atheros reference HAL. * Bring the AR5416 GPIO mux mask code in line with the code from the HAL. * Add HAL_DEBUG_GPIO debugging statements, to track what's going on. * Add Kiwi GPIO specific changes for reading values back. Obtained from: Atheros Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c Fri Dec 23 08:50:26 2011 (r228835) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c Fri Dec 23 08:53:22 2011 (r228836) @@ -35,7 +35,10 @@ static void cfgOutputMux(struct ath_hal *ah, uint32_t gpio, uint32_t type) { int addr; - uint32_t gpio_shift, reg; + uint32_t gpio_shift, tmp; + + HALDEBUG(ah, HAL_DEBUG_GPIO, "%s: gpio=%d, type=%d\n", + __func__, gpio, type); /* each MUX controls 6 GPIO pins */ if (gpio > 11) @@ -61,12 +64,17 @@ cfgOutputMux(struct ath_hal *ah, uint32_ * will never be used. So it should be fine that bit 4 won't be * able to recover. */ - reg = OS_REG_READ(ah, addr); - if (addr == AR_GPIO_OUTPUT_MUX1 && !AR_SREV_MERLIN_20_OR_LATER(ah)) - reg = ((reg & 0x1F0) << 1) | (reg & ~0x1F0); - reg &= ~(0x1f << gpio_shift); - reg |= type << gpio_shift; - OS_REG_WRITE(ah, addr, reg); + if (AR_SREV_MERLIN_20_OR_LATER(ah) || + (addr != AR_GPIO_OUTPUT_MUX1)) { + OS_REG_RMW(ah, addr, (type << gpio_shift), + (0x1f << gpio_shift)); + } else { + tmp = OS_REG_READ(ah, addr); + tmp = ((tmp & 0x1F0) << 1) | (tmp & ~0x1F0); + tmp &= ~(0x1f << gpio_shift); + tmp |= type << gpio_shift; + OS_REG_WRITE(ah, addr, tmp); + } } /* @@ -79,12 +87,17 @@ ar5416GpioCfgOutput(struct ath_hal *ah, HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins); + HALDEBUG(ah, HAL_DEBUG_GPIO, + "%s: gpio=%d, type=%d\n", __func__, gpio, type); + /* NB: type maps directly to hardware */ + /* XXX this may not actually be the case, for anything but output */ cfgOutputMux(ah, gpio, type); gpio_shift = gpio << 1; /* 2 bits per output mode */ reg = OS_REG_READ(ah, AR_GPIO_OE_OUT); reg &= ~(AR_GPIO_OE_OUT_DRV << gpio_shift); + /* Always drive, rather than tristate/drive low/drive high */ reg |= AR_GPIO_OE_OUT_DRV_ALL << gpio_shift; OS_REG_WRITE(ah, AR_GPIO_OE_OUT, reg); @@ -101,6 +114,8 @@ ar5416GpioCfgInput(struct ath_hal *ah, u HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins); + HALDEBUG(ah, HAL_DEBUG_GPIO, "%s: gpio=%d\n", __func__, gpio); + /* TODO: configure input mux for AR5416 */ /* If configured as input, set output to tristate */ gpio_shift = gpio << 1; @@ -122,6 +137,8 @@ ar5416GpioSet(struct ath_hal *ah, uint32 uint32_t reg; HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins); + HALDEBUG(ah, HAL_DEBUG_GPIO, + "%s: gpio=%d, val=%d\n", __func__, gpio, val); reg = OS_REG_READ(ah, AR_GPIO_IN_OUT); if (val & 1) @@ -146,6 +163,8 @@ ar5416GpioGet(struct ath_hal *ah, uint32 * Read output value for all gpio's, shift it, * and verify whether the specific bit is set. */ + if (AR_SREV_KIWI_10_OR_LATER(ah)) + bits = MS(OS_REG_READ(ah, AR_GPIO_IN_OUT), AR9287_GPIO_IN_VAL); if (AR_SREV_KITE_10_OR_LATER(ah)) bits = MS(OS_REG_READ(ah, AR_GPIO_IN_OUT), AR9285_GPIO_IN_VAL); else if (AR_SREV_MERLIN_10_OR_LATER(ah)) @@ -165,6 +184,8 @@ ar5416GpioSetIntr(struct ath_hal *ah, u_ uint32_t val, mask; HALASSERT(gpio < AH_PRIVATE(ah)->ah_caps.halNumGpioPins); + HALDEBUG(ah, HAL_DEBUG_GPIO, + "%s: gpio=%d, ilevel=%d\n", __func__, gpio, ilevel); if (ilevel == HAL_GPIO_INTR_DISABLE) { val = MS(OS_REG_READ(ah, AR_INTR_ASYNC_ENABLE), From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 09:09:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B50F81065675; Fri, 23 Dec 2011 09:09:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9FA6C8FC1B; Fri, 23 Dec 2011 09:09:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN99AcS056941; Fri, 23 Dec 2011 09:09:10 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN99Awq056939; Fri, 23 Dec 2011 09:09:10 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112230909.pBN99Awq056939@svn.freebsd.org> From: Adrian Chadd Date: Fri, 23 Dec 2011 09:09:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228837 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 09:09:10 -0000 Author: adrian Date: Fri Dec 23 09:09:10 2011 New Revision: 228837 URL: http://svn.freebsd.org/changeset/base/228837 Log: Disable the code which hard-sets the LEDs on. This prevents the LED state from correctly updating things. The reference driver directly enables/disables the LED state as required, rather than nailing it up like it currently is. That'll have to come later by adding some further HAL methods. Obtained from: Atheros Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Fri Dec 23 08:53:22 2011 (r228836) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Fri Dec 23 09:09:10 2011 (r228837) @@ -73,11 +73,23 @@ ar5416SetLedState(struct ath_hal *ah, HA AR_MAC_LED_ASSOC_NONE, AR_MAC_LED_ASSOC_NONE, }; +#if 0 uint32_t bits; +#endif if (AR_SREV_HOWL(ah)) return; + OS_REG_RMW_FIELD(ah, AR_MAC_LED, + AR_MAC_LED_ASSOC, ledbits[state & 0x7]); + + /* + * For now, don't override the power/network LED + * "on" bits. The reference driver notes that some + * devices connect the LED pins to other functionality + * so we can't just leave this on by default. + */ +#if 0 bits = OS_REG_READ(ah, AR_MAC_LED); bits = (bits &~ AR_MAC_LED_MODE) | SM(AR_MAC_LED_MODE_POWON, AR_MAC_LED_MODE) @@ -88,6 +100,7 @@ ar5416SetLedState(struct ath_hal *ah, HA bits = (bits &~ AR_MAC_LED_ASSOC) | SM(ledbits[state & 0x7], AR_MAC_LED_ASSOC); OS_REG_WRITE(ah, AR_MAC_LED, bits); +#endif } /* From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 09:09:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9C16106567F; Fri, 23 Dec 2011 09:09:43 +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 79B6A8FC0C; Fri, 23 Dec 2011 09:09:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBN99hrQ056995; Fri, 23 Dec 2011 09:09:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBN99hZB056993; Fri, 23 Dec 2011 09:09:43 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112230909.pBN99hZB056993@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 23 Dec 2011 09:09:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228838 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 09:09:43 -0000 Author: kib Date: Fri Dec 23 09:09:42 2011 New Revision: 228838 URL: http://svn.freebsd.org/changeset/base/228838 Log: Optimize the common case of msyncing the whole file mapping with MS_SYNC flag. The system must guarantee that all writes are finished before syscalls returned. Schedule the writes in async mode, which is much faster and allows the clustering to occur. Wait for writes using VOP_FSYNC(), since we are syncing the whole file mapping. Potentially, the restriction to only apply the optimization can be relaxed by not requiring that the mapping cover whole file, as it is done by other OSes. Reported and tested by: az Reviewed by: alc MFC after: 2 weeks Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Fri Dec 23 09:09:10 2011 (r228837) +++ head/sys/vm/vm_object.c Fri Dec 23 09:09:42 2011 (r228838) @@ -938,7 +938,7 @@ vm_object_sync(vm_object_t object, vm_oo vm_object_t backing_object; struct vnode *vp; struct mount *mp; - int flags; + int flags, fsync_after; if (object == NULL) return; @@ -971,11 +971,26 @@ vm_object_sync(vm_object_t object, vm_oo (void) vn_start_write(vp, &mp, V_WAIT); vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - flags = (syncio || invalidate) ? OBJPC_SYNC : 0; - flags |= invalidate ? OBJPC_INVAL : 0; + if (syncio && !invalidate && offset == 0 && + OFF_TO_IDX(size) == object->size) { + /* + * If syncing the whole mapping of the file, + * it is faster to schedule all the writes in + * async mode, also allowing the clustering, + * and then wait for i/o to complete. + */ + flags = 0; + fsync_after = TRUE; + } else { + flags = (syncio || invalidate) ? OBJPC_SYNC : 0; + flags |= invalidate ? (OBJPC_SYNC | OBJPC_INVAL) : 0; + fsync_after = FALSE; + } VM_OBJECT_LOCK(object); vm_object_page_clean(object, offset, offset + size, flags); VM_OBJECT_UNLOCK(object); + if (fsync_after) + (void) VOP_FSYNC(vp, MNT_WAIT, curthread); VOP_UNLOCK(vp, 0); VFS_UNLOCK_GIANT(vfslocked); vn_finished_write(mp); From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 13:50:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70CB8106566B; Fri, 23 Dec 2011 13:50:34 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B4C58FC0A; Fri, 23 Dec 2011 13:50:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNDoYg3068092; Fri, 23 Dec 2011 13:50:34 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNDoYZW068090; Fri, 23 Dec 2011 13:50:34 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112231350.pBNDoYZW068090@svn.freebsd.org> From: Dimitry Andric Date: Fri, 23 Dec 2011 13:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228841 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 13:50:34 -0000 Author: dim Date: Fri Dec 23 13:50:33 2011 New Revision: 228841 URL: http://svn.freebsd.org/changeset/base/228841 Log: Amend r228822 by not directly adding to CWARNFLAGS, but to an optional CWARNEXTRA variable, which gets included into the initial CWARNFLAGS setting. This makes it easier to override CWARNFLAGS with completely custom settings (including enabling any disabled warnings). Reminded by: arundel MFC after: 1 week Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Fri Dec 23 13:20:51 2011 (r228840) +++ head/sys/conf/kern.mk Fri Dec 23 13:50:33 2011 (r228841) @@ -6,7 +6,8 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ -Wundef -Wno-pointer-sign -fformat-extensions \ - -Wmissing-include-dirs -fdiagnostics-show-option + -Wmissing-include-dirs -fdiagnostics-show-option \ + ${CWARNEXTRA} # # The following flags are next up for working on: # -Wextra @@ -22,7 +23,7 @@ NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-cou # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. -CWARNFLAGS+= -Wno-error-tautological-compare +CWARNEXTRA+= -Wno-error-tautological-compare .endif # From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 15:00:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A0411065835; Fri, 23 Dec 2011 15:00:38 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 239F38FC26; Fri, 23 Dec 2011 15:00:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNF0cuk071708; Fri, 23 Dec 2011 15:00:38 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNF0bEB071696; Fri, 23 Dec 2011 15:00:37 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201112231500.pBNF0bEB071696@svn.freebsd.org> From: Colin Percival Date: Fri, 23 Dec 2011 15:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 15:00:38 -0000 Author: cperciva Date: Fri Dec 23 15:00:37 2011 New Revision: 228843 URL: http://svn.freebsd.org/changeset/base/228843 Log: Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06] Add an API for alerting internal libc routines to the presence of "unsafe" paths post-chroot, and use it in ftpd. [11:07] Fix a buffer overflow in telnetd. [11:08] Make pam_ssh ignore unpassphrased keys unless the "nullok" option is specified. [11:09] Add sanity checking of service names in pam_start. [11:10] Approved by: so (cperciva) Approved by: re (bz) Security: FreeBSD-SA-11:06.bind Security: FreeBSD-SA-11:07.chroot Security: FreeBSD-SA-11:08.telnetd Security: FreeBSD-SA-11:09.pam_ssh Security: FreeBSD-SA-11:10.pam Added: stable/7/lib/libc/gen/libc_dlopen.c (contents, props changed) Modified: stable/7/contrib/telnet/libtelnet/encrypt.c stable/7/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/7/include/unistd.h stable/7/lib/libc/Versions.def stable/7/lib/libc/gen/Makefile.inc stable/7/lib/libc/gen/Symbol.map stable/7/lib/libc/include/libc_private.h stable/7/lib/libc/net/nsdispatch.c stable/7/libexec/ftpd/ftpd.c stable/7/libexec/ftpd/popen.c Changes in other areas also in this revision: Added: head/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/7.3/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/7.4/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/8.1/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/8.2/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/9.0/lib/libc/gen/libc_dlopen.c (contents, props changed) stable/8/lib/libc/gen/libc_dlopen.c (contents, props changed) stable/9/lib/libc/gen/libc_dlopen.c (contents, props changed) Modified: head/contrib/telnet/libtelnet/encrypt.c head/crypto/heimdal/appl/telnet/libtelnet/encrypt.c head/include/unistd.h head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libc/iconv/citrus_module.c head/lib/libc/include/libc_private.h head/lib/libc/net/nsdispatch.c head/libexec/ftpd/ftpd.c head/libexec/ftpd/popen.c releng/7.3/UPDATING releng/7.3/contrib/bind9/bin/named/query.c releng/7.3/contrib/bind9/lib/dns/rbtdb.c releng/7.3/contrib/openpam/lib/openpam_configure.c releng/7.3/contrib/telnet/libtelnet/encrypt.c releng/7.3/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/7.3/include/unistd.h releng/7.3/lib/libc/Versions.def releng/7.3/lib/libc/gen/Makefile.inc releng/7.3/lib/libc/gen/Symbol.map releng/7.3/lib/libc/include/libc_private.h releng/7.3/lib/libc/net/nsdispatch.c releng/7.3/lib/libpam/modules/pam_ssh/pam_ssh.c releng/7.3/libexec/ftpd/ftpd.c releng/7.3/libexec/ftpd/popen.c releng/7.3/sys/conf/newvers.sh releng/7.4/UPDATING releng/7.4/contrib/bind9/bin/named/query.c releng/7.4/contrib/bind9/lib/dns/rbtdb.c releng/7.4/contrib/openpam/lib/openpam_configure.c releng/7.4/contrib/telnet/libtelnet/encrypt.c releng/7.4/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/7.4/include/unistd.h releng/7.4/lib/libc/Versions.def releng/7.4/lib/libc/gen/Makefile.inc releng/7.4/lib/libc/gen/Symbol.map releng/7.4/lib/libc/include/libc_private.h releng/7.4/lib/libc/net/nsdispatch.c releng/7.4/lib/libpam/modules/pam_ssh/pam_ssh.c releng/7.4/libexec/ftpd/ftpd.c releng/7.4/libexec/ftpd/popen.c releng/7.4/sys/conf/newvers.sh releng/8.1/UPDATING releng/8.1/contrib/bind9/bin/named/query.c releng/8.1/contrib/bind9/lib/dns/rbtdb.c releng/8.1/contrib/openpam/lib/openpam_configure.c releng/8.1/contrib/telnet/libtelnet/encrypt.c releng/8.1/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/8.1/include/unistd.h releng/8.1/lib/libc/Versions.def releng/8.1/lib/libc/gen/Makefile.inc releng/8.1/lib/libc/gen/Symbol.map releng/8.1/lib/libc/include/libc_private.h releng/8.1/lib/libc/net/nsdispatch.c releng/8.1/lib/libpam/modules/pam_ssh/pam_ssh.c releng/8.1/libexec/ftpd/ftpd.c releng/8.1/libexec/ftpd/popen.c releng/8.1/sys/conf/newvers.sh releng/8.2/UPDATING releng/8.2/contrib/bind9/bin/named/query.c releng/8.2/contrib/bind9/lib/dns/rbtdb.c releng/8.2/contrib/openpam/lib/openpam_configure.c releng/8.2/contrib/telnet/libtelnet/encrypt.c releng/8.2/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/8.2/include/unistd.h releng/8.2/lib/libc/Versions.def releng/8.2/lib/libc/gen/Makefile.inc releng/8.2/lib/libc/gen/Symbol.map releng/8.2/lib/libc/include/libc_private.h releng/8.2/lib/libc/net/nsdispatch.c releng/8.2/lib/libpam/modules/pam_ssh/pam_ssh.c releng/8.2/libexec/ftpd/ftpd.c releng/8.2/libexec/ftpd/popen.c releng/8.2/sys/conf/newvers.sh releng/9.0/contrib/telnet/libtelnet/encrypt.c releng/9.0/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/9.0/include/unistd.h releng/9.0/lib/libc/Versions.def releng/9.0/lib/libc/gen/Makefile.inc releng/9.0/lib/libc/gen/Symbol.map releng/9.0/lib/libc/iconv/citrus_module.c releng/9.0/lib/libc/include/libc_private.h releng/9.0/lib/libc/net/nsdispatch.c releng/9.0/libexec/ftpd/ftpd.c releng/9.0/libexec/ftpd/popen.c stable/8/contrib/telnet/libtelnet/encrypt.c stable/8/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/8/include/unistd.h stable/8/lib/libc/Versions.def stable/8/lib/libc/gen/Makefile.inc stable/8/lib/libc/gen/Symbol.map stable/8/lib/libc/include/libc_private.h stable/8/lib/libc/net/nsdispatch.c stable/8/libexec/ftpd/ftpd.c stable/8/libexec/ftpd/popen.c stable/9/contrib/telnet/libtelnet/encrypt.c stable/9/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/9/include/unistd.h stable/9/lib/libc/Versions.def stable/9/lib/libc/gen/Makefile.inc stable/9/lib/libc/gen/Symbol.map stable/9/lib/libc/iconv/citrus_module.c stable/9/lib/libc/include/libc_private.h stable/9/lib/libc/net/nsdispatch.c stable/9/libexec/ftpd/ftpd.c stable/9/libexec/ftpd/popen.c Modified: stable/7/contrib/telnet/libtelnet/encrypt.c ============================================================================== --- stable/7/contrib/telnet/libtelnet/encrypt.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/7/contrib/telnet/libtelnet/encrypt.c Fri Dec 23 15:00:37 2011 (r228843) @@ -721,6 +721,9 @@ encrypt_keyid(struct key_info *kp, unsig int dir = kp->dir; int ret = 0; + if (len > MAXKEYLEN) + len = MAXKEYLEN; + if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (len == 0) return; Modified: stable/7/crypto/heimdal/appl/telnet/libtelnet/encrypt.c ============================================================================== --- stable/7/crypto/heimdal/appl/telnet/libtelnet/encrypt.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/7/crypto/heimdal/appl/telnet/libtelnet/encrypt.c Fri Dec 23 15:00:37 2011 (r228843) @@ -736,6 +736,9 @@ encrypt_keyid(struct key_info *kp, unsig int dir = kp->dir; int ret = 0; + if (len > MAXKEYLEN) + len = MAXKEYLEN; + if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (len == 0) return; Modified: stable/7/include/unistd.h ============================================================================== --- stable/7/include/unistd.h Fri Dec 23 14:39:30 2011 (r228842) +++ stable/7/include/unistd.h Fri Dec 23 15:00:37 2011 (r228843) @@ -494,6 +494,7 @@ int initgroups(const char *, gid_t); int iruserok(unsigned long, int, const char *, const char *); int iruserok_sa(const void *, int, int, const char *, const char *); int issetugid(void); +void __FreeBSD_libc_enter_restricted_mode(void); char *mkdtemp(char *); #ifndef _MKNOD_DECLARED int mknod(const char *, mode_t, dev_t); Modified: stable/7/lib/libc/Versions.def ============================================================================== --- stable/7/lib/libc/Versions.def Fri Dec 23 14:39:30 2011 (r228842) +++ stable/7/lib/libc/Versions.def Fri Dec 23 15:00:37 2011 (r228843) @@ -20,9 +20,13 @@ FBSD_1.1 { FBSD_1.2 { } FBSD_1.1; +# This version was first added to 10.0-current. +FBSD_1.3 { +} FBSD_1.2; + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries # are listed here. We use a separate namespace so we can write # simple ABI-checking tools. FBSDprivate_1.0 { -} FBSD_1.2; +} FBSD_1.3; Modified: stable/7/lib/libc/gen/Makefile.inc ============================================================================== --- stable/7/lib/libc/gen/Makefile.inc Fri Dec 23 14:39:30 2011 (r228842) +++ stable/7/lib/libc/gen/Makefile.inc Fri Dec 23 15:00:37 2011 (r228843) @@ -20,6 +20,7 @@ SRCS+= __getosreldate.c __xuname.c \ getpeereid.c getprogname.c getpwent.c getttyent.c \ getusershell.c getvfsbyname.c glob.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ + libc_dlopen.c \ lockf.c lrand48.c mrand48.c nftw.c nice.c \ nlist.c nrand48.c opendir.c \ pause.c pmadvise.c popen.c posixshm.c pselect.c \ Modified: stable/7/lib/libc/gen/Symbol.map ============================================================================== --- stable/7/lib/libc/gen/Symbol.map Fri Dec 23 14:39:30 2011 (r228842) +++ stable/7/lib/libc/gen/Symbol.map Fri Dec 23 15:00:37 2011 (r228843) @@ -345,6 +345,10 @@ FBSD_1.2 { getpagesizes; }; +FBSD_1.3 { + __FreeBSD_libc_enter_restricted_mode; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; Added: stable/7/lib/libc/gen/libc_dlopen.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/lib/libc/gen/libc_dlopen.c Fri Dec 23 15:00:37 2011 (r228843) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2011 Xin Li + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include "libc_private.h" + +/* + * Whether we want to restrict dlopen()s. + */ +static int __libc_restricted_mode = 0; + +void * +libc_dlopen(const char *path, int mode) +{ + + if (__libc_restricted_mode) { + _rtld_error("Service unavailable -- libc in restricted mode"); + return (NULL); + } else + return (dlopen(path, mode)); +} + +void +__FreeBSD_libc_enter_restricted_mode(void) +{ + + __libc_restricted_mode = 1; + return; +} + Modified: stable/7/lib/libc/include/libc_private.h ============================================================================== --- stable/7/lib/libc/include/libc_private.h Fri Dec 23 14:39:30 2011 (r228842) +++ stable/7/lib/libc/include/libc_private.h Fri Dec 23 15:00:37 2011 (r228843) @@ -44,6 +44,17 @@ extern int __isthreaded; /* + * libc should use libc_dlopen internally, which respects a global + * flag where loading of new shared objects can be restricted. + */ +void *libc_dlopen(const char *, int); + +/* + * For dynamic linker. + */ +void _rtld_error(const char *fmt, ...); + +/* * File lock contention is difficult to diagnose without knowing * where locks were set. Allow a debug library to be built which * records the source file and line number of each lock call. Modified: stable/7/lib/libc/net/nsdispatch.c ============================================================================== --- stable/7/lib/libc/net/nsdispatch.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/7/lib/libc/net/nsdispatch.c Fri Dec 23 15:00:37 2011 (r228843) @@ -369,7 +369,7 @@ nss_configure(void) confmod = statbuf.st_mtime; #ifdef NS_CACHING - handle = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); + handle = libc_dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); if (handle != NULL) { nss_cache_cycle_prevention_func = dlsym(handle, "_nss_cache_cycle_prevention_function"); @@ -482,7 +482,7 @@ nss_load_module(const char *source, nss_ if (snprintf(buf, sizeof(buf), "nss_%s.so.%d", mod.name, NSS_MODULE_INTERFACE_VERSION) >= (int)sizeof(buf)) goto fin; - mod.handle = dlopen(buf, RTLD_LOCAL|RTLD_LAZY); + mod.handle = libc_dlopen(buf, RTLD_LOCAL|RTLD_LAZY); if (mod.handle == NULL) { #ifdef _NSS_DEBUG /* This gets pretty annoying since the built-in Modified: stable/7/libexec/ftpd/ftpd.c ============================================================================== --- stable/7/libexec/ftpd/ftpd.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/7/libexec/ftpd/ftpd.c Fri Dec 23 15:00:37 2011 (r228843) @@ -1546,6 +1546,7 @@ skip: reply(550, "Can't change root."); goto bad; } + __FreeBSD_libc_enter_restricted_mode(); } else /* real user w/o chroot */ homedir = pw->pw_dir; /* Modified: stable/7/libexec/ftpd/popen.c ============================================================================== --- stable/7/libexec/ftpd/popen.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/7/libexec/ftpd/popen.c Fri Dec 23 15:00:37 2011 (r228843) @@ -143,6 +143,9 @@ ftpd_popen(char *program, char *type) } (void)close(pdes[1]); } + /* Drop privileges before proceeding */ + if (getuid() != geteuid() && setuid(geteuid()) < 0) + _exit(1); if (strcmp(gargv[0], _PATH_LS) == 0) { /* Reset getopt for ls_main() */ optreset = optind = optopt = 1; From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 15:00:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71D941065724; Fri, 23 Dec 2011 15:00:38 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C5048FC27; Fri, 23 Dec 2011 15:00:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNF0cMe071724; Fri, 23 Dec 2011 15:00:38 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNF0c0O071712; Fri, 23 Dec 2011 15:00:38 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201112231500.pBNF0c0O071712@svn.freebsd.org> From: Colin Percival Date: Fri, 23 Dec 2011 15:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 15:00:38 -0000 Author: cperciva Date: Fri Dec 23 15:00:37 2011 New Revision: 228843 URL: http://svn.freebsd.org/changeset/base/228843 Log: Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06] Add an API for alerting internal libc routines to the presence of "unsafe" paths post-chroot, and use it in ftpd. [11:07] Fix a buffer overflow in telnetd. [11:08] Make pam_ssh ignore unpassphrased keys unless the "nullok" option is specified. [11:09] Add sanity checking of service names in pam_start. [11:10] Approved by: so (cperciva) Approved by: re (bz) Security: FreeBSD-SA-11:06.bind Security: FreeBSD-SA-11:07.chroot Security: FreeBSD-SA-11:08.telnetd Security: FreeBSD-SA-11:09.pam_ssh Security: FreeBSD-SA-11:10.pam Added: head/lib/libc/gen/libc_dlopen.c (contents, props changed) Modified: head/contrib/telnet/libtelnet/encrypt.c head/crypto/heimdal/appl/telnet/libtelnet/encrypt.c head/include/unistd.h head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libc/iconv/citrus_module.c head/lib/libc/include/libc_private.h head/lib/libc/net/nsdispatch.c head/libexec/ftpd/ftpd.c head/libexec/ftpd/popen.c Changes in other areas also in this revision: Added: releng/7.3/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/7.4/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/8.1/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/8.2/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/9.0/lib/libc/gen/libc_dlopen.c (contents, props changed) stable/7/lib/libc/gen/libc_dlopen.c (contents, props changed) stable/8/lib/libc/gen/libc_dlopen.c (contents, props changed) stable/9/lib/libc/gen/libc_dlopen.c (contents, props changed) Modified: releng/7.3/UPDATING releng/7.3/contrib/bind9/bin/named/query.c releng/7.3/contrib/bind9/lib/dns/rbtdb.c releng/7.3/contrib/openpam/lib/openpam_configure.c releng/7.3/contrib/telnet/libtelnet/encrypt.c releng/7.3/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/7.3/include/unistd.h releng/7.3/lib/libc/Versions.def releng/7.3/lib/libc/gen/Makefile.inc releng/7.3/lib/libc/gen/Symbol.map releng/7.3/lib/libc/include/libc_private.h releng/7.3/lib/libc/net/nsdispatch.c releng/7.3/lib/libpam/modules/pam_ssh/pam_ssh.c releng/7.3/libexec/ftpd/ftpd.c releng/7.3/libexec/ftpd/popen.c releng/7.3/sys/conf/newvers.sh releng/7.4/UPDATING releng/7.4/contrib/bind9/bin/named/query.c releng/7.4/contrib/bind9/lib/dns/rbtdb.c releng/7.4/contrib/openpam/lib/openpam_configure.c releng/7.4/contrib/telnet/libtelnet/encrypt.c releng/7.4/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/7.4/include/unistd.h releng/7.4/lib/libc/Versions.def releng/7.4/lib/libc/gen/Makefile.inc releng/7.4/lib/libc/gen/Symbol.map releng/7.4/lib/libc/include/libc_private.h releng/7.4/lib/libc/net/nsdispatch.c releng/7.4/lib/libpam/modules/pam_ssh/pam_ssh.c releng/7.4/libexec/ftpd/ftpd.c releng/7.4/libexec/ftpd/popen.c releng/7.4/sys/conf/newvers.sh releng/8.1/UPDATING releng/8.1/contrib/bind9/bin/named/query.c releng/8.1/contrib/bind9/lib/dns/rbtdb.c releng/8.1/contrib/openpam/lib/openpam_configure.c releng/8.1/contrib/telnet/libtelnet/encrypt.c releng/8.1/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/8.1/include/unistd.h releng/8.1/lib/libc/Versions.def releng/8.1/lib/libc/gen/Makefile.inc releng/8.1/lib/libc/gen/Symbol.map releng/8.1/lib/libc/include/libc_private.h releng/8.1/lib/libc/net/nsdispatch.c releng/8.1/lib/libpam/modules/pam_ssh/pam_ssh.c releng/8.1/libexec/ftpd/ftpd.c releng/8.1/libexec/ftpd/popen.c releng/8.1/sys/conf/newvers.sh releng/8.2/UPDATING releng/8.2/contrib/bind9/bin/named/query.c releng/8.2/contrib/bind9/lib/dns/rbtdb.c releng/8.2/contrib/openpam/lib/openpam_configure.c releng/8.2/contrib/telnet/libtelnet/encrypt.c releng/8.2/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/8.2/include/unistd.h releng/8.2/lib/libc/Versions.def releng/8.2/lib/libc/gen/Makefile.inc releng/8.2/lib/libc/gen/Symbol.map releng/8.2/lib/libc/include/libc_private.h releng/8.2/lib/libc/net/nsdispatch.c releng/8.2/lib/libpam/modules/pam_ssh/pam_ssh.c releng/8.2/libexec/ftpd/ftpd.c releng/8.2/libexec/ftpd/popen.c releng/8.2/sys/conf/newvers.sh releng/9.0/contrib/telnet/libtelnet/encrypt.c releng/9.0/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/9.0/include/unistd.h releng/9.0/lib/libc/Versions.def releng/9.0/lib/libc/gen/Makefile.inc releng/9.0/lib/libc/gen/Symbol.map releng/9.0/lib/libc/iconv/citrus_module.c releng/9.0/lib/libc/include/libc_private.h releng/9.0/lib/libc/net/nsdispatch.c releng/9.0/libexec/ftpd/ftpd.c releng/9.0/libexec/ftpd/popen.c stable/7/contrib/telnet/libtelnet/encrypt.c stable/7/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/7/include/unistd.h stable/7/lib/libc/Versions.def stable/7/lib/libc/gen/Makefile.inc stable/7/lib/libc/gen/Symbol.map stable/7/lib/libc/include/libc_private.h stable/7/lib/libc/net/nsdispatch.c stable/7/libexec/ftpd/ftpd.c stable/7/libexec/ftpd/popen.c stable/8/contrib/telnet/libtelnet/encrypt.c stable/8/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/8/include/unistd.h stable/8/lib/libc/Versions.def stable/8/lib/libc/gen/Makefile.inc stable/8/lib/libc/gen/Symbol.map stable/8/lib/libc/include/libc_private.h stable/8/lib/libc/net/nsdispatch.c stable/8/libexec/ftpd/ftpd.c stable/8/libexec/ftpd/popen.c stable/9/contrib/telnet/libtelnet/encrypt.c stable/9/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/9/include/unistd.h stable/9/lib/libc/Versions.def stable/9/lib/libc/gen/Makefile.inc stable/9/lib/libc/gen/Symbol.map stable/9/lib/libc/iconv/citrus_module.c stable/9/lib/libc/include/libc_private.h stable/9/lib/libc/net/nsdispatch.c stable/9/libexec/ftpd/ftpd.c stable/9/libexec/ftpd/popen.c Modified: head/contrib/telnet/libtelnet/encrypt.c ============================================================================== --- head/contrib/telnet/libtelnet/encrypt.c Fri Dec 23 14:39:30 2011 (r228842) +++ head/contrib/telnet/libtelnet/encrypt.c Fri Dec 23 15:00:37 2011 (r228843) @@ -721,6 +721,9 @@ encrypt_keyid(struct key_info *kp, unsig int dir = kp->dir; int ret = 0; + if (len > MAXKEYLEN) + len = MAXKEYLEN; + if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (len == 0) return; Modified: head/crypto/heimdal/appl/telnet/libtelnet/encrypt.c ============================================================================== --- head/crypto/heimdal/appl/telnet/libtelnet/encrypt.c Fri Dec 23 14:39:30 2011 (r228842) +++ head/crypto/heimdal/appl/telnet/libtelnet/encrypt.c Fri Dec 23 15:00:37 2011 (r228843) @@ -736,6 +736,9 @@ encrypt_keyid(struct key_info *kp, unsig int dir = kp->dir; int ret = 0; + if (len > MAXKEYLEN) + len = MAXKEYLEN; + if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (len == 0) return; Modified: head/include/unistd.h ============================================================================== --- head/include/unistd.h Fri Dec 23 14:39:30 2011 (r228842) +++ head/include/unistd.h Fri Dec 23 15:00:37 2011 (r228843) @@ -511,6 +511,7 @@ int initgroups(const char *, gid_t); int iruserok(unsigned long, int, const char *, const char *); int iruserok_sa(const void *, int, int, const char *, const char *); int issetugid(void); +void __FreeBSD_libc_enter_restricted_mode(void); long lpathconf(const char *, int); #ifndef _MKDTEMP_DECLARED char *mkdtemp(char *); Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Fri Dec 23 14:39:30 2011 (r228842) +++ head/lib/libc/gen/Makefile.inc Fri Dec 23 15:00:37 2011 (r228843) @@ -20,6 +20,7 @@ SRCS+= __getosreldate.c __xuname.c \ getpeereid.c getprogname.c getpwent.c getttyent.c \ getusershell.c getutxent.c getvfsbyname.c glob.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ + libc_dlopen.c \ lockf.c lrand48.c mrand48.c nftw.c nice.c \ nlist.c nrand48.c opendir.c \ pause.c pmadvise.c popen.c posix_spawn.c \ Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Fri Dec 23 14:39:30 2011 (r228842) +++ head/lib/libc/gen/Symbol.map Fri Dec 23 15:00:37 2011 (r228843) @@ -381,6 +381,10 @@ FBSD_1.2 { setutxent; }; +FBSD_1.3 { + __FreeBSD_libc_enter_restricted_mode; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; Added: head/lib/libc/gen/libc_dlopen.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/libc_dlopen.c Fri Dec 23 15:00:37 2011 (r228843) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2011 Xin Li + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include "libc_private.h" + +/* + * Whether we want to restrict dlopen()s. + */ +static int __libc_restricted_mode = 0; + +void * +libc_dlopen(const char *path, int mode) +{ + + if (__libc_restricted_mode) { + _rtld_error("Service unavailable -- libc in restricted mode"); + return (NULL); + } else + return (dlopen(path, mode)); +} + +void +__FreeBSD_libc_enter_restricted_mode(void) +{ + + __libc_restricted_mode = 1; + return; +} + Modified: head/lib/libc/iconv/citrus_module.c ============================================================================== --- head/lib/libc/iconv/citrus_module.c Fri Dec 23 14:39:30 2011 (r228842) +++ head/lib/libc/iconv/citrus_module.c Fri Dec 23 15:00:37 2011 (r228843) @@ -109,6 +109,7 @@ #include "citrus_namespace.h" #include "citrus_bcs.h" #include "citrus_module.h" +#include "libc_private.h" static int _getdewey(int[], char *); static int _cmpndewey(int[], int, int[], int); @@ -294,7 +295,7 @@ _citrus_load_module(_citrus_module_t *rh p = _findshlib(path, &maj, &min); if (!p) return (EINVAL); - handle = dlopen(p, RTLD_LAZY); + handle = libc_dlopen(p, RTLD_LAZY); if (!handle) { printf("%s", dlerror()); return (EINVAL); Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Fri Dec 23 14:39:30 2011 (r228842) +++ head/lib/libc/include/libc_private.h Fri Dec 23 15:00:37 2011 (r228843) @@ -44,6 +44,17 @@ extern int __isthreaded; /* + * libc should use libc_dlopen internally, which respects a global + * flag where loading of new shared objects can be restricted. + */ +void *libc_dlopen(const char *, int); + +/* + * For dynamic linker. + */ +void _rtld_error(const char *fmt, ...); + +/* * File lock contention is difficult to diagnose without knowing * where locks were set. Allow a debug library to be built which * records the source file and line number of each lock call. Modified: head/lib/libc/net/nsdispatch.c ============================================================================== --- head/lib/libc/net/nsdispatch.c Fri Dec 23 14:39:30 2011 (r228842) +++ head/lib/libc/net/nsdispatch.c Fri Dec 23 15:00:37 2011 (r228843) @@ -384,7 +384,7 @@ nss_configure(void) confmod = statbuf.st_mtime; #ifdef NS_CACHING - handle = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); + handle = libc_dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); if (handle != NULL) { nss_cache_cycle_prevention_func = dlsym(handle, "_nss_cache_cycle_prevention_function"); @@ -497,7 +497,7 @@ nss_load_module(const char *source, nss_ if (snprintf(buf, sizeof(buf), "nss_%s.so.%d", mod.name, NSS_MODULE_INTERFACE_VERSION) >= (int)sizeof(buf)) goto fin; - mod.handle = dlopen(buf, RTLD_LOCAL|RTLD_LAZY); + mod.handle = libc_dlopen(buf, RTLD_LOCAL|RTLD_LAZY); if (mod.handle == NULL) { #ifdef _NSS_DEBUG /* This gets pretty annoying since the built-in Modified: head/libexec/ftpd/ftpd.c ============================================================================== --- head/libexec/ftpd/ftpd.c Fri Dec 23 14:39:30 2011 (r228842) +++ head/libexec/ftpd/ftpd.c Fri Dec 23 15:00:37 2011 (r228843) @@ -1562,6 +1562,7 @@ skip: reply(550, "Can't change root."); goto bad; } + __FreeBSD_libc_enter_restricted_mode(); } else /* real user w/o chroot */ homedir = pw->pw_dir; /* Modified: head/libexec/ftpd/popen.c ============================================================================== --- head/libexec/ftpd/popen.c Fri Dec 23 14:39:30 2011 (r228842) +++ head/libexec/ftpd/popen.c Fri Dec 23 15:00:37 2011 (r228843) @@ -143,6 +143,9 @@ ftpd_popen(char *program, char *type) } (void)close(pdes[1]); } + /* Drop privileges before proceeding */ + if (getuid() != geteuid() && setuid(geteuid()) < 0) + _exit(1); if (strcmp(gargv[0], _PATH_LS) == 0) { /* Reset getopt for ls_main() */ optreset = optind = optopt = 1; From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 15:00:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68718106571C; Fri, 23 Dec 2011 15:00:39 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52A498FC16; Fri, 23 Dec 2011 15:00:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNF0dw6071776; Fri, 23 Dec 2011 15:00:39 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNF0ccj071728; Fri, 23 Dec 2011 15:00:38 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201112231500.pBNF0ccj071728@svn.freebsd.org> From: Colin Percival Date: Fri, 23 Dec 2011 15:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 15:00:39 -0000 Author: cperciva Date: Fri Dec 23 15:00:37 2011 New Revision: 228843 URL: http://svn.freebsd.org/changeset/base/228843 Log: Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06] Add an API for alerting internal libc routines to the presence of "unsafe" paths post-chroot, and use it in ftpd. [11:07] Fix a buffer overflow in telnetd. [11:08] Make pam_ssh ignore unpassphrased keys unless the "nullok" option is specified. [11:09] Add sanity checking of service names in pam_start. [11:10] Approved by: so (cperciva) Approved by: re (bz) Security: FreeBSD-SA-11:06.bind Security: FreeBSD-SA-11:07.chroot Security: FreeBSD-SA-11:08.telnetd Security: FreeBSD-SA-11:09.pam_ssh Security: FreeBSD-SA-11:10.pam Added: releng/7.3/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/7.4/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/8.1/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/8.2/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/9.0/lib/libc/gen/libc_dlopen.c (contents, props changed) Modified: releng/7.3/UPDATING releng/7.3/contrib/bind9/bin/named/query.c releng/7.3/contrib/bind9/lib/dns/rbtdb.c releng/7.3/contrib/openpam/lib/openpam_configure.c releng/7.3/contrib/telnet/libtelnet/encrypt.c releng/7.3/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/7.3/include/unistd.h releng/7.3/lib/libc/Versions.def releng/7.3/lib/libc/gen/Makefile.inc releng/7.3/lib/libc/gen/Symbol.map releng/7.3/lib/libc/include/libc_private.h releng/7.3/lib/libc/net/nsdispatch.c releng/7.3/lib/libpam/modules/pam_ssh/pam_ssh.c releng/7.3/libexec/ftpd/ftpd.c releng/7.3/libexec/ftpd/popen.c releng/7.3/sys/conf/newvers.sh releng/7.4/UPDATING releng/7.4/contrib/bind9/bin/named/query.c releng/7.4/contrib/bind9/lib/dns/rbtdb.c releng/7.4/contrib/openpam/lib/openpam_configure.c releng/7.4/contrib/telnet/libtelnet/encrypt.c releng/7.4/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/7.4/include/unistd.h releng/7.4/lib/libc/Versions.def releng/7.4/lib/libc/gen/Makefile.inc releng/7.4/lib/libc/gen/Symbol.map releng/7.4/lib/libc/include/libc_private.h releng/7.4/lib/libc/net/nsdispatch.c releng/7.4/lib/libpam/modules/pam_ssh/pam_ssh.c releng/7.4/libexec/ftpd/ftpd.c releng/7.4/libexec/ftpd/popen.c releng/7.4/sys/conf/newvers.sh releng/8.1/UPDATING releng/8.1/contrib/bind9/bin/named/query.c releng/8.1/contrib/bind9/lib/dns/rbtdb.c releng/8.1/contrib/openpam/lib/openpam_configure.c releng/8.1/contrib/telnet/libtelnet/encrypt.c releng/8.1/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/8.1/include/unistd.h releng/8.1/lib/libc/Versions.def releng/8.1/lib/libc/gen/Makefile.inc releng/8.1/lib/libc/gen/Symbol.map releng/8.1/lib/libc/include/libc_private.h releng/8.1/lib/libc/net/nsdispatch.c releng/8.1/lib/libpam/modules/pam_ssh/pam_ssh.c releng/8.1/libexec/ftpd/ftpd.c releng/8.1/libexec/ftpd/popen.c releng/8.1/sys/conf/newvers.sh releng/8.2/UPDATING releng/8.2/contrib/bind9/bin/named/query.c releng/8.2/contrib/bind9/lib/dns/rbtdb.c releng/8.2/contrib/openpam/lib/openpam_configure.c releng/8.2/contrib/telnet/libtelnet/encrypt.c releng/8.2/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/8.2/include/unistd.h releng/8.2/lib/libc/Versions.def releng/8.2/lib/libc/gen/Makefile.inc releng/8.2/lib/libc/gen/Symbol.map releng/8.2/lib/libc/include/libc_private.h releng/8.2/lib/libc/net/nsdispatch.c releng/8.2/lib/libpam/modules/pam_ssh/pam_ssh.c releng/8.2/libexec/ftpd/ftpd.c releng/8.2/libexec/ftpd/popen.c releng/8.2/sys/conf/newvers.sh releng/9.0/contrib/telnet/libtelnet/encrypt.c releng/9.0/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/9.0/include/unistd.h releng/9.0/lib/libc/Versions.def releng/9.0/lib/libc/gen/Makefile.inc releng/9.0/lib/libc/gen/Symbol.map releng/9.0/lib/libc/iconv/citrus_module.c releng/9.0/lib/libc/include/libc_private.h releng/9.0/lib/libc/net/nsdispatch.c releng/9.0/libexec/ftpd/ftpd.c releng/9.0/libexec/ftpd/popen.c Changes in other areas also in this revision: Added: head/lib/libc/gen/libc_dlopen.c (contents, props changed) stable/7/lib/libc/gen/libc_dlopen.c (contents, props changed) stable/8/lib/libc/gen/libc_dlopen.c (contents, props changed) stable/9/lib/libc/gen/libc_dlopen.c (contents, props changed) Modified: head/contrib/telnet/libtelnet/encrypt.c head/crypto/heimdal/appl/telnet/libtelnet/encrypt.c head/include/unistd.h head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libc/iconv/citrus_module.c head/lib/libc/include/libc_private.h head/lib/libc/net/nsdispatch.c head/libexec/ftpd/ftpd.c head/libexec/ftpd/popen.c stable/7/contrib/telnet/libtelnet/encrypt.c stable/7/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/7/include/unistd.h stable/7/lib/libc/Versions.def stable/7/lib/libc/gen/Makefile.inc stable/7/lib/libc/gen/Symbol.map stable/7/lib/libc/include/libc_private.h stable/7/lib/libc/net/nsdispatch.c stable/7/libexec/ftpd/ftpd.c stable/7/libexec/ftpd/popen.c stable/8/contrib/telnet/libtelnet/encrypt.c stable/8/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/8/include/unistd.h stable/8/lib/libc/Versions.def stable/8/lib/libc/gen/Makefile.inc stable/8/lib/libc/gen/Symbol.map stable/8/lib/libc/include/libc_private.h stable/8/lib/libc/net/nsdispatch.c stable/8/libexec/ftpd/ftpd.c stable/8/libexec/ftpd/popen.c stable/9/contrib/telnet/libtelnet/encrypt.c stable/9/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/9/include/unistd.h stable/9/lib/libc/Versions.def stable/9/lib/libc/gen/Makefile.inc stable/9/lib/libc/gen/Symbol.map stable/9/lib/libc/iconv/citrus_module.c stable/9/lib/libc/include/libc_private.h stable/9/lib/libc/net/nsdispatch.c stable/9/libexec/ftpd/ftpd.c stable/9/libexec/ftpd/popen.c Modified: releng/7.3/UPDATING ============================================================================== --- releng/7.3/UPDATING Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/UPDATING Fri Dec 23 15:00:37 2011 (r228843) @@ -8,6 +8,22 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20111223: p9 FreeBSD-SA-11:06.bind, FreeBSD-SA-11:07.chroot + FreeBSD-SA-11:08.telnetd, FreeBSD-SA-11:09.pam_ssh + FreeBSD-SA-11:10.pam + Fix a problem whereby a corrupt DNS record can cause named to crash. + [11:06] + + Add an API for alerting internal libc routines to the presence of + "unsafe" paths post-chroot, and use it in ftpd. [11:07] + + Fix a buffer overflow in telnetd. [11:08] + + Make pam_ssh ignore unpassphrased keys unless the "nullok" option is + specified. [11:09] + + Add sanity checking of service names in pam_start. [11:10] + 20111004: p8 FreeBSD-SA-11:05.unix (revised) Fix a bug in UNIX socket handling in the linux emulator which was exposed by the security fix in FreeBSD-SA-11:05.unix. Modified: releng/7.3/contrib/bind9/bin/named/query.c ============================================================================== --- releng/7.3/contrib/bind9/bin/named/query.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/contrib/bind9/bin/named/query.c Fri Dec 23 15:00:37 2011 (r228843) @@ -1250,11 +1250,9 @@ query_addadditional(void *arg, dns_name_ goto addname; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - /* - * Negative cache entries don't have sigrdatasets. - */ - INSIST(sigrdataset == NULL || - ! dns_rdataset_isassociated(sigrdataset)); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { mname = NULL; @@ -1295,8 +1293,9 @@ query_addadditional(void *arg, dns_name_ goto addname; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - INSIST(sigrdataset == NULL || - ! dns_rdataset_isassociated(sigrdataset)); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { mname = NULL; @@ -1744,10 +1743,8 @@ query_addadditional2(void *arg, dns_name goto setcache; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - /* - * Negative cache entries don't have sigrdatasets. - */ - INSIST(! dns_rdataset_isassociated(sigrdataset)); + if (dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { /* Remember the result as a cache */ Modified: releng/7.3/contrib/bind9/lib/dns/rbtdb.c ============================================================================== --- releng/7.3/contrib/bind9/lib/dns/rbtdb.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/contrib/bind9/lib/dns/rbtdb.c Fri Dec 23 15:00:37 2011 (r228843) @@ -244,6 +244,7 @@ typedef struct rdatasetheader { #define RDATASET_ATTR_IGNORE 0x0004 #define RDATASET_ATTR_RETAIN 0x0008 #define RDATASET_ATTR_NXDOMAIN 0x0010 +#define RDATASET_ATTR_NEGATIVE 0x0100 typedef struct acache_cbarg { dns_rdatasetadditional_t type; @@ -278,6 +279,8 @@ struct acachectl { (((header)->attributes & RDATASET_ATTR_RETAIN) != 0) #define NXDOMAIN(header) \ (((header)->attributes & RDATASET_ATTR_NXDOMAIN) != 0) +#define NEGATIVE(header) \ + (((header)->attributes & RDATASET_ATTR_NEGATIVE) != 0) #define DEFAULT_NODE_LOCK_COUNT 7 /*%< Should be prime. */ #define DEFAULT_CACHE_NODE_LOCK_COUNT 1009 /*%< Should be prime. */ @@ -3656,7 +3659,7 @@ cache_find(dns_db_t *db, dns_name_t *nam result == DNS_R_NCACHENXRRSET) { bind_rdataset(search.rbtdb, node, found, search.now, rdataset); - if (foundsig != NULL) + if (!NEGATIVE(found) && foundsig != NULL) bind_rdataset(search.rbtdb, node, foundsig, search.now, sigrdataset); } @@ -4242,7 +4245,7 @@ cache_findrdataset(dns_db_t *db, dns_dbn } if (found != NULL) { bind_rdataset(rbtdb, rbtnode, found, now, rdataset); - if (foundsig != NULL) + if (!NEGATIVE(found) && foundsig != NULL) bind_rdataset(rbtdb, rbtnode, foundsig, now, sigrdataset); } Modified: releng/7.3/contrib/openpam/lib/openpam_configure.c ============================================================================== --- releng/7.3/contrib/openpam/lib/openpam_configure.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/contrib/openpam/lib/openpam_configure.c Fri Dec 23 15:00:37 2011 (r228843) @@ -285,6 +285,13 @@ openpam_load_chain(pam_handle_t *pamh, size_t len; int r; + /* don't allow to escape from policy_path */ + if (strchr(service, '/')) { + openpam_log(PAM_LOG_ERROR, "invalid service name: %s", + service); + return (-PAM_SYSTEM_ERR); + } + for (path = openpam_policy_path; *path != NULL; ++path) { len = strlen(*path); if ((*path)[len - 1] == '/') { Modified: releng/7.3/contrib/telnet/libtelnet/encrypt.c ============================================================================== --- releng/7.3/contrib/telnet/libtelnet/encrypt.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/contrib/telnet/libtelnet/encrypt.c Fri Dec 23 15:00:37 2011 (r228843) @@ -721,6 +721,9 @@ encrypt_keyid(struct key_info *kp, unsig int dir = kp->dir; int ret = 0; + if (len > MAXKEYLEN) + len = MAXKEYLEN; + if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (len == 0) return; Modified: releng/7.3/crypto/heimdal/appl/telnet/libtelnet/encrypt.c ============================================================================== --- releng/7.3/crypto/heimdal/appl/telnet/libtelnet/encrypt.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/crypto/heimdal/appl/telnet/libtelnet/encrypt.c Fri Dec 23 15:00:37 2011 (r228843) @@ -736,6 +736,9 @@ encrypt_keyid(struct key_info *kp, unsig int dir = kp->dir; int ret = 0; + if (len > MAXKEYLEN) + len = MAXKEYLEN; + if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (len == 0) return; Modified: releng/7.3/include/unistd.h ============================================================================== --- releng/7.3/include/unistd.h Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/include/unistd.h Fri Dec 23 15:00:37 2011 (r228843) @@ -494,6 +494,7 @@ int initgroups(const char *, gid_t); int iruserok(unsigned long, int, const char *, const char *); int iruserok_sa(const void *, int, int, const char *, const char *); int issetugid(void); +void __FreeBSD_libc_enter_restricted_mode(void); char *mkdtemp(char *); #ifndef _MKNOD_DECLARED int mknod(const char *, mode_t, dev_t); Modified: releng/7.3/lib/libc/Versions.def ============================================================================== --- releng/7.3/lib/libc/Versions.def Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/lib/libc/Versions.def Fri Dec 23 15:00:37 2011 (r228843) @@ -20,9 +20,13 @@ FBSD_1.1 { FBSD_1.2 { } FBSD_1.1; +# This version was first added to 10.0-current. +FBSD_1.3 { +} FBSD_1.2; + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries # are listed here. We use a separate namespace so we can write # simple ABI-checking tools. FBSDprivate_1.0 { -} FBSD_1.2; +} FBSD_1.3; Modified: releng/7.3/lib/libc/gen/Makefile.inc ============================================================================== --- releng/7.3/lib/libc/gen/Makefile.inc Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/lib/libc/gen/Makefile.inc Fri Dec 23 15:00:37 2011 (r228843) @@ -20,6 +20,7 @@ SRCS+= __getosreldate.c __xuname.c \ getpeereid.c getprogname.c getpwent.c getttyent.c \ getusershell.c getvfsbyname.c glob.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ + libc_dlopen.c \ lockf.c lrand48.c mrand48.c nftw.c nice.c \ nlist.c nrand48.c opendir.c \ pause.c pmadvise.c popen.c posixshm.c pselect.c \ Modified: releng/7.3/lib/libc/gen/Symbol.map ============================================================================== --- releng/7.3/lib/libc/gen/Symbol.map Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/lib/libc/gen/Symbol.map Fri Dec 23 15:00:37 2011 (r228843) @@ -345,6 +345,10 @@ FBSD_1.2 { getpagesizes; }; +FBSD_1.3 { + __FreeBSD_libc_enter_restricted_mode; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; Added: releng/7.3/lib/libc/gen/libc_dlopen.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/7.3/lib/libc/gen/libc_dlopen.c Fri Dec 23 15:00:37 2011 (r228843) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2011 Xin Li + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include "libc_private.h" + +/* + * Whether we want to restrict dlopen()s. + */ +static int __libc_restricted_mode = 0; + +void * +libc_dlopen(const char *path, int mode) +{ + + if (__libc_restricted_mode) { + _rtld_error("Service unavailable -- libc in restricted mode"); + return (NULL); + } else + return (dlopen(path, mode)); +} + +void +__FreeBSD_libc_enter_restricted_mode(void) +{ + + __libc_restricted_mode = 1; + return; +} + Modified: releng/7.3/lib/libc/include/libc_private.h ============================================================================== --- releng/7.3/lib/libc/include/libc_private.h Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/lib/libc/include/libc_private.h Fri Dec 23 15:00:37 2011 (r228843) @@ -44,6 +44,17 @@ extern int __isthreaded; /* + * libc should use libc_dlopen internally, which respects a global + * flag where loading of new shared objects can be restricted. + */ +void *libc_dlopen(const char *, int); + +/* + * For dynamic linker. + */ +void _rtld_error(const char *fmt, ...); + +/* * File lock contention is difficult to diagnose without knowing * where locks were set. Allow a debug library to be built which * records the source file and line number of each lock call. Modified: releng/7.3/lib/libc/net/nsdispatch.c ============================================================================== --- releng/7.3/lib/libc/net/nsdispatch.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/lib/libc/net/nsdispatch.c Fri Dec 23 15:00:37 2011 (r228843) @@ -369,7 +369,7 @@ nss_configure(void) confmod = statbuf.st_mtime; #ifdef NS_CACHING - handle = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); + handle = libc_dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); if (handle != NULL) { nss_cache_cycle_prevention_func = dlsym(handle, "_nss_cache_cycle_prevention_function"); @@ -482,7 +482,7 @@ nss_load_module(const char *source, nss_ if (snprintf(buf, sizeof(buf), "nss_%s.so.%d", mod.name, NSS_MODULE_INTERFACE_VERSION) >= (int)sizeof(buf)) goto fin; - mod.handle = dlopen(buf, RTLD_LOCAL|RTLD_LAZY); + mod.handle = libc_dlopen(buf, RTLD_LOCAL|RTLD_LAZY); if (mod.handle == NULL) { #ifdef _NSS_DEBUG /* This gets pretty annoying since the built-in Modified: releng/7.3/lib/libpam/modules/pam_ssh/pam_ssh.c ============================================================================== --- releng/7.3/lib/libpam/modules/pam_ssh/pam_ssh.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/lib/libpam/modules/pam_ssh/pam_ssh.c Fri Dec 23 15:00:37 2011 (r228843) @@ -88,7 +88,8 @@ static char *const pam_ssh_agent_envp[] * struct pam_ssh_key containing the key and its comment. */ static struct pam_ssh_key * -pam_ssh_load_key(const char *dir, const char *kfn, const char *passphrase) +pam_ssh_load_key(const char *dir, const char *kfn, const char *passphrase, + int nullok) { struct pam_ssh_key *psk; char fn[PATH_MAX]; @@ -98,7 +99,21 @@ pam_ssh_load_key(const char *dir, const if (snprintf(fn, sizeof(fn), "%s/%s", dir, kfn) > (int)sizeof(fn)) return (NULL); comment = NULL; - key = key_load_private(fn, passphrase, &comment); + /* + * If the key is unencrypted, OpenSSL ignores the passphrase, so + * it will seem like the user typed in the right one. This allows + * a user to circumvent nullok by providing a dummy passphrase. + * Verify that the key really *is* encrypted by trying to load it + * with an empty passphrase, and if the key is not encrypted, + * accept only an empty passphrase. + */ + key = key_load_private(fn, NULL, &comment); + if (key != NULL && !(*passphrase == '\0' && nullok)) { + key_free(key); + return (NULL); + } + if (key == NULL) + key = key_load_private(fn, passphrase, &comment); if (key == NULL) { openpam_log(PAM_LOG_DEBUG, "failed to load key from %s\n", fn); return (NULL); @@ -165,9 +180,6 @@ pam_sm_authenticate(pam_handle_t *pamh, if (pam_err != PAM_SUCCESS) return (pam_err); - if (*passphrase == '\0' && !nullok) - goto skip_keys; - /* switch to user credentials */ pam_err = openpam_borrow_cred(pamh, pwd); if (pam_err != PAM_SUCCESS) @@ -175,7 +187,7 @@ pam_sm_authenticate(pam_handle_t *pamh, /* try to load keys from all keyfiles we know of */ for (kfn = pam_ssh_keyfiles; *kfn != NULL; ++kfn) { - psk = pam_ssh_load_key(pwd->pw_dir, *kfn, passphrase); + psk = pam_ssh_load_key(pwd->pw_dir, *kfn, passphrase, nullok); if (psk != NULL) { pam_set_data(pamh, *kfn, psk, pam_ssh_free_key); ++nkeys; @@ -185,7 +197,6 @@ pam_sm_authenticate(pam_handle_t *pamh, /* switch back to arbitrator credentials */ openpam_restore_cred(pamh); - skip_keys: /* * If we tried an old token and didn't get anything, and * try_first_pass was specified, try again after prompting the Modified: releng/7.3/libexec/ftpd/ftpd.c ============================================================================== --- releng/7.3/libexec/ftpd/ftpd.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/libexec/ftpd/ftpd.c Fri Dec 23 15:00:37 2011 (r228843) @@ -1546,6 +1546,7 @@ skip: reply(550, "Can't change root."); goto bad; } + __FreeBSD_libc_enter_restricted_mode(); } else /* real user w/o chroot */ homedir = pw->pw_dir; /* Modified: releng/7.3/libexec/ftpd/popen.c ============================================================================== --- releng/7.3/libexec/ftpd/popen.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/libexec/ftpd/popen.c Fri Dec 23 15:00:37 2011 (r228843) @@ -142,6 +142,9 @@ ftpd_popen(char *program, char *type) } (void)close(pdes[1]); } + /* Drop privileges before proceeding */ + if (getuid() != geteuid() && setuid(geteuid()) < 0) + _exit(1); if (strcmp(gargv[0], _PATH_LS) == 0) { /* Reset getopt for ls_main() */ optreset = optind = optopt = 1; Modified: releng/7.3/sys/conf/newvers.sh ============================================================================== --- releng/7.3/sys/conf/newvers.sh Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.3/sys/conf/newvers.sh Fri Dec 23 15:00:37 2011 (r228843) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="7.3" -BRANCH="RELEASE-p8" +BRANCH="RELEASE-p9" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/7.4/UPDATING ============================================================================== --- releng/7.4/UPDATING Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/UPDATING Fri Dec 23 15:00:37 2011 (r228843) @@ -8,6 +8,22 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20111223: p5 FreeBSD-SA-11:06.bind, FreeBSD-SA-11:07.chroot + FreeBSD-SA-11:08.telnetd, FreeBSD-SA-11:09.pam_ssh + FreeBSD-SA-11:10.pam + Fix a problem whereby a corrupt DNS record can cause named to crash. + [11:06] + + Add an API for alerting internal libc routines to the presence of + "unsafe" paths post-chroot, and use it in ftpd. [11:07] + + Fix a buffer overflow in telnetd. [11:08] + + Make pam_ssh ignore unpassphrased keys unless the "nullok" option is + specified. [11:09] + + Add sanity checking of service names in pam_start. [11:10] + 20111004: p4 FreeBSD-SA-11:05.unix (revised) Fix a bug in UNIX socket handling in the linux emulator which was exposed by the security fix in FreeBSD-SA-11:05.unix. Modified: releng/7.4/contrib/bind9/bin/named/query.c ============================================================================== --- releng/7.4/contrib/bind9/bin/named/query.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/contrib/bind9/bin/named/query.c Fri Dec 23 15:00:37 2011 (r228843) @@ -1251,11 +1251,9 @@ query_addadditional(void *arg, dns_name_ goto addname; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - /* - * Negative cache entries don't have sigrdatasets. - */ - INSIST(sigrdataset == NULL || - ! dns_rdataset_isassociated(sigrdataset)); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { mname = NULL; @@ -1296,8 +1294,9 @@ query_addadditional(void *arg, dns_name_ goto addname; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - INSIST(sigrdataset == NULL || - ! dns_rdataset_isassociated(sigrdataset)); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { mname = NULL; @@ -1746,10 +1745,8 @@ query_addadditional2(void *arg, dns_name goto setcache; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - /* - * Negative cache entries don't have sigrdatasets. - */ - INSIST(! dns_rdataset_isassociated(sigrdataset)); + if (dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { /* Remember the result as a cache */ Modified: releng/7.4/contrib/bind9/lib/dns/rbtdb.c ============================================================================== --- releng/7.4/contrib/bind9/lib/dns/rbtdb.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/contrib/bind9/lib/dns/rbtdb.c Fri Dec 23 15:00:37 2011 (r228843) @@ -244,6 +244,7 @@ typedef struct rdatasetheader { #define RDATASET_ATTR_IGNORE 0x0004 #define RDATASET_ATTR_RETAIN 0x0008 #define RDATASET_ATTR_NXDOMAIN 0x0010 +#define RDATASET_ATTR_NEGATIVE 0x0100 typedef struct acache_cbarg { dns_rdatasetadditional_t type; @@ -278,6 +279,8 @@ struct acachectl { (((header)->attributes & RDATASET_ATTR_RETAIN) != 0) #define NXDOMAIN(header) \ (((header)->attributes & RDATASET_ATTR_NXDOMAIN) != 0) +#define NEGATIVE(header) \ + (((header)->attributes & RDATASET_ATTR_NEGATIVE) != 0) #define DEFAULT_NODE_LOCK_COUNT 7 /*%< Should be prime. */ #define DEFAULT_CACHE_NODE_LOCK_COUNT 1009 /*%< Should be prime. */ @@ -3662,7 +3665,7 @@ cache_find(dns_db_t *db, dns_name_t *nam result == DNS_R_NCACHENXRRSET) { bind_rdataset(search.rbtdb, node, found, search.now, rdataset); - if (foundsig != NULL) + if (!NEGATIVE(found) && foundsig != NULL) bind_rdataset(search.rbtdb, node, foundsig, search.now, sigrdataset); } @@ -4248,7 +4251,7 @@ cache_findrdataset(dns_db_t *db, dns_dbn } if (found != NULL) { bind_rdataset(rbtdb, rbtnode, found, now, rdataset); - if (foundsig != NULL) + if (!NEGATIVE(found) && foundsig != NULL) bind_rdataset(rbtdb, rbtnode, foundsig, now, sigrdataset); } Modified: releng/7.4/contrib/openpam/lib/openpam_configure.c ============================================================================== --- releng/7.4/contrib/openpam/lib/openpam_configure.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/contrib/openpam/lib/openpam_configure.c Fri Dec 23 15:00:37 2011 (r228843) @@ -285,6 +285,13 @@ openpam_load_chain(pam_handle_t *pamh, size_t len; int r; + /* don't allow to escape from policy_path */ + if (strchr(service, '/')) { + openpam_log(PAM_LOG_ERROR, "invalid service name: %s", + service); + return (-PAM_SYSTEM_ERR); + } + for (path = openpam_policy_path; *path != NULL; ++path) { len = strlen(*path); if ((*path)[len - 1] == '/') { Modified: releng/7.4/contrib/telnet/libtelnet/encrypt.c ============================================================================== --- releng/7.4/contrib/telnet/libtelnet/encrypt.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/contrib/telnet/libtelnet/encrypt.c Fri Dec 23 15:00:37 2011 (r228843) @@ -721,6 +721,9 @@ encrypt_keyid(struct key_info *kp, unsig int dir = kp->dir; int ret = 0; + if (len > MAXKEYLEN) + len = MAXKEYLEN; + if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (len == 0) return; Modified: releng/7.4/crypto/heimdal/appl/telnet/libtelnet/encrypt.c ============================================================================== --- releng/7.4/crypto/heimdal/appl/telnet/libtelnet/encrypt.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/crypto/heimdal/appl/telnet/libtelnet/encrypt.c Fri Dec 23 15:00:37 2011 (r228843) @@ -736,6 +736,9 @@ encrypt_keyid(struct key_info *kp, unsig int dir = kp->dir; int ret = 0; + if (len > MAXKEYLEN) + len = MAXKEYLEN; + if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (len == 0) return; Modified: releng/7.4/include/unistd.h ============================================================================== --- releng/7.4/include/unistd.h Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/include/unistd.h Fri Dec 23 15:00:37 2011 (r228843) @@ -494,6 +494,7 @@ int initgroups(const char *, gid_t); int iruserok(unsigned long, int, const char *, const char *); int iruserok_sa(const void *, int, int, const char *, const char *); int issetugid(void); +void __FreeBSD_libc_enter_restricted_mode(void); char *mkdtemp(char *); #ifndef _MKNOD_DECLARED int mknod(const char *, mode_t, dev_t); Modified: releng/7.4/lib/libc/Versions.def ============================================================================== --- releng/7.4/lib/libc/Versions.def Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/lib/libc/Versions.def Fri Dec 23 15:00:37 2011 (r228843) @@ -20,9 +20,13 @@ FBSD_1.1 { FBSD_1.2 { } FBSD_1.1; +# This version was first added to 10.0-current. +FBSD_1.3 { +} FBSD_1.2; + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries # are listed here. We use a separate namespace so we can write # simple ABI-checking tools. FBSDprivate_1.0 { -} FBSD_1.2; +} FBSD_1.3; Modified: releng/7.4/lib/libc/gen/Makefile.inc ============================================================================== --- releng/7.4/lib/libc/gen/Makefile.inc Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/lib/libc/gen/Makefile.inc Fri Dec 23 15:00:37 2011 (r228843) @@ -20,6 +20,7 @@ SRCS+= __getosreldate.c __xuname.c \ getpeereid.c getprogname.c getpwent.c getttyent.c \ getusershell.c getvfsbyname.c glob.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ + libc_dlopen.c \ lockf.c lrand48.c mrand48.c nftw.c nice.c \ nlist.c nrand48.c opendir.c \ pause.c pmadvise.c popen.c posixshm.c pselect.c \ Modified: releng/7.4/lib/libc/gen/Symbol.map ============================================================================== --- releng/7.4/lib/libc/gen/Symbol.map Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/lib/libc/gen/Symbol.map Fri Dec 23 15:00:37 2011 (r228843) @@ -345,6 +345,10 @@ FBSD_1.2 { getpagesizes; }; +FBSD_1.3 { + __FreeBSD_libc_enter_restricted_mode; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; Added: releng/7.4/lib/libc/gen/libc_dlopen.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/7.4/lib/libc/gen/libc_dlopen.c Fri Dec 23 15:00:37 2011 (r228843) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2011 Xin Li + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include "libc_private.h" + +/* + * Whether we want to restrict dlopen()s. + */ +static int __libc_restricted_mode = 0; + +void * +libc_dlopen(const char *path, int mode) +{ + + if (__libc_restricted_mode) { + _rtld_error("Service unavailable -- libc in restricted mode"); + return (NULL); + } else + return (dlopen(path, mode)); +} + +void +__FreeBSD_libc_enter_restricted_mode(void) +{ + + __libc_restricted_mode = 1; + return; +} + Modified: releng/7.4/lib/libc/include/libc_private.h ============================================================================== --- releng/7.4/lib/libc/include/libc_private.h Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/lib/libc/include/libc_private.h Fri Dec 23 15:00:37 2011 (r228843) @@ -44,6 +44,17 @@ extern int __isthreaded; /* + * libc should use libc_dlopen internally, which respects a global + * flag where loading of new shared objects can be restricted. + */ +void *libc_dlopen(const char *, int); + +/* + * For dynamic linker. + */ +void _rtld_error(const char *fmt, ...); + +/* * File lock contention is difficult to diagnose without knowing * where locks were set. Allow a debug library to be built which * records the source file and line number of each lock call. Modified: releng/7.4/lib/libc/net/nsdispatch.c ============================================================================== --- releng/7.4/lib/libc/net/nsdispatch.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/lib/libc/net/nsdispatch.c Fri Dec 23 15:00:37 2011 (r228843) @@ -369,7 +369,7 @@ nss_configure(void) confmod = statbuf.st_mtime; #ifdef NS_CACHING - handle = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); + handle = libc_dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); if (handle != NULL) { nss_cache_cycle_prevention_func = dlsym(handle, "_nss_cache_cycle_prevention_function"); @@ -482,7 +482,7 @@ nss_load_module(const char *source, nss_ if (snprintf(buf, sizeof(buf), "nss_%s.so.%d", mod.name, NSS_MODULE_INTERFACE_VERSION) >= (int)sizeof(buf)) goto fin; - mod.handle = dlopen(buf, RTLD_LOCAL|RTLD_LAZY); + mod.handle = libc_dlopen(buf, RTLD_LOCAL|RTLD_LAZY); if (mod.handle == NULL) { #ifdef _NSS_DEBUG /* This gets pretty annoying since the built-in Modified: releng/7.4/lib/libpam/modules/pam_ssh/pam_ssh.c ============================================================================== --- releng/7.4/lib/libpam/modules/pam_ssh/pam_ssh.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/lib/libpam/modules/pam_ssh/pam_ssh.c Fri Dec 23 15:00:37 2011 (r228843) @@ -88,7 +88,8 @@ static char *const pam_ssh_agent_envp[] * struct pam_ssh_key containing the key and its comment. */ static struct pam_ssh_key * -pam_ssh_load_key(const char *dir, const char *kfn, const char *passphrase) +pam_ssh_load_key(const char *dir, const char *kfn, const char *passphrase, + int nullok) { struct pam_ssh_key *psk; char fn[PATH_MAX]; @@ -98,7 +99,21 @@ pam_ssh_load_key(const char *dir, const if (snprintf(fn, sizeof(fn), "%s/%s", dir, kfn) > (int)sizeof(fn)) return (NULL); comment = NULL; - key = key_load_private(fn, passphrase, &comment); + /* + * If the key is unencrypted, OpenSSL ignores the passphrase, so + * it will seem like the user typed in the right one. This allows + * a user to circumvent nullok by providing a dummy passphrase. + * Verify that the key really *is* encrypted by trying to load it + * with an empty passphrase, and if the key is not encrypted, + * accept only an empty passphrase. + */ + key = key_load_private(fn, NULL, &comment); + if (key != NULL && !(*passphrase == '\0' && nullok)) { + key_free(key); + return (NULL); + } + if (key == NULL) + key = key_load_private(fn, passphrase, &comment); if (key == NULL) { openpam_log(PAM_LOG_DEBUG, "failed to load key from %s\n", fn); return (NULL); @@ -165,9 +180,6 @@ pam_sm_authenticate(pam_handle_t *pamh, if (pam_err != PAM_SUCCESS) return (pam_err); - if (*passphrase == '\0' && !nullok) - goto skip_keys; - /* switch to user credentials */ pam_err = openpam_borrow_cred(pamh, pwd); if (pam_err != PAM_SUCCESS) @@ -175,7 +187,7 @@ pam_sm_authenticate(pam_handle_t *pamh, /* try to load keys from all keyfiles we know of */ for (kfn = pam_ssh_keyfiles; *kfn != NULL; ++kfn) { - psk = pam_ssh_load_key(pwd->pw_dir, *kfn, passphrase); + psk = pam_ssh_load_key(pwd->pw_dir, *kfn, passphrase, nullok); if (psk != NULL) { pam_set_data(pamh, *kfn, psk, pam_ssh_free_key); ++nkeys; @@ -185,7 +197,6 @@ pam_sm_authenticate(pam_handle_t *pamh, /* switch back to arbitrator credentials */ openpam_restore_cred(pamh); - skip_keys: /* * If we tried an old token and didn't get anything, and * try_first_pass was specified, try again after prompting the Modified: releng/7.4/libexec/ftpd/ftpd.c ============================================================================== --- releng/7.4/libexec/ftpd/ftpd.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/libexec/ftpd/ftpd.c Fri Dec 23 15:00:37 2011 (r228843) @@ -1546,6 +1546,7 @@ skip: reply(550, "Can't change root."); goto bad; } + __FreeBSD_libc_enter_restricted_mode(); } else /* real user w/o chroot */ homedir = pw->pw_dir; /* Modified: releng/7.4/libexec/ftpd/popen.c ============================================================================== --- releng/7.4/libexec/ftpd/popen.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/libexec/ftpd/popen.c Fri Dec 23 15:00:37 2011 (r228843) @@ -143,6 +143,9 @@ ftpd_popen(char *program, char *type) } (void)close(pdes[1]); } + /* Drop privileges before proceeding */ + if (getuid() != geteuid() && setuid(geteuid()) < 0) + _exit(1); if (strcmp(gargv[0], _PATH_LS) == 0) { /* Reset getopt for ls_main() */ optreset = optind = optopt = 1; Modified: releng/7.4/sys/conf/newvers.sh ============================================================================== --- releng/7.4/sys/conf/newvers.sh Fri Dec 23 14:39:30 2011 (r228842) +++ releng/7.4/sys/conf/newvers.sh Fri Dec 23 15:00:37 2011 (r228843) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="7.4" -BRANCH="RELEASE-p4" +BRANCH="RELEASE-p5" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/8.1/UPDATING ============================================================================== --- releng/8.1/UPDATING Fri Dec 23 14:39:30 2011 (r228842) +++ releng/8.1/UPDATING Fri Dec 23 15:00:37 2011 (r228843) @@ -15,6 +15,22 @@ 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. +20111223: p7 FreeBSD-SA-11:06.bind, FreeBSD-SA-11:07.chroot + FreeBSD-SA-11:08.telnetd, FreeBSD-SA-11:09.pam_ssh + FreeBSD-SA-11:10.pam + Fix a problem whereby a corrupt DNS record can cause named to crash. + [11:06] + + Add an API for alerting internal libc routines to the presence of + "unsafe" paths post-chroot, and use it in ftpd. [11:07] + + Fix a buffer overflow in telnetd. [11:08] + + Make pam_ssh ignore unpassphrased keys unless the "nullok" option is + specified. [11:09] + + Add sanity checking of service names in pam_start. [11:10] + 20111004: p6 FreeBSD-SA-11:05.unix (revised) Fix a bug in UNIX socket handling in the linux emulator which was exposed by the security fix in FreeBSD-SA-11:05.unix. Modified: releng/8.1/contrib/bind9/bin/named/query.c ============================================================================== --- releng/8.1/contrib/bind9/bin/named/query.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/8.1/contrib/bind9/bin/named/query.c Fri Dec 23 15:00:37 2011 (r228843) @@ -1282,11 +1282,9 @@ query_addadditional(void *arg, dns_name_ goto addname; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - /* - * Negative cache entries don't have sigrdatasets. - */ - INSIST(sigrdataset == NULL || - ! dns_rdataset_isassociated(sigrdataset)); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { mname = NULL; @@ -1327,8 +1325,9 @@ query_addadditional(void *arg, dns_name_ goto addname; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - INSIST(sigrdataset == NULL || - ! dns_rdataset_isassociated(sigrdataset)); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { mname = NULL; @@ -1777,10 +1776,8 @@ query_addadditional2(void *arg, dns_name goto setcache; if (result == DNS_R_NCACHENXRRSET) { dns_rdataset_disassociate(rdataset); - /* - * Negative cache entries don't have sigrdatasets. - */ - INSIST(! dns_rdataset_isassociated(sigrdataset)); + if (dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); } if (result == ISC_R_SUCCESS) { /* Remember the result as a cache */ Modified: releng/8.1/contrib/bind9/lib/dns/rbtdb.c ============================================================================== --- releng/8.1/contrib/bind9/lib/dns/rbtdb.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/8.1/contrib/bind9/lib/dns/rbtdb.c Fri Dec 23 15:00:37 2011 (r228843) @@ -278,6 +278,7 @@ typedef ISC_LIST(dns_rbtnode_t) #define RDATASET_ATTR_RESIGN 0x0020 #define RDATASET_ATTR_STATCOUNT 0x0040 #define RDATASET_ATTR_OPTOUT 0x0080 +#define RDATASET_ATTR_NEGATIVE 0x0100 typedef struct acache_cbarg { dns_rdatasetadditional_t type; @@ -316,6 +317,8 @@ struct acachectl { (((header)->attributes & RDATASET_ATTR_RESIGN) != 0) #define OPTOUT(header) \ (((header)->attributes & RDATASET_ATTR_OPTOUT) != 0) +#define NEGATIVE(header) \ + (((header)->attributes & RDATASET_ATTR_NEGATIVE) != 0) #define DEFAULT_NODE_LOCK_COUNT 7 /*%< Should be prime. */ @@ -4618,7 +4621,7 @@ cache_find(dns_db_t *db, dns_name_t *nam rdataset); if (need_headerupdate(found, search.now)) update = found; - if (foundsig != NULL) { + if (!NEGATIVE(found) && foundsig != NULL) { bind_rdataset(search.rbtdb, node, foundsig, search.now, sigrdataset); if (need_headerupdate(foundsig, search.now)) @@ -5245,7 +5248,7 @@ cache_findrdataset(dns_db_t *db, dns_dbn } if (found != NULL) { bind_rdataset(rbtdb, rbtnode, found, now, rdataset); - if (foundsig != NULL) + if (!NEGATIVE(found) && foundsig != NULL) bind_rdataset(rbtdb, rbtnode, foundsig, now, sigrdataset); } Modified: releng/8.1/contrib/openpam/lib/openpam_configure.c ============================================================================== --- releng/8.1/contrib/openpam/lib/openpam_configure.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/8.1/contrib/openpam/lib/openpam_configure.c Fri Dec 23 15:00:37 2011 (r228843) @@ -285,6 +285,13 @@ openpam_load_chain(pam_handle_t *pamh, size_t len; int r; + /* don't allow to escape from policy_path */ + if (strchr(service, '/')) { + openpam_log(PAM_LOG_ERROR, "invalid service name: %s", + service); + return (-PAM_SYSTEM_ERR); + } + for (path = openpam_policy_path; *path != NULL; ++path) { len = strlen(*path); if ((*path)[len - 1] == '/') { Modified: releng/8.1/contrib/telnet/libtelnet/encrypt.c ============================================================================== --- releng/8.1/contrib/telnet/libtelnet/encrypt.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/8.1/contrib/telnet/libtelnet/encrypt.c Fri Dec 23 15:00:37 2011 (r228843) @@ -721,6 +721,9 @@ encrypt_keyid(struct key_info *kp, unsig int dir = kp->dir; int ret = 0; + if (len > MAXKEYLEN) + len = MAXKEYLEN; + if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (len == 0) return; Modified: releng/8.1/crypto/heimdal/appl/telnet/libtelnet/encrypt.c ============================================================================== --- releng/8.1/crypto/heimdal/appl/telnet/libtelnet/encrypt.c Fri Dec 23 14:39:30 2011 (r228842) +++ releng/8.1/crypto/heimdal/appl/telnet/libtelnet/encrypt.c Fri Dec 23 15:00:37 2011 (r228843) @@ -736,6 +736,9 @@ encrypt_keyid(struct key_info *kp, unsig int dir = kp->dir; int ret = 0; + if (len > MAXKEYLEN) + len = MAXKEYLEN; + if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (len == 0) return; Modified: releng/8.1/include/unistd.h ============================================================================== --- releng/8.1/include/unistd.h Fri Dec 23 14:39:30 2011 (r228842) +++ releng/8.1/include/unistd.h Fri Dec 23 15:00:37 2011 (r228843) @@ -513,6 +513,7 @@ int initgroups(const char *, gid_t); int iruserok(unsigned long, int, const char *, const char *); int iruserok_sa(const void *, int, int, const char *, const char *); int issetugid(void); +void __FreeBSD_libc_enter_restricted_mode(void); long lpathconf(const char *, int); #ifndef _MKDTEMP_DECLARED char *mkdtemp(char *); Modified: releng/8.1/lib/libc/Versions.def ============================================================================== --- releng/8.1/lib/libc/Versions.def Fri Dec 23 14:39:30 2011 (r228842) +++ releng/8.1/lib/libc/Versions.def Fri Dec 23 15:00:37 2011 (r228843) @@ -19,6 +19,10 @@ FBSD_1.1 { FBSD_1.2 { } FBSD_1.1; +# This version was first added to 10.0-current. +FBSD_1.3 { +} FBSD_1.2; + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries # are listed here. We use a separate namespace so we can write @@ -26,4 +30,4 @@ FBSD_1.2 { # # Please do NOT increment the version of this namespace. FBSDprivate_1.0 { -} FBSD_1.2; +} FBSD_1.3; Modified: releng/8.1/lib/libc/gen/Makefile.inc ============================================================================== --- releng/8.1/lib/libc/gen/Makefile.inc Fri Dec 23 14:39:30 2011 (r228842) +++ releng/8.1/lib/libc/gen/Makefile.inc Fri Dec 23 15:00:37 2011 (r228843) @@ -20,6 +20,7 @@ SRCS+= __getosreldate.c __xuname.c \ getpeereid.c getprogname.c getpwent.c getttyent.c \ getusershell.c getvfsbyname.c glob.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ + libc_dlopen.c \ lockf.c lrand48.c mrand48.c nftw.c nice.c \ nlist.c nrand48.c opendir.c \ pause.c pmadvise.c popen.c posix_spawn.c \ Modified: releng/8.1/lib/libc/gen/Symbol.map ============================================================================== --- releng/8.1/lib/libc/gen/Symbol.map Fri Dec 23 14:39:30 2011 (r228842) +++ releng/8.1/lib/libc/gen/Symbol.map Fri Dec 23 15:00:37 2011 (r228843) @@ -369,6 +369,10 @@ FBSD_1.2 { getpagesizes; }; +FBSD_1.3 { + __FreeBSD_libc_enter_restricted_mode; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; Added: releng/8.1/lib/libc/gen/libc_dlopen.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/8.1/lib/libc/gen/libc_dlopen.c Fri Dec 23 15:00:37 2011 (r228843) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2011 Xin Li + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 15:00:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A67F61065734; Fri, 23 Dec 2011 15:00:39 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 902CD8FC28; Fri, 23 Dec 2011 15:00:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNF0dY8071793; Fri, 23 Dec 2011 15:00:39 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNF0dLI071780; Fri, 23 Dec 2011 15:00:39 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201112231500.pBNF0dLI071780@svn.freebsd.org> From: Colin Percival Date: Fri, 23 Dec 2011 15:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 15:00:39 -0000 Author: cperciva Date: Fri Dec 23 15:00:37 2011 New Revision: 228843 URL: http://svn.freebsd.org/changeset/base/228843 Log: Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06] Add an API for alerting internal libc routines to the presence of "unsafe" paths post-chroot, and use it in ftpd. [11:07] Fix a buffer overflow in telnetd. [11:08] Make pam_ssh ignore unpassphrased keys unless the "nullok" option is specified. [11:09] Add sanity checking of service names in pam_start. [11:10] Approved by: so (cperciva) Approved by: re (bz) Security: FreeBSD-SA-11:06.bind Security: FreeBSD-SA-11:07.chroot Security: FreeBSD-SA-11:08.telnetd Security: FreeBSD-SA-11:09.pam_ssh Security: FreeBSD-SA-11:10.pam Added: stable/9/lib/libc/gen/libc_dlopen.c (contents, props changed) Modified: stable/9/contrib/telnet/libtelnet/encrypt.c stable/9/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/9/include/unistd.h stable/9/lib/libc/Versions.def stable/9/lib/libc/gen/Makefile.inc stable/9/lib/libc/gen/Symbol.map stable/9/lib/libc/iconv/citrus_module.c stable/9/lib/libc/include/libc_private.h stable/9/lib/libc/net/nsdispatch.c stable/9/libexec/ftpd/ftpd.c stable/9/libexec/ftpd/popen.c Changes in other areas also in this revision: Added: head/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/7.3/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/7.4/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/8.1/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/8.2/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/9.0/lib/libc/gen/libc_dlopen.c (contents, props changed) stable/7/lib/libc/gen/libc_dlopen.c (contents, props changed) stable/8/lib/libc/gen/libc_dlopen.c (contents, props changed) Modified: head/contrib/telnet/libtelnet/encrypt.c head/crypto/heimdal/appl/telnet/libtelnet/encrypt.c head/include/unistd.h head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libc/iconv/citrus_module.c head/lib/libc/include/libc_private.h head/lib/libc/net/nsdispatch.c head/libexec/ftpd/ftpd.c head/libexec/ftpd/popen.c releng/7.3/UPDATING releng/7.3/contrib/bind9/bin/named/query.c releng/7.3/contrib/bind9/lib/dns/rbtdb.c releng/7.3/contrib/openpam/lib/openpam_configure.c releng/7.3/contrib/telnet/libtelnet/encrypt.c releng/7.3/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/7.3/include/unistd.h releng/7.3/lib/libc/Versions.def releng/7.3/lib/libc/gen/Makefile.inc releng/7.3/lib/libc/gen/Symbol.map releng/7.3/lib/libc/include/libc_private.h releng/7.3/lib/libc/net/nsdispatch.c releng/7.3/lib/libpam/modules/pam_ssh/pam_ssh.c releng/7.3/libexec/ftpd/ftpd.c releng/7.3/libexec/ftpd/popen.c releng/7.3/sys/conf/newvers.sh releng/7.4/UPDATING releng/7.4/contrib/bind9/bin/named/query.c releng/7.4/contrib/bind9/lib/dns/rbtdb.c releng/7.4/contrib/openpam/lib/openpam_configure.c releng/7.4/contrib/telnet/libtelnet/encrypt.c releng/7.4/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/7.4/include/unistd.h releng/7.4/lib/libc/Versions.def releng/7.4/lib/libc/gen/Makefile.inc releng/7.4/lib/libc/gen/Symbol.map releng/7.4/lib/libc/include/libc_private.h releng/7.4/lib/libc/net/nsdispatch.c releng/7.4/lib/libpam/modules/pam_ssh/pam_ssh.c releng/7.4/libexec/ftpd/ftpd.c releng/7.4/libexec/ftpd/popen.c releng/7.4/sys/conf/newvers.sh releng/8.1/UPDATING releng/8.1/contrib/bind9/bin/named/query.c releng/8.1/contrib/bind9/lib/dns/rbtdb.c releng/8.1/contrib/openpam/lib/openpam_configure.c releng/8.1/contrib/telnet/libtelnet/encrypt.c releng/8.1/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/8.1/include/unistd.h releng/8.1/lib/libc/Versions.def releng/8.1/lib/libc/gen/Makefile.inc releng/8.1/lib/libc/gen/Symbol.map releng/8.1/lib/libc/include/libc_private.h releng/8.1/lib/libc/net/nsdispatch.c releng/8.1/lib/libpam/modules/pam_ssh/pam_ssh.c releng/8.1/libexec/ftpd/ftpd.c releng/8.1/libexec/ftpd/popen.c releng/8.1/sys/conf/newvers.sh releng/8.2/UPDATING releng/8.2/contrib/bind9/bin/named/query.c releng/8.2/contrib/bind9/lib/dns/rbtdb.c releng/8.2/contrib/openpam/lib/openpam_configure.c releng/8.2/contrib/telnet/libtelnet/encrypt.c releng/8.2/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/8.2/include/unistd.h releng/8.2/lib/libc/Versions.def releng/8.2/lib/libc/gen/Makefile.inc releng/8.2/lib/libc/gen/Symbol.map releng/8.2/lib/libc/include/libc_private.h releng/8.2/lib/libc/net/nsdispatch.c releng/8.2/lib/libpam/modules/pam_ssh/pam_ssh.c releng/8.2/libexec/ftpd/ftpd.c releng/8.2/libexec/ftpd/popen.c releng/8.2/sys/conf/newvers.sh releng/9.0/contrib/telnet/libtelnet/encrypt.c releng/9.0/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/9.0/include/unistd.h releng/9.0/lib/libc/Versions.def releng/9.0/lib/libc/gen/Makefile.inc releng/9.0/lib/libc/gen/Symbol.map releng/9.0/lib/libc/iconv/citrus_module.c releng/9.0/lib/libc/include/libc_private.h releng/9.0/lib/libc/net/nsdispatch.c releng/9.0/libexec/ftpd/ftpd.c releng/9.0/libexec/ftpd/popen.c stable/7/contrib/telnet/libtelnet/encrypt.c stable/7/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/7/include/unistd.h stable/7/lib/libc/Versions.def stable/7/lib/libc/gen/Makefile.inc stable/7/lib/libc/gen/Symbol.map stable/7/lib/libc/include/libc_private.h stable/7/lib/libc/net/nsdispatch.c stable/7/libexec/ftpd/ftpd.c stable/7/libexec/ftpd/popen.c stable/8/contrib/telnet/libtelnet/encrypt.c stable/8/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/8/include/unistd.h stable/8/lib/libc/Versions.def stable/8/lib/libc/gen/Makefile.inc stable/8/lib/libc/gen/Symbol.map stable/8/lib/libc/include/libc_private.h stable/8/lib/libc/net/nsdispatch.c stable/8/libexec/ftpd/ftpd.c stable/8/libexec/ftpd/popen.c Modified: stable/9/contrib/telnet/libtelnet/encrypt.c ============================================================================== --- stable/9/contrib/telnet/libtelnet/encrypt.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/9/contrib/telnet/libtelnet/encrypt.c Fri Dec 23 15:00:37 2011 (r228843) @@ -721,6 +721,9 @@ encrypt_keyid(struct key_info *kp, unsig int dir = kp->dir; int ret = 0; + if (len > MAXKEYLEN) + len = MAXKEYLEN; + if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (len == 0) return; Modified: stable/9/crypto/heimdal/appl/telnet/libtelnet/encrypt.c ============================================================================== --- stable/9/crypto/heimdal/appl/telnet/libtelnet/encrypt.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/9/crypto/heimdal/appl/telnet/libtelnet/encrypt.c Fri Dec 23 15:00:37 2011 (r228843) @@ -736,6 +736,9 @@ encrypt_keyid(struct key_info *kp, unsig int dir = kp->dir; int ret = 0; + if (len > MAXKEYLEN) + len = MAXKEYLEN; + if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (len == 0) return; Modified: stable/9/include/unistd.h ============================================================================== --- stable/9/include/unistd.h Fri Dec 23 14:39:30 2011 (r228842) +++ stable/9/include/unistd.h Fri Dec 23 15:00:37 2011 (r228843) @@ -511,6 +511,7 @@ int initgroups(const char *, gid_t); int iruserok(unsigned long, int, const char *, const char *); int iruserok_sa(const void *, int, int, const char *, const char *); int issetugid(void); +void __FreeBSD_libc_enter_restricted_mode(void); long lpathconf(const char *, int); #ifndef _MKDTEMP_DECLARED char *mkdtemp(char *); Modified: stable/9/lib/libc/Versions.def ============================================================================== --- stable/9/lib/libc/Versions.def Fri Dec 23 14:39:30 2011 (r228842) +++ stable/9/lib/libc/Versions.def Fri Dec 23 15:00:37 2011 (r228843) @@ -19,6 +19,10 @@ FBSD_1.1 { FBSD_1.2 { } FBSD_1.1; +# This version was first added to 10.0-current. +FBSD_1.3 { +} FBSD_1.2; + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries # are listed here. We use a separate namespace so we can write @@ -26,4 +30,4 @@ FBSD_1.2 { # # Please do NOT increment the version of this namespace. FBSDprivate_1.0 { -} FBSD_1.2; +} FBSD_1.3; Modified: stable/9/lib/libc/gen/Makefile.inc ============================================================================== --- stable/9/lib/libc/gen/Makefile.inc Fri Dec 23 14:39:30 2011 (r228842) +++ stable/9/lib/libc/gen/Makefile.inc Fri Dec 23 15:00:37 2011 (r228843) @@ -20,6 +20,7 @@ SRCS+= __getosreldate.c __xuname.c \ getpeereid.c getprogname.c getpwent.c getttyent.c \ getusershell.c getutxent.c getvfsbyname.c glob.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ + libc_dlopen.c \ lockf.c lrand48.c mrand48.c nftw.c nice.c \ nlist.c nrand48.c opendir.c \ pause.c pmadvise.c popen.c posix_spawn.c \ Modified: stable/9/lib/libc/gen/Symbol.map ============================================================================== --- stable/9/lib/libc/gen/Symbol.map Fri Dec 23 14:39:30 2011 (r228842) +++ stable/9/lib/libc/gen/Symbol.map Fri Dec 23 15:00:37 2011 (r228843) @@ -380,6 +380,10 @@ FBSD_1.2 { setutxent; }; +FBSD_1.3 { + __FreeBSD_libc_enter_restricted_mode; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; Added: stable/9/lib/libc/gen/libc_dlopen.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/gen/libc_dlopen.c Fri Dec 23 15:00:37 2011 (r228843) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2011 Xin Li + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include "libc_private.h" + +/* + * Whether we want to restrict dlopen()s. + */ +static int __libc_restricted_mode = 0; + +void * +libc_dlopen(const char *path, int mode) +{ + + if (__libc_restricted_mode) { + _rtld_error("Service unavailable -- libc in restricted mode"); + return (NULL); + } else + return (dlopen(path, mode)); +} + +void +__FreeBSD_libc_enter_restricted_mode(void) +{ + + __libc_restricted_mode = 1; + return; +} + Modified: stable/9/lib/libc/iconv/citrus_module.c ============================================================================== --- stable/9/lib/libc/iconv/citrus_module.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/9/lib/libc/iconv/citrus_module.c Fri Dec 23 15:00:37 2011 (r228843) @@ -109,6 +109,7 @@ #include "citrus_namespace.h" #include "citrus_bcs.h" #include "citrus_module.h" +#include "libc_private.h" static int _getdewey(int[], char *); static int _cmpndewey(int[], int, int[], int); @@ -294,7 +295,7 @@ _citrus_load_module(_citrus_module_t *rh p = _findshlib(path, &maj, &min); if (!p) return (EINVAL); - handle = dlopen(p, RTLD_LAZY); + handle = libc_dlopen(p, RTLD_LAZY); if (!handle) { printf("%s", dlerror()); return (EINVAL); Modified: stable/9/lib/libc/include/libc_private.h ============================================================================== --- stable/9/lib/libc/include/libc_private.h Fri Dec 23 14:39:30 2011 (r228842) +++ stable/9/lib/libc/include/libc_private.h Fri Dec 23 15:00:37 2011 (r228843) @@ -44,6 +44,17 @@ extern int __isthreaded; /* + * libc should use libc_dlopen internally, which respects a global + * flag where loading of new shared objects can be restricted. + */ +void *libc_dlopen(const char *, int); + +/* + * For dynamic linker. + */ +void _rtld_error(const char *fmt, ...); + +/* * File lock contention is difficult to diagnose without knowing * where locks were set. Allow a debug library to be built which * records the source file and line number of each lock call. Modified: stable/9/lib/libc/net/nsdispatch.c ============================================================================== --- stable/9/lib/libc/net/nsdispatch.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/9/lib/libc/net/nsdispatch.c Fri Dec 23 15:00:37 2011 (r228843) @@ -384,7 +384,7 @@ nss_configure(void) confmod = statbuf.st_mtime; #ifdef NS_CACHING - handle = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); + handle = libc_dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); if (handle != NULL) { nss_cache_cycle_prevention_func = dlsym(handle, "_nss_cache_cycle_prevention_function"); @@ -497,7 +497,7 @@ nss_load_module(const char *source, nss_ if (snprintf(buf, sizeof(buf), "nss_%s.so.%d", mod.name, NSS_MODULE_INTERFACE_VERSION) >= (int)sizeof(buf)) goto fin; - mod.handle = dlopen(buf, RTLD_LOCAL|RTLD_LAZY); + mod.handle = libc_dlopen(buf, RTLD_LOCAL|RTLD_LAZY); if (mod.handle == NULL) { #ifdef _NSS_DEBUG /* This gets pretty annoying since the built-in Modified: stable/9/libexec/ftpd/ftpd.c ============================================================================== --- stable/9/libexec/ftpd/ftpd.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/9/libexec/ftpd/ftpd.c Fri Dec 23 15:00:37 2011 (r228843) @@ -1562,6 +1562,7 @@ skip: reply(550, "Can't change root."); goto bad; } + __FreeBSD_libc_enter_restricted_mode(); } else /* real user w/o chroot */ homedir = pw->pw_dir; /* Modified: stable/9/libexec/ftpd/popen.c ============================================================================== --- stable/9/libexec/ftpd/popen.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/9/libexec/ftpd/popen.c Fri Dec 23 15:00:37 2011 (r228843) @@ -143,6 +143,9 @@ ftpd_popen(char *program, char *type) } (void)close(pdes[1]); } + /* Drop privileges before proceeding */ + if (getuid() != geteuid() && setuid(geteuid()) < 0) + _exit(1); if (strcmp(gargv[0], _PATH_LS) == 0) { /* Reset getopt for ls_main() */ optreset = optind = optopt = 1; From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 15:00:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E19821065737; Fri, 23 Dec 2011 15:00:39 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CBA128FC29; Fri, 23 Dec 2011 15:00:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNF0dSX071809; Fri, 23 Dec 2011 15:00:39 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNF0dkC071797; Fri, 23 Dec 2011 15:00:39 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201112231500.pBNF0dkC071797@svn.freebsd.org> From: Colin Percival Date: Fri, 23 Dec 2011 15:00: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: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 15:00:40 -0000 Author: cperciva Date: Fri Dec 23 15:00:37 2011 New Revision: 228843 URL: http://svn.freebsd.org/changeset/base/228843 Log: Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06] Add an API for alerting internal libc routines to the presence of "unsafe" paths post-chroot, and use it in ftpd. [11:07] Fix a buffer overflow in telnetd. [11:08] Make pam_ssh ignore unpassphrased keys unless the "nullok" option is specified. [11:09] Add sanity checking of service names in pam_start. [11:10] Approved by: so (cperciva) Approved by: re (bz) Security: FreeBSD-SA-11:06.bind Security: FreeBSD-SA-11:07.chroot Security: FreeBSD-SA-11:08.telnetd Security: FreeBSD-SA-11:09.pam_ssh Security: FreeBSD-SA-11:10.pam Added: stable/8/lib/libc/gen/libc_dlopen.c (contents, props changed) Modified: stable/8/contrib/telnet/libtelnet/encrypt.c stable/8/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/8/include/unistd.h stable/8/lib/libc/Versions.def stable/8/lib/libc/gen/Makefile.inc stable/8/lib/libc/gen/Symbol.map stable/8/lib/libc/include/libc_private.h stable/8/lib/libc/net/nsdispatch.c stable/8/libexec/ftpd/ftpd.c stable/8/libexec/ftpd/popen.c Changes in other areas also in this revision: Added: head/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/7.3/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/7.4/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/8.1/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/8.2/lib/libc/gen/libc_dlopen.c (contents, props changed) releng/9.0/lib/libc/gen/libc_dlopen.c (contents, props changed) stable/7/lib/libc/gen/libc_dlopen.c (contents, props changed) stable/9/lib/libc/gen/libc_dlopen.c (contents, props changed) Modified: head/contrib/telnet/libtelnet/encrypt.c head/crypto/heimdal/appl/telnet/libtelnet/encrypt.c head/include/unistd.h head/lib/libc/gen/Makefile.inc head/lib/libc/gen/Symbol.map head/lib/libc/iconv/citrus_module.c head/lib/libc/include/libc_private.h head/lib/libc/net/nsdispatch.c head/libexec/ftpd/ftpd.c head/libexec/ftpd/popen.c releng/7.3/UPDATING releng/7.3/contrib/bind9/bin/named/query.c releng/7.3/contrib/bind9/lib/dns/rbtdb.c releng/7.3/contrib/openpam/lib/openpam_configure.c releng/7.3/contrib/telnet/libtelnet/encrypt.c releng/7.3/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/7.3/include/unistd.h releng/7.3/lib/libc/Versions.def releng/7.3/lib/libc/gen/Makefile.inc releng/7.3/lib/libc/gen/Symbol.map releng/7.3/lib/libc/include/libc_private.h releng/7.3/lib/libc/net/nsdispatch.c releng/7.3/lib/libpam/modules/pam_ssh/pam_ssh.c releng/7.3/libexec/ftpd/ftpd.c releng/7.3/libexec/ftpd/popen.c releng/7.3/sys/conf/newvers.sh releng/7.4/UPDATING releng/7.4/contrib/bind9/bin/named/query.c releng/7.4/contrib/bind9/lib/dns/rbtdb.c releng/7.4/contrib/openpam/lib/openpam_configure.c releng/7.4/contrib/telnet/libtelnet/encrypt.c releng/7.4/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/7.4/include/unistd.h releng/7.4/lib/libc/Versions.def releng/7.4/lib/libc/gen/Makefile.inc releng/7.4/lib/libc/gen/Symbol.map releng/7.4/lib/libc/include/libc_private.h releng/7.4/lib/libc/net/nsdispatch.c releng/7.4/lib/libpam/modules/pam_ssh/pam_ssh.c releng/7.4/libexec/ftpd/ftpd.c releng/7.4/libexec/ftpd/popen.c releng/7.4/sys/conf/newvers.sh releng/8.1/UPDATING releng/8.1/contrib/bind9/bin/named/query.c releng/8.1/contrib/bind9/lib/dns/rbtdb.c releng/8.1/contrib/openpam/lib/openpam_configure.c releng/8.1/contrib/telnet/libtelnet/encrypt.c releng/8.1/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/8.1/include/unistd.h releng/8.1/lib/libc/Versions.def releng/8.1/lib/libc/gen/Makefile.inc releng/8.1/lib/libc/gen/Symbol.map releng/8.1/lib/libc/include/libc_private.h releng/8.1/lib/libc/net/nsdispatch.c releng/8.1/lib/libpam/modules/pam_ssh/pam_ssh.c releng/8.1/libexec/ftpd/ftpd.c releng/8.1/libexec/ftpd/popen.c releng/8.1/sys/conf/newvers.sh releng/8.2/UPDATING releng/8.2/contrib/bind9/bin/named/query.c releng/8.2/contrib/bind9/lib/dns/rbtdb.c releng/8.2/contrib/openpam/lib/openpam_configure.c releng/8.2/contrib/telnet/libtelnet/encrypt.c releng/8.2/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/8.2/include/unistd.h releng/8.2/lib/libc/Versions.def releng/8.2/lib/libc/gen/Makefile.inc releng/8.2/lib/libc/gen/Symbol.map releng/8.2/lib/libc/include/libc_private.h releng/8.2/lib/libc/net/nsdispatch.c releng/8.2/lib/libpam/modules/pam_ssh/pam_ssh.c releng/8.2/libexec/ftpd/ftpd.c releng/8.2/libexec/ftpd/popen.c releng/8.2/sys/conf/newvers.sh releng/9.0/contrib/telnet/libtelnet/encrypt.c releng/9.0/crypto/heimdal/appl/telnet/libtelnet/encrypt.c releng/9.0/include/unistd.h releng/9.0/lib/libc/Versions.def releng/9.0/lib/libc/gen/Makefile.inc releng/9.0/lib/libc/gen/Symbol.map releng/9.0/lib/libc/iconv/citrus_module.c releng/9.0/lib/libc/include/libc_private.h releng/9.0/lib/libc/net/nsdispatch.c releng/9.0/libexec/ftpd/ftpd.c releng/9.0/libexec/ftpd/popen.c stable/7/contrib/telnet/libtelnet/encrypt.c stable/7/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/7/include/unistd.h stable/7/lib/libc/Versions.def stable/7/lib/libc/gen/Makefile.inc stable/7/lib/libc/gen/Symbol.map stable/7/lib/libc/include/libc_private.h stable/7/lib/libc/net/nsdispatch.c stable/7/libexec/ftpd/ftpd.c stable/7/libexec/ftpd/popen.c stable/9/contrib/telnet/libtelnet/encrypt.c stable/9/crypto/heimdal/appl/telnet/libtelnet/encrypt.c stable/9/include/unistd.h stable/9/lib/libc/Versions.def stable/9/lib/libc/gen/Makefile.inc stable/9/lib/libc/gen/Symbol.map stable/9/lib/libc/iconv/citrus_module.c stable/9/lib/libc/include/libc_private.h stable/9/lib/libc/net/nsdispatch.c stable/9/libexec/ftpd/ftpd.c stable/9/libexec/ftpd/popen.c Modified: stable/8/contrib/telnet/libtelnet/encrypt.c ============================================================================== --- stable/8/contrib/telnet/libtelnet/encrypt.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/8/contrib/telnet/libtelnet/encrypt.c Fri Dec 23 15:00:37 2011 (r228843) @@ -721,6 +721,9 @@ encrypt_keyid(struct key_info *kp, unsig int dir = kp->dir; int ret = 0; + if (len > MAXKEYLEN) + len = MAXKEYLEN; + if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (len == 0) return; Modified: stable/8/crypto/heimdal/appl/telnet/libtelnet/encrypt.c ============================================================================== --- stable/8/crypto/heimdal/appl/telnet/libtelnet/encrypt.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/8/crypto/heimdal/appl/telnet/libtelnet/encrypt.c Fri Dec 23 15:00:37 2011 (r228843) @@ -736,6 +736,9 @@ encrypt_keyid(struct key_info *kp, unsig int dir = kp->dir; int ret = 0; + if (len > MAXKEYLEN) + len = MAXKEYLEN; + if (!(ep = (*kp->getcrypt)(*kp->modep))) { if (len == 0) return; Modified: stable/8/include/unistd.h ============================================================================== --- stable/8/include/unistd.h Fri Dec 23 14:39:30 2011 (r228842) +++ stable/8/include/unistd.h Fri Dec 23 15:00:37 2011 (r228843) @@ -513,6 +513,7 @@ int initgroups(const char *, gid_t); int iruserok(unsigned long, int, const char *, const char *); int iruserok_sa(const void *, int, int, const char *, const char *); int issetugid(void); +void __FreeBSD_libc_enter_restricted_mode(void); long lpathconf(const char *, int); #ifndef _MKDTEMP_DECLARED char *mkdtemp(char *); Modified: stable/8/lib/libc/Versions.def ============================================================================== --- stable/8/lib/libc/Versions.def Fri Dec 23 14:39:30 2011 (r228842) +++ stable/8/lib/libc/Versions.def Fri Dec 23 15:00:37 2011 (r228843) @@ -19,6 +19,10 @@ FBSD_1.1 { FBSD_1.2 { } FBSD_1.1; +# This version was first added to 10.0-current. +FBSD_1.3 { +} FBSD_1.2; + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries # are listed here. We use a separate namespace so we can write @@ -26,4 +30,4 @@ FBSD_1.2 { # # Please do NOT increment the version of this namespace. FBSDprivate_1.0 { -} FBSD_1.2; +} FBSD_1.3; Modified: stable/8/lib/libc/gen/Makefile.inc ============================================================================== --- stable/8/lib/libc/gen/Makefile.inc Fri Dec 23 14:39:30 2011 (r228842) +++ stable/8/lib/libc/gen/Makefile.inc Fri Dec 23 15:00:37 2011 (r228843) @@ -20,6 +20,7 @@ SRCS+= __getosreldate.c __xuname.c \ getpeereid.c getprogname.c getpwent.c getttyent.c \ getusershell.c getvfsbyname.c glob.c \ initgroups.c isatty.c isinf.c isnan.c jrand48.c lcong48.c \ + libc_dlopen.c \ lockf.c lrand48.c mrand48.c nftw.c nice.c \ nlist.c nrand48.c opendir.c \ pause.c pmadvise.c popen.c posix_spawn.c \ Modified: stable/8/lib/libc/gen/Symbol.map ============================================================================== --- stable/8/lib/libc/gen/Symbol.map Fri Dec 23 14:39:30 2011 (r228842) +++ stable/8/lib/libc/gen/Symbol.map Fri Dec 23 15:00:37 2011 (r228843) @@ -369,6 +369,10 @@ FBSD_1.2 { getpagesizes; }; +FBSD_1.3 { + __FreeBSD_libc_enter_restricted_mode; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; Added: stable/8/lib/libc/gen/libc_dlopen.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/lib/libc/gen/libc_dlopen.c Fri Dec 23 15:00:37 2011 (r228843) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2011 Xin Li + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include "libc_private.h" + +/* + * Whether we want to restrict dlopen()s. + */ +static int __libc_restricted_mode = 0; + +void * +libc_dlopen(const char *path, int mode) +{ + + if (__libc_restricted_mode) { + _rtld_error("Service unavailable -- libc in restricted mode"); + return (NULL); + } else + return (dlopen(path, mode)); +} + +void +__FreeBSD_libc_enter_restricted_mode(void) +{ + + __libc_restricted_mode = 1; + return; +} + Modified: stable/8/lib/libc/include/libc_private.h ============================================================================== --- stable/8/lib/libc/include/libc_private.h Fri Dec 23 14:39:30 2011 (r228842) +++ stable/8/lib/libc/include/libc_private.h Fri Dec 23 15:00:37 2011 (r228843) @@ -44,6 +44,17 @@ extern int __isthreaded; /* + * libc should use libc_dlopen internally, which respects a global + * flag where loading of new shared objects can be restricted. + */ +void *libc_dlopen(const char *, int); + +/* + * For dynamic linker. + */ +void _rtld_error(const char *fmt, ...); + +/* * File lock contention is difficult to diagnose without knowing * where locks were set. Allow a debug library to be built which * records the source file and line number of each lock call. Modified: stable/8/lib/libc/net/nsdispatch.c ============================================================================== --- stable/8/lib/libc/net/nsdispatch.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/8/lib/libc/net/nsdispatch.c Fri Dec 23 15:00:37 2011 (r228843) @@ -384,7 +384,7 @@ nss_configure(void) confmod = statbuf.st_mtime; #ifdef NS_CACHING - handle = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); + handle = libc_dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); if (handle != NULL) { nss_cache_cycle_prevention_func = dlsym(handle, "_nss_cache_cycle_prevention_function"); @@ -497,7 +497,7 @@ nss_load_module(const char *source, nss_ if (snprintf(buf, sizeof(buf), "nss_%s.so.%d", mod.name, NSS_MODULE_INTERFACE_VERSION) >= (int)sizeof(buf)) goto fin; - mod.handle = dlopen(buf, RTLD_LOCAL|RTLD_LAZY); + mod.handle = libc_dlopen(buf, RTLD_LOCAL|RTLD_LAZY); if (mod.handle == NULL) { #ifdef _NSS_DEBUG /* This gets pretty annoying since the built-in Modified: stable/8/libexec/ftpd/ftpd.c ============================================================================== --- stable/8/libexec/ftpd/ftpd.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/8/libexec/ftpd/ftpd.c Fri Dec 23 15:00:37 2011 (r228843) @@ -1543,6 +1543,7 @@ skip: reply(550, "Can't change root."); goto bad; } + __FreeBSD_libc_enter_restricted_mode(); } else /* real user w/o chroot */ homedir = pw->pw_dir; /* Modified: stable/8/libexec/ftpd/popen.c ============================================================================== --- stable/8/libexec/ftpd/popen.c Fri Dec 23 14:39:30 2011 (r228842) +++ stable/8/libexec/ftpd/popen.c Fri Dec 23 15:00:37 2011 (r228843) @@ -143,6 +143,9 @@ ftpd_popen(char *program, char *type) } (void)close(pdes[1]); } + /* Drop privileges before proceeding */ + if (getuid() != geteuid() && setuid(geteuid()) < 0) + _exit(1); if (strcmp(gargv[0], _PATH_LS) == 0) { /* Reset getopt for ls_main() */ optreset = optind = optopt = 1; From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 15:58:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30346106564A; Fri, 23 Dec 2011 15:58:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 03CC38FC12; Fri, 23 Dec 2011 15:58:48 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 8E8BC46B06; Fri, 23 Dec 2011 10:58:47 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 21BD5B955; Fri, 23 Dec 2011 10:58:47 -0500 (EST) From: John Baldwin To: Colin Percival Date: Fri, 23 Dec 2011 10:58:46 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201112231500.pBNF0c0O071712@svn.freebsd.org> In-Reply-To: <201112231500.pBNF0c0O071712@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201112231058.46642.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 23 Dec 2011 10:58:47 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 15:58:48 -0000 On Friday, December 23, 2011 10:00:38 am Colin Percival wrote: > Author: cperciva > Date: Fri Dec 23 15:00:37 2011 > New Revision: 228843 > URL: http://svn.freebsd.org/changeset/base/228843 > > Log: > Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06] > > Add an API for alerting internal libc routines to the presence of > "unsafe" paths post-chroot, and use it in ftpd. [11:07] Eh, the whole libc_dlopen() thing looks like a gross hack (and who came up with that weird symbol name for a public API????). Is it really even needed given the other fix to have ftpd drop privilege before execing a helper program? I guess the main reason I don't like it is it doesn't do anything to address the more general problem. I would have expected instead something to restrict dlopen() entirely including from other libraries than just libc in certain circumstances. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 16:02:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D66D91065707; Fri, 23 Dec 2011 16:02:14 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C50CB8FC12; Fri, 23 Dec 2011 16:02:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNG2Eix073660; Fri, 23 Dec 2011 16:02:14 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNG2EZL073657; Fri, 23 Dec 2011 16:02:14 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201112231602.pBNG2EZL073657@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 23 Dec 2011 16:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228844 - head/sys/dev/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 16:02:15 -0000 Author: luigi Date: Fri Dec 23 16:02:14 2011 New Revision: 228844 URL: http://svn.freebsd.org/changeset/base/228844 Log: whitespace fixes (one missing newline, one extra tab) Modified: head/sys/dev/netmap/if_em_netmap.h head/sys/dev/netmap/ixgbe_netmap.h Modified: head/sys/dev/netmap/if_em_netmap.h ============================================================================== --- head/sys/dev/netmap/if_em_netmap.h Fri Dec 23 15:00:37 2011 (r228843) +++ head/sys/dev/netmap/if_em_netmap.h Fri Dec 23 16:02:14 2011 (r228844) @@ -76,7 +76,7 @@ em_netmap_lock_wrapper(void *_a, int wha ASSERT(queueid < adapter->num_queues); switch (what) { - case NETMAP_CORE_LOCK: + case NETMAP_CORE_LOCK: EM_CORE_LOCK(adapter); break; case NETMAP_CORE_UNLOCK: Modified: head/sys/dev/netmap/ixgbe_netmap.h ============================================================================== --- head/sys/dev/netmap/ixgbe_netmap.h Fri Dec 23 15:00:37 2011 (r228843) +++ head/sys/dev/netmap/ixgbe_netmap.h Fri Dec 23 16:02:14 2011 (r228844) @@ -472,7 +472,8 @@ ixgbe_netmap_rxsync(void *a, u_int ring_ * and flag handling as in the txsync code. * * NOTE curr and rxbuf are indexed by l. - * Also, this driver needs to update the physical * address in the NIC ring, but other drivers + * Also, this driver needs to update the physical + * address in the NIC ring, but other drivers * may not have this requirement. */ struct netmap_slot *slot = &ring->slot[j]; From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 16:03:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC5061065675; Fri, 23 Dec 2011 16:03:57 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B26288FC1B; Fri, 23 Dec 2011 16:03:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNG3vgB073742; Fri, 23 Dec 2011 16:03:57 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNG3vrV073739; Fri, 23 Dec 2011 16:03:57 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201112231603.pBNG3vrV073739@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 23 Dec 2011 16:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228845 - head/sys/dev/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 16:03:58 -0000 Author: luigi Date: Fri Dec 23 16:03:57 2011 New Revision: 228845 URL: http://svn.freebsd.org/changeset/base/228845 Log: 1. don't use if_pspare directly, but through a macro WMA() 2. move a variable declaration at the beginning of a block Modified: head/sys/dev/netmap/netmap.c head/sys/dev/netmap/netmap_kern.h Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Fri Dec 23 16:02:14 2011 (r228844) +++ head/sys/dev/netmap/netmap.c Fri Dec 23 16:03:57 2011 (r228845) @@ -1039,7 +1039,7 @@ netmap_poll(__unused struct cdev *dev, i struct netmap_adapter *na; struct ifnet *ifp; struct netmap_kring *kring; - u_int i, check_all, want_tx, want_rx, revents = 0; + u_int core_lock, i, check_all, want_tx, want_rx, revents = 0; void *adapter; if (devfs_get_cdevpriv((void **)&priv) != 0 || priv == NULL) @@ -1116,8 +1116,7 @@ netmap_poll(__unused struct cdev *dev, i * LOCKED_CL core lock is set, so we need to release it. */ enum {NO_CL, NEED_CL, LOCKED_CL }; - int core_lock = (check_all || !na->separate_locks) ? - NEED_CL:NO_CL; + core_lock = (check_all || !na->separate_locks) ? NEED_CL:NO_CL; /* * We start with a lock free round which is good if we have * data available. If this fails, then lock and call the sync @@ -1246,7 +1245,7 @@ netmap_attach(struct netmap_adapter *na, buf = malloc(size, M_DEVBUF, M_NOWAIT | M_ZERO); if (buf) { - ifp->if_pspare[0] = buf; + WNA(ifp) = buf; na->tx_rings = (void *)((char *)buf + sizeof(*na)); na->rx_rings = na->tx_rings + n; bcopy(na, buf, sizeof(*na)); @@ -1276,7 +1275,7 @@ netmap_detach(struct ifnet *ifp) knlist_destroy(&na->rx_rings[i].si.si_note); } bzero(na, sizeof(*na)); - ifp->if_pspare[0] = NULL; + WNA(ifp) = NULL; free(na, M_DEVBUF); } Modified: head/sys/dev/netmap/netmap_kern.h ============================================================================== --- head/sys/dev/netmap/netmap_kern.h Fri Dec 23 16:02:14 2011 (r228844) +++ head/sys/dev/netmap/netmap_kern.h Fri Dec 23 16:03:57 2011 (r228845) @@ -196,9 +196,13 @@ enum { }; /* - * return a pointer to the struct netmap adapter from the ifp + * NA returns a pointer to the struct netmap adapter from the ifp, + * WNA is used to write it. */ -#define NA(_ifp) ((struct netmap_adapter *)(_ifp)->if_pspare[0]) +#ifndef WNA +#define WNA(_ifp) (_ifp)->if_pspare[0] +#endif +#define NA(_ifp) ((struct netmap_adapter *)WNA(_ifp)) /* From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 16:22:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23A631065675; Fri, 23 Dec 2011 16:22:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id EA9638FC1E; Fri, 23 Dec 2011 16:22:35 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id A065F46B45; Fri, 23 Dec 2011 11:22:35 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2F345B93F; Fri, 23 Dec 2011 11:22:35 -0500 (EST) From: John Baldwin To: Colin Percival Date: Fri, 23 Dec 2011 11:22:34 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> In-Reply-To: <201112231058.46642.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201112231122.34436.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 23 Dec 2011 11:22:35 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 16:22:36 -0000 On Friday, December 23, 2011 10:58:46 am John Baldwin wrote: > On Friday, December 23, 2011 10:00:38 am Colin Percival wrote: > > Author: cperciva > > Date: Fri Dec 23 15:00:37 2011 > > New Revision: 228843 > > URL: http://svn.freebsd.org/changeset/base/228843 > > > > Log: > > Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06] > > > > Add an API for alerting internal libc routines to the presence of > > "unsafe" paths post-chroot, and use it in ftpd. [11:07] > > Eh, the whole libc_dlopen() thing looks like a gross hack (and who came > up with that weird symbol name for a public API????). Is it really even > needed given the other fix to have ftpd drop privilege before execing a > helper program? I guess the main reason I don't like it is it doesn't do > anything to address the more general problem. I would have expected instead > something to restrict dlopen() entirely including from other libraries than > just libc in certain circumstances. At the very least if we feel that the libc_dlopen() thing is a temporary band-aid, we should move the new symbols into the private namespace so we can remove them once the better fix is in rather than being required to support them forever. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 17:06:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AD4F1065680; Fri, 23 Dec 2011 17:06:52 +0000 (UTC) (envelope-from kabaev@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 C746D8FC28; Fri, 23 Dec 2011 17:06:51 +0000 (UTC) Received: by qcse13 with SMTP id e13so8600849qcs.13 for ; Fri, 23 Dec 2011 09:06:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=2pNTQpJrOYyboksIIw/tHXQl4XC7Y8KiJFTH66mAgJU=; b=VBKXvvwWbbP+wGlI94tKSYNFdoWYukYFsUfvSrnUZabKca7Z7JHW2S38nxBr8nkmU+ DtyOWJEnbn2HAtPnuFEiLiXZ7NdoXK/5kicO6EdrPE7esRkSN9L4AkpH7tIGctK3ThW7 IihtIhaOze/ZVTUVct94ePl4bL/Sz+DMCRUM0= Received: by 10.229.111.158 with SMTP id s30mr6270731qcp.13.1324660010874; Fri, 23 Dec 2011 09:06:50 -0800 (PST) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPS id m20sm25156473qaj.14.2011.12.23.09.06.49 (version=SSLv3 cipher=OTHER); Fri, 23 Dec 2011 09:06:49 -0800 (PST) Date: Fri, 23 Dec 2011 12:06:44 -0500 From: Alexander Kabaev To: John Baldwin Message-ID: <20111223120644.75fe944d@kan.dyndns.org> In-Reply-To: <201112231122.34436.jhb@freebsd.org> References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/HBu.brn+1n7ff.WMuAnuq7Z"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Colin Percival Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 17:06:52 -0000 --Sig_/HBu.brn+1n7ff.WMuAnuq7Z Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 23 Dec 2011 11:22:34 -0500 John Baldwin wrote: > On Friday, December 23, 2011 10:58:46 am John Baldwin wrote: > > On Friday, December 23, 2011 10:00:38 am Colin Percival wrote: > > > Author: cperciva > > > Date: Fri Dec 23 15:00:37 2011 > > > New Revision: 228843 > > > URL: http://svn.freebsd.org/changeset/base/228843 > > >=20 > > > Log: > > > Fix a problem whereby a corrupt DNS record can cause named to > > > crash. [11:06]=20 > > > Add an API for alerting internal libc routines to the presence > > > of "unsafe" paths post-chroot, and use it in ftpd. [11:07] > >=20 > > Eh, the whole libc_dlopen() thing looks like a gross hack (and who > > came up with that weird symbol name for a public API????). Is it > > really even needed given the other fix to have ftpd drop privilege > > before execing a helper program? I guess the main reason I don't > > like it is it doesn't do anything to address the more general > > problem. I would have expected instead something to restrict > > dlopen() entirely including from other libraries than just libc in > > certain circumstances. >=20 > At the very least if we feel that the libc_dlopen() thing is a > temporary band-aid, we should move the new symbols into the private > namespace so we can remove them once the better fix is in rather than > being required to support them forever. >=20 > --=20 > John Baldwin Pardon for not catching that when I had a chance to influence the outcome, but I would like to voice my support to tucking the ugliness into private version namespace. --=20 Alexander Kabaev --Sig_/HBu.brn+1n7ff.WMuAnuq7Z Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iD8DBQFO9LUoQ6z1jMm+XZYRAioCAJ4xZWtZWyGgyNxN5yWp6YuMMyAnTQCg2BzR RZYi7OL5KgkSfKzX3gYMslU= =NSef -----END PGP SIGNATURE----- --Sig_/HBu.brn+1n7ff.WMuAnuq7Z-- From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 17:51:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 433C0106566C; Fri, 23 Dec 2011 17:51:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id CE6F18FC1D; Fri, 23 Dec 2011 17:51:48 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pBNHpiFD024927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 23 Dec 2011 19:51:44 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pBNHpiaP086645; Fri, 23 Dec 2011 19:51:44 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pBNHphuS086644; Fri, 23 Dec 2011 19:51:43 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 23 Dec 2011 19:51:43 +0200 From: Kostik Belousov To: Alexander Kabaev Message-ID: <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eUJGivEzlkoRlQKE" Content-Disposition: inline In-Reply-To: <20111223120644.75fe944d@kan.dyndns.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Colin Percival , John Baldwin Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 17:51:49 -0000 --eUJGivEzlkoRlQKE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 23, 2011 at 12:06:44PM -0500, Alexander Kabaev wrote: > On Fri, 23 Dec 2011 11:22:34 -0500 > John Baldwin wrote: >=20 > > On Friday, December 23, 2011 10:58:46 am John Baldwin wrote: > > > On Friday, December 23, 2011 10:00:38 am Colin Percival wrote: > > > > Author: cperciva > > > > Date: Fri Dec 23 15:00:37 2011 > > > > New Revision: 228843 > > > > URL: http://svn.freebsd.org/changeset/base/228843 > > > >=20 > > > > Log: > > > > Fix a problem whereby a corrupt DNS record can cause named to > > > > crash. [11:06]=20 > > > > Add an API for alerting internal libc routines to the presence > > > > of "unsafe" paths post-chroot, and use it in ftpd. [11:07] > > >=20 > > > Eh, the whole libc_dlopen() thing looks like a gross hack (and who > > > came up with that weird symbol name for a public API????). Is it > > > really even needed given the other fix to have ftpd drop privilege > > > before execing a helper program? I guess the main reason I don't > > > like it is it doesn't do anything to address the more general > > > problem. I would have expected instead something to restrict > > > dlopen() entirely including from other libraries than just libc in > > > certain circumstances. > >=20 > > At the very least if we feel that the libc_dlopen() thing is a > > temporary band-aid, we should move the new symbols into the private > > namespace so we can remove them once the better fix is in rather than > > being required to support them forever. libc_dlopen() is not exposed. The __FreeBSD_libc_enter_restricted_mode() is, and its name is ugly exactly to note the ugly intent. I do not see how the symbol can go int FBSDprivate_1.0 when it was supposed to be used by third-party applications. Putting this hack into rtld itself IMO has to wide consequences. For libc, we can enumerate the points that stop work after the call, but for the generic applications the consequences are undefined. > >=20 > > --=20 > > John Baldwin >=20 > Pardon for not catching that when I had a chance to influence the > outcome, but I would like to voice my support to tucking the ugliness > into private version namespace. >=20 > --=20 > Alexander Kabaev --eUJGivEzlkoRlQKE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk70v68ACgkQC3+MBN1Mb4giqACZASswqraasc/H8jXYcsVgrzHC E3YAnirjfVXolCKucgQmVK9PENC/Zp7c =yURB -----END PGP SIGNATURE----- --eUJGivEzlkoRlQKE-- From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 18:20:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3DB01065670; Fri, 23 Dec 2011 18:20:42 +0000 (UTC) (envelope-from kabaev@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 184038FC13; Fri, 23 Dec 2011 18:20:41 +0000 (UTC) Received: by qcse13 with SMTP id e13so8647771qcs.13 for ; Fri, 23 Dec 2011 10:20:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=7cNTGmVdZETB35mLWEfaD2VNzFl/gg7fBK+PeoJvkP0=; b=bRD58b+jHYhfRs7NyVVKkEQNB60+V9cNC5vFOaXgnt3lnYpy0bndH0Y4gITrLtVjul 62cRgs+E0d9ElwFnhs5E2FZ5u0qZx5IEdV63NacZIKTmqccAEE3d4J27+fZI0oKbg1Uq LxXgJTdtDv/8B8/W6JQwhdxs9U0JqDxHqkSSE= Received: by 10.224.197.7 with SMTP id ei7mr19911180qab.84.1324664441415; Fri, 23 Dec 2011 10:20:41 -0800 (PST) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPS id q14sm25547314qap.4.2011.12.23.10.20.40 (version=SSLv3 cipher=OTHER); Fri, 23 Dec 2011 10:20:40 -0800 (PST) Date: Fri, 23 Dec 2011 13:20:34 -0500 From: Alexander Kabaev To: Kostik Belousov Message-ID: <20111223132034.12192baa@kan.dyndns.org> In-Reply-To: <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/5lcKqYi_CebwpwoL9c8Y+NN"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Colin Percival , John Baldwin Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 18:20:42 -0000 --Sig_/5lcKqYi_CebwpwoL9c8Y+NN Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 23 Dec 2011 19:51:43 +0200 Kostik Belousov wrote: > On Fri, Dec 23, 2011 at 12:06:44PM -0500, Alexander Kabaev wrote: > > On Fri, 23 Dec 2011 11:22:34 -0500 > > John Baldwin wrote: > >=20 > > > On Friday, December 23, 2011 10:58:46 am John Baldwin wrote: > > > > On Friday, December 23, 2011 10:00:38 am Colin Percival wrote: > > > > > Author: cperciva > > > > > Date: Fri Dec 23 15:00:37 2011 > > > > > New Revision: 228843 > > > > > URL: http://svn.freebsd.org/changeset/base/228843 > > > > >=20 > > > > > Log: > > > > > Fix a problem whereby a corrupt DNS record can cause named > > > > > to crash. [11:06]=20 > > > > > Add an API for alerting internal libc routines to the > > > > > presence of "unsafe" paths post-chroot, and use it in ftpd. > > > > > [11:07] > > > >=20 > > > > Eh, the whole libc_dlopen() thing looks like a gross hack (and > > > > who came up with that weird symbol name for a public API????). > > > > Is it really even needed given the other fix to have ftpd drop > > > > privilege before execing a helper program? I guess the main > > > > reason I don't like it is it doesn't do anything to address the > > > > more general problem. I would have expected instead something > > > > to restrict dlopen() entirely including from other libraries > > > > than just libc in certain circumstances. > > >=20 > > > At the very least if we feel that the libc_dlopen() thing is a > > > temporary band-aid, we should move the new symbols into the > > > private namespace so we can remove them once the better fix is in > > > rather than being required to support them forever. > libc_dlopen() is not exposed. > The __FreeBSD_libc_enter_restricted_mode() is, and its name is ugly > exactly to note the ugly intent. I do not see how the symbol can go > int FBSDprivate_1.0 when it was supposed to be used by third-party > applications. >=20 > Putting this hack into rtld itself IMO has to wide consequences. > For libc, we can enumerate the points that stop work after the call, > but for the generic applications the consequences are undefined. > > >=20 > > > --=20 > > > John Baldwin > >=20 > > Pardon for not catching that when I had a chance to influence the > > outcome, but I would like to voice my support to tucking the > > ugliness into private version namespace. > >=20 > > --=20 > > Alexander Kabaev >=20 Putting symbol into official namespace implies that we are willing to provide and maintain it forever, which I do not think was the intent for the function in question. FBSD_PRIVATE says nothing about who should and should not link to it, only the level of API stability one has to expect in the end. If/when we have better security mechanisms (capsicum?) available to users by default, this should be ripped out with extreme prejudice. --=20 Alexander Kabaev --Sig_/5lcKqYi_CebwpwoL9c8Y+NN Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iD8DBQFO9MZ3Q6z1jMm+XZYRAivLAJ41jrp3y8Rx6Y1DMQrsVlraRSo5cQCfXtVN GlxoyBzrnlS+o8xRj9ZO3v4= =YO7h -----END PGP SIGNATURE----- --Sig_/5lcKqYi_CebwpwoL9c8Y+NN-- From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 18:30:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 778291065670; Fri, 23 Dec 2011 18:30:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id DD71B8FC0C; Fri, 23 Dec 2011 18:30:04 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pBNIU0W6027215 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 23 Dec 2011 20:30:00 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pBNIU0xG086841; Fri, 23 Dec 2011 20:30:00 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pBNITxck086838; Fri, 23 Dec 2011 20:29:59 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 23 Dec 2011 20:29:59 +0200 From: Kostik Belousov To: Alexander Kabaev Message-ID: <20111223182959.GL50300@deviant.kiev.zoral.com.ua> References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> <20111223132034.12192baa@kan.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jviMX/jurV6/I2v0" Content-Disposition: inline In-Reply-To: <20111223132034.12192baa@kan.dyndns.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Colin Percival , John Baldwin Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 18:30:05 -0000 --jviMX/jurV6/I2v0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 23, 2011 at 01:20:34PM -0500, Alexander Kabaev wrote: > On Fri, 23 Dec 2011 19:51:43 +0200 > Kostik Belousov wrote: >=20 > > On Fri, Dec 23, 2011 at 12:06:44PM -0500, Alexander Kabaev wrote: > > > On Fri, 23 Dec 2011 11:22:34 -0500 > > > John Baldwin wrote: > > >=20 > > > > On Friday, December 23, 2011 10:58:46 am John Baldwin wrote: > > > > > On Friday, December 23, 2011 10:00:38 am Colin Percival wrote: > > > > > > Author: cperciva > > > > > > Date: Fri Dec 23 15:00:37 2011 > > > > > > New Revision: 228843 > > > > > > URL: http://svn.freebsd.org/changeset/base/228843 > > > > > >=20 > > > > > > Log: > > > > > > Fix a problem whereby a corrupt DNS record can cause named > > > > > > to crash. [11:06]=20 > > > > > > Add an API for alerting internal libc routines to the > > > > > > presence of "unsafe" paths post-chroot, and use it in ftpd. > > > > > > [11:07] > > > > >=20 > > > > > Eh, the whole libc_dlopen() thing looks like a gross hack (and > > > > > who came up with that weird symbol name for a public API????). > > > > > Is it really even needed given the other fix to have ftpd drop > > > > > privilege before execing a helper program? I guess the main > > > > > reason I don't like it is it doesn't do anything to address the > > > > > more general problem. I would have expected instead something > > > > > to restrict dlopen() entirely including from other libraries > > > > > than just libc in certain circumstances. > > > >=20 > > > > At the very least if we feel that the libc_dlopen() thing is a > > > > temporary band-aid, we should move the new symbols into the > > > > private namespace so we can remove them once the better fix is in > > > > rather than being required to support them forever. > > libc_dlopen() is not exposed. > > The __FreeBSD_libc_enter_restricted_mode() is, and its name is ugly > > exactly to note the ugly intent. I do not see how the symbol can go > > int FBSDprivate_1.0 when it was supposed to be used by third-party > > applications. > >=20 > > Putting this hack into rtld itself IMO has to wide consequences. > > For libc, we can enumerate the points that stop work after the call, > > but for the generic applications the consequences are undefined. > > > >=20 > > > > --=20 > > > > John Baldwin > > >=20 > > > Pardon for not catching that when I had a chance to influence the > > > outcome, but I would like to voice my support to tucking the > > > ugliness into private version namespace. > > >=20 > > > --=20 > > > Alexander Kabaev > >=20 > Putting symbol into official namespace implies that we are willing to > provide and maintain it forever, which I do not think was the intent > for the function in question. FBSD_PRIVATE says nothing about who > should and should not link to it, only the level of API stability one > has to expect in the end. If/when we have better security mechanisms > (capsicum?) available to users by default, this should be ripped out > with extreme prejudice. The API is offered as a solution to third-parties. Telling them to use the API that is known to be broken in future is wrong step for the project, IMO. I doubt that proftpd will 'go capsicum'. --jviMX/jurV6/I2v0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk70yKcACgkQC3+MBN1Mb4h5cACfRdeJDJqjh9/7vDBddpb9DZ43 tVsAoI5tO5GPH5Lloc6O1tgTzyzWoE3B =4Zcb -----END PGP SIGNATURE----- --jviMX/jurV6/I2v0-- From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 18:42:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1F041065675; Fri, 23 Dec 2011 18:42:44 +0000 (UTC) (envelope-from kabaev@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 505648FC12; Fri, 23 Dec 2011 18:42:44 +0000 (UTC) Received: by qabg14 with SMTP id g14so7567442qab.13 for ; Fri, 23 Dec 2011 10:42:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=MF2JBBkoMoEEqEylPMuZWGUH2OwRQXYNxKeRXf/hKIA=; b=UrsDv2rno1iBp0pBjEW4r+aZlej8kx3bvXT/YO5TOzsqiuGsQjpczI1GqHew8Lcv9/ uSegIlJ0UU73wF/RtTuQFwYQSvhuJhyHPtZsDDyME1664Thc0mApjQcTaREVduihZUEl FVz2hxt/awDqj1DcRFeYeeKcscM8qLL5k+rTQ= Received: by 10.224.210.130 with SMTP id gk2mr19953246qab.23.1324665763806; Fri, 23 Dec 2011 10:42:43 -0800 (PST) Received: from kan.dyndns.org (c-24-63-226-98.hsd1.ma.comcast.net. [24.63.226.98]) by mx.google.com with ESMTPS id z1sm25669007qao.1.2011.12.23.10.42.42 (version=SSLv3 cipher=OTHER); Fri, 23 Dec 2011 10:42:43 -0800 (PST) Date: Fri, 23 Dec 2011 13:42:25 -0500 From: Alexander Kabaev To: Kostik Belousov Message-ID: <20111223134225.11ac22fd@kan.dyndns.org> In-Reply-To: <20111223182959.GL50300@deviant.kiev.zoral.com.ua> References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> <20111223132034.12192baa@kan.dyndns.org> <20111223182959.GL50300@deviant.kiev.zoral.com.ua> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/TYfRu/NI0Pads61ub84RGK+"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Colin Percival , John Baldwin Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 18:42:45 -0000 --Sig_/TYfRu/NI0Pads61ub84RGK+ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 23 Dec 2011 20:29:59 +0200 Kostik Belousov wrote: > On Fri, Dec 23, 2011 at 01:20:34PM -0500, Alexander Kabaev wrote: > > On Fri, 23 Dec 2011 19:51:43 +0200 > > Kostik Belousov wrote: > >=20 > > > On Fri, Dec 23, 2011 at 12:06:44PM -0500, Alexander Kabaev wrote: > > > > On Fri, 23 Dec 2011 11:22:34 -0500 > > > > John Baldwin wrote: > > > >=20 > > > > > On Friday, December 23, 2011 10:58:46 am John Baldwin wrote: > > > > > > On Friday, December 23, 2011 10:00:38 am Colin Percival > > > > > > wrote: > > > > > > > Author: cperciva > > > > > > > Date: Fri Dec 23 15:00:37 2011 > > > > > > > New Revision: 228843 > > > > > > > URL: http://svn.freebsd.org/changeset/base/228843 > > > > > > >=20 > > > > > > > Log: > > > > > > > Fix a problem whereby a corrupt DNS record can cause > > > > > > > named to crash. [11:06]=20 > > > > > > > Add an API for alerting internal libc routines to the > > > > > > > presence of "unsafe" paths post-chroot, and use it in > > > > > > > ftpd. [11:07] > > > > > >=20 > > > > > > Eh, the whole libc_dlopen() thing looks like a gross hack > > > > > > (and who came up with that weird symbol name for a public > > > > > > API????). Is it really even needed given the other fix to > > > > > > have ftpd drop privilege before execing a helper program? > > > > > > I guess the main reason I don't like it is it doesn't do > > > > > > anything to address the more general problem. I would have > > > > > > expected instead something to restrict dlopen() entirely > > > > > > including from other libraries than just libc in certain > > > > > > circumstances. > > > > >=20 > > > > > At the very least if we feel that the libc_dlopen() thing is a > > > > > temporary band-aid, we should move the new symbols into the > > > > > private namespace so we can remove them once the better fix > > > > > is in rather than being required to support them forever. > > > libc_dlopen() is not exposed. > > > The __FreeBSD_libc_enter_restricted_mode() is, and its name is > > > ugly exactly to note the ugly intent. I do not see how the symbol > > > can go int FBSDprivate_1.0 when it was supposed to be used by > > > third-party applications. > > >=20 > > > Putting this hack into rtld itself IMO has to wide consequences. > > > For libc, we can enumerate the points that stop work after the > > > call, but for the generic applications the consequences are > > > undefined. > > > > >=20 > > > > > --=20 > > > > > John Baldwin > > > >=20 > > > > Pardon for not catching that when I had a chance to influence > > > > the outcome, but I would like to voice my support to tucking the > > > > ugliness into private version namespace. > > > >=20 > > > > --=20 > > > > Alexander Kabaev > > >=20 > > Putting symbol into official namespace implies that we are willing > > to provide and maintain it forever, which I do not think was the > > intent for the function in question. FBSD_PRIVATE says nothing > > about who should and should not link to it, only the level of API > > stability one has to expect in the end. If/when we have better > > security mechanisms (capsicum?) available to users by default, this > > should be ripped out with extreme prejudice. >=20 > The API is offered as a solution to third-parties. Telling them to use > the API that is known to be broken in future is wrong step for the > project, IMO. >=20 > I doubt that proftpd will 'go capsicum'. Then proftp will have to contend with being known security hazard. Spamming every supported branch with the symbol that cries just to support programs that chroot into arbitrary environments and trust anything at all there is wrong step for the project. Committing to support said symbol for all of the eternity is even bigger mistake. =20 --=20 Alexander Kabaev --Sig_/TYfRu/NI0Pads61ub84RGK+ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iD8DBQFO9MuhQ6z1jMm+XZYRArrcAJ9Vtx8Qnztq9oK0hDH41zttAk1V0ACffqnB erT9XbQjXygPsASPPWRihkM= =0Hoo -----END PGP SIGNATURE----- --Sig_/TYfRu/NI0Pads61ub84RGK+-- From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 19:12:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3F141065687; Fri, 23 Dec 2011 19:12:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B261E8FC12; Fri, 23 Dec 2011 19:12:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNJC2hI079535; Fri, 23 Dec 2011 19:12:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNJC2K5079532; Fri, 23 Dec 2011 19:12:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112231912.pBNJC2K5079532@svn.freebsd.org> From: Alexander Motin Date: Fri, 23 Dec 2011 19:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228846 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 19:12:02 -0000 Author: mav Date: Fri Dec 23 19:12:02 2011 New Revision: 228846 URL: http://svn.freebsd.org/changeset/base/228846 Log: Use READ CAPACITY(16) to get information about device physical sectors. As soon as not all devices support READ CAPACITY(16), automatically fall back to READ CAPACITY(10) if CAM_REQ_INVALID or SSD_KEY_ILLEGAL_REQUEST status returned. It also provides first bits of information about Logical Block Provisioning (aka UNMAP/TRIM) support by the device. Modified: head/sys/cam/scsi/scsi_all.h head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_all.h ============================================================================== --- head/sys/cam/scsi/scsi_all.h Fri Dec 23 16:03:57 2011 (r228845) +++ head/sys/cam/scsi/scsi_all.h Fri Dec 23 19:12:02 2011 (r228846) @@ -1349,6 +1349,17 @@ struct scsi_read_capacity_data_long { uint8_t addr[8]; uint8_t length[4]; +#define SRC16_PROT_EN 0x01 +#define SRC16_P_TYPE 0x0e + uint8_t prot; +#define SRC16_LBPPBE 0x0f +#define SRC16_PI_EXPONENT 0xf0 +#define SRC16_PI_EXPONENT_SHIFT 4 + uint8_t prot_lbppbe; +#define SRC16_LALBA 0x3fff +#define SRC16_LBPRZ 0x4000 +#define SRC16_LBPME 0x8000 + uint8_t lalba_lbp[2]; }; struct scsi_report_luns Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Fri Dec 23 16:03:57 2011 (r228845) +++ head/sys/cam/scsi/scsi_da.c Fri Dec 23 19:12:02 2011 (r228846) @@ -82,7 +82,9 @@ typedef enum { DA_FLAG_WENT_IDLE = 0x040, DA_FLAG_RETRY_UA = 0x080, DA_FLAG_OPEN = 0x100, - DA_FLAG_SCTX_INIT = 0x200 + DA_FLAG_SCTX_INIT = 0x200, + DA_FLAG_CAN_RC16 = 0x400, + DA_FLAG_CAN_LBPME = 0x800 } da_flags; typedef enum { @@ -1533,6 +1535,14 @@ daregister(struct cam_periph *periph, vo else if (softc->minimum_cmd_size > 12) softc->minimum_cmd_size = 16; + /* Predict whether device may support READ CAPACITY(16). */ + if (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC3 || + (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC && + (cgd->inq_data.spc3_flags & SPC3_SID_PROTECT))) { + softc->flags |= DA_FLAG_CAN_RC16; + softc->state = DA_STATE_PROBE2; + } + /* * Register this media as a disk. */ @@ -1922,10 +1932,14 @@ dadone(struct cam_periph *periph, union struct disk_params *dp; uint32_t block_size; uint64_t maxsector; + u_int lbppbe; /* LB per physical block exponent. */ + u_int lalba; /* Lowest aligned LBA. */ if (softc->state == DA_STATE_PROBE) { block_size = scsi_4btoul(rdcap->length); maxsector = scsi_4btoul(rdcap->addr); + lbppbe = 0; + lalba = 0; /* * According to SBC-2, if the standard 10 @@ -1945,6 +1959,8 @@ dadone(struct cam_periph *periph, union } else { block_size = scsi_4btoul(rcaplong->length); maxsector = scsi_8btou64(rcaplong->addr); + lbppbe = rcaplong->prot_lbppbe & SRC16_LBPPBE; + lalba = scsi_2btoul(rcaplong->lalba_lbp); } /* @@ -1962,7 +1978,12 @@ dadone(struct cam_periph *periph, union announce_buf[0] = '\0'; cam_periph_invalidate(periph); } else { - dasetgeom(periph, block_size, maxsector, 0, 0); + dasetgeom(periph, block_size, maxsector, + lbppbe, lalba & SRC16_LALBA); + if (lalba & SRC16_LBPME) + softc->flags |= DA_FLAG_CAN_LBPME; + else + softc->flags &= ~DA_FLAG_CAN_LBPME; dp = &softc->params; snprintf(announce_buf, sizeof(announce_buf), "%juMB (%ju %u byte sectors: %dH %dS/T " @@ -2029,6 +2050,24 @@ dadone(struct cam_periph *periph, union &ascq, /*show_errors*/ 1); } /* + * If we tried READ CAPACITY(16) and failed, + * fallback to READ CAPACITY(10). + */ + if ((softc->state == DA_STATE_PROBE2) && + (softc->flags & DA_FLAG_CAN_RC16) && + (((csio->ccb_h.status & CAM_STATUS_MASK) == + CAM_REQ_INVALID) || + ((have_sense) && + (error_code == SSD_CURRENT_ERROR) && + (sense_key == SSD_KEY_ILLEGAL_REQUEST)))) { + softc->flags &= ~DA_FLAG_CAN_RC16; + softc->state = DA_STATE_PROBE; + free(rdcap, M_SCSIDA); + xpt_release_ccb(done_ccb); + xpt_schedule(periph, priority); + return; + } else + /* * Attach to anything that claims to be a * direct access or optical disk device, * as long as it doesn't return a "Logical @@ -2198,13 +2237,18 @@ dagetcapacity(struct cam_periph *periph) struct scsi_read_capacity_data_long *rcaplong; uint32_t block_len; uint64_t maxsector; - int error; + int error, rc16failed; u_int32_t sense_flags; + u_int lbppbe; /* Logical blocks per physical block exponent. */ + u_int lalba; /* Lowest aligned LBA. */ softc = (struct da_softc *)periph->softc; block_len = 0; maxsector = 0; + lbppbe = 0; + lalba = 0; error = 0; + rc16failed = 0; sense_flags = SF_RETRY_UA; if (softc->flags & DA_FLAG_PACK_REMOVABLE) sense_flags |= SF_NO_PRINT; @@ -2212,11 +2256,63 @@ dagetcapacity(struct cam_periph *periph) /* Do a read capacity */ rcap = (struct scsi_read_capacity_data *)malloc(sizeof(*rcaplong), M_SCSIDA, - M_NOWAIT); + M_NOWAIT | M_ZERO); if (rcap == NULL) return (ENOMEM); - + rcaplong = (struct scsi_read_capacity_data_long *)rcap; + ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); + + /* Try READ CAPACITY(16) first if we think it should work. */ + if (softc->flags & DA_FLAG_CAN_RC16) { + scsi_read_capacity_16(&ccb->csio, + /*retries*/ 4, + /*cbfcnp*/ dadone, + /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*lba*/ 0, + /*reladr*/ 0, + /*pmi*/ 0, + rcaplong, + /*sense_len*/ SSD_FULL_SIZE, + /*timeout*/ 60000); + ccb->ccb_h.ccb_bp = NULL; + + error = cam_periph_runccb(ccb, daerror, + /*cam_flags*/CAM_RETRY_SELTO, + sense_flags, + softc->disk->d_devstat); + + if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) + cam_release_devq(ccb->ccb_h.path, + /*relsim_flags*/0, + /*reduction*/0, + /*timeout*/0, + /*getcount_only*/0); + + if (error == 0) + goto rc16ok; + + /* If we got ILLEGAL REQUEST, do not prefer RC16 any more. */ + if ((ccb->ccb_h.status & CAM_STATUS_MASK) == + CAM_REQ_INVALID) { + softc->flags &= ~DA_FLAG_CAN_RC16; + } else if (((ccb->ccb_h.status & CAM_STATUS_MASK) == + CAM_SCSI_STATUS_ERROR) && + (ccb->csio.scsi_status == SCSI_STATUS_CHECK_COND) && + (ccb->ccb_h.status & CAM_AUTOSNS_VALID) && + ((ccb->ccb_h.flags & CAM_SENSE_PHYS) == 0) && + ((ccb->ccb_h.flags & CAM_SENSE_PTR) == 0)) { + int sense_key, error_code, asc, ascq; + + scsi_extract_sense(&ccb->csio.sense_data, + &error_code, &sense_key, &asc, &ascq); + if (sense_key == SSD_KEY_ILLEGAL_REQUEST) + softc->flags &= ~DA_FLAG_CAN_RC16; + } + rc16failed = 1; + } + + /* Do READ CAPACITY(10). */ scsi_read_capacity(&ccb->csio, /*retries*/4, /*cbfncp*/dadone, @@ -2242,13 +2338,12 @@ dagetcapacity(struct cam_periph *periph) block_len = scsi_4btoul(rcap->length); maxsector = scsi_4btoul(rcap->addr); - if (maxsector != 0xffffffff) + if (maxsector != 0xffffffff || rc16failed) goto done; } else goto done; - rcaplong = (struct scsi_read_capacity_data_long *)rcap; - + /* If READ CAPACITY(10) returned overflow, use READ CAPACITY(16) */ scsi_read_capacity_16(&ccb->csio, /*retries*/ 4, /*cbfcnp*/ dadone, @@ -2274,8 +2369,11 @@ dagetcapacity(struct cam_periph *periph) /*getcount_only*/0); if (error == 0) { +rc16ok: block_len = scsi_4btoul(rcaplong->length); maxsector = scsi_8btou64(rcaplong->addr); + lbppbe = rcaplong->prot_lbppbe & SRC16_LBPPBE; + lalba = scsi_2btoul(rcaplong->lalba_lbp); } done: @@ -2286,8 +2384,14 @@ done: "unsupportable block size %ju\n", (uintmax_t) block_len); error = EINVAL; - } else - dasetgeom(periph, block_len, maxsector, 0, 0); + } else { + dasetgeom(periph, block_len, maxsector, + lbppbe, lalba & SRC16_LALBA); + if (lalba & SRC16_LBPME) + softc->flags |= DA_FLAG_CAN_LBPME; + else + softc->flags &= ~DA_FLAG_CAN_LBPME; + } } xpt_release_ccb(ccb); From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 19:21:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8BA51065670; Fri, 23 Dec 2011 19:21:28 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id 88B148FC0C; Fri, 23 Dec 2011 19:21:28 +0000 (UTC) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 511A4149CA; Fri, 23 Dec 2011 11:21:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1324668088; bh=d+/C7/6j0myvbk8B+aIufy/BxWIDZ9A/+Ojup628lz4=; h=Message-ID:Date:From:Reply-To:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=npCaUmPBNwKKaHZKJXCXrqCiS1qcXYEViYzhbdnHRlV1/5UCcR2h4w34lYiwEX+tW NiwzK99yf3tOA8io6ne26iMhYLX/QIcYUkCYeFX5o8WVXkyz378VzwS41LckMoIWPy woswGexKspLI/u2tY3Cpf0rEdqjgrZCwUYKXrtek= Message-ID: <4EF4D4B7.7020109@delphij.net> Date: Fri, 23 Dec 2011 11:21:27 -0800 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: John Baldwin References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> In-Reply-To: <201112231058.46642.jhb@freebsd.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, d@delphij.net, Colin Percival Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 19:21:28 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12/23/11 07:58, John Baldwin wrote: > On Friday, December 23, 2011 10:00:38 am Colin Percival wrote: >> Author: cperciva Date: Fri Dec 23 15:00:37 2011 New Revision: >> 228843 URL: http://svn.freebsd.org/changeset/base/228843 >> >> Log: Fix a problem whereby a corrupt DNS record can cause named >> to crash. [11:06] >> >> Add an API for alerting internal libc routines to the presence >> of "unsafe" paths post-chroot, and use it in ftpd. [11:07] > > Eh, the whole libc_dlopen() thing looks like a gross hack (and who > came up with that weird symbol name for a public API????). Is it > really even needed given the other fix to have ftpd drop privilege > before execing a helper program? I guess the main reason I don't > like it is it doesn't do This is not sufficient if only privileges are dropped. The attacker can still get e.g. a shell or start an IRC bot if the application is not careful enough. The current form the patch is, is based on a lengthy discussion between secteam@ and re@ and we did thought about other alternatives, like using a wrapper around chroot(2) and contain everything in it, or check permissions on certain "important" files, etc. These would require changes to chroot(2) semantics which could break existing installations and the outcome could be quite silent which eventually results in this. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk701LcACgkQOfuToMruuMAoqACgiDXP636IAhXnEpa54UBQa9SW 2ncAnRulYPS4+BtqizIP2BEiu4bhmJss =C2U1 -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 19:53:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67ABB106566C; Fri, 23 Dec 2011 19:53:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56B8D8FC15; Fri, 23 Dec 2011 19:53:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNJrTQF080745; Fri, 23 Dec 2011 19:53:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNJrTt2080743; Fri, 23 Dec 2011 19:53:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112231953.pBNJrTt2080743@svn.freebsd.org> From: Alexander Motin Date: Fri, 23 Dec 2011 19:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228847 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 19:53:29 -0000 Author: mav Date: Fri Dec 23 19:53:28 2011 New Revision: 228847 URL: http://svn.freebsd.org/changeset/base/228847 Log: Addition to r228808: READ CD is a 12 byte command. So fill additional bytes and update CDB length when patching READ(10). MFC after: 1 month Modified: head/sys/cam/scsi/scsi_cd.c Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Fri Dec 23 19:12:02 2011 (r228846) +++ head/sys/cam/scsi/scsi_cd.c Fri Dec 23 19:53:28 2011 (r228847) @@ -1487,6 +1487,9 @@ cdstart(struct cam_periph *periph, union if (softc->params.blksize == 2352) { start_ccb->csio.cdb_io.cdb_bytes[0] = READ_CD; start_ccb->csio.cdb_io.cdb_bytes[9] = 0xf8; + start_ccb->csio.cdb_io.cdb_bytes[10] = 0; + start_ccb->csio.cdb_io.cdb_bytes[11] = 0; + start_ccb->csio.cdb_len = 12; } start_ccb->ccb_h.ccb_state = CD_CCB_BUFFER_IO; From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 20:03:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 719E5106564A; Fri, 23 Dec 2011 20:03:20 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6099D8FC0C; Fri, 23 Dec 2011 20:03:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNK3K24081100; Fri, 23 Dec 2011 20:03:20 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNK3KIr081097; Fri, 23 Dec 2011 20:03:20 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201112232003.pBNK3KIr081097@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Fri, 23 Dec 2011 20:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228848 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 20:03:20 -0000 Author: des Date: Fri Dec 23 20:03:18 2011 New Revision: 228848 URL: http://svn.freebsd.org/changeset/base/228848 Log: give bapt@ a src bit Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Fri Dec 23 19:53:28 2011 (r228847) +++ svnadmin/conf/access Fri Dec 23 20:03:18 2011 (r228848) @@ -34,6 +34,7 @@ art attilio avatar avg +bapt bde benl benno Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Fri Dec 23 19:53:28 2011 (r228847) +++ svnadmin/conf/mentors Fri Dec 23 20:03:18 2011 (r228848) @@ -13,6 +13,7 @@ anchie bz andrew imp art avg Co-mentor: marcel +bapt des benl philip Co-mentor: simon eri mlaier Co-mentor: thompsa gber cognet From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 20:11:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FF081065672; Fri, 23 Dec 2011 20:11:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EA138FC08; Fri, 23 Dec 2011 20:11:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNKBcx8081397; Fri, 23 Dec 2011 20:11:38 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNKBbaW081393; Fri, 23 Dec 2011 20:11:38 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112232011.pBNKBbaW081393@svn.freebsd.org> From: John Baldwin Date: Fri, 23 Dec 2011 20:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228849 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 20:11:38 -0000 Author: jhb Date: Fri Dec 23 20:11:37 2011 New Revision: 228849 URL: http://svn.freebsd.org/changeset/base/228849 Log: Add post-VOP hooks for VOP_DELETEEXTATTR() and VOP_SETEXTATTR() and use these to trigger a NOTE_ATTRIB EVFILT_VNODE kevent when the extended attributes of a vnode are changed. Note that OS X already implements this behavior. Reviewed by: rwatson MFC after: 2 weeks Modified: head/sys/kern/vfs_subr.c head/sys/kern/vnode_if.src head/sys/sys/vnode.h Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Dec 23 20:03:18 2011 (r228848) +++ head/sys/kern/vfs_subr.c Fri Dec 23 20:11:37 2011 (r228849) @@ -4033,6 +4033,15 @@ vop_create_post(void *ap, int rc) } void +vop_deleteextattr_post(void *ap, int rc) +{ + struct vop_setattr_args *a = ap; + + if (!rc) + VFS_KNOTE_LOCKED(a->a_vp, NOTE_ATTRIB); +} + +void vop_link_post(void *ap, int rc) { struct vop_link_args *a = ap; @@ -4114,6 +4123,15 @@ vop_setattr_post(void *ap, int rc) } void +vop_setextattr_post(void *ap, int rc) +{ + struct vop_setattr_args *a = ap; + + if (!rc) + VFS_KNOTE_LOCKED(a->a_vp, NOTE_ATTRIB); +} + +void vop_symlink_post(void *ap, int rc) { struct vop_symlink_args *a = ap; Modified: head/sys/kern/vnode_if.src ============================================================================== --- head/sys/kern/vnode_if.src Fri Dec 23 20:03:18 2011 (r228848) +++ head/sys/kern/vnode_if.src Fri Dec 23 20:11:37 2011 (r228849) @@ -569,6 +569,7 @@ vop_openextattr { %% deleteextattr vp E E E +%! deleteextattr post vop_deleteextattr_post vop_deleteextattr { IN struct vnode *vp; @@ -580,6 +581,7 @@ vop_deleteextattr { %% setextattr vp E E E +%! setextattr post vop_setextattr_post vop_setextattr { IN struct vnode *vp; Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Dec 23 20:03:18 2011 (r228848) +++ head/sys/sys/vnode.h Fri Dec 23 20:11:37 2011 (r228849) @@ -705,6 +705,7 @@ int vop_panic(struct vop_generic_args *a /* These are called from within the actual VOPS. */ void vop_create_post(void *a, int rc); +void vop_deleteextattr_post(void *a, int rc); void vop_link_post(void *a, int rc); void vop_lock_pre(void *a); void vop_lock_post(void *a, int rc); @@ -717,6 +718,7 @@ void vop_rename_post(void *a, int rc); void vop_rename_pre(void *a); void vop_rmdir_post(void *a, int rc); void vop_setattr_post(void *a, int rc); +void vop_setextattr_post(void *a, int rc); void vop_strategy_pre(void *a); void vop_symlink_post(void *a, int rc); void vop_unlock_post(void *a, int rc); From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 20:59:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27DD7106566B; Fri, 23 Dec 2011 20:59:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 169B78FC08; Fri, 23 Dec 2011 20:59:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNKxDuq082948; Fri, 23 Dec 2011 20:59:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNKxDpb082946; Fri, 23 Dec 2011 20:59:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112232059.pBNKxDpb082946@svn.freebsd.org> From: Alexander Motin Date: Fri, 23 Dec 2011 20:59:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228851 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 20:59:14 -0000 Author: mav Date: Fri Dec 23 20:59:13 2011 New Revision: 228851 URL: http://svn.freebsd.org/changeset/base/228851 Log: Report stripeoffset as zero not stripesize if physical block is zero aligned, same as it is done for ATA. Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Fri Dec 23 20:57:25 2011 (r228850) +++ head/sys/cam/scsi/scsi_da.c Fri Dec 23 20:59:13 2011 (r228851) @@ -2416,7 +2416,8 @@ dasetgeom(struct cam_periph *periph, uin dp->sectors = maxsector + 1; if (lbppbe > 0) { dp->stripesize = block_len << lbppbe; - dp->stripeoffset = dp->stripesize - block_len * lalba; + dp->stripeoffset = (dp->stripesize - block_len * lalba) % + dp->stripesize; } else if (softc->quirks & DA_Q_4K) { dp->stripesize = 4096; dp->stripeoffset = 0; From owner-svn-src-all@FreeBSD.ORG Fri Dec 23 22:10:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6DA11065672; Fri, 23 Dec 2011 22:10:55 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C53A68FC0A; Fri, 23 Dec 2011 22:10:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBNMAtnf085121; Fri, 23 Dec 2011 22:10:55 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBNMAtV0085119; Fri, 23 Dec 2011 22:10:55 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201112232210.pBNMAtV0085119@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Fri, 23 Dec 2011 22:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228853 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2011 22:10:55 -0000 Author: gonzo Date: Fri Dec 23 22:10:55 2011 New Revision: 228853 URL: http://svn.freebsd.org/changeset/base/228853 Log: - Set CF physical address base in sysinfo structure Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Fri Dec 23 20:59:58 2011 (r228852) +++ head/sys/mips/cavium/octeon_machdep.c Fri Dec 23 22:10:55 2011 (r228853) @@ -571,6 +571,8 @@ octeon_process_app_desc_ver_6(void) octeon_bootinfo->eclock_hz); memcpy(cvmx_sysinfo_get()->mac_addr_base, octeon_bootinfo->mac_addr_base, 6); cvmx_sysinfo_get()->mac_addr_count = octeon_bootinfo->mac_addr_count; + cvmx_sysinfo_get()->compact_flash_common_base_addr = + octeon_bootinfo->compact_flash_common_base_addr; } static void From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 00:19:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 044D1106566B; Sat, 24 Dec 2011 00:19:55 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 9253814F3B4; Sat, 24 Dec 2011 00:19:52 +0000 (UTC) Message-ID: <4EF51AA8.5040702@FreeBSD.org> Date: Fri, 23 Dec 2011 16:19:52 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Alexander Kabaev References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> <20111223132034.12192baa@kan.dyndns.org> <20111223182959.GL50300@deviant.kiev.zoral.com.ua> <20111223134225.11ac22fd@kan.dyndns.org> In-Reply-To: <20111223134225.11ac22fd@kan.dyndns.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Colin Percival , Kostik Belousov Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 00:19:55 -0000 On 12/23/2011 10:42, Alexander Kabaev wrote: > On Fri, 23 Dec 2011 20:29:59 +0200 > Kostik Belousov wrote: > >> On Fri, Dec 23, 2011 at 01:20:34PM -0500, Alexander Kabaev wrote: >>> On Fri, 23 Dec 2011 19:51:43 +0200 >>> Kostik Belousov wrote: >>> >>>> On Fri, Dec 23, 2011 at 12:06:44PM -0500, Alexander Kabaev wrote: >>>>> On Fri, 23 Dec 2011 11:22:34 -0500 >>>>> John Baldwin wrote: >>>>> >>>>>> On Friday, December 23, 2011 10:58:46 am John Baldwin wrote: >>>>>>> On Friday, December 23, 2011 10:00:38 am Colin Percival >>>>>>> wrote: >>>>>>>> Author: cperciva >>>>>>>> Date: Fri Dec 23 15:00:37 2011 >>>>>>>> New Revision: 228843 >>>>>>>> URL: http://svn.freebsd.org/changeset/base/228843 >>>>>>>> >>>>>>>> Log: >>>>>>>> Fix a problem whereby a corrupt DNS record can cause >>>>>>>> named to crash. [11:06] >>>>>>>> Add an API for alerting internal libc routines to the >>>>>>>> presence of "unsafe" paths post-chroot, and use it in >>>>>>>> ftpd. [11:07] >>>>>>> >>>>>>> Eh, the whole libc_dlopen() thing looks like a gross hack >>>>>>> (and who came up with that weird symbol name for a public >>>>>>> API????). Is it really even needed given the other fix to >>>>>>> have ftpd drop privilege before execing a helper program? >>>>>>> I guess the main reason I don't like it is it doesn't do >>>>>>> anything to address the more general problem. I would have >>>>>>> expected instead something to restrict dlopen() entirely >>>>>>> including from other libraries than just libc in certain >>>>>>> circumstances. >>>>>> >>>>>> At the very least if we feel that the libc_dlopen() thing is a >>>>>> temporary band-aid, we should move the new symbols into the >>>>>> private namespace so we can remove them once the better fix >>>>>> is in rather than being required to support them forever. >>>> libc_dlopen() is not exposed. >>>> The __FreeBSD_libc_enter_restricted_mode() is, and its name is >>>> ugly exactly to note the ugly intent. I do not see how the symbol >>>> can go int FBSDprivate_1.0 when it was supposed to be used by >>>> third-party applications. >>>> >>>> Putting this hack into rtld itself IMO has to wide consequences. >>>> For libc, we can enumerate the points that stop work after the >>>> call, but for the generic applications the consequences are >>>> undefined. >>>>>> >>>>>> -- >>>>>> John Baldwin >>>>> >>>>> Pardon for not catching that when I had a chance to influence >>>>> the outcome, but I would like to voice my support to tucking the >>>>> ugliness into private version namespace. >>>>> >>>>> -- >>>>> Alexander Kabaev >>>> >>> Putting symbol into official namespace implies that we are willing >>> to provide and maintain it forever, which I do not think was the >>> intent for the function in question. FBSD_PRIVATE says nothing >>> about who should and should not link to it, only the level of API >>> stability one has to expect in the end. If/when we have better >>> security mechanisms (capsicum?) available to users by default, this >>> should be ripped out with extreme prejudice. >> >> The API is offered as a solution to third-parties. Telling them to use >> the API that is known to be broken in future is wrong step for the >> project, IMO. >> >> I doubt that proftpd will 'go capsicum'. > > Then proftp will have to contend with being known security hazard. > Spamming every supported branch with the symbol that cries just to > support programs that chroot into arbitrary environments and trust > anything at all there is wrong step for the project. Committing to > support said symbol for all of the eternity is even bigger mistake. I agree with those that have concerns about this solution. It seems ugly and painful, and if the vulnerability is so fundamental to chroot and/or nsdispatch then it seems that more than ftp would be affected. Doug -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 00:22:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3D771065677; Sat, 24 Dec 2011 00:22:21 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78AA98FC17; Sat, 24 Dec 2011 00:22:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBO0MLpf089131; Sat, 24 Dec 2011 00:22:21 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBO0MLAb089129; Sat, 24 Dec 2011 00:22:21 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201112240022.pBO0MLAb089129@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sat, 24 Dec 2011 00:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228854 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 00:22:22 -0000 Author: gonzo Date: Sat Dec 24 00:22:21 2011 New Revision: 228854 URL: http://svn.freebsd.org/changeset/base/228854 Log: - Enable usbus on octusb Modified: head/sys/dev/usb/controller/usb_controller.c Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Fri Dec 23 22:10:55 2011 (r228853) +++ head/sys/dev/usb/controller/usb_controller.c Sat Dec 24 00:22:21 2011 (r228854) @@ -122,6 +122,7 @@ DRIVER_MODULE(usbus, xhci, usb_driver, u DRIVER_MODULE(usbus, at91_udp, usb_driver, usb_devclass, 0, 0); DRIVER_MODULE(usbus, musbotg, usb_driver, usb_devclass, 0, 0); DRIVER_MODULE(usbus, uss820, usb_driver, usb_devclass, 0, 0); +DRIVER_MODULE(usbus, octusb, usb_driver, usb_devclass, 0, 0); /*------------------------------------------------------------------------* * usb_probe From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 00:23:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 168AA106566C; Sat, 24 Dec 2011 00:23:28 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 056328FC13; Sat, 24 Dec 2011 00:23:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBO0NRWw089201; Sat, 24 Dec 2011 00:23:27 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBO0NRcG089199; Sat, 24 Dec 2011 00:23:27 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201112240023.pBO0NRcG089199@svn.freebsd.org> From: Sergey Kandaurov Date: Sat, 24 Dec 2011 00:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228855 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 00:23:28 -0000 Author: pluknet Date: Sat Dec 24 00:23:27 2011 New Revision: 228855 URL: http://svn.freebsd.org/changeset/base/228855 Log: Fix LINT-VIMAGE build after r228814: use virtualized pf_pool_limits. Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Sat Dec 24 00:22:21 2011 (r228854) +++ head/sys/contrib/pf/net/if_pfsync.c Sat Dec 24 00:23:27 2011 (r228855) @@ -1613,7 +1613,7 @@ pfsync_in_bus(struct pfsync_pkt *pkt, st case PFSYNC_BUS_START: #ifdef __FreeBSD__ callout_reset(&sc->sc_bulkfail_tmo, 4 * hz + - pf_pool_limits[PF_LIMIT_STATES].limit / + V_pf_pool_limits[PF_LIMIT_STATES].limit / ((sc->sc_sync_if->if_mtu - PFSYNC_MINPKT) / sizeof(struct pfsync_state)), pfsync_bulk_fail, V_pfsyncif); From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 01:32:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CE42106566C; Sat, 24 Dec 2011 01:32:02 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 208188FC0A; Sat, 24 Dec 2011 01:32:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBO1W2KP091281; Sat, 24 Dec 2011 01:32:02 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBO1W173091277; Sat, 24 Dec 2011 01:32:01 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201112240132.pBO1W173091277@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 24 Dec 2011 01:32:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228856 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 01:32:02 -0000 Author: lstewart Date: Sat Dec 24 01:32:01 2011 New Revision: 228856 URL: http://svn.freebsd.org/changeset/base/228856 Log: Introduce the sysclock_getsnapshot() and sysclock_snap2bintime() KPIs. The sysclock_getsnapshot() function allows the caller to obtain a snapshot of all the system clock and timecounter state required to create time stamps at a later point. The sysclock_snap2bintime() function converts a previously obtained snapshot into a bintime time stamp according to the specified flags e.g. which system clock, uptime vs absolute time, etc. These KPIs enable useful functionality, including direct comparison of the feedback and feed-forward system clocks and generation of multiple time stamps with different formats from a single timecounter read. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ In collaboration with: Julien Ridoux (jridoux at unimelb edu au) Modified: head/sys/kern/kern_ntptime.c head/sys/kern/kern_tc.c head/sys/sys/timeffc.h Modified: head/sys/kern/kern_ntptime.c ============================================================================== --- head/sys/kern/kern_ntptime.c Sat Dec 24 00:23:27 2011 (r228855) +++ head/sys/kern/kern_ntptime.c Sat Dec 24 01:32:01 2011 (r228856) @@ -148,13 +148,13 @@ typedef int64_t l_fp; #define SHIFT_FLL 2 /* FLL loop gain (shift) */ static int time_state = TIME_OK; /* clock state */ -static int time_status = STA_UNSYNC; /* clock status bits */ +int time_status = STA_UNSYNC; /* clock status bits */ static long time_tai; /* TAI offset (s) */ static long time_monitor; /* last time offset scaled (ns) */ static long time_constant; /* poll interval (shift) (s) */ static long time_precision = 1; /* clock precision (ns) */ static long time_maxerror = MAXPHASE / 1000; /* maximum error (us) */ -static long time_esterror = MAXPHASE / 1000; /* estimated error (us) */ +long time_esterror = MAXPHASE / 1000; /* estimated error (us) */ static long time_reftime; /* time at last adjustment (s) */ static l_fp time_offset; /* time offset (ns) */ static l_fp time_freq; /* frequency offset (ns/s) */ Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Sat Dec 24 00:23:27 2011 (r228855) +++ head/sys/kern/kern_tc.c Sat Dec 24 01:32:01 2011 (r228856) @@ -28,9 +28,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef FFCLOCK #include -#endif #include #include #include @@ -461,8 +459,6 @@ getmicrotime(struct timeval *tvp) * necessary. */ -int sysclock_active = SYSCLOCK_FBCK; - /* Feed-forward clock estimates kept updated by the synchronization daemon. */ struct ffclock_estimate ffclock_estimate; struct bintime ffclock_boottime; /* Feed-forward boot time estimate. */ @@ -956,9 +952,149 @@ getmicrotime(struct timeval *tvp) getmicrouptime_fromclock(tvp, sysclock_active); } + #endif /* FFCLOCK */ /* + * System clock currently providing time to the system. Modifiable via sysctl + * when the FFCLOCK option is defined. + */ +int sysclock_active = SYSCLOCK_FBCK; + +/* Internal NTP status and error estimates. */ +extern int time_status; +extern long time_esterror; + +/* + * Take a snapshot of sysclock data which can be used to compare system clocks + * and generate timestamps after the fact. + */ +void +sysclock_getsnapshot(struct sysclock_snap *clock_snap, int fast) +{ + struct fbclock_info *fbi; + struct timehands *th; + struct bintime bt; + unsigned int delta, gen; +#ifdef FFCLOCK + ffcounter ffcount; + struct fftimehands *ffth; + struct ffclock_info *ffi; + struct ffclock_estimate cest; + + ffi = &clock_snap->ff_info; +#endif + + fbi = &clock_snap->fb_info; + delta = 0; + + do { + th = timehands; + gen = th->th_generation; + fbi->th_scale = th->th_scale; + fbi->tick_time = th->th_offset; +#ifdef FFCLOCK + ffth = fftimehands; + ffi->tick_time = ffth->tick_time_lerp; + ffi->tick_time_lerp = ffth->tick_time_lerp; + ffi->period = ffth->cest.period; + ffi->period_lerp = ffth->period_lerp; + clock_snap->ffcount = ffth->tick_ffcount; + cest = ffth->cest; +#endif + if (!fast) + delta = tc_delta(th); + } while (gen == 0 || gen != th->th_generation); + + clock_snap->delta = delta; + clock_snap->sysclock_active = sysclock_active; + + /* Record feedback clock status and error. */ + clock_snap->fb_info.status = time_status; + /* XXX: Very crude estimate of feedback clock error. */ + bt.sec = time_esterror / 1000000; + bt.frac = ((time_esterror - bt.sec) * 1000000) * + (uint64_t)18446744073709ULL; + clock_snap->fb_info.error = bt; + +#ifdef FFCLOCK + if (!fast) + clock_snap->ffcount += delta; + + /* Record feed-forward clock leap second adjustment. */ + ffi->leapsec_adjustment = cest.leapsec_total; + if (clock_snap->ffcount > cest.leapsec_next) + ffi->leapsec_adjustment -= cest.leapsec; + + /* Record feed-forward clock status and error. */ + clock_snap->ff_info.status = cest.status; + ffcount = clock_snap->ffcount - cest.update_ffcount; + ffclock_convert_delta(ffcount, cest.period, &bt); + /* 18446744073709 = int(2^64/1e12), err_bound_rate in [ps/s]. */ + bintime_mul(&bt, cest.errb_rate * (uint64_t)18446744073709ULL); + /* 18446744073 = int(2^64 / 1e9), since err_abs in [ns]. */ + bintime_addx(&bt, cest.errb_abs * (uint64_t)18446744073ULL); + clock_snap->ff_info.error = bt; +#endif +} + +/* + * Convert a sysclock snapshot into a struct bintime based on the specified + * clock source and flags. + */ +int +sysclock_snap2bintime(struct sysclock_snap *cs, struct bintime *bt, + int whichclock, uint32_t flags) +{ +#ifdef FFCLOCK + struct bintime bt2; + uint64_t period; +#endif + + switch (whichclock) { + case SYSCLOCK_FBCK: + *bt = cs->fb_info.tick_time; + + /* If snapshot was created with !fast, delta will be >0. */ + if (cs->delta > 0) + bintime_addx(bt, cs->fb_info.th_scale * cs->delta); + + if ((flags & FBCLOCK_UPTIME) == 0) + bintime_add(bt, &boottimebin); + break; +#ifdef FFCLOCK + case SYSCLOCK_FFWD: + if (flags & FFCLOCK_LERP) { + *bt = cs->ff_info.tick_time_lerp; + period = cs->ff_info.period_lerp; + } else { + *bt = cs->ff_info.tick_time; + period = cs->ff_info.period; + } + + /* If snapshot was created with !fast, delta will be >0. */ + if (cs->delta > 0) { + ffclock_convert_delta(cs->delta, period, &bt2); + bintime_add(bt, &bt2); + } + + /* Leap second adjustment. */ + if (flags & FFCLOCK_LEAPSEC) + bt->sec -= cs->ff_info.leapsec_adjustment; + + /* Boot time adjustment, for uptime/monotonic clocks. */ + if (flags & FFCLOCK_UPTIME) + bintime_sub(bt, &ffclock_boottime); +#endif + default: + return (EINVAL); + break; + } + + return (0); +} + +/* * Initialize a new timecounter and possibly use it. */ void Modified: head/sys/sys/timeffc.h ============================================================================== --- head/sys/sys/timeffc.h Sat Dec 24 00:23:27 2011 (r228855) +++ head/sys/sys/timeffc.h Sat Dec 24 01:32:01 2011 (r228856) @@ -81,19 +81,75 @@ extern int sysclock_active; #define FFCLOCK_STA_WARMUP 2 /* - * Clock flags to select how the feed-forward counter is converted to absolute - * time by ffclock_convert_abs(). - * FAST: do not read the hardware counter, return feed-forward clock time - * at last tick. The time returned has the resolution of the kernel - * tick (1/hz [s]). - * LERP: linear interpolation of ffclock time to guarantee monotonic time. - * LEAPSEC: include leap seconds. - * UPTIME: removes time of boot. - */ -#define FFCLOCK_FAST 1 -#define FFCLOCK_LERP 2 -#define FFCLOCK_LEAPSEC 4 -#define FFCLOCK_UPTIME 8 + * Flags for use by sysclock_snap2bintime() and various ffclock_ functions to + * control how the timecounter hardware is read and how the hardware snapshot is + * converted into absolute time. + * {FB|FF}CLOCK_FAST: Do not read the hardware counter, instead using the + * value at last tick. The time returned has a resolution + * of the kernel tick timer (1/hz [s]). + * FFCLOCK_LERP: Linear interpolation of ffclock time to guarantee + * monotonic time. + * FFCLOCK_LEAPSEC: Include leap seconds. + * {FB|FF}CLOCK_UPTIME: Time stamp should be relative to system boot, not epoch. + */ +#define FFCLOCK_FAST 0x00000001 +#define FFCLOCK_LERP 0x00000002 +#define FFCLOCK_LEAPSEC 0x00000004 +#define FFCLOCK_UPTIME 0x00000008 +#define FFCLOCK_MASK 0x0000ffff + +#define FBCLOCK_FAST 0x00010000 /* Currently unused. */ +#define FBCLOCK_UPTIME 0x00020000 +#define FBCLOCK_MASK 0xffff0000 + +/* + * Feedback clock specific info structure. The feedback clock's estimation of + * clock error is an absolute figure determined by the NTP algorithm. The status + * is determined by the userland daemon. + */ +struct fbclock_info { + struct bintime error; + struct bintime tick_time; + uint64_t th_scale; + int status; +}; + +/* + * Feed-forward clock specific info structure. The feed-forward clock's + * estimation of clock error is an upper bound, which although potentially + * looser than the feedback clock equivalent, is much more reliable. The status + * is determined by the userland daemon. + */ +struct ffclock_info { + struct bintime error; + struct bintime tick_time; + struct bintime tick_time_lerp; + uint64_t period; + uint64_t period_lerp; + int leapsec_adjustment; + int status; +}; + +/* + * Snapshot of system clocks and related information. Holds time read from each + * clock based on a single read of the active hardware timecounter, as well as + * respective clock information such as error estimates and the ffcounter value + * at the time of the read. + */ +struct sysclock_snap { + struct fbclock_info fb_info; + struct ffclock_info ff_info; + ffcounter ffcount; + unsigned int delta; + int sysclock_active; +}; + +/* Take a snapshot of the system clocks and related information. */ +void sysclock_getsnapshot(struct sysclock_snap *clock_snap, int fast); + +/* Convert a timestamp from the selected system clock into bintime. */ +int sysclock_snap2bintime(struct sysclock_snap *cs, struct bintime *bt, + int whichclock, uint32_t flags); /* Resets feed-forward clock from RTC */ void ffclock_reset_clock(struct timespec *ts); From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 04:52:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98409106564A; Sat, 24 Dec 2011 04:52:54 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3DE848FC0A; Sat, 24 Dec 2011 04:52:53 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so8428035obb.13 for ; Fri, 23 Dec 2011 20:52:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ein/rAID9vyNNjM6jn2x0TnLVzZJr6GW4cGXVJayctY=; b=N9LH4lSU6g6LAIDC3wgzx+c6KsVRoCqtQsPcPP6YVlJySJEomDZMrdiTArmELWTxwP phUgnjJDBEkerAVGFPbBS5Z1Doaxz01Z/YGaTJOBaRend/ZRhbj7KUbK7aLMIWCEbmNH O6KXQuvk1cZeyyOY7oieeq2G8BPljbQL4hpPA= MIME-Version: 1.0 Received: by 10.182.89.5 with SMTP id bk5mr14824114obb.50.1324700555141; Fri, 23 Dec 2011 20:22:35 -0800 (PST) Received: by 10.182.67.163 with HTTP; Fri, 23 Dec 2011 20:22:35 -0800 (PST) In-Reply-To: <4EF51AA8.5040702@FreeBSD.org> References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> <20111223132034.12192baa@kan.dyndns.org> <20111223182959.GL50300@deviant.kiev.zoral.com.ua> <20111223134225.11ac22fd@kan.dyndns.org> <4EF51AA8.5040702@FreeBSD.org> Date: Fri, 23 Dec 2011 20:22:35 -0800 Message-ID: From: Xin LI To: Doug Barton Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Colin Percival , Kostik Belousov , Alexander Kabaev Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 04:52:54 -0000 On Fri, Dec 23, 2011 at 4:19 PM, Doug Barton wrote: > On 12/23/2011 10:42, Alexander Kabaev wrote: >> On Fri, 23 Dec 2011 20:29:59 +0200 >> Kostik Belousov wrote: >> >>> On Fri, Dec 23, 2011 at 01:20:34PM -0500, Alexander Kabaev wrote: >>>> On Fri, 23 Dec 2011 19:51:43 +0200 >>>> Kostik Belousov wrote: >>>> >>>>> On Fri, Dec 23, 2011 at 12:06:44PM -0500, Alexander Kabaev wrote: >>>>>> On Fri, 23 Dec 2011 11:22:34 -0500 >>>>>> John Baldwin wrote: >>>>>> >>>>>>> On Friday, December 23, 2011 10:58:46 am John Baldwin wrote: >>>>>>>> On Friday, December 23, 2011 10:00:38 am Colin Percival >>>>>>>> wrote: >>>>>>>>> Author: cperciva >>>>>>>>> Date: Fri Dec 23 15:00:37 2011 >>>>>>>>> New Revision: 228843 >>>>>>>>> URL: http://svn.freebsd.org/changeset/base/228843 >>>>>>>>> >>>>>>>>> Log: >>>>>>>>> =C2=A0 Fix a problem whereby a corrupt DNS record can cause >>>>>>>>> named to crash. [11:06] >>>>>>>>> =C2=A0 Add an API for alerting internal libc routines to the >>>>>>>>> presence of "unsafe" paths post-chroot, and use it in >>>>>>>>> ftpd. [11:07] >>>>>>>> >>>>>>>> Eh, the whole libc_dlopen() thing looks like a gross hack >>>>>>>> (and who came up with that weird symbol name for a public >>>>>>>> API????). Is it really even needed given the other fix to >>>>>>>> have ftpd drop privilege before execing a helper program? >>>>>>>> I guess the main reason I don't like it is it doesn't do >>>>>>>> anything to address the more general problem. =C2=A0I would have >>>>>>>> expected instead something to restrict dlopen() entirely >>>>>>>> including from other libraries than just libc in certain >>>>>>>> circumstances. >>>>>>> >>>>>>> At the very least if we feel that the libc_dlopen() thing is a >>>>>>> temporary band-aid, we should move the new symbols into the >>>>>>> private namespace so we can remove them once the better fix >>>>>>> is in rather than being required to support them forever. >>>>> libc_dlopen() is not exposed. >>>>> The __FreeBSD_libc_enter_restricted_mode() is, and its name is >>>>> ugly exactly to note the ugly intent. I do not see how the symbol >>>>> can go int FBSDprivate_1.0 when it was supposed to be used by >>>>> third-party applications. >>>>> >>>>> Putting this hack into rtld itself IMO has to wide consequences. >>>>> For libc, we can enumerate the points that stop work after the >>>>> call, but for the generic applications the consequences are >>>>> undefined. >>>>>>> >>>>>>> -- >>>>>>> John Baldwin >>>>>> >>>>>> Pardon for not catching that when I had a chance to influence >>>>>> the outcome, but I would like to voice my support to tucking the >>>>>> ugliness into private version namespace. >>>>>> >>>>>> -- >>>>>> Alexander Kabaev >>>>> >>>> Putting symbol into official namespace implies that we are willing >>>> to provide and maintain it forever, which I do not think was the >>>> intent for the function in question. FBSD_PRIVATE says nothing >>>> about who should and should not link to it, only the level of API >>>> stability one has to expect in the end. If/when we have better >>>> security mechanisms (capsicum?) available to users by default, this >>>> should be ripped out with extreme prejudice. >>> >>> The API is offered as a solution to third-parties. Telling them to use >>> the API that is known to be broken in future is wrong step for the >>> project, IMO. >>> >>> I doubt that proftpd will 'go capsicum'. >> >> Then proftp will have to contend with being known security hazard. >> Spamming every supported branch with the symbol that cries just to >> support programs that chroot into arbitrary environments and trust >> anything at all there is wrong step for the project. Committing to >> support said symbol for all of the eternity is even bigger mistake. > > I agree with those that have concerns about this solution. It seems ugly > and painful, and if the vulnerability is so fundamental to chroot and/or > nsdispatch then it seems that more than ftp would be affected. That's correct, this affects ALL applications that does chroot into a hostile environment where /etc and /lib can be controlled by unprivileged user, which is in my opinion fundamentally insecure in the first place. Cheers, --=20 Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 08:20:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 54C751065675; Sat, 24 Dec 2011 08:20:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 4117714FBF9; Sat, 24 Dec 2011 08:20:15 +0000 (UTC) Message-ID: <4EF58B3E.3090408@FreeBSD.org> Date: Sat, 24 Dec 2011 00:20:14 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Xin LI References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> <20111223132034.12192baa@kan.dyndns.org> <20111223182959.GL50300@deviant.kiev.zoral.com.ua> <20111223134225.11ac22fd@kan.dyndns.org> <4EF51AA8.5040702@FreeBSD.org> In-Reply-To: X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Colin Percival , Kostik Belousov , Alexander Kabaev Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 08:20:22 -0000 On 12/23/2011 20:22, Xin LI wrote: > On Fri, Dec 23, 2011 at 4:19 PM, Doug Barton wrote: >> On 12/23/2011 10:42, Alexander Kabaev wrote: >>> On Fri, 23 Dec 2011 20:29:59 +0200 >>> Kostik Belousov wrote: >>> >>>> On Fri, Dec 23, 2011 at 01:20:34PM -0500, Alexander Kabaev wrote: >>>>> On Fri, 23 Dec 2011 19:51:43 +0200 >>>>> Kostik Belousov wrote: >>>>> >>>>>> On Fri, Dec 23, 2011 at 12:06:44PM -0500, Alexander Kabaev wrote: >>>>>>> On Fri, 23 Dec 2011 11:22:34 -0500 >>>>>>> John Baldwin wrote: >>>>>>> >>>>>>>> On Friday, December 23, 2011 10:58:46 am John Baldwin wrote: >>>>>>>>> On Friday, December 23, 2011 10:00:38 am Colin Percival >>>>>>>>> wrote: >>>>>>>>>> Author: cperciva >>>>>>>>>> Date: Fri Dec 23 15:00:37 2011 >>>>>>>>>> New Revision: 228843 >>>>>>>>>> URL: http://svn.freebsd.org/changeset/base/228843 >>>>>>>>>> >>>>>>>>>> Log: >>>>>>>>>> Fix a problem whereby a corrupt DNS record can cause >>>>>>>>>> named to crash. [11:06] >>>>>>>>>> Add an API for alerting internal libc routines to the >>>>>>>>>> presence of "unsafe" paths post-chroot, and use it in >>>>>>>>>> ftpd. [11:07] >>>>>>>>> >>>>>>>>> Eh, the whole libc_dlopen() thing looks like a gross hack >>>>>>>>> (and who came up with that weird symbol name for a public >>>>>>>>> API????). Is it really even needed given the other fix to >>>>>>>>> have ftpd drop privilege before execing a helper program? >>>>>>>>> I guess the main reason I don't like it is it doesn't do >>>>>>>>> anything to address the more general problem. I would have >>>>>>>>> expected instead something to restrict dlopen() entirely >>>>>>>>> including from other libraries than just libc in certain >>>>>>>>> circumstances. >>>>>>>> >>>>>>>> At the very least if we feel that the libc_dlopen() thing is a >>>>>>>> temporary band-aid, we should move the new symbols into the >>>>>>>> private namespace so we can remove them once the better fix >>>>>>>> is in rather than being required to support them forever. >>>>>> libc_dlopen() is not exposed. >>>>>> The __FreeBSD_libc_enter_restricted_mode() is, and its name is >>>>>> ugly exactly to note the ugly intent. I do not see how the symbol >>>>>> can go int FBSDprivate_1.0 when it was supposed to be used by >>>>>> third-party applications. >>>>>> >>>>>> Putting this hack into rtld itself IMO has to wide consequences. >>>>>> For libc, we can enumerate the points that stop work after the >>>>>> call, but for the generic applications the consequences are >>>>>> undefined. >>>>>>>> >>>>>>>> -- >>>>>>>> John Baldwin >>>>>>> >>>>>>> Pardon for not catching that when I had a chance to influence >>>>>>> the outcome, but I would like to voice my support to tucking the >>>>>>> ugliness into private version namespace. >>>>>>> >>>>>>> -- >>>>>>> Alexander Kabaev >>>>>> >>>>> Putting symbol into official namespace implies that we are willing >>>>> to provide and maintain it forever, which I do not think was the >>>>> intent for the function in question. FBSD_PRIVATE says nothing >>>>> about who should and should not link to it, only the level of API >>>>> stability one has to expect in the end. If/when we have better >>>>> security mechanisms (capsicum?) available to users by default, this >>>>> should be ripped out with extreme prejudice. >>>> >>>> The API is offered as a solution to third-parties. Telling them to use >>>> the API that is known to be broken in future is wrong step for the >>>> project, IMO. >>>> >>>> I doubt that proftpd will 'go capsicum'. >>> >>> Then proftp will have to contend with being known security hazard. >>> Spamming every supported branch with the symbol that cries just to >>> support programs that chroot into arbitrary environments and trust >>> anything at all there is wrong step for the project. Committing to >>> support said symbol for all of the eternity is even bigger mistake. >> >> I agree with those that have concerns about this solution. It seems ugly >> and painful, and if the vulnerability is so fundamental to chroot and/or >> nsdispatch then it seems that more than ftp would be affected. > > That's correct, this affects ALL applications that does chroot into a > hostile environment where /etc and /lib can be controlled by > unprivileged user, which is in my opinion fundamentally insecure in > the first place. So now I'm confused. We're applying this ugly hack to libc in order to save system administrators who do blatantly stupid things? -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 10:16:04 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A383106564A; Sat, 24 Dec 2011 10:16:04 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 38EEF8FC14; Sat, 24 Dec 2011 10:16:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id pBOA5Alh010533; Sat, 24 Dec 2011 14:05:10 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id pBOA5931010532; Sat, 24 Dec 2011 14:05:09 +0400 (MSK) (envelope-from ache) Date: Sat, 24 Dec 2011 14:05:09 +0400 From: Andrey Chernov To: Kostik Belousov Message-ID: <20111224100509.GA98136@vniz.net> Mail-Followup-To: Andrey Chernov , Kostik Belousov , Alexander Kabaev , John Baldwin , Colin Percival , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+HP7ph2BbKc20aGI" Content-Disposition: inline In-Reply-To: <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.ORG, John Baldwin , svn-src-all@FreeBSD.ORG, Colin Percival , svn-src-head@FreeBSD.ORG, Alexander Kabaev Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 10:16:04 -0000 --+HP7ph2BbKc20aGI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 23, 2011 at 07:51:43PM +0200, Kostik Belousov wrote: > The __FreeBSD_libc_enter_restricted_mode() is, and its name is ugly > exactly to note the ugly intent. I do not see how the symbol can go There must be no ugly intents and names. This whole idea just proves yet=20 one our @secteam ugliness.=20 There must be ischroot(2) the same way we already have issetugid(2). --=20 http://ache.vniz.net/ --+HP7ph2BbKc20aGI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk71o9UACgkQVg5YK5ZEdN1cUwCbBvEM8JWwmp6m+gBeAjCrPJze 5XAAn3VI0+VeKjKmCaXNKuV911hDev+I =RpqX -----END PGP SIGNATURE----- --+HP7ph2BbKc20aGI-- From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 10:26:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FED2106564A; Sat, 24 Dec 2011 10:26:22 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8E3178FC14; Sat, 24 Dec 2011 10:26:21 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so8579298obb.13 for ; Sat, 24 Dec 2011 02:26:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=l946+VGatfYs/P3su/dL9Kf42tTifpb2QcHN2dqRVco=; b=nSmok7TUYk6O0koIVyjxQCaHm05q80jyoImR9IOuWsby3bJ5bOyEjm3ZduzITuMpyY puH2z11M+XAB8XKjITMLYayHREaotItlbAEzEtC2RyP/ghETXspTGi1dV1DfD0v5PGeg yLi3fILVRzsOGBdQgMAy0lgeUhnd5SAA3mpW8= MIME-Version: 1.0 Received: by 10.182.160.1 with SMTP id xg1mr15718074obb.30.1324722380934; Sat, 24 Dec 2011 02:26:20 -0800 (PST) Received: by 10.182.67.163 with HTTP; Sat, 24 Dec 2011 02:26:20 -0800 (PST) In-Reply-To: <20111224100509.GA98136@vniz.net> References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> <20111224100509.GA98136@vniz.net> Date: Sat, 24 Dec 2011 02:26:20 -0800 Message-ID: From: Xin LI To: Andrey Chernov , Kostik Belousov , Alexander Kabaev , John Baldwin , Colin Percival , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 10:26:22 -0000 On Sat, Dec 24, 2011 at 2:05 AM, Andrey Chernov wrote: > On Fri, Dec 23, 2011 at 07:51:43PM +0200, Kostik Belousov wrote: >> The __FreeBSD_libc_enter_restricted_mode() is, and its name is ugly >> exactly to note the ugly intent. I do not see how the symbol can go > > There must be no ugly intents and names. This whole idea just proves yet > one our @secteam ugliness. > > There must be ischroot(2) the same way we already have issetugid(2). chroot(2) can create legitimate and secure environment where dlopen(2) is safe and necessary. Cheers, -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 10:39:56 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119CC106566C for ; Sat, 24 Dec 2011 10:39:56 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 6EA0F8FC0C for ; Sat, 24 Dec 2011 10:39:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id pBOAdoKp011007; Sat, 24 Dec 2011 14:39:50 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id pBOAdnwL011006; Sat, 24 Dec 2011 14:39:49 +0400 (MSK) (envelope-from ache) Date: Sat, 24 Dec 2011 14:39:49 +0400 From: Andrey Chernov To: Xin LI Message-ID: <20111224103948.GA10939@vniz.net> Mail-Followup-To: Andrey Chernov , Xin LI , Kostik Belousov , Alexander Kabaev , John Baldwin , Colin Percival , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> <20111224100509.GA98136@vniz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.ORG, John Baldwin , svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG, Colin Percival , Kostik Belousov , Alexander Kabaev Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 10:39:56 -0000 On Sat, Dec 24, 2011 at 02:26:20AM -0800, Xin LI wrote: > chroot(2) can create legitimate and secure environment where dlopen(2) > is safe and necessary. Yes, so ischroot() check can be used only into that places where libc's libc_dlopen() currently used, i.e. placed into libc_dlopen() itself. -- http://ache.vniz.net/ From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 10:45:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07196106566C; Sat, 24 Dec 2011 10:45:23 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 74CB38FC0A; Sat, 24 Dec 2011 10:45:22 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so8588858obb.13 for ; Sat, 24 Dec 2011 02:45:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=5uT6MpL/ZgJzDIRNgZx4zS4iZnP9FTQpu0H8C5duwtk=; b=P+EqIs+q0f4aqlemGoG41vvYArIVaidQ6Ym0WPEW8PGJEtQXKj9Ixf/vWKJqvFc8Wf te18AKfV/cea8F8KPMp9uaUZzXIm/J8aT12P92uZoHw6TPUX5eeBVgbtivUBE+ndO99d krLHNV+CfCNC2ZRKT9LAAvp+t88m4XAj+re7Y= MIME-Version: 1.0 Received: by 10.182.76.134 with SMTP id k6mr7392325obw.10.1324723521923; Sat, 24 Dec 2011 02:45:21 -0800 (PST) Received: by 10.182.67.163 with HTTP; Sat, 24 Dec 2011 02:45:21 -0800 (PST) In-Reply-To: <20111224103948.GA10939@vniz.net> References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> <20111224100509.GA98136@vniz.net> <20111224103948.GA10939@vniz.net> Date: Sat, 24 Dec 2011 02:45:21 -0800 Message-ID: From: Xin LI To: Andrey Chernov , Xin LI , Kostik Belousov , Alexander Kabaev , John Baldwin , Colin Percival , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 10:45:23 -0000 On Sat, Dec 24, 2011 at 2:39 AM, Andrey Chernov wrote: > On Sat, Dec 24, 2011 at 02:26:20AM -0800, Xin LI wrote: >> chroot(2) can create legitimate and secure environment where dlopen(2) >> is safe and necessary. > > Yes, so ischroot() check can be used only into that places where libc's > libc_dlopen() currently used, i.e. placed into libc_dlopen() itself. So it's Okay to break NSS in chroot jail? Cheers, -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 10:50:50 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E258C106564A for ; Sat, 24 Dec 2011 10:50:50 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 4B09A8FC17 for ; Sat, 24 Dec 2011 10:50:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id pBOAojlj011182; Sat, 24 Dec 2011 14:50:45 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id pBOAojHh011181; Sat, 24 Dec 2011 14:50:45 +0400 (MSK) (envelope-from ache) Date: Sat, 24 Dec 2011 14:50:45 +0400 From: Andrey Chernov To: Xin LI Message-ID: <20111224105045.GA11127@vniz.net> Mail-Followup-To: Andrey Chernov , Xin LI , Kostik Belousov , Alexander Kabaev , John Baldwin , Colin Percival , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> <20111224100509.GA98136@vniz.net> <20111224103948.GA10939@vniz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: src-committers@FreeBSD.ORG, John Baldwin , svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG, Colin Percival , Kostik Belousov , Alexander Kabaev Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 10:50:51 -0000 On Sat, Dec 24, 2011 at 02:45:21AM -0800, Xin LI wrote: > On Sat, Dec 24, 2011 at 2:39 AM, Andrey Chernov wrote: > > On Sat, Dec 24, 2011 at 02:26:20AM -0800, Xin LI wrote: > >> chroot(2) can create legitimate and secure environment where dlopen(2) > >> is safe and necessary. > > > > Yes, so ischroot() check can be used only into that places where libc's > > libc_dlopen() currently used, i.e. placed into libc_dlopen() itself. > > So it's Okay to break NSS in chroot jail? We need general solution. We simple can't count all possible and future ftpd's arround the world and insert __FreeBSD_libc_enter_restricted_mode() into them. I even not mention other programs that may use chroot() too. If some component like auth is critical for chroot, it should be restricted in general scope. -- http://ache.vniz.net/ From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 10:57:24 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0BEF106568D for ; Sat, 24 Dec 2011 10:57:24 +0000 (UTC) (envelope-from ache@vniz.net) Received: from vniz.net (vniz.net [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 57CCE8FC13 for ; Sat, 24 Dec 2011 10:57:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vniz.net (8.14.5/8.14.5) with ESMTP id pBOAvJFi011342; Sat, 24 Dec 2011 14:57:19 +0400 (MSK) (envelope-from ache@vniz.net) Received: (from ache@localhost) by localhost (8.14.5/8.14.5/Submit) id pBOAvIHH011340; Sat, 24 Dec 2011 14:57:19 +0400 (MSK) (envelope-from ache) Date: Sat, 24 Dec 2011 14:57:18 +0400 From: Andrey Chernov To: Xin LI , Kostik Belousov , Alexander Kabaev , John Baldwin , Colin Percival , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG Message-ID: <20111224105717.GA11193@vniz.net> Mail-Followup-To: Andrey Chernov , Xin LI , Kostik Belousov , Alexander Kabaev , John Baldwin , Colin Percival , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> <20111224100509.GA98136@vniz.net> <20111224103948.GA10939@vniz.net> <20111224105045.GA11127@vniz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111224105045.GA11127@vniz.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 10:57:25 -0000 On Sat, Dec 24, 2011 at 02:50:45PM +0400, Andrey Chernov wrote: > On Sat, Dec 24, 2011 at 02:45:21AM -0800, Xin LI wrote: > > On Sat, Dec 24, 2011 at 2:39 AM, Andrey Chernov wrote: > > > On Sat, Dec 24, 2011 at 02:26:20AM -0800, Xin LI wrote: > > >> chroot(2) can create legitimate and secure environment where dlopen(2) > > >> is safe and necessary. > > > > > > Yes, so ischroot() check can be used only into that places where libc's > > > libc_dlopen() currently used, i.e. placed into libc_dlopen() itself. > > > > So it's Okay to break NSS in chroot jail? > > We need general solution. We simple can't count all possible and future > ftpd's arround the world and insert __FreeBSD_libc_enter_restricted_mode() > into them. I even not mention other programs that may use chroot() too. If > some component like auth is critical for chroot, it should be restricted > in general scope. To work in admin-think-safe environment we can add another syscall like safe_chroot(1). When it is marked as safe, ischroot() will return 0. -- http://ache.vniz.net/ From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 12:16:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A59DA1065670; Sat, 24 Dec 2011 12:16:39 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 761C68FC16; Sat, 24 Dec 2011 12:16:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBOCGd7d012703; Sat, 24 Dec 2011 12:16:39 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBOCGd1H012696; Sat, 24 Dec 2011 12:16:39 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201112241216.pBOCGd1H012696@svn.freebsd.org> From: Marius Strobl Date: Sat, 24 Dec 2011 12:16:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 12:16:39 -0000 Author: marius Date: Sat Dec 24 12:16:38 2011 New Revision: 228857 URL: http://svn.freebsd.org/changeset/base/228857 Log: On FreeBSD just use the MD5 implementation of libmd rather than that of libcrypto so we don't need to relinquish csup when world is built without OpenSSL. Modified: head/usr.bin/Makefile head/usr.bin/csup/Makefile head/usr.bin/csup/auth.c head/usr.bin/csup/misc.c head/usr.bin/csup/misc.h Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sat Dec 24 01:32:01 2011 (r228856) +++ head/usr.bin/Makefile Sat Dec 24 12:16:38 2011 (r228857) @@ -250,10 +250,11 @@ SUBDIR+= bc SUBDIR+= chkey SUBDIR+= dc SUBDIR+= newkey +.endif + .if ${MK_LIBTHR} != "no" SUBDIR+= csup .endif -.endif .if ${MK_LOCATE} != "no" SUBDIR+= locate Modified: head/usr.bin/csup/Makefile ============================================================================== --- head/usr.bin/csup/Makefile Sat Dec 24 01:32:01 2011 (r228856) +++ head/usr.bin/csup/Makefile Sat Dec 24 12:16:38 2011 (r228857) @@ -33,8 +33,8 @@ CFLAGS+= -I. -I${.CURDIR} CFLAGS+= -DHAVE_FFLAGS -DNDEBUG WARNS?= 1 -DPADD= ${LIBCRYPTO} ${LIBZ} ${LIBPTHREAD} -LDADD= -lcrypto -lz -lpthread +DPADD= ${LIBMD} ${LIBZ} ${LIBPTHREAD} +LDADD= -lmd -lz -lpthread SCRIPTS= cpasswd.sh MAN= csup.1 cpasswd.1 Modified: head/usr.bin/csup/auth.c ============================================================================== --- head/usr.bin/csup/auth.c Sat Dec 24 01:32:01 2011 (r228856) +++ head/usr.bin/csup/auth.c Sat Dec 24 12:16:38 2011 (r228857) @@ -35,7 +35,6 @@ #include #include -#include #include #include #include Modified: head/usr.bin/csup/misc.c ============================================================================== --- head/usr.bin/csup/misc.c Sat Dec 24 01:32:01 2011 (r228856) +++ head/usr.bin/csup/misc.c Sat Dec 24 12:16:38 2011 (r228857) @@ -28,7 +28,6 @@ #include #include -#include #include #include Modified: head/usr.bin/csup/misc.h ============================================================================== --- head/usr.bin/csup/misc.h Sat Dec 24 01:32:01 2011 (r228856) +++ head/usr.bin/csup/misc.h Sat Dec 24 12:16:38 2011 (r228857) @@ -28,10 +28,18 @@ #ifndef _MISC_H_ #define _MISC_H_ -#include - #include +#ifdef __FreeBSD__ +#include +#define MD5_DIGEST_LENGTH 16 +#define MD5_Init MD5Init +#define MD5_Final MD5Final +#define MD5_Update MD5Update +#else +#include +#endif + /* If we're not compiling in a C99 environment, define the C99 types. */ #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 12:28:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C2C1106564A; Sat, 24 Dec 2011 12:28:24 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C7178FC0C; Sat, 24 Dec 2011 12:28:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBOCSOOo013107; Sat, 24 Dec 2011 12:28:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBOCSO0m013105; Sat, 24 Dec 2011 12:28:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201112241228.pBOCSO0m013105@svn.freebsd.org> From: Marius Strobl Date: Sat, 24 Dec 2011 12:28:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228858 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 12:28:24 -0000 Author: marius Date: Sat Dec 24 12:28:23 2011 New Revision: 228858 URL: http://svn.freebsd.org/changeset/base/228858 Log: Update a comment to reflect reality and explain why we're using the medany code model. Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sat Dec 24 12:16:38 2011 (r228857) +++ head/sys/conf/kern.mk Sat Dec 24 12:28:23 2011 (r228858) @@ -69,7 +69,8 @@ INLINE_LIMIT?= 15000 .endif # -# For sparc64 we want medlow code model, and we tell gcc to use floating +# For sparc64 we want the medany code model so modules may be located +# anywhere in the 64-bit address space. We also tell GCC to use floating # point emulation. This avoids using floating point registers for integer # operations which it has a tendency to do. # From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 13:28:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7024106564A; Sat, 24 Dec 2011 13:28:49 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D21838FC0C; Sat, 24 Dec 2011 13:28:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBODSngW014996; Sat, 24 Dec 2011 13:28:49 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBODSnkH014994; Sat, 24 Dec 2011 13:28:49 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201112241328.pBODSnkH014994@svn.freebsd.org> From: David Chisnall Date: Sat, 24 Dec 2011 13:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228859 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 13:28:50 -0000 Author: theraven Date: Sat Dec 24 13:28:49 2011 New Revision: 228859 URL: http://svn.freebsd.org/changeset/base/228859 Log: Some GCC-compatibility definitions. Define clang's feature test pseudomacros to always evaluate to 0 if we are using a compiler that doesn't implement them. This lets us use the macros easily in standard headers (e.g. stdatomic.h, which should be the subject of my next commit). Approved by: dim (mentor) Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sat Dec 24 12:28:23 2011 (r228858) +++ head/sys/sys/cdefs.h Sat Dec 24 13:28:49 2011 (r228859) @@ -617,4 +617,14 @@ #endif #endif +#ifndef __has_feature +#define __has_feature(x) 0 +#endif +#ifndef __has_include +#define __has_include(x) 0 +#endif +#ifndef __has_builtin +#define __has_builtin(x) 0 +#endif + #endif /* !_SYS_CDEFS_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 13:30:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C71241065673; Sat, 24 Dec 2011 13:30:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B19FC8FC0A; Sat, 24 Dec 2011 13:30:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBODUF15015083; Sat, 24 Dec 2011 13:30:15 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBODUFkG015081; Sat, 24 Dec 2011 13:30:15 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112241330.pBODUFkG015081@svn.freebsd.org> From: Dimitry Andric Date: Sat, 24 Dec 2011 13:30:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228860 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 13:30:15 -0000 Author: dim Date: Sat Dec 24 13:30:15 2011 New Revision: 228860 URL: http://svn.freebsd.org/changeset/base/228860 Log: Make another clang warning, -Wempty-body, non-fatal during kernel builds. All the instances of this warning in our tree are completely harmless. (Most of the empty bodies look to be used simply as reminder for the developer to add something later.) While here, assign to CWARNEXTRA with ?=, so it can be overridden easily, if needed. MFC after: 1 week Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sat Dec 24 13:28:49 2011 (r228859) +++ head/sys/conf/kern.mk Sat Dec 24 13:30:15 2011 (r228860) @@ -23,7 +23,7 @@ NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-cou # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. -CWARNEXTRA+= -Wno-error-tautological-compare +CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body .endif # From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 13:36:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43C04106564A; Sat, 24 Dec 2011 13:36:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E88C8FC13; Sat, 24 Dec 2011 13:36:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBODaTXB015320; Sat, 24 Dec 2011 13:36:29 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBODaSRq015318; Sat, 24 Dec 2011 13:36:29 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112241336.pBODaSRq015318@svn.freebsd.org> From: Dimitry Andric Date: Sat, 24 Dec 2011 13:36:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228861 - head/sys/modules/nve X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 13:36:29 -0000 Author: dim Date: Sat Dec 24 13:36:28 2011 New Revision: 228861 URL: http://svn.freebsd.org/changeset/base/228861 Log: Set WERROR= for the nve(4) module. This driver gives several warnings with clang, which will probably never be fixed, as it is unmaintained, and superseded by nfe(4). MFC after: 1 week Modified: head/sys/modules/nve/Makefile Modified: head/sys/modules/nve/Makefile ============================================================================== --- head/sys/modules/nve/Makefile Sat Dec 24 13:30:15 2011 (r228860) +++ head/sys/modules/nve/Makefile Sat Dec 24 13:36:28 2011 (r228861) @@ -7,6 +7,7 @@ SRCS= if_nve.c if_nvereg.h miidevs.h \ device_if.h bus_if.h pci_if.h miibus_if.h \ os+%DIKED-nve.h OBJS+= nvenetlib.o +WERROR= CLEANFILES+= nvenetlib.o os+%DIKED-nve.h nvenetlib.o: ${.CURDIR}/../../contrib/dev/nve/${MACHINE}/${.TARGET}.bz2.uu From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 13:39:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E6E7106564A; Sat, 24 Dec 2011 13:39:22 +0000 (UTC) (envelope-from etnapierala@googlemail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 556798FC15; Sat, 24 Dec 2011 13:39:20 +0000 (UTC) Received: by eekc50 with SMTP id c50so11825951eek.13 for ; Sat, 24 Dec 2011 05:39:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=kFzl7VGCILCREQvCeHfVKP0BZ3KYfN0p1dbRWPJ1Oxk=; b=lgGGP825AD0kYM0gVsejd8aJ1faOQJlo5xlYJUUVhLS5vu7h/A+zlVO4jZVx4oUXqd iLaKr65UusbCb5Cyy3CCq6uTn6StpAP3tSN4O5yQ27n1QbFXPir2eoyVxgibW+P8KVrO LJQqJn/PpFwhjc4Twvi24Txfr0ZgIN1mdI3bU= Received: by 10.213.10.143 with SMTP id p15mr549890ebp.95.1324732248576; Sat, 24 Dec 2011 05:10:48 -0800 (PST) Received: from [192.168.119.6] (gate19.robnet.pl. [194.105.132.219]) by mx.google.com with ESMTPS id y12sm61589496eeb.11.2011.12.24.05.10.39 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 24 Dec 2011 05:10:43 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-2 From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: <20111224105045.GA11127@vniz.net> Date: Sat, 24 Dec 2011 14:10:37 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <8E5EE6FA-7BA1-4590-843A-F5C3C0493E5B@FreeBSD.org> References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> <20111224100509.GA98136@vniz.net> <20111224103948.GA10939@vniz.net> <20111224105045.GA11127@vniz.net> To: Andrey Chernov X-Mailer: Apple Mail (2.1251.1) Cc: src-committers@FreeBSD.ORG, Xin LI , John Baldwin , svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG, Colin Percival , Kostik Belousov , Alexander Kabaev Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 13:39:22 -0000 Wiadomo=B6=E6 napisana przez Andrey Chernov w dniu 24 gru 2011, o godz. = 11:50: > On Sat, Dec 24, 2011 at 02:45:21AM -0800, Xin LI wrote: >> On Sat, Dec 24, 2011 at 2:39 AM, Andrey Chernov = wrote: >>> On Sat, Dec 24, 2011 at 02:26:20AM -0800, Xin LI wrote: >>>> chroot(2) can create legitimate and secure environment where = dlopen(2) >>>> is safe and necessary. >>>=20 >>> Yes, so ischroot() check can be used only into that places where = libc's >>> libc_dlopen() currently used, i.e. placed into libc_dlopen() itself. >>=20 >> So it's Okay to break NSS in chroot jail? >=20 > We need general solution. We simple can't count all possible and = future=20 > ftpd's arround the world and insert = __FreeBSD_libc_enter_restricted_mode()=20 > into them. I even not mention other programs that may use chroot() = too. If=20 > some component like auth is critical for chroot, it should be = restricted=20 > in general scope. How about adding a check in dlopen(3) to make sure the file being opened is owned either by us (getuid(3)) or root and is not writable by anyone = else?= From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 14:51:51 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95F91106566C; Sat, 24 Dec 2011 14:51:51 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id 16BB68FC08; Sat, 24 Dec 2011 14:51:50 +0000 (UTC) Received: from [127.0.0.1] (kevlo@kevlo.org [220.128.136.52]) by ns.kevlo.org (8.14.3/8.14.3) with ESMTP id pBOEpnCv011212; Sat, 24 Dec 2011 22:51:49 +0800 (CST) From: Kevin Lo To: John Baldwin In-Reply-To: <201112220739.29940.jhb@freebsd.org> References: <201112220631.pBM6VT6g003775@svn.freebsd.org> <201112220739.29940.jhb@freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sat, 24 Dec 2011 22:51:47 +0800 Message-ID: <1324738307.1945.3.camel@esl.kevlo.org> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228796 - head/sys/fs/msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 14:51:51 -0000 On Thu, 2011-12-22 at 07:39 -0500, John Baldwin wrote: > On Thursday, December 22, 2011 1:31:29 am Kevin Lo wrote: > > Author: kevlo > > Date: Thu Dec 22 06:31:29 2011 > > New Revision: 228796 > > URL: http://svn.freebsd.org/changeset/base/228796 > > > > Log: > > Discarding local array based on return values > > Is this an incomplete log message? This doesn't really explain (to me at > least) what this change does or why it is doing it. Ah, I forgot to mention: Found with: Coverity Prevent(tm) CID: 10059, 10060 Sorry for the confusion! Kevin From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 15:17:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0726B1065670; Sat, 24 Dec 2011 15:17:02 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E40F98FC12; Sat, 24 Dec 2011 15:17:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBOFH1gR018384; Sat, 24 Dec 2011 15:17:01 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBOFH1bo018383; Sat, 24 Dec 2011 15:17:01 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201112241517.pBOFH1bo018383@svn.freebsd.org> From: David Chisnall Date: Sat, 24 Dec 2011 15:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228862 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 15:17:02 -0000 Author: theraven Date: Sat Dec 24 15:17:01 2011 New Revision: 228862 URL: http://svn.freebsd.org/changeset/base/228862 Log: Initial implementation of stdatomic.h. Works (at least in the parts that were tested) with clang and gcc, and more efficiently with clang+a big out-of-tree diff that I need to commit soon (once it's been tidied and reviewed a bit). Large portions by: ed Reviewed by: ed Approved by: dim (mentor) Added: head/include/stdatomic.h (contents, props changed) Added: head/include/stdatomic.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/include/stdatomic.h Sat Dec 24 15:17:01 2011 (r228862) @@ -0,0 +1,296 @@ +/*- + * Copyright (c) 2011 Ed Schouten + * David Chisnall + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _STDATOMIC_H_ +#define _STDATOMIC_H_ + +#include +#include + +#if __has_feature(cxx_atomic) +#define __CLANG_ATOMICS +#elif defined(__GNUC__) +#define __GNUC_ATOMICS +#else +#error "stdatomic.h does not support your compiler" +#endif + +#ifdef __GNUC_ATOMICS +#define _Atomic(T) struct { volatile T __val; } +#endif + +/* + * 7.17.2 Initialization. + */ + +#if defined(__CLANG_ATOMICS) +#define ATOMIC_VAR_INIT(value) (value) +#define atomic_init(obj, value) __atomic_init(obj, value) +#elif defined(__GNUC_ATOMICS) +#define ATOMIC_VAR_INIT(value) { .__val = (value) } +#define atomic_init(obj, value) (obj = ATOMIC_VAR_INIT(value)) +#endif + +/* + * Clang and recent GCC both provide predefined macros for the memory + * orderings. If we are using a compiler that doesn't define them, use the + * clang values - these will be ignored in the fallback path. + */ + +#ifndef __ATOMIC_RELAXED +#define __ATOMIC_RELAXED 0 +#endif +#ifndef __ATOMIC_CONSUME +#define __ATOMIC_CONSUME 1 +#endif +#ifndef __ATOMIC_ACQUIRE +#define __ATOMIC_ACQUIRE 2 +#endif +#ifndef __ATOMIC_RELEASE +#define __ATOMIC_RELEASE 3 +#endif +#ifndef __ATOMIC_ACQ_REL +#define __ATOMIC_ACQ_REL 4 +#endif +#ifndef __ATOMIC_SEQ_CST +#define __ATOMIC_SEQ_CST 5 +#endif + +/* + * 7.17.3 Order and consistency. + * + * The memory_order_* constants that denote the barrier behaviour of the + * atomic operations. + */ + +enum memory_order { + memory_order_relaxed = __ATOMIC_RELAXED, + memory_order_consume = __ATOMIC_CONSUME, + memory_order_acquire = __ATOMIC_ACQUIRE, + memory_order_release = __ATOMIC_RELEASE, + memory_order_acq_rel = __ATOMIC_ACQ_REL, + memory_order_seq_cst = __ATOMIC_SEQ_CST +}; + +/* + * 7.17.4 Fences. + */ + +#if defined(__CLANG_ATOMICS) +#define atomic_thread_fence(order) __atomic_thread_fence(order) +#elif defined(__GNUC_ATOMICS) +#define atomic_thread_fence(order) __sync_synchronize() +#endif +#define atomic_signal_fence(order) __asm volatile ("" : : : "memory"); + +/* + * 7.17.5 Lock-free property. + */ + +#if defined(__CLANG_ATOMICS) +#define atomic_is_lock_free(obj) __atomic_is_lock_free(obj) +#elif defined(__GNUC_ATOMICS) +#define atomic_is_lock_free(obj) (sizeof((obj->__val)) <= sizeof(void *)) +#endif + +/* + * 7.17.6 Atomic integer types. + */ + +typedef _Atomic(_Bool) atomic_bool; +typedef _Atomic(char) atomic_char; +typedef _Atomic(signed char) atomic_schar; +typedef _Atomic(unsigned char) atomic_uchar; +typedef _Atomic(short) atomic_short; +typedef _Atomic(unsigned short) atomic_ushort; +typedef _Atomic(int) atomic_int; +typedef _Atomic(unsigned int) atomic_uint; +typedef _Atomic(long) atomic_long; +typedef _Atomic(unsigned long) atomic_ulong; +typedef _Atomic(long long) atomic_llong; +typedef _Atomic(unsigned long long) atomic_ullong; +#if 0 +typedef _Atomic(__char16_t) atomic_char16_t; +typedef _Atomic(__char32_t) atomic_char32_t; +#endif +typedef _Atomic(__wchar_t) atomic_wchar_t; +typedef _Atomic(__int_least8_t) atomic_int_least8_t; +typedef _Atomic(__uint_least8_t) atomic_uint_least8_t; +typedef _Atomic(__int_least16_t) atomic_int_least16_t; +typedef _Atomic(__uint_least16_t) atomic_uint_least16_t; +typedef _Atomic(__int_least32_t) atomic_int_least32_t; +typedef _Atomic(__uint_least32_t) atomic_uint_least32_t; +typedef _Atomic(__int_least64_t) atomic_int_least64_t; +typedef _Atomic(__uint_least64_t) atomic_uint_least64_t; +typedef _Atomic(__int_fast8_t) atomic_int_fast8_t; +typedef _Atomic(__uint_fast8_t) atomic_uint_fast8_t; +typedef _Atomic(__int_fast16_t) atomic_int_fast16_t; +typedef _Atomic(__uint_fast16_t) atomic_uint_fast16_t; +typedef _Atomic(__int_fast32_t) atomic_int_fast32_t; +typedef _Atomic(__uint_fast32_t) atomic_uint_fast32_t; +typedef _Atomic(__int_fast64_t) atomic_int_fast64_t; +typedef _Atomic(__uint_fast64_t) atomic_uint_fast64_t; +typedef _Atomic(__intptr_t) atomic_intptr_t; +typedef _Atomic(__uintptr_t) atomic_uintptr_t; +typedef _Atomic(__size_t) atomic_size_t; +typedef _Atomic(__ptrdiff_t) atomic_ptrdiff_t; +typedef _Atomic(__intmax_t) atomic_intmax_t; +typedef _Atomic(__uintmax_t) atomic_uintmax_t; + +/* + * 7.17.7 Operations on atomic types. + */ + +/* + * Compiler-specific operations. + */ + +#if defined(__CLANG_ATOMICS) +#define atomic_compare_exchange_strong_explicit(object, expected, \ + desired, success, failure) \ + __atomic_compare_exchange_strong(object, expected, desired, \ + success, failure) +#define atomic_compare_exchange_weak_explicit(object, expected, \ + desired, success, failure) \ + __atomic_compare_exchange_weak(object, expected, desired, \ + success, failure) +#define atomic_exchange_explicit(object, desired, order) \ + __atomic_exchange(object, desired, order) +#define atomic_fetch_add_explicit(object, operand, order) \ + __atomic_fetch_add(object, operand, order) +#define atomic_fetch_and_explicit(object, operand, order) \ + __atomic_fetch_and(object, operand, order) +#define atomic_fetch_or_explicit(object, operand, order) \ + __atomic_fetch_or(object, operand, order) +#define atomic_fetch_sub_explicit(object, operand, order) \ + __atomic_fetch_sub(object, operand, order) +#define atomic_fetch_xor_explicit(object, operand, order) \ + __atomic_fetch_xor(object, operand, order) +#define atomic_load_explicit(object, order) \ + __atomic_load(object, order) +#define atomic_store_explicit(object, desired, order) \ + __atomic_store(object, desired, order) +#elif defined(__GNUC_ATOMICS) +#define atomic_compare_exchange_strong_explicit(object, expected, \ + desired, success, failure) ({ \ + __typeof__((object)->__val) __v; \ + __v = \ + __sync_val_compare_and_swap((__typeof(&((object)->__val)))object,\ + *expected, desired); \ + *expected = __v; \ + (*expected == __v); \ + }) + +#define atomic_compare_exchange_weak_explicit(object, expected, \ + desired, success, failure) \ + atomic_compare_exchange_strong_explicit(object, expected, \ + desired, success, failure) +#if __has_builtin(__sync_swap) +/* Clang provides a full-barrier atomic exchange - use it if available. */ +#define atomic_exchange_explicit(object, desired, order) \ + __sync_swap(&(object)->value, desired) +#else +/* + * __sync_lock_test_and_set() is only an acquire barrier in theory (although in + * practice it is usually a full barrier) so we need an explicit barrier after + * it. + */ +#define atomic_exchange_explicit(object, desired, order) ({ \ + __typeof__((object)->__val) __v; \ + __v = __sync_lock_test_and_set(object, desired); \ + __sync_synchronize(); \ + __v; \ +}) +#endif +#define atomic_fetch_add_explicit(object, operand, order) \ + __sync_fetch_and_add(&(object)->__val, operand) +#define atomic_fetch_and_explicit(object, operand, order) \ + __sync_fetch_and_and(&(object)->__val, operand) +#define atomic_fetch_or_explicit(object, operand, order) \ + __sync_fetch_and_or(&(object)->__val, operand) +#define atomic_fetch_sub_explicit(object, operand, order) \ + __sync_fetch_and_sub(&(object)->__val, operand) +#define atomic_fetch_xor_explicit(object, operand, order) \ + __sync_fetch_and_xor(&(object)->__val, operand) +#define atomic_load_explicit(object, order) \ + __sync_fetch_and_add(&(object)->__val, 0) +#define atomic_store_explicit(object, desired, order) do { \ + __sync_synchronize(); \ + (object)->__val = (desired); \ + __sync_synchronize(); \ +} while (0) +#endif + +/* + * Convenience functions. + */ + +#define atomic_compare_exchange_strong(object, expected, desired) \ + atomic_compare_exchange_strong_explicit(object, expected, \ + desired, memory_order_seq_cst, memory_order_seq_cst) +#define atomic_compare_exchange_weak(object, expected, desired) \ + atomic_compare_exchange_weak_explicit(object, expected, \ + desired, memory_order_seq_cst, memory_order_seq_cst) +#define atomic_exchange(object, desired) \ + atomic_exchange_explicit(object, desired, memory_order_seq_cst) +#define atomic_fetch_add(object, operand) \ + atomic_fetch_add_explicit(object, operand, memory_order_seq_cst) +#define atomic_fetch_and(object, operand) \ + atomic_fetch_and_explicit(object, operand, memory_order_seq_cst) +#define atomic_fetch_or(object, operand) \ + atomic_fetch_or_explicit(object, operand, memory_order_seq_cst) +#define atomic_fetch_sub(object, operand) \ + atomic_fetch_sub_explicit(object, operand, memory_order_seq_cst) +#define atomic_fetch_xor(object, operand) \ + atomic_fetch_xor_explicit(object, operand, memory_order_seq_cst) +#define atomic_load(object) \ + atomic_load_explicit(object, memory_order_seq_cst) +#define atomic_store(object, desired) \ + atomic_store_explicit(object, desired, memory_order_seq_cst) + +/* + * 7.17.8 Atomic flag type and operations. + */ + +typedef atomic_bool atomic_flag; + +#define ATOMIC_FLAG_INIT ATOMIC_VAR_INIT(0) + +#define atomic_flag_clear_explicit(object, order) \ + atomic_store_explicit(object, 0, order) +#define atomic_flag_test_and_set_explicit(object, order) \ + atomic_compare_exchange_strong_explicit(object, 0, 1, order, order) + +#define atomic_flag_clear(object) \ + atomic_flag_clear_explicit(object, 0, memory_order_seq_cst) +#define atomic_flag_test_and_set(object) \ + atomic_flag_test_and_set_explicit(object, 0, 1, \ + memory_order_seq_cst, memory_order_seq_cst) + +#endif /* !_STDATOMIC_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 15:31:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1E92106564A; Sat, 24 Dec 2011 15:31:06 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ABED68FC0A; Sat, 24 Dec 2011 15:31:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBOFV6VL018828; Sat, 24 Dec 2011 15:31:06 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBOFV6sX018826; Sat, 24 Dec 2011 15:31:06 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201112241531.pBOFV6sX018826@svn.freebsd.org> From: David Chisnall Date: Sat, 24 Dec 2011 15:31:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228863 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 15:31:07 -0000 Author: theraven Date: Sat Dec 24 15:31:06 2011 New Revision: 228863 URL: http://svn.freebsd.org/changeset/base/228863 Log: ...and actually install it. Approved by: dim (mentor) Modified: head/include/Makefile Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sat Dec 24 15:17:01 2011 (r228862) +++ head/include/Makefile Sat Dec 24 15:31:06 2011 (r228863) @@ -19,7 +19,7 @@ INCS= a.out.h ar.h assert.h bitstring.h printf.h proc_service.h pthread.h \ pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h \ res_update.h resolv.h runetype.h search.h semaphore.h setjmp.h \ - signal.h spawn.h stab.h \ + signal.h spawn.h stab.h stdatomic.h \ stdbool.h stddef.h stdio.h stdlib.h string.h stringlist.h \ strings.h sysexits.h tar.h termios.h tgmath.h \ time.h timeconv.h timers.h ttyent.h \ From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 15:49:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0E97106566C; Sat, 24 Dec 2011 15:49:53 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7087D8FC0A; Sat, 24 Dec 2011 15:49:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBOFnrFF019415; Sat, 24 Dec 2011 15:49:53 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBOFnrgW019411; Sat, 24 Dec 2011 15:49:53 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201112241549.pBOFnrgW019411@svn.freebsd.org> From: Kevin Lo Date: Sat, 24 Dec 2011 15:49:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228864 - head/sys/fs/ntfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 15:49:53 -0000 Author: kevlo Date: Sat Dec 24 15:49:52 2011 New Revision: 228864 URL: http://svn.freebsd.org/changeset/base/228864 Log: Discard local array based on return values. Pointed out by: uqs Found with: Coverity Prevent(tm) CID: 10089 Modified: head/sys/fs/ntfs/ntfs_subr.c head/sys/fs/ntfs/ntfs_subr.h head/sys/fs/ntfs/ntfs_vnops.c Modified: head/sys/fs/ntfs/ntfs_subr.c ============================================================================== --- head/sys/fs/ntfs/ntfs_subr.c Sat Dec 24 15:31:06 2011 (r228863) +++ head/sys/fs/ntfs/ntfs_subr.c Sat Dec 24 15:49:52 2011 (r228864) @@ -670,6 +670,7 @@ ntfs_uastricmp(ntmp, ustr, ustrlen, astr size_t astrlen; { const char *astrp = astr; + char tmpbuf[5]; int len, res; size_t i, j, mbstrlen = astrlen; @@ -712,7 +713,7 @@ ntfs_uastrcmp(ntmp, ustr, ustrlen, astr, const char *astr; size_t astrlen; { - char *c; + char *c, tmpbuf[5]; size_t i, j, mbstrlen = astrlen; int res; @@ -2131,10 +2132,11 @@ ntfs_82u_uninit(struct ntfsmount *ntmp) */ char * ntfs_u28( + char *outbuf, struct ntfsmount *ntmp, wchar wc) { - char *p, *outp, inbuf[3], outbuf[5];; + char *p, *outp, inbuf[3]; size_t ilen, olen; outp = outbuf; Modified: head/sys/fs/ntfs/ntfs_subr.h ============================================================================== --- head/sys/fs/ntfs/ntfs_subr.h Sat Dec 24 15:31:06 2011 (r228863) +++ head/sys/fs/ntfs/ntfs_subr.h Sat Dec 24 15:49:52 2011 (r228864) @@ -112,9 +112,9 @@ int ntfs_u28_init(struct ntfsmount *ntmp int ntfs_u28_uninit(struct ntfsmount *ntmp); int ntfs_82u_init(struct ntfsmount *ntmp, char *cs_local, char *cs_ntfs); int ntfs_82u_uninit(struct ntfsmount *ntmp); -char * ntfs_u28(struct ntfsmount *ntmp, wchar wc); +char * ntfs_u28(char *outbuf, struct ntfsmount *ntmp, wchar wc); wchar ntfs_82u(struct ntfsmount *ntmp, const char *c, int *len); -#define NTFS_U28(ch) ntfs_u28(ntmp, (ch)) +#define NTFS_U28(ch) ntfs_u28(tmpbuf, ntmp, (ch)) #define NTFS_82U(ch, len) ntfs_82u(ntmp, (ch), len) #define NTFS_UASTRCMP(ustr, ustrlen, astr, astrlen) \ ntfs_uastrcmp(ntmp, (ustr), (ustrlen), (astr), (astrlen)) Modified: head/sys/fs/ntfs/ntfs_vnops.c ============================================================================== --- head/sys/fs/ntfs/ntfs_vnops.c Sat Dec 24 15:31:06 2011 (r228863) +++ head/sys/fs/ntfs/ntfs_vnops.c Sat Dec 24 15:49:52 2011 (r228864) @@ -481,7 +481,7 @@ ntfs_readdir(ap) struct uio *uio = ap->a_uio; struct ntfsmount *ntmp = ip->i_mp; int i, j, error = 0; - char *c; + char *c, tmpbuf[5]; u_int32_t faked = 0, num; int ncookies = 0; struct dirent cde; From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 17:54:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AAD5106564A; Sat, 24 Dec 2011 17:54:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1515E8FC0A; Sat, 24 Dec 2011 17:54:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBOHswt5023182; Sat, 24 Dec 2011 17:54:58 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBOHswdk023180; Sat, 24 Dec 2011 17:54:58 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112241754.pBOHswdk023180@svn.freebsd.org> From: Dimitry Andric Date: Sat, 24 Dec 2011 17:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228865 - head/sys/modules/asr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 17:54:59 -0000 Author: dim Date: Sat Dec 24 17:54:58 2011 New Revision: 228865 URL: http://svn.freebsd.org/changeset/base/228865 Log: Amend r228781 by also disabling -Warray-bounds warnings for the asr module. MFC after: 1 week Modified: head/sys/modules/asr/Makefile Modified: head/sys/modules/asr/Makefile ============================================================================== --- head/sys/modules/asr/Makefile Sat Dec 24 15:49:52 2011 (r228864) +++ head/sys/modules/asr/Makefile Sat Dec 24 17:54:58 2011 (r228865) @@ -12,3 +12,6 @@ SRCS+= opt_asr.h .endif .include + +CWARNFLAGS.asr.c= ${NO_WARRAY_BOUNDS} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 18:11:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4C46106564A; Sat, 24 Dec 2011 18:11:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A05128FC12; Sat, 24 Dec 2011 18:11:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBOIBsS8023812; Sat, 24 Dec 2011 18:11:54 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBOIBsrY023810; Sat, 24 Dec 2011 18:11:54 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112241811.pBOIBsrY023810@svn.freebsd.org> From: John Baldwin Date: Sat, 24 Dec 2011 18:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228866 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 18:11:54 -0000 Author: jhb Date: Sat Dec 24 18:11:54 2011 New Revision: 228866 URL: http://svn.freebsd.org/changeset/base/228866 Log: Fix a bug where TAILQ_FIRST(&V_ifnet) was accessed without holding the proper lock. Reviewed by: bz MFC after: 1 week Modified: head/sys/netinet6/icmp6.c Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Sat Dec 24 17:54:58 2011 (r228865) +++ head/sys/netinet6/icmp6.c Sat Dec 24 18:11:54 2011 (r228866) @@ -1851,7 +1851,7 @@ static int ni6_store_addrs(struct icmp6_nodeinfo *ni6, struct icmp6_nodeinfo *nni6, struct ifnet *ifp0, int resid) { - struct ifnet *ifp = ifp0 ? ifp0 : TAILQ_FIRST(&V_ifnet); + struct ifnet *ifp; struct in6_ifaddr *ifa6; struct ifaddr *ifa; struct ifnet *ifp_dep = NULL; @@ -1864,6 +1864,7 @@ ni6_store_addrs(struct icmp6_nodeinfo *n return (0); /* needless to copy */ IFNET_RLOCK_NOSLEEP(); + ifp = ifp0 ? ifp0 : TAILQ_FIRST(&V_ifnet); again: for (; ifp; ifp = TAILQ_NEXT(ifp, if_list)) { From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 18:57:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79A50106564A; Sat, 24 Dec 2011 18:57:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68C7F8FC19; Sat, 24 Dec 2011 18:57:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBOIvhbt025199; Sat, 24 Dec 2011 18:57:43 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBOIvhsH025197; Sat, 24 Dec 2011 18:57:43 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112241857.pBOIvhsH025197@svn.freebsd.org> From: Dimitry Andric Date: Sat, 24 Dec 2011 18:57:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228867 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 18:57:43 -0000 Author: dim Date: Sat Dec 24 18:57:42 2011 New Revision: 228867 URL: http://svn.freebsd.org/changeset/base/228867 Log: Make another clang warning, -Wparentheses-equality, non-fatal during kernel builds. All the instances of this warning in our tree are completely harmless, and many people seem to like adding extra parentheses to make precedence clearer. MFC after: 1 week Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sat Dec 24 18:11:54 2011 (r228866) +++ head/sys/conf/kern.mk Sat Dec 24 18:57:42 2011 (r228867) @@ -23,7 +23,8 @@ NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-cou # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. -CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body +CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body \ + -Wno-error-parentheses-equality .endif # From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 19:01:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4FD4106564A; Sat, 24 Dec 2011 19:01:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D42838FC0C; Sat, 24 Dec 2011 19:01:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBOJ1Vd3025367; Sat, 24 Dec 2011 19:01:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBOJ1VFN025365; Sat, 24 Dec 2011 19:01:31 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112241901.pBOJ1VFN025365@svn.freebsd.org> From: Dimitry Andric Date: Sat, 24 Dec 2011 19:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228868 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 19:01:32 -0000 Author: dim Date: Sat Dec 24 19:01:31 2011 New Revision: 228868 URL: http://svn.freebsd.org/changeset/base/228868 Log: When building the kernel for amd64 with clang, don't attempt to use the -frename-registers option, as it is not supported. No change for builds with gcc. MFC after: 1 week Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Sat Dec 24 18:57:42 2011 (r228867) +++ head/sys/conf/kern.pre.mk Sat Dec 24 19:01:31 2011 (r228868) @@ -34,8 +34,12 @@ _MINUS_O= -O2 .endif .endif .if ${MACHINE_CPUARCH} == "amd64" +.if ${CC:T:Mclang} != "clang" COPTFLAGS?=-O2 -frename-registers -pipe .else +COPTFLAGS?=-O2 -pipe +.endif +.else COPTFLAGS?=${_MINUS_O} -pipe .endif .if !empty(COPTFLAGS:M-O[23s]) && empty(COPTFLAGS:M-fno-strict-aliasing) From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 19:34:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B70E106564A; Sat, 24 Dec 2011 19:34:53 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57ECF8FC12; Sat, 24 Dec 2011 19:34:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBOJYr2G026381; Sat, 24 Dec 2011 19:34:53 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBOJYrbm026376; Sat, 24 Dec 2011 19:34:53 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201112241934.pBOJYrbm026376@svn.freebsd.org> From: Justin Hibbits Date: Sat, 24 Dec 2011 19:34:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228869 - in head: lib/libpmc sys/dev/hwpmc sys/powerpc/aim sys/powerpc/include sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 19:34:53 -0000 Author: jhibbits Date: Sat Dec 24 19:34:52 2011 New Revision: 228869 URL: http://svn.freebsd.org/changeset/base/228869 Log: Implement hwpmc counting PMC support for PowerPC G4+ (MPC745x/MPC744x). Sampling is in progress. Approved by: nwhitehorn (mentor) MFC after: 9.0-RELEASE Modified: head/lib/libpmc/libpmc.c head/sys/dev/hwpmc/hwpmc_powerpc.c head/sys/dev/hwpmc/pmc_events.h head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/trap.c head/sys/powerpc/include/pmc_mdep.h head/sys/powerpc/include/spr.h head/sys/sys/pmc.h Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Sat Dec 24 19:01:31 2011 (r228868) +++ head/lib/libpmc/libpmc.c Sat Dec 24 19:34:52 2011 (r228869) @@ -83,6 +83,10 @@ static int mips24k_allocate_pmc(enum pmc struct pmc_op_pmcallocate *_pmc_config); #endif /* __mips__ */ +#if defined(__powerpc__) +static int ppc7450_allocate_pmc(enum pmc_event _pe, char* ctrspec, + struct pmc_op_pmcallocate *_pmc_config); +#endif /* __powerpc__ */ #define PMC_CALL(cmd, params) \ syscall(pmc_syscall, PMC_OP_##cmd, (params)) @@ -149,6 +153,7 @@ PMC_CLASSDEP_TABLE(p6, P6); PMC_CLASSDEP_TABLE(xscale, XSCALE); PMC_CLASSDEP_TABLE(mips24k, MIPS24K); PMC_CLASSDEP_TABLE(ucf, UCF); +PMC_CLASSDEP_TABLE(ppc7450, PPC7450); #undef __PMC_EV_ALIAS #define __PMC_EV_ALIAS(N,CODE) { N, PMC_EV_##CODE }, @@ -211,6 +216,7 @@ PMC_MDEP_TABLE(p5, P5, PMC_CLASS_TSC); PMC_MDEP_TABLE(p6, P6, PMC_CLASS_TSC); PMC_MDEP_TABLE(xscale, XSCALE, PMC_CLASS_XSCALE); PMC_MDEP_TABLE(mips24k, MIPS24K, PMC_CLASS_MIPS24K); +PMC_MDEP_TABLE(ppc7450, PPC7450, PMC_CLASS_PPC7450); static const struct pmc_event_descr tsc_event_table[] = { @@ -263,6 +269,10 @@ PMC_CLASS_TABLE_DESC(xscale, XSCALE, xsc PMC_CLASS_TABLE_DESC(mips24k, MIPS24K, mips24k, mips24k); #endif /* __mips__ */ +#if defined(__powerpc__) +PMC_CLASS_TABLE_DESC(ppc7450, PPC7450, ppc7450, ppc7450); +#endif + #undef PMC_CLASS_TABLE_DESC static const struct pmc_class_descr **pmc_class_table; @@ -2212,6 +2222,44 @@ mips24k_allocate_pmc(enum pmc_event pe, } #endif /* __mips__ */ +#if defined(__powerpc__) + +static struct pmc_event_alias ppc7450_aliases[] = { + EV_ALIAS("instructions", "INSTR_COMPLETED"), + EV_ALIAS("branches", "BRANCHES_COMPLETED"), + EV_ALIAS("branch-mispredicts", "MISPREDICTED_BRANCHES"), + EV_ALIAS(NULL, NULL) +}; + +#define PPC7450_KW_OS "os" +#define PPC7450_KW_USR "usr" +#define PPC7450_KW_ANYTHREAD "anythread" + +static int +ppc7450_allocate_pmc(enum pmc_event pe, char *ctrspec __unused, + struct pmc_op_pmcallocate *pmc_config __unused) +{ + char *p; + + (void) pe; + + pmc_config->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); + + while ((p = strsep(&ctrspec, ",")) != NULL) { + if (KWMATCH(p, PPC7450_KW_OS)) + pmc_config->pm_caps |= PMC_CAP_SYSTEM; + else if (KWMATCH(p, PPC7450_KW_USR)) + pmc_config->pm_caps |= PMC_CAP_USER; + else if (KWMATCH(p, PPC7450_KW_ANYTHREAD)) + pmc_config->pm_caps |= (PMC_CAP_USER | PMC_CAP_SYSTEM); + else + return (-1); + } + + return (0); +} +#endif /* __powerpc__ */ + /* * Match an event name `name' with its canonical form. @@ -2573,6 +2621,10 @@ pmc_event_names_of_class(enum pmc_class ev = mips24k_event_table; count = PMC_EVENT_TABLE_SIZE(mips24k); break; + case PMC_CLASS_PPC7450: + ev = ppc7450_event_table; + count = PMC_EVENT_TABLE_SIZE(ppc7450); + break; default: errno = EINVAL; return (-1); @@ -2784,6 +2836,12 @@ pmc_init(void) pmc_class_table[n] = &mips24k_class_table_descr; break; #endif /* __mips__ */ +#if defined(__powerpc__) + case PMC_CPU_PPC_7450: + PMC_MDEP_INIT(ppc7450); + pmc_class_table[n] = &ppc7450_class_table_descr; + break; +#endif default: /* * Some kind of CPU this version of the library knows nothing @@ -2924,6 +2982,10 @@ _pmc_name_of_event(enum pmc_event pe, en ev = mips24k_event_table; evfence = mips24k_event_table + PMC_EVENT_TABLE_SIZE(mips24k ); + } else if (pe >= PMC_EV_PPC7450_FIRST && pe <= PMC_EV_PPC7450_LAST) { + ev = ppc7450_event_table; + evfence = ppc7450_event_table + PMC_EVENT_TABLE_SIZE(ppc7450 +); } else if (pe == PMC_EV_TSC_TSC) { ev = tsc_event_table; evfence = tsc_event_table + PMC_EVENT_TABLE_SIZE(tsc); Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_powerpc.c Sat Dec 24 19:01:31 2011 (r228868) +++ head/sys/dev/hwpmc/hwpmc_powerpc.c Sat Dec 24 19:34:52 2011 (r228869) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2011 Justin Hibbits * Copyright (c) 2005, Joseph Koshy * All rights reserved. * @@ -30,20 +31,297 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include +#include +#include -struct pmc_mdep * -pmc_md_initialize() -{ - return NULL; -} +#define POWERPC_PMC_CAPS (PMC_CAP_INTERRUPT | PMC_CAP_USER | \ + PMC_CAP_SYSTEM | PMC_CAP_EDGE | \ + PMC_CAP_THRESHOLD | PMC_CAP_READ | \ + PMC_CAP_WRITE | PMC_CAP_INVERT | \ + PMC_CAP_QUALIFIER) -void -pmc_md_finalize(struct pmc_mdep *md) -{ - (void) md; -} +#define PPC_SET_PMC1SEL(r, x) ((r & ~(SPR_MMCR0_PMC1SEL(0x3f))) | SPR_MMCR0_PMC1SEL(x)) +#define PPC_SET_PMC2SEL(r, x) ((r & ~(SPR_MMCR0_PMC2SEL(0x3f))) | SPR_MMCR0_PMC2SEL(x)) +#define PPC_SET_PMC3SEL(r, x) ((r & ~(SPR_MMCR1_PMC3SEL(0x1f))) | SPR_MMCR1_PMC3SEL(x)) +#define PPC_SET_PMC4SEL(r, x) ((r & ~(SPR_MMCR1_PMC4SEL(0x1f))) | SPR_MMCR1_PMC4SEL(x)) +#define PPC_SET_PMC5SEL(r, x) ((r & ~(SPR_MMCR1_PMC5SEL(0x1f))) | SPR_MMCR1_PMC5SEL(x)) +#define PPC_SET_PMC6SEL(r, x) ((r & ~(SPR_MMCR1_PMC6SEL(0x3f))) | SPR_MMCR1_PMC6SEL(x)) + +/* Change this when we support more than just the 7450. */ +#define PPC_MAX_PMCS 6 + +#define POWERPC_PMC_KERNEL_ENABLE (0x1 << 30) +#define POWERPC_PMC_USER_ENABLE (0x1 << 31) + +#define POWERPC_PMC_ENABLE (POWERPC_PMC_KERNEL_ENABLE | POWERPC_PMC_USER_ENABLE) +#define POWERPC_RELOAD_COUNT_TO_PERFCTR_VALUE(V) (0x80000000-(V)) +#define POWERPC_PERFCTR_VALUE_TO_RELOAD_COUNT(P) ((P)-0x80000000) +#define POWERPC_PMC_HAS_OVERFLOWED(x) (powerpc_pmcn_read(x) & (0x1 << 31)) + + +/* + * This should work for every 32-bit PowerPC implementation I know of (G3 and G4 + * specifically). PoewrPC 970 will take more work. + */ + +/* + * Per-processor information. + */ +struct powerpc_cpu { + struct pmc_hw *pc_ppcpmcs; +}; + +static struct powerpc_cpu **powerpc_pcpu; + +struct powerpc_event_code_map { + enum pmc_event pe_ev; /* enum value */ + uint8_t pe_counter_mask; /* Which counter this can be counted in. */ + uint8_t pe_code; /* numeric code */ +}; + +#define PPC_PMC_MASK1 0 +#define PPC_PMC_MASK2 1 +#define PPC_PMC_MASK3 2 +#define PPC_PMC_MASK4 3 +#define PPC_PMC_MASK5 4 +#define PPC_PMC_MASK6 5 +#define PPC_PMC_MASK_ALL 0x3f + +#define PMC_POWERPC_EVENT(id, mask, number) \ + { .pe_ev = PMC_EV_PPC7450_##id, .pe_counter_mask = mask, .pe_code = number } + +static struct powerpc_event_code_map powerpc_event_codes[] = { + PMC_POWERPC_EVENT(CYCLE,PPC_PMC_MASK_ALL, 1), + PMC_POWERPC_EVENT(INSTR_COMPLETED, 0x0f, 2), + PMC_POWERPC_EVENT(TLB_BIT_TRANSITIONS, 0x0f, 3), + PMC_POWERPC_EVENT(INSTR_DISPATCHED, 0x0f, 4), + PMC_POWERPC_EVENT(PMON_EXCEPT, 0x0f, 5), + PMC_POWERPC_EVENT(PMON_SIG, 0x0f, 7), + PMC_POWERPC_EVENT(VPU_INSTR_COMPLETED, 0x03, 8), + PMC_POWERPC_EVENT(VFPU_INSTR_COMPLETED, 0x03, 9), + PMC_POWERPC_EVENT(VIU1_INSTR_COMPLETED, 0x03, 10), + PMC_POWERPC_EVENT(VIU2_INSTR_COMPLETED, 0x03, 11), + PMC_POWERPC_EVENT(MTVSCR_INSTR_COMPLETED, 0x03, 12), + PMC_POWERPC_EVENT(MTVRSAVE_INSTR_COMPLETED, 0x03, 13), + PMC_POWERPC_EVENT(VPU_INSTR_WAIT_CYCLES, 0x03, 14), + PMC_POWERPC_EVENT(VFPU_INSTR_WAIT_CYCLES, 0x03, 15), + PMC_POWERPC_EVENT(VIU1_INSTR_WAIT_CYCLES, 0x03, 16), + PMC_POWERPC_EVENT(VIU2_INSTR_WAIT_CYCLES, 0x03, 17), + PMC_POWERPC_EVENT(MFVSCR_SYNC_CYCLES, 0x03, 18), + PMC_POWERPC_EVENT(VSCR_SAT_SET, 0x03, 19), + PMC_POWERPC_EVENT(STORE_INSTR_COMPLETED, 0x03, 20), + PMC_POWERPC_EVENT(L1_INSTR_CACHE_MISSES, 0x03, 21), + PMC_POWERPC_EVENT(L1_DATA_SNOOPS, 0x03, 22), + PMC_POWERPC_EVENT(UNRESOLVED_BRANCHES, 0x01, 23), + PMC_POWERPC_EVENT(SPEC_BUFFER_CYCLES, 0x01, 24), + PMC_POWERPC_EVENT(BRANCH_UNIT_STALL_CYCLES, 0x01, 25), + PMC_POWERPC_EVENT(TRUE_BRANCH_TARGET_HITS, 0x01, 26), + PMC_POWERPC_EVENT(BRANCH_LINK_STAC_PREDICTED, 0x01, 27), + PMC_POWERPC_EVENT(GPR_ISSUE_QUEUE_DISPATCHES, 0x01, 28), + PMC_POWERPC_EVENT(CYCLES_THREE_INSTR_DISPATCHED, 0x01, 29), + PMC_POWERPC_EVENT(THRESHOLD_INSTR_QUEUE_ENTRIES_CYCLES, 0x01, 30), + PMC_POWERPC_EVENT(THRESHOLD_VEC_INSTR_QUEUE_ENTRIES_CYCLES, 0x01, 31), + PMC_POWERPC_EVENT(CYCLES_NO_COMPLETED_INSTRS, 0x01, 32), + PMC_POWERPC_EVENT(IU2_INSTR_COMPLETED, 0x01, 33), + PMC_POWERPC_EVENT(BRANCHES_COMPLETED, 0x01, 34), + PMC_POWERPC_EVENT(EIEIO_INSTR_COMPLETED, 0x01, 35), + PMC_POWERPC_EVENT(MTSPR_INSTR_COMPLETED, 0x01, 36), + PMC_POWERPC_EVENT(SC_INSTR_COMPLETED, 0x01, 37), + PMC_POWERPC_EVENT(LS_LM_COMPLETED, 0x01, 38), + PMC_POWERPC_EVENT(ITLB_HW_TABLE_SEARCH_CYCLES, 0x01, 39), + PMC_POWERPC_EVENT(DTLB_HW_SEARCH_CYCLES_OVER_THRESHOLD, 0x01, 40), + PMC_POWERPC_EVENT(L1_INSTR_CACHE_ACCESSES, 0x01, 41), + PMC_POWERPC_EVENT(INSTR_BKPT_MATCHES, 0x01, 42), + PMC_POWERPC_EVENT(L1_DATA_CACHE_LOAD_MISS_CYCLES_OVER_THRESHOLD, 0x01, 43), + PMC_POWERPC_EVENT(L1_DATA_SNOOP_HIT_ON_MODIFIED, 0x01, 44), + PMC_POWERPC_EVENT(LOAD_MISS_ALIAS, 0x01, 45), + PMC_POWERPC_EVENT(LOAD_MISS_ALIAS_ON_TOUCH, 0x01, 46), + PMC_POWERPC_EVENT(TOUCH_ALIAS, 0x01, 47), + PMC_POWERPC_EVENT(L1_DATA_SNOOP_HIT_CASTOUT_QUEUE, 0x01, 48), + PMC_POWERPC_EVENT(L1_DATA_SNOOP_HIT_CASTOUT, 0x01, 49), + PMC_POWERPC_EVENT(L1_DATA_SNOOP_HITS, 0x01, 50), + PMC_POWERPC_EVENT(WRITE_THROUGH_STORES, 0x01, 51), + PMC_POWERPC_EVENT(CACHE_INHIBITED_STORES, 0x01, 52), + PMC_POWERPC_EVENT(L1_DATA_LOAD_HIT, 0x01, 53), + PMC_POWERPC_EVENT(L1_DATA_TOUCH_HIT, 0x01, 54), + PMC_POWERPC_EVENT(L1_DATA_STORE_HIT, 0x01, 55), + PMC_POWERPC_EVENT(L1_DATA_TOTAL_HITS, 0x01, 56), + PMC_POWERPC_EVENT(DST_INSTR_DISPATCHED, 0x01, 57), + PMC_POWERPC_EVENT(REFRESHED_DSTS, 0x01, 58), + PMC_POWERPC_EVENT(SUCCESSFUL_DST_TABLE_SEARCHES, 0x01, 59), + PMC_POWERPC_EVENT(DSS_INSTR_COMPLETED, 0x01, 60), + PMC_POWERPC_EVENT(DST_STREAM_0_CACHE_LINE_FETCHES, 0x01, 61), + PMC_POWERPC_EVENT(VTQ_SUSPENDS_DUE_TO_CTX_CHANGE, 0x01, 62), + PMC_POWERPC_EVENT(VTQ_LINE_FETCH_HIT, 0x01, 63), + PMC_POWERPC_EVENT(VEC_LOAD_INSTR_COMPLETED, 0x01, 64), + PMC_POWERPC_EVENT(FP_STORE_INSTR_COMPLETED_IN_LSU, 0x01, 65), + PMC_POWERPC_EVENT(FPU_RENORMALIZATION, 0x01, 66), + PMC_POWERPC_EVENT(FPU_DENORMALIZATION, 0x01, 67), + PMC_POWERPC_EVENT(FP_STORE_CAUSES_STALL_IN_LSU, 0x01, 68), + PMC_POWERPC_EVENT(LD_ST_TRUE_ALIAS_STALL, 0x01, 70), + PMC_POWERPC_EVENT(LSU_INDEXED_ALIAS_STALL, 0x01, 71), + PMC_POWERPC_EVENT(LSU_ALIAS_VS_FSQ_WB0_WB1, 0x01, 72), + PMC_POWERPC_EVENT(LSU_ALIAS_VS_CSQ, 0x01, 73), + PMC_POWERPC_EVENT(LSU_LOAD_HIT_LINE_ALIAS_VS_CSQ0, 0x01, 74), + PMC_POWERPC_EVENT(LSU_LOAD_MISS_LINE_ALIAS_VS_CSQ0, 0x01, 75), + PMC_POWERPC_EVENT(LSU_TOUCH_LINE_ALIAS_VS_FSQ_WB0_WB1, 0x01, 76), + PMC_POWERPC_EVENT(LSU_TOUCH_ALIAS_VS_CSQ, 0x01, 77), + PMC_POWERPC_EVENT(LSU_LMQ_FULL_STALL, 0x01, 78), + PMC_POWERPC_EVENT(FP_LOAD_INSTR_COMPLETED_IN_LSU, 0x01, 79), + PMC_POWERPC_EVENT(FP_LOAD_SINGLE_INSTR_COMPLETED_IN_LSU, 0x01, 80), + PMC_POWERPC_EVENT(FP_LOAD_DOUBLE_COMPLETED_IN_LSU, 0x01, 81), + PMC_POWERPC_EVENT(LSU_RA_LATCH_STALL, 0x01, 82), + PMC_POWERPC_EVENT(LSU_LOAD_VS_STORE_QUEUE_ALIAS_STALL, 0x01, 83), + PMC_POWERPC_EVENT(LSU_LMQ_INDEX_ALIAS, 0x01, 84), + PMC_POWERPC_EVENT(LSU_STORE_QUEUE_INDEX_ALIAS, 0x01, 85), + PMC_POWERPC_EVENT(LSU_CSQ_FORWARDING, 0x01, 86), + PMC_POWERPC_EVENT(LSU_MISALIGNED_LOAD_FINISH, 0x01, 87), + PMC_POWERPC_EVENT(LSU_MISALIGN_STORE_COMPLETED, 0x01, 88), + PMC_POWERPC_EVENT(LSU_MISALIGN_STALL, 0x01, 89), + PMC_POWERPC_EVENT(FP_ONE_QUARTER_FPSCR_RENAMES_BUSY, 0x01, 90), + PMC_POWERPC_EVENT(FP_ONE_HALF_FPSCR_RENAMES_BUSY, 0x01, 91), + PMC_POWERPC_EVENT(FP_THREE_QUARTERS_FPSCR_RENAMES_BUSY, 0x01, 92), + PMC_POWERPC_EVENT(FP_ALL_FPSCR_RENAMES_BUSY, 0x01, 93), + PMC_POWERPC_EVENT(FP_DENORMALIZED_RESULT, 0x01, 94), + PMC_POWERPC_EVENT(L1_DATA_TOTAL_MISSES, 0x02, 23), + PMC_POWERPC_EVENT(DISPATCHES_TO_FPR_ISSUE_QUEUE, 0x02, 24), + PMC_POWERPC_EVENT(LSU_INSTR_COMPLETED, 0x02, 25), + PMC_POWERPC_EVENT(LOAD_INSTR_COMPLETED, 0x02, 26), + PMC_POWERPC_EVENT(SS_SM_INSTR_COMPLETED, 0x02, 27), + PMC_POWERPC_EVENT(TLBIE_INSTR_COMPLETED, 0x02, 28), + PMC_POWERPC_EVENT(LWARX_INSTR_COMPLETED, 0x02, 29), + PMC_POWERPC_EVENT(MFSPR_INSTR_COMPLETED, 0x02, 30), + PMC_POWERPC_EVENT(REFETCH_SERIALIZATION, 0x02, 31), + PMC_POWERPC_EVENT(COMPLETION_QUEUE_ENTRIES_OVER_THRESHOLD, 0x02, 32), + PMC_POWERPC_EVENT(CYCLES_ONE_INSTR_DISPATCHED, 0x02, 33), + PMC_POWERPC_EVENT(CYCLES_TWO_INSTR_COMPLETED, 0x02, 34), + PMC_POWERPC_EVENT(ITLB_NON_SPECULATIVE_MISSES, 0x02, 35), + PMC_POWERPC_EVENT(CYCLES_WAITING_FROM_L1_INSTR_CACHE_MISS, 0x02, 36), + PMC_POWERPC_EVENT(L1_DATA_LOAD_ACCESS_MISS, 0x02, 37), + PMC_POWERPC_EVENT(L1_DATA_TOUCH_MISS, 0x02, 38), + PMC_POWERPC_EVENT(L1_DATA_STORE_MISS, 0x02, 39), + PMC_POWERPC_EVENT(L1_DATA_TOUCH_MISS_CYCLES, 0x02, 40), + PMC_POWERPC_EVENT(L1_DATA_CYCLES_USED, 0x02, 41), + PMC_POWERPC_EVENT(DST_STREAM_1_CACHE_LINE_FETCHES, 0x02, 42), + PMC_POWERPC_EVENT(VTQ_STREAM_CANCELED_PREMATURELY, 0x02, 43), + PMC_POWERPC_EVENT(VTQ_RESUMES_DUE_TO_CTX_CHANGE, 0x02, 44), + PMC_POWERPC_EVENT(VTQ_LINE_FETCH_MISS, 0x02, 45), + PMC_POWERPC_EVENT(VTQ_LINE_FETCH, 0x02, 46), + PMC_POWERPC_EVENT(TLBIE_SNOOPS, 0x02, 47), + PMC_POWERPC_EVENT(L1_INSTR_CACHE_RELOADS, 0x02, 48), + PMC_POWERPC_EVENT(L1_DATA_CACHE_RELOADS, 0x02, 49), + PMC_POWERPC_EVENT(L1_DATA_CACHE_CASTOUTS_TO_L2, 0x02, 50), + PMC_POWERPC_EVENT(STORE_MERGE_GATHER, 0x02, 51), + PMC_POWERPC_EVENT(CACHEABLE_STORE_MERGE_TO_32_BYTES, 0x02, 52), + PMC_POWERPC_EVENT(DATA_BKPT_MATCHES, 0x02, 53), + PMC_POWERPC_EVENT(FALL_THROUGH_BRANCHES_PROCESSED, 0x02, 54), + PMC_POWERPC_EVENT(FIRST_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY, 0x02, 55), + PMC_POWERPC_EVENT(SECOND_SPECULATION_BUFFER_ACTIVE, 0x02, 56), + PMC_POWERPC_EVENT(BPU_STALL_ON_LR_DEPENDENCY, 0x02, 57), + PMC_POWERPC_EVENT(BTIC_MISS, 0x02, 58), + PMC_POWERPC_EVENT(BRANCH_LINK_STACK_CORRECTLY_RESOLVED, 0x02, 59), + PMC_POWERPC_EVENT(FPR_ISSUE_STALLED, 0x02, 60), + PMC_POWERPC_EVENT(SWITCHES_BETWEEN_PRIV_USER, 0x02, 61), + PMC_POWERPC_EVENT(LSU_COMPLETES_FP_STORE_SINGLE, 0x02, 62), + PMC_POWERPC_EVENT(CYCLES_TWO_INSTR_COMPLETED, 0x04, 8), + PMC_POWERPC_EVENT(CYCLES_ONE_INSTR_DISPATCHED, 0x04, 9), + PMC_POWERPC_EVENT(VR_ISSUE_QUEUE_DISPATCHES, 0x04, 10), + PMC_POWERPC_EVENT(VR_STALLS, 0x04, 11), + PMC_POWERPC_EVENT(GPR_RENAME_BUFFER_ENTRIES_OVER_THRESHOLD, 0x04, 12), + PMC_POWERPC_EVENT(FPR_ISSUE_QUEUE_ENTRIES, 0x04, 13), + PMC_POWERPC_EVENT(FPU_INSTR_COMPLETED, 0x04, 14), + PMC_POWERPC_EVENT(STWCX_INSTR_COMPLETED, 0x04, 15), + PMC_POWERPC_EVENT(LS_LM_INSTR_PIECES, 0x04, 16), + PMC_POWERPC_EVENT(ITLB_HW_SEARCH_CYCLES_OVER_THRESHOLD, 0x04, 17), + PMC_POWERPC_EVENT(DTLB_MISSES, 0x04, 18), + PMC_POWERPC_EVENT(CANCELLED_L1_INSTR_CACHE_MISSES, 0x04, 19), + PMC_POWERPC_EVENT(L1_DATA_CACHE_OP_HIT, 0x04, 20), + PMC_POWERPC_EVENT(L1_DATA_LOAD_MISS_CYCLES, 0x04, 21), + PMC_POWERPC_EVENT(L1_DATA_PUSHES, 0x04, 22), + PMC_POWERPC_EVENT(L1_DATA_TOTAL_MISS, 0x04, 23), + PMC_POWERPC_EVENT(VT2_FETCHES, 0x04, 24), + PMC_POWERPC_EVENT(TAKEN_BRANCHES_PROCESSED, 0x04, 25), + PMC_POWERPC_EVENT(BRANCH_FLUSHES, 0x04, 26), + PMC_POWERPC_EVENT(SECOND_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY, 0x04, 27), + PMC_POWERPC_EVENT(THIRD_SPECULATION_BUFFER_ACTIVE, 0x04, 28), + PMC_POWERPC_EVENT(BRANCH_UNIT_STALL_ON_CTR_DEPENDENCY, 0x04, 29), + PMC_POWERPC_EVENT(FAST_BTIC_HIT, 0x04, 30), + PMC_POWERPC_EVENT(BRANCH_LINK_STACK_MISPREDICTED, 0x04, 31), + PMC_POWERPC_EVENT(CYCLES_THREE_INSTR_COMPLETED, 0x08, 14), + PMC_POWERPC_EVENT(CYCLES_NO_INSTR_DISPATCHED, 0x08, 15), + PMC_POWERPC_EVENT(GPR_ISSUE_QUEUE_ENTRIES_OVER_THRESHOLD, 0x08, 16), + PMC_POWERPC_EVENT(GPR_ISSUE_QUEUE_STALLED, 0x08, 17), + PMC_POWERPC_EVENT(IU1_INSTR_COMPLETED, 0x08, 18), + PMC_POWERPC_EVENT(DSSALL_INSTR_COMPLETED, 0x08, 19), + PMC_POWERPC_EVENT(TLBSYNC_INSTR_COMPLETED, 0x08, 20), + PMC_POWERPC_EVENT(SYNC_INSTR_COMPLETED, 0x08, 21), + PMC_POWERPC_EVENT(SS_SM_INSTR_PIECES, 0x08, 22), + PMC_POWERPC_EVENT(DTLB_HW_SEARCH_CYCLES, 0x08, 23), + PMC_POWERPC_EVENT(SNOOP_RETRIES, 0x08, 24), + PMC_POWERPC_EVENT(SUCCESSFUL_STWCX, 0x08, 25), + PMC_POWERPC_EVENT(DST_STREAM_3_CACHE_LINE_FETCHES, 0x08, 26), + PMC_POWERPC_EVENT(THIRD_SPECULATIVE_BRANCH_BUFFER_RESOLVED_CORRECTLY, 0x08, 27), + PMC_POWERPC_EVENT(MISPREDICTED_BRANCHES, 0x08, 28), + PMC_POWERPC_EVENT(FOLDED_BRANCHES, 0x08, 29), + PMC_POWERPC_EVENT(FP_STORE_DOUBLE_COMPLETES_IN_LSU, 0x08, 30), + PMC_POWERPC_EVENT(L2_CACHE_HITS, 0x30, 2), + PMC_POWERPC_EVENT(L3_CACHE_HITS, 0x30, 3), + PMC_POWERPC_EVENT(L2_INSTR_CACHE_MISSES, 0x30, 4), + PMC_POWERPC_EVENT(L3_INSTR_CACHE_MISSES, 0x30, 5), + PMC_POWERPC_EVENT(L2_DATA_CACHE_MISSES, 0x30, 6), + PMC_POWERPC_EVENT(L3_DATA_CACHE_MISSES, 0x30, 7), + PMC_POWERPC_EVENT(L2_LOAD_HITS, 0x10, 8), + PMC_POWERPC_EVENT(L2_STORE_HITS, 0x10, 9), + PMC_POWERPC_EVENT(L3_LOAD_HITS, 0x10, 10), + PMC_POWERPC_EVENT(L3_STORE_HITS, 0x10, 11), + PMC_POWERPC_EVENT(L2_TOUCH_HITS, 0x30, 13), + PMC_POWERPC_EVENT(L3_TOUCH_HITS, 0x30, 14), + PMC_POWERPC_EVENT(SNOOP_RETRIES, 0x30, 15), + PMC_POWERPC_EVENT(SNOOP_MODIFIED, 0x10, 16), + PMC_POWERPC_EVENT(SNOOP_VALID, 0x10, 17), + PMC_POWERPC_EVENT(INTERVENTION, 0x30, 18), + PMC_POWERPC_EVENT(L2_CACHE_MISSES, 0x10, 19), + PMC_POWERPC_EVENT(L3_CACHE_MISSES, 0x10, 20), + PMC_POWERPC_EVENT(L2_CACHE_CASTOUTS, 0x20, 8), + PMC_POWERPC_EVENT(L3_CACHE_CASTOUTS, 0x20, 9), + PMC_POWERPC_EVENT(L2SQ_FULL_CYCLES, 0x20, 10), + PMC_POWERPC_EVENT(L3SQ_FULL_CYCLES, 0x20, 11), + PMC_POWERPC_EVENT(RAQ_FULL_CYCLES, 0x20, 16), + PMC_POWERPC_EVENT(WAQ_FULL_CYCLES, 0x20, 17), + PMC_POWERPC_EVENT(L1_EXTERNAL_INTERVENTIONS, 0x20, 19), + PMC_POWERPC_EVENT(L2_EXTERNAL_INTERVENTIONS, 0x20, 20), + PMC_POWERPC_EVENT(L3_EXTERNAL_INTERVENTIONS, 0x20, 21), + PMC_POWERPC_EVENT(EXTERNAL_INTERVENTIONS, 0x20, 22), + PMC_POWERPC_EVENT(EXTERNAL_PUSHES, 0x20, 23), + PMC_POWERPC_EVENT(EXTERNAL_SNOOP_RETRY, 0x20, 24), + PMC_POWERPC_EVENT(DTQ_FULL_CYCLES, 0x20, 25), + PMC_POWERPC_EVENT(BUS_RETRY, 0x20, 26), + PMC_POWERPC_EVENT(L2_VALID_REQUEST, 0x20, 27), + PMC_POWERPC_EVENT(BORDQ_FULL, 0x20, 28), + PMC_POWERPC_EVENT(BUS_TAS_FOR_READS, 0x20, 42), + PMC_POWERPC_EVENT(BUS_TAS_FOR_WRITES, 0x20, 43), + PMC_POWERPC_EVENT(BUS_READS_NOT_RETRIED, 0x20, 44), + PMC_POWERPC_EVENT(BUS_WRITES_NOT_RETRIED, 0x20, 45), + PMC_POWERPC_EVENT(BUS_READS_WRITES_NOT_RETRIED, 0x20, 46), + PMC_POWERPC_EVENT(BUS_RETRY_DUE_TO_L1_RETRY, 0x20, 47), + PMC_POWERPC_EVENT(BUS_RETRY_DUE_TO_PREVIOUS_ADJACENT, 0x20, 48), + PMC_POWERPC_EVENT(BUS_RETRY_DUE_TO_COLLISION, 0x20, 49), + PMC_POWERPC_EVENT(BUS_RETRY_DUE_TO_INTERVENTION_ORDERING, 0x20, 50), + PMC_POWERPC_EVENT(SNOOP_REQUESTS, 0x20, 51), + PMC_POWERPC_EVENT(PREFETCH_ENGINE_REQUEST, 0x20, 52), + PMC_POWERPC_EVENT(PREFETCH_ENGINE_COLLISION_VS_LOAD, 0x20, 53), + PMC_POWERPC_EVENT(PREFETCH_ENGINE_COLLISION_VS_STORE, 0x20, 54), + PMC_POWERPC_EVENT(PREFETCH_ENGINE_COLLISION_VS_INSTR_FETCH, 0x20, 55), + PMC_POWERPC_EVENT(PREFETCH_ENGINE_COLLISION_VS_LOAD_STORE_INSTR_FETCH, 0x20, 56), + PMC_POWERPC_EVENT(PREFETCH_ENGINE_FULL, 0x20, 57) +}; + +const size_t powerpc_event_codes_size = + sizeof(powerpc_event_codes) / sizeof(powerpc_event_codes[0]); int pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, @@ -55,6 +333,520 @@ pmc_save_kernel_callchain(uintptr_t *cc, return (0); } +static pmc_value_t +powerpc_pmcn_read(unsigned int pmc) +{ + switch (pmc) { + case 0: + return mfspr(SPR_PMC1); + break; + case 1: + return mfspr(SPR_PMC2); + break; + case 2: + return mfspr(SPR_PMC3); + break; + case 3: + return mfspr(SPR_PMC4); + break; + case 4: + return mfspr(SPR_PMC5); + break; + case 5: + return mfspr(SPR_PMC6); + default: + panic("Invalid PMC number: %d\n", pmc); + } +} + +static void +powerpc_pmcn_write(unsigned int pmc, uint32_t val) +{ + switch (pmc) { + case 0: + mtspr(SPR_PMC1, val); + break; + case 1: + mtspr(SPR_PMC2, val); + break; + case 2: + mtspr(SPR_PMC3, val); + break; + case 3: + mtspr(SPR_PMC4, val); + break; + case 4: + mtspr(SPR_PMC5, val); + break; + case 5: + mtspr(SPR_PMC6, val); + break; + default: + panic("Invalid PMC number: %d\n", pmc); + } +} + +static int +powerpc_allocate_pmc(int cpu, int ri, struct pmc *pm, + const struct pmc_op_pmcallocate *a) +{ + enum pmc_event pe; + uint32_t caps, config, counter; + int i; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < PPC_MAX_PMCS, + ("[powerpc,%d] illegal row index %d", __LINE__, ri)); + + caps = a->pm_caps; + + /* + * TODO: Check actual class for different generations. + */ + if (a->pm_class != PMC_CLASS_PPC7450) + return (EINVAL); + pe = a->pm_ev; + for (i = 0; i < powerpc_event_codes_size; i++) { + if (powerpc_event_codes[i].pe_ev == pe) { + config = powerpc_event_codes[i].pe_code; + counter = powerpc_event_codes[i].pe_counter_mask; + break; + } + } + if (i == powerpc_event_codes_size) + return (EINVAL); + + if ((counter & (1 << ri)) == 0) + return (EINVAL); + + if (caps & PMC_CAP_SYSTEM) + config |= POWERPC_PMC_KERNEL_ENABLE; + if (caps & PMC_CAP_USER) + config |= POWERPC_PMC_USER_ENABLE; + if ((caps & (PMC_CAP_USER | PMC_CAP_SYSTEM)) == 0) + config |= POWERPC_PMC_ENABLE; + + pm->pm_md.pm_powerpc.pm_powerpc_evsel = config; + + PMCDBG(MDP,ALL,2,"powerpc-allocate ri=%d -> config=0x%x", ri, config); + + return 0; +} + +static int +powerpc_read_pmc(int cpu, int ri, pmc_value_t *v) +{ + struct pmc *pm; + pmc_value_t tmp; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < PPC_MAX_PMCS, + ("[powerpc,%d] illegal row index %d", __LINE__, ri)); + + pm = powerpc_pcpu[cpu]->pc_ppcpmcs[ri].phw_pmc; + tmp = powerpc_pmcn_read(ri); + PMCDBG(MDP,REA,2,"ppc-read id=%d -> %jd", ri, tmp); + if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) + *v = POWERPC_PERFCTR_VALUE_TO_RELOAD_COUNT(tmp); + else + *v = tmp; + + return 0; +} + +static int +powerpc_write_pmc(int cpu, int ri, pmc_value_t v) +{ + struct pmc *pm; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < PPC_MAX_PMCS, + ("[powerpc,%d] illegal row-index %d", __LINE__, ri)); + + pm = powerpc_pcpu[cpu]->pc_ppcpmcs[ri].phw_pmc; + + if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) + v = POWERPC_RELOAD_COUNT_TO_PERFCTR_VALUE(v); + + PMCDBG(MDP,WRI,1,"powerpc-write cpu=%d ri=%d v=%jx", cpu, ri, v); + + powerpc_pmcn_write(ri, v); + + return 0; +} + +static int +powerpc_config_pmc(int cpu, int ri, struct pmc *pm) +{ + struct pmc_hw *phw; + + PMCDBG(MDP,CFG,1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < PPC_MAX_PMCS, + ("[powerpc,%d] illegal row-index %d", __LINE__, ri)); + + phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri]; + + KASSERT(pm == NULL || phw->phw_pmc == NULL, + ("[powerpc,%d] pm=%p phw->pm=%p hwpmc not unconfigured", + __LINE__, pm, phw->phw_pmc)); + + phw->phw_pmc = pm; + + return 0; +} + +static int +powerpc_start_pmc(int cpu, int ri) +{ + uint32_t config; + struct pmc *pm; + struct pmc_hw *phw; + register_t pmc_mmcr; + + phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri]; + pm = phw->phw_pmc; + config = pm->pm_md.pm_powerpc.pm_powerpc_evsel & ~POWERPC_PMC_ENABLE; + + /* Enable the PMC. */ + switch (ri) { + case 0: + pmc_mmcr = mfspr(SPR_MMCR0); + pmc_mmcr = PPC_SET_PMC1SEL(pmc_mmcr, config); + mtspr(SPR_MMCR0, pmc_mmcr); + break; + case 1: + pmc_mmcr = mfspr(SPR_MMCR0); + pmc_mmcr = PPC_SET_PMC2SEL(pmc_mmcr, config); + mtspr(SPR_MMCR0, pmc_mmcr); + break; + case 2: + pmc_mmcr = mfspr(SPR_MMCR1); + pmc_mmcr = PPC_SET_PMC3SEL(pmc_mmcr, config); + mtspr(SPR_MMCR1, pmc_mmcr); + break; + case 3: + pmc_mmcr = mfspr(SPR_MMCR0); + pmc_mmcr = PPC_SET_PMC4SEL(pmc_mmcr, config); + mtspr(SPR_MMCR0, pmc_mmcr); + break; + case 4: + pmc_mmcr = mfspr(SPR_MMCR1); + pmc_mmcr = PPC_SET_PMC5SEL(pmc_mmcr, config); + mtspr(SPR_MMCR1, pmc_mmcr); + break; + case 5: + pmc_mmcr = mfspr(SPR_MMCR1); + pmc_mmcr = PPC_SET_PMC6SEL(pmc_mmcr, config); + mtspr(SPR_MMCR1, pmc_mmcr); + break; + default: + break; + } + + /* The mask is inverted (enable is 1) compared to the flags in MMCR0, which + * are Freeze flags. + */ + config = ~pm->pm_md.pm_powerpc.pm_powerpc_evsel & POWERPC_PMC_ENABLE; + + pmc_mmcr = mfspr(SPR_MMCR0); + pmc_mmcr &= ~SPR_MMCR0_FC; + pmc_mmcr |= config; + mtspr(SPR_MMCR0, pmc_mmcr); + + return 0; +} + +static int +powerpc_stop_pmc(int cpu, int ri) +{ + struct pmc *pm; + struct pmc_hw *phw; + register_t pmc_mmcr; + + phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri]; + pm = phw->phw_pmc; + + /* + * Disable the PMCs. + */ + switch (ri) { + case 0: + pmc_mmcr = mfspr(SPR_MMCR0); + pmc_mmcr = PPC_SET_PMC1SEL(pmc_mmcr, 0); + mtspr(SPR_MMCR0, pmc_mmcr); + break; + case 1: + pmc_mmcr = mfspr(SPR_MMCR0); + pmc_mmcr = PPC_SET_PMC2SEL(pmc_mmcr, 0); + mtspr(SPR_MMCR0, pmc_mmcr); + break; + case 2: + pmc_mmcr = mfspr(SPR_MMCR1); + pmc_mmcr = PPC_SET_PMC3SEL(pmc_mmcr, 0); + mtspr(SPR_MMCR1, pmc_mmcr); + break; + case 3: + pmc_mmcr = mfspr(SPR_MMCR0); + pmc_mmcr = PPC_SET_PMC4SEL(pmc_mmcr, 0); + mtspr(SPR_MMCR0, pmc_mmcr); + break; + case 4: + pmc_mmcr = mfspr(SPR_MMCR1); + pmc_mmcr = PPC_SET_PMC5SEL(pmc_mmcr, 0); + mtspr(SPR_MMCR1, pmc_mmcr); + break; + case 5: + pmc_mmcr = mfspr(SPR_MMCR1); + pmc_mmcr = PPC_SET_PMC6SEL(pmc_mmcr, 0); + mtspr(SPR_MMCR1, pmc_mmcr); + break; + default: + break; + } + return 0; +} + +static int +powerpc_release_pmc(int cpu, int ri, struct pmc *pmc) +{ + struct pmc_hw *phw; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < PPC_MAX_PMCS, + ("[powerpc,%d] illegal row-index %d", __LINE__, ri)); + + phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri]; + KASSERT(phw->phw_pmc == NULL, + ("[powerpc,%d] PHW pmc %p non-NULL", __LINE__, phw->phw_pmc)); + + return 0; +} + +static int +powerpc_switch_in(struct pmc_cpu *pc, struct pmc_process *pp) +{ + return 0; +} + +static int +powerpc_switch_out(struct pmc_cpu *pc, struct pmc_process *pp) +{ + return 0; +} + +static int +powerpc_intr(int cpu, struct trapframe *tf) +{ + int i, error, retval; + uint32_t config; + struct pmc *pm; + struct powerpc_cpu *pac; + pmc_value_t v; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d] out of range CPU %d", __LINE__, cpu)); + + PMCDBG(MDP,INT,1, "cpu=%d tf=%p um=%d", cpu, (void *) tf, + TRAPF_USERMODE(tf)); + + retval = 0; + + pac = powerpc_pcpu[cpu]; + + /* + * look for all PMCs that have interrupted: + * - look for a running, sampling PMC which has overflowed + * and which has a valid 'struct pmc' association + * + * If found, we call a helper to process the interrupt. + */ + + for (i = 0; i < PPC_MAX_PMCS; i++) { + if ((pm = pac->pc_ppcpmcs[i].phw_pmc) == NULL || + !PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) { + continue; + } + + if (!POWERPC_PMC_HAS_OVERFLOWED(i)) + continue; + + retval = 1; /* Found an interrupting PMC. */ + + if (pm->pm_state != PMC_STATE_RUNNING) + continue; + + /* Stop the PMC, reload count. */ + v = pm->pm_sc.pm_reloadcount; + config = mfspr(SPR_MMCR0); + + KASSERT((config & ~AMD_PMC_ENABLE) == + (pm->pm_md.pm_amd.pm_amd_evsel & ~AMD_PMC_ENABLE), + ("[powerpc,%d] config mismatch reg=0x%x pm=0x%x", __LINE__, + config, pm->pm_md.pm_amd.pm_amd_evsel)); + + mtspr(SPR_MMCR0, config | SPR_MMCR0_FC); + powerpc_pmcn_write(i, v); + + /* Restart the counter if logging succeeded. */ + error = pmc_process_interrupt(cpu, pm, tf, TRAPF_USERMODE(tf)); + mtspr(SPR_MMCR0, config); + if (error != 0) + powerpc_stop_pmc(cpu, i); + atomic_add_int(retval ? &pmc_stats.pm_intr_processed : + &pmc_stats.pm_intr_ignored, 1); + + } + + /* Re-enable PERF exceptions. */ + mtspr(SPR_MMCR0, mfspr(SPR_MMCR0) | SPR_MMCR0_PMXE); + + return (retval); +} + +static int +powerpc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) +{ + int error; + struct pmc_hw *phw; + char powerpc_name[PMC_NAME_MAX]; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d], illegal CPU %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < PPC_MAX_PMCS, + ("[powerpc,%d] row-index %d out of range", __LINE__, ri)); + + phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri]; + snprintf(powerpc_name, sizeof(powerpc_name), "POWERPC-%d", ri); + if ((error = copystr(powerpc_name, pi->pm_name, PMC_NAME_MAX, + NULL)) != 0) + return error; + pi->pm_class = PMC_CLASS_PPC7450; + if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { + pi->pm_enabled = TRUE; + *ppmc = phw->phw_pmc; + } else { + pi->pm_enabled = FALSE; + *ppmc = NULL; + } + + return (0); +} + +static int +powerpc_get_config(int cpu, int ri, struct pmc **ppm) +{ + *ppm = powerpc_pcpu[cpu]->pc_ppcpmcs[ri].phw_pmc; + + return 0; +} + +static int +powerpc_pcpu_init(struct pmc_mdep *md, int cpu) +{ + int first_ri, i; + struct pmc_cpu *pc; + struct powerpc_cpu *pac; + struct pmc_hw *phw; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[powerpc,%d] wrong cpu number %d", __LINE__, cpu)); + PMCDBG(MDP,INI,1,"powerpc-init cpu=%d", cpu); + + powerpc_pcpu[cpu] = pac = malloc(sizeof(struct powerpc_cpu), M_PMC, + M_WAITOK|M_ZERO); + pac->pc_ppcpmcs = malloc(sizeof(struct pmc_hw) * PPC_MAX_PMCS, + M_PMC, M_WAITOK|M_ZERO); + pc = pmc_pcpu[cpu]; + first_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_PPC7450].pcd_ri; + KASSERT(pc != NULL, ("[powerpc,%d] NULL per-cpu pointer", __LINE__)); + + for (i = 0, phw = pac->pc_ppcpmcs; i < PPC_MAX_PMCS; i++, phw++) { + phw->phw_state = PMC_PHW_FLAG_IS_ENABLED | + PMC_PHW_CPU_TO_STATE(cpu) | PMC_PHW_INDEX_TO_STATE(i); + phw->phw_pmc = NULL; + pc->pc_hwpmcs[i + first_ri] = phw; + } + + /* Clear the MMCRs, and set FC, to disable all PMCs. */ + mtspr(SPR_MMCR0, SPR_MMCR0_FC | SPR_MMCR0_PMXE | SPR_MMCR0_PMC1CE | SPR_MMCR0_PMCNCE); + mtspr(SPR_MMCR1, 0); + + return 0; +} + +static int +powerpc_pcpu_fini(struct pmc_mdep *md, int cpu) +{ + uint32_t mmcr0 = mfspr(SPR_MMCR0); + + mmcr0 |= SPR_MMCR0_FC; + mtspr(SPR_MMCR0, mmcr0); + free(powerpc_pcpu[cpu]->pc_ppcpmcs, M_PMC); + free(powerpc_pcpu[cpu], M_PMC); + return 0; +} + +struct pmc_mdep * +pmc_md_initialize() +{ + struct pmc_mdep *pmc_mdep; + struct pmc_classdep *pcd; + + /* + * Allocate space for pointers to PMC HW descriptors and for + * the MDEP structure used by MI code. + */ + powerpc_pcpu = malloc(sizeof(struct powerpc_cpu *) * pmc_cpu_max(), M_PMC, + M_WAITOK|M_ZERO); + + /* Just one class */ + pmc_mdep = malloc(sizeof(struct pmc_mdep) + sizeof(struct pmc_classdep), + M_PMC, M_WAITOK|M_ZERO); + + pmc_mdep->pmd_cputype = PMC_CPU_PPC_7450; + pmc_mdep->pmd_nclass = 1; + + pcd = &pmc_mdep->pmd_classdep[PMC_MDEP_CLASS_INDEX_PPC7450]; + pcd->pcd_caps = POWERPC_PMC_CAPS; + pcd->pcd_class = PMC_CLASS_PPC7450; + pcd->pcd_num = PPC_MAX_PMCS; + pcd->pcd_ri = pmc_mdep->pmd_npmc; + pcd->pcd_width = 32; /* All PMCs, even in ppc970, are 32-bit */ + + pcd->pcd_allocate_pmc = powerpc_allocate_pmc; + pcd->pcd_config_pmc = powerpc_config_pmc; + pcd->pcd_pcpu_fini = powerpc_pcpu_fini; + pcd->pcd_pcpu_init = powerpc_pcpu_init; + pcd->pcd_describe = powerpc_describe; + pcd->pcd_get_config = powerpc_get_config; + pcd->pcd_read_pmc = powerpc_read_pmc; + pcd->pcd_release_pmc = powerpc_release_pmc; + pcd->pcd_start_pmc = powerpc_start_pmc; + pcd->pcd_stop_pmc = powerpc_stop_pmc; + pcd->pcd_write_pmc = powerpc_write_pmc; + + pmc_mdep->pmd_intr = powerpc_intr; + pmc_mdep->pmd_switch_in = powerpc_switch_in; + pmc_mdep->pmd_switch_out = powerpc_switch_out; + + pmc_mdep->pmd_npmc += PPC_MAX_PMCS; + + return (pmc_mdep); +} + +void +pmc_md_finalize(struct pmc_mdep *md) +{ + free(md, M_PMC); +} + int pmc_save_user_callchain(uintptr_t *cc, int maxsamples, struct trapframe *tf) Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Sat Dec 24 19:01:31 2011 (r228868) +++ head/sys/dev/hwpmc/pmc_events.h Sat Dec 24 19:34:52 2011 (r228869) @@ -3093,6 +3093,231 @@ __PMC_EV_ALIAS("CYCLES_UNHALTED_L3_FLL_D #define PMC_EV_MIPS24K_FIRST PMC_EV_MIPS24K_CYCLE #define PMC_EV_MIPS24K_LAST PMC_EV_MIPS24K_WBB_FULL_PIPELINE_STALLS +#define __PMC_EV_PPC7450() \ + __PMC_EV(PPC7450, CYCLE) \ + __PMC_EV(PPC7450, INSTR_COMPLETED) \ + __PMC_EV(PPC7450, TLB_BIT_TRANSITIONS) \ + __PMC_EV(PPC7450, INSTR_DISPATCHED) \ + __PMC_EV(PPC7450, PMON_EXCEPT) \ + __PMC_EV(PPC7450, PMON_SIG) \ + __PMC_EV(PPC7450, VPU_INSTR_COMPLETED) \ + __PMC_EV(PPC7450, VFPU_INSTR_COMPLETED) \ + __PMC_EV(PPC7450, VIU1_INSTR_COMPLETED) \ + __PMC_EV(PPC7450, VIU2_INSTR_COMPLETED) \ + __PMC_EV(PPC7450, MTVSCR_INSTR_COMPLETED) \ + __PMC_EV(PPC7450, MTVRSAVE_INSTR_COMPLETED) \ + __PMC_EV(PPC7450, VPU_INSTR_WAIT_CYCLES) \ + __PMC_EV(PPC7450, VFPU_INSTR_WAIT_CYCLES) \ + __PMC_EV(PPC7450, VIU1_INSTR_WAIT_CYCLES) \ + __PMC_EV(PPC7450, VIU2_INSTR_WAIT_CYCLES) \ + __PMC_EV(PPC7450, MFVSCR_SYNC_CYCLES) \ + __PMC_EV(PPC7450, VSCR_SAT_SET) \ + __PMC_EV(PPC7450, STORE_INSTR_COMPLETED) \ + __PMC_EV(PPC7450, L1_INSTR_CACHE_MISSES) \ + __PMC_EV(PPC7450, L1_DATA_SNOOPS) \ + __PMC_EV(PPC7450, UNRESOLVED_BRANCHES) \ + __PMC_EV(PPC7450, SPEC_BUFFER_CYCLES) \ + __PMC_EV(PPC7450, BRANCH_UNIT_STALL_CYCLES) \ + __PMC_EV(PPC7450, TRUE_BRANCH_TARGET_HITS) \ + __PMC_EV(PPC7450, BRANCH_LINK_STAC_PREDICTED) \ + __PMC_EV(PPC7450, GPR_ISSUE_QUEUE_DISPATCHES) \ + __PMC_EV(PPC7450, CYCLES_THREE_INSTR_DISPATCHED) \ + __PMC_EV(PPC7450, THRESHOLD_INSTR_QUEUE_ENTRIES_CYCLES) \ + __PMC_EV(PPC7450, THRESHOLD_VEC_INSTR_QUEUE_ENTRIES_CYCLES) \ + __PMC_EV(PPC7450, CYCLES_NO_COMPLETED_INSTRS) \ + __PMC_EV(PPC7450, IU2_INSTR_COMPLETED) \ + __PMC_EV(PPC7450, BRANCHES_COMPLETED) \ + __PMC_EV(PPC7450, EIEIO_INSTR_COMPLETED) \ + __PMC_EV(PPC7450, MTSPR_INSTR_COMPLETED) \ + __PMC_EV(PPC7450, SC_INSTR_COMPLETED) \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 20:46:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68D141065670; Sat, 24 Dec 2011 20:46:11 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id C67608FC19; Sat, 24 Dec 2011 20:46:10 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so8888556obb.13 for ; Sat, 24 Dec 2011 12:46:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=9shDv7RVHlW3U5Akgl1FXBqCweABM0kqkY/f1F8xC2o=; b=E+KZ7SYBUxJCK3GJHnLszIe5zFkQpJtZoW/gZBx95C7Y4ImyNQQaZq6xUgLm9CJGRL MyLB3x3BEDDCrQeS+aJP79WqTF+gf8sZWaSwAsukt38U8iByLp70hA9/af5qhSHrY0xf vReO2ZxSvBUkyqlv0+JLqhCNms1aC7UfR2/ss= MIME-Version: 1.0 Received: by 10.182.78.165 with SMTP id c5mr17298826obx.60.1324759570224; Sat, 24 Dec 2011 12:46:10 -0800 (PST) Received: by 10.182.67.163 with HTTP; Sat, 24 Dec 2011 12:46:10 -0800 (PST) In-Reply-To: <8E5EE6FA-7BA1-4590-843A-F5C3C0493E5B@FreeBSD.org> References: <201112231500.pBNF0c0O071712@svn.freebsd.org> <201112231058.46642.jhb@freebsd.org> <201112231122.34436.jhb@freebsd.org> <20111223120644.75fe944d@kan.dyndns.org> <20111223175143.GJ50300@deviant.kiev.zoral.com.ua> <20111224100509.GA98136@vniz.net> <20111224103948.GA10939@vniz.net> <20111224105045.GA11127@vniz.net> <8E5EE6FA-7BA1-4590-843A-F5C3C0493E5B@FreeBSD.org> Date: Sat, 24 Dec 2011 12:46:10 -0800 Message-ID: From: Xin LI To: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: src-committers@freebsd.org, Andrey Chernov , John Baldwin , svn-src-all@freebsd.org, svn-src-head@freebsd.org, Colin Percival , Kostik Belousov , Alexander Kabaev Subject: Re: svn commit: r228843 - head/contrib/telnet/libtelnet head/crypto/heimdal/appl/telnet/libtelnet head/include head/lib/libc/gen head/lib/libc/iconv head/lib/libc/include head/lib/libc/net head/libexec... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 20:46:11 -0000 2011/12/24 Edward Tomasz Napiera=C5=82a : > Wiadomo=C5=9B=C4=87 napisana przez Andrey Chernov w dniu 24 gru 2011, o g= odz. 11:50: >> On Sat, Dec 24, 2011 at 02:45:21AM -0800, Xin LI wrote: >>> On Sat, Dec 24, 2011 at 2:39 AM, Andrey Chernov wrot= e: >>>> On Sat, Dec 24, 2011 at 02:26:20AM -0800, Xin LI wrote: >>>>> chroot(2) can create legitimate and secure environment where dlopen(2= ) >>>>> is safe and necessary. >>>> >>>> Yes, so ischroot() check can be used only into that places where libc'= s >>>> libc_dlopen() currently used, i.e. placed into libc_dlopen() itself. >>> >>> So it's Okay to break NSS in chroot jail? >> >> We need general solution. We simple can't count all possible and future >> ftpd's arround the world and insert __FreeBSD_libc_enter_restricted_mode= () >> into them. I even not mention other programs that may use chroot() too. = If >> some component like auth is critical for chroot, it should be restricted >> in general scope. > > How about adding a check in dlopen(3) to make sure the file being opened > is owned either by us (getuid(3)) or root and is not writable by anyone e= lse? Won't work because the binary might be run by privileged but chroot user. Again, this is the first proposal that we have considered. Cheers, --=20 Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 21:36:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 3998B106564A; Sat, 24 Dec 2011 21:36:19 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 0A7BA14F542; Sat, 24 Dec 2011 21:36:19 +0000 (UTC) Message-ID: <4EF645D2.8080407@FreeBSD.org> Date: Sat, 24 Dec 2011 13:36:18 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Marius Strobl References: <201112241216.pBOCGd1H012696@svn.freebsd.org> In-Reply-To: <201112241216.pBOCGd1H012696@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 21:36:19 -0000 On 12/24/2011 04:16, Marius Strobl wrote: > On FreeBSD just use the MD5 implementation of libmd rather than that of > libcrypto so we don't need to relinquish csup when world is built without > OpenSSL. Did you benchmark this at all? I agree that keeping csup available absent openssl is a good goal, but csup is a prototypical "tool that does the same thing many thousands of times" so even tiny regressions could add up to a large cost in wall clock time. If the openssl version is faster, then conditionalizing where to get md5 is probably the right answer. If libmd is faster, then it's a net win. :) Doug -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 22:37:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A691C106566B; Sat, 24 Dec 2011 22:37:27 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95E0B8FC17; Sat, 24 Dec 2011 22:37:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBOMbR9t031920; Sat, 24 Dec 2011 22:37:27 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBOMbRWT031918; Sat, 24 Dec 2011 22:37:27 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201112242237.pBOMbRWT031918@svn.freebsd.org> From: Eitan Adler Date: Sat, 24 Dec 2011 22:37:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228871 - head/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 22:37:27 -0000 Author: eadler (ports committer) Date: Sat Dec 24 22:37:27 2011 New Revision: 228871 URL: http://svn.freebsd.org/changeset/base/228871 Log: - Add fallthrough comment Approved by: pluknet Found with: Coverity Prevent(tm) CID: 10125 Modified: head/sbin/ipfw/main.c Modified: head/sbin/ipfw/main.c ============================================================================== --- head/sbin/ipfw/main.c Sat Dec 24 19:39:02 2011 (r228870) +++ head/sbin/ipfw/main.c Sat Dec 24 22:37:27 2011 (r228871) @@ -309,6 +309,7 @@ ipfw_main(int oldac, char **oldav) case 'p': errx(EX_USAGE, "An absolute pathname must be used " "with -p option."); + /* NOTREACHED */ case 'q': co.do_quiet = 1; From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 23:03:56 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF329106566C; Sat, 24 Dec 2011 23:03:56 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 8E6DB8FC13; Sat, 24 Dec 2011 23:03:56 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id pBON3uIp069419; Sat, 24 Dec 2011 15:03:56 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id pBON3uHA069418; Sat, 24 Dec 2011 15:03:56 -0800 (PST) (envelope-from sgk) Date: Sat, 24 Dec 2011 15:03:56 -0800 From: Steve Kargl To: Doug Barton Message-ID: <20111224230356.GA69395@troutmask.apl.washington.edu> References: <201112241216.pBOCGd1H012696@svn.freebsd.org> <4EF645D2.8080407@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EF645D2.8080407@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Marius Strobl , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 23:03:56 -0000 On Sat, Dec 24, 2011 at 01:36:18PM -0800, Doug Barton wrote: > On 12/24/2011 04:16, Marius Strobl wrote: > > On FreeBSD just use the MD5 implementation of libmd rather than that of > > libcrypto so we don't need to relinquish csup when world is built without > > OpenSSL. > > Did you benchmark this at all? I agree that keeping csup available > absent openssl is a good goal, but csup is a prototypical "tool that > does the same thing many thousands of times" so even tiny regressions > could add up to a large cost in wall clock time. > > If the openssl version is faster, then conditionalizing where to get md5 > is probably the right answer. If libmd is faster, then it's a net win. :) > Imagine that! A request from someone, who is a staunch anti-profiled lib supporter, to (I don't know) profile a change to the system. -- Steve From owner-svn-src-all@FreeBSD.ORG Sat Dec 24 23:15:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 086951065670; Sat, 24 Dec 2011 23:15:26 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB7778FC13; Sat, 24 Dec 2011 23:15:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBONFPUJ033458; Sat, 24 Dec 2011 23:15:25 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBONFPHm033456; Sat, 24 Dec 2011 23:15:25 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201112242315.pBONFPHm033456@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sat, 24 Dec 2011 23:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228872 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 23:15:26 -0000 Author: gonzo Date: Sat Dec 24 23:15:25 2011 New Revision: 228872 URL: http://svn.freebsd.org/changeset/base/228872 Log: - Initialize compact_flash_attribute_base_addr from bootinfo structure Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c ============================================================================== --- head/sys/mips/cavium/octeon_machdep.c Sat Dec 24 22:37:27 2011 (r228871) +++ head/sys/mips/cavium/octeon_machdep.c Sat Dec 24 23:15:25 2011 (r228872) @@ -573,6 +573,8 @@ octeon_process_app_desc_ver_6(void) cvmx_sysinfo_get()->mac_addr_count = octeon_bootinfo->mac_addr_count; cvmx_sysinfo_get()->compact_flash_common_base_addr = octeon_bootinfo->compact_flash_common_base_addr; + cvmx_sysinfo_get()->compact_flash_attribute_base_addr = + octeon_bootinfo->compact_flash_attribute_base_addr; } static void