From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 03:50:05 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8807C1065673; Mon, 5 Jan 2009 03:50:05 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72C1C8FC12; Mon, 5 Jan 2009 03:50:05 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n053o5AY083909; Mon, 5 Jan 2009 03:50:05 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n053o5a0083907; Mon, 5 Jan 2009 03:50:05 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901050350.n053o5a0083907@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 03:50:05 +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: r186755 - in stable/7/release/doc: en_US.ISO8859-1/errata share/sgml X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 03:50:06 -0000 Author: hrs Date: Mon Jan 5 03:50:04 2009 New Revision: 186755 URL: http://svn.freebsd.org/changeset/base/186755 Log: - Trim old Errata. - Bump version numbers. - Document Errata items for 7.1R: em(4) -> igb(4) change, ae(4) missing in 7.1R relnotes, and s/get_setaffinity()/sched_setaffinity()/ in 7.1R relnotes. Approved by: re (implicit) Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml stable/7/release/doc/share/sgml/release.ent Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 03:06:55 2009 (r186754) +++ stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 03:50:04 2009 (r186755) @@ -16,7 +16,7 @@ %release; - + ]>
@@ -41,6 +41,7 @@ 2008 + 2009 The &os; Documentation Project @@ -125,11 +126,9 @@ Security Advisories -No advisories. -]]> -The following security advisories pertain to &os; &release.bugfix;. For more information, consult the individual advisories available from . @@ -154,128 +153,72 @@ 17 April 2008 OpenSSH X11-forwarding privilege escalation - - SA-08:06.bind - 13 July 2008 - DNS cache poisoning - - - SA-08:07.amd64 - 3 September 2008 - amd64 swapgs local privilege escalation - - - SA-08:08.nmount - 3 September 2008 - &man.nmount.2; local arbitrary code execution - - - SA-08:09.icmp6 - 3 September 2008 - Remote kernel panics on IPv6 connections - - - SA-08:10.nd6 - 1 October 2008 - IPv6 Neighbor Discovery Protocol routing vulnerability - - - SA-08:11.arc4random - 24 November 2008 - &man.arc4random.9; predictable sequence vulnerability - - - SA-08:12.ftpd - 23 December 2008 - Cross-site request forgery in &man.ftpd.8; - - - SA-08:13.protosw - 23 December 2008 - netgraph / bluetooth privilege escalation - -]]> +--> Open Issues -No open issues. -]]> - -[20080229] &man.tcpdump.1; does not correctly print the - TX/RX rates for 802.11 frames. This issue has been fixed on the - HEAD and RELENG_7 branches. - - [20080229] A bug in Linux emulation may cause segmentation - faults for some Linux programs using &man.mmap.2;. This issue - has been fixed on the HEAD and RELENG_7 branches. - - [20080229] Instances of packet corruption and instability - have been observed with the &man.re.4; network driver. Some - users have reported that using a newer version of this driver - (on HEAD) has solved their problems, or at least mitigated - them. - - [20080229, updated 20080817] A change in the way that &os; sends TCP options - has been reported to cause connectivity issues. - This problem has been corrected on - HEAD and the RELENG_7 and RELENG_7_0 branches.. Further - details are contained in errta notice - FreeBSD-EN-08:02.tcp. - - [20080307] The &os; implementation of SCTP currently depends - on having INET6 support compiled into the - kernel. This requirement is planned to be removed in future - releases. - - [20080307] Source upgrades from &os; - 6.X to &os; &release.bugfix; will - generate warnings from &man.kldxref.8; during - the installkernel step. These warnings are - harmless and can be ignored. - - [20080307] The &man.crypto.4; driver, which is required for - IPsec functionality, has severe problems on &os;/&arch.powerpc; - (a kernel with device crypto included in its - configuration will be non-functional). - -]]> + [20090105] As in the Announcement of 7.1-RELEASE, certain Intel NICs + will come up as &man.igb.4; instead of &man.em.4; in this + release. There are only 3 PCI ID's that should have + their name changed from &man.em.4; to &man.igb.4;: + + + + 0x10A78086 + + + + 0x10A98086 + + + + 0x10D68086 + + + + You should be able to determine if your card will + change names by running the following command: + + &prompt.user; pciconf -l +. . . +em0@pci0:0:25:0: class=0x020000 card=0x02381028 chip=0x10c08086 rev=0x02 hdr=0x00 + + and for the line representing your NIC (should be named + em on older systems, + e.g. em0 or em1, etc) + check the fourth column. If that says + chip=0x10a78086 (or one of the other two IDs + given above) you will have the adapter's name change. + + [20090105] The Release Notes for 7.1-RELEASE should have mentioned + changes that the &man.ae.4; driver has been added to provide support + for the Attansic/Atheros L2 FastEthernet controllers. + This driver is not enabled in GENERIC + kernels for this release. + + [20090105] The Release Notes for 7.1-RELEASE included the + following misdescriptions: + + + + In the entry of &man.linux.4; ABI support, + get_setaffinity() should have been + sched_setaffinity(). + + Late-Breaking News and Corrections -No news. -]]> - -[20080229] The &os; &release.bugfix; release documentation - (release notes, hardware notes, and so forth) all contained a - note that users of &os; 7-STABLE should be subscribed to - the freebsd-current mailing list. This note - should not have appeared. - - [20080229] The release notes gave an incorrect version - number for KDE. The correct version number is 3.5.8. - -]]>
Modified: stable/7/release/doc/share/sgml/release.ent ============================================================================== --- stable/7/release/doc/share/sgml/release.ent Mon Jan 5 03:06:55 2009 (r186754) +++ stable/7/release/doc/share/sgml/release.ent Mon Jan 5 03:50:04 2009 (r186755) @@ -6,12 +6,12 @@ - + - + - + @@ -40,7 +40,7 @@ - + From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 04:26:25 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A0211065676; Mon, 5 Jan 2009 04:26:25 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 272A88FC24; Mon, 5 Jan 2009 04:26:25 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n054QPkr084705; Mon, 5 Jan 2009 04:26:25 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n054QPaQ084704; Mon, 5 Jan 2009 04:26:25 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200901050426.n054QPaQ084704@svn.freebsd.org> From: Rong-En Fan Date: Mon, 5 Jan 2009 04:26:25 +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: r186756 - stable/7/usr.sbin/rpc.yppasswdd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 04:26:25 -0000 Author: rafan Date: Mon Jan 5 04:26:24 2009 New Revision: 186756 URL: http://svn.freebsd.org/changeset/base/186756 Log: MFC r184459 - Whenever a password/shell is changed via rpc.yppasswdd, the daemon leaves one zombie process because it does not do the cleanup. For a long running NIS/YP server, it will have lots of zombie processes on it. Fix that by ignoring the SIGCHLD signal since we don't really care about the exit status in this case. PR: bin/91980 Reported by: Arjan van der Velde Submitted by: Jui-Nan Lin" Reviewed by: delphij Modified: stable/7/usr.sbin/rpc.yppasswdd/ (props changed) stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Modified: stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_main.c ============================================================================== --- stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Mon Jan 5 03:50:04 2009 (r186755) +++ stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Mon Jan 5 04:26:24 2009 (r186756) @@ -165,6 +165,7 @@ main(int argc, char *argv[]) struct sockaddr_in saddr; socklen_t asize = sizeof (saddr); struct netconfig *nconf; + struct sigaction sa; void *localhandle; int ch; char *mastername; @@ -268,6 +269,9 @@ the %s domain -- aborting", yppasswd_dom } } openlog("rpc.yppasswdd", LOG_PID, LOG_DAEMON); + memset(&sa, 0, sizeof(sa)); + sa.sa_flags = SA_NOCLDWAIT; + sigaction(SIGCHLD, &sa, NULL); rpcb_unset(YPPASSWDPROG, YPPASSWDVERS, NULL); rpcb_unset(MASTER_YPPASSWDPROG, MASTER_YPPASSWDVERS, NULL); From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 04:45:18 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AB97106579F; Mon, 5 Jan 2009 04:45:18 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 275DB8FC13; Mon, 5 Jan 2009 04:45:18 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n054jITF085135; Mon, 5 Jan 2009 04:45:18 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n054jIs1085134; Mon, 5 Jan 2009 04:45:18 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200901050445.n054jIs1085134@svn.freebsd.org> From: Ken Smith Date: Mon, 5 Jan 2009 04:45:18 +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: r186757 - stable/7/sys/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 04:45:19 -0000 Author: kensmith Date: Mon Jan 5 04:45:17 2009 New Revision: 186757 URL: http://svn.freebsd.org/changeset/base/186757 Log: Release is done, bump stable/7 to -STABLE. Modified: stable/7/sys/conf/newvers.sh Modified: stable/7/sys/conf/newvers.sh ============================================================================== --- stable/7/sys/conf/newvers.sh Mon Jan 5 04:26:24 2009 (r186756) +++ stable/7/sys/conf/newvers.sh Mon Jan 5 04:45:17 2009 (r186757) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="7.1" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 05:53:14 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 956C41065672; Mon, 5 Jan 2009 05:53:14 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80FA48FC0C; Mon, 5 Jan 2009 05:53:14 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n055rElc086399; Mon, 5 Jan 2009 05:53:14 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n055rEmL086398; Mon, 5 Jan 2009 05:53:14 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901050553.n055rEmL086398@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 05:53:14 +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: r186759 - stable/7/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 05:53:15 -0000 Author: hrs Date: Mon Jan 5 05:53:14 2009 New Revision: 186759 URL: http://svn.freebsd.org/changeset/base/186759 Log: - Trim old items. - Fix indent. Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Mon Jan 5 05:14:26 2009 (r186758) +++ stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Mon Jan 5 05:53:14 2009 (r186759) @@ -12,342 +12,238 @@ ]>
- - &os; &release.current; Release Notes + + &os; &release.current; Release Notes - The &os; Project + The &os; Project - $FreeBSD$ + $FreeBSD$ - - 2000 - 2001 - 2002 - 2003 - 2004 - 2005 - 2006 - 2007 - 2008 - The &os; Documentation Project - - - - &tm-attrib.freebsd; - &tm-attrib.ibm; - &tm-attrib.ieee; - &tm-attrib.intel; - &tm-attrib.sparc; - &tm-attrib.general; - - - - The release notes for &os; &release.current; contain a summary - of the changes made to the &os; base system on the - &release.branch; development line. - This document lists applicable security advisories that were issued since - the last release, as well as significant changes to the &os; - kernel and userland. - Some brief remarks on upgrading are also presented. - - - - - Introduction - - This document contains the release notes for &os; - &release.current;. It - describes recently added, changed, or deleted features of &os;. - It also provides some notes on upgrading - from previous versions of &os;. + + 2000 + 2001 + 2002 + 2003 + 2004 + 2005 + 2006 + 2007 + 2008 + 2009 + The &os; Documentation Project + + + + &tm-attrib.freebsd; + &tm-attrib.ibm; + &tm-attrib.ieee; + &tm-attrib.intel; + &tm-attrib.sparc; + &tm-attrib.general; + + + + The release notes for &os; &release.current; contain a summary + of the changes made to the &os; base system on the + &release.branch; development line. + This document lists applicable security advisories that were issued since + the last release, as well as significant changes to the &os; + kernel and userland. + Some brief remarks on upgrading are also presented. + + + + + Introduction + + This document contains the release notes for &os; + &release.current;. It + describes recently added, changed, or deleted features of &os;. + It also provides some notes on upgrading + from previous versions of &os;. The &release.type; distribution to which these release notes - apply represents the latest point along the &release.branch; development - branch since &release.branch; was created. Information regarding pre-built, binary - &release.type; distributions along this branch - can be found at . + The &release.type; distribution to which these release notes + apply represents the latest point along the &release.branch; development + branch since &release.branch; was created. Information regarding pre-built, binary + &release.type; distributions along this branch + can be found at . ]]> The &release.type; distribution to which these release notes - apply represents a point along the &release.branch; development - branch between &release.prev; and the future &release.next;. - Information regarding - pre-built, binary &release.type; distributions along this branch - can be found at . + The &release.type; distribution to which these release notes + apply represents a point along the &release.branch; development + branch between &release.prev; and the future &release.next;. + Information regarding + pre-built, binary &release.type; distributions along this branch + can be found at . ]]> This distribution of &os; &release.current; is a - &release.type; distribution. It can be found at or any of its mirrors. More - information on obtaining this (or other) &release.type; - distributions of &os; can be found in the Obtaining - &os; appendix to the &os; - Handbook. + This distribution of &os; &release.current; is a + &release.type; distribution. It can be found at or any of its mirrors. More + information on obtaining this (or other) &release.type; + distributions of &os; can be found in the Obtaining + &os; appendix to the &os; Handbook. ]]> - All users are encouraged to consult the release errata before - installing &os;. The errata document is updated with - late-breaking information discovered late in the - release cycle or after the release. Typically, it contains - information on known bugs, security advisories, and corrections to - documentation. An up-to-date copy of the errata for &os; - &release.current; can be found on the &os; Web site. - - - - - What's New - - This section describes - the most user-visible new or changed features in &os; - since &release.prev;. - - - Typical release note items - document recent security advisories issued after - &release.prev;, - new drivers or hardware support, new commands or options, - major bug fixes, or contributed software upgrades. They may also - list changes to major ports/packages or release engineering - practices. Clearly the release notes cannot list every single - change made to &os; between releases; this document focuses - primarily on security advisories, user-visible changes, and major - architectural improvements. - - - Security Advisories - - - - - - Kernel Changes - - The &man.ddb.4; kernel debugger now has an output capture - facility. Input and output from &man.ddb.4; can now be captured - to a memory buffer for later inspection using &man.sysctl.8; or - a textdump. The new capture command controls - this feature. - - The &man.ddb.4; debugger now supports a simple scripting - facility, which supports a set of named scripts consisting of a - set of &man.ddb.4; commands. These commands can be managed from - within &man.ddb.4; or with the use of the new &man.ddb.8; - utility. More details can be found in the &man.ddb.4; manual - page. - - The kernel now supports a new textdump format of kernel - dumps. A textdump provides higher-level information via - mechanically generated/extracted debugging output, rather than a - simple memory dump. This facility can be used to generate brief - kernel bug reports that are rich in debugging information, but - are not dependent on kernel symbol tables or precisely - synchronized source code. More information can be found in the - &man.textdump.4; manual page. - - [&arch.amd64;, &arch.i386;] The ULE - scheduler is now the default process scheduler - in GENERIC kernels. + All users are encouraged to consult the release errata before + installing &os;. The errata document is updated with + late-breaking information discovered late in the + release cycle or after the release. Typically, it contains + information on known bugs, security advisories, and corrections to + documentation. An up-to-date copy of the errata for &os; + &release.current; can be found on the &os; Web site. + + + + What's New + + This section describes the most user-visible new or changed + features in &os; since &release.prev;. + + Typical release note items document recent security + advisories issued after &release.prev;, new drivers or hardware + support, new commands or options, major bug fixes, or + contributed software upgrades. They may also list changes to + major ports/packages or release engineering practices. Clearly + the release notes cannot list every single change made to &os; + between releases; this document focuses primarily on security + advisories, user-visible changes, and major architectural + improvements. - - Boot Loader Changes + + Security Advisories + - [&arch.amd64;, &arch.i386;] The BTX kernel used by the boot - loader has been changed to invoke BIOS routines from real - mode. This change makes it possible to boot &os; from USB - devices. - - [&arch.amd64;, &arch.i386;] A new gptboot boot loader has - been added to support booting from a GPT labeled disk. A - new boot command has been added to - &man.gpt.8;, which makes a GPT disk bootable by writing the - required bits of the boot loader, creating a new boot - partition if required. - - - - - Hardware Support - - The &man.cmx.4; driver, a driver for Omnikey CardMan 4040 - PCMCIA smartcard readers, has been added. - - The &man.uslcom.4; driver, a driver for Silicon - Laboratories CP2101/CP2102-based USB serial adapters, has been - imported from OpenBSD. - - - Multimedia Support - - - - - - Network Interface Support - - The &man.ale.4; driver has been added to provide support - for Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet controllers. - This driver is not enabled in GENERIC - kernels for this release. - - The &man.em.4; driver has been split into two drivers - with some common parts. The &man.em.4; driver will continue - to support adapters up to the 82575, as well as new - client/desktop adapters. A new &man.igb.4; driver - will support new server adapters. - - [&arch.amd64;, &arch.i386;] The &man.wpi.4; driver has - been updated to include a number of stability fixes. - - - - - - Network Protocols + + Kernel Changes - - - - Disks and Storage + + Boot Loader Changes - The &man.aac.4; driver now supports volumes larger than - 2TB in size. + + - The &man.hptrr.4; driver has been updated to version 1.2 - from Highpoint. + + Hardware Support - + - - File Systems + + Multimedia Support - - - + + - - Userland Changes + + Network Interface Support - The &man.adduser.8; utility now supports - a option to set the mode of a new user's - home directory. - - &man.chflags.1; now supports a flag for - verbose output and a flag to ignore errors - with the same semantics as (for example) - &man.chmod.1;. - - The &man.realpath.1; utility now supports - a flag to suppress warnings; it now also - accepts multiple paths on its command line. - - &man.cron.8; now supports a option, - which can help managing cron mails in massive hosting - environment. + - &man.ypserv.8; now supports a option to - specify the port number on which it should listen. + + - - <filename>/etc/rc.d</filename> Scripts + + Network Protocols - - - - - - Contributed Software + - AMD has been updated from 6.0.10 - to 6.1.5. + - awk has been updated from 1 May - 2007 release to the 23 October 2007 release. + + Disks and Storage - bzip2 has been updated from 1.0.4 - to 1.0.5. + - OpenPAM has been updated from the - Figwort release to the Hydrangea release. + - OpenSSH has been updated from - 4.5p1 to 5.1p1. + + File Systems - sendmail has been updated from - 8.14.2 to 8.14.3. + + + - The timezone database has been updated from - the tzdata2007h release to - the tzdata2008b release. + + Userland Changes - + - - Ports/Packages Collection Infrastructure + + <filename>/etc/rc.d</filename> Scripts - + + + - + + Contributed Software - - Release Engineering and Integration + + - The supported version of - the GNOME desktop environment - (x11/gnome2) has been - updated from 2.20.1 to 2.22. + + Ports/Packages Collection Infrastructure - + - - Documentation + - - - + + Release Engineering and Integration - - Upgrading from previous releases of &os; + + - [&arch.i386;, &arch.amd64;] Beginning with &os; 6.2-RELEASE, - binary upgrades between RELEASE versions (and snapshots of the - various security branches) are supported using the - &man.freebsd-update.8; utility. The binary upgrade procedure will - update unmodified userland utilities, as well as unmodified GENERIC or - SMP kernels distributed as a part of an official &os; release. - The &man.freebsd-update.8; utility requires that the host being - upgraded have Internet connectivity. + + Documentation - An older form of binary upgrade is supported through the - Upgrade option from the main &man.sysinstall.8; - menu on CDROM distribution media. This type of binary upgrade - may be useful on non-&arch.i386;, non-&arch.amd64; machines - or on systems with no Internet connectivity. + + + - Source-based upgrades (those based on recompiling the &os; - base system from source code) from previous versions are - supported, according to the instructions in - /usr/src/UPDATING. + + Upgrading from previous releases of &os; - - Upgrading &os; should, of course, only be attempted after - backing up all data and configuration - files. - - + Beginning with &os; 6.2-RELEASE, binary + upgrades between RELEASE versions (and snapshots of the various + security branches) are supported using the + &man.freebsd-update.8; utility. The binary upgrade procedure + will update unmodified userland utilities, as well as unmodified + GENERIC or SMP kernels distributed as a part of an official &os; + release. The &man.freebsd-update.8; utility requires that the + host being upgraded have Internet connectivity. + + An older form of binary upgrade is supported through the + Upgrade option from the main + &man.sysinstall.8; menu on CDROM distribution media. This type + of binary upgrade may be useful on non-&arch.i386;, + non-&arch.amd64; machines or on systems with no Internet + connectivity. + + Source-based upgrades (those based on recompiling the &os; + base system from source code) from previous versions are + supported, according to the instructions in + /usr/src/UPDATING. + + + Upgrading &os; should, of course, only be attempted after + backing up all data and configuration + files. + +
From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 05:54:13 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E222C1065674; Mon, 5 Jan 2009 05:54:13 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D05748FC14; Mon, 5 Jan 2009 05:54:13 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n055sDjZ086455; Mon, 5 Jan 2009 05:54:13 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n055sDGp086454; Mon, 5 Jan 2009 05:54:13 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901050554.n055sDGp086454@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 05:54:13 +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: r186760 - stable/7/release/doc/share/sgml X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 05:54:14 -0000 Author: hrs Date: Mon Jan 5 05:54:13 2009 New Revision: 186760 URL: http://svn.freebsd.org/changeset/base/186760 Log: Update &release.manpath.*;. Modified: stable/7/release/doc/share/sgml/release.ent Modified: stable/7/release/doc/share/sgml/release.ent ============================================================================== --- stable/7/release/doc/share/sgml/release.ent Mon Jan 5 05:53:14 2009 (r186759) +++ stable/7/release/doc/share/sgml/release.ent Mon Jan 5 05:54:13 2009 (r186760) @@ -36,9 +36,8 @@ - - - + + @@ -58,4 +57,3 @@ - From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 05:56:20 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ED4B10656E0; Mon, 5 Jan 2009 05:56:20 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECEDB8FC13; Mon, 5 Jan 2009 05:56:19 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n055uJB4086558; Mon, 5 Jan 2009 05:56:19 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n055uJvt086555; Mon, 5 Jan 2009 05:56:19 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901050556.n055uJvt086555@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 05:56:19 +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: r186761 - in stable/7/release/doc: . share/mk share/sgml X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 05:56:22 -0000 Author: hrs Date: Mon Jan 5 05:56:19 2009 New Revision: 186761 URL: http://svn.freebsd.org/changeset/base/186761 Log: Clean up a DSSSL file for release documents: Remove {,no.}include.historic, Fix arch="" support, and Update platform list in README. Modified: stable/7/release/doc/README stable/7/release/doc/share/mk/doc.relnotes.mk stable/7/release/doc/share/sgml/release.dsl Modified: stable/7/release/doc/README ============================================================================== --- stable/7/release/doc/README Mon Jan 5 05:54:13 2009 (r186760) +++ stable/7/release/doc/README Mon Jan 5 05:56:19 2009 (r186761) @@ -99,9 +99,10 @@ element will be included. For example: SPARC64-specific text -The currently-supported architectures are i386, sparc64, and -ia64. An element may appear for multiple architectures by specifying -a comma-separated list of architectures (i.e. arch="sparc64,ia64"). +The currently-supported architectures are amd64, arm, i386, ia64, +pc98, powerpc, and sparc64. An element may appear for multiple +architectures by specifying a comma-separated list of architectures +(i.e. arch="sparc64,ia64"). When creating a translation, make a new directory under this directory with a language code (paralleling the DocProj directory Modified: stable/7/release/doc/share/mk/doc.relnotes.mk ============================================================================== --- stable/7/release/doc/share/mk/doc.relnotes.mk Mon Jan 5 05:54:13 2009 (r186760) +++ stable/7/release/doc/share/mk/doc.relnotes.mk Mon Jan 5 05:56:19 2009 (r186761) @@ -11,23 +11,6 @@ DSLHTML?= ${RELN_ROOT}/share/sgml/defaul DSLPRINT?= ${RELN_ROOT}/share/sgml/default.dsl # -# Tweakable Makefile variables -# -# INCLUDE_HISTORIC Used by relnotes document only. When set, -# causes all release notes entries to be printed, -# even those marked as "historic". If not set -# (the default), only print "non-historic" -# release note entries. To designate a release -# note entry as "historic", add a role="historic" -# attribute to the applicable element(s). -# -.if defined(INCLUDE_HISTORIC) -JADEFLAGS+= -iinclude.historic -.else -JADEFLAGS+= -ino.include.historic -.endif - -# # Automatic device list generation: # .if exists(${RELN_ROOT}/../man4) Modified: stable/7/release/doc/share/sgml/release.dsl ============================================================================== --- stable/7/release/doc/share/sgml/release.dsl Mon Jan 5 05:54:13 2009 (r186760) +++ stable/7/release/doc/share/sgml/release.dsl Mon Jan 5 05:56:19 2009 (r186761) @@ -3,8 +3,6 @@ - - %release.ent; @@ -14,14 +12,6 @@ -; Configure behavior of this stylesheet - - - ; String manipulation functions (define (split-string-to-list STR) ;; return list of STR separated with char #\ or #\, @@ -54,92 +44,6 @@ ((equal? STR (car s)) #t) (else (loop (cdr s)))))) -; Deal with conditional inclusion of text via entities. -(default - (let* ((arch (attribute-string (normalize "arch"))) - (role (attribute-string (normalize "role"))) - (for-arch (entity-text "arch"))) - (cond - - ; If role=historic, and we're not printing historic things, then - ; don't output this element. - ((and (equal? role "historic") - (not %include-historic%)) - (empty-sosofo)) - - - ; If arch= not specified, then print unconditionally. This clause - ; handles the majority of cases. - ((or (equal? arch #f) (equal? arch "")) - (next-match)) - - ; arch= specified, see if it's equal to "all". If so, then - ; print unconditionally. Note that this clause could be - ; combined with the check to see if arch= wasn't specified - ; or was empty; they have the same outcome. - ((equal? arch "all") - (next-match)) - - ; arch= specified. If we're building for all architectures, - ; then print it prepended with the set of architectures to which - ; this element applies. - ; - ; XXX This doesn't work. -; ((equal? for-arch "all") -; (sosofo-append (literal "[") (literal arch) (literal "] ") -; (process-children))) - - ; arch= specified, so we need to check to see if the specified - ; parameter includes the architecture we're building for. - ((string-list-match? for-arch (split-string-to-list arch)) - (next-match)) - - ; None of the above - (else (empty-sosofo))))) - -(mode qandatoc - (default - (let* ((arch (attribute-string (normalize "arch"))) - (role (attribute-string (normalize "role"))) - (for-arch (entity-text "arch"))) - (cond - - ; If role=historic, and we're not printing historic things, then - ; don't output this element. - ((and (equal? role "historic") - (not %include-historic%)) - (empty-sosofo)) - - - ; If arch= not specified, then print unconditionally. This clause - ; handles the majority of cases. - ((or (equal? arch #f) (equal? arch "")) - (next-match)) - - ; arch= specified, see if it's equal to "all". If so, then - ; print unconditionally. Note that this clause could be - ; combined with the check to see if arch= wasn't specified - ; or was empty; they have the same outcome. - ((equal? arch "all") - (next-match)) - - ; arch= specified. If we're building for all architectures, - ; then print it prepended with the set of architectures to which - ; this element applies. - ; - ; XXX This doesn't work. -; ((equal? for-arch "all") -; (sosofo-append (literal "[") (literal arch) (literal "] ") -; (process-children))) - - ; arch= specified, so we need to check to see if the specified - ; parameter includes the architecture we're building for. - ((string-list-match? for-arch (split-string-to-list arch)) - (next-match)) - - ; None of the above - (else (empty-sosofo)))))) - ; We might have some sect1 level elements where the modification times ; are significant. An example of this is the "What's New" section in ; the release notes. We enable the printing of pubdate entry in @@ -150,6 +54,88 @@ ; Put URLs in footnotes, and put footnotes at the bottom of each page. (define bop-footnotes #t) (define %footnote-ulinks% #t) + + (define ($paragraph$) + (let ((arch (attribute-string (normalize "arch"))) + (role (attribute-string (normalize "role"))) + (arch-string (entity-text "arch")) + (merged-string (entity-text "merged"))) + (if (or (equal? (print-backend) 'tex) + (equal? (print-backend) #f)) + ;; avoid using country: characteristic because of a JadeTeX bug... + (make paragraph + first-line-start-indent: (if (is-first-para) + %para-indent-firstpara% + %para-indent%) + space-before: %para-sep% + space-after: (if (INLIST?) + 0pt + %para-sep%) + quadding: %default-quadding% + hyphenate?: %hyphenation% + language: (dsssl-language-code) + (make sequence + (cond + ;; If arch= not specified, then print unconditionally. This clause + ;; handles the majority of cases. + ((or (equal? arch #f) + (equal? arch "") + (equal? arch "all")) + (process-children-trim)) + (else + (make sequence + (literal "[") + (let loop ((prev (car (split-string-to-list arch))) + (rest (cdr (split-string-to-list arch)))) + (make sequence + (literal prev) + (if (not (null? rest)) + (make sequence + (literal ", ") + (loop (car rest) (cdr rest))) + (empty-sosofo)))) + (literal "] ") + (process-children-trim)))) + (if (and (not (null? role)) (equal? role "merged")) + (literal " [" merged-string "]") + (empty-sosofo)))) + (make paragraph + first-line-start-indent: (if (is-first-para) + %para-indent-firstpara% + %para-indent%) + space-before: %para-sep% + space-after: (if (INLIST?) + 0pt + %para-sep%) + quadding: %default-quadding% + hyphenate?: %hyphenation% + language: (dsssl-language-code) + country: (dsssl-country-code) + (make sequence + (cond + ;; If arch= not specified, then print unconditionally. This clause + ;; handles the majority of cases. + ((or (equal? arch #f) + (equal? arch "") + (equal? arch "all")) + (process-children-trim)) + (else + (make sequence + (literal "[") + (let loop ((prev (car (split-string-to-list arch))) + (rest (cdr (split-string-to-list arch)))) + (make sequence + (literal prev) + (if (not (null? rest)) + (make sequence + (literal ", ") + (loop (car rest) (cdr rest))) + (empty-sosofo)))) + (literal "] ") + (process-children-trim)))) + (if (and (not (null? role)) (equal? role "merged")) + (literal " [" merged-string "]") + (empty-sosofo))))))) ]]> (define (toc-depth nd) From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 06:02:17 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A5341065672; Mon, 5 Jan 2009 06:02:17 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 865FA8FC12; Mon, 5 Jan 2009 06:02:17 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0562HF1086720; Mon, 5 Jan 2009 06:02:17 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0562HIo086716; Mon, 5 Jan 2009 06:02:17 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901050602.n0562HIo086716@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 06:02:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186762 - in stable/6/release/doc: en_US.ISO8859-1/relnotes/common share/mk share/sgml X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 06:02:18 -0000 Author: hrs Date: Mon Jan 5 06:02:17 2009 New Revision: 186762 URL: http://svn.freebsd.org/changeset/base/186762 Log: - Trim old relnotes items. - Remove {,no.}include.historic knob. Modified: stable/6/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml stable/6/release/doc/en_US.ISO8859-1/relnotes/common/relnotes.ent stable/6/release/doc/share/mk/doc.relnotes.mk stable/6/release/doc/share/sgml/release.dsl Modified: stable/6/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml ============================================================================== --- stable/6/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml Mon Jan 5 05:56:19 2009 (r186761) +++ stable/6/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml Mon Jan 5 06:02:17 2009 (r186762) @@ -15,6 +15,7 @@ 2006 2007 2008 + 2009 The &os; Documentation Project @@ -133,11 +134,7 @@ - The BTX kernel used by the boot - loader has been changed to invoke BIOS routines from real - mode. This change makes it possible to boot &os; from USB - devices. - + @@ -199,16 +196,7 @@ Contributed Software - bzip2 has been updated from 1.0.4 - to 1.0.5. - - sendmail has been updated from - 8.14.2 to 8.14.3. - - The timezone database has been updated from - the tzdata2007k release to - the tzdata2008b release. - + @@ -221,11 +209,7 @@ Release Engineering and Integration - The supported version of - the GNOME desktop environment - (x11/gnome2) has been - updated from 2.20.1 to 2.22. - + Modified: stable/6/release/doc/en_US.ISO8859-1/relnotes/common/relnotes.ent ============================================================================== --- stable/6/release/doc/en_US.ISO8859-1/relnotes/common/relnotes.ent Mon Jan 5 05:56:19 2009 (r186761) +++ stable/6/release/doc/en_US.ISO8859-1/relnotes/common/relnotes.ent Mon Jan 5 06:02:17 2009 (r186762) @@ -2,11 +2,6 @@ - - - - - Modified: stable/6/release/doc/share/mk/doc.relnotes.mk ============================================================================== --- stable/6/release/doc/share/mk/doc.relnotes.mk Mon Jan 5 05:56:19 2009 (r186761) +++ stable/6/release/doc/share/mk/doc.relnotes.mk Mon Jan 5 06:02:17 2009 (r186762) @@ -11,23 +11,6 @@ DSLHTML?= ${RELN_ROOT}/share/sgml/defaul DSLPRINT?= ${RELN_ROOT}/share/sgml/default.dsl # -# Tweakable Makefile variables -# -# INCLUDE_HISTORIC Used by relnotes document only. When set, -# causes all release notes entries to be printed, -# even those marked as "historic". If not set -# (the default), only print "non-historic" -# release note entries. To designate a release -# note entry as "historic", add a role="historic" -# attribute to the applicable element(s). -# -.if defined(INCLUDE_HISTORIC) -JADEFLAGS+= -iinclude.historic -.else -JADEFLAGS+= -ino.include.historic -.endif - -# # Automatic device list generation: # .if exists(${RELN_ROOT}/../man4) Modified: stable/6/release/doc/share/sgml/release.dsl ============================================================================== --- stable/6/release/doc/share/sgml/release.dsl Mon Jan 5 05:56:19 2009 (r186761) +++ stable/6/release/doc/share/sgml/release.dsl Mon Jan 5 06:02:17 2009 (r186762) @@ -3,8 +3,6 @@ - - %release.ent; @@ -14,14 +12,6 @@ -; Configure behavior of this stylesheet - - - ; String manipulation functions (define (split-string-to-list STR) ;; return list of STR separated with char #\ or #\, @@ -60,13 +50,6 @@ (for-arch (entity-text "arch"))) (cond - ; If role=historic, and we're not printing historic things, then - ; don't output this element. - ((and (equal? role "historic") - (not %include-historic%)) - (empty-sosofo)) - - ; If arch= not specified, then print unconditionally. This clause ; handles the majority of cases. ((or (equal? arch #f) (equal? arch "")) @@ -103,13 +86,6 @@ (for-arch (entity-text "arch"))) (cond - ; If role=historic, and we're not printing historic things, then - ; don't output this element. - ((and (equal? role "historic") - (not %include-historic%)) - (empty-sosofo)) - - ; If arch= not specified, then print unconditionally. This clause ; handles the majority of cases. ((or (equal? arch #f) (equal? arch "")) @@ -171,7 +147,6 @@ (u (string-append "&release.man.url;?query=" (data r) "&" "sektion=" (data m)))) (case v - (("xfree86") (string-append u "&" "manpath=XFree86+&release.manpath.xfree86;" )) (("xorg") (string-append u "&" "manpath=Xorg+&release.manpath.xorg;" )) (("netbsd") (string-append u "&" "manpath=NetBSD+&release.manpath.netbsd;")) (("ports") (string-append u "&" "manpath=FreeBSD+&release.manpath.freebsd-ports;")) From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 08:33:57 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AD2E106564A; Mon, 5 Jan 2009 08:33:57 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 236568FC16; Mon, 5 Jan 2009 08:33:57 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n058XvBg089556; Mon, 5 Jan 2009 08:33:57 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n058Xvxf089555; Mon, 5 Jan 2009 08:33:57 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901050833.n058Xvxf089555@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 08:33:57 +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: r186763 - stable/7/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 08:33:58 -0000 Author: hrs Date: Mon Jan 5 08:33:56 2009 New Revision: 186763 URL: http://svn.freebsd.org/changeset/base/186763 Log: Add missing items in relnotes as Errata items: - jme(4), age(4), malo(4), bm(4), et(4), and glxsb(4). - multiple routing table support. Spotted by: weongyo and yongari Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 06:02:17 2009 (r186762) +++ stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 08:33:56 2009 (r186763) @@ -195,6 +195,10 @@ em0@pci0:0:25:0: class=0x020000 card=0x0 check the fourth column. If that says chip=0x10a78086 (or one of the other two IDs given above) you will have the adapter's name change. + + + + Late-Breaking News and Corrections [20090105] The Release Notes for 7.1-RELEASE should have mentioned changes that the &man.ae.4; driver has been added to provide support @@ -213,12 +217,129 @@ em0@pci0:0:25:0: class=0x020000 card=0x0 - + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned changes that the &man.jme.4; driver has been added to + provide support for PCIe adapters based on JMicron JMC250 + gigabit Ethernet and JMC260 fast Ethernet controllers. + + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned changes that the &man.age.4; driver has been added to + provide support for Attansic/Atheros L1 gigabit Ethernet + controller. + + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned changes that the &man.malo.4; driver has been added to + provide support for Marvell Libertas 88W8335 based PCI network + adapters. + + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned changes that the bm(4) driver has been added to + provide support for Apple Big Mac (BMAC) Ethernet controller, + found on various Apple G3 models. + + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned changes that the et(4) driver has been added to + provide support for Agere ET1310 10/100/Gigabit Ethernet + controller. + + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned changes that the &man.glxsb.4; driver has been added + to provide support for the Security Block in AMD Geode LX + processors. + + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned that &os; now supports multiple routing tables. To + enable this, the following steps are needed: - - Late-Breaking News and Corrections + + + Add the following kernel configuration option and + rebuild the kernel. The 2 is the + number of FIB (the maximum value is 16). + + options ROUTETABLES=2 + + The procedure for rebuilding the &os; kernel is + described in the &os; + Handbook. + + This number can be modified on boot time. To do so, add + the following to /boot/loader.conf and + reboot the system: - No news. - + net.fibs=6 + + + Set a loader tunable net.my_fibnum if + needed. This means the default number of routing tables. + If not specified, 0 will be used. + + + + Set a loader tunable + net.add_addr_allfibs if needed. This + enables to add routes to all FIBs for new interfaces by + default. When this is set to 0, it will + only allocate routes on interface changes for the FIB of the + caller when adding a new set of addresses to an interface. + Note that this tunable is set to 1 by + default. + + + + To select one of the FIBs, the new &man.setfib.1; utility + can be used. This set an associated FIB with the process. For + example: + + &prompt.root; setfib -3 ping target.example.com + + The FIB #3 will be used for the &man.ping.8; command. + + The FIB which the packet will be associated with will be + determined in the following rules: + + + + All packets which have a FIB associated with them will + use the FIB. If not, FIB #0 will be used. + + + + A packet received on an interface for forwarding uses + FIB #0. + + + + A TCP listen socket associated with an FIB will generate + accept sockets which are associated with the same FIB. + + + + A packet generated in response to other packet uses the + FIB associated with the packet being responded to. + + + + A packet generated on tunnel interfaces such as + &man.gif.4; and &man.tun.4; will be encapsulated using the + FIB of the process which set up the tunnel. + + + + Routing messages will be associated with the process's + FIB. + + + + Also, the &man.ipfw.8; now supports an action rule + setfib. The following action: + + setfib fibnum + + will make the matched packet use the FIB specified in + fibnum. The rule processing + continues at the next rule. + From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 08:56:47 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C1B4106564A; Mon, 5 Jan 2009 08:56:47 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 593108FC13; Mon, 5 Jan 2009 08:56:47 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n058ujHI089970; Mon, 5 Jan 2009 08:56:45 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n058ujil089969; Mon, 5 Jan 2009 08:56:45 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901050856.n058ujil089969@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 08:56:45 +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: r186764 - stable/7/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 08:56:48 -0000 Author: hrs Date: Mon Jan 5 08:56:45 2009 New Revision: 186764 URL: http://svn.freebsd.org/changeset/base/186764 Log: Add explanation of FIB. Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 08:33:56 2009 (r186763) +++ stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 08:56:45 2009 (r186764) @@ -254,8 +254,9 @@ em0@pci0:0:25:0: class=0x020000 card=0x0 Add the following kernel configuration option and - rebuild the kernel. The 2 is the - number of FIB (the maximum value is 16). + rebuild the kernel. The 2 is the number + of FIB (Forward Information Base, synonym for a routing + table here). The maximum value is 16. options ROUTETABLES=2 From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 13:06:03 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF7171065678; Mon, 5 Jan 2009 13:06:03 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD13E8FC17; Mon, 5 Jan 2009 13:06:03 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05D63Nq096963; Mon, 5 Jan 2009 13:06:03 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05D63et096962; Mon, 5 Jan 2009 13:06:03 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200901051306.n05D63et096962@svn.freebsd.org> From: Rong-En Fan Date: Mon, 5 Jan 2009 13:06:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186772 - stable/6/usr.sbin/rpc.yppasswdd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 13:06:04 -0000 Author: rafan Date: Mon Jan 5 13:06:03 2009 New Revision: 186772 URL: http://svn.freebsd.org/changeset/base/186772 Log: MFC r184459 - Whenever a password/shell is changed via rpc.yppasswdd, the daemon leaves one zombie process because it does not do the cleanup. For a long running NIS/YP server, it will have lots of zombie processes on it. Fix that by ignoring the SIGCHLD signal since we don't really care about the exit status in this case. PR: bin/91980 Reported by: Arjan van der Velde Submitted by: Jui-Nan Lin" Reviewed by: delphij Modified: stable/6/usr.sbin/rpc.yppasswdd/ (props changed) stable/6/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Modified: stable/6/usr.sbin/rpc.yppasswdd/yppasswdd_main.c ============================================================================== --- stable/6/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Mon Jan 5 12:58:43 2009 (r186771) +++ stable/6/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Mon Jan 5 13:06:03 2009 (r186772) @@ -165,6 +165,7 @@ main(int argc, char *argv[]) struct sockaddr_in saddr; socklen_t asize = sizeof (saddr); struct netconfig *nconf; + struct sigaction sa; void *localhandle; int ch; char *mastername; @@ -268,6 +269,9 @@ the %s domain -- aborting", yppasswd_dom } } openlog("rpc.yppasswdd", LOG_PID, LOG_DAEMON); + memset(&sa, 0, sizeof(sa)); + sa.sa_flags = SA_NOCLDWAIT; + sigaction(SIGCHLD, &sa, NULL); rpcb_unset(YPPASSWDPROG, YPPASSWDVERS, NULL); rpcb_unset(MASTER_YPPASSWDPROG, MASTER_YPPASSWDVERS, NULL); From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 13:10:06 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83614106566B; Mon, 5 Jan 2009 13:10:06 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 705F78FC17; Mon, 5 Jan 2009 13:10:06 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05DA65J097071; Mon, 5 Jan 2009 13:10:06 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05DA6UQ097067; Mon, 5 Jan 2009 13:10:06 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <200901051310.n05DA6UQ097067@svn.freebsd.org> From: Florent Thoumie Date: Mon, 5 Jan 2009 13:10:06 +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: r186773 - in stable/7/usr.sbin/pkg_install: . create lib X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 13:10:07 -0000 Author: flz Date: Mon Jan 5 13:10:06 2009 New Revision: 186773 URL: http://svn.freebsd.org/changeset/base/186773 Log: Synchronize pkg_install with HEAD (20080708): r180361: actually enable '-n' for pkg_create(1) r181376: use humanize_number to report pen-sizes Modified: stable/7/usr.sbin/pkg_install/ (props changed) stable/7/usr.sbin/pkg_install/Makefile.inc stable/7/usr.sbin/pkg_install/create/main.c stable/7/usr.sbin/pkg_install/lib/lib.h stable/7/usr.sbin/pkg_install/lib/pen.c Modified: stable/7/usr.sbin/pkg_install/Makefile.inc ============================================================================== --- stable/7/usr.sbin/pkg_install/Makefile.inc Mon Jan 5 13:06:03 2009 (r186772) +++ stable/7/usr.sbin/pkg_install/Makefile.inc Mon Jan 5 13:10:06 2009 (r186773) @@ -4,6 +4,9 @@ LIBINSTALL= ${.OBJDIR}/../lib/libinstall.a +DPADD+= ${LIBUTIL} +LDADD+= -lutil + .if ${MK_OPENSSL} != "no" && \ defined(LDADD) && ${LDADD:M-lfetch} != "" DPADD+= ${LIBSSL} ${LIBCRYPTO} Modified: stable/7/usr.sbin/pkg_install/create/main.c ============================================================================== --- stable/7/usr.sbin/pkg_install/create/main.c Mon Jan 5 13:06:03 2009 (r186772) +++ stable/7/usr.sbin/pkg_install/create/main.c Mon Jan 5 13:10:06 2009 (r186773) @@ -208,6 +208,10 @@ main(int argc, char **argv) Recursive = TRUE; break; + case 'n': + Regenerate = FALSE; + break; + case 0: if (Help) usage(); Modified: stable/7/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- stable/7/usr.sbin/pkg_install/lib/lib.h Mon Jan 5 13:06:03 2009 (r186772) +++ stable/7/usr.sbin/pkg_install/lib/lib.h Mon Jan 5 13:10:06 2009 (r186773) @@ -105,7 +105,7 @@ * Version of the package tools - increase only when some * functionality used by bsd.port.mk is changed, added or removed */ -#define PKG_INSTALL_VERSION 20080612 +#define PKG_INSTALL_VERSION 20080708 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) Modified: stable/7/usr.sbin/pkg_install/lib/pen.c ============================================================================== --- stable/7/usr.sbin/pkg_install/lib/pen.c Mon Jan 5 13:06:03 2009 (r186772) +++ stable/7/usr.sbin/pkg_install/lib/pen.c Mon Jan 5 13:10:06 2009 (r186773) @@ -23,6 +23,7 @@ __FBSDID("$FreeBSD$"); #include "lib.h" #include +#include #include #include #include @@ -44,6 +45,7 @@ find_play_pen(char *pen, off_t sz) { char *cp; struct stat sb; + char humbuf[6]; if (pen[0] && isdir(dirname(pen)) == TRUE && (min_free(dirname(pen)) >= sz)) return pen; @@ -59,10 +61,12 @@ find_play_pen(char *pen, off_t sz) strcpy(pen, "/usr/tmp/instmp.XXXXXX"); else { cleanup(0); + humanize_number(humbuf, sizeof humbuf, sz, "", HN_AUTOSCALE, + HN_NOSPACE); errx(2, "%s: can't find enough temporary space to extract the files, please set your\n" -"PKG_TMPDIR environment variable to a location with at least %ld bytes\n" -"free", __func__, (long)sz); +"PKG_TMPDIR environment variable to a location with at least %s bytes\n" +"free", __func__, humbuf); return NULL; } return pen; @@ -98,6 +102,8 @@ popPen(char *pen) char * make_playpen(char *pen, off_t sz) { + char humbuf1[6], humbuf2[6]; + if (!find_play_pen(pen, sz)) return NULL; @@ -111,8 +117,13 @@ make_playpen(char *pen, off_t sz) } if (Verbose) { - if (sz) - fprintf(stderr, "Requested space: %d bytes, free space: %lld bytes in %s\n", (int)sz, (long long)min_free(pen), pen); + if (sz) { + humanize_number(humbuf1, sizeof humbuf1, sz, "", HN_AUTOSCALE, + HN_NOSPACE); + humanize_number(humbuf2, sizeof humbuf2, min_free(pen), + "", HN_AUTOSCALE, HN_NOSPACE); + fprintf(stderr, "Requested space: %s bytes, free space: %s bytes in %s\n", humbuf1, humbuf2, pen); + } } if (min_free(pen) < sz) { From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 15:38:45 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C410B1065670; Mon, 5 Jan 2009 15:38:45 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0E758FC1A; Mon, 5 Jan 2009 15:38:45 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Fcjso000461; Mon, 5 Jan 2009 15:38:45 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05FcjU8000460; Mon, 5 Jan 2009 15:38:45 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901051538.n05FcjU8000460@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 15:38:45 +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: r186782 - stable/7/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 15:38:47 -0000 Author: hrs Date: Mon Jan 5 15:38:45 2009 New Revision: 186782 URL: http://svn.freebsd.org/changeset/base/186782 Log: Add more missing bits: procstat(1). Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 15:18:16 2009 (r186781) +++ stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 15:38:45 2009 (r186782) @@ -200,6 +200,13 @@ em0@pci0:0:25:0: class=0x020000 card=0x0 Late-Breaking News and Corrections + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned that the &man.procstat.1; utility has been added. + This is a process inspection utility which provides both some of + the missing functionality from &man.procfs.5; and new + functionality for monitoring and debugging specific + processes. + [20090105] The Release Notes for 7.1-RELEASE should have mentioned changes that the &man.ae.4; driver has been added to provide support for the Attansic/Atheros L2 FastEthernet controllers. From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 19:40:10 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 924201065673; Mon, 5 Jan 2009 19:40:10 +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 854AE8FC1F; Mon, 5 Jan 2009 19:40:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Je9m7008937; Mon, 5 Jan 2009 19:40:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05Je9pD008934; Mon, 5 Jan 2009 19:40:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901051940.n05Je9pD008934@svn.freebsd.org> From: Alexander Motin Date: Mon, 5 Jan 2009 19:40:09 +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: r186786 - stable/7/sys/dev/mmc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 19:40:11 -0000 Author: mav Date: Mon Jan 5 19:40:09 2009 New Revision: 186786 URL: http://svn.freebsd.org/changeset/base/186786 Log: Sync MMC/SD subsystem with HEAD. Add support for MMC and SDHC cards, high speed timing, wide bus, multiblock transfers and many other features. Modified: stable/7/sys/dev/mmc/bridge.h stable/7/sys/dev/mmc/mmc.c stable/7/sys/dev/mmc/mmcbrvar.h stable/7/sys/dev/mmc/mmcreg.h stable/7/sys/dev/mmc/mmcsd.c stable/7/sys/dev/mmc/mmcvar.h Modified: stable/7/sys/dev/mmc/bridge.h ============================================================================== --- stable/7/sys/dev/mmc/bridge.h Mon Jan 5 17:38:03 2009 (r186785) +++ stable/7/sys/dev/mmc/bridge.h Mon Jan 5 19:40:09 2009 (r186786) @@ -104,6 +104,10 @@ enum mmc_bus_width { bus_width_1 = 0, bus_width_4 = 2, bus_width_8 = 3 }; +enum mmc_bus_timing { + bus_timing_normal = 0, bus_timing_hs +}; + struct mmc_ios { uint32_t clock; /* Speed of the clock in Hz to move data */ enum mmc_vdd vdd; /* Voltage to apply to the power pins/ */ @@ -111,6 +115,7 @@ struct mmc_ios { enum mmc_chip_select chip_select; enum mmc_bus_width bus_width; enum mmc_power_mode power_mode; + enum mmc_bus_timing timing; }; enum mmc_card_mode { @@ -125,6 +130,7 @@ struct mmc_host { uint32_t caps; #define MMC_CAP_4_BIT_DATA (1 << 0) /* Can do 4-bit data transfers */ #define MMC_CAP_8_BIT_DATA (1 << 1) /* Can do 8-bit data transfers */ +#define MMC_CAP_HSPEED (1 << 2) /* Can do High Speed transfers */ enum mmc_card_mode mode; struct mmc_ios ios; /* Current state of the host */ }; Modified: stable/7/sys/dev/mmc/mmc.c ============================================================================== --- stable/7/sys/dev/mmc/mmc.c Mon Jan 5 17:38:03 2009 (r186785) +++ stable/7/sys/dev/mmc/mmc.c Mon Jan 5 19:40:09 2009 (r186786) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -82,10 +83,23 @@ struct mmc_softc { struct mmc_ivars { uint32_t raw_cid[4]; /* Raw bits of the CID */ uint32_t raw_csd[4]; /* Raw bits of the CSD */ + uint32_t raw_scr[2]; /* Raw bits of the SCR */ + uint8_t raw_ext_csd[512]; /* Raw bits of the EXT_CSD */ + uint32_t raw_sd_status[16]; /* Raw bits of the SD_STATUS */ uint16_t rca; enum mmc_card_mode mode; struct mmc_cid cid; /* cid decoded */ struct mmc_csd csd; /* csd decoded */ + struct mmc_scr scr; /* scr decoded */ + struct mmc_sd_status sd_status; /* SD_STATUS decoded */ + u_char read_only; /* True when the device is read-only */ + u_char bus_width; /* Bus width to use */ + u_char timing; /* Bus timing support */ + u_char high_cap; /* High Capacity card (block addressed) */ + uint32_t sec_count; /* Card capacity in 512byte blocks */ + uint32_t tran_speed; /* Max speed in normal mode */ + uint32_t hs_tran_speed; /* Max speed in high speed mode */ + uint32_t erase_sector; /* Card native erase sector size */ }; #define CMD_RETRIES 3 @@ -94,21 +108,32 @@ struct mmc_ivars { static int mmc_probe(device_t dev); static int mmc_attach(device_t dev); static int mmc_detach(device_t dev); +static int mmc_suspend(device_t dev); +static int mmc_resume(device_t dev); #define MMC_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define MMC_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define MMC_LOCK_INIT(_sc) \ - mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ +#define MMC_LOCK_INIT(_sc) \ + mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ "mmc", MTX_DEF) #define MMC_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); #define MMC_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); #define MMC_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); +static int mmc_calculate_clock(struct mmc_softc *sc); static void mmc_delayed_attach(void *); +static void mmc_power_down(struct mmc_softc *sc); static int mmc_wait_for_cmd(struct mmc_softc *sc, struct mmc_command *cmd, int retries); static int mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode, uint32_t arg, uint32_t flags, uint32_t *resp, int retries); +static int mmc_select_card(struct mmc_softc *sc, uint16_t rca); +static int mmc_set_card_bus_width(struct mmc_softc *sc, uint16_t rca, int width); +static int mmc_app_send_scr(struct mmc_softc *sc, uint16_t rca, uint32_t *rawscr); +static void mmc_app_decode_scr(uint32_t *raw_scr, struct mmc_scr *scr); +static int mmc_send_ext_csd(struct mmc_softc *sc, uint8_t *rawextcsd); +static void mmc_scan(struct mmc_softc *sc); +static int mmc_delete_cards(struct mmc_softc *sc); static void mmc_ms_delay(int ms) @@ -120,7 +145,7 @@ static int mmc_probe(device_t dev) { - device_set_desc(dev, "mmc/sd bus"); + device_set_desc(dev, "MMC/SD bus"); return (0); } @@ -145,35 +170,47 @@ static int mmc_detach(device_t dev) { struct mmc_softc *sc = device_get_softc(dev); - device_t *kids; - int i, nkid; - - /* kill children [ph33r]. -sorbo */ - if (device_get_children(sc->dev, &kids, &nkid) != 0) - return 0; - for (i = 0; i < nkid; i++) { - device_t kid = kids[i]; - void *ivar = device_get_ivars(kid); - - device_detach(kid); - device_delete_child(sc->dev, kid); - free(ivar, M_DEVBUF); - } - free(kids, M_TEMP); + int err; + if ((err = mmc_delete_cards(sc)) != 0) + return (err); + mmc_power_down(sc); MMC_LOCK_DESTROY(sc); - return 0; + return (0); +} + +static int +mmc_suspend(device_t dev) +{ + struct mmc_softc *sc = device_get_softc(dev); + int err; + + err = bus_generic_suspend(dev); + if (err) + return (err); + mmc_power_down(sc); + return (0); +} + +static int +mmc_resume(device_t dev) +{ + struct mmc_softc *sc = device_get_softc(dev); + + mmc_scan(sc); + return (bus_generic_resume(dev)); } static int mmc_acquire_bus(device_t busdev, device_t dev) { struct mmc_softc *sc; + struct mmc_ivars *ivar; int err; int rca; - err = MMCBR_ACQUIRE_HOST(device_get_parent(busdev), dev); + err = MMCBR_ACQUIRE_HOST(device_get_parent(busdev), busdev); if (err) return (err); sc = device_get_softc(busdev); @@ -184,24 +221,36 @@ mmc_acquire_bus(device_t busdev, device_ MMC_UNLOCK(sc); if (busdev != dev) { - // Keep track of the last rca that we've selected. If - // we're asked to do it again, don't. We never unselect - // unless the bus code itself wants the mmc bus. + /* + * Keep track of the last rca that we've selected. If + * we're asked to do it again, don't. We never + * unselect unless the bus code itself wants the mmc + * bus, and constantly reselecting causes problems. + */ rca = mmc_get_rca(dev); if (sc->last_rca != rca) { - mmc_wait_for_command(sc, MMC_SELECT_CARD, rca << 16, - MMC_RSP_R1 | MMC_CMD_AC, NULL, CMD_RETRIES); + mmc_select_card(sc, rca); sc->last_rca = rca; + /* Prepare bus width for the new card. */ + ivar = device_get_ivars(dev); + if (bootverbose) { + device_printf(busdev, + "setting bus width to %d bits\n", + (ivar->bus_width == bus_width_4) ? 4 : + (ivar->bus_width == bus_width_8) ? 8 : 1); + } + mmc_set_card_bus_width(sc, rca, ivar->bus_width); + mmcbr_set_bus_width(busdev, ivar->bus_width); + mmcbr_update_ios(busdev); } - // XXX should set bus width here? } else { - // If there's a card selected, stand down. + /* + * If there's a card selected, stand down. + */ if (sc->last_rca != 0) { - mmc_wait_for_command(sc, MMC_SELECT_CARD, 0, - MMC_RSP_R1 | MMC_CMD_AC, NULL, CMD_RETRIES); + mmc_select_card(sc, 0); sc->last_rca = 0; } - // XXX should set bus width here? } return (0); @@ -221,7 +270,7 @@ mmc_release_bus(device_t busdev, device_ if (sc->owner != dev) panic("mmc: you don't own the bus. game over."); MMC_UNLOCK(sc); - err = MMCBR_RELEASE_HOST(device_get_parent(busdev), dev); + err = MMCBR_RELEASE_HOST(device_get_parent(busdev), busdev); if (err) return (err); MMC_LOCK(sc); @@ -230,17 +279,11 @@ mmc_release_bus(device_t busdev, device_ return (0); } -static void -mmc_rescan_cards(struct mmc_softc *sc) -{ - /* XXX: Look at the children and see if they respond to status */ -} - static uint32_t mmc_select_vdd(struct mmc_softc *sc, uint32_t ocr) { - // XXX - return ocr; + + return (ocr & MMC_OCR_VOLTAGE); } static int @@ -250,7 +293,7 @@ mmc_highest_voltage(uint32_t ocr) for (i = 30; i >= 0; i--) if (ocr & (1 << i)) - return i; + return (i); return (-1); } @@ -259,31 +302,25 @@ mmc_wakeup(struct mmc_request *req) { struct mmc_softc *sc; -// printf("Wakeup for req %p done_data %p\n", req, req->done_data); sc = (struct mmc_softc *)req->done_data; MMC_LOCK(sc); req->flags |= MMC_REQ_DONE; - wakeup(req); MMC_UNLOCK(sc); + wakeup(req); } static int mmc_wait_for_req(struct mmc_softc *sc, struct mmc_request *req) { - int err; req->done = mmc_wakeup; req->done_data = sc; -// printf("Submitting request %p sc %p\n", req, sc); MMCBR_REQUEST(device_get_parent(sc->dev), sc->dev, req); MMC_LOCK(sc); - do { - err = msleep(req, &sc->sc_mtx, PZERO | PCATCH, "mmcreq", - hz / 10); - } while (!(req->flags & MMC_REQ_DONE) && err == EAGAIN); -// printf("Request %p done with error %d\n", req, err); + while ((req->flags & MMC_REQ_DONE) == 0) + msleep(req, &sc->sc_mtx, 0, "mmcreq", 0); MMC_UNLOCK(sc); - return (err); + return (0); } static int @@ -291,7 +328,7 @@ mmc_wait_for_request(device_t brdev, dev { struct mmc_softc *sc = device_get_softc(brdev); - return mmc_wait_for_req(sc, req); + return (mmc_wait_for_req(sc, req)); } static int @@ -302,9 +339,8 @@ mmc_wait_for_cmd(struct mmc_softc *sc, s memset(&mreq, 0, sizeof(mreq)); memset(cmd->resp, 0, sizeof(cmd->resp)); cmd->retries = retries; - cmd->data = NULL; mreq.cmd = cmd; -// printf("CMD: %x ARG %x\n", cmd->opcode, cmd->arg); +/* printf("CMD: %x ARG %x\n", cmd->opcode, cmd->arg); */ mmc_wait_for_req(sc, &mreq); return (cmd->error); } @@ -320,6 +356,7 @@ mmc_wait_for_app_cmd(struct mmc_softc *s appcmd.opcode = MMC_APP_CMD; appcmd.arg = rca << 16; appcmd.flags = MMC_RSP_R1 | MMC_CMD_AC; + appcmd.data = NULL; mmc_wait_for_cmd(sc, &appcmd, 0); err = appcmd.error; if (err != MMC_ERR_NONE) @@ -345,6 +382,7 @@ mmc_wait_for_command(struct mmc_softc *s cmd.opcode = opcode; cmd.arg = arg; cmd.flags = flags; + cmd.data = NULL; err = mmc_wait_for_cmd(sc, &cmd, retries); if (err) return (err); @@ -374,6 +412,7 @@ mmc_idle_cards(struct mmc_softc *sc) cmd.opcode = MMC_GO_IDLE_STATE; cmd.arg = 0; cmd.flags = MMC_RSP_NONE | MMC_CMD_BC; + cmd.data = NULL; mmc_wait_for_cmd(sc, &cmd, 0); mmc_ms_delay(1); @@ -392,19 +431,21 @@ mmc_send_app_op_cond(struct mmc_softc *s cmd.opcode = ACMD_SD_SEND_OP_COND; cmd.arg = ocr; cmd.flags = MMC_RSP_R3 | MMC_CMD_BCR; + cmd.data = NULL; for (i = 0; i < 100; i++) { err = mmc_wait_for_app_cmd(sc, 0, &cmd, CMD_RETRIES); if (err != MMC_ERR_NONE) break; - if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || ocr == 0) + if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || + (ocr & MMC_OCR_VOLTAGE) == 0) break; err = MMC_ERR_TIMEOUT; mmc_ms_delay(10); } if (rocr && err == MMC_ERR_NONE) *rocr = cmd.resp[0]; - return err; + return (err); } static int @@ -417,19 +458,37 @@ mmc_send_op_cond(struct mmc_softc *sc, u cmd.opcode = MMC_SEND_OP_COND; cmd.arg = ocr; cmd.flags = MMC_RSP_R3 | MMC_CMD_BCR; + cmd.data = NULL; for (i = 0; i < 100; i++) { err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); if (err != MMC_ERR_NONE) break; - if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || ocr == 0) + if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || + (ocr & MMC_OCR_VOLTAGE) == 0) break; err = MMC_ERR_TIMEOUT; mmc_ms_delay(10); } if (rocr && err == MMC_ERR_NONE) *rocr = cmd.resp[0]; - return err; + return (err); +} + +static int +mmc_send_if_cond(struct mmc_softc *sc, uint8_t vhs) +{ + struct mmc_command cmd; + int err; + + memset(&cmd, 0, sizeof(cmd)); + cmd.opcode = SD_SEND_IF_COND; + cmd.arg = (vhs << 8) + 0xAA; + cmd.flags = MMC_RSP_R7 | MMC_CMD_BCR; + cmd.data = NULL; + + err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + return (err); } static void @@ -448,43 +507,269 @@ mmc_power_up(struct mmc_softc *sc) mmc_ms_delay(1); mmcbr_set_clock(dev, mmcbr_get_f_min(sc->dev)); + mmcbr_set_timing(dev, bus_timing_normal); mmcbr_set_power_mode(dev, power_on); mmcbr_update_ios(dev); mmc_ms_delay(2); } -// I wonder if the following is endian safe. +static void +mmc_power_down(struct mmc_softc *sc) +{ + device_t dev = sc->dev; + + mmcbr_set_bus_mode(dev, opendrain); + mmcbr_set_chip_select(dev, cs_dontcare); + mmcbr_set_bus_width(dev, bus_width_1); + mmcbr_set_power_mode(dev, power_off); + mmcbr_set_clock(dev, 0); + mmcbr_set_timing(dev, bus_timing_normal); + mmcbr_update_ios(dev); +} + +static int +mmc_select_card(struct mmc_softc *sc, uint16_t rca) +{ + int flags; + + flags = (rca ? MMC_RSP_R1B : MMC_RSP_NONE) | MMC_CMD_AC; + return (mmc_wait_for_command(sc, MMC_SELECT_CARD, (uint32_t)rca << 16, + flags, NULL, CMD_RETRIES)); +} + +static int +mmc_switch(struct mmc_softc *sc, uint8_t set, uint8_t index, uint8_t value) +{ + struct mmc_command cmd; + int err; + + cmd.opcode = MMC_SWITCH_FUNC; + cmd.arg = (MMC_SWITCH_FUNC_WR << 24) | + (index << 16) | + (value << 8) | + set; + cmd.flags = MMC_RSP_R1B | MMC_CMD_AC; + cmd.data = NULL; + err = mmc_wait_for_cmd(sc, &cmd, 0); + return (err); +} + +static int +mmc_sd_switch(struct mmc_softc *sc, uint8_t mode, uint8_t grp, uint8_t value, uint8_t *res) +{ + int err; + struct mmc_command cmd; + struct mmc_data data; + + memset(&cmd, 0, sizeof(struct mmc_command)); + memset(&data, 0, sizeof(struct mmc_data)); + + memset(res, 0, 64); + cmd.opcode = SD_SWITCH_FUNC; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.arg = mode << 31; + cmd.arg |= 0x00FFFFFF; + cmd.arg &= ~(0xF << (grp * 4)); + cmd.arg |= value << (grp * 4); + cmd.data = &data; + + data.data = res; + data.len = 64; + data.flags = MMC_DATA_READ; + + err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + return (err); +} + +static int +mmc_set_card_bus_width(struct mmc_softc *sc, uint16_t rca, int width) +{ + int err; + + if (mmcbr_get_mode(sc->dev) == mode_sd) { + struct mmc_command cmd; + + memset(&cmd, 0, sizeof(struct mmc_command)); + cmd.opcode = ACMD_SET_BUS_WIDTH; + cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; + switch (width) { + case bus_width_1: + cmd.arg = SD_BUS_WIDTH_1; + break; + case bus_width_4: + cmd.arg = SD_BUS_WIDTH_4; + break; + default: + return (MMC_ERR_INVALID); + } + err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + } else { + uint8_t value; + + switch (width) { + case bus_width_1: + value = EXT_CSD_BUS_WIDTH_1; + break; + case bus_width_4: + value = EXT_CSD_BUS_WIDTH_4; + break; + case bus_width_8: + value = EXT_CSD_BUS_WIDTH_8; + break; + default: + return (MMC_ERR_INVALID); + } + err = mmc_switch(sc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BUS_WIDTH, value); + } + return (err); +} + +static int +mmc_set_timing(struct mmc_softc *sc, int timing) +{ + int err; + uint8_t value; + + switch (timing) { + case bus_timing_normal: + value = 0; + break; + case bus_timing_hs: + value = 1; + break; + default: + return (MMC_ERR_INVALID); + } + if (mmcbr_get_mode(sc->dev) == mode_sd) { + u_char switch_res[64]; + + err = mmc_sd_switch(sc, 1, 0, value, switch_res); + } else { + err = mmc_switch(sc, EXT_CSD_CMD_SET_NORMAL, + EXT_CSD_HS_TIMING, value); + } + return (err); +} + +static int +mmc_test_bus_width(struct mmc_softc *sc) +{ + struct mmc_command cmd; + struct mmc_data data; + int err; + uint8_t buf[8]; + uint8_t p8[8] = { 0x55, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + uint8_t p8ok[8] = { 0xAA, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + uint8_t p4[4] = { 0x5A, 0x00, 0x00, 0x00, }; + uint8_t p4ok[4] = { 0xA5, 0x00, 0x00, 0x00, }; + + if (mmcbr_get_caps(sc->dev) & MMC_CAP_8_BIT_DATA) { + mmcbr_set_bus_width(sc->dev, bus_width_8); + mmcbr_update_ios(sc->dev); + + cmd.opcode = MMC_BUSTEST_W; + cmd.arg = 0; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.data = &data; + + data.data = p8; + data.len = 8; + data.flags = MMC_DATA_WRITE; + mmc_wait_for_cmd(sc, &cmd, 0); + + cmd.opcode = MMC_BUSTEST_R; + cmd.arg = 0; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.data = &data; + + data.data = buf; + data.len = 8; + data.flags = MMC_DATA_READ; + err = mmc_wait_for_cmd(sc, &cmd, 0); + + mmcbr_set_bus_width(sc->dev, bus_width_1); + mmcbr_update_ios(sc->dev); + + if (err == MMC_ERR_NONE && memcmp(buf, p8ok, 8) == 0) + return (bus_width_8); + } + + if (mmcbr_get_caps(sc->dev) & MMC_CAP_4_BIT_DATA) { + mmcbr_set_bus_width(sc->dev, bus_width_4); + mmcbr_update_ios(sc->dev); + + cmd.opcode = MMC_BUSTEST_W; + cmd.arg = 0; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.data = &data; + + data.data = p4; + data.len = 4; + data.flags = MMC_DATA_WRITE; + mmc_wait_for_cmd(sc, &cmd, 0); + + cmd.opcode = MMC_BUSTEST_R; + cmd.arg = 0; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.data = &data; + + data.data = buf; + data.len = 4; + data.flags = MMC_DATA_READ; + err = mmc_wait_for_cmd(sc, &cmd, 0); + + mmcbr_set_bus_width(sc->dev, bus_width_1); + mmcbr_update_ios(sc->dev); + + if (err == MMC_ERR_NONE && memcmp(buf, p4ok, 4) == 0) + return (bus_width_4); + } + return (bus_width_1); +} + static uint32_t -mmc_get_bits(uint32_t *bits, int start, int size) +mmc_get_bits(uint32_t *bits, int bit_len, int start, int size) { - const int i = 3 - (start / 32); + const int i = (bit_len / 32) - (start / 32) - 1; const int shift = start & 31; uint32_t retval = bits[i] >> shift; if (size + shift > 32) retval |= bits[i - 1] << (32 - shift); - return retval & ((1 << size) - 1); + return (retval & ((1 << size) - 1)); } static void -mmc_decode_cid(int is_sd, uint32_t *raw_cid, struct mmc_cid *cid) +mmc_decode_cid_sd(uint32_t *raw_cid, struct mmc_cid *cid) { int i; + /* There's no version info, so we take it on faith */ memset(cid, 0, sizeof(*cid)); - if (is_sd) { - /* There's no version info, so we take it on faith */ - cid->mid = mmc_get_bits(raw_cid, 120, 8); - cid->oid = mmc_get_bits(raw_cid, 104, 16); - for (i = 0; i < 5; i++) - cid->pnm[i] = mmc_get_bits(raw_cid, 96 - i * 8, 8); - cid->prv = mmc_get_bits(raw_cid, 56, 8); - cid->psn = mmc_get_bits(raw_cid, 24, 32); - cid->mdt_year = mmc_get_bits(raw_cid, 12, 8) + 2001; - cid->mdt_month = mmc_get_bits(raw_cid, 8, 4); - } else { - // XXX write me - panic("write mmc cid decoder"); - } + cid->mid = mmc_get_bits(raw_cid, 128, 120, 8); + cid->oid = mmc_get_bits(raw_cid, 128, 104, 16); + for (i = 0; i < 5; i++) + cid->pnm[i] = mmc_get_bits(raw_cid, 128, 96 - i * 8, 8); + cid->prv = mmc_get_bits(raw_cid, 128, 56, 8); + cid->psn = mmc_get_bits(raw_cid, 128, 24, 32); + cid->mdt_year = mmc_get_bits(raw_cid, 128, 12, 8) + 2001; + cid->mdt_month = mmc_get_bits(raw_cid, 128, 8, 4); +} + +static void +mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid) +{ + int i; + + /* There's no version info, so we take it on faith */ + memset(cid, 0, sizeof(*cid)); + cid->mid = mmc_get_bits(raw_cid, 128, 120, 8); + cid->oid = mmc_get_bits(raw_cid, 128, 104, 8); + for (i = 0; i < 6; i++) + cid->pnm[i] = mmc_get_bits(raw_cid, 128, 96 - i * 8, 8); + cid->prv = mmc_get_bits(raw_cid, 128, 48, 8); + cid->psn = mmc_get_bits(raw_cid, 128, 16, 32); + cid->mdt_month = mmc_get_bits(raw_cid, 128, 12, 4); + cid->mdt_year = mmc_get_bits(raw_cid, 128, 8, 4) + 1997; } static const int exp[8] = { @@ -501,50 +786,142 @@ static const int cur_max[8] = { }; static void -mmc_decode_csd(int is_sd, uint32_t *raw_csd, struct mmc_csd *csd) +mmc_decode_csd_sd(uint32_t *raw_csd, struct mmc_csd *csd) { int v; int m; int e; memset(csd, 0, sizeof(*csd)); - if (is_sd) { - csd->csd_structure = v = mmc_get_bits(raw_csd, 126, 2); - if (v == 0) { - m = mmc_get_bits(raw_csd, 115, 4); - e = mmc_get_bits(raw_csd, 112, 3); - csd->tacc = exp[e] * mant[m] + 9 / 10; - csd->nsac = mmc_get_bits(raw_csd, 104, 8) * 100; - m = mmc_get_bits(raw_csd, 99, 4); - e = mmc_get_bits(raw_csd, 96, 3); - csd->tran_speed = exp[e] * 10000 * mant[m]; - csd->ccc = mmc_get_bits(raw_csd, 84, 12); - csd->read_bl_len = 1 << mmc_get_bits(raw_csd, 80, 4); - csd->read_bl_partial = mmc_get_bits(raw_csd, 79, 1); - csd->write_blk_misalign = mmc_get_bits(raw_csd, 78, 1); - csd->read_blk_misalign = mmc_get_bits(raw_csd, 77, 1); - csd->dsr_imp = mmc_get_bits(raw_csd, 76, 1); - csd->vdd_r_curr_min = cur_min[mmc_get_bits(raw_csd, 59, 3)]; - csd->vdd_r_curr_max = cur_max[mmc_get_bits(raw_csd, 56, 3)]; - csd->vdd_w_curr_min = cur_min[mmc_get_bits(raw_csd, 53, 3)]; - csd->vdd_w_curr_max = cur_max[mmc_get_bits(raw_csd, 50, 3)]; - m = mmc_get_bits(raw_csd, 62, 12); - e = mmc_get_bits(raw_csd, 47, 3); - csd->capacity = ((1 + m) << (e + 2)) * csd->read_bl_len; - csd->erase_blk_en = mmc_get_bits(raw_csd, 46, 1); - csd->sector_size = mmc_get_bits(raw_csd, 39, 7); - csd->wp_grp_size = mmc_get_bits(raw_csd, 32, 7); - csd->wp_grp_enable = mmc_get_bits(raw_csd, 31, 1); - csd->r2w_factor = 1 << mmc_get_bits(raw_csd, 26, 3); - csd->write_bl_len = 1 << mmc_get_bits(raw_csd, 22, 4); - csd->write_bl_partial = mmc_get_bits(raw_csd, 21, 1); - } else if (v == 1) { - panic("Write SDHC CSD parser"); - } else - panic("unknown SD CSD version"); - } else { - panic("Write a MMC CSD parser"); + csd->csd_structure = v = mmc_get_bits(raw_csd, 128, 126, 2); + if (v == 0) { + m = mmc_get_bits(raw_csd, 128, 115, 4); + e = mmc_get_bits(raw_csd, 128, 112, 3); + csd->tacc = exp[e] * mant[m] + 9 / 10; + csd->nsac = mmc_get_bits(raw_csd, 128, 104, 8) * 100; + m = mmc_get_bits(raw_csd, 128, 99, 4); + e = mmc_get_bits(raw_csd, 128, 96, 3); + csd->tran_speed = exp[e] * 10000 * mant[m]; + csd->ccc = mmc_get_bits(raw_csd, 128, 84, 12); + csd->read_bl_len = 1 << mmc_get_bits(raw_csd, 128, 80, 4); + csd->read_bl_partial = mmc_get_bits(raw_csd, 128, 79, 1); + csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); + csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); + csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); + csd->vdd_r_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 59, 3)]; + csd->vdd_r_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 56, 3)]; + csd->vdd_w_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 53, 3)]; + csd->vdd_w_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 50, 3)]; + m = mmc_get_bits(raw_csd, 128, 62, 12); + e = mmc_get_bits(raw_csd, 128, 47, 3); + csd->capacity = ((1 + m) << (e + 2)) * csd->read_bl_len; + csd->erase_blk_en = mmc_get_bits(raw_csd, 128, 46, 1); + csd->erase_sector = mmc_get_bits(raw_csd, 128, 39, 7) + 1; + csd->wp_grp_size = mmc_get_bits(raw_csd, 128, 32, 7); + csd->wp_grp_enable = mmc_get_bits(raw_csd, 128, 31, 1); + csd->r2w_factor = 1 << mmc_get_bits(raw_csd, 128, 26, 3); + csd->write_bl_len = 1 << mmc_get_bits(raw_csd, 128, 22, 4); + csd->write_bl_partial = mmc_get_bits(raw_csd, 128, 21, 1); + } else if (v == 1) { + m = mmc_get_bits(raw_csd, 128, 115, 4); + e = mmc_get_bits(raw_csd, 128, 112, 3); + csd->tacc = exp[e] * mant[m] + 9 / 10; + csd->nsac = mmc_get_bits(raw_csd, 128, 104, 8) * 100; + m = mmc_get_bits(raw_csd, 128, 99, 4); + e = mmc_get_bits(raw_csd, 128, 96, 3); + csd->tran_speed = exp[e] * 10000 * mant[m]; + csd->ccc = mmc_get_bits(raw_csd, 128, 84, 12); + csd->read_bl_len = 1 << mmc_get_bits(raw_csd, 128, 80, 4); + csd->read_bl_partial = mmc_get_bits(raw_csd, 128, 79, 1); + csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); + csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); + csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); + csd->capacity = ((uint64_t)mmc_get_bits(raw_csd, 128, 48, 22) + 1) * + 512 * 1024; + csd->erase_blk_en = mmc_get_bits(raw_csd, 128, 46, 1); + csd->erase_sector = mmc_get_bits(raw_csd, 128, 39, 7) + 1; + csd->wp_grp_size = mmc_get_bits(raw_csd, 128, 32, 7); + csd->wp_grp_enable = mmc_get_bits(raw_csd, 128, 31, 1); + csd->r2w_factor = 1 << mmc_get_bits(raw_csd, 128, 26, 3); + csd->write_bl_len = 1 << mmc_get_bits(raw_csd, 128, 22, 4); + csd->write_bl_partial = mmc_get_bits(raw_csd, 128, 21, 1); + } else + panic("unknown SD CSD version"); +} + +static void +mmc_decode_csd_mmc(uint32_t *raw_csd, struct mmc_csd *csd) +{ + int m; + int e; + + memset(csd, 0, sizeof(*csd)); + csd->csd_structure = mmc_get_bits(raw_csd, 128, 126, 2); + csd->spec_vers = mmc_get_bits(raw_csd, 128, 122, 4); + m = mmc_get_bits(raw_csd, 128, 115, 4); + e = mmc_get_bits(raw_csd, 128, 112, 3); + csd->tacc = exp[e] * mant[m] + 9 / 10; + csd->nsac = mmc_get_bits(raw_csd, 128, 104, 8) * 100; + m = mmc_get_bits(raw_csd, 128, 99, 4); + e = mmc_get_bits(raw_csd, 128, 96, 3); + csd->tran_speed = exp[e] * 10000 * mant[m]; + csd->ccc = mmc_get_bits(raw_csd, 128, 84, 12); + csd->read_bl_len = 1 << mmc_get_bits(raw_csd, 128, 80, 4); + csd->read_bl_partial = mmc_get_bits(raw_csd, 128, 79, 1); + csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); + csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); + csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); + csd->vdd_r_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 59, 3)]; + csd->vdd_r_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 56, 3)]; + csd->vdd_w_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 53, 3)]; + csd->vdd_w_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 50, 3)]; + m = mmc_get_bits(raw_csd, 128, 62, 12); + e = mmc_get_bits(raw_csd, 128, 47, 3); + csd->capacity = ((1 + m) << (e + 2)) * csd->read_bl_len; + csd->erase_blk_en = 0; + csd->erase_sector = (mmc_get_bits(raw_csd, 128, 42, 5) + 1) * + (mmc_get_bits(raw_csd, 128, 37, 5) + 1); + csd->wp_grp_size = mmc_get_bits(raw_csd, 128, 32, 5); + csd->wp_grp_enable = mmc_get_bits(raw_csd, 128, 31, 1); + csd->r2w_factor = 1 << mmc_get_bits(raw_csd, 128, 26, 3); + csd->write_bl_len = 1 << mmc_get_bits(raw_csd, 128, 22, 4); + csd->write_bl_partial = mmc_get_bits(raw_csd, 128, 21, 1); +} + +static void +mmc_app_decode_scr(uint32_t *raw_scr, struct mmc_scr *scr) +{ + unsigned int scr_struct; + + memset(scr, 0, sizeof(*scr)); + + scr_struct = mmc_get_bits(raw_scr, 64, 60, 4); + if (scr_struct != 0) { + printf("Unrecognised SCR structure version %d\n", + scr_struct); + return; } + scr->sda_vsn = mmc_get_bits(raw_scr, 64, 56, 4); + scr->bus_widths = mmc_get_bits(raw_scr, 64, 48, 4); +} + +static void +mmc_app_decode_sd_status(uint32_t *raw_sd_status, + struct mmc_sd_status *sd_status) +{ + + memset(sd_status, 0, sizeof(*sd_status)); + + sd_status->bus_width = mmc_get_bits(raw_sd_status, 512, 510, 2); + sd_status->secured_mode = mmc_get_bits(raw_sd_status, 512, 509, 1); + sd_status->card_type = mmc_get_bits(raw_sd_status, 512, 480, 16); + sd_status->prot_area = mmc_get_bits(raw_sd_status, 512, 448, 12); + sd_status->speed_class = mmc_get_bits(raw_sd_status, 512, 440, 8); + sd_status->perf_move = mmc_get_bits(raw_sd_status, 512, 432, 8); + sd_status->au_size = mmc_get_bits(raw_sd_status, 512, 428, 4); + sd_status->erase_size = mmc_get_bits(raw_sd_status, 512, 408, 16); + sd_status->erase_timeout = mmc_get_bits(raw_sd_status, 512, 402, 6); + sd_status->erase_offset = mmc_get_bits(raw_sd_status, 512, 400, 2); } static int @@ -556,6 +933,7 @@ mmc_all_send_cid(struct mmc_softc *sc, u cmd.opcode = MMC_ALL_SEND_CID; cmd.arg = 0; cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR; + cmd.data = NULL; err = mmc_wait_for_cmd(sc, &cmd, 0); memcpy(rawcid, cmd.resp, 4 * sizeof(uint32_t)); return (err); @@ -570,12 +948,103 @@ mmc_send_csd(struct mmc_softc *sc, uint1 cmd.opcode = MMC_SEND_CSD; cmd.arg = rca << 16; cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR; + cmd.data = NULL; err = mmc_wait_for_cmd(sc, &cmd, 0); memcpy(rawcid, cmd.resp, 4 * sizeof(uint32_t)); return (err); } static int +mmc_app_send_scr(struct mmc_softc *sc, uint16_t rca, uint32_t *rawscr) +{ + int err; + struct mmc_command cmd; + struct mmc_data data; + + memset(&cmd, 0, sizeof(struct mmc_command)); + memset(&data, 0, sizeof(struct mmc_data)); + + memset(rawscr, 0, 8); + cmd.opcode = ACMD_SEND_SCR; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.arg = 0; + cmd.data = &data; + + data.data = rawscr; + data.len = 8; + data.flags = MMC_DATA_READ; + + err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + rawscr[0] = be32toh(rawscr[0]); + rawscr[1] = be32toh(rawscr[1]); + return (err); +} + +static int +mmc_send_ext_csd(struct mmc_softc *sc, uint8_t *rawextcsd) +{ + int err; + struct mmc_command cmd; + struct mmc_data data; + + memset(&cmd, 0, sizeof(struct mmc_command)); + memset(&data, 0, sizeof(struct mmc_data)); + + memset(rawextcsd, 0, 512); + cmd.opcode = MMC_SEND_EXT_CSD; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.arg = 0; + cmd.data = &data; + + data.data = rawextcsd; + data.len = 512; + data.flags = MMC_DATA_READ; + + err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + return (err); +} + +static int +mmc_app_sd_status(struct mmc_softc *sc, uint16_t rca, uint32_t *rawsdstatus) +{ + int err, i; + struct mmc_command cmd; + struct mmc_data data; + + memset(&cmd, 0, sizeof(struct mmc_command)); + memset(&data, 0, sizeof(struct mmc_data)); + + memset(rawsdstatus, 0, 64); + cmd.opcode = ACMD_SD_STATUS; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.arg = 0; + cmd.data = &data; + + data.data = rawsdstatus; + data.len = 64; + data.flags = MMC_DATA_READ; + + err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + for (i = 0; i < 16; i++) + rawsdstatus[i] = be32toh(rawsdstatus[i]); + return (err); +} + +static int +mmc_set_relative_addr(struct mmc_softc *sc, uint16_t resp) +{ + struct mmc_command cmd; + int err; + + cmd.opcode = MMC_SET_RELATIVE_ADDR; + cmd.arg = resp << 16; + cmd.flags = MMC_RSP_R6 | MMC_CMD_BCR; + cmd.data = NULL; + err = mmc_wait_for_cmd(sc, &cmd, 0); + return (err); +} + +static int mmc_send_relative_addr(struct mmc_softc *sc, uint32_t *resp) { struct mmc_command cmd; @@ -584,6 +1053,7 @@ mmc_send_relative_addr(struct mmc_softc cmd.opcode = SD_SEND_RELATIVE_ADDR; cmd.arg = 0; cmd.flags = MMC_RSP_R6 | MMC_CMD_BCR; + cmd.data = NULL; err = mmc_wait_for_cmd(sc, &cmd, 0); *resp = cmd.resp[0]; return (err); @@ -592,39 +1062,182 @@ mmc_send_relative_addr(struct mmc_softc static void mmc_discover_cards(struct mmc_softc *sc) { - struct mmc_ivars *ivar; - int err; - uint32_t resp; + struct mmc_ivars *ivar = NULL; + device_t *devlist; + int err, i, devcount, newcard; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 19:53:59 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DDA2106566B; Mon, 5 Jan 2009 19:53:59 +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 1B6A18FC14; Mon, 5 Jan 2009 19:53:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05JrwTe009208; Mon, 5 Jan 2009 19:53:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05JrwlM009207; Mon, 5 Jan 2009 19:53:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901051953.n05JrwlM009207@svn.freebsd.org> From: Alexander Motin Date: Mon, 5 Jan 2009 19:53:58 +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: r186787 - stable/7/sys/arm/at91 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 19:54:00 -0000 Author: mav Date: Mon Jan 5 19:53:58 2009 New Revision: 186787 URL: http://svn.freebsd.org/changeset/base/186787 Log: MFC rev. 183479, 184452. Keep in sync with latest MMC stack: - limit transfers with single block, - properly implement read-only. Modified: stable/7/sys/arm/at91/at91_mci.c Modified: stable/7/sys/arm/at91/at91_mci.c ============================================================================== --- stable/7/sys/arm/at91/at91_mci.c Mon Jan 5 19:40:09 2009 (r186786) +++ stable/7/sys/arm/at91/at91_mci.c Mon Jan 5 19:53:58 2009 (r186787) @@ -462,7 +462,7 @@ at91_mci_request(device_t brdev, device_ static int at91_mci_get_ro(device_t brdev, device_t reqdev) { - return (-1); + return (0); } static int @@ -649,6 +649,9 @@ at91_mci_read_ivar(device_t bus, device_ case MMCBR_IVAR_VDD: *(int *)result = sc->host.ios.vdd; break; + case MMCBR_IVAR_MAX_DATA: + *(int *)result = 1; + break; } return (0); } @@ -685,9 +688,11 @@ at91_mci_write_ivar(device_t bus, device case MMCBR_IVAR_VDD: sc->host.ios.vdd = value; break; + /* These are read-only */ case MMCBR_IVAR_HOST_OCR: case MMCBR_IVAR_F_MIN: case MMCBR_IVAR_F_MAX: + case MMCBR_IVAR_MAX_DATA: return (EINVAL); } return (0); From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 20:23:01 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93A881065670; Mon, 5 Jan 2009 20:23:01 +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 7FA7B8FC1F; Mon, 5 Jan 2009 20:23:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05KN118009901; Mon, 5 Jan 2009 20:23:01 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05KN1BD009899; Mon, 5 Jan 2009 20:23:01 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901052023.n05KN1BD009899@svn.freebsd.org> From: Alexander Motin Date: Mon, 5 Jan 2009 20:23:01 +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: r186790 - stable/7/sys/dev/sdhci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:23:02 -0000 Author: mav Date: Mon Jan 5 20:23:01 2009 New Revision: 186790 URL: http://svn.freebsd.org/changeset/base/186790 Log: MFC sdhci driver. Added: stable/7/sys/dev/sdhci/ stable/7/sys/dev/sdhci/sdhci.c (contents, props changed) stable/7/sys/dev/sdhci/sdhci.h (contents, props changed) Added: stable/7/sys/dev/sdhci/sdhci.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/dev/sdhci/sdhci.c Mon Jan 5 20:23:01 2009 (r186790) @@ -0,0 +1,1566 @@ +/*- + * Copyright (c) 2008 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 ``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 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "mmcbr_if.h" +#include "sdhci.h" + +#define DMA_BLOCK_SIZE 4096 +#define DMA_BOUNDARY 0 /* DMA reload every 4K */ + +/* Controller doesn't honor resets unless we touch the clock register */ +#define SDHCI_QUIRK_CLOCK_BEFORE_RESET (1<<0) +/* Controller really supports DMA */ +#define SDHCI_QUIRK_FORCE_DMA (1<<1) +/* Controller has unusable DMA engine */ +#define SDHCI_QUIRK_BROKEN_DMA (1<<2) +/* Controller doesn't like to be reset when there is no card inserted. */ +#define SDHCI_QUIRK_NO_CARD_NO_RESET (1<<3) +/* Controller has flaky internal state so reset it on each ios change */ +#define SDHCI_QUIRK_RESET_ON_IOS (1<<4) +/* Controller can only DMA chunk sizes that are a multiple of 32 bits */ +#define SDHCI_QUIRK_32BIT_DMA_SIZE (1<<5) +/* Controller needs to be reset after each request to stay stable */ +#define SDHCI_QUIRK_RESET_AFTER_REQUEST (1<<6) +/* Controller has an off-by-one issue with timeout value */ +#define SDHCI_QUIRK_INCR_TIMEOUT_CONTROL (1<<7) +/* Controller has broken read timings */ +#define SDHCI_QUIRK_BROKEN_TIMINGS (1<<8) + +static const struct sdhci_device { + uint32_t model; + uint16_t subvendor; + char *desc; + u_int quirks; +} sdhci_devices[] = { + { 0x08221180, 0xffff, "RICOH R5C822 SD", + SDHCI_QUIRK_FORCE_DMA }, + { 0x8034104c, 0xffff, "TI XX21/XX11 SD", + SDHCI_QUIRK_FORCE_DMA }, + { 0x05501524, 0xffff, "ENE CB712 SD", + SDHCI_QUIRK_BROKEN_TIMINGS }, + { 0x05511524, 0xffff, "ENE CB712 SD 2", + SDHCI_QUIRK_BROKEN_TIMINGS }, + { 0x07501524, 0xffff, "ENE CB714 SD", + SDHCI_QUIRK_RESET_ON_IOS | + SDHCI_QUIRK_BROKEN_TIMINGS }, + { 0x07511524, 0xffff, "ENE CB714 SD 2", + SDHCI_QUIRK_RESET_ON_IOS | + SDHCI_QUIRK_BROKEN_TIMINGS }, + { 0x410111ab, 0xffff, "Marvell CaFe SD", + SDHCI_QUIRK_INCR_TIMEOUT_CONTROL }, + { 0x2381197B, 0xffff, "JMicron JMB38X SD", + SDHCI_QUIRK_32BIT_DMA_SIZE | + SDHCI_QUIRK_RESET_AFTER_REQUEST }, + { 0, 0xffff, NULL, + 0 } +}; + +struct sdhci_softc; + +struct sdhci_slot { + struct sdhci_softc *sc; + device_t dev; /* Slot device */ + u_char num; /* Slot number */ + u_char opt; /* Slot options */ +#define SDHCI_HAVE_DMA 1 + uint32_t max_clk; /* Max possible freq */ + uint32_t timeout_clk; /* Timeout freq */ + struct resource *mem_res; /* Memory resource */ + int mem_rid; + bus_dma_tag_t dmatag; + bus_dmamap_t dmamap; + u_char *dmamem; + bus_addr_t paddr; /* DMA buffer address */ + struct task card_task; /* Card presence check task */ + struct callout card_callout; /* Card insert delay callout */ + struct mmc_host host; /* Host parameters */ + struct mmc_request *req; /* Current request */ + struct mmc_command *curcmd; /* Current command of current request */ + + uint32_t intmask; /* Current interrupt mask */ + uint32_t clock; /* Current clock freq. */ + size_t offset; /* Data buffer offset */ + uint8_t hostctrl; /* Current host control register */ + u_char power; /* Current power */ + u_char bus_busy; /* Bus busy status */ + u_char cmd_done; /* CMD command part done flag */ + u_char data_done; /* DAT command part done flag */ + u_char flags; /* Request execution flags */ +#define CMD_STARTED 1 +#define STOP_STARTED 2 +#define SDHCI_USE_DMA 4 /* Use DMA for this req. */ + struct mtx mtx; /* Slot mutex */ +}; + +struct sdhci_softc { + device_t dev; /* Controller device */ + u_int quirks; /* Chip specific quirks */ + struct resource *irq_res; /* IRQ resource */ + int irq_rid; + void *intrhand; /* Interrupt handle */ + + int num_slots; /* Number of slots on this controller */ + struct sdhci_slot slots[6]; +}; + +static inline uint8_t +RD1(struct sdhci_slot *slot, bus_size_t off) +{ + bus_barrier(slot->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return bus_read_1(slot->mem_res, off); +} + +static inline void +WR1(struct sdhci_slot *slot, bus_size_t off, uint8_t val) +{ + bus_barrier(slot->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + bus_write_1(slot->mem_res, off, val); +} + +static inline uint16_t +RD2(struct sdhci_slot *slot, bus_size_t off) +{ + bus_barrier(slot->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return bus_read_2(slot->mem_res, off); +} + +static inline void +WR2(struct sdhci_slot *slot, bus_size_t off, uint16_t val) +{ + bus_barrier(slot->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + bus_write_2(slot->mem_res, off, val); +} + +static inline uint32_t +RD4(struct sdhci_slot *slot, bus_size_t off) +{ + bus_barrier(slot->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return bus_read_4(slot->mem_res, off); +} + +static inline void +WR4(struct sdhci_slot *slot, bus_size_t off, uint32_t val) +{ + bus_barrier(slot->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + bus_write_4(slot->mem_res, off, val); +} + +/* bus entry points */ +static int sdhci_probe(device_t dev); +static int sdhci_attach(device_t dev); +static int sdhci_detach(device_t dev); +static void sdhci_intr(void *); + +static void sdhci_set_clock(struct sdhci_slot *slot, uint32_t clock); +static void sdhci_start(struct sdhci_slot *slot); +static void sdhci_start_data(struct sdhci_slot *slot, struct mmc_data *data); + +static void sdhci_card_task(void *, int); + +/* helper routines */ +#define SDHCI_LOCK(_slot) mtx_lock(&(_slot)->mtx) +#define SDHCI_UNLOCK(_slot) mtx_unlock(&(_slot)->mtx) +#define SDHCI_LOCK_INIT(_slot) \ + mtx_init(&_slot->mtx, "SD slot mtx", "sdhci", MTX_DEF) +#define SDHCI_LOCK_DESTROY(_slot) mtx_destroy(&_slot->mtx); +#define SDHCI_ASSERT_LOCKED(_slot) mtx_assert(&_slot->mtx, MA_OWNED); +#define SDHCI_ASSERT_UNLOCKED(_slot) mtx_assert(&_slot->mtx, MA_NOTOWNED); + +static int +slot_printf(struct sdhci_slot *slot, const char * fmt, ...) +{ + va_list ap; + int retval; + + retval = printf("%s-slot%d: ", + device_get_nameunit(slot->sc->dev), slot->num); + + va_start(ap, fmt); + retval += vprintf(fmt, ap); + va_end(ap); + return (retval); +} + +static void +sdhci_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + if (error != 0) { + printf("getaddr: error %d\n", error); + return; + } + *(bus_addr_t *)arg = segs[0].ds_addr; +} + +static void +sdhci_dumpregs(struct sdhci_slot *slot) +{ + slot_printf(slot, + "============== REGISTER DUMP ==============\n"); + + slot_printf(slot, "Sys addr: 0x%08x | Version: 0x%08x\n", + RD4(slot, SDHCI_DMA_ADDRESS), RD2(slot, SDHCI_HOST_VERSION)); + slot_printf(slot, "Blk size: 0x%08x | Blk cnt: 0x%08x\n", + RD2(slot, SDHCI_BLOCK_SIZE), RD2(slot, SDHCI_BLOCK_COUNT)); + slot_printf(slot, "Argument: 0x%08x | Trn mode: 0x%08x\n", + RD4(slot, SDHCI_ARGUMENT), RD2(slot, SDHCI_TRANSFER_MODE)); + slot_printf(slot, "Present: 0x%08x | Host ctl: 0x%08x\n", + RD4(slot, SDHCI_PRESENT_STATE), RD1(slot, SDHCI_HOST_CONTROL)); + slot_printf(slot, "Power: 0x%08x | Blk gap: 0x%08x\n", + RD1(slot, SDHCI_POWER_CONTROL), RD1(slot, SDHCI_BLOCK_GAP_CONTROL)); + slot_printf(slot, "Wake-up: 0x%08x | Clock: 0x%08x\n", + RD1(slot, SDHCI_WAKE_UP_CONTROL), RD2(slot, SDHCI_CLOCK_CONTROL)); + slot_printf(slot, "Timeout: 0x%08x | Int stat: 0x%08x\n", + RD1(slot, SDHCI_TIMEOUT_CONTROL), RD4(slot, SDHCI_INT_STATUS)); + slot_printf(slot, "Int enab: 0x%08x | Sig enab: 0x%08x\n", + RD4(slot, SDHCI_INT_ENABLE), RD4(slot, SDHCI_SIGNAL_ENABLE)); + slot_printf(slot, "AC12 err: 0x%08x | Slot int: 0x%08x\n", + RD2(slot, SDHCI_ACMD12_ERR), RD2(slot, SDHCI_SLOT_INT_STATUS)); + slot_printf(slot, "Caps: 0x%08x | Max curr: 0x%08x\n", + RD4(slot, SDHCI_CAPABILITIES), RD4(slot, SDHCI_MAX_CURRENT)); + + slot_printf(slot, + "===========================================\n"); +} + +static void +sdhci_reset(struct sdhci_slot *slot, uint8_t mask) +{ + int timeout; + uint8_t res; + + if (slot->sc->quirks & SDHCI_QUIRK_NO_CARD_NO_RESET) { + if (!(RD4(slot, SDHCI_PRESENT_STATE) & + SDHCI_CARD_PRESENT)) + return; + } + + /* Some controllers need this kick or reset won't work. */ + if ((mask & SDHCI_RESET_ALL) == 0 && + (slot->sc->quirks & SDHCI_QUIRK_CLOCK_BEFORE_RESET)) { + uint32_t clock; + + /* This is to force an update */ + clock = slot->clock; + slot->clock = 0; + sdhci_set_clock(slot, clock); + } + + WR1(slot, SDHCI_SOFTWARE_RESET, mask); + + if (mask & SDHCI_RESET_ALL) { + slot->clock = 0; + slot->power = 0; + } + + /* Wait max 100 ms */ + timeout = 100; + /* Controller clears the bits when it's done */ + while ((res = RD1(slot, SDHCI_SOFTWARE_RESET)) & mask) { + if (timeout == 0) { + slot_printf(slot, + "Reset 0x%x never completed - 0x%x.\n", + (int)mask, (int)res); + sdhci_dumpregs(slot); + return; + } + timeout--; + DELAY(1000); + } +} + +static void +sdhci_init(struct sdhci_slot *slot) +{ + + sdhci_reset(slot, SDHCI_RESET_ALL); + + /* Enable interrupts. */ + slot->intmask = SDHCI_INT_BUS_POWER | SDHCI_INT_DATA_END_BIT | + SDHCI_INT_DATA_CRC | SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_INDEX | + SDHCI_INT_END_BIT | SDHCI_INT_CRC | SDHCI_INT_TIMEOUT | + SDHCI_INT_CARD_REMOVE | SDHCI_INT_CARD_INSERT | + SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | + SDHCI_INT_DMA_END | SDHCI_INT_DATA_END | SDHCI_INT_RESPONSE | + SDHCI_INT_ACMD12ERR; + WR4(slot, SDHCI_INT_ENABLE, slot->intmask); + WR4(slot, SDHCI_SIGNAL_ENABLE, slot->intmask); +} + +static void +sdhci_set_clock(struct sdhci_slot *slot, uint32_t clock) +{ + uint32_t res; + uint16_t clk; + int timeout; + + if (clock == slot->clock) + return; + slot->clock = clock; + + /* Turn off the clock. */ + WR2(slot, SDHCI_CLOCK_CONTROL, 0); + /* If no clock requested - left it so. */ + if (clock == 0) + return; + /* Looking for highest freq <= clock. */ + res = slot->max_clk; + for (clk = 1; clk < 256; clk <<= 1) { + if (res <= clock) + break; + res >>= 1; + } + /* Divider 1:1 is 0x00, 2:1 is 0x01, 256:1 is 0x80 ... */ + clk >>= 1; + /* Now we have got divider, set it. */ + clk <<= SDHCI_DIVIDER_SHIFT; + WR2(slot, SDHCI_CLOCK_CONTROL, clk); + /* Enable clock. */ + clk |= SDHCI_CLOCK_INT_EN; + WR2(slot, SDHCI_CLOCK_CONTROL, clk); + /* Wait up to 10 ms until it stabilize. */ + timeout = 10; + while (!((clk = RD2(slot, SDHCI_CLOCK_CONTROL)) + & SDHCI_CLOCK_INT_STABLE)) { + if (timeout == 0) { + slot_printf(slot, + "Internal clock never stabilised.\n"); + sdhci_dumpregs(slot); + return; + } + timeout--; + DELAY(1000); + } + /* Pass clock signal to the bus. */ + clk |= SDHCI_CLOCK_CARD_EN; + WR2(slot, SDHCI_CLOCK_CONTROL, clk); +} + +static void +sdhci_set_power(struct sdhci_slot *slot, u_char power) +{ + uint8_t pwr; + + if (slot->power == power) + return; + slot->power = power; + + /* Turn off the power. */ + pwr = 0; + WR1(slot, SDHCI_POWER_CONTROL, pwr); + /* If power down requested - left it so. */ + if (power == 0) + return; + /* Set voltage. */ + switch (1 << power) { + case MMC_OCR_LOW_VOLTAGE: + pwr |= SDHCI_POWER_180; + break; + case MMC_OCR_290_300: + case MMC_OCR_300_310: + pwr |= SDHCI_POWER_300; + break; + case MMC_OCR_320_330: + case MMC_OCR_330_340: + pwr |= SDHCI_POWER_330; + break; + } + WR1(slot, SDHCI_POWER_CONTROL, pwr); + /* Turn on the power. */ + pwr |= SDHCI_POWER_ON; + WR1(slot, SDHCI_POWER_CONTROL, pwr); +} + +static void +sdhci_read_block_pio(struct sdhci_slot *slot) +{ + uint32_t data; + char *buffer; + size_t left; + + buffer = slot->curcmd->data->data; + buffer += slot->offset; + /* Transfer one block at a time. */ + left = min(512, slot->curcmd->data->len - slot->offset); + slot->offset += left; + + /* If we are too fast, broken controllers return zeroes. */ + if (slot->sc->quirks & SDHCI_QUIRK_BROKEN_TIMINGS) + DELAY(10); + /* Handle unalligned and alligned buffer cases. */ + if ((intptr_t)buffer & 3) { + while (left > 3) { + data = RD4(slot, SDHCI_BUFFER); + buffer[0] = data; + buffer[1] = (data >> 8); + buffer[2] = (data >> 16); + buffer[3] = (data >> 24); + buffer += 4; + left -= 4; + } + } else { + bus_read_multi_stream_4(slot->mem_res, SDHCI_BUFFER, + (uint32_t *)buffer, left >> 2); + left &= 3; + } + /* Handle uneven size case. */ + if (left > 0) { + data = RD4(slot, SDHCI_BUFFER); + while (left > 0) { + *(buffer++) = data; + data >>= 8; + left--; + } + } +} + +static void +sdhci_write_block_pio(struct sdhci_slot *slot) +{ + uint32_t data = 0; + char *buffer; + size_t left; + + buffer = slot->curcmd->data->data; + buffer += slot->offset; + /* Transfer one block at a time. */ + left = min(512, slot->curcmd->data->len - slot->offset); + slot->offset += left; + + /* Handle unalligned and alligned buffer cases. */ + if ((intptr_t)buffer & 3) { + while (left > 3) { + data = buffer[0] + + (buffer[1] << 8) + + (buffer[2] << 16) + + (buffer[3] << 24); + left -= 4; + buffer += 4; + WR4(slot, SDHCI_BUFFER, data); + } + } else { + bus_write_multi_stream_4(slot->mem_res, SDHCI_BUFFER, + (uint32_t *)buffer, left >> 2); + left &= 3; + } + /* Handle uneven size case. */ + if (left > 0) { + while (left > 0) { + data <<= 8; + data += *(buffer++); + left--; + } + WR4(slot, SDHCI_BUFFER, data); + } +} + +static void +sdhci_transfer_pio(struct sdhci_slot *slot) +{ + + /* Read as many blocks as possible. */ + if (slot->curcmd->data->flags & MMC_DATA_READ) { + while (RD4(slot, SDHCI_PRESENT_STATE) & + SDHCI_DATA_AVAILABLE) { + sdhci_read_block_pio(slot); + if (slot->offset >= slot->curcmd->data->len) + break; + } + } else { + while (RD4(slot, SDHCI_PRESENT_STATE) & + SDHCI_SPACE_AVAILABLE) { + sdhci_write_block_pio(slot); + if (slot->offset >= slot->curcmd->data->len) + break; + } + } +} + +static void +sdhci_card_delay(void *arg) +{ + struct sdhci_slot *slot = arg; + + taskqueue_enqueue(taskqueue_swi_giant, &slot->card_task); +} + +static void +sdhci_card_task(void *arg, int pending) +{ + struct sdhci_slot *slot = arg; + + SDHCI_LOCK(slot); + if (RD4(slot, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT) { + if (slot->dev == NULL) { + /* If card is present - attach mmc bus. */ + slot->dev = device_add_child(slot->sc->dev, "mmc", -1); + device_set_ivars(slot->dev, slot); + SDHCI_UNLOCK(slot); + device_probe_and_attach(slot->dev); + } else + SDHCI_UNLOCK(slot); + } else { + if (slot->dev != NULL) { + /* If no card present - detach mmc bus. */ + device_t d = slot->dev; + slot->dev = NULL; + SDHCI_UNLOCK(slot); + device_delete_child(slot->sc->dev, d); + } else + SDHCI_UNLOCK(slot); + } +} + +static int +sdhci_probe(device_t dev) +{ + uint32_t model; + uint16_t subvendor; + uint8_t class, subclass; + int i, result; + + model = (uint32_t)pci_get_device(dev) << 16; + model |= (uint32_t)pci_get_vendor(dev) & 0x0000ffff; + subvendor = pci_get_subvendor(dev); + class = pci_get_class(dev); + subclass = pci_get_subclass(dev); + + result = ENXIO; + for (i = 0; sdhci_devices[i].model != 0; i++) { + if (sdhci_devices[i].model == model && + (sdhci_devices[i].subvendor == 0xffff || + sdhci_devices[i].subvendor == subvendor)) { + device_set_desc(dev, sdhci_devices[i].desc); + result = BUS_PROBE_DEFAULT; + break; + } + } + if (result == ENXIO && class == PCIC_BASEPERIPH && + subclass == PCIS_BASEPERIPH_SDHC) { + device_set_desc(dev, "Generic SD HCI"); + result = BUS_PROBE_GENERIC; + } + + return (result); +} + +static int +sdhci_attach(device_t dev) +{ + struct sdhci_softc *sc = device_get_softc(dev); + uint32_t model; + uint16_t subvendor; + uint8_t class, subclass, progif; + int err, slots, bar, i; + + sc->dev = dev; + model = (uint32_t)pci_get_device(dev) << 16; + model |= (uint32_t)pci_get_vendor(dev) & 0x0000ffff; + subvendor = pci_get_subvendor(dev); + class = pci_get_class(dev); + subclass = pci_get_subclass(dev); + progif = pci_get_progif(dev); + /* Apply chip specific quirks. */ + for (i = 0; sdhci_devices[i].model != 0; i++) { + if (sdhci_devices[i].model == model && + (sdhci_devices[i].subvendor == 0xffff || + sdhci_devices[i].subvendor == subvendor)) { + sc->quirks = sdhci_devices[i].quirks; + break; + } + } + /* Read slots info from PCI registers. */ + slots = pci_read_config(dev, PCI_SLOT_INFO, 1); + bar = PCI_SLOT_INFO_FIRST_BAR(slots); + slots = PCI_SLOT_INFO_SLOTS(slots); + if (slots > 6 || bar > 5) { + device_printf(dev, "Incorrect slots information (%d, %d).\n", + slots, bar); + return (EINVAL); + } + /* Allocate IRQ. */ + sc->irq_rid = 0; + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, + RF_SHAREABLE | RF_ACTIVE); + if (sc->irq_res == NULL) { + device_printf(dev, "Can't allocate IRQ\n"); + return (ENOMEM); + } + /* Scan all slots. */ + for (i = 0; i < slots; i++) { + struct sdhci_slot *slot = &sc->slots[sc->num_slots]; + uint32_t caps; + + SDHCI_LOCK_INIT(slot); + slot->sc = sc; + slot->num = sc->num_slots; + /* Allocate memory. */ + slot->mem_rid = PCIR_BAR(bar + i); + slot->mem_res = bus_alloc_resource(dev, + SYS_RES_MEMORY, &slot->mem_rid, 0ul, ~0ul, 0x100, RF_ACTIVE); + if (slot->mem_res == NULL) { + device_printf(dev, "Can't allocate memory\n"); + SDHCI_LOCK_DESTROY(slot); + continue; + } + /* Allocate DMA tag. */ + err = bus_dma_tag_create(bus_get_dma_tag(dev), + DMA_BLOCK_SIZE, 0, BUS_SPACE_MAXADDR_32BIT, + BUS_SPACE_MAXADDR, NULL, NULL, + DMA_BLOCK_SIZE, 1, DMA_BLOCK_SIZE, + BUS_DMA_ALLOCNOW, NULL, NULL, + &slot->dmatag); + if (err != 0) { + device_printf(dev, "Can't create DMA tag\n"); + SDHCI_LOCK_DESTROY(slot); + continue; + } + /* Allocate DMA memory. */ + err = bus_dmamem_alloc(slot->dmatag, (void **)&slot->dmamem, + BUS_DMA_NOWAIT, &slot->dmamap); + if (err != 0) { + device_printf(dev, "Can't alloc DMA memory\n"); + SDHCI_LOCK_DESTROY(slot); + continue; + } + /* Map the memory. */ + err = bus_dmamap_load(slot->dmatag, slot->dmamap, + (void *)slot->dmamem, DMA_BLOCK_SIZE, + sdhci_getaddr, &slot->paddr, 0); + if (err != 0 || slot->paddr == 0) { + device_printf(dev, "Can't load DMA memory\n"); + SDHCI_LOCK_DESTROY(slot); + continue; + } + /* Initialize slot. */ + sdhci_init(slot); + caps = RD4(slot, SDHCI_CAPABILITIES); + /* Calculate base clock frequency. */ + slot->max_clk = + (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; + if (slot->max_clk == 0) { + device_printf(dev, "Hardware doesn't specify base clock " + "frequency.\n"); + } + slot->max_clk *= 1000000; + /* Calculate timeout clock frequency. */ + slot->timeout_clk = + (caps & SDHCI_TIMEOUT_CLK_MASK) >> SDHCI_TIMEOUT_CLK_SHIFT; + if (slot->timeout_clk == 0) { + device_printf(dev, "Hardware doesn't specify timeout clock " + "frequency.\n"); + } + if (caps & SDHCI_TIMEOUT_CLK_UNIT) + slot->timeout_clk *= 1000; + + slot->host.f_min = slot->max_clk / 256; + slot->host.f_max = slot->max_clk; + slot->host.host_ocr = 0; + if (caps & SDHCI_CAN_VDD_330) + slot->host.host_ocr |= MMC_OCR_320_330 | MMC_OCR_330_340; + if (caps & SDHCI_CAN_VDD_300) + slot->host.host_ocr |= MMC_OCR_290_300 | MMC_OCR_300_310; + if (caps & SDHCI_CAN_VDD_180) + slot->host.host_ocr |= MMC_OCR_LOW_VOLTAGE; + if (slot->host.host_ocr == 0) { + device_printf(dev, "Hardware doesn't report any " + "support voltages.\n"); + } + slot->host.caps = MMC_CAP_4_BIT_DATA; + if (caps & SDHCI_CAN_DO_HISPD) + slot->host.caps |= MMC_CAP_HSPEED; + /* Decide if we have usable DMA. */ + if (caps & SDHCI_CAN_DO_DMA) + slot->opt |= SDHCI_HAVE_DMA; + if (class == PCIC_BASEPERIPH && + subclass == PCIS_BASEPERIPH_SDHC && + progif != PCI_SDHCI_IFDMA) + slot->opt &= ~SDHCI_HAVE_DMA; + if (sc->quirks & SDHCI_QUIRK_BROKEN_DMA) + slot->opt &= ~SDHCI_HAVE_DMA; + if (sc->quirks & SDHCI_QUIRK_FORCE_DMA) + slot->opt |= SDHCI_HAVE_DMA; + + if (bootverbose) { + slot_printf(slot, "%uMHz%s 4bits%s%s%s %s\n", + slot->max_clk / 1000000, + (caps & SDHCI_CAN_DO_HISPD) ? " HS" : "", + (caps & SDHCI_CAN_VDD_330) ? " 3.3V" : "", + (caps & SDHCI_CAN_VDD_300) ? " 3.0V" : "", + (caps & SDHCI_CAN_VDD_180) ? " 1.8V" : "", + (slot->opt & SDHCI_HAVE_DMA) ? "DMA" : "PIO"); + sdhci_dumpregs(slot); + } + + TASK_INIT(&slot->card_task, 0, sdhci_card_task, slot); + callout_init(&slot->card_callout, 1); + sc->num_slots++; + } + device_printf(dev, "%d slot(s) allocated\n", sc->num_slots); + /* Activate the interrupt */ + err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC | INTR_MPSAFE, + NULL, sdhci_intr, sc, &sc->intrhand); + if (err) + device_printf(dev, "Can't setup IRQ\n"); + pci_enable_busmaster(dev); + /* Process cards detection. */ + for (i = 0; i < sc->num_slots; i++) { + struct sdhci_slot *slot = &sc->slots[i]; + + sdhci_card_task(slot, 0); + } + + return (0); +} + +static int +sdhci_detach(device_t dev) +{ + struct sdhci_softc *sc = device_get_softc(dev); + int i; + + bus_teardown_intr(dev, sc->irq_res, sc->intrhand); + bus_release_resource(dev, SYS_RES_IRQ, + sc->irq_rid, sc->irq_res); + + for (i = 0; i < sc->num_slots; i++) { + struct sdhci_slot *slot = &sc->slots[i]; + device_t d; + + callout_drain(&slot->card_callout); + taskqueue_drain(taskqueue_swi_giant, &slot->card_task); + + SDHCI_LOCK(slot); + d = slot->dev; + slot->dev = NULL; + SDHCI_UNLOCK(slot); + if (d != NULL) + device_delete_child(dev, d); + + SDHCI_LOCK(slot); + sdhci_reset(slot, SDHCI_RESET_ALL); + SDHCI_UNLOCK(slot); + bus_dmamap_unload(slot->dmatag, slot->dmamap); + bus_dmamem_free(slot->dmatag, slot->dmamem, slot->dmamap); + bus_dma_tag_destroy(slot->dmatag); + bus_release_resource(dev, SYS_RES_MEMORY, + slot->mem_rid, slot->mem_res); + SDHCI_LOCK_DESTROY(slot); + } + return (0); +} + +static int +sdhci_suspend(device_t dev) +{ + struct sdhci_softc *sc = device_get_softc(dev); + int i, err; + + err = bus_generic_suspend(dev); + if (err) + return (err); + for (i = 0; i < sc->num_slots; i++) + sdhci_reset(&sc->slots[i], SDHCI_RESET_ALL); + return (0); +} + +static int +sdhci_resume(device_t dev) +{ + struct sdhci_softc *sc = device_get_softc(dev); + int i; + + for (i = 0; i < sc->num_slots; i++) + sdhci_init(&sc->slots[i]); + return (bus_generic_resume(dev)); +} + +static int +sdhci_update_ios(device_t brdev, device_t reqdev) +{ + struct sdhci_slot *slot = device_get_ivars(reqdev); + struct mmc_ios *ios = &slot->host.ios; + + SDHCI_LOCK(slot); + /* Do full reset on bus power down to clear from any state. */ + if (ios->power_mode == power_off) { + WR4(slot, SDHCI_SIGNAL_ENABLE, 0); + sdhci_init(slot); + } + /* Configure the bus. */ + sdhci_set_clock(slot, ios->clock); + sdhci_set_power(slot, (ios->power_mode == power_off)?0:ios->vdd); + if (ios->bus_width == bus_width_4) + slot->hostctrl |= SDHCI_CTRL_4BITBUS; + else + slot->hostctrl &= ~SDHCI_CTRL_4BITBUS; + if (ios->timing == bus_timing_hs) + slot->hostctrl |= SDHCI_CTRL_HISPD; + else + slot->hostctrl &= ~SDHCI_CTRL_HISPD; + WR1(slot, SDHCI_HOST_CONTROL, slot->hostctrl); + /* Some controllers like reset after bus changes. */ + if(slot->sc->quirks & SDHCI_QUIRK_RESET_ON_IOS) + sdhci_reset(slot, SDHCI_RESET_CMD | SDHCI_RESET_DATA); + + SDHCI_UNLOCK(slot); + return (0); +} + +static void +sdhci_set_transfer_mode(struct sdhci_slot *slot, + struct mmc_data *data) +{ + uint16_t mode; + + if (data == NULL) + return; + + mode = SDHCI_TRNS_BLK_CNT_EN; + if (data->len > 512) + mode |= SDHCI_TRNS_MULTI; + if (data->flags & MMC_DATA_READ) + mode |= SDHCI_TRNS_READ; + if (slot->req->stop) + mode |= SDHCI_TRNS_ACMD12; + if (slot->flags & SDHCI_USE_DMA) + mode |= SDHCI_TRNS_DMA; + + WR2(slot, SDHCI_TRANSFER_MODE, mode); +} + +static void +sdhci_start_command(struct sdhci_slot *slot, struct mmc_command *cmd) +{ + struct mmc_request *req = slot->req; + int flags, timeout; + uint32_t mask, state; + + slot->curcmd = cmd; + slot->cmd_done = 0; + + cmd->error = MMC_ERR_NONE; + + /* This flags combination is not supported by controller. */ + if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) { + slot_printf(slot, "Unsupported response type!\n"); + cmd->error = MMC_ERR_FAILED; + slot->req = NULL; + slot->curcmd = NULL; + req->done(req); + return; + } + + /* Read controller present state. */ + state = RD4(slot, SDHCI_PRESENT_STATE); + /* Do not issue command if there is no card, clock or power. + * Controller will not detect timeout without clock active. */ + if ((state & SDHCI_CARD_PRESENT) == 0 || + slot->power == 0 || + slot->clock == 0) { + cmd->error = MMC_ERR_FAILED; + slot->req = NULL; + slot->curcmd = NULL; + req->done(req); + return; + } + /* Always wait for free CMD bus. */ + mask = SDHCI_CMD_INHIBIT; + /* Wait for free DAT if we have data or busy signal. */ + if (cmd->data || (cmd->flags & MMC_RSP_BUSY)) + mask |= SDHCI_DAT_INHIBIT; + /* We shouldn't wait for DAT for stop commands. */ + if (cmd == slot->req->stop) + mask &= ~SDHCI_DAT_INHIBIT; + /* Wait for bus no more then 10 ms. */ + timeout = 10; + while (state & mask) { + if (timeout == 0) { + slot_printf(slot, "Controller never released " + "inhibit bit(s).\n"); + sdhci_dumpregs(slot); + cmd->error = MMC_ERR_FAILED; + slot->req = NULL; + slot->curcmd = NULL; + req->done(req); + return; + } + timeout--; + DELAY(1000); + state = RD4(slot, SDHCI_PRESENT_STATE); + } + + /* Prepare command flags. */ + if (!(cmd->flags & MMC_RSP_PRESENT)) + flags = SDHCI_CMD_RESP_NONE; + else if (cmd->flags & MMC_RSP_136) + flags = SDHCI_CMD_RESP_LONG; + else if (cmd->flags & MMC_RSP_BUSY) + flags = SDHCI_CMD_RESP_SHORT_BUSY; + else + flags = SDHCI_CMD_RESP_SHORT; + if (cmd->flags & MMC_RSP_CRC) + flags |= SDHCI_CMD_CRC; + if (cmd->flags & MMC_RSP_OPCODE) + flags |= SDHCI_CMD_INDEX; + if (cmd->data) + flags |= SDHCI_CMD_DATA; + if (cmd->opcode == MMC_STOP_TRANSMISSION) + flags |= SDHCI_CMD_TYPE_ABORT; + /* Prepare data. */ + sdhci_start_data(slot, cmd->data); + /* + * Interrupt aggregation: To reduce total number of interrupts + * group response interrupt with data interrupt when possible. + * If there going to be data interrupt, mask response one. + */ + if (slot->data_done == 0) { + WR4(slot, SDHCI_SIGNAL_ENABLE, + slot->intmask &= ~SDHCI_INT_RESPONSE); + } + /* Set command argument. */ + WR4(slot, SDHCI_ARGUMENT, cmd->arg); + /* Set data transfer mode. */ + sdhci_set_transfer_mode(slot, cmd->data); + /* Set command flags. */ + WR1(slot, SDHCI_COMMAND_FLAGS, flags); + /* Start command. */ + WR1(slot, SDHCI_COMMAND, cmd->opcode); +} + +static void +sdhci_finish_command(struct sdhci_slot *slot) +{ + int i; + + slot->cmd_done = 1; + /* Interrupt aggregation: Restore command interrupt. + * Main restore point for the case when command interrupt + * happened first. */ + WR4(slot, SDHCI_SIGNAL_ENABLE, slot->intmask |= SDHCI_INT_RESPONSE); + /* In case of error - reset host and return. */ + if (slot->curcmd->error) { + sdhci_reset(slot, SDHCI_RESET_CMD); + sdhci_reset(slot, SDHCI_RESET_DATA); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 20:37:07 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EFE8106566C; Mon, 5 Jan 2009 20:37:07 +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 6C8148FC21; Mon, 5 Jan 2009 20:37:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Kb7ac010254; Mon, 5 Jan 2009 20:37:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05Kb7pC010250; Mon, 5 Jan 2009 20:37:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901052037.n05Kb7pC010250@svn.freebsd.org> From: Alexander Motin Date: Mon, 5 Jan 2009 20:37:07 +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: r186792 - in stable/7/sys: conf modules modules/sdhci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:37:08 -0000 Author: mav Date: Mon Jan 5 20:37:07 2009 New Revision: 186792 URL: http://svn.freebsd.org/changeset/base/186792 Log: MFC rev. 184138. Add mmc, mmcsd and sdhci modules to the build. Added: stable/7/sys/modules/sdhci/ stable/7/sys/modules/sdhci/Makefile (contents, props changed) Modified: stable/7/sys/conf/NOTES stable/7/sys/conf/files stable/7/sys/modules/Makefile Modified: stable/7/sys/conf/NOTES ============================================================================== --- stable/7/sys/conf/NOTES Mon Jan 5 20:29:01 2009 (r186791) +++ stable/7/sys/conf/NOTES Mon Jan 5 20:37:07 2009 (r186792) @@ -2238,10 +2238,13 @@ device cardbus # # MMC/SD # -# mmc: mmc bus -# mmcsd: mmc memory and sd cards. -#device mmc -#device mmcsd +# mmc MMC/SD bus +# mmcsd MMC/SD memory card +# sdhci Generic PCI SD Host Controller +# +device mmc +device mmcsd +device sdhci # # SMB bus Modified: stable/7/sys/conf/files ============================================================================== --- stable/7/sys/conf/files Mon Jan 5 20:29:01 2009 (r186791) +++ stable/7/sys/conf/files Mon Jan 5 20:37:07 2009 (r186792) @@ -935,6 +935,7 @@ dev/scc/scc_dev_sab82532.c optional scc dev/scc/scc_dev_z8530.c optional scc dev/scd/scd.c optional scd isa dev/scd/scd_isa.c optional scd isa +dev/sdhci/sdhci.c optional sdhci pci dev/sf/if_sf.c optional sf pci dev/si/si.c optional si dev/si/si2_z280.c optional si Modified: stable/7/sys/modules/Makefile ============================================================================== --- stable/7/sys/modules/Makefile Mon Jan 5 20:29:01 2009 (r186791) +++ stable/7/sys/modules/Makefile Mon Jan 5 20:37:07 2009 (r186792) @@ -180,6 +180,8 @@ SUBDIR= ${_3dfx} \ mii \ mlx \ ${_mly} \ + mmc \ + mmcsd \ mpt \ mqueue \ msdosfs \ @@ -246,6 +248,7 @@ SUBDIR= ${_3dfx} \ scc \ scd \ ${_scsi_low} \ + sdhci \ sem \ sf \ ${_sio} \ Added: stable/7/sys/modules/sdhci/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/modules/sdhci/Makefile Mon Jan 5 20:37:07 2009 (r186792) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/sdhci + +KMOD= sdhci +SRCS= sdhci.c sdhci.h device_if.h bus_if.h pci_if.h mmcbr_if.h + +.include From owner-svn-src-stable@FreeBSD.ORG Mon Jan 5 20:55:56 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B034D10656BF; Mon, 5 Jan 2009 20:55:56 +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 9CE988FC13; Mon, 5 Jan 2009 20:55:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Ktu6M010925; Mon, 5 Jan 2009 20:55:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05KtumJ010922; Mon, 5 Jan 2009 20:55:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901052055.n05KtumJ010922@svn.freebsd.org> From: Alexander Motin Date: Mon, 5 Jan 2009 20:55:56 +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: r186794 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:55:57 -0000 Author: mav Date: Mon Jan 5 20:55:56 2009 New Revision: 186794 URL: http://svn.freebsd.org/changeset/base/186794 Log: MFC mmc, mmcsd and sdhci man pages. Added: stable/7/share/man/man4/sdhci.4 - copied unchanged from r184156, head/share/man/man4/sdhci.4 Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/igb.4 (props changed) stable/7/share/man/man4/mmc.4 stable/7/share/man/man4/mmcsd.4 Modified: stable/7/share/man/man4/mmc.4 ============================================================================== --- stable/7/share/man/man4/mmc.4 Mon Jan 5 20:46:46 2009 (r186793) +++ stable/7/share/man/man4/mmc.4 Mon Jan 5 20:55:56 2009 (r186794) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 26, 2007 +.Dd October 8, 2008 .Dt MMC 4 .Os .Sh NAME @@ -48,7 +48,8 @@ MultiMediaCards exist only in memory. SD Cards exist as memory, I/O, or combination cards. .Sh SEE ALSO .Xr mmcsd 4 , -.Xr at91_mci 4 +.Xr at91_mci 4 , +.Xr sdhci 4 .Rs .%T "SD Specifications, Part 1, Physical Layer, Simplified Specification" .Re @@ -56,6 +57,4 @@ SD Cards exist as memory, I/O, or combin .%T "The MultiMediaCard System Specification" .Re .Sh BUGS -Memory MultMediaCards do not currently work. SDIO cards currently do not work. -SDHC cards currently do not work. Modified: stable/7/share/man/man4/mmcsd.4 ============================================================================== --- stable/7/share/man/man4/mmcsd.4 Mon Jan 5 20:46:46 2009 (r186793) +++ stable/7/share/man/man4/mmcsd.4 Mon Jan 5 20:55:56 2009 (r186794) @@ -24,28 +24,25 @@ .\" .\" $FreeBSD$ .\" -.Dd May 26, 2007 +.Dd October 22, 2008 .Dt MMCSD 4 .Os .Sh NAME .Nm mmcsd -.Nd MMC and SD card driver. +.Nd MMC and SD memory card driver. .Sh SYNOPSIS .Cd device mmcsd .Sh DESCRIPTION The .Nm -driver implements the MMC and SD memory cards. +driver implements direct access block device for MMC and SD memory cards. .Sh SEE ALSO .Xr mmc 4 , -.Xr at91_mci 4 +.Xr at91_mci 4 , +.Xr sdhci 4 .Rs .%T "SD Specifications, Part 1, Physical Layer, Simplified Specification" .Re .Rs .%T "The MultiMediaCard System Specification" .Re -.Sh BUGS -Memory MultMediaCards do not currently work. -SDIO cards currently do not work. -SDHC cards currently do not work. Copied: stable/7/share/man/man4/sdhci.4 (from r184156, head/share/man/man4/sdhci.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/man/man4/sdhci.4 Mon Jan 5 20:55:56 2009 (r186794, copy of r184156, head/share/man/man4/sdhci.4) @@ -0,0 +1,52 @@ +.\" +.\" Copyright (c) 2008 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. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" 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 October 22, 2008 +.Dt SDHCI 4 +.Os +.Sh NAME +.Nm sdhci +.Nd PCI SD Host Controller bridge driver +.Sh SYNOPSIS +.Cd device mmc +.Cd device mmcsd +.Cd device sdhci +.Sh DESCRIPTION +The +.Nm +driver supports PCI devices with class 8 and subclass 5 according to +SD Host Controller Specification. +Driver supports up to six high speed 4bit MMC/SD slots per controller. +Driver attaches mmc bus to the respective slot on card insertion and +detaches it on card removing. +.Sh SEE ALSO +.Xr mmc 4 , +.Xr mmcsd 4 +.Rs +.%T "SD Specifications, Part 2, SD Host Controller, Simplified Specification" +.Re +.Sh AUTHORS +.An Alexander Motin Aq mav@FreeBSD.org . From owner-svn-src-stable@FreeBSD.ORG Tue Jan 6 00:20:11 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A19731065678; Tue, 6 Jan 2009 00:20:11 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E50E8FC1B; Tue, 6 Jan 2009 00:20:11 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n060KBLC016318; Tue, 6 Jan 2009 00:20:11 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n060KBUe016317; Tue, 6 Jan 2009 00:20:11 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901060020.n060KBUe016317@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 00:20:11 +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: r186802 - in stable/7/usr.sbin/ntp: . doc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 00:20:12 -0000 Author: danger (doc committer) Date: Tue Jan 6 00:20:11 2009 New Revision: 186802 URL: http://svn.freebsd.org/changeset/base/186802 Log: MFC r185072: - fix typo PR: docs/128973 Submitted by: tabthorpe Approved by: roberto Modified: stable/7/usr.sbin/ntp/ (props changed) stable/7/usr.sbin/ntp/doc/ntp-keygen.8 Modified: stable/7/usr.sbin/ntp/doc/ntp-keygen.8 ============================================================================== --- stable/7/usr.sbin/ntp/doc/ntp-keygen.8 Tue Jan 6 00:11:18 2009 (r186801) +++ stable/7/usr.sbin/ntp/doc/ntp-keygen.8 Tue Jan 6 00:20:11 2009 (r186802) @@ -126,7 +126,7 @@ The safest way to run the program is logged in directly as root. The recommended procedure is change to the keys directory, usually -.Pa /ust/local/etc , +.Pa /usr/local/etc , then run the program. When run for the first time, or if all From owner-svn-src-stable@FreeBSD.ORG Tue Jan 6 00:30:24 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE3A9106564A; Tue, 6 Jan 2009 00:30:24 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CFE08FC1E; Tue, 6 Jan 2009 00:30:24 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n060UO9x016566; Tue, 6 Jan 2009 00:30:24 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n060UOCe016565; Tue, 6 Jan 2009 00:30:24 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901060030.n060UOCe016565@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 00:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186803 - in stable/6/usr.sbin/ntp: . doc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 00:30:25 -0000 Author: danger (doc committer) Date: Tue Jan 6 00:30:24 2009 New Revision: 186803 URL: http://svn.freebsd.org/changeset/base/186803 Log: MFC r185072: - fix typo PR: docs/128973 Submitted by: tabthorpe Approved by: roberto Modified: stable/6/usr.sbin/ntp/ (props changed) stable/6/usr.sbin/ntp/doc/ (props changed) stable/6/usr.sbin/ntp/doc/ntp-keygen.8 Modified: stable/6/usr.sbin/ntp/doc/ntp-keygen.8 ============================================================================== --- stable/6/usr.sbin/ntp/doc/ntp-keygen.8 Tue Jan 6 00:20:11 2009 (r186802) +++ stable/6/usr.sbin/ntp/doc/ntp-keygen.8 Tue Jan 6 00:30:24 2009 (r186803) @@ -123,7 +123,7 @@ The safest way to run the program is logged in directly as root. The recommended procedure is change to the keys directory, usually -.Pa /ust/local/etc , +.Pa /usr/local/etc , then run the program. When run for the first time, or if all .Cm ntpkey From owner-svn-src-stable@FreeBSD.ORG Tue Jan 6 12:10:23 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8A1C106588E; Tue, 6 Jan 2009 12:10:23 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBECB8FC18; Tue, 6 Jan 2009 12:10:23 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06CANiK030155; Tue, 6 Jan 2009 12:10:23 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06CANMM030154; Tue, 6 Jan 2009 12:10:23 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901061210.n06CANMM030154@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 12:10:23 +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: r186811 - in stable/7/lib/libc: . string sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 12:10:26 -0000 Author: danger (doc committer) Date: Tue Jan 6 12:10:23 2009 New Revision: 186811 URL: http://svn.freebsd.org/changeset/base/186811 Log: MFC r180534: - Update the definition of modspecific structure PR: docs/125630 Submitted by: Mateusz Guzik Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/string/ffsll.c (props changed) stable/7/lib/libc/string/flsll.c (props changed) stable/7/lib/libc/sys/modstat.2 Modified: stable/7/lib/libc/sys/modstat.2 ============================================================================== --- stable/7/lib/libc/sys/modstat.2 Tue Jan 6 11:11:58 2009 (r186810) +++ stable/7/lib/libc/sys/modstat.2 Tue Jan 6 12:10:23 2009 (r186811) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 13, 2007 +.Dd July 15, 2008 .Dt MODSTAT 2 .Os .Sh NAME @@ -55,9 +55,9 @@ struct module_stat { }; typedef union modspecific { int intval; - u_int u_intval; + u_int uintval; long longval; - u_long u_longval; + u_long ulongval; } modspecific_t; .Ed .Pp From owner-svn-src-stable@FreeBSD.ORG Tue Jan 6 12:12:39 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF6511065672; Tue, 6 Jan 2009 12:12:39 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA108FC12; Tue, 6 Jan 2009 12:12:39 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06CCdRa030278; Tue, 6 Jan 2009 12:12:39 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06CCdYg030277; Tue, 6 Jan 2009 12:12:39 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901061212.n06CCdYg030277@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 12:12:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186812 - in stable/6/lib/libc: . inet sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 12:12:40 -0000 Author: danger (doc committer) Date: Tue Jan 6 12:12:39 2009 New Revision: 186812 URL: http://svn.freebsd.org/changeset/base/186812 Log: MFC r180534: - Update the definition of modspecific structure PR: docs/125630 Submitted by: Mateusz Guzik Modified: stable/6/lib/libc/ (props changed) stable/6/lib/libc/inet/inet_net_pton.c (props changed) stable/6/lib/libc/sys/ (props changed) stable/6/lib/libc/sys/modstat.2 Modified: stable/6/lib/libc/sys/modstat.2 ============================================================================== --- stable/6/lib/libc/sys/modstat.2 Tue Jan 6 12:10:23 2009 (r186811) +++ stable/6/lib/libc/sys/modstat.2 Tue Jan 6 12:12:39 2009 (r186812) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 13, 2007 +.Dd July 15, 2008 .Dt MODSTAT 2 .Os .Sh NAME @@ -55,9 +55,9 @@ struct module_stat { }; typedef union modspecific { int intval; - u_int u_intval; + u_int uintval; long longval; - u_long u_longval; + u_long ulongval; } modspecific_t; .Ed .Pp From owner-svn-src-stable@FreeBSD.ORG Tue Jan 6 12:39:28 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 751FE1065676; Tue, 6 Jan 2009 12:39:28 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6201B8FC12; Tue, 6 Jan 2009 12:39:28 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06CdS1O031071; Tue, 6 Jan 2009 12:39:28 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06CdSJC031069; Tue, 6 Jan 2009 12:39:28 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901061239.n06CdSJC031069@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 12:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186816 - in stable/6/usr.sbin/wpa: . wpa_supplicant X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 12:39:29 -0000 Author: danger (doc committer) Date: Tue Jan 6 12:39:28 2009 New Revision: 186816 URL: http://svn.freebsd.org/changeset/base/186816 Log: MFC r180158: - install the example wpa_supplicant.conf file to the share/examples/etc directory [1] - add the FILES section to the wpa_supplicant.conf.5 file, so that people will be able to detect the example configuration file easier. [2] PR: docs/121821 [2] Submitted by: edwin [2] Approved by: brooks [1] Modified: stable/6/usr.sbin/wpa/ (props changed) stable/6/usr.sbin/wpa/wpa_supplicant/Makefile stable/6/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Modified: stable/6/usr.sbin/wpa/wpa_supplicant/Makefile ============================================================================== --- stable/6/usr.sbin/wpa/wpa_supplicant/Makefile Tue Jan 6 12:23:19 2009 (r186815) +++ stable/6/usr.sbin/wpa/wpa_supplicant/Makefile Tue Jan 6 12:39:28 2009 (r186816) @@ -11,6 +11,11 @@ SRCS= config.c eloop.c common.c md5.c rc MAN= wpa_supplicant.8 wpa_supplicant.conf.5 +.if ${MK_EXAMPLES} != "no" +FILESDIR= ${SHAREDIR}/examples/etc +FILES= wpa_supplicant.conf +.endif + CFLAGS+= -I${.CURDIR} -I${WPA_SUPPLICANT_DISTDIR} CFLAGS+= -DCONFIG_DRIVER_BSD CFLAGS+= -DCONFIG_DRIVER_NDIS Modified: stable/6/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 ============================================================================== --- stable/6/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Tue Jan 6 12:23:19 2009 (r186815) +++ stable/6/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Tue Jan 6 12:39:28 2009 (r186816) @@ -514,6 +514,11 @@ network={ wep_key0=42FEEDDEAFBABEDEAFBEEFAA55 } .Ed +.Sh FILES +.Bl -tag -width ".Pa /usr/share/examples/etc/wpa_supplicant.conf" -compact +.It Pa /etc/wpa_supplicant.conf +.It Pa /usr/share/examples/etc/wpa_supplicant.conf +.El .Sh SEE ALSO .Xr wpa_cli 8 , .Xr wpa_passphrase 8 , From owner-svn-src-stable@FreeBSD.ORG Tue Jan 6 13:09:19 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAE211065670; Tue, 6 Jan 2009 13:09:19 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C85678FC08; Tue, 6 Jan 2009 13:09:19 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06D9JU8031796; Tue, 6 Jan 2009 13:09:19 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06D9J0D031795; Tue, 6 Jan 2009 13:09:19 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901061309.n06D9J0D031795@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 13:09:19 +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: r186818 - in stable/7/lib/libc: . net string X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 13:09:20 -0000 Author: danger (doc committer) Date: Tue Jan 6 13:09:19 2009 New Revision: 186818 URL: http://svn.freebsd.org/changeset/base/186818 Log: MFC r180162: - AI_ALL and AI_V4MAPPED flags are currently not supported PR: docs/120248 Submitted by: Heiko Wundram Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/net/getaddrinfo.3 stable/7/lib/libc/string/ffsll.c (props changed) stable/7/lib/libc/string/flsll.c (props changed) Modified: stable/7/lib/libc/net/getaddrinfo.3 ============================================================================== --- stable/7/lib/libc/net/getaddrinfo.3 Tue Jan 6 13:05:58 2009 (r186817) +++ stable/7/lib/libc/net/getaddrinfo.3 Tue Jan 6 13:09:19 2009 (r186818) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 6, 2007 +.Dd July 1, 2008 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -237,6 +237,11 @@ flag shall be ignored unless .Fa ai_family equals .Dv AF_INET6 . +Note: this flag is currently +.Em not +supported, see the +.Sx BUGS +section. .El .El .Pp @@ -485,6 +490,18 @@ freeaddrinfo(res0); .%B "Proceedings of the freenix track: 2000 USENIX annual technical conference" .%D June 2000 .Re +.Sh BUGS +The +.Nm +function as implemented in +.Fx +currently does not support +.Dv AI_ALL +and +.Dv AI_V4MAPPED +flags and returns +.Dv EAI_BADFLAGS +if one of them is specified. .Sh STANDARDS The .Fn getaddrinfo From owner-svn-src-stable@FreeBSD.ORG Tue Jan 6 13:12:26 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE84C106566C; Tue, 6 Jan 2009 13:12:26 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBCA08FC13; Tue, 6 Jan 2009 13:12:26 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06DCQGZ031965; Tue, 6 Jan 2009 13:12:26 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06DCQuj031964; Tue, 6 Jan 2009 13:12:26 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901061312.n06DCQuj031964@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 13:12:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186820 - in stable/6/lib/libc: . inet net sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 13:12:27 -0000 Author: danger (doc committer) Date: Tue Jan 6 13:12:26 2009 New Revision: 186820 URL: http://svn.freebsd.org/changeset/base/186820 Log: MFC r180162: - AI_ALL and AI_V4MAPPED flags are currently not supported PR: docs/120248 Submitted by: Heiko Wundram Modified: stable/6/lib/libc/ (props changed) stable/6/lib/libc/inet/inet_net_pton.c (props changed) stable/6/lib/libc/net/getaddrinfo.3 stable/6/lib/libc/sys/ (props changed) Modified: stable/6/lib/libc/net/getaddrinfo.3 ============================================================================== --- stable/6/lib/libc/net/getaddrinfo.3 Tue Jan 6 13:10:15 2009 (r186819) +++ stable/6/lib/libc/net/getaddrinfo.3 Tue Jan 6 13:12:26 2009 (r186820) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 6, 2007 +.Dd July 1, 2008 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -237,6 +237,11 @@ flag shall be ignored unless .Fa ai_family equals .Dv AF_INET6 . +Note: this flag is currently +.Em not +supported, see the +.Sx BUGS +section. .El .El .Pp @@ -485,6 +490,18 @@ freeaddrinfo(res0); .%B "Proceedings of the freenix track: 2000 USENIX annual technical conference" .%D June 2000 .Re +.Sh BUGS +The +.Nm +function as implemented in +.Fx +currently does not support +.Dv AI_ALL +and +.Dv AI_V4MAPPED +flags and returns +.Dv EAI_BADFLAGS +if one of them is specified. .Sh STANDARDS The .Fn getaddrinfo From owner-svn-src-stable@FreeBSD.ORG Tue Jan 6 15:18:14 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FA931065670; Tue, 6 Jan 2009 15:18:14 +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 8CA218FC14; Tue, 6 Jan 2009 15:18:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06FIEZs034756; Tue, 6 Jan 2009 15:18:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06FIE6S034755; Tue, 6 Jan 2009 15:18:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901061518.n06FIE6S034755@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 6 Jan 2009 15:18:14 +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: r186830 - in stable/7/sys: . contrib/pf dev/cxgb pci sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 15:18:15 -0000 Author: kib Date: Tue Jan 6 15:18:14 2009 New Revision: 186830 URL: http://svn.freebsd.org/changeset/base/186830 Log: MFC r186433: Clear busy state on the pages which are after the one that failed the bind attempt. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/pci/agp.c stable/7/sys/sys/copyright.h (props changed) Modified: stable/7/sys/pci/agp.c ============================================================================== --- stable/7/sys/pci/agp.c Tue Jan 6 15:10:26 2009 (r186829) +++ stable/7/sys/pci/agp.c Tue Jan 6 15:18:14 2009 (r186830) @@ -563,6 +563,7 @@ agp_generic_bind_memory(device_t dev, st device_printf(dev, "memory already bound\n"); error = EINVAL; VM_OBJECT_LOCK(mem->am_obj); + i = 0; goto bad; } @@ -591,7 +592,6 @@ agp_generic_bind_memory(device_t dev, st * Bail out. Reverse all the mappings * and unwire the pages. */ - vm_page_wakeup(m); for (k = 0; k < i + j; k += AGP_PAGE_SIZE) AGP_UNBIND_PAGE(dev, offset + k); goto bad; @@ -621,8 +621,10 @@ agp_generic_bind_memory(device_t dev, st bad: mtx_unlock(&sc->as_lock); VM_OBJECT_LOCK_ASSERT(mem->am_obj, MA_OWNED); - for (i = 0; i < mem->am_size; i += PAGE_SIZE) { - m = vm_page_lookup(mem->am_obj, OFF_TO_IDX(i)); + for (k = 0; k < mem->am_size; k += PAGE_SIZE) { + m = vm_page_lookup(mem->am_obj, OFF_TO_IDX(k)); + if (k >= i) + vm_page_wakeup(m); vm_page_lock_queues(); vm_page_unwire(m, 0); vm_page_unlock_queues(); From owner-svn-src-stable@FreeBSD.ORG Tue Jan 6 17:05:44 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4FED106566B; Tue, 6 Jan 2009 17:05:44 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A85578FC14; Tue, 6 Jan 2009 17:05:44 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06H5ioN036936; Tue, 6 Jan 2009 17:05:44 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06H5i3F036935; Tue, 6 Jan 2009 17:05:44 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200901061705.n06H5i3F036935@svn.freebsd.org> From: Robert Noland Date: Tue, 6 Jan 2009 17:05:44 +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: r186832 - in stable/7/sys: . contrib/pf dev/cxgb pci sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 17:05:46 -0000 Author: rnoland Date: Tue Jan 6 17:05:44 2009 New Revision: 186832 URL: http://svn.freebsd.org/changeset/base/186832 Log: MFC r186434 Fix up handling of Intel G4X chips some more. Note that you need at least xf86-video-intel 2.4.3 for this to work. The G4X doesn't put the GATT into the same area of stolen memory as all the other chips and older versions of the driver didn't handle that properly. Approved by: kib Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/pci/agp_i810.c stable/7/sys/sys/copyright.h (props changed) Modified: stable/7/sys/pci/agp_i810.c ============================================================================== --- stable/7/sys/pci/agp_i810.c Tue Jan 6 16:24:22 2009 (r186831) +++ stable/7/sys/pci/agp_i810.c Tue Jan 6 17:05:44 2009 (r186832) @@ -167,7 +167,7 @@ static const struct agp_i810_match { "Intel GM965 SVGA controller"}, {0x2A128086, CHIP_I965, 0x00020000, "Intel GME965 SVGA controller"}, - {0x2A428086, CHIP_I965, 0x00020000, + {0x2A428086, CHIP_G4X, 0x00020000, "Intel GM45 SVGA controller"}, {0x2E028086, CHIP_G4X, 0x00020000, "Intel 4 Series SVGA controller"}, @@ -284,6 +284,7 @@ agp_i810_probe(device_t dev) case CHIP_I915: case CHIP_I965: case CHIP_G33: + case CHIP_G4X: deven = pci_read_config(bdev, AGP_I915_DEVEN, 4); if ((deven & AGP_I915_DEVEN_D2F0) == AGP_I915_DEVEN_D2F0_DISABLED) { @@ -348,6 +349,7 @@ agp_i810_dump_regs(device_t dev) case CHIP_I915: case CHIP_I965: case CHIP_G33: + case CHIP_G4X: device_printf(dev, "AGP_I855_GCC1: 0x%02x\n", pci_read_config(sc->bdev, AGP_I855_GCC1, 1)); device_printf(dev, "AGP_I915_MSAC: 0x%02x\n", @@ -397,7 +399,7 @@ agp_i810_attach(device_t dev) return error; if (sc->chiptype != CHIP_I965 && sc->chiptype != CHIP_G33 && - ptoa((vm_paddr_t)Maxmem) > 0xfffffffful) + sc->chiptype != CHIP_G4X && ptoa((vm_paddr_t)Maxmem) > 0xfffffffful) { device_printf(dev, "agp_i810.c does not support physical " "memory above 4GB.\n"); @@ -659,8 +661,7 @@ agp_i810_attach(device_t dev) return EINVAL; } - if (sc->chiptype != CHIP_G4X) - gtt_size += 4; + gtt_size += 4; sc->stolen = (stolen - gtt_size) * 1024 / 4096; if (sc->stolen > 0) @@ -780,6 +781,7 @@ agp_i810_set_aperture(device_t dev, u_in case CHIP_I915: case CHIP_I965: case CHIP_G33: + case CHIP_G4X: return agp_generic_set_aperture(dev, aperture); } @@ -798,7 +800,8 @@ agp_i810_write_gtt_entry(device_t dev, i u_int32_t pte; pte = (u_int32_t)physical | 1; - if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33) { + if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_G4X) { pte |= (physical & 0x0000000f00000000ull) >> 28; } else { /* If we do actually have memory above 4GB on an older system, @@ -825,6 +828,10 @@ agp_i810_write_gtt_entry(device_t dev, i bus_write_4(sc->sc_res[0], (offset >> AGP_PAGE_SHIFT) * 4 + (512 * 1024), pte); break; + case CHIP_G4X: + bus_write_4(sc->sc_res[0], + (offset >> AGP_PAGE_SHIFT) * 4 + (2 * 1024 * 1024), pte); + break; } } From owner-svn-src-stable@FreeBSD.ORG Tue Jan 6 20:19:51 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9789D1065673; Tue, 6 Jan 2009 20:19:51 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84E108FC0C; Tue, 6 Jan 2009 20:19:51 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06KJo70041003; Tue, 6 Jan 2009 20:19:50 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06KJoDL041002; Tue, 6 Jan 2009 20:19:50 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200901062019.n06KJoDL041002@svn.freebsd.org> From: Christian Brueffer Date: Tue, 6 Jan 2009 20:19:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186838 - stable/6/usr.sbin/wpa/wpa_supplicant X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 20:19:52 -0000 Author: brueffer Date: Tue Jan 6 20:19:49 2009 New Revision: 186838 URL: http://svn.freebsd.org/changeset/base/186838 Log: Unbreak build by fixing the conditional. Approved by: bz Pointy Hat To: danger Modified: stable/6/usr.sbin/wpa/wpa_supplicant/Makefile Modified: stable/6/usr.sbin/wpa/wpa_supplicant/Makefile ============================================================================== --- stable/6/usr.sbin/wpa/wpa_supplicant/Makefile Tue Jan 6 19:52:40 2009 (r186837) +++ stable/6/usr.sbin/wpa/wpa_supplicant/Makefile Tue Jan 6 20:19:49 2009 (r186838) @@ -11,7 +11,7 @@ SRCS= config.c eloop.c common.c md5.c rc MAN= wpa_supplicant.8 wpa_supplicant.conf.5 -.if ${MK_EXAMPLES} != "no" +.if !defined(NO_SHARE) FILESDIR= ${SHAREDIR}/examples/etc FILES= wpa_supplicant.conf .endif From owner-svn-src-stable@FreeBSD.ORG Tue Jan 6 21:34:54 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41385106566B; Tue, 6 Jan 2009 21:34:54 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D1CD8FC16; Tue, 6 Jan 2009 21:34:54 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06LYrom042501; Tue, 6 Jan 2009 21:34:53 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06LYrKW042499; Tue, 6 Jan 2009 21:34:53 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <200901062134.n06LYrKW042499@svn.freebsd.org> From: Craig Rodrigues Date: Tue, 6 Jan 2009 21:34:53 +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: r186840 - in stable/7/sys: . contrib/pf dev/cxgb kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 21:34:55 -0000 Author: rodrigc Date: Tue Jan 6 21:34:53 2009 New Revision: 186840 URL: http://svn.freebsd.org/changeset/base/186840 Log: MFC 184700: Add DTrace probes for process execution. This covers cases tested by the DTrace test suite. Approved by: jb Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/kern_exec.c stable/7/sys/kern/vfs_syscalls.c stable/7/sys/sys/copyright.h (props changed) Modified: stable/7/sys/kern/kern_exec.c ============================================================================== --- stable/7/sys/kern/kern_exec.c Tue Jan 6 21:16:42 2009 (r186839) +++ stable/7/sys/kern/kern_exec.c Tue Jan 6 21:34:53 2009 (r186840) @@ -363,8 +363,6 @@ do_execve(td, args, mac_p) imgp->image_header = NULL; - SDT_PROBE(proc, kernel, , exec, args->fname, 0, 0, 0, 0 ); - /* * Translate the file name. namei() returns a vnode pointer * in ni_vp amoung other things. @@ -376,6 +374,8 @@ do_execve(td, args, mac_p) NDINIT(ndp, LOOKUP, ISOPEN | LOCKLEAF | FOLLOW | SAVENAME | MPSAFE | AUDITVNODE1, UIO_SYSSPACE, args->fname, td); + SDT_PROBE(proc, kernel, , exec, args->fname, 0, 0, 0, 0 ); + interpret: error = namei(ndp); if (error) @@ -749,6 +749,7 @@ interpret: vfs_mark_atime(imgp->vp, td); + SDT_PROBE(proc, kernel, , exec_success, args->fname, 0, 0, 0, 0); done1: /* * Free any resources malloc'd earlier that we didn't use. @@ -760,8 +761,6 @@ done1: crfree(newcred); VOP_UNLOCK(imgp->vp, 0, td); - SDT_PROBE(proc, kernel, , exec_success, args->fname, 0, 0, 0, 0); - /* * Handle deferred decrement of ref counts. */ Modified: stable/7/sys/kern/vfs_syscalls.c ============================================================================== --- stable/7/sys/kern/vfs_syscalls.c Tue Jan 6 21:16:42 2009 (r186839) +++ stable/7/sys/kern/vfs_syscalls.c Tue Jan 6 21:34:53 2009 (r186840) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" +#include "opt_kdtrace.h" #include "opt_ktrace.h" #include "opt_mac.h" @@ -58,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -82,6 +84,14 @@ __FBSDID("$FreeBSD$"); #include #include +SDT_PROVIDER_DEFINE(vfs); +SDT_PROBE_DEFINE(vfs, , stat, mode); +SDT_PROBE_ARGTYPE(vfs, , stat, mode, 0, "char *"); +SDT_PROBE_ARGTYPE(vfs, , stat, mode, 1, "int"); +SDT_PROBE_DEFINE(vfs, , stat, reg); +SDT_PROBE_ARGTYPE(vfs, , stat, reg, 0, "char *"); +SDT_PROBE_ARGTYPE(vfs, , stat, reg, 1, "int"); + static int chroot_refuse_vdir_fds(struct filedesc *fdp); static int getutimes(const struct timeval *, enum uio_seg, struct timespec *); static int setfown(struct thread *td, struct vnode *, uid_t, gid_t); @@ -2114,6 +2124,11 @@ kern_stat(struct thread *td, char *path, return (error); vfslocked = NDHASGIANT(&nd); error = vn_stat(nd.ni_vp, &sb, td->td_ucred, NOCRED, td); + if (!error) { + SDT_PROBE(vfs, , stat, mode, path, sb.st_mode, 0, 0, 0); + if (S_ISREG(sb.st_mode)) + SDT_PROBE(vfs, , stat, reg, path, pathseg, 0, 0, 0); + } NDFREE(&nd, NDF_ONLY_PNBUF); vput(nd.ni_vp); VFS_UNLOCK_GIANT(vfslocked); From owner-svn-src-stable@FreeBSD.ORG Tue Jan 6 23:05:28 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C89F51065686; Tue, 6 Jan 2009 23:05:28 +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 98E068FC13; Tue, 6 Jan 2009 23:05:28 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06N5SaT044357; Tue, 6 Jan 2009 23:05:28 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06N5SuT044356; Tue, 6 Jan 2009 23:05:28 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901062305.n06N5SuT044356@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 6 Jan 2009 23:05:28 +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: r186842 - in stable/7/sys: . contrib/pf dev/cxgb sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 23:05:31 -0000 Author: bz Date: Tue Jan 6 23:05:28 2009 New Revision: 186842 URL: http://svn.freebsd.org/changeset/base/186842 Log: Move mergeinfo for r186587 from sys/sys/copyright.h to sys/. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/sys/copyright.h (props changed) From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 11:04:58 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 564E71065670; Wed, 7 Jan 2009 11:04:58 +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 43D098FC17; Wed, 7 Jan 2009 11:04:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07B4vk6083827; Wed, 7 Jan 2009 11:04:57 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07B4vk7083826; Wed, 7 Jan 2009 11:04:57 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071104.n07B4vk7083826@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 11:04:57 +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: r186855 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 11:04:59 -0000 Author: mav Date: Wed Jan 7 11:04:57 2009 New Revision: 186855 URL: http://svn.freebsd.org/changeset/base/186855 Log: Partially MFC rev. 172658 to reduce diff. Sort. Modified: stable/7/share/man/man4/Makefile Modified: stable/7/share/man/man4/Makefile ============================================================================== --- stable/7/share/man/man4/Makefile Wed Jan 7 09:56:54 2009 (r186854) +++ stable/7/share/man/man4/Makefile Wed Jan 7 11:04:57 2009 (r186855) @@ -299,8 +299,8 @@ MAN= aac.4 \ sched_4bsd.4 \ sched_ule.4 \ screen.4 \ - sctp.4 \ scsi.4 \ + sctp.4 \ sem.4 \ ses.4 \ sf.4 \ @@ -330,8 +330,8 @@ MAN= aac.4 \ snd_gusc.4 \ snd_hda.4 \ snd_ich.4 \ - snd_maestro.4 \ snd_maestro3.4 \ + snd_maestro.4 \ snd_mss.4 \ snd_neomagic.4 \ snd_sbc.4 \ @@ -542,12 +542,12 @@ MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vpo.4 imm.4 MLINKS+=vr.4 if_vr.4 +MLINKS+=watchdog.4 SW_WATCHDOG.4 MLINKS+=wb.4 if_wb.4 MLINKS+=wi.4 if_wi.4 MLINKS+=${_wpi.4} ${_if_wpi.4} MLINKS+=xe.4 if_xe.4 MLINKS+=xl.4 if_xl.4 -MLINKS+=watchdog.4 SW_WATCHDOG.4 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" _acpi_dock.4= acpi_dock.4 @@ -563,13 +563,13 @@ _if_nxge.4= if_nxge.4 _if_wpi.4= if_wpi.4 _ipmi.4= ipmi.4 _k8temp.4= k8temp.4 -_nfsmb.4= nfsmb.4 _nfe.4= nfe.4 +_nfsmb.4= nfsmb.4 _nve.4= nve.4 _nxge.4= nxge.4 _rr232x.4= rr232x.4 -_spkr.4= spkr.4 _speaker.4= speaker.4 +_spkr.4= spkr.4 _wpi.4= wpi.4 .endif From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 11:19:18 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1EF8106564A; Wed, 7 Jan 2009 11:19:18 +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 9F5F78FC13; Wed, 7 Jan 2009 11:19:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07BJIxH084240; Wed, 7 Jan 2009 11:19:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07BJIPk084239; Wed, 7 Jan 2009 11:19:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071119.n07BJIPk084239@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 11:19:18 +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: r186856 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 11:19:19 -0000 Author: mav Date: Wed Jan 7 11:19:18 2009 New Revision: 186856 URL: http://svn.freebsd.org/changeset/base/186856 Log: MFC rev. 186855 Hook up sdhci man page to the build. Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/Makefile stable/7/share/man/man4/igb.4 (props changed) Modified: stable/7/share/man/man4/Makefile ============================================================================== --- stable/7/share/man/man4/Makefile Wed Jan 7 11:04:57 2009 (r186855) +++ stable/7/share/man/man4/Makefile Wed Jan 7 11:19:18 2009 (r186856) @@ -301,6 +301,7 @@ MAN= aac.4 \ screen.4 \ scsi.4 \ sctp.4 \ + sdhci.4 \ sem.4 \ ses.4 \ sf.4 \ From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 11:44:03 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B962510656F5; Wed, 7 Jan 2009 11:44:03 +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 A5B9E8FC18; Wed, 7 Jan 2009 11:44:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07Bi382084744; Wed, 7 Jan 2009 11:44:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07Bi3A3084743; Wed, 7 Jan 2009 11:44:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071144.n07Bi3A3084743@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 11:44:03 +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: r186857 - in stable/7/sys: . contrib/pf crypto/rc4 dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 11:44:04 -0000 Author: mav Date: Wed Jan 7 11:44:03 2009 New Revision: 186857 URL: http://svn.freebsd.org/changeset/base/186857 Log: MFC rev. 186179: Avoid 256 integer divisions per rc4_init() call. Replace it with using separate index variable. It gives more then double rc4_init() performance increase on tested i386 P4. It also gives about 15% speedup to PPTP VPN with stateless MPPE encryption (by ng_mppc) which calls rc4_init() for every packet. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/crypto/rc4/rc4.c stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/crypto/rc4/rc4.c ============================================================================== --- stable/7/sys/crypto/rc4/rc4.c Wed Jan 7 11:19:18 2009 (r186856) +++ stable/7/sys/crypto/rc4/rc4.c Wed Jan 7 11:44:03 2009 (r186857) @@ -61,7 +61,7 @@ void rc4_init(struct rc4_state *const state, const u_char *key, int keylen) { u_char j; - int i; + int i, k; /* Initialize state with identity permutation */ for (i = 0; i < 256; i++) @@ -70,9 +70,11 @@ rc4_init(struct rc4_state *const state, state->index2 = 0; /* Randomize the permutation using key data */ - for (j = i = 0; i < 256; i++) { - j += state->perm[i] + key[i % keylen]; + for (j = i = k = 0; i < 256; i++) { + j += state->perm[i] + key[k]; swap_bytes(&state->perm[i], &state->perm[j]); + if (++k >= keylen) + k = 0; } } From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 12:38:31 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CBEA1065678; Wed, 7 Jan 2009 12:38:31 +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 797698FC1A; Wed, 7 Jan 2009 12:38:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07CcV4a085920; Wed, 7 Jan 2009 12:38:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07CcVke085919; Wed, 7 Jan 2009 12:38:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071238.n07CcVke085919@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 12:38:31 +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: r186859 - in stable/7/sys: . contrib/pf dev/cxgb netgraph X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 12:38:32 -0000 Author: mav Date: Wed Jan 7 12:38:31 2009 New Revision: 186859 URL: http://svn.freebsd.org/changeset/base/186859 Log: MFC rev. 185723, 186189: Carefully handle memory errors to keep peers compression/encryption state consistent. There are some cases reported where peers fatally getting out of sync without any visible reason. I hope this solve the problem. Unroll two loops of SHA1Update(). 60 bytes of static memory is not a price. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netgraph/ng_mppc.c Modified: stable/7/sys/netgraph/ng_mppc.c ============================================================================== --- stable/7/sys/netgraph/ng_mppc.c Wed Jan 7 11:54:00 2009 (r186858) +++ stable/7/sys/netgraph/ng_mppc.c Wed Jan 7 12:38:31 2009 (r186859) @@ -492,17 +492,18 @@ ng_mppc_compress(node_p node, struct mbu /* Work with contiguous regions of memory. */ inlen = m->m_pkthdr.len; inbuf = malloc(inlen, M_NETGRAPH_MPPC, M_NOWAIT); - if (inbuf == NULL) { - m_freem(m); - return (ENOMEM); - } + if (inbuf == NULL) + goto err1; m_copydata(m, 0, inlen, (caddr_t)inbuf); outlen = MPPC_MAX_BLOWUP(inlen); outbuf = malloc(outlen, M_NETGRAPH_MPPC, M_NOWAIT); if (outbuf == NULL) { - m_freem(m); free(inbuf, M_NETGRAPH_MPPC); +err1: + m_freem(m); + MPPC_InitCompressionHistory(d->history); + d->flushed = 1; return (ENOMEM); } @@ -538,8 +539,13 @@ ng_mppc_compress(node_p node, struct mbu free(outbuf, M_NETGRAPH_MPPC); /* Check m_devget() result. */ - if (m == NULL) + if (m == NULL) { + if (!d->flushed) { + MPPC_InitCompressionHistory(d->history); + d->flushed = 1; + } return (ENOMEM); + } } #endif @@ -551,6 +557,18 @@ ng_mppc_compress(node_p node, struct mbu /* Set header bits */ header |= MPPC_FLAG_ENCRYPTED; + /* We must own the mbuf chain exclusively to modify it. */ + m = m_unshare(m, M_DONTWAIT); + if (m == NULL) { + if (!d->flushed) { +#ifdef NETGRAPH_MPPC_COMPRESSION + MPPC_InitCompressionHistory(d->history); +#endif + d->flushed = 1; + } + return (ENOMEM); + } + /* Update key if it's time */ if ((d->cfg.bits & MPPE_STATELESS) != 0 || (d->cc & MPPE_UPDATE_MASK) == MPPE_UPDATE_FLAG) { @@ -562,11 +580,6 @@ ng_mppc_compress(node_p node, struct mbu rc4_init(&d->rc4, d->key, KEYLEN(d->cfg.bits)); } - /* We must own the mbuf chain exclusively to modify it. */ - m = m_unshare(m, M_DONTWAIT); - if (m == NULL) - return (ENOMEM); - /* Encrypt packet */ m1 = m; while (m1) { @@ -811,21 +824,24 @@ ng_mppc_reset_req(node_p node) static void ng_mppc_getkey(const u_char *h, u_char *h2, int len) { - static const u_char pad1[10] = - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; - static const u_char pad2[10] = - { 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, }; + static const u_char pad1[40] = + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + static const u_char pad2[40] = + { 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2 }; u_char hash[20]; SHA1_CTX c; - int k; SHA1Init(&c); SHA1Update(&c, h, len); - for (k = 0; k < 4; k++) - SHA1Update(&c, pad1, sizeof(pad1)); + SHA1Update(&c, pad1, sizeof(pad1)); SHA1Update(&c, h2, len); - for (k = 0; k < 4; k++) - SHA1Update(&c, pad2, sizeof(pad2)); + SHA1Update(&c, pad2, sizeof(pad2)); SHA1Final(hash, &c); bcopy(hash, h2, len); } From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 12:44:03 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7643A1065675; Wed, 7 Jan 2009 12:44:03 +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 62DE68FC16; Wed, 7 Jan 2009 12:44:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07Ci3iH086091; Wed, 7 Jan 2009 12:44:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07Ci3RI086090; Wed, 7 Jan 2009 12:44:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901071244.n07Ci3RI086090@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Jan 2009 12:44:03 +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: r186860 - in stable/7/sys: . contrib/pf dev/cxgb kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 12:44:04 -0000 Author: kib Date: Wed Jan 7 12:44:03 2009 New Revision: 186860 URL: http://svn.freebsd.org/changeset/base/186860 Log: MFC r186600: In r185557, the check for existing negative entry for the given name did not compared nc_dvp with supplied parent directory vnode pointer. Add the check and note that now branches for vp != NULL and vp == NULL are the same, thus can be merged. Tested by: kensmith Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/vfs_cache.c Modified: stable/7/sys/kern/vfs_cache.c ============================================================================== --- stable/7/sys/kern/vfs_cache.c Wed Jan 7 12:38:31 2009 (r186859) +++ stable/7/sys/kern/vfs_cache.c Wed Jan 7 12:44:03 2009 (r186860) @@ -511,28 +511,18 @@ cache_enter(dvp, vp, cnp) CACHE_LOCK(); /* - * See if this vnode is already in the cache with this name. - * This can happen with concurrent lookups of the same path - * name. + * See if this vnode or negative entry is already in the cache + * with this name. This can happen with concurrent lookups of + * the same path name. */ - if (vp) { - TAILQ_FOREACH(n2, &vp->v_cache_dst, nc_dst) { - if (n2->nc_dvp == dvp && - n2->nc_nlen == cnp->cn_namelen && - !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { - CACHE_UNLOCK(); - cache_free(ncp); - return; - } - } - } else { - TAILQ_FOREACH(n2, &ncneg, nc_dst) { - if (n2->nc_nlen == cnp->cn_namelen && - !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { - CACHE_UNLOCK(); - cache_free(ncp); - return; - } + ncpp = NCHHASH(hash); + LIST_FOREACH(n2, ncpp, nc_hash) { + if (n2->nc_dvp == dvp && + n2->nc_nlen == cnp->cn_namelen && + !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { + CACHE_UNLOCK(); + cache_free(ncp); + return; } } @@ -550,7 +540,6 @@ cache_enter(dvp, vp, cnp) * Insert the new namecache entry into the appropriate chain * within the cache entries table. */ - ncpp = NCHHASH(hash); LIST_INSERT_HEAD(ncpp, ncp, nc_hash); if (LIST_EMPTY(&dvp->v_cache_src)) { hold = 1; From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 14:00:45 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22B2B1065672; Wed, 7 Jan 2009 14:00:45 +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 0FA288FC36; Wed, 7 Jan 2009 14:00:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07E0iTO087773; Wed, 7 Jan 2009 14:00:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07E0ikM087772; Wed, 7 Jan 2009 14:00:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901071400.n07E0ikM087772@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Jan 2009 14:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186861 - in stable/6/sys: . kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 14:00:47 -0000 Author: kib Date: Wed Jan 7 14:00:44 2009 New Revision: 186861 URL: http://svn.freebsd.org/changeset/base/186861 Log: MFC r186600: In r185557, the check for existing negative entry for the given name did not compared nc_dvp with supplied parent directory vnode pointer. Add the check and note that now branches for vp != NULL and vp == NULL are the same, thus can be merged. Modified: stable/6/sys/ (props changed) stable/6/sys/kern/vfs_cache.c Modified: stable/6/sys/kern/vfs_cache.c ============================================================================== --- stable/6/sys/kern/vfs_cache.c Wed Jan 7 12:44:03 2009 (r186860) +++ stable/6/sys/kern/vfs_cache.c Wed Jan 7 14:00:44 2009 (r186861) @@ -526,28 +526,18 @@ cache_enter(dvp, vp, cnp) CACHE_LOCK(); /* - * See if this vnode is already in the cache with this name. - * This can happen with concurrent lookups of the same path - * name. + * See if this vnode or negative entry is already in the cache + * with this name. This can happen with concurrent lookups of + * the same path name. */ - if (vp) { - TAILQ_FOREACH(n2, &vp->v_cache_dst, nc_dst) { - if (n2->nc_dvp == dvp && - n2->nc_nlen == cnp->cn_namelen && - !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { - CACHE_UNLOCK(); - cache_free(ncp); - return; - } - } - } else { - TAILQ_FOREACH(n2, &ncneg, nc_dst) { - if (n2->nc_nlen == cnp->cn_namelen && - !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { - CACHE_UNLOCK(); - cache_free(ncp); - return; - } + ncpp = NCHHASH(hash); + LIST_FOREACH(n2, ncpp, nc_hash) { + if (n2->nc_dvp == dvp && + n2->nc_nlen == cnp->cn_namelen && + !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { + CACHE_UNLOCK(); + cache_free(ncp); + return; } } @@ -565,7 +555,6 @@ cache_enter(dvp, vp, cnp) * Insert the new namecache entry into the appropriate chain * within the cache entries table. */ - ncpp = NCHHASH(hash); LIST_INSERT_HEAD(ncpp, ncp, nc_hash); if (LIST_EMPTY(&dvp->v_cache_src)) { hold = 1; From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 15:28:47 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 815EF1065670; Wed, 7 Jan 2009 15:28:47 +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 6D2B08FC1F; Wed, 7 Jan 2009 15:28:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07FSlk2090714; Wed, 7 Jan 2009 15:28:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07FSlXM090711; Wed, 7 Jan 2009 15:28:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071528.n07FSlXM090711@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 15:28:47 +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: r186862 - stable/7/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 15:28:48 -0000 Author: mav Date: Wed Jan 7 15:28:47 2009 New Revision: 186862 URL: http://svn.freebsd.org/changeset/base/186862 Log: Merge updated snd_hda driver version 20081226_0122 from CURRENT. This update gives: - multiple codec per HDA bus support; - multiple functional groups per codec support; - multiple audio devices per functional group support; - digital (SPDIF/HDMI) audio input/output support; - better UAA specification compliance with wide configureability; - headphones redirection controlled by UAA configuration instead of quirks; - improved codec parser, that gives working playback and recording with all of the long list of tested codecs and systems; - suspend/resume support; - part of multichannel audio support (requires OSS improvement to be used); Note, that due to added HDMI audio and logical audio devices support, updated driver often provides several PCM devices. In some cases it can make system default audio device no longer corresponding to the users's habbitual audio connectors. In such cases wanted device can be specified in audio application setup or defined globally via hw.snd.default_unit sysctl according to sound(4) man page. Additional information information about driver operation can be obtained from the updated man page and verbose boot messages. PR: kern/119181, kern/120144, kern/117599, kern/117729, kern/119671, kern/124645, kern/125822, kern/126217, kern/127105 Modified: stable/7/sys/dev/sound/pci/hda/hda_reg.h stable/7/sys/dev/sound/pci/hda/hdac.c stable/7/sys/dev/sound/pci/hda/hdac_private.h Modified: stable/7/sys/dev/sound/pci/hda/hda_reg.h ============================================================================== --- stable/7/sys/dev/sound/pci/hda/hda_reg.h Wed Jan 7 14:00:44 2009 (r186861) +++ stable/7/sys/dev/sound/pci/hda/hda_reg.h Wed Jan 7 15:28:47 2009 (r186862) @@ -180,13 +180,14 @@ HDA_CMD_VERB_SET_CONV_FMT, (payload))) /* Digital Converter Control */ -#define HDA_CMD_VERB_GET_DIGITAL_CONV_FMT 0xf0d +#define HDA_CMD_VERB_GET_DIGITAL_CONV_FMT1 0xf0d +#define HDA_CMD_VERB_GET_DIGITAL_CONV_FMT2 0xf0e #define HDA_CMD_VERB_SET_DIGITAL_CONV_FMT1 0x70d #define HDA_CMD_VERB_SET_DIGITAL_CONV_FMT2 0x70e #define HDA_CMD_GET_DIGITAL_CONV_FMT(cad, nid) \ (HDA_CMD_12BIT((cad), (nid), \ - HDA_CMD_VERB_GET_DIGITAL_CONV_FMTT, 0x0)) + HDA_CMD_VERB_GET_DIGITAL_CONV_FMT1, 0x0)) #define HDA_CMD_SET_DIGITAL_CONV_FMT1(cad, nid, payload) \ (HDA_CMD_12BIT((cad), (nid), \ HDA_CMD_VERB_SET_DIGITAL_CONV_FMT1, (payload))) @@ -1034,7 +1035,7 @@ HDA_PARAM_PIN_CAP_HEADPHONE_CAP_SHIFT) #define HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(param) \ (((param) & HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP_MASK) >> \ - HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP_MASK) + HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP_SHIFT) #define HDA_PARAM_PIN_CAP_TRIGGER_REQD(param) \ (((param) & HDA_PARAM_PIN_CAP_TRIGGER_REQD_MASK) >> \ HDA_PARAM_PIN_CAP_TRIGGER_REQD_SHIFT) @@ -1193,14 +1194,47 @@ HDA_PARAM_VOLUME_KNOB_CAP_NUM_STEPS_SHIFT) -#define HDA_CONFIG_DEFAULTCONF_SEQUENCE_MASK 0x00000000f -#define HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK 0x0000000f0 -#define HDA_CONFIG_DEFAULTCONF_MISC_MASK 0x000000f00 -#define HDA_CONFIG_DEFAULTCONF_COLOR_MASK 0x00000f000 -#define HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_MASK 0x000f00000 -#define HDA_CONFIG_DEFAULTCONF_DEVICE_MASK 0x000f00000 -#define HDA_CONFIG_DEFAULTCONF_LOCATION_MASK 0x03f000000 -#define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK 0x0c0000000 +#define HDA_CONFIG_DEFAULTCONF_SEQUENCE_MASK 0x0000000f +#define HDA_CONFIG_DEFAULTCONF_SEQUENCE_SHIFT 0 +#define HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK 0x000000f0 +#define HDA_CONFIG_DEFAULTCONF_ASSOCIATION_SHIFT 4 +#define HDA_CONFIG_DEFAULTCONF_MISC_MASK 0x00000f00 +#define HDA_CONFIG_DEFAULTCONF_MISC_SHIFT 8 +#define HDA_CONFIG_DEFAULTCONF_COLOR_MASK 0x0000f000 +#define HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT 12 +#define HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_MASK 0x000f0000 +#define HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_SHIFT 16 +#define HDA_CONFIG_DEFAULTCONF_DEVICE_MASK 0x00f00000 +#define HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT 20 +#define HDA_CONFIG_DEFAULTCONF_LOCATION_MASK 0x3f000000 +#define HDA_CONFIG_DEFAULTCONF_LOCATION_SHIFT 24 +#define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK 0xc0000000 +#define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT 30 + +#define HDA_CONFIG_DEFAULTCONF_SEQUENCE(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_SEQUENCE_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_SEQUENCE_SHIFT) +#define HDA_CONFIG_DEFAULTCONF_ASSOCIATION(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_ASSOCIATION_SHIFT) +#define HDA_CONFIG_DEFAULTCONF_MISC(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_MISC_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_MISC_SHIFT) +#define HDA_CONFIG_DEFAULTCONF_COLOR(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_COLOR_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT) +#define HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_SHIFT) +#define HDA_CONFIG_DEFAULTCONF_DEVICE(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT) +#define HDA_CONFIG_DEFAULTCONF_LOCATION(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_LOCATION_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_LOCATION_SHIFT) +#define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT) #define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK (0<<30) #define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE (1<<30) Modified: stable/7/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/7/sys/dev/sound/pci/hda/hdac.c Wed Jan 7 14:00:44 2009 (r186861) +++ stable/7/sys/dev/sound/pci/hda/hdac.c Wed Jan 7 15:28:47 2009 (r186862) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2006 Stephane E. Potvin * Copyright (c) 2006 Ariff Abdullah + * Copyright (c) 2008 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -61,6 +62,7 @@ * * Daniel Eischen * * * Maxime Guillaud * * * Ariff Abdullah * + * * Alexander Motin * * * * * * ....and various people from freebsd-multimedia@FreeBSD.org * * * * @@ -81,8 +83,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20080420_0052" -#define HDA_WIDGET_PARSER_REV 1 +#define HDA_DRV_TEST_REV "20081226_0122" SND_DECLARE_FILE("$FreeBSD$"); @@ -92,6 +93,12 @@ SND_DECLARE_FILE("$FreeBSD$"); } \ } while(0) +#define HDA_BOOTHVERBOSE(stmt) do { \ + if (snd_verbose > 3) { \ + stmt \ + } \ +} while(0) + #if 1 #undef HDAC_INTR_EXTRA #define HDAC_INTR_EXTRA 1 @@ -141,6 +148,8 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8) #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) +#define HDA_INTEL_82801J HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) +#define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) /* Nvidia */ @@ -153,6 +162,16 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_NVIDIA_MCP65_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x044b) #define HDA_NVIDIA_MCP67_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x055c) #define HDA_NVIDIA_MCP67_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x055d) +#define HDA_NVIDIA_MCP78_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0774) +#define HDA_NVIDIA_MCP78_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0775) +#define HDA_NVIDIA_MCP78_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0776) +#define HDA_NVIDIA_MCP78_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0777) +#define HDA_NVIDIA_MCP73_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x07fc) +#define HDA_NVIDIA_MCP73_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x07fd) +#define HDA_NVIDIA_MCP79_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac0) +#define HDA_NVIDIA_MCP79_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac1) +#define HDA_NVIDIA_MCP79_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac2) +#define HDA_NVIDIA_MCP79_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac3) #define HDA_NVIDIA_ALL HDA_MODEL_CONSTRUCT(NVIDIA, 0xffff) /* ATI */ @@ -171,6 +190,11 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_SIS_966 HDA_MODEL_CONSTRUCT(SIS, 0x7502) #define HDA_SIS_ALL HDA_MODEL_CONSTRUCT(SIS, 0xffff) +/* ULI */ +#define ULI_VENDORID 0x10b9 +#define HDA_ULI_M5461 HDA_MODEL_CONSTRUCT(ULI, 0x5461) +#define HDA_ULI_ALL HDA_MODEL_CONSTRUCT(ULI, 0xffff) + /* OEM/subvendors */ /* Intel */ @@ -195,6 +219,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #define DELL_VENDORID 0x1028 #define DELL_D630_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01f9) #define DELL_D820_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01cc) +#define DELL_V1400_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0227) #define DELL_V1500_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0228) #define DELL_I1300_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01c9) #define DELL_XPSM1210_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01d7) @@ -213,6 +238,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #define ACER_A4710_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x012f) #define ACER_A4715_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0133) #define ACER_3681WXM_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0110) +#define ACER_T6292_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011b) #define ACER_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xffff) /* Asus */ @@ -260,6 +286,11 @@ SND_DECLARE_FILE("$FreeBSD$"); #define APPLE_VENDORID 0x106b #define APPLE_MB3_SUBVENDOR HDA_MODEL_CONSTRUCT(APPLE, 0x00a1) +/* Sony */ +#define SONY_VENDORID 0x104d +#define SONY_S5_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81cc) +#define SONY_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0xffff) + /* * Apple Intel MacXXXX seems using Sigmatel codec/vendor id * instead of their own, which is beyond my comprehension @@ -308,6 +339,7 @@ SND_DECLARE_FILE("$FreeBSD$"); /* Misc constants.. */ +#define HDA_AMP_VOL_DEFAULT (-1) #define HDA_AMP_MUTE_DEFAULT (0xffffffff) #define HDA_AMP_MUTE_NONE (0) #define HDA_AMP_MUTE_LEFT (1 << 0) @@ -317,16 +349,10 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_AMP_LEFT_MUTED(v) ((v) & (HDA_AMP_MUTE_LEFT)) #define HDA_AMP_RIGHT_MUTED(v) (((v) & HDA_AMP_MUTE_RIGHT) >> 1) -#define HDA_DAC_PATH (1 << 0) -#define HDA_ADC_PATH (1 << 1) -#define HDA_ADC_RECSEL (1 << 2) - -#define HDA_DAC_LOCKED (1 << 3) -#define HDA_ADC_LOCKED (1 << 4) - -#define HDA_CTL_OUT (1 << 0) -#define HDA_CTL_IN (1 << 1) -#define HDA_CTL_BOTH (HDA_CTL_IN | HDA_CTL_OUT) +#define HDA_ADC_MONITOR (1 << 0) + +#define HDA_CTL_OUT 1 +#define HDA_CTL_IN 2 #define HDA_GPIO_MAX 8 /* 0 - 7 = GPIO , 8 = Flush */ @@ -346,6 +372,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_QUIRK_FORCESTEREO (1 << 11) #define HDA_QUIRK_EAPDINV (1 << 12) #define HDA_QUIRK_DMAPOS (1 << 13) +#define HDA_QUIRK_SENSEINV (1 << 14) /* 26 - 31 = vrefs */ #define HDA_QUIRK_IVREF50 (1 << 26) @@ -361,9 +388,6 @@ SND_DECLARE_FILE("$FreeBSD$"); HDA_QUIRK_OVREF100) #define HDA_QUIRK_VREF (HDA_QUIRK_IVREF | HDA_QUIRK_OVREF) -#define SOUND_MASK_SKIP (1 << 30) -#define SOUND_MASK_DISABLE (1 << 31) - #if __FreeBSD_version < 600000 #define taskqueue_drain(...) #endif @@ -386,6 +410,7 @@ static const struct { { "forcestereo", HDA_QUIRK_FORCESTEREO }, { "eapdinv", HDA_QUIRK_EAPDINV }, { "dmapos", HDA_QUIRK_DMAPOS }, + { "senseinv", HDA_QUIRK_SENSEINV }, { "ivref50", HDA_QUIRK_IVREF50 }, { "ivref80", HDA_QUIRK_IVREF80 }, { "ivref100", HDA_QUIRK_IVREF100 }, @@ -413,14 +438,18 @@ static const struct { #define HDA_PARSE_MAXDEPTH 10 #define HDAC_UNSOLTAG_EVENT_HP 0x00 -#define HDAC_UNSOLTAG_EVENT_TEST 0x01 MALLOC_DEFINE(M_HDAC, "hdac", "High Definition Audio Controller"); -enum { - HDA_PARSE_MIXER, - HDA_PARSE_DIRECT -}; +const char *HDA_COLORS[16] = {"Unknown", "Black", "Grey", "Blue", "Green", "Red", + "Orange", "Yellow", "Purple", "Pink", "Res.A", "Res.B", "Res.C", "Res.D", + "White", "Other"}; + +const char *HDA_DEVS[16] = {"Line-out", "Speaker", "Headphones", "CD", + "SPDIF-out", "Digital-out", "Modem-line", "Modem-handset", "Line-in", + "AUX", "Mic", "Telephony", "SPDIF-in", "Digital-in", "Res.E", "Other"}; + +const char *HDA_CONNS[4] = {"Jack", "None", "Fixed", "Both"}; /* Default */ static uint32_t hdac_fmt[] = { @@ -439,6 +468,8 @@ static const struct { { HDA_INTEL_82801G, "Intel 82801G" }, { HDA_INTEL_82801H, "Intel 82801H" }, { HDA_INTEL_82801I, "Intel 82801I" }, + { HDA_INTEL_82801J, "Intel 82801J" }, + { HDA_INTEL_SCH, "Intel SCH" }, { HDA_NVIDIA_MCP51, "NVidia MCP51" }, { HDA_NVIDIA_MCP55, "NVidia MCP55" }, { HDA_NVIDIA_MCP61_1, "NVidia MCP61" }, @@ -447,16 +478,28 @@ static const struct { { HDA_NVIDIA_MCP65_2, "NVidia MCP65" }, { HDA_NVIDIA_MCP67_1, "NVidia MCP67" }, { HDA_NVIDIA_MCP67_2, "NVidia MCP67" }, + { HDA_NVIDIA_MCP73_1, "NVidia MCP73" }, + { HDA_NVIDIA_MCP73_2, "NVidia MCP73" }, + { HDA_NVIDIA_MCP78_1, "NVidia MCP78" }, + { HDA_NVIDIA_MCP78_2, "NVidia MCP78" }, + { HDA_NVIDIA_MCP78_3, "NVidia MCP78" }, + { HDA_NVIDIA_MCP78_4, "NVidia MCP78" }, + { HDA_NVIDIA_MCP79_1, "NVidia MCP79" }, + { HDA_NVIDIA_MCP79_2, "NVidia MCP79" }, + { HDA_NVIDIA_MCP79_3, "NVidia MCP79" }, + { HDA_NVIDIA_MCP79_4, "NVidia MCP79" }, { HDA_ATI_SB450, "ATI SB450" }, { HDA_ATI_SB600, "ATI SB600" }, { HDA_VIA_VT82XX, "VIA VT8251/8237A" }, { HDA_SIS_966, "SiS 966" }, + { HDA_ULI_M5461, "ULI M5461" }, /* Unknown */ { HDA_INTEL_ALL, "Intel (Unknown)" }, { HDA_NVIDIA_ALL, "NVidia (Unknown)" }, { HDA_ATI_ALL, "ATI (Unknown)" }, { HDA_VIA_ALL, "VIA (Unknown)" }, { HDA_SIS_ALL, "SiS (Unknown)" }, + { HDA_ULI_ALL, "ULI (Unknown)" }, }; #define HDAC_DEVICES_LEN (sizeof(hdac_devices) / sizeof(hdac_devices[0])) @@ -526,8 +569,13 @@ static const struct { #define REALTEK_VENDORID 0x10ec #define HDA_CODEC_ALC260 HDA_CODEC_CONSTRUCT(REALTEK, 0x0260) #define HDA_CODEC_ALC262 HDA_CODEC_CONSTRUCT(REALTEK, 0x0262) +#define HDA_CODEC_ALC267 HDA_CODEC_CONSTRUCT(REALTEK, 0x0267) #define HDA_CODEC_ALC268 HDA_CODEC_CONSTRUCT(REALTEK, 0x0268) +#define HDA_CODEC_ALC269 HDA_CODEC_CONSTRUCT(REALTEK, 0x0269) +#define HDA_CODEC_ALC272 HDA_CODEC_CONSTRUCT(REALTEK, 0x0272) #define HDA_CODEC_ALC660 HDA_CODEC_CONSTRUCT(REALTEK, 0x0660) +#define HDA_CODEC_ALC662 HDA_CODEC_CONSTRUCT(REALTEK, 0x0662) +#define HDA_CODEC_ALC663 HDA_CODEC_CONSTRUCT(REALTEK, 0x0663) #define HDA_CODEC_ALC861 HDA_CODEC_CONSTRUCT(REALTEK, 0x0861) #define HDA_CODEC_ALC861VD HDA_CODEC_CONSTRUCT(REALTEK, 0x0862) #define HDA_CODEC_ALC880 HDA_CODEC_CONSTRUCT(REALTEK, 0x0880) @@ -535,16 +583,26 @@ static const struct { #define HDA_CODEC_ALC883 HDA_CODEC_CONSTRUCT(REALTEK, 0x0883) #define HDA_CODEC_ALC885 HDA_CODEC_CONSTRUCT(REALTEK, 0x0885) #define HDA_CODEC_ALC888 HDA_CODEC_CONSTRUCT(REALTEK, 0x0888) +#define HDA_CODEC_ALC889 HDA_CODEC_CONSTRUCT(REALTEK, 0x0889) #define HDA_CODEC_ALCXXXX HDA_CODEC_CONSTRUCT(REALTEK, 0xffff) /* Analog Devices */ #define ANALOGDEVICES_VENDORID 0x11d4 +#define HDA_CODEC_AD1884A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x184a) +#define HDA_CODEC_AD1882 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1882) +#define HDA_CODEC_AD1883 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1883) +#define HDA_CODEC_AD1884 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1884) +#define HDA_CODEC_AD1984A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x194a) +#define HDA_CODEC_AD1984B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x194b) #define HDA_CODEC_AD1981HD HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1981) #define HDA_CODEC_AD1983 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1983) #define HDA_CODEC_AD1984 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1984) #define HDA_CODEC_AD1986A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1986) +#define HDA_CODEC_AD1987 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1987) #define HDA_CODEC_AD1988 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1988) #define HDA_CODEC_AD1988B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x198b) +#define HDA_CODEC_AD1882A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x882a) +#define HDA_CODEC_AD1989B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x989b) #define HDA_CODEC_ADXXXX HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0xffff) /* CMedia */ @@ -554,29 +612,77 @@ static const struct { /* Sigmatel */ #define SIGMATEL_VENDORID 0x8384 +#define HDA_CODEC_STAC9230X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7612) +#define HDA_CODEC_STAC9230D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7613) +#define HDA_CODEC_STAC9229X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7614) +#define HDA_CODEC_STAC9229D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7615) +#define HDA_CODEC_STAC9228X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7616) +#define HDA_CODEC_STAC9228D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7617) +#define HDA_CODEC_STAC9227X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7618) +#define HDA_CODEC_STAC9227D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7619) +#define HDA_CODEC_STAC9274 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7620) +#define HDA_CODEC_STAC9274D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7621) +#define HDA_CODEC_STAC9273X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7622) +#define HDA_CODEC_STAC9273D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7623) +#define HDA_CODEC_STAC9272X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7624) +#define HDA_CODEC_STAC9272D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7625) +#define HDA_CODEC_STAC9271X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7626) +#define HDA_CODEC_STAC9271D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7627) +#define HDA_CODEC_STAC9274X5NH HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7628) +#define HDA_CODEC_STAC9274D5NH HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7629) +#define HDA_CODEC_STAC9250 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7634) +#define HDA_CODEC_STAC9251 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7636) +#define HDA_CODEC_IDT92HD700X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7638) +#define HDA_CODEC_IDT92HD700D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7639) +#define HDA_CODEC_IDT92HD206X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7645) +#define HDA_CODEC_IDT92HD206D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7646) +#define HDA_CODEC_STAC9872AK HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7662) #define HDA_CODEC_STAC9221 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7680) +#define HDA_CODEC_STAC922XD HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7681) +#define HDA_CODEC_STAC9221_A2 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7682) #define HDA_CODEC_STAC9221D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7683) #define HDA_CODEC_STAC9220 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7690) -#define HDA_CODEC_STAC922XD HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7681) -#define HDA_CODEC_STAC9227 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7618) -#define HDA_CODEC_STAC9271D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7627) -#define HDA_CODEC_STAC9205 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a0) -#define HDA_CODEC_STAC9872AK HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7662) +#define HDA_CODEC_STAC9200D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7691) +#define HDA_CODEC_IDT92HD005 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7698) +#define HDA_CODEC_IDT92HD005D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7699) +#define HDA_CODEC_STAC9205X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a0) +#define HDA_CODEC_STAC9205D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a1) +#define HDA_CODEC_STAC9204X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a2) +#define HDA_CODEC_STAC9204D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a3) +#define HDA_CODEC_STAC9220_A2 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7880) +#define HDA_CODEC_STAC9220_A1 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7882) #define HDA_CODEC_STACXXXX HDA_CODEC_CONSTRUCT(SIGMATEL, 0xffff) -/* - * Conexant - * - * Ok, the truth is, I don't have any idea at all whether - * it is "Venice" or "Waikiki" or other unnamed CXyadayada. The only - * place that tell me it is "Venice" is from its Windows driver INF. - * - * Venice - CX????? - * Waikiki - CX20551-22 - */ +/* IDT */ +#define IDT_VENDORID 0x111d +#define HDA_CODEC_IDT92HD75BX HDA_CODEC_CONSTRUCT(IDT, 0x7603) +#define HDA_CODEC_IDT92HD83C1X HDA_CODEC_CONSTRUCT(IDT, 0x7604) +#define HDA_CODEC_IDT92HD81B1X HDA_CODEC_CONSTRUCT(IDT, 0x7605) +#define HDA_CODEC_IDT92HD75B3 HDA_CODEC_CONSTRUCT(IDT, 0x7608) +#define HDA_CODEC_IDT92HD73D1 HDA_CODEC_CONSTRUCT(IDT, 0x7674) +#define HDA_CODEC_IDT92HD73C1 HDA_CODEC_CONSTRUCT(IDT, 0x7675) +#define HDA_CODEC_IDT92HD73E1 HDA_CODEC_CONSTRUCT(IDT, 0x7676) +#define HDA_CODEC_IDT92HD71B8 HDA_CODEC_CONSTRUCT(IDT, 0x76b0) +#define HDA_CODEC_IDT92HD71B7 HDA_CODEC_CONSTRUCT(IDT, 0x76b2) +#define HDA_CODEC_IDT92HD71B5 HDA_CODEC_CONSTRUCT(IDT, 0x76b6) +#define HDA_CODEC_IDT92HD83C1C HDA_CODEC_CONSTRUCT(IDT, 0x76d4) +#define HDA_CODEC_IDT92HD81B1C HDA_CODEC_CONSTRUCT(IDT, 0x76d5) +#define HDA_CODEC_IDTXXXX HDA_CODEC_CONSTRUCT(IDT, 0xffff) + +/* Silicon Image */ +#define SII_VENDORID 0x1095 +#define HDA_CODEC_SII1392 HDA_CODEC_CONSTRUCT(SII, 0x1392) +#define HDA_CODEC_SIIXXXX HDA_CODEC_CONSTRUCT(SII, 0xffff) + +/* Lucent/Agere */ +#define AGERE_VENDORID 0x11c1 +#define HDA_CODEC_AGEREXXXX HDA_CODEC_CONSTRUCT(AGERE, 0xffff) + +/* Conexant */ #define CONEXANT_VENDORID 0x14f1 -#define HDA_CODEC_CXVENICE HDA_CODEC_CONSTRUCT(CONEXANT, 0x5045) -#define HDA_CODEC_CXWAIKIKI HDA_CODEC_CONSTRUCT(CONEXANT, 0x5047) +#define HDA_CODEC_CX20549 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5045) +#define HDA_CODEC_CX20551 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5047) +#define HDA_CODEC_CX20561 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5051) #define HDA_CODEC_CXXXXX HDA_CODEC_CONSTRUCT(CONEXANT, 0xffff) /* VIA */ @@ -592,8 +698,28 @@ static const struct { #define HDA_CODEC_VT1709_5 HDA_CODEC_CONSTRUCT(VIA, 0xe715) #define HDA_CODEC_VT1709_6 HDA_CODEC_CONSTRUCT(VIA, 0xe716) #define HDA_CODEC_VT1709_7 HDA_CODEC_CONSTRUCT(VIA, 0xe717) +#define HDA_CODEC_VT1708B_0 HDA_CODEC_CONSTRUCT(VIA, 0xe720) +#define HDA_CODEC_VT1708B_1 HDA_CODEC_CONSTRUCT(VIA, 0xe721) +#define HDA_CODEC_VT1708B_2 HDA_CODEC_CONSTRUCT(VIA, 0xe722) +#define HDA_CODEC_VT1708B_3 HDA_CODEC_CONSTRUCT(VIA, 0xe723) +#define HDA_CODEC_VT1708B_4 HDA_CODEC_CONSTRUCT(VIA, 0xe724) +#define HDA_CODEC_VT1708B_5 HDA_CODEC_CONSTRUCT(VIA, 0xe725) +#define HDA_CODEC_VT1708B_6 HDA_CODEC_CONSTRUCT(VIA, 0xe726) +#define HDA_CODEC_VT1708B_7 HDA_CODEC_CONSTRUCT(VIA, 0xe727) #define HDA_CODEC_VTXXXX HDA_CODEC_CONSTRUCT(VIA, 0xffff) +/* ATI */ +#define HDA_CODEC_ATIRS600_1 HDA_CODEC_CONSTRUCT(ATI, 0x793c) +#define HDA_CODEC_ATIRS600_2 HDA_CODEC_CONSTRUCT(ATI, 0x7919) +#define HDA_CODEC_ATIRS690 HDA_CODEC_CONSTRUCT(ATI, 0x791a) +#define HDA_CODEC_ATIR6XX HDA_CODEC_CONSTRUCT(ATI, 0xaa01) +#define HDA_CODEC_ATIXXXX HDA_CODEC_CONSTRUCT(ATI, 0xffff) + +/* NVIDIA */ +#define HDA_CODEC_NVIDIAXXXX HDA_CODEC_CONSTRUCT(NVIDIA, 0xffff) + +/* INTEL */ +#define HDA_CODEC_INTELXXXX HDA_CODEC_CONSTRUCT(INTEL, 0xffff) /* Codecs */ static const struct { @@ -602,8 +728,13 @@ static const struct { } hdac_codecs[] = { { HDA_CODEC_ALC260, "Realtek ALC260" }, { HDA_CODEC_ALC262, "Realtek ALC262" }, + { HDA_CODEC_ALC267, "Realtek ALC267" }, { HDA_CODEC_ALC268, "Realtek ALC268" }, + { HDA_CODEC_ALC269, "Realtek ALC269" }, + { HDA_CODEC_ALC272, "Realtek ALC272" }, { HDA_CODEC_ALC660, "Realtek ALC660" }, + { HDA_CODEC_ALC662, "Realtek ALC662" }, + { HDA_CODEC_ALC663, "Realtek ALC663" }, { HDA_CODEC_ALC861, "Realtek ALC861" }, { HDA_CODEC_ALC861VD, "Realtek ALC861-VD" }, { HDA_CODEC_ALC880, "Realtek ALC880" }, @@ -611,23 +742,77 @@ static const struct { { HDA_CODEC_ALC883, "Realtek ALC883" }, { HDA_CODEC_ALC885, "Realtek ALC885" }, { HDA_CODEC_ALC888, "Realtek ALC888" }, + { HDA_CODEC_ALC889, "Realtek ALC889" }, + { HDA_CODEC_AD1882, "Analog Devices AD1882" }, + { HDA_CODEC_AD1882A, "Analog Devices AD1882A" }, + { HDA_CODEC_AD1883, "Analog Devices AD1883" }, + { HDA_CODEC_AD1884, "Analog Devices AD1884" }, + { HDA_CODEC_AD1884A, "Analog Devices AD1884A" }, { HDA_CODEC_AD1981HD, "Analog Devices AD1981HD" }, { HDA_CODEC_AD1983, "Analog Devices AD1983" }, { HDA_CODEC_AD1984, "Analog Devices AD1984" }, + { HDA_CODEC_AD1984A, "Analog Devices AD1984A" }, + { HDA_CODEC_AD1984B, "Analog Devices AD1984B" }, { HDA_CODEC_AD1986A, "Analog Devices AD1986A" }, - { HDA_CODEC_AD1988, "Analog Devices AD1988" }, + { HDA_CODEC_AD1987, "Analog Devices AD1987" }, + { HDA_CODEC_AD1988, "Analog Devices AD1988A" }, { HDA_CODEC_AD1988B, "Analog Devices AD1988B" }, + { HDA_CODEC_AD1989B, "Analog Devices AD1989B" }, { HDA_CODEC_CMI9880, "CMedia CMI9880" }, + { HDA_CODEC_STAC9200D, "Sigmatel STAC9200D" }, + { HDA_CODEC_STAC9204X, "Sigmatel STAC9204X" }, + { HDA_CODEC_STAC9204D, "Sigmatel STAC9204D" }, + { HDA_CODEC_STAC9205X, "Sigmatel STAC9205X" }, + { HDA_CODEC_STAC9205D, "Sigmatel STAC9205D" }, + { HDA_CODEC_STAC9220, "Sigmatel STAC9220" }, + { HDA_CODEC_STAC9220_A1, "Sigmatel STAC9220_A1" }, + { HDA_CODEC_STAC9220_A2, "Sigmatel STAC9220_A2" }, { HDA_CODEC_STAC9221, "Sigmatel STAC9221" }, + { HDA_CODEC_STAC9221_A2, "Sigmatel STAC9221_A2" }, { HDA_CODEC_STAC9221D, "Sigmatel STAC9221D" }, - { HDA_CODEC_STAC9220, "Sigmatel STAC9220" }, { HDA_CODEC_STAC922XD, "Sigmatel STAC9220D/9223D" }, - { HDA_CODEC_STAC9227, "Sigmatel STAC9227" }, + { HDA_CODEC_STAC9227X, "Sigmatel STAC9227X" }, + { HDA_CODEC_STAC9227D, "Sigmatel STAC9227D" }, + { HDA_CODEC_STAC9228X, "Sigmatel STAC9228X" }, + { HDA_CODEC_STAC9228D, "Sigmatel STAC9228D" }, + { HDA_CODEC_STAC9229X, "Sigmatel STAC9229X" }, + { HDA_CODEC_STAC9229D, "Sigmatel STAC9229D" }, + { HDA_CODEC_STAC9230X, "Sigmatel STAC9230X" }, + { HDA_CODEC_STAC9230D, "Sigmatel STAC9230D" }, + { HDA_CODEC_STAC9250, "Sigmatel STAC9250" }, + { HDA_CODEC_STAC9251, "Sigmatel STAC9251" }, + { HDA_CODEC_STAC9271X, "Sigmatel STAC9271X" }, { HDA_CODEC_STAC9271D, "Sigmatel STAC9271D" }, - { HDA_CODEC_STAC9205, "Sigmatel STAC9205" }, - { HDA_CODEC_STAC9872AK,"Sigmatel STAC9872AK" }, - { HDA_CODEC_CXVENICE, "Conexant Venice" }, - { HDA_CODEC_CXWAIKIKI, "Conexant Waikiki" }, + { HDA_CODEC_STAC9272X, "Sigmatel STAC9272X" }, + { HDA_CODEC_STAC9272D, "Sigmatel STAC9272D" }, + { HDA_CODEC_STAC9273X, "Sigmatel STAC9273X" }, + { HDA_CODEC_STAC9273D, "Sigmatel STAC9273D" }, + { HDA_CODEC_STAC9274, "Sigmatel STAC9274" }, + { HDA_CODEC_STAC9274D, "Sigmatel STAC9274D" }, + { HDA_CODEC_STAC9274X5NH, "Sigmatel STAC9274X5NH" }, + { HDA_CODEC_STAC9274D5NH, "Sigmatel STAC9274D5NH" }, + { HDA_CODEC_STAC9872AK, "Sigmatel STAC9872AK" }, + { HDA_CODEC_IDT92HD005, "IDT 92HD005" }, + { HDA_CODEC_IDT92HD005D, "IDT 92HD005D" }, + { HDA_CODEC_IDT92HD206X, "IDT 92HD206X" }, + { HDA_CODEC_IDT92HD206D, "IDT 92HD206D" }, + { HDA_CODEC_IDT92HD700X, "IDT 92HD700X" }, + { HDA_CODEC_IDT92HD700D, "IDT 92HD700D" }, + { HDA_CODEC_IDT92HD71B5, "IDT 92HD71B5" }, + { HDA_CODEC_IDT92HD71B7, "IDT 92HD71B7" }, + { HDA_CODEC_IDT92HD71B8, "IDT 92HD71B8" }, + { HDA_CODEC_IDT92HD73C1, "IDT 92HD73C1" }, + { HDA_CODEC_IDT92HD73D1, "IDT 92HD73D1" }, + { HDA_CODEC_IDT92HD73E1, "IDT 92HD73E1" }, + { HDA_CODEC_IDT92HD75B3, "IDT 92HD75B3" }, + { HDA_CODEC_IDT92HD75BX, "IDT 92HD75BX" }, + { HDA_CODEC_IDT92HD81B1C, "IDT 92HD81B1C" }, + { HDA_CODEC_IDT92HD81B1X, "IDT 92HD81B1X" }, + { HDA_CODEC_IDT92HD83C1C, "IDT 92HD83C1C" }, + { HDA_CODEC_IDT92HD83C1X, "IDT 92HD83C1X" }, + { HDA_CODEC_CX20549, "Conexant CX20549 (Venice)" }, + { HDA_CODEC_CX20551, "Conexant CX20551 (Waikiki)" }, + { HDA_CODEC_CX20561, "Conexant CX20561 (Hermosa)" }, { HDA_CODEC_VT1708_8, "VIA VT1708_8" }, { HDA_CODEC_VT1708_9, "VIA VT1708_9" }, { HDA_CODEC_VT1708_A, "VIA VT1708_A" }, @@ -640,136 +825,41 @@ static const struct { { HDA_CODEC_VT1709_5, "VIA VT1709_5" }, { HDA_CODEC_VT1709_6, "VIA VT1709_6" }, { HDA_CODEC_VT1709_7, "VIA VT1709_7" }, + { HDA_CODEC_VT1708B_0, "VIA VT1708B_0" }, + { HDA_CODEC_VT1708B_1, "VIA VT1708B_1" }, + { HDA_CODEC_VT1708B_2, "VIA VT1708B_2" }, + { HDA_CODEC_VT1708B_3, "VIA VT1708B_3" }, + { HDA_CODEC_VT1708B_4, "VIA VT1708B_4" }, + { HDA_CODEC_VT1708B_5, "VIA VT1708B_5" }, + { HDA_CODEC_VT1708B_6, "VIA VT1708B_6" }, + { HDA_CODEC_VT1708B_7, "VIA VT1708B_7" }, + { HDA_CODEC_ATIRS600_1,"ATI RS600 HDMI" }, + { HDA_CODEC_ATIRS600_2,"ATI RS600 HDMI" }, + { HDA_CODEC_ATIRS690, "ATI RS690/780 HDMI" }, + { HDA_CODEC_ATIR6XX, "ATI R6xx HDMI" }, + { HDA_CODEC_SII1392, "Silicon Image SiI1392 HDMI" }, /* Unknown codec */ { HDA_CODEC_ALCXXXX, "Realtek (Unknown)" }, { HDA_CODEC_ADXXXX, "Analog Devices (Unknown)" }, { HDA_CODEC_CMIXXXX, "CMedia (Unknown)" }, { HDA_CODEC_STACXXXX, "Sigmatel (Unknown)" }, + { HDA_CODEC_SIIXXXX, "Silicon Image (Unknown)" }, + { HDA_CODEC_AGEREXXXX, "Lucent/Agere Systems (Unknown)" }, { HDA_CODEC_CXXXXX, "Conexant (Unknown)" }, { HDA_CODEC_VTXXXX, "VIA (Unknown)" }, + { HDA_CODEC_ATIXXXX, "ATI (Unknown)" }, + { HDA_CODEC_NVIDIAXXXX,"NVidia (Unknown)" }, + { HDA_CODEC_INTELXXXX, "Intel (Unknown)" }, + { HDA_CODEC_IDTXXXX, "IDT (Unknown)" }, }; #define HDAC_CODECS_LEN (sizeof(hdac_codecs) / sizeof(hdac_codecs[0])) -enum { - HDAC_HP_SWITCH_CTL, - HDAC_HP_SWITCH_CTRL, - HDAC_HP_SWITCH_DEBUG -}; - -static const struct { - uint32_t model; - uint32_t id; - int type; - int inverted; - int polling; - int execsense; - nid_t hpnid; - nid_t spkrnid[8]; - nid_t eapdnid; -} hdac_hp_switch[] = { - /* Specific OEM models */ - { HP_V3000_SUBVENDOR, HDA_CODEC_CXVENICE, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 17, { 16, -1 }, 16 }, - /* { HP_XW4300_SUBVENDOR, HDA_CODEC_ALC260, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 21, { 16, 17, -1 }, -1 } */ - /* { HP_3010_SUBVENDOR, HDA_CODEC_ALC260, HDAC_HP_SWITCH_DEBUG, - 0, 1, 0, 16, { 15, 18, 19, 20, 21, -1 }, -1 }, */ - { HP_NX7400_SUBVENDOR, HDA_CODEC_AD1981HD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 6, { 5, -1 }, 5 }, - { HP_NX6310_SUBVENDOR, HDA_CODEC_AD1981HD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 6, { 5, -1 }, 5 }, - { HP_NX6325_SUBVENDOR, HDA_CODEC_AD1981HD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 6, { 5, -1 }, 5 }, - /* { HP_DC7700_SUBVENDOR, HDA_CODEC_ALC262, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 21, { 22, 27, -1 }, -1 }, */ - { TOSHIBA_U200_SUBVENDOR, HDA_CODEC_AD1981HD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 6, { 5, -1 }, -1 }, - { TOSHIBA_A135_SUBVENDOR, HDA_CODEC_ALC861VD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 27, { 20, -1 }, -1 }, - { DELL_D820_SUBVENDOR, HDA_CODEC_STAC9220, HDAC_HP_SWITCH_CTRL, - 0, 0, -1, 13, { 14, -1 }, -1 }, - { DELL_I1300_SUBVENDOR, HDA_CODEC_STAC9220, HDAC_HP_SWITCH_CTRL, - 0, 0, -1, 13, { 14, -1 }, -1 }, - { DELL_OPLX745_SUBVENDOR, HDA_CODEC_AD1983, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 6, { 5, 7, -1 }, -1 }, - { DELL_D630_SUBVENDOR, HDA_CODEC_STAC9205, HDAC_HP_SWITCH_CTRL, - 0, 0, -1, 10, { 13, -1 }, -1 }, - { DELL_V1500_SUBVENDOR, HDA_CODEC_STAC9205, HDAC_HP_SWITCH_CTRL, - 0, 0, -1, 10, { 13, -1 }, -1 }, - { APPLE_MB3_SUBVENDOR, HDA_CODEC_ALC885, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 21, { 20, 22, -1 }, -1 }, - { APPLE_INTEL_MAC, HDA_CODEC_STAC9221, HDAC_HP_SWITCH_CTRL, - 0, 0, -1, 10, { 13, -1 }, -1 }, - { LENOVO_3KN100_SUBVENDOR, HDA_CODEC_AD1986A, HDAC_HP_SWITCH_CTL, - 1, 0, -1, 26, { 27, -1 }, -1 }, - { LENOVO_3KN200_SUBVENDOR, HDA_CODEC_ALC861VD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 27, { 20, -1 }, -1 }, - /* { LENOVO_TCA55_SUBVENDOR, HDA_CODEC_AD1986A, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 26, { 27, 28, 29, 30, -1 }, -1 }, */ - { LG_LW20_SUBVENDOR, HDA_CODEC_ALC880, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 27, { 20, -1 }, -1 }, - { ACER_A5050_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - { ACER_3681WXM_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - { ACER_A4520_SUBVENDOR, HDA_CODEC_ALC268, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - { ACER_A4710_SUBVENDOR, HDA_CODEC_ALC268, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - { ACER_A4715_SUBVENDOR, HDA_CODEC_ALC268, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - { UNIWILL_9080_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - { MSI_MS1034_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 27, -1 }, -1 }, - { MSI_MS034A_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 27, -1 }, -1 }, - { FS_SI1848_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - { FL_S7020D_SUBVENDOR, HDA_CODEC_ALC260, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 16, -1 }, -1 }, - { FL_U1010_SUBVENDOR, HDA_CODEC_ALC262, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - /* - * All models that at least come from the same vendor with - * simmilar codec. - */ - { HP_ALL_SUBVENDOR, HDA_CODEC_CXVENICE, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 17, { 16, -1 }, 16 }, - { HP_ALL_SUBVENDOR, HDA_CODEC_AD1981HD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 6, { 5, -1 }, 5 }, - { TOSHIBA_ALL_SUBVENDOR, HDA_CODEC_AD1981HD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 6, { 5, -1 }, -1 }, - { DELL_ALL_SUBVENDOR, HDA_CODEC_STAC9220, HDAC_HP_SWITCH_CTRL, - 0, 0, -1, 13, { 14, -1 }, -1 }, -#if 0 - { LENOVO_ALL_SUBVENDOR, HDA_CODEC_AD1986A, HDAC_HP_SWITCH_CTL, - 1, 0, -1, 26, { 27, -1 }, -1 }, - { ACER_ALL_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, -#endif -}; -#define HDAC_HP_SWITCH_LEN \ - (sizeof(hdac_hp_switch) / sizeof(hdac_hp_switch[0])) - -static const struct { - uint32_t model; - uint32_t id; - nid_t eapdnid; - int hp_switch; -} hdac_eapd_switch[] = { - { HP_V3000_SUBVENDOR, HDA_CODEC_CXVENICE, 16, 1 }, - { HP_NX7400_SUBVENDOR, HDA_CODEC_AD1981HD, 5, 1 }, - { HP_NX6310_SUBVENDOR, HDA_CODEC_AD1981HD, 5, 1 }, -}; -#define HDAC_EAPD_SWITCH_LEN \ - (sizeof(hdac_eapd_switch) / sizeof(hdac_eapd_switch[0])) /**************************************************************************** * Function prototypes ****************************************************************************/ static void hdac_intr_handler(void *); -static int hdac_reset(struct hdac_softc *); +static int hdac_reset(struct hdac_softc *, int); static int hdac_get_capabilities(struct hdac_softc *); static void hdac_dma_cb(void *, bus_dma_segment_t *, int, int); static int hdac_dma_alloc(struct hdac_softc *, @@ -783,10 +873,10 @@ static void hdac_corb_init(struct hdac_s static void hdac_rirb_init(struct hdac_softc *); static void hdac_corb_start(struct hdac_softc *); static void hdac_rirb_start(struct hdac_softc *); -static void hdac_scan_codecs(struct hdac_softc *, int); -static int hdac_probe_codec(struct hdac_codec *); -static struct hdac_devinfo *hdac_probe_function(struct hdac_codec *, nid_t); -static void hdac_add_child(struct hdac_softc *, struct hdac_devinfo *); +static void hdac_scan_codecs(struct hdac_softc *); +static void hdac_probe_codec(struct hdac_codec *); +static void hdac_probe_function(struct hdac_codec *, nid_t); +static int hdac_pcmchannel_setup(struct hdac_chan *); static void hdac_attach2(void *); @@ -798,34 +888,37 @@ static void hdac_command_send_internal(s static int hdac_probe(device_t); static int hdac_attach(device_t); static int hdac_detach(device_t); +static int hdac_suspend(device_t); +static int hdac_resume(device_t); static void hdac_widget_connection_select(struct hdac_widget *, uint8_t); static void hdac_audio_ctl_amp_set(struct hdac_audio_ctl *, uint32_t, int, int); static struct hdac_audio_ctl *hdac_audio_ctl_amp_get(struct hdac_devinfo *, - nid_t, int, int); + nid_t, int, int, int); static void hdac_audio_ctl_amp_set_internal(struct hdac_softc *, nid_t, nid_t, int, int, int, int, int, int); -static int hdac_audio_ctl_ossmixer_getnextdev(struct hdac_devinfo *); static struct hdac_widget *hdac_widget_get(struct hdac_devinfo *, nid_t); static int hdac_rirb_flush(struct hdac_softc *sc); static int hdac_unsolq_flush(struct hdac_softc *sc); +static void hdac_dump_pin_config(struct hdac_widget *w, uint32_t conf); + #define hdac_command(a1, a2, a3) \ hdac_command_sendone_internal(a1, a2, a3) -#define hdac_codec_id(d) \ - ((uint32_t)((d == NULL) ? 0x00000000 : \ - ((((uint32_t)(d)->vendor_id & 0x0000ffff) << 16) | \ - ((uint32_t)(d)->device_id & 0x0000ffff)))) +#define hdac_codec_id(c) \ + ((uint32_t)((c == NULL) ? 0x00000000 : \ + ((((uint32_t)(c)->vendor_id & 0x0000ffff) << 16) | \ + ((uint32_t)(c)->device_id & 0x0000ffff)))) static char * -hdac_codec_name(struct hdac_devinfo *devinfo) +hdac_codec_name(struct hdac_codec *codec) { uint32_t id; int i; - id = hdac_codec_id(devinfo); + id = hdac_codec_id(codec); for (i = 0; i < HDAC_CODECS_LEN; i++) { if (HDA_DEV_MATCH(hdac_codecs[i].id, id)) @@ -836,20 +929,6 @@ hdac_codec_name(struct hdac_devinfo *dev } static char * -hdac_audio_ctl_ossmixer_mask2name(uint32_t devmask) -{ - static char *ossname[] = SOUND_DEVICE_NAMES; - static char *unknown = "???"; - int i; - - for (i = SOUND_MIXER_NRDEVICES - 1; i >= 0; i--) { - if (devmask & (1 << i)) - return (ossname[i]); - } - return (unknown); -} - -static void hdac_audio_ctl_ossmixer_mask2allname(uint32_t mask, char *buf, size_t len) { static char *ossname[] = SOUND_DEVICE_NAMES; @@ -864,6 +943,7 @@ hdac_audio_ctl_ossmixer_mask2allname(uin first = 0; } } + return (buf); } static struct hdac_audio_ctl * @@ -879,48 +959,46 @@ hdac_audio_ctl_each(struct hdac_devinfo } static struct hdac_audio_ctl * -hdac_audio_ctl_amp_get(struct hdac_devinfo *devinfo, nid_t nid, +hdac_audio_ctl_amp_get(struct hdac_devinfo *devinfo, nid_t nid, int dir, int index, int cnt) { - struct hdac_audio_ctl *ctl, *retctl = NULL; - int i, at, atindex, found = 0; + struct hdac_audio_ctl *ctl; + int i, found = 0; if (devinfo == NULL || devinfo->function.audio.ctl == NULL) return (NULL); - at = cnt; - if (at == 0) - at = 1; - else if (at < 0) - at = -1; - atindex = index; - if (atindex < 0) - atindex = -1; - i = 0; while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) { - if (ctl->enable == 0 || ctl->widget == NULL) + if (ctl->enable == 0) continue; - if (!(ctl->widget->nid == nid && (atindex == -1 || - ctl->index == atindex))) + if (ctl->widget->nid != nid) + continue; + if (dir && ctl->ndir != dir) + continue; + if (index >= 0 && ctl->ndir == HDA_CTL_IN && + ctl->dir == ctl->ndir && ctl->index != index) continue; found++; - if (found == cnt) + if (found == cnt || cnt <= 0) return (ctl); - retctl = ctl; } - return ((at == -1) ? retctl : NULL); + return (NULL); } +/* + * Jack detection (Speaker/HP redirection) event handler. + */ static void hdac_hp_switch_handler(struct hdac_devinfo *devinfo) { + struct hdac_audio_as *as; struct hdac_softc *sc; struct hdac_widget *w; struct hdac_audio_ctl *ctl; - uint32_t val, id, res; - int i = 0, j, timeout, forcemute; + uint32_t val, res; + int i, j; nid_t cad; if (devinfo == NULL || devinfo->codec == NULL || @@ -929,84 +1007,47 @@ hdac_hp_switch_handler(struct hdac_devin sc = devinfo->codec->sc; cad = devinfo->codec->cad; - id = hdac_codec_id(devinfo); - for (i = 0; i < HDAC_HP_SWITCH_LEN; i++) { - if (HDA_DEV_MATCH(hdac_hp_switch[i].model, - sc->pci_subvendor) && - hdac_hp_switch[i].id == id) - break; - } - - if (i >= HDAC_HP_SWITCH_LEN) - return; - - forcemute = 0; - if (hdac_hp_switch[i].eapdnid != -1) { - w = hdac_widget_get(devinfo, hdac_hp_switch[i].eapdnid); - if (w != NULL && w->param.eapdbtl != HDAC_INVALID) - forcemute = (w->param.eapdbtl & - HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD) ? 0 : 1; - } - - if (hdac_hp_switch[i].execsense != -1) - hdac_command(sc, - HDA_CMD_SET_PIN_SENSE(cad, hdac_hp_switch[i].hpnid, - hdac_hp_switch[i].execsense), cad); + as = devinfo->function.audio.as; + for (i = 0; i < devinfo->function.audio.ascnt; i++) { + if (as[i].hpredir < 0) + continue; + + w = hdac_widget_get(devinfo, as[i].pins[15]); + if (w == NULL || w->enable == 0 || w->type != + HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) + continue; - timeout = 10000; - do { res = hdac_command(sc, - HDA_CMD_GET_PIN_SENSE(cad, hdac_hp_switch[i].hpnid), - cad); - if (hdac_hp_switch[i].execsense == -1 || res != 0x7fffffff) - break; - DELAY(10); - } while (--timeout != 0); + HDA_CMD_GET_PIN_SENSE(cad, as[i].pins[15]), cad); - HDA_BOOTVERBOSE( - device_printf(sc->dev, - "HDA_DEBUG: Pin sense: nid=%d timeout=%d res=0x%08x\n", - hdac_hp_switch[i].hpnid, timeout, res); - ); + HDA_BOOTVERBOSE( + device_printf(sc->dev, + "Pin sense: nid=%d res=0x%08x\n", + as[i].pins[15], res); + ); - res = HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT(res); - res ^= hdac_hp_switch[i].inverted; + res = HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT(res); + if (devinfo->function.audio.quirks & HDA_QUIRK_SENSEINV) + res ^= 1; - switch (hdac_hp_switch[i].type) { - case HDAC_HP_SWITCH_CTL: + /* (Un)Mute headphone pin. */ ctl = hdac_audio_ctl_amp_get(devinfo, - hdac_hp_switch[i].hpnid, 0, 1); - if (ctl != NULL) { - val = (res != 0 && forcemute == 0) ? - HDA_AMP_MUTE_NONE : HDA_AMP_MUTE_ALL; - if (val != ctl->muted) { - ctl->muted = val; + as[i].pins[15], HDA_CTL_IN, -1, 1); + if (ctl != NULL && ctl->mute) { + /* If pin has muter - use it. */ + val = (res != 0) ? 0 : 1; + if (val != ctl->forcemute) { + ctl->forcemute = val; hdac_audio_ctl_amp_set(ctl, - HDA_AMP_MUTE_DEFAULT, ctl->left, - ctl->right); + HDA_AMP_MUTE_DEFAULT, + HDA_AMP_VOL_DEFAULT, HDA_AMP_VOL_DEFAULT); } - } - for (j = 0; hdac_hp_switch[i].spkrnid[j] != -1; j++) { - ctl = hdac_audio_ctl_amp_get(devinfo, - hdac_hp_switch[i].spkrnid[j], 0, 1); - if (ctl == NULL) - continue; - val = (res != 0 || forcemute == 1) ? - HDA_AMP_MUTE_ALL : HDA_AMP_MUTE_NONE; - if (val == ctl->muted) - continue; - ctl->muted = val; - hdac_audio_ctl_amp_set(ctl, HDA_AMP_MUTE_DEFAULT, - ctl->left, ctl->right); - } - break; - case HDAC_HP_SWITCH_CTRL: - if (res != 0) { - /* HP in */ - w = hdac_widget_get(devinfo, hdac_hp_switch[i].hpnid); + } else { + /* If there is no muter - disable pin output. */ + w = hdac_widget_get(devinfo, as[i].pins[15]); if (w != NULL && w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) { - if (forcemute == 0) + if (res != 0) val = w->wclass.pin.ctrl | *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 15:31:47 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D011106567A; Wed, 7 Jan 2009 15:31:47 +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 49BA28FC13; Wed, 7 Jan 2009 15:31:47 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07FVlE0090819; Wed, 7 Jan 2009 15:31:47 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07FVlNx090816; Wed, 7 Jan 2009 15:31:47 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901071531.n07FVlNx090816@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 7 Jan 2009 15:31:47 +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: r186863 - in stable/7: etc etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 15:31:48 -0000 Author: bz Date: Wed Jan 7 15:31:46 2009 New Revision: 186863 URL: http://svn.freebsd.org/changeset/base/186863 Log: MFC: r183100 Allow a jail to be started with a specific route fib. Modified: stable/7/etc/ (props changed) stable/7/etc/defaults/rc.conf stable/7/etc/rc.d/jail stable/7/share/man/man5/ (props changed) stable/7/share/man/man5/rc.conf.5 Modified: stable/7/etc/defaults/rc.conf ============================================================================== --- stable/7/etc/defaults/rc.conf Wed Jan 7 15:28:47 2009 (r186862) +++ stable/7/etc/defaults/rc.conf Wed Jan 7 15:31:46 2009 (r186863) @@ -622,6 +622,7 @@ jail_sysvipc_allow="NO" # Allow SystemV #jail_example_hostname="default.domain.com" # Jail's hostname #jail_example_ip="192.168.0.10" # Jail's IP number #jail_example_interface="" # Interface to create the IP alias on +#jail_example_fib="0" # routing table for setfib(1) #jail_example_exec_start="/bin/sh /etc/rc" # command to execute in jail for starting #jail_example_exec_afterstart0="/bin/sh command" # command to execute after the one for # starting the jail. More than one can be Modified: stable/7/etc/rc.d/jail ============================================================================== --- stable/7/etc/rc.d/jail Wed Jan 7 15:28:47 2009 (r186862) +++ stable/7/etc/rc.d/jail Wed Jan 7 15:31:46 2009 (r186863) @@ -83,6 +83,7 @@ init_variables() [ -z "${_flags}" ] && _flags="-l -U root" eval _consolelog=\"\${jail_${_j}_consolelog:-${jail_consolelog}}\" [ -z "${_consolelog}" ] && _consolelog="/var/log/jail_${_j}_console.log" + eval _fib=\"\${jail_${_j}_fib:-${jail_fib}}\" # Debugging aid # @@ -93,6 +94,7 @@ init_variables() debug "$_j hostname: $_hostname" debug "$_j ip: $_ip" debug "$_j interface: $_interface" + debug "$_j fib: $_fib" debug "$_j root: $_rootdir" debug "$_j devdir: $_devdir" debug "$_j fdescdir: $_fdescdir" @@ -297,6 +299,11 @@ jail_start() if [ -n "${_interface}" ]; then ifconfig ${_interface} alias ${_ip} netmask 255.255.255.255 fi + if [ -n "${_fib}" ]; then + _setfib="setfib -F '${_fib}'" + else + _setfib="" + fi if checkyesno _mount; then info "Mounting fstab for jail ${_jail} (${_fstab})" if [ ! -f "${_fstab}" ]; then @@ -350,7 +357,7 @@ jail_start() fi fi _tmp_jail=${_tmp_dir}/jail.$$ - eval jail ${_flags} -i ${_rootdir} ${_hostname} \ + eval ${_setfib} jail ${_flags} -i ${_rootdir} ${_hostname} \ ${_ip} ${_exec_start} > ${_tmp_jail} 2>&1 if [ "$?" -eq 0 ] ; then Modified: stable/7/share/man/man5/rc.conf.5 ============================================================================== --- stable/7/share/man/man5/rc.conf.5 Wed Jan 7 15:28:47 2009 (r186862) +++ stable/7/share/man/man5/rc.conf.5 Wed Jan 7 15:31:46 2009 (r186863) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 6, 2008 +.Dd September 16, 2008 .Dt RC.CONF 5 .Os .Sh NAME @@ -3412,6 +3412,11 @@ These are flags to pass to Unset by default. When set, sets the interface to use when setting IP address alias. Note that the alias is created at jail startup and removed at jail shutdown. +.It Va jail_ Ns Ao Ar jname Ac Ns Va _fib +.Pq Vt str +Unset by default. +When set, the jail is started with the specified routing table via +.Xr setfib 1 . .It Va jail_ Ns Ao Ar jname Ac Ns Va _fstab .Pq Vt str Set to From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 16:15:17 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63093106564A; Wed, 7 Jan 2009 16:15: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 4EC308FC12; Wed, 7 Jan 2009 16:15:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07GFH6q091779; Wed, 7 Jan 2009 16:15:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07GFHxE091777; Wed, 7 Jan 2009 16:15:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071615.n07GFHxE091777@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 16:15:17 +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: r186866 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 16:15:18 -0000 Author: mav Date: Wed Jan 7 16:15:17 2009 New Revision: 186866 URL: http://svn.freebsd.org/changeset/base/186866 Log: Sync snd_hda and snd_ich man pages with CURRENT. Modified: stable/7/share/man/man4/snd_hda.4 stable/7/share/man/man4/snd_ich.4 Modified: stable/7/share/man/man4/snd_hda.4 ============================================================================== --- stable/7/share/man/man4/snd_hda.4 Wed Jan 7 16:06:09 2009 (r186865) +++ stable/7/share/man/man4/snd_hda.4 Wed Jan 7 16:15:17 2009 (r186866) @@ -1,4 +1,5 @@ -.\" Copyright (c) 2006 Joel Dahl +.\" Copyright (c) 2006-2008 Joel Dahl +.\" Copyright (c) 2008 Alexander Motin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2007 +.Dd January 7, 2009 .Dt SND_HDA 4 .Os .Sh NAME @@ -45,40 +46,52 @@ following line in snd_hda_load="YES" .Ed .Sh DESCRIPTION +The High Definition (HD) Audio specification was developed by Intel as the +logical successor of the old AC'97 specification and has several advantages, +such as higher bandwidth which allows more channels and more detailed formats, +support for several logical audio devices, and general purpose DMA channels. +.Pp The .Nm -bridge device driver allows the generic audio driver, +driver is a HDA bus controller driver and HDA codecs audio functions bridge +driver that allows the generic audio driver, .Xr sound 4 , -to attach to Intel High Definition Audio devices. +to be used with this hardware. +Only audio functions are supported by +.Nm . +Modem, HDMI and other possible functions are not implemented. +.Pp The .Nm driver supports hardware that conforms with revision 1.0 of the Intel High Definition Audio specification and tries to behave much like the Microsoft Universal Audio Architecture (UAA) draft (revision 0.7b) for handling audio devices. -HDA acts like a primary bus, similar to -.Xr miibus 4 , -for handling various child buses such as audio, modem and HDMI (High Definition -Multimedia Interface). -Only audio is implemented in the -.Nm -driver. .Pp -The High Definition (HD) Audio specification was developed by Intel as the -logical successor of the old AC'97 specification and has several advantages, -such as higher bandwidth which allows more channels and more detailed formats, -support for several logical audio devices, and general purpose DMA channels. +According to HDA and UAA specifications, depending on the number of HDA buses +and codecs present in system, their audio capabilities and BIOS provided +configuration, the +.Nm +driver often provides several PCM audio devices. +For example, one device for main rear 7.1 output and inputs, one device +for independent headset connectors at front and one device for SPDIF or +HDMI audio input/output. +The assignment of audio inputs and outputs may be tuned with +.Xr device.hints 5 . +The driver's verbose boot messages provide a lot of information about +the operation of the driver and present audio setup. .Pp -The HDA specification defines the register-level interface, physical link -characteristics, codec programming models, and codec architectural components. -This specification is intended for both device driver developers and hardware -component designers. +The default audio device may be tuned by setting the +.Ar hw.snd.default_unit +sysctl, as described in +.Xr sound 4 , +or explicitly specified in application settings. .Ss Boot-time Configuration The following variables are available at boot-time through the .Xr device.hints 5 file: -.Bl -tag -width ".Va hint.pcm.%d.config" -offset indent -.It Va hint.pcm.%d.config +.Bl -tag -width ".Va hint.hdac.%d.config"-offset indent +.It Va hint.hdac.%d.config Configures a range of possible options. Possible values are: .Dq Li dmapos , @@ -102,6 +115,7 @@ Possible values are: .Dq Li ovref50 , .Dq Li ovref80 , .Dq Li ovref100 , +.Dq Li senseinv , .Dq Li softpcmvol , and .Dq Li vref . @@ -111,6 +125,145 @@ such as .Dq Li nofixedrate , will do the opposite and takes precedence. Options can be separated by whitespace and commas. +.Dq Li GPIO Ns s +are a codec's General Purpose I/O pins which system integrators sometimes +use to control external muters, amplifiers and so on. +If you have no sound, or sound volume is not adequate, you may have to +experiment a bit with the GPIO setup to find the optimal setup for your +system. +The +.Dq Li ivref Ns Ar X +and +.Dq Li ovref Ns Ar X +options control the voltage used to power external microphones. +.It Va hint.hdac.%d.msi +Controls MSI (Message Signaled Interrupts) support. +.It Va hint.hdac.%d.cad%d.nid%d.config +Overrides codec pin configuration set by BIOS. +May be specified as a 32-bit hexadecimal value with a leading +.Dq 0x , +or as a set of space-separated +.Dq Ar option Ns = Ns Ar value +pairs. +.El +.Pp +Pin configuration is the UAA driver's main source of information about codec +usage. +This information is usually provided by the codec manufacturer and tuned +by system integrators for specific system requirements. +The +.Nm +driver allows users to override it to fix integrator mistakes or to use the +available codec in alternative ways (for example to get stereo output and 2 +inputs instead of a single 5.1 output). +.Pp +The following options are supported: +.Bl -tag -width ".Va device=" -offset indent +.It Va as +Association number. +Associations are used to group individual pins to form a complex multi-pin +device. +For example, to group 4 connectors for 7.1 output, or to treat several +input connectors as sources for the same input device. +Association numbers can be specified as numeric values from 0 to 15. +A value of 0 means disabled pin. +A value of 15 is a set of independent unassociated pins. +Each association includes only pins of the same direction (in/out) and is +detected atomically (all pins or none). +A separate PCM audio device is created for every pair of input and +output associations. +.It Va seq +Sequence number. +A unique, per-association number used to order pins inside the +particular association. +Sequence numbers can be specified as numeric values from 0 to 15. +.Pp +The sequence number 15 has a special meaning for output associations. +Output pins with this number and device type +.Dq Ar Headphones +will duplicate (with automatic mute if jack detection is supported) the +first pin in that association. +.It Va device +Device type. +Can be specified as a number from 0 to 15 or as a name: +.Dq Li Line-out , +.Dq Li Speaker , +.Dq Li Headphones, +.Dq Li CD , +.Dq Li SPDIF-out , +.Dq Li Digital-out , +.Dq Li Modem-line , +.Dq Li Modem-handset , +.Dq Li Line-in , +.Dq Li AUX , +.Dq Li Mic , +.Dq Li Telephony , +.Dq Li SPDIF-in , +.Dq Li Digital-in , +.Dq Li Res.E , +or +.Dq Li Other . +The device type also describes the pin direction (in/out). +For example, +.Dq Li CD +always means an input pin, while +.Dq Li Headphones +always means an output. +.It Va conn +Connection type. +Can be specified as a number from 0 to 3. +The connection type can also be specified as one of the special names +.Dq Li Jack , +.Dq Li None , +.Dq Li Fixed , +or +.Dq Li Both . +Pins with a connection type of +.Dq Li None +are disabled. +.It Va ctype +Connector physical type. +Can be specified as a number from 0 to 15. +This is a reference only value. +It is ignored by the +.Nm +driver. +.It Va color +Connector color. +Can be specified as a number from 0 to 15 or as one of the names +.Dq Li Unknown , +.Dq Li Black , +.Dq Li Grey , +.Dq Li Blue , +.Dq Li Green , +.Dq Li Red , +.Dq Li Orange , +.Dq Li Yellow , +.Dq Li Purple , +.Dq Li Pink , +.Dq Li Res.A , +.Dq Li Res.B , +.Dq Li Res.C , +.Dq Li Res.D , +.Dq Li White , +or +.Dq Li Other . +This is a reference only value. +It is ignored by the +.Nm +driver. +.It Va loc +Connector physical location. +Can be specified as a number from 0 to 63. +This is a reference only value. +It is ignored by the +.Nm +driver. +.It Va misc +Misc bits. +Can be specified as a number from 0 to 15. +Bit 0 has a special meaning. When set it means that jack detection is +not implemented in hardware. .El .Ss Runtime Configuration The following @@ -118,19 +271,192 @@ The following variables are available in addition to those available to all .Xr sound 4 devices: -.Bl -tag -width ".Va dev.pcm.%d.polling" -offset indent -.It Va dev.pcm.%d.polling -Experimental polling mode, where the driver operates by querying the device -state on each tick using -.Xr callout 9 . +.Bl -tag -width ".Va dev.hdac.%d.polling" -offset indent +.It Va dev.hdac.%d.polling +Enables polling mode. +In this mode the driver operates by querying the device state on timer +ticks using +.Xr callout 9 +instead of interrupts. Polling is disabled by default. Do not enable it unless you are facing weird interrupt problems or if the device cannot generate interrupts at all. +.It Va dev.hdac.%d.polling_interval +Controller/Jack Sense polling interval (1-1000 ms) +.It Va dev.hdac.%d.pindump +Setting this to a non-zero value dumps the current pin configuration, main +capabilities and jack sense status to console and syslog. .El +.Sh EXAMPLES +Taking HP Compaq DX2300 with Realtek ALC888 HDA codec for example. +This system has two audio connectors on a front side, three audio connectors +on a rear side and one internal speaker. +According to verbose driver output and the codec datasheet, +this codec has five stereo DACs and two stereo ADCs, all of them are routable to +any codec pin (external connector). +All codec pins are reversible (could be configured either as input or output). +.Pp +So high codec uniformity and flexibility allow driver to configure it in many +different ways, depending on requested pins usage decribed by pins configuration. +Driver reports such default pin configuration when verbose messages enabled: +.Bd -literal +hdac0: nid 20 0x01014020 as 2 seq 0 Line-out Jack jack 1 loc 1 color Green misc 0 +hdac0: nid 21 0x99130110 as 1 seq 0 Speaker Fixed jack 3 loc 25 color Unknown misc 1 +hdac0: nid 22 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 +hdac0: nid 23 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 +hdac0: nid 24 0x01a19830 as 3 seq 0 Mic Jack jack 1 loc 1 color Pink misc 8 +hdac0: nid 25 0x02a1983f as 3 seq 15 Mic Jack jack 1 loc 2 color Pink misc 8 +hdac0: nid 26 0x01813031 as 3 seq 1 Line-in Jack jack 1 loc 1 color Blue misc 0 +hdac0: nid 27 0x0221401f as 1 seq 15 Headphones Jack jack 1 loc 2 color Green misc 0 +hdac0: nid 28 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 +hdac0: nid 30 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 +hdac0: nid 31 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 +.Ed +.Pp +Here we can see, that the nodes with ID (nid) 25 and 27 are front pannel +connectors (Jack, loc 2), nids 20, 24 and 26 are rear pannel connectors +(Jack, loc 1) and nid 21 is a built-in speaker (Fixed, loc 25). +Pins with nids 22, 23, 28, 30 and 31 will be disabled by driver due to "None" +connectivity. So the pin count and description matches to connectors that +we have. +.Pp +Using association (as) and sequence (seq) fields values pins are grouped into +3 associations: +.Bd -literal +hdac0: Association 0 (1) out: +hdac0: Pin nid=21 seq=0 +hdac0: Pin nid=27 seq=15 +hdac0: Association 1 (2) out: +hdac0: Pin nid=20 seq=0 +hdac0: Association 2 (3) in: +hdac0: Pin nid=24 seq=0 +hdac0: Pin nid=26 seq=1 +hdac0: Pin nid=25 seq=15 +.Ed +.Pp +Each +.Xr pcm 4 +device uses two associations: one for playback and one for recording. +Associations processed and assigned to +.Xr pcm 4 +devices in increasing numerical order. +In this case association #0 (1) will become +.Li pcm0 +device playback, using the internal speakers and +.Ar Headphones +jack with speaker automute on the headphones jack connection. +Association #1 (2) will become +.Li pcm1 +playback, using the +.Ar Line-out +jack. +Association #2 (3) will become +.Li pcm0 +recording, using the external microphones and the +.Ar Line-in +jack. +.Pp +The +.Nm +driver provides extensive verbose messages to diagnose its operation +logic and describe its current codec configuration. +.Pp +Using +.Xr device.hints 5 +it is possible to modify the configuration of the existing pins, +allowing a broad range of different audio setups. +Here are a few examples of some setups possible for this particular +hardware: +.Ss Example 1 +Setting the +.Xr device.hints 5 +options +.Bd -literal +hint.hdac.0.cad0.nid20.config="as=1" +hint.hdac.0.cad0.nid21.config="as=2" +.Ed +.Pp +will swap line-out and speaker functions. +So the +.Li pcm0 +device will play to the line-out and headphones jacks. Line-out will +be muted on the headphones jack connection. +Recording on +.Li pcm0 +will go from two external microphones and line-in jacks. +.Li pcm1 +playback will go to the internal speaker. +.Pp +.Ss Example 2 +Setting the +.Xr device.hints 5 +options +.Bd -literal +hint.hdac.0.cad0.nid20.config="as=1 seq=15 device=Headphones" +hint.hdac.0.cad0.nid27.config="as=2 seq=0" +hint.hdac.0.cad0.nid25.config="as=4 seq=0" +.Ed +.Pp +will split the headphones and one of the microphones to a separate device. +The +.Li pcm0 +device will play to the internal speaker and to the line-out jack, with +speaker automute on the line-out jack connection. +Recording on +.Li pcm0 +will use input from one external microphone and the line-in jacks. +The +.Li pcm1 +device will be completely dedicated to a headset (headphones and mic) +connected to the front connectors. +.Pp +.Ss Example 3 +Setting the +.Xr device.hints 5 +options +.Bd -literal +hint.hdac.0.cad0.nid20.config="as=1 seq=0" +hint.hdac.0.cad0.nid26.config="as=2 seq=0" +hint.hdac.0.cad0.nid27.config="as=3 seq=0" +hint.hdac.0.cad0.nid25.config="as=4 seq=0" +hint.hdac.0.cad0.nid24.config="as=5 seq=0 device=Line-out" +hint.hdac.0.cad0.nid21.config="as=6 seq=0" +.Ed +.Pp +will give 4 independent devices: +.Li pcm0 +.Pq line-out and line-in , +.Li pcm1 +.Pq headphones and mic , +.Li pcm2 +.Pq additional line-out via retasked rear mic jack , +and +.Li pcm3 +.Pq internal speaker . +.Pp +.Ss Example 4 +Setting the +.Xr device.hints 5 +options +.Bd -literal +hint.hdac.0.cad0.nid20.config="as=1 seq=0" +hint.hdac.0.cad0.nid24.config="as=1 seq=1 device=Line-out" +hint.hdac.0.cad0.nid26.config="as=1 seq=2 device=Line-out" +hint.hdac.0.cad0.nid21.config="as=2 seq=0" +.Ed +.Pp +will give 2 devices: +.Li pcm0 +for 5.1 playback via 3 rear connectors (line-out and retasked +mic and line-in) and headset (headphones and mic) at front connectors. +.Li pcm1 +for internal speaker playback. +On headphones connection rear connectors will be muted. .Sh HARDWARE The .Nm -driver supports the following audio chipsets: +driver supports many Intel HDA compatible audio chipsets including the +following: .Pp .Bl -bullet -compact .It @@ -140,13 +466,17 @@ ATI SB600 .It Intel 631x/632xESB .It -Intel 82801F +Intel 82801F (ICH6) +.It +Intel 82801G (ICH7) .It -Intel 82801G +Intel 82801H (ICH8) .It -Intel 82801H +Intel 82801I (ICH9) .It -Intel 82801I +Intel 82801J (ICH10) +.It +Intel US15W (SCH) .It nVidia MCP51 .It @@ -156,18 +486,26 @@ nVidia MCP61A .It nVidia MCP61B .It +nVidia MCP63 +.It nVidia MCP65A .It nVidia MCP65B .It +nVidia MCP67A +.It +nVidia MCP67B +.It +nVidia MCP68 +.It +nVidia MCP69 +.It SiS 966 .It VIA VT8251/8237A .El .Pp -Generic audio chipsets compatible with the Intel HDA specification should work, -but have not been verified yet. -The following codecs have been verified to work: +The following and many other codecs have been verified to work: .Pp .Bl -bullet -compact .It @@ -175,6 +513,8 @@ Analog Devices AD1981HD .It Analog Devices AD1983 .It +Analog Devices AD1984 +.It Analog Devices AD1986A .It Analog Devices AD1988 @@ -183,9 +523,11 @@ Analog Devices AD1988B .It CMedia CMI9880 .It -Conexant Venice +Conexant CX20549 (Venice) .It -Conexant Waikiki +Conexant CX20551 (Waikiki) +.It +Conexant CX20561 (Hermosa) .It Realtek ALC260 .It @@ -209,24 +551,47 @@ Realtek ALC885 .It Realtek ALC888 .It +Realtek ALC889 +.It +Sigmatel STAC9205 +.It Sigmatel STAC9220 .It -Sigmatel STAC9220D/9223D +Sigmatel STAC9220D / 9223D .It Sigmatel STAC9221 .It Sigmatel STAC9221D .It -Sigmatel STAC9227 +Sigmatel STAC9227D +.It +Sigmatel STAC9227X +.It +Sigmatel STAC9228D +.It +Sigmatel STAC9228X +.It +Sigmatel STAC9229D +.It +Sigmatel STAC9229X +.It +Sigmatel STAC9230D +.It +Sigmatel STAC9230X .It Sigmatel STAC9271D .It +Sigmatel STAC9872AK +.It VIA VT1708 .It +VIA VT1708B +.It VIA VT1709 .El .Sh SEE ALSO .Xr sound 4 , +.Xr snd_ich 4 , .Xr device.hints 5 , .Xr loader.conf 5 , .Xr sysctl 8 @@ -240,18 +605,26 @@ device driver first appeared in The .Nm driver was written by -.An Stephane E. Potvin Aq sepotvin@videotron.ca +.An Stephane E. Potvin Aq sepotvin@videotron.ca , +.An Ariff Abdullah Aq ariff@FreeBSD.org and -.An Ariff Abdullah Aq ariff@FreeBSD.org . +.An Alexander Motin Aq mav@FreeBSD.org . This manual page was written by -.An Joel Dahl Aq joel@FreeBSD.org . +.An Joel Dahl Aq joel@FreeBSD.org , +.An Alexander Motin Aq mav@FreeBSD.org +and +.An Giorgos Keramidas Aq keramida@FreeBSD.org . .Sh BUGS -There are a couple of missing features, such as support for Digital -S/PDIF and multichannel output. -.Pp A few Hardware/OEM vendors tend to screw up BIOS settings, thus rendering the .Nm driver useless, which usually results in a state where the .Nm -driver seems to attach and work, but without any sound. +driver seems to attach and work, but without any sound. Some of +that cases can be solved by tuning loader.conf variables. But before +trying to fix problem that way, make sure that problem is really exists +and the PCM audio device you are using really corresponds to expected +audio connector. +.Pp +Due to OSS limitation multichannel (not multidevice) playback is not +supported. Modified: stable/7/share/man/man4/snd_ich.4 ============================================================================== --- stable/7/share/man/man4/snd_ich.4 Wed Jan 7 16:06:09 2009 (r186865) +++ stable/7/share/man/man4/snd_ich.4 Wed Jan 7 16:15:17 2009 (r186866) @@ -24,12 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd December 15, 2005 +.Dd January 6, 2009 .Dt SND_ICH 4 .Os .Sh NAME .Nm snd_ich -.Nd "Intel ICH PCI and compatible bridge device driver" +.Nd "Intel ICH AC'97 and compatible bridge device driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -49,7 +49,12 @@ The .Nm bridge driver allows the generic audio driver .Xr sound 4 -to attach to Intel ICH and compatible audio devices. +to attach to Intel ICH AC'97 and compatible audio devices. +.Pp +Some later chips, like ICH6/ICH7, depending on wiring can instead implement +newer Intel HD Audio specification, which is supported by +.Xr snd_hda 4 +driver. .Sh HARDWARE The .Nm @@ -94,7 +99,8 @@ NVIDIA nForce4 SiS 7012 .El .Sh SEE ALSO -.Xr sound 4 +.Xr sound 4 , +.Xr snd_hda 4 .Sh HISTORY The .Nm From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 16:21:04 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C64021065670; Wed, 7 Jan 2009 16:21:04 +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 B2B528FC1A; Wed, 7 Jan 2009 16:21:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07GL4wp091954; Wed, 7 Jan 2009 16:21:04 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07GL48I091953; Wed, 7 Jan 2009 16:21:04 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071621.n07GL48I091953@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 16:21:04 +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: r186867 - in stable/7/sys: . conf contrib/pf dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 16:21:05 -0000 Author: mav Date: Wed Jan 7 16:21:04 2009 New Revision: 186867 URL: http://svn.freebsd.org/changeset/base/186867 Log: MFC rev. 186828 Add small hint that snd_ich is the AC'97 controller driver. Modified: stable/7/sys/ (props changed) stable/7/sys/conf/NOTES stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/conf/NOTES ============================================================================== --- stable/7/sys/conf/NOTES Wed Jan 7 16:15:17 2009 (r186866) +++ stable/7/sys/conf/NOTES Wed Jan 7 16:21:04 2009 (r186867) @@ -2010,7 +2010,7 @@ device sound # snd_gusc: Gravis UltraSound ISA PnP/non-PnP. # snd_hda: Intel High Definition Audio (Controller) and # compatible. -# snd_ich: Intel ICH PCI and some more audio controllers +# snd_ich: Intel ICH AC'97 and some more audio controllers # embedded in a chipset, for example nVidia # nForce controllers. # snd_maestro: ESS Technology Maestro-1/2x PCI. From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 16:35:59 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C76F1065676; Wed, 7 Jan 2009 16:35:59 +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 8805D8FC1A; Wed, 7 Jan 2009 16:35:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07GZxWC092374; Wed, 7 Jan 2009 16:35:59 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07GZxei092373; Wed, 7 Jan 2009 16:35:59 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071635.n07GZxei092373@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 16:35:59 +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: r186868 - stable/7 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 16:36:03 -0000 Author: mav Date: Wed Jan 7 16:35:59 2009 New Revision: 186868 URL: http://svn.freebsd.org/changeset/base/186868 Log: snd_hda(4) driver was updated to version 20081226_0122. Modified: stable/7/UPDATING Modified: stable/7/UPDATING ============================================================================== --- stable/7/UPDATING Wed Jan 7 16:21:04 2009 (r186867) +++ stable/7/UPDATING Wed Jan 7 16:35:59 2009 (r186868) @@ -8,6 +8,17 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20090107: + snd_hda(4) driver was updated to version 20081226_0122. + + Due to added HDMI audio and logical audio devices support, updated + driver often provides several PCM devices. In some cases it can make + system default audio device no longer correspond to the users's + habbitual audio connectors. In such cases wanted device can be + specified in audio application setup or defined globally via + hw.snd.default_unit sysctl according to sound(4) and snd_hda(4) + man pages. + 20080903: ntpd has been upgraded to 4.2.4p5. From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 18:02:36 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4EC2106566C; Wed, 7 Jan 2009 18:02:36 +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 C16958FC1C; Wed, 7 Jan 2009 18:02:36 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07I2aVq094381; Wed, 7 Jan 2009 18:02:36 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07I2a4q094380; Wed, 7 Jan 2009 18:02:36 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200901071802.n07I2a4q094380@svn.freebsd.org> From: Maxim Konovalov Date: Wed, 7 Jan 2009 18:02:36 +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: r186869 - stable/7/share/misc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 18:02:37 -0000 Author: maxim Date: Wed Jan 7 18:02:36 2009 New Revision: 186869 URL: http://svn.freebsd.org/changeset/base/186869 Log: MFC r176637,178706,180757,184517,185405,186785: Mac OS X 10.5, DragonFly 1.12.0, FreeBSD 7.0, OpenBSD 4.3, DragonFly 2.0.0, OpenBSD 4.4, FreeBSD 6.4, FreeBSD 7.1. Modified: stable/7/share/misc/bsd-family-tree Modified: stable/7/share/misc/bsd-family-tree ============================================================================== --- stable/7/share/misc/bsd-family-tree Wed Jan 7 16:35:59 2009 (r186868) +++ stable/7/share/misc/bsd-family-tree Wed Jan 7 18:02:36 2009 (r186869) @@ -169,8 +169,8 @@ FreeBSD 4.0 | | | | | NetBSD 1. | FreeBSD 4.10 | | | | | | | | | | | FreeBSD 4.11 | | | | - | | | | | | - | v `-|------|-----------------|---------------------. + | | | | | + | `-|------|-----------------|---------------------. | | | | \ FreeBSD 5.0 | | | | | | | | | @@ -212,12 +212,24 @@ FreeBSD 5.2 | | | | | | | DragonFly 1.8.0 | | | | OpenBSD 4.1 | | | | | | DragonFly 1.10.0 + | | Mac OS X | | | + | | 10.5 | | | | | | | OpenBSD 4.2 | | | | NetBSD 4.0 | | | FreeBSD 6.3 | | | | + | \ | | | | + *--FreeBSD | | | | DragonFly 1.12.0 + | 7.0 | | | | | + | | | | | OpenBSD 4.3 | + | | | | | | DragonFly 2.0.0 + | | FreeBSD | | OpenBSD 4.4 | + | | 6.4 | | | | + | | | | | | + | FreeBSD 7.1 | | | | + | | | | | | + | V | | | | | | | | | - | | | | | -FreeBSD 7 -current | NetBSD -current OpenBSD -current | +FreeBSD 8 -current | NetBSD -current OpenBSD -current | | | | | | v v v v v @@ -472,9 +484,17 @@ FreeBSD 6.2 2007-01-15 [FBD] DragonFly 1.8.0 2007-01-30 [DFB] OpenBSD 4.1 2007-05-01 [OBD] DragonFly 1.10.0 2007-08-06 [DFB] +Mac OS X 10.5 2007-10-26 [APL] OpenBSD 4.2 2007-11-01 [OBD] NetBSD 4.0 2007-12-19 [NBD] FreeBSD 6.3 2008-01-18 [FBD] +DragonFly 1.12.0 2008-02-26 [DFB] +FreeBSD 7.0 2008-02-27 [FBD] +OpenBSD 4.3 2008-05-01 [OBD] +DragonFly 2.0.0 2008-07-21 [DFB] +OpenBSD 4.4 2008-11-01 [OBD] +FreeBSD 6.4 2008-11-28 [FBD] +FreeBSD 7.1 2009-01-04 [FBD] Bibliography ------------------------ From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 20:17:56 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FDBF10656C9; Wed, 7 Jan 2009 20:17:56 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66E588FC1D; Wed, 7 Jan 2009 20:17:56 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07KHupx098456; Wed, 7 Jan 2009 20:17:56 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07KHtNq098443; Wed, 7 Jan 2009 20:17:55 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200901072017.n07KHtNq098443@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 7 Jan 2009 20:17:55 +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: r186872 - head/contrib/lukemftpd/src head/crypto/openssl/apps head/crypto/openssl/ssl releng/6.3 releng/6.3/contrib/lukemftpd/src releng/6.3/crypto/openssl/apps releng/6.3/crypto/openss... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 20:17:58 -0000 Author: simon Date: Wed Jan 7 20:17:55 2009 New Revision: 186872 URL: http://svn.freebsd.org/changeset/base/186872 Log: Prevent cross-site forgery attacks on lukemftpd(8) due to splitting long commands into multiple requests. [09:01] Fix incorrect OpenSSL checks for malformed signatures due to invalid check of return value from EVP_VerifyFinal(), DSA_verify, and DSA_do_verify. [09:02] Security: FreeBSD-SA-09:01.lukemftpd Security: FreeBSD-SA-09:02.openssl Obtained from: NetBSD [SA-09:01] Obtained from: OpenSSL Project [SA-09:02] Approved by: so (simon) Modified: stable/7/contrib/lukemftpd/src/extern.h stable/7/contrib/lukemftpd/src/ftpcmd.y stable/7/contrib/lukemftpd/src/ftpd.c stable/7/crypto/openssl/apps/speed.c stable/7/crypto/openssl/apps/spkac.c stable/7/crypto/openssl/apps/verify.c stable/7/crypto/openssl/apps/x509.c stable/7/crypto/openssl/ssl/s2_clnt.c stable/7/crypto/openssl/ssl/s2_srvr.c stable/7/crypto/openssl/ssl/s3_clnt.c stable/7/crypto/openssl/ssl/s3_srvr.c stable/7/crypto/openssl/ssl/ssltest.c Changes in other areas also in this revision: Modified: head/contrib/lukemftpd/src/extern.h head/contrib/lukemftpd/src/ftpcmd.y head/contrib/lukemftpd/src/ftpd.c head/crypto/openssl/apps/speed.c head/crypto/openssl/apps/spkac.c head/crypto/openssl/apps/verify.c head/crypto/openssl/apps/x509.c head/crypto/openssl/ssl/s2_clnt.c head/crypto/openssl/ssl/s2_srvr.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/ssltest.c releng/6.3/UPDATING releng/6.3/contrib/lukemftpd/src/extern.h releng/6.3/contrib/lukemftpd/src/ftpcmd.y releng/6.3/contrib/lukemftpd/src/ftpd.c releng/6.3/crypto/openssl/apps/speed.c releng/6.3/crypto/openssl/apps/spkac.c releng/6.3/crypto/openssl/apps/verify.c releng/6.3/crypto/openssl/apps/x509.c releng/6.3/crypto/openssl/ssl/s2_clnt.c releng/6.3/crypto/openssl/ssl/s2_srvr.c releng/6.3/crypto/openssl/ssl/s3_clnt.c releng/6.3/crypto/openssl/ssl/s3_srvr.c releng/6.3/sys/conf/newvers.sh releng/6.4/UPDATING releng/6.4/contrib/lukemftpd/src/extern.h releng/6.4/contrib/lukemftpd/src/ftpcmd.y releng/6.4/contrib/lukemftpd/src/ftpd.c releng/6.4/crypto/openssl/apps/speed.c releng/6.4/crypto/openssl/apps/spkac.c releng/6.4/crypto/openssl/apps/verify.c releng/6.4/crypto/openssl/apps/x509.c releng/6.4/crypto/openssl/ssl/s2_clnt.c releng/6.4/crypto/openssl/ssl/s2_srvr.c releng/6.4/crypto/openssl/ssl/s3_clnt.c releng/6.4/crypto/openssl/ssl/s3_srvr.c releng/6.4/sys/conf/newvers.sh releng/7.0/UPDATING releng/7.0/contrib/lukemftpd/src/extern.h releng/7.0/contrib/lukemftpd/src/ftpcmd.y releng/7.0/contrib/lukemftpd/src/ftpd.c releng/7.0/crypto/openssl/apps/speed.c releng/7.0/crypto/openssl/apps/spkac.c releng/7.0/crypto/openssl/apps/verify.c releng/7.0/crypto/openssl/apps/x509.c releng/7.0/crypto/openssl/ssl/s2_clnt.c releng/7.0/crypto/openssl/ssl/s2_srvr.c releng/7.0/crypto/openssl/ssl/s3_clnt.c releng/7.0/crypto/openssl/ssl/s3_srvr.c releng/7.0/crypto/openssl/ssl/ssltest.c releng/7.0/sys/conf/newvers.sh releng/7.1/UPDATING releng/7.1/contrib/lukemftpd/src/extern.h releng/7.1/contrib/lukemftpd/src/ftpcmd.y releng/7.1/contrib/lukemftpd/src/ftpd.c releng/7.1/crypto/openssl/apps/speed.c releng/7.1/crypto/openssl/apps/spkac.c releng/7.1/crypto/openssl/apps/verify.c releng/7.1/crypto/openssl/apps/x509.c releng/7.1/crypto/openssl/ssl/s2_clnt.c releng/7.1/crypto/openssl/ssl/s2_srvr.c releng/7.1/crypto/openssl/ssl/s3_clnt.c releng/7.1/crypto/openssl/ssl/s3_srvr.c releng/7.1/crypto/openssl/ssl/ssltest.c releng/7.1/sys/conf/newvers.sh stable/6/contrib/lukemftpd/src/extern.h stable/6/contrib/lukemftpd/src/ftpcmd.y stable/6/contrib/lukemftpd/src/ftpd.c Modified: stable/7/contrib/lukemftpd/src/extern.h ============================================================================== --- stable/7/contrib/lukemftpd/src/extern.h Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/contrib/lukemftpd/src/extern.h Wed Jan 7 20:17:55 2009 (r186872) @@ -139,7 +139,7 @@ void feat(void); void format_path(char *, const char *); int ftpd_pclose(FILE *); FILE *ftpd_popen(char *[], const char *, int); -char *getline(char *, int, FILE *); +int getline(char *, int, FILE *); void init_curclass(void); void logxfer(const char *, off_t, const char *, const char *, const struct timeval *, const char *); Modified: stable/7/contrib/lukemftpd/src/ftpcmd.y ============================================================================== --- stable/7/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 20:17:55 2009 (r186872) @@ -1363,8 +1363,12 @@ lookup(struct tab *p, const char *cmd) /* * getline - a hacked up version of fgets to ignore TELNET escape codes. + * `s' is the buffer to read into. + * `n' is the 1 less than the size of the buffer, to allow trailing NUL + * `iop' is the FILE to read from. + * Returns 0 on success, -1 on EOF, -2 if the command was too long. */ -char * +int getline(char *s, int n, FILE *iop) { int c; @@ -1379,7 +1383,7 @@ getline(char *s, int n, FILE *iop) if (ftpd_debug) syslog(LOG_DEBUG, "command: %s", s); tmpline[0] = '\0'; - return(s); + return(0); } if (c == 0) tmpline[0] = '\0'; @@ -1418,11 +1422,25 @@ getline(char *s, int n, FILE *iop) } } *cs++ = c; - if (--n <= 0 || c == '\n') + if (--n <= 0) { + /* + * If command doesn't fit into buffer, discard the + * rest of the command and indicate truncation. + * This prevents the command to be split up into + * multiple commands. + */ + if (ftpd_debug) + syslog(LOG_DEBUG, + "command too long, last char: %d", c); + while (c != '\n' && (c = getc(iop)) != EOF) + continue; + return (-2); + } + if (c == '\n') break; } if (c == EOF && cs == s) - return (NULL); + return (-1); *cs++ = '\0'; if (ftpd_debug) { if ((curclass.type != CLASS_GUEST && @@ -1444,7 +1462,7 @@ getline(char *s, int n, FILE *iop) syslog(LOG_DEBUG, "command: %.*s", len, s); } } - return (s); + return (0); } void @@ -1458,15 +1476,20 @@ ftp_handle_line(char *cp) void ftp_loop(void) { + int ret; while (1) { (void) alarm(curclass.timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + ret = getline(cbuf, sizeof(cbuf)-1, stdin); + (void) alarm(0); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + reply(500, "Command too long."); + } else { + ftp_handle_line(cbuf); } - (void) alarm(0); - ftp_handle_line(cbuf); } /*NOTREACHED*/ } Modified: stable/7/contrib/lukemftpd/src/ftpd.c ============================================================================== --- stable/7/contrib/lukemftpd/src/ftpd.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/contrib/lukemftpd/src/ftpd.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1,4 +1,4 @@ -/* $NetBSD: ftpd.c,v 1.176 2006/05/09 20:18:06 mrg Exp $ */ +/* $NetBSD: ftpd.c,v 1.187 2008/09/13 03:30:35 lukem Exp $ */ /* * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -2896,6 +2896,7 @@ static int handleoobcmd() { char *cp; + int ret; if (!urgflag) return (0); @@ -2904,9 +2905,14 @@ handleoobcmd() if (!transflag) return (0); cp = tmpline; - if (getline(cp, sizeof(tmpline), stdin) == NULL) { + ret = getline(cp, sizeof(tmpline)-1, stdin); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + /* Ignore truncated command */ + /* XXX: abort xfer with "500 command too long", & return 1 ? */ + return 0; } /* * Manually parse OOB commands, because we can't Modified: stable/7/crypto/openssl/apps/speed.c ============================================================================== --- stable/7/crypto/openssl/apps/speed.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/apps/speed.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2038,7 +2038,7 @@ int MAIN(int argc, char **argv) { ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num, rsa_key[j]); - if (ret == 0) + if (ret <= 0) { BIO_printf(bio_err, "RSA verify failure\n"); Modified: stable/7/crypto/openssl/apps/spkac.c ============================================================================== --- stable/7/crypto/openssl/apps/spkac.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/apps/spkac.c Wed Jan 7 20:17:55 2009 (r186872) @@ -285,7 +285,7 @@ bad: pkey = NETSCAPE_SPKI_get_pubkey(spki); if(verify) { i = NETSCAPE_SPKI_verify(spki, pkey); - if(i) BIO_printf(bio_err, "Signature OK\n"); + if (i > 0) BIO_printf(bio_err, "Signature OK\n"); else { BIO_printf(bio_err, "Signature Failure\n"); ERR_print_errors(bio_err); Modified: stable/7/crypto/openssl/apps/verify.c ============================================================================== --- stable/7/crypto/openssl/apps/verify.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/apps/verify.c Wed Jan 7 20:17:55 2009 (r186872) @@ -266,7 +266,7 @@ static int check(X509_STORE *ctx, char * ret=0; end: - if (i) + if (i > 0) { fprintf(stdout,"OK\n"); ret=1; @@ -367,4 +367,3 @@ static int MS_CALLBACK cb(int ok, X509_S ERR_clear_error(); return(ok); } - Modified: stable/7/crypto/openssl/apps/x509.c ============================================================================== --- stable/7/crypto/openssl/apps/x509.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/apps/x509.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1144,7 +1144,7 @@ static int x509_certify(X509_STORE *ctx, /* NOTE: this certificate can/should be self signed, unless it was * a certificate request in which case it is not. */ X509_STORE_CTX_set_cert(&xsc,x); - if (!reqfile && !X509_verify_cert(&xsc)) + if (!reqfile && X509_verify_cert(&xsc) <= 0) goto end; if (!X509_check_private_key(xca,pkey)) Modified: stable/7/crypto/openssl/ssl/s2_clnt.c ============================================================================== --- stable/7/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1044,7 +1044,7 @@ int ssl2_set_certificate(SSL *s, int typ i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)) { SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); goto err; Modified: stable/7/crypto/openssl/ssl/s2_srvr.c ============================================================================== --- stable/7/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1054,7 +1054,7 @@ static int request_certificate(SSL *s) i=ssl_verify_cert_chain(s,sk); - if (i) /* we like the packet, now check the chksum */ + if (i > 0) /* we like the packet, now check the chksum */ { EVP_MD_CTX ctx; EVP_PKEY *pkey=NULL; @@ -1083,7 +1083,7 @@ static int request_certificate(SSL *s) EVP_PKEY_free(pkey); EVP_MD_CTX_cleanup(&ctx); - if (i) + if (i > 0) { if (s->session->peer != NULL) X509_free(s->session->peer); Modified: stable/7/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- stable/7/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 20:17:55 2009 (r186872) @@ -883,7 +883,7 @@ int ssl3_get_server_certificate(SSL *s) } i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0) #ifndef OPENSSL_NO_KRB5 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK)) != (SSL_aKRB5|SSL_kKRB5) @@ -1368,7 +1368,7 @@ int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; @@ -1386,7 +1386,7 @@ int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; Modified: stable/7/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- stable/7/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2481,7 +2481,7 @@ int ssl3_get_client_certificate(SSL *s) else { i=ssl_verify_cert_chain(s,sk); - if (!i) + if (i <= 0) { al=ssl_verify_alarm_type(s->verify_result); SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED); Modified: stable/7/crypto/openssl/ssl/ssltest.c ============================================================================== --- stable/7/crypto/openssl/ssl/ssltest.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/ssl/ssltest.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2072,7 +2072,7 @@ static int MS_CALLBACK app_verify_callba if (cb_arg->proxy_auth) { - if (ok) + if (ok > 0) { const char *cond_end = NULL; From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 20:17:59 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84DDE1065674; Wed, 7 Jan 2009 20:17:59 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DF218FC22; Wed, 7 Jan 2009 20:17:59 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07KHxRd098534; Wed, 7 Jan 2009 20:17:59 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07KHxHj098531; Wed, 7 Jan 2009 20:17:59 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200901072017.n07KHxHj098531@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 7 Jan 2009 20:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186872 - head/contrib/lukemftpd/src head/crypto/openssl/apps head/crypto/openssl/ssl releng/6.3 releng/6.3/contrib/lukemftpd/src releng/6.3/crypto/openssl/apps releng/6.3/crypto/openss... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 20:18:01 -0000 Author: simon Date: Wed Jan 7 20:17:55 2009 New Revision: 186872 URL: http://svn.freebsd.org/changeset/base/186872 Log: Prevent cross-site forgery attacks on lukemftpd(8) due to splitting long commands into multiple requests. [09:01] Fix incorrect OpenSSL checks for malformed signatures due to invalid check of return value from EVP_VerifyFinal(), DSA_verify, and DSA_do_verify. [09:02] Security: FreeBSD-SA-09:01.lukemftpd Security: FreeBSD-SA-09:02.openssl Obtained from: NetBSD [SA-09:01] Obtained from: OpenSSL Project [SA-09:02] Approved by: so (simon) Modified: stable/6/contrib/lukemftpd/src/extern.h stable/6/contrib/lukemftpd/src/ftpcmd.y stable/6/contrib/lukemftpd/src/ftpd.c Changes in other areas also in this revision: Modified: head/contrib/lukemftpd/src/extern.h head/contrib/lukemftpd/src/ftpcmd.y head/contrib/lukemftpd/src/ftpd.c head/crypto/openssl/apps/speed.c head/crypto/openssl/apps/spkac.c head/crypto/openssl/apps/verify.c head/crypto/openssl/apps/x509.c head/crypto/openssl/ssl/s2_clnt.c head/crypto/openssl/ssl/s2_srvr.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/ssltest.c releng/6.3/UPDATING releng/6.3/contrib/lukemftpd/src/extern.h releng/6.3/contrib/lukemftpd/src/ftpcmd.y releng/6.3/contrib/lukemftpd/src/ftpd.c releng/6.3/crypto/openssl/apps/speed.c releng/6.3/crypto/openssl/apps/spkac.c releng/6.3/crypto/openssl/apps/verify.c releng/6.3/crypto/openssl/apps/x509.c releng/6.3/crypto/openssl/ssl/s2_clnt.c releng/6.3/crypto/openssl/ssl/s2_srvr.c releng/6.3/crypto/openssl/ssl/s3_clnt.c releng/6.3/crypto/openssl/ssl/s3_srvr.c releng/6.3/sys/conf/newvers.sh releng/6.4/UPDATING releng/6.4/contrib/lukemftpd/src/extern.h releng/6.4/contrib/lukemftpd/src/ftpcmd.y releng/6.4/contrib/lukemftpd/src/ftpd.c releng/6.4/crypto/openssl/apps/speed.c releng/6.4/crypto/openssl/apps/spkac.c releng/6.4/crypto/openssl/apps/verify.c releng/6.4/crypto/openssl/apps/x509.c releng/6.4/crypto/openssl/ssl/s2_clnt.c releng/6.4/crypto/openssl/ssl/s2_srvr.c releng/6.4/crypto/openssl/ssl/s3_clnt.c releng/6.4/crypto/openssl/ssl/s3_srvr.c releng/6.4/sys/conf/newvers.sh releng/7.0/UPDATING releng/7.0/contrib/lukemftpd/src/extern.h releng/7.0/contrib/lukemftpd/src/ftpcmd.y releng/7.0/contrib/lukemftpd/src/ftpd.c releng/7.0/crypto/openssl/apps/speed.c releng/7.0/crypto/openssl/apps/spkac.c releng/7.0/crypto/openssl/apps/verify.c releng/7.0/crypto/openssl/apps/x509.c releng/7.0/crypto/openssl/ssl/s2_clnt.c releng/7.0/crypto/openssl/ssl/s2_srvr.c releng/7.0/crypto/openssl/ssl/s3_clnt.c releng/7.0/crypto/openssl/ssl/s3_srvr.c releng/7.0/crypto/openssl/ssl/ssltest.c releng/7.0/sys/conf/newvers.sh releng/7.1/UPDATING releng/7.1/contrib/lukemftpd/src/extern.h releng/7.1/contrib/lukemftpd/src/ftpcmd.y releng/7.1/contrib/lukemftpd/src/ftpd.c releng/7.1/crypto/openssl/apps/speed.c releng/7.1/crypto/openssl/apps/spkac.c releng/7.1/crypto/openssl/apps/verify.c releng/7.1/crypto/openssl/apps/x509.c releng/7.1/crypto/openssl/ssl/s2_clnt.c releng/7.1/crypto/openssl/ssl/s2_srvr.c releng/7.1/crypto/openssl/ssl/s3_clnt.c releng/7.1/crypto/openssl/ssl/s3_srvr.c releng/7.1/crypto/openssl/ssl/ssltest.c releng/7.1/sys/conf/newvers.sh stable/7/contrib/lukemftpd/src/extern.h stable/7/contrib/lukemftpd/src/ftpcmd.y stable/7/contrib/lukemftpd/src/ftpd.c stable/7/crypto/openssl/apps/speed.c stable/7/crypto/openssl/apps/spkac.c stable/7/crypto/openssl/apps/verify.c stable/7/crypto/openssl/apps/x509.c stable/7/crypto/openssl/ssl/s2_clnt.c stable/7/crypto/openssl/ssl/s2_srvr.c stable/7/crypto/openssl/ssl/s3_clnt.c stable/7/crypto/openssl/ssl/s3_srvr.c stable/7/crypto/openssl/ssl/ssltest.c Modified: stable/6/contrib/lukemftpd/src/extern.h ============================================================================== --- stable/6/contrib/lukemftpd/src/extern.h Wed Jan 7 18:37:07 2009 (r186871) +++ stable/6/contrib/lukemftpd/src/extern.h Wed Jan 7 20:17:55 2009 (r186872) @@ -139,7 +139,7 @@ void feat(void); void format_path(char *, const char *); int ftpd_pclose(FILE *); FILE *ftpd_popen(char *[], const char *, int); -char *getline(char *, int, FILE *); +int getline(char *, int, FILE *); void init_curclass(void); void logxfer(const char *, off_t, const char *, const char *, const struct timeval *, const char *); Modified: stable/6/contrib/lukemftpd/src/ftpcmd.y ============================================================================== --- stable/6/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 18:37:07 2009 (r186871) +++ stable/6/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 20:17:55 2009 (r186872) @@ -1363,8 +1363,12 @@ lookup(struct tab *p, const char *cmd) /* * getline - a hacked up version of fgets to ignore TELNET escape codes. + * `s' is the buffer to read into. + * `n' is the 1 less than the size of the buffer, to allow trailing NUL + * `iop' is the FILE to read from. + * Returns 0 on success, -1 on EOF, -2 if the command was too long. */ -char * +int getline(char *s, int n, FILE *iop) { int c; @@ -1379,7 +1383,7 @@ getline(char *s, int n, FILE *iop) if (ftpd_debug) syslog(LOG_DEBUG, "command: %s", s); tmpline[0] = '\0'; - return(s); + return(0); } if (c == 0) tmpline[0] = '\0'; @@ -1418,11 +1422,25 @@ getline(char *s, int n, FILE *iop) } } *cs++ = c; - if (--n <= 0 || c == '\n') + if (--n <= 0) { + /* + * If command doesn't fit into buffer, discard the + * rest of the command and indicate truncation. + * This prevents the command to be split up into + * multiple commands. + */ + if (ftpd_debug) + syslog(LOG_DEBUG, + "command too long, last char: %d", c); + while (c != '\n' && (c = getc(iop)) != EOF) + continue; + return (-2); + } + if (c == '\n') break; } if (c == EOF && cs == s) - return (NULL); + return (-1); *cs++ = '\0'; if (ftpd_debug) { if ((curclass.type != CLASS_GUEST && @@ -1444,7 +1462,7 @@ getline(char *s, int n, FILE *iop) syslog(LOG_DEBUG, "command: %.*s", len, s); } } - return (s); + return (0); } void @@ -1458,15 +1476,20 @@ ftp_handle_line(char *cp) void ftp_loop(void) { + int ret; while (1) { (void) alarm(curclass.timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + ret = getline(cbuf, sizeof(cbuf)-1, stdin); + (void) alarm(0); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + reply(500, "Command too long."); + } else { + ftp_handle_line(cbuf); } - (void) alarm(0); - ftp_handle_line(cbuf); } /*NOTREACHED*/ } Modified: stable/6/contrib/lukemftpd/src/ftpd.c ============================================================================== --- stable/6/contrib/lukemftpd/src/ftpd.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/6/contrib/lukemftpd/src/ftpd.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1,4 +1,4 @@ -/* $NetBSD: ftpd.c,v 1.176 2006/05/09 20:18:06 mrg Exp $ */ +/* $NetBSD: ftpd.c,v 1.187 2008/09/13 03:30:35 lukem Exp $ */ /* * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -2896,6 +2896,7 @@ static int handleoobcmd() { char *cp; + int ret; if (!urgflag) return (0); @@ -2904,9 +2905,14 @@ handleoobcmd() if (!transflag) return (0); cp = tmpline; - if (getline(cp, sizeof(tmpline), stdin) == NULL) { + ret = getline(cp, sizeof(tmpline)-1, stdin); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + /* Ignore truncated command */ + /* XXX: abort xfer with "500 command too long", & return 1 ? */ + return 0; } /* * Manually parse OOB commands, because we can't From owner-svn-src-stable@FreeBSD.ORG Wed Jan 7 21:03:42 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3071F1065677; Wed, 7 Jan 2009 21:03:42 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D3948FC1C; Wed, 7 Jan 2009 21:03:42 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07L3gad099486; Wed, 7 Jan 2009 21:03:42 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07L3fLP099478; Wed, 7 Jan 2009 21:03:41 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200901072103.n07L3fLP099478@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 7 Jan 2009 21:03:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186873 - in stable/6/crypto/openssl: apps ssl X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 21:03:43 -0000 Author: simon Date: Wed Jan 7 21:03:41 2009 New Revision: 186873 URL: http://svn.freebsd.org/changeset/base/186873 Log: This time really commit the OpenSSL part of the advisory round to stable/6: Fix incorrect OpenSSL checks for malformed signatures due to invalid check of return value from EVP_VerifyFinal(), DSA_verify, and DSA_do_verify. Security: FreeBSD-SA-09:02.openssl Obtained from: OpenSSL Project Modified: stable/6/crypto/openssl/apps/speed.c stable/6/crypto/openssl/apps/spkac.c stable/6/crypto/openssl/apps/verify.c stable/6/crypto/openssl/apps/x509.c stable/6/crypto/openssl/ssl/s2_clnt.c stable/6/crypto/openssl/ssl/s2_srvr.c stable/6/crypto/openssl/ssl/s3_clnt.c stable/6/crypto/openssl/ssl/s3_srvr.c Modified: stable/6/crypto/openssl/apps/speed.c ============================================================================== --- stable/6/crypto/openssl/apps/speed.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/apps/speed.c Wed Jan 7 21:03:41 2009 (r186873) @@ -1486,7 +1486,7 @@ int MAIN(int argc, char **argv) { ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num, rsa_key[j]); - if (ret == 0) + if (ret <= 0) { BIO_printf(bio_err, "RSA verify failure\n"); Modified: stable/6/crypto/openssl/apps/spkac.c ============================================================================== --- stable/6/crypto/openssl/apps/spkac.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/apps/spkac.c Wed Jan 7 21:03:41 2009 (r186873) @@ -284,7 +284,7 @@ bad: pkey = NETSCAPE_SPKI_get_pubkey(spki); if(verify) { i = NETSCAPE_SPKI_verify(spki, pkey); - if(i) BIO_printf(bio_err, "Signature OK\n"); + if (i > 0) BIO_printf(bio_err, "Signature OK\n"); else { BIO_printf(bio_err, "Signature Failure\n"); ERR_print_errors(bio_err); Modified: stable/6/crypto/openssl/apps/verify.c ============================================================================== --- stable/6/crypto/openssl/apps/verify.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/apps/verify.c Wed Jan 7 21:03:41 2009 (r186873) @@ -275,7 +275,7 @@ static int check(X509_STORE *ctx, char * ret=0; end: - if (i) + if (i > 0) { fprintf(stdout,"OK\n"); ret=1; @@ -365,4 +365,3 @@ static int MS_CALLBACK cb(int ok, X509_S ERR_clear_error(); return(ok); } - Modified: stable/6/crypto/openssl/apps/x509.c ============================================================================== --- stable/6/crypto/openssl/apps/x509.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/apps/x509.c Wed Jan 7 21:03:41 2009 (r186873) @@ -1113,7 +1113,7 @@ static int x509_certify(X509_STORE *ctx, /* NOTE: this certificate can/should be self signed, unless it was * a certificate request in which case it is not. */ X509_STORE_CTX_set_cert(&xsc,x); - if (!reqfile && !X509_verify_cert(&xsc)) + if (!reqfile && X509_verify_cert(&xsc) <= 0) goto end; if (!X509_check_private_key(xca,pkey)) Modified: stable/6/crypto/openssl/ssl/s2_clnt.c ============================================================================== --- stable/6/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 21:03:41 2009 (r186873) @@ -1062,7 +1062,7 @@ int ssl2_set_certificate(SSL *s, int typ i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)) { SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); goto err; Modified: stable/6/crypto/openssl/ssl/s2_srvr.c ============================================================================== --- stable/6/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 21:03:41 2009 (r186873) @@ -1070,7 +1070,7 @@ static int request_certificate(SSL *s) i=ssl_verify_cert_chain(s,sk); - if (i) /* we like the packet, now check the chksum */ + if (i > 0) /* we like the packet, now check the chksum */ { EVP_MD_CTX ctx; EVP_PKEY *pkey=NULL; @@ -1099,7 +1099,7 @@ static int request_certificate(SSL *s) EVP_PKEY_free(pkey); EVP_MD_CTX_cleanup(&ctx); - if (i) + if (i > 0) { if (s->session->peer != NULL) X509_free(s->session->peer); Modified: stable/6/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- stable/6/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 21:03:41 2009 (r186873) @@ -833,7 +833,7 @@ static int ssl3_get_server_certificate(S } i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0) #ifndef OPENSSL_NO_KRB5 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK)) != (SSL_aKRB5|SSL_kKRB5) @@ -1206,7 +1206,7 @@ static int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; Modified: stable/6/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- stable/6/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 21:03:41 2009 (r186873) @@ -2015,7 +2015,7 @@ static int ssl3_get_client_certificate(S else { i=ssl_verify_cert_chain(s,sk); - if (!i) + if (i <= 0) { al=ssl_verify_alarm_type(s->verify_result); SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED); From owner-svn-src-stable@FreeBSD.ORG Thu Jan 8 02:41:41 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 128341065672; Thu, 8 Jan 2009 02:41:41 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F36C78FC18; Thu, 8 Jan 2009 02:41:40 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n082feKZ006420; Thu, 8 Jan 2009 02:41:40 GMT (envelope-from scf@svn.freebsd.org) Received: (from scf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n082feiC006419; Thu, 8 Jan 2009 02:41:40 GMT (envelope-from scf@svn.freebsd.org) Message-Id: <200901080241.n082feiC006419@svn.freebsd.org> From: Sean Farley Date: Thu, 8 Jan 2009 02:41:40 +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: r186883 - stable/7/lib/libutil X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 02:41:41 -0000 Author: scf Date: Thu Jan 8 02:41:40 2009 New Revision: 186883 URL: http://svn.freebsd.org/changeset/base/186883 Log: MFC r184831,185237: style(9) fixes. Fixed style issues with variable ordering and naming, spacing and parentheses. Fixed alignment issue in gr_dup() in its assignment of gr_mem using a struct to force alignment without performing alignment mathematics. This was noticed recently with libutil was built with WARNS=6 on platform such as sparc64. Added checks to gr_dup(), gr_equal() and gr_make() to prevent segfaults when examining struct group's with the struct members pointing to NULL's. Unlike r185237, did not enable WARNS?=6 since other changes would need to be MFC'd first. Reviewed by: des Modified: stable/7/lib/libutil/ (props changed) stable/7/lib/libutil/gr_util.c Modified: stable/7/lib/libutil/gr_util.c ============================================================================== --- stable/7/lib/libutil/gr_util.c Thu Jan 8 00:45:47 2009 (r186882) +++ stable/7/lib/libutil/gr_util.c Thu Jan 8 02:41:40 2009 (r186883) @@ -28,18 +28,21 @@ __FBSDID("$FreeBSD$"); #include + #include #include +#include #include #include #include #include -#include - - -static const char GroupLineFormat[] = "%s:%s:%ju:"; +struct group_storage { + struct group gr; + char *members[]; +}; +static const char group_line_format[] = "%s:%s:%ju:"; /* * Compares two struct group's. @@ -47,41 +50,50 @@ static const char GroupLineFormat[] = "% int gr_equal(const struct group *gr1, const struct group *gr2) { + int gr1_ndx; + int gr2_ndx; bool found; - bool equal; - int gr1Ndx; - int gr2Ndx; /* Check that the non-member information is the same. */ - equal = strcmp(gr1->gr_name, gr2->gr_name) == 0 && - strcmp(gr1->gr_passwd, gr2->gr_passwd) == 0 && - gr1->gr_gid == gr2->gr_gid; + if (gr1->gr_name == NULL || gr2->gr_name == NULL) { + if (gr1->gr_name != gr2->gr_name) + return (false); + } else if (strcmp(gr1->gr_name, gr2->gr_name) != 0) + return (false); + if (gr1->gr_passwd == NULL || gr2->gr_passwd == NULL) { + if (gr1->gr_passwd != gr2->gr_passwd) + return (false); + } else if (strcmp(gr1->gr_passwd, gr2->gr_passwd) != 0) + return (false); + if (gr1->gr_gid != gr2->gr_gid) + return (false); /* Check all members in both groups. */ - if (equal) { - for (found = false, gr1Ndx = 0; gr1->gr_mem[gr1Ndx] != NULL; - gr1Ndx++) { - for (gr2Ndx = 0; gr2->gr_mem[gr2Ndx] != NULL; gr2Ndx++) - if (strcmp(gr1->gr_mem[gr1Ndx], - gr2->gr_mem[gr2Ndx]) == 0) { + if (gr1->gr_mem == NULL || gr2->gr_mem == NULL) { + if (gr1->gr_mem != gr2->gr_mem) + return (false); + } else { + for (found = false, gr1_ndx = 0; gr1->gr_mem[gr1_ndx] != NULL; + gr1_ndx++) { + for (gr2_ndx = 0; gr2->gr_mem[gr2_ndx] != NULL; + gr2_ndx++) + if (strcmp(gr1->gr_mem[gr1_ndx], + gr2->gr_mem[gr2_ndx]) == 0) { found = true; break; } - if (! found) { - equal = false; - break; - } + if (!found) + return (false); } /* Check that group2 does not have more members than group1. */ - if (gr2->gr_mem[gr1Ndx] != NULL) - equal = false; + if (gr2->gr_mem[gr1_ndx] != NULL) + return (false); } - return (equal); + return (true); } - /* * Make a group line out of a struct group. */ @@ -89,82 +101,84 @@ char * gr_make(const struct group *gr) { char *line; + size_t line_size; int ndx; - size_t lineSize; /* Calculate the length of the group line. */ - lineSize = snprintf(NULL, 0, GroupLineFormat, gr->gr_name, + line_size = snprintf(NULL, 0, group_line_format, gr->gr_name, gr->gr_passwd, (uintmax_t)gr->gr_gid) + 1; - for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++) - lineSize += strlen(gr->gr_mem[ndx]) + 1; - if (ndx > 0) - lineSize--; + if (gr->gr_mem != NULL) { + for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++) + line_size += strlen(gr->gr_mem[ndx]) + 1; + if (ndx > 0) + line_size--; + } /* Create the group line and fill it. */ - if ((line = malloc(lineSize)) == NULL) + if ((line = malloc(line_size)) == NULL) return (NULL); - lineSize = snprintf(line, lineSize, GroupLineFormat, gr->gr_name, + line_size = snprintf(line, line_size, group_line_format, gr->gr_name, gr->gr_passwd, (uintmax_t)gr->gr_gid); - for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++) { - strcat(line, gr->gr_mem[ndx]); - if (gr->gr_mem[ndx + 1] != NULL) - strcat(line, ","); - } + if (gr->gr_mem != NULL) + for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++) { + strcat(line, gr->gr_mem[ndx]); + if (gr->gr_mem[ndx + 1] != NULL) + strcat(line, ","); + } return (line); } - /* * Duplicate a struct group. */ struct group * gr_dup(const struct group *gr) { - int ndx; - int numMem; + char *dst; size_t len; - struct group *ngr; + struct group_storage *gs; + int ndx; + int num_mem; - /* Calculate size of group. */ - len = sizeof(*gr) + - (gr->gr_name != NULL ? strlen(gr->gr_name) + 1 : 0) + - (gr->gr_passwd != NULL ? strlen(gr->gr_passwd) + 1 : 0); - numMem = 0; + /* Calculate size of the group. */ + len = sizeof(*gs); + if (gr->gr_name != NULL) + len += strlen(gr->gr_name) + 1; + if (gr->gr_passwd != NULL) + len += strlen(gr->gr_passwd) + 1; if (gr->gr_mem != NULL) { - for (; gr->gr_mem[numMem] != NULL; numMem++) - len += strlen(gr->gr_mem[numMem]) + 1; - len += (numMem + 1) * sizeof(*(gr->gr_mem)); - } + for (num_mem = 0; gr->gr_mem[num_mem] != NULL; num_mem++) + len += strlen(gr->gr_mem[num_mem]) + 1; + len += (num_mem + 1) * sizeof(*gr->gr_mem); + } else + num_mem = -1; /* Create new group and copy old group into it. */ - if ((ngr = calloc(1, len)) == NULL) + if ((gs = calloc(1, len)) == NULL) return (NULL); - len = sizeof(*ngr); - ngr->gr_gid = gr->gr_gid; + dst = (char *)&gs->members[num_mem + 1]; if (gr->gr_name != NULL) { - ngr->gr_name = (char *)ngr + len; - len += sprintf(ngr->gr_name, "%s", gr->gr_name) + 1; + gs->gr.gr_name = dst; + dst = stpcpy(gs->gr.gr_name, gr->gr_name) + 1; } if (gr->gr_passwd != NULL) { - ngr->gr_passwd = (char *)ngr + len; - len += sprintf(ngr->gr_passwd, "%s", gr->gr_passwd) + 1; + gs->gr.gr_passwd = dst; + dst = stpcpy(gs->gr.gr_passwd, gr->gr_passwd) + 1; } + gs->gr.gr_gid = gr->gr_gid; if (gr->gr_mem != NULL) { - ngr->gr_mem = (char **)((char *)ngr + len); - len += (numMem + 1) * sizeof(*(ngr->gr_mem)); - for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++) { - ngr->gr_mem[ndx] = (char *)ngr + len; - len += sprintf(ngr->gr_mem[ndx], "%s", - gr->gr_mem[ndx]) + 1; + gs->gr.gr_mem = gs->members; + for (ndx = 0; ndx < num_mem; ndx++) { + gs->gr.gr_mem[ndx] = dst; + dst = stpcpy(gs->gr.gr_mem[ndx], gr->gr_mem[ndx]) + 1; } - ngr->gr_mem[ndx] = NULL; + gs->gr.gr_mem[ndx] = NULL; } - return (ngr); + return (&gs->gr); } - /* * Scan a line and place it into a group structure. */ @@ -180,14 +194,14 @@ __gr_scan(char *line, struct group *gr) return (false); *loc = '\0'; gr->gr_passwd = loc + 1; - if (*(gr->gr_passwd) == ':') - *(gr->gr_passwd) = '\0'; + if (*gr->gr_passwd == ':') + *gr->gr_passwd = '\0'; else { if ((loc = strchr(loc + 1, ':')) == NULL) return (false); *loc = '\0'; } - if (sscanf(loc + 1, "%u", &(gr->gr_gid)) != 1) + if (sscanf(loc + 1, "%u", &gr->gr_gid) != 1) return (false); /* Assign member information to structure. */ @@ -195,40 +209,42 @@ __gr_scan(char *line, struct group *gr) return (false); line = loc + 1; gr->gr_mem = NULL; - if (*line != '\0') { - ndx = 0; + ndx = 0; + do { + gr->gr_mem = reallocf(gr->gr_mem, sizeof(*gr->gr_mem) * + (ndx + 1)); + if (gr->gr_mem == NULL) + return (false); + + /* Skip locations without members (i.e., empty string). */ do { - if ((gr->gr_mem = reallocf(gr->gr_mem, - sizeof(*(gr->gr_mem)) * (ndx + 1))) == NULL) - return (false); gr->gr_mem[ndx] = strsep(&line, ","); - } while (gr->gr_mem[ndx++] != NULL); - } + } while (gr->gr_mem[ndx] != NULL && *gr->gr_mem[ndx] == '\0'); + } while (gr->gr_mem[ndx++] != NULL); return (true); } - /* * Create a struct group from a line. */ struct group * gr_scan(const char *line) { - char *lineCopy; - struct group *newGr; struct group gr; + char *line_copy; + struct group *new_gr; - if ((lineCopy = strdup(line)) == NULL) + if ((line_copy = strdup(line)) == NULL) return (NULL); - if (!__gr_scan(lineCopy, &gr)) { - free(lineCopy); + if (!__gr_scan(line_copy, &gr)) { + free(line_copy); return (NULL); } - newGr = gr_dup(&gr); - free(lineCopy); + new_gr = gr_dup(&gr); + free(line_copy); if (gr.gr_mem != NULL) free(gr.gr_mem); - return (newGr); + return (new_gr); } From owner-svn-src-stable@FreeBSD.ORG Thu Jan 8 09:50:21 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09C0E106566B; Thu, 8 Jan 2009 09:50:21 +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 E6BF08FC1A; Thu, 8 Jan 2009 09:50:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n089oKoQ014763; Thu, 8 Jan 2009 09:50:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n089oKxr014752; Thu, 8 Jan 2009 09:50:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901080950.n089oKxr014752@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 8 Jan 2009 09:50:20 +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: r186890 - in stable/7: gnu/usr.bin/cc gnu/usr.bin/cc/libiberty gnu/usr.bin/sort include kerberos5 kerberos5/include lib/bind lib/bind/bind lib/libc lib/libc/string lib/libmagic usr.bin/... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 09:50:22 -0000 Author: kib Date: Thu Jan 8 09:50:20 2009 New Revision: 186890 URL: http://svn.freebsd.org/changeset/base/186890 Log: MFC r185689: Order the str*.c files mostly alphabetical. MFC r185690: Import the strndup(3) function. MFC r185777: Add strndup(3) prototype to string.h. Manually change #undef HAVE_STRNDUP to #define HAVE_STRNDUP 1 for the configure.h files that need it. Added: stable/7/lib/libc/string/strndup.c - copied unchanged from r185690, head/lib/libc/string/strndup.c Modified: stable/7/gnu/usr.bin/cc/ (props changed) stable/7/gnu/usr.bin/cc/libiberty/config.h stable/7/gnu/usr.bin/sort/ (props changed) stable/7/gnu/usr.bin/sort/config.h stable/7/include/ (props changed) stable/7/include/string.h stable/7/kerberos5/ (props changed) stable/7/kerberos5/include/config.h stable/7/lib/bind/ (props changed) stable/7/lib/bind/bind/port_after.h stable/7/lib/libc/ (props changed) stable/7/lib/libc/string/Makefile.inc stable/7/lib/libc/string/Symbol.map stable/7/lib/libc/string/ffsll.c (props changed) stable/7/lib/libc/string/flsll.c (props changed) stable/7/lib/libc/string/strdup.3 stable/7/lib/libmagic/ (props changed) stable/7/lib/libmagic/config.h stable/7/usr.bin/file/ (props changed) stable/7/usr.bin/file/config.h Modified: stable/7/gnu/usr.bin/cc/libiberty/config.h ============================================================================== --- stable/7/gnu/usr.bin/cc/libiberty/config.h Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/gnu/usr.bin/cc/libiberty/config.h Thu Jan 8 09:50:20 2009 (r186890) @@ -235,7 +235,7 @@ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strndup' function. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 Modified: stable/7/gnu/usr.bin/sort/config.h ============================================================================== --- stable/7/gnu/usr.bin/sort/config.h Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/gnu/usr.bin/sort/config.h Thu Jan 8 09:50:20 2009 (r186890) @@ -759,7 +759,7 @@ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strndup' function. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define to 1 if you have the `strpbrk' function. */ #define HAVE_STRPBRK 1 Modified: stable/7/include/string.h ============================================================================== --- stable/7/include/string.h Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/include/string.h Thu Jan 8 09:50:20 2009 (r186890) @@ -96,6 +96,7 @@ char *strncat(char * __restrict, const c int strncmp(const char *, const char *, size_t) __pure; char *strncpy(char * __restrict, const char * __restrict, size_t); #if __BSD_VISIBLE +char *strndup(const char *, size_t); char *strnstr(const char *, const char *, size_t) __pure; #endif char *strpbrk(const char *, const char *) __pure; Modified: stable/7/kerberos5/include/config.h ============================================================================== --- stable/7/kerberos5/include/config.h Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/kerberos5/include/config.h Thu Jan 8 09:50:20 2009 (r186890) @@ -747,7 +747,7 @@ static /**/const char *const rcsid[] = { #define HAVE_STRNCASECMP 1 /* Define if you have the function `strndup'. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define if you have the function `strnlen'. */ /* #undef HAVE_STRNLEN */ Modified: stable/7/lib/bind/bind/port_after.h ============================================================================== --- stable/7/lib/bind/bind/port_after.h Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/lib/bind/bind/port_after.h Thu Jan 8 09:50:20 2009 (r186890) @@ -30,7 +30,7 @@ #undef HAS_IN_ADDR6 #define HAVE_SOCKADDR_STORAGE 1 #undef NEED_GETTIMEOFDAY -#undef HAVE_STRNDUP +#define HAVE_STRNDUP 1 #undef USE_FIONBIO_IOCTL #undef USE_SYSERROR_LIST #undef INNETGR_ARGS Modified: stable/7/lib/libc/string/Makefile.inc ============================================================================== --- stable/7/lib/libc/string/Makefile.inc Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/lib/libc/string/Makefile.inc Thu Jan 8 09:50:20 2009 (r186890) @@ -9,9 +9,9 @@ CFLAGS+= -I${.CURDIR}/locale MISRCS+=bcmp.c bcopy.c bzero.c ffs.c ffsl.c ffsll.c fls.c flsl.c flsll.c \ index.c memccpy.c memchr.c memrchr.c memcmp.c \ memcpy.c memmem.c memmove.c memset.c rindex.c stpcpy.c strcasecmp.c \ - strcat.c strchr.c strcmp.c strcoll.c strcpy.c strcspn.c strdup.c \ - strerror.c strlcat.c strlcpy.c strlen.c strmode.c strncat.c strncmp.c \ - strncpy.c strcasestr.c strnstr.c \ + strcat.c strcasestr.c strchr.c strcmp.c strcoll.c strcpy.c strcspn.c \ + strdup.c strerror.c strlcat.c strlcpy.c strlen.c strmode.c strncat.c \ + strncmp.c strncpy.c strndup.c strnstr.c \ strpbrk.c strrchr.c strsep.c strsignal.c strspn.c strstr.c strtok.c \ strxfrm.c swab.c wcscat.c wcschr.c wcscmp.c wcscoll.c wcscpy.c \ wcscspn.c wcsdup.c \ @@ -47,6 +47,7 @@ MLINKS+=strcat.3 strncat.3 MLINKS+=strchr.3 strrchr.3 MLINKS+=strcmp.3 strncmp.3 MLINKS+=strcpy.3 stpcpy.3 +MLINKS+=strdup.3 strndup.3 MLINKS+=strcpy.3 strncpy.3 MLINKS+=strerror.3 perror.3 strerror.3 sys_errlist.3 strerror.3 sys_nerr.3 MLINKS+=strerror.3 strerror_r.3 Modified: stable/7/lib/libc/string/Symbol.map ============================================================================== --- stable/7/lib/libc/string/Symbol.map Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/lib/libc/string/Symbol.map Thu Jan 8 09:50:20 2009 (r186890) @@ -81,6 +81,7 @@ FBSD_1.1 { ffsll; flsll; memrchr; + strndup; }; FBSDprivate_1.0 { Modified: stable/7/lib/libc/string/strdup.3 ============================================================================== --- stable/7/lib/libc/string/strdup.3 Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/lib/libc/string/strdup.3 Thu Jan 8 09:50:20 2009 (r186890) @@ -28,11 +28,12 @@ .\" @(#)strdup.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 9, 1993 +.Dd Dec 5, 2008 .Dt STRDUP 3 .Os .Sh NAME -.Nm strdup +.Nm strdup , +.Nm strndup .Nd save a copy of a string .Sh LIBRARY .Lb libc @@ -40,6 +41,8 @@ .In string.h .Ft char * .Fn strdup "const char *str" +.Ft char * +.Fn strndup "const char *str" "size_t len" .Sh DESCRIPTION The .Fn strdup @@ -56,6 +59,16 @@ If insufficient memory is available, NUL .Va errno is set to .Er ENOMEM . +.Pp +The +.Fn strndup +function copies at most +.Fa len +characters from the string +.Fa str +always +.Dv NUL +terminating the copied string. .Sh SEE ALSO .Xr free 3 , .Xr malloc 3 @@ -64,3 +77,7 @@ The .Fn strdup function first appeared in .Bx 4.4 . +The +.Fn strndup +function was added in +.Fx 8.0 . Copied: stable/7/lib/libc/string/strndup.c (from r185690, head/lib/libc/string/strndup.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/lib/libc/string/strndup.c Thu Jan 8 09:50:20 2009 (r186890, copy of r185690, head/lib/libc/string/strndup.c) @@ -0,0 +1,53 @@ +/* $NetBSD: strndup.c,v 1.3 2007/01/14 23:41:24 cbiere Exp $ */ + +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +char * +strndup(const char *str, size_t n) +{ + size_t len; + char *copy; + + for (len = 0; len < n && str[len]; len++) + continue; + + if ((copy = malloc(len + 1)) == NULL) + return (NULL); + memcpy(copy, str, len); + copy[len] = '\0'; + return (copy); +} Modified: stable/7/lib/libmagic/config.h ============================================================================== --- stable/7/lib/libmagic/config.h Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/lib/libmagic/config.h Thu Jan 8 09:50:20 2009 (r186890) @@ -77,7 +77,7 @@ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strndup' function. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define to 1 if you have the `strtof' function. */ #define HAVE_STRTOF 1 Modified: stable/7/usr.bin/file/config.h ============================================================================== --- stable/7/usr.bin/file/config.h Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/usr.bin/file/config.h Thu Jan 8 09:50:20 2009 (r186890) @@ -77,7 +77,7 @@ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strndup' function. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define to 1 if you have the `strtof' function. */ #define HAVE_STRTOF 1 From owner-svn-src-stable@FreeBSD.ORG Thu Jan 8 18:34:20 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31F491065678; Thu, 8 Jan 2009 18:34:20 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F11CF8FC18; Thu, 8 Jan 2009 18:34:19 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08IYJ6M030541; Thu, 8 Jan 2009 18:34:19 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08IYJoc030540; Thu, 8 Jan 2009 18:34:19 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901081834.n08IYJoc030540@svn.freebsd.org> From: Sam Leffler Date: Thu, 8 Jan 2009 18:34:19 +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: r186910 - stable/7/sys/dev/ath/ath_hal X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 18:34:37 -0000 Author: sam Date: Thu Jan 8 18:34:19 2009 New Revision: 186910 URL: http://svn.freebsd.org/changeset/base/186910 Log: mfc ath hal source code Added: stable/7/sys/dev/ath/ath_hal/ (props changed) - copied from r186909, head/sys/dev/ath/ath_hal/ From owner-svn-src-stable@FreeBSD.ORG Thu Jan 8 22:32:36 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A6FE1065705; Thu, 8 Jan 2009 22:32:36 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47FB68FC20; Thu, 8 Jan 2009 22:32:36 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08MWa1b035251; Thu, 8 Jan 2009 22:32:36 GMT (envelope-from piso@svn.freebsd.org) Received: (from piso@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08MWaqw035249; Thu, 8 Jan 2009 22:32:36 GMT (envelope-from piso@svn.freebsd.org) Message-Id: <200901082232.n08MWaqw035249@svn.freebsd.org> From: Paolo Pisati Date: Thu, 8 Jan 2009 22:32:36 +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: r186915 - stable/7/sbin/ipfw X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 22:32:37 -0000 Author: piso Date: Thu Jan 8 22:32:35 2009 New Revision: 186915 URL: http://svn.freebsd.org/changeset/base/186915 Log: MFC r186297 and r186298: Honor the quiet (-q) option while adding a nat rule. Modified: stable/7/sbin/ipfw/ (props changed) stable/7/sbin/ipfw/ipfw.8 stable/7/sbin/ipfw/ipfw2.c Modified: stable/7/sbin/ipfw/ipfw.8 ============================================================================== --- stable/7/sbin/ipfw/ipfw.8 Thu Jan 8 21:46:55 2009 (r186914) +++ stable/7/sbin/ipfw/ipfw.8 Thu Jan 8 22:32:35 2009 (r186915) @@ -65,6 +65,7 @@ .Op Ar number ... .Pp .Nm +.Op Fl q .Cm nat .Ar number .Cm config @@ -231,6 +232,7 @@ Try to resolve addresses and service nam .It Fl q While .Cm add Ns ing , +.Cm nat Ns ing , .Cm zero Ns ing , .Cm resetlog Ns ging or Modified: stable/7/sbin/ipfw/ipfw2.c ============================================================================== --- stable/7/sbin/ipfw/ipfw2.c Thu Jan 8 21:46:55 2009 (r186914) +++ stable/7/sbin/ipfw/ipfw2.c Thu Jan 8 22:32:35 2009 (r186915) @@ -4067,10 +4067,12 @@ config_nat(int ac, char **av) if (i) err(1, "setsockopt(%s)", "IP_FW_NAT_CFG"); - /* After every modification, we show the resultant rule. */ - int _ac = 3; - char *_av[] = {"show", "config", id}; - show_nat(_ac, _av); + if (!do_quiet) { + /* After every modification, we show the resultant rule. */ + int _ac = 3; + char *_av[] = {"show", "config", id}; + show_nat(_ac, _av); + } } static void From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 03:42:42 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84FE51065672; Fri, 9 Jan 2009 03:42:42 +0000 (UTC) (envelope-from murray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70EF28FC08; Fri, 9 Jan 2009 03:42:42 +0000 (UTC) (envelope-from murray@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n093ggrY041862; Fri, 9 Jan 2009 03:42:42 GMT (envelope-from murray@svn.freebsd.org) Received: (from murray@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n093gfug041855; Fri, 9 Jan 2009 03:42:41 GMT (envelope-from murray@svn.freebsd.org) Message-Id: <200901090342.n093gfug041855@svn.freebsd.org> From: Murray Stokely Date: Fri, 9 Jan 2009 03:42:41 +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: r186920 - in stable/7: lib/libfetch usr.bin/fetch X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 03:42:43 -0000 Author: murray Date: Fri Jan 9 03:42:41 2009 New Revision: 186920 URL: http://svn.freebsd.org/changeset/base/186920 Log: MFC r186043, 186124, 186241 Add support for If-Modified-Since to fetch with new -i option. Consistently return 1 on error. Improve usage and SYNOPSIS. _M usr.bin/fetch M usr.bin/fetch/fetch.1 M usr.bin/fetch/fetch.c _M lib/libfetch M lib/libfetch/fetch.h M lib/libfetch/http.c M lib/libfetch/fetch.3 M lib/libfetch/fetch.c Modified: stable/7/lib/libfetch/ (props changed) stable/7/lib/libfetch/fetch.3 stable/7/lib/libfetch/fetch.c stable/7/lib/libfetch/fetch.h stable/7/lib/libfetch/http.c stable/7/usr.bin/fetch/ (props changed) stable/7/usr.bin/fetch/fetch.1 stable/7/usr.bin/fetch/fetch.c Modified: stable/7/lib/libfetch/fetch.3 ============================================================================== --- stable/7/lib/libfetch/fetch.3 Fri Jan 9 02:31:51 2009 (r186919) +++ stable/7/lib/libfetch/fetch.3 Fri Jan 9 03:42:41 2009 (r186920) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 18, 2007 +.Dd December 14, 2008 .Dt FETCH 3 .Os .Sh NAME @@ -165,9 +165,16 @@ struct url { char *doc; off_t offset; size_t length; + time_t ims_time; }; .Ed .Pp +The +.Va ims_time +field stores the time value for +.Li If-Modified-Since +HTTP requests. +.Pp The pointer returned by .Fn fetchMakeURL or @@ -353,6 +360,22 @@ and .Fn fetchPutHTTP will use a direct connection even if a proxy server is defined. .Pp +If the +.Ql i +(if-modified-since) flag is specified, and +the +.Va ims_time +field is set in +.Vt "struct url" , +then +.Fn fetchXGetHTTP +and +.Fn fetchGetHTTP +will send a conditional +.Li If-Modified-Since +HTTP header to only fetch the content if it is newer than +.Va ims_time . +.Pp Since there seems to be no good way of implementing the HTTP PUT method in a manner consistent with the rest of the .Nm fetch Modified: stable/7/lib/libfetch/fetch.c ============================================================================== --- stable/7/lib/libfetch/fetch.c Fri Jan 9 02:31:51 2009 (r186919) +++ stable/7/lib/libfetch/fetch.c Fri Jan 9 03:42:41 2009 (r186920) @@ -74,9 +74,7 @@ static struct fetcherr url_errlist[] = { FILE * fetchXGet(struct url *URL, struct url_stat *us, const char *flags) { - int direct; - direct = CHECK_FLAG('d'); if (us != NULL) { us->size = -1; us->atime = us->mtime = 0; @@ -110,9 +108,7 @@ fetchGet(struct url *URL, const char *fl FILE * fetchPut(struct url *URL, const char *flags) { - int direct; - direct = CHECK_FLAG('d'); if (strcasecmp(URL->scheme, SCHEME_FILE) == 0) return (fetchPutFile(URL, flags)); else if (strcasecmp(URL->scheme, SCHEME_FTP) == 0) @@ -132,9 +128,7 @@ fetchPut(struct url *URL, const char *fl int fetchStat(struct url *URL, struct url_stat *us, const char *flags) { - int direct; - direct = CHECK_FLAG('d'); if (us != NULL) { us->size = -1; us->atime = us->mtime = 0; @@ -158,9 +152,7 @@ fetchStat(struct url *URL, struct url_st struct url_ent * fetchList(struct url *URL, const char *flags) { - int direct; - direct = CHECK_FLAG('d'); if (strcasecmp(URL->scheme, SCHEME_FILE) == 0) return (fetchListFile(URL, flags)); else if (strcasecmp(URL->scheme, SCHEME_FTP) == 0) Modified: stable/7/lib/libfetch/fetch.h ============================================================================== --- stable/7/lib/libfetch/fetch.h Fri Jan 9 02:31:51 2009 (r186919) +++ stable/7/lib/libfetch/fetch.h Fri Jan 9 03:42:41 2009 (r186920) @@ -46,6 +46,7 @@ struct url { char *doc; off_t offset; size_t length; + time_t ims_time; }; struct url_stat { Modified: stable/7/lib/libfetch/http.c ============================================================================== --- stable/7/lib/libfetch/http.c Fri Jan 9 02:31:51 2009 (r186919) +++ stable/7/lib/libfetch/http.c Fri Jan 9 03:42:41 2009 (r186920) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -92,6 +93,7 @@ __FBSDID("$FreeBSD$"); #define HTTP_MOVED_PERM 301 #define HTTP_MOVED_TEMP 302 #define HTTP_SEE_OTHER 303 +#define HTTP_NOT_MODIFIED 304 #define HTTP_TEMP_REDIRECT 307 #define HTTP_NEED_AUTH 401 #define HTTP_NEED_PROXY_AUTH 407 @@ -797,20 +799,23 @@ FILE * http_request(struct url *URL, const char *op, struct url_stat *us, struct url *purl, const char *flags) { + char timebuf[80]; + char hbuf[MAXHOSTNAMELEN + 7], *host; conn_t *conn; struct url *url, *new; - int chunked, direct, need_auth, noredirect, verbose; + int chunked, direct, ims, need_auth, noredirect, verbose; int e, i, n, val; off_t offset, clength, length, size; time_t mtime; const char *p; FILE *f; hdr_t h; - char hbuf[MAXHOSTNAMELEN + 7], *host; + struct tm *timestruct; direct = CHECK_FLAG('d'); noredirect = CHECK_FLAG('A'); verbose = CHECK_FLAG('v'); + ims = CHECK_FLAG('i'); if (direct && purl) { fetchFreeURL(purl); @@ -879,6 +884,14 @@ http_request(struct url *URL, const char op, url->doc); } + if (ims && url->ims_time) { + timestruct = gmtime((time_t *)&url->ims_time); + (void)strftime(timebuf, 80, "%a, %d %b %Y %T GMT", + timestruct); + if (verbose) + fetch_info("If-Modified-Since: %s", timebuf); + http_cmd(conn, "If-Modified-Since: %s", timebuf); + } /* virtual host */ http_cmd(conn, "Host: %s", host); @@ -940,6 +953,7 @@ http_request(struct url *URL, const char switch (http_get_reply(conn)) { case HTTP_OK: case HTTP_PARTIAL: + case HTTP_NOT_MODIFIED: /* fine */ break; case HTTP_MOVED_PERM: @@ -1074,7 +1088,10 @@ http_request(struct url *URL, const char } /* we have a hit or an error */ - if (conn->err == HTTP_OK || conn->err == HTTP_PARTIAL || HTTP_ERROR(conn->err)) + if (conn->err == HTTP_OK + || conn->err == HTTP_NOT_MODIFIED + || conn->err == HTTP_PARTIAL + || HTTP_ERROR(conn->err)) break; /* all other cases: we got a redirect */ @@ -1102,6 +1119,11 @@ http_request(struct url *URL, const char (long long)offset, (long long)length, (long long)size, (long long)clength)); + if (conn->err == HTTP_NOT_MODIFIED) { + http_seterr(HTTP_NOT_MODIFIED); + return (NULL); + } + /* check for inconsistencies */ if (clength != -1 && length != -1 && clength != length) { http_seterr(HTTP_PROTOCOL_ERROR); Modified: stable/7/usr.bin/fetch/fetch.1 ============================================================================== --- stable/7/usr.bin/fetch/fetch.1 Fri Jan 9 02:31:51 2009 (r186919) +++ stable/7/usr.bin/fetch/fetch.1 Fri Jan 9 03:42:41 2009 (r186920) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 11, 2003 +.Dd December 14, 2008 .Dt FETCH 1 .Os .Sh NAME @@ -37,17 +37,25 @@ .Nd retrieve a file by Uniform Resource Locator .Sh SYNOPSIS .Nm -.Op Fl 146AFMPRUadlmnpqrsv +.Op Fl 146AadFlMmnPpqRrsUv .Op Fl B Ar bytes +.Op Fl i Ar file +.Op Fl N Ar file +.Op Fl o Ar file .Op Fl S Ar bytes .Op Fl T Ar seconds +.Op Fl w Ar seconds +.Ar URL ... +.Nm +.Op Fl 146AadFlMmnPpqRrsUv +.Op Fl B Ar bytes +.Op Fl i Ar file .Op Fl N Ar file .Op Fl o Ar file +.Op Fl S Ar bytes +.Op Fl T Ar seconds .Op Fl w Ar seconds -.Op Fl h Ar host -.Op Fl c Ar dir -.Op Fl f Ar file -.Op Ar URL ... +.Fl h Ar host Fl f Ar file Oo Fl c Ar dir Oc .Sh DESCRIPTION The .Nm @@ -59,7 +67,7 @@ command line. .Pp The following options are available: .Bl -tag -width Fl -.It Fl \&1 +.It Fl 1 Stop and return exit code 0 at the first successfully retrieved file. .It Fl 4 Forces @@ -110,6 +118,12 @@ The file to retrieve is located on the h .Ar host . This option is deprecated and is provided for backward compatibility only. +.It Fl i Ar file +If-Modified-Since mode: the remote file will only be retrieved if it +is newer than +.Ar file +on the local host. +(HTTP only) .It Fl l If the target is a file-scheme URL, make a symbolic link to the target rather than trying to copy it. @@ -243,6 +257,12 @@ If multiple URLs are listed on the comma .Nm will attempt to retrieve each one of them in turn, and will return zero only if they were all successfully retrieved. +.Pp +If the +.Fl i +argument is used and the remote file is not newer than the +specified file then the command will still return success, +although no file is transferred. .Sh SEE ALSO .Xr fetch 3 .Sh HISTORY Modified: stable/7/usr.bin/fetch/fetch.c ============================================================================== --- stable/7/usr.bin/fetch/fetch.c Fri Jan 9 02:31:51 2009 (r186919) +++ stable/7/usr.bin/fetch/fetch.c Fri Jan 9 03:42:41 2009 (r186920) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -60,6 +59,8 @@ int d_flag; /* -d: direct connection int F_flag; /* -F: restart without checking mtime */ char *f_filename; /* -f: file to fetch */ char *h_hostname; /* -h: host to fetch from */ +int i_flag; /* -i: specify input file for mtime comparison */ +char *i_filename; /* name of input file */ int l_flag; /* -l: link rather than copy file: URLs */ int m_flag; /* -[Mm]: mirror mode */ char *N_filename; /* -N: netrc file name */ @@ -381,6 +382,14 @@ fetch(char *URL, const char *path) if (A_flag) strcat(flags, "A"); timeout = T_secs ? T_secs : http_timeout; + if (i_flag) { + if (stat(i_filename, &sb)) { + warn("%s: stat()", i_filename); + goto failure; + } + url->ims_time = sb.st_mtime; + strcat(flags, "i"); + } } /* set the protocol timeout. */ @@ -448,7 +457,14 @@ fetch(char *URL, const char *path) goto signal; if (f == NULL) { warnx("%s: %s", URL, fetchLastErrString); - goto failure; + if (i_flag && strcmp(url->scheme, SCHEME_HTTP) == 0 + && fetchLastErrCode == FETCH_OK + && strcmp(fetchLastErrString, "Not Modified") == 0) { + /* HTTP Not Modified Response, return OK. */ + r = 0; + goto done; + } else + goto failure; } if (sigint) goto signal; @@ -710,10 +726,11 @@ fetch(char *URL, const char *path) static void usage(void) { - fprintf(stderr, "%s\n%s\n%s\n", - "usage: fetch [-146AFMPRUadlmnpqrsv] [-N netrc] [-o outputfile]", - " [-S bytes] [-B bytes] [-T seconds] [-w seconds]", - " [-h host -f file [-c dir] | URL ...]"); + fprintf(stderr, "%s\n%s\n%s\n%s\n", +"usage: fetch [-146AadFlMmnPpqRrsUv] [-B bytes] [-N file] [-o file] [-S bytes]", +" [-T seconds] [-w seconds] [-i file] URL ...", +" fetch [-146AadFlMmnPpqRrsUv] [-B bytes] [-N file] [-o file] [-S bytes]", +" [-T seconds] [-w seconds] [-i file] -h host -f file [-c dir]"); } @@ -730,7 +747,7 @@ main(int argc, char *argv[]) int c, e, r; while ((c = getopt(argc, argv, - "146AaB:bc:dFf:Hh:lMmN:nPpo:qRrS:sT:tUvw:")) != -1) + "146AaB:bc:dFf:Hh:i:lMmN:nPpo:qRrS:sT:tUvw:")) != -1) switch (c) { case '1': once_flag = 1; @@ -775,6 +792,10 @@ main(int argc, char *argv[]) case 'h': h_hostname = optarg; break; + case 'i': + i_flag = 1; + i_filename = optarg; + break; case 'l': l_flag = 1; break; @@ -842,7 +863,7 @@ main(int argc, char *argv[]) break; default: usage(); - exit(EX_USAGE); + exit(1); } argc -= optind; @@ -851,7 +872,7 @@ main(int argc, char *argv[]) if (h_hostname || f_filename || c_dirname) { if (!h_hostname || !f_filename || argc) { usage(); - exit(EX_USAGE); + exit(1); } /* XXX this is a hack. */ if (strcspn(h_hostname, "@:/") != strlen(h_hostname)) @@ -864,7 +885,7 @@ main(int argc, char *argv[]) if (!argc) { usage(); - exit(EX_USAGE); + exit(1); } /* allocate buffer */ @@ -905,10 +926,10 @@ main(int argc, char *argv[]) } else if (stat(o_filename, &sb) == -1) { if (errno == ENOENT) { if (argc > 1) - errx(EX_USAGE, "%s is not a directory", + errx(1, "%s is not a directory", o_filename); } else { - err(EX_IOERR, "%s", o_filename); + err(1, "%s", o_filename); } } else { if (sb.st_mode & S_IFDIR) From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 11:09:58 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D47010656CA; Fri, 9 Jan 2009 11:09:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA4758FC23; Fri, 9 Jan 2009 11:09:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09B9vGX054815; Fri, 9 Jan 2009 11:09:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09B9v5V054804; Fri, 9 Jan 2009 11:09:57 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901091109.n09B9v5V054804@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 9 Jan 2009 11:09:57 +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: r186936 - in stable/7/sys: . amd64/amd64 amd64/linux32 arm/arm compat/ia32 compat/svr4 contrib/pf dev/cxgb i386/i386 i386/ibcs2 i386/linux ia64/ia64 kern powerpc/powerpc sparc64/sparc64 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 11:09:59 -0000 Author: kib Date: Fri Jan 9 11:09:57 2009 New Revision: 186936 URL: http://svn.freebsd.org/changeset/base/186936 Log: MFC r183322: Change the static struct sysentvec and struct Elf_Brandinfo initializers to the C99 style. Explicitely initialize sysentvec.sv_maxssiz that was missed in most sysvecs. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/elf_machdep.c stable/7/sys/amd64/linux32/linux32_sysvec.c stable/7/sys/arm/arm/elf_machdep.c stable/7/sys/compat/ia32/ia32_sysvec.c stable/7/sys/compat/svr4/svr4_sysvec.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/i386/elf_machdep.c stable/7/sys/i386/ibcs2/ibcs2_sysvec.c stable/7/sys/i386/linux/linux_sysvec.c stable/7/sys/ia64/ia64/elf_machdep.c stable/7/sys/kern/imgact_aout.c stable/7/sys/kern/init_main.c stable/7/sys/powerpc/powerpc/elf_machdep.c stable/7/sys/sparc64/sparc64/elf_machdep.c Modified: stable/7/sys/amd64/amd64/elf_machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/elf_machdep.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/amd64/amd64/elf_machdep.c Fri Jan 9 11:09:57 2009 (r186936) @@ -46,59 +46,60 @@ __FBSDID("$FreeBSD$"); #include struct sysentvec elf64_freebsd_sysvec = { - SYS_MAXSYSCALL, - sysent, - 0, - 0, - NULL, - 0, - NULL, - NULL, - __elfN(freebsd_fixup), - sendsig, - sigcode, - &szsigcode, - NULL, - "FreeBSD ELF64", - __elfN(coredump), - NULL, - MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_setregs, - NULL + .sv_size = SYS_MAXSYSCALL, + .sv_table = sysent, + .sv_mask = 0, + .sv_sigsize = 0, + .sv_sigtbl = NULL, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = __elfN(freebsd_fixup), + .sv_sendsig = sendsig, + .sv_sigcode = sigcode, + .sv_szsigcode = &szsigcode, + .sv_prepsyscall = NULL, + .sv_name = "FreeBSD ELF64", + .sv_coredump = __elfN(coredump), + .sv_imgact_try = NULL, + .sv_minsigstksz = MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; static Elf64_Brandinfo freebsd_brand_info = { - ELFOSABI_FREEBSD, - EM_X86_64, - "FreeBSD", - NULL, - "/libexec/ld-elf.so.1", - &elf64_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_X86_64, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/libexec/ld-elf.so.1", + .sysvec = &elf64_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf64_insert_brand_entry, &freebsd_brand_info); static Elf64_Brandinfo freebsd_brand_oinfo = { - ELFOSABI_FREEBSD, - EM_X86_64, - "FreeBSD", - NULL, - "/usr/libexec/ld-elf.so.1", - &elf64_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_X86_64, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/usr/libexec/ld-elf.so.1", + .sysvec = &elf64_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf64_insert_brand_entry, Modified: stable/7/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/7/sys/amd64/linux32/linux32_sysvec.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/amd64/linux32/linux32_sysvec.c Fri Jan 9 11:09:57 2009 (r186936) @@ -1001,62 +1001,62 @@ linux32_fixlimit(struct rlimit *rl, int } struct sysentvec elf_linux_sysvec = { - LINUX_SYS_MAXSYSCALL, - linux_sysent, - 0, - LINUX_SIGTBLSZ, - bsd_to_linux_signal, - ELAST + 1, - bsd_to_linux_errno, - translate_traps, - elf_linux_fixup, - linux_sendsig, - linux_sigcode, - &linux_szsigcode, - linux_prepsyscall, - "Linux ELF32", - elf32_coredump, - exec_linux_imgact_try, - LINUX_MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - LINUX32_USRSTACK, - LINUX32_USRSTACK, - LINUX32_PS_STRINGS, - VM_PROT_ALL, - linux_copyout_strings, - exec_linux_setregs, - linux32_fixlimit, - &linux32_maxssiz, + .sv_size = LINUX_SYS_MAXSYSCALL, + .sv_table = linux_sysent, + .sv_mask = 0, + .sv_sigsize = LINUX_SIGTBLSZ, + .sv_sigtbl = bsd_to_linux_signal, + .sv_errsize = ELAST + 1, + .sv_errtbl = bsd_to_linux_errno, + .sv_transtrap = translate_traps, + .sv_fixup = elf_linux_fixup, + .sv_sendsig = linux_sendsig, + .sv_sigcode = linux_sigcode, + .sv_szsigcode = &linux_szsigcode, + .sv_prepsyscall = linux_prepsyscall, + .sv_name = "Linux ELF32", + .sv_coredump = elf32_coredump, + .sv_imgact_try = exec_linux_imgact_try, + .sv_minsigstksz = LINUX_MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = LINUX32_USRSTACK, + .sv_usrstack = LINUX32_USRSTACK, + .sv_psstrings = LINUX32_PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = linux_copyout_strings, + .sv_setregs = exec_linux_setregs, + .sv_fixlimit = linux32_fixlimit, + .sv_maxssiz = &linux32_maxssiz, }; static Elf32_Brandinfo linux_brand = { - ELFOSABI_LINUX, - EM_386, - "Linux", - "/compat/linux", - "/lib/ld-linux.so.1", - &elf_linux_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_LINUX, + .machine = EM_386, + .compat_3_brand = "Linux", + .emul_path = "/compat/linux", + .interp_path = "/lib/ld-linux.so.1", + .sysvec = &elf_linux_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; static Elf32_Brandinfo linux_glibc2brand = { - ELFOSABI_LINUX, - EM_386, - "Linux", - "/compat/linux", - "/lib/ld-linux.so.2", - &elf_linux_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_LINUX, + .machine = EM_386, + .compat_3_brand = "Linux", + .emul_path = "/compat/linux", + .interp_path = "/lib/ld-linux.so.2", + .sysvec = &elf_linux_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; Elf32_Brandinfo *linux_brandlist[] = { - &linux_brand, - &linux_glibc2brand, - NULL - }; + &linux_brand, + &linux_glibc2brand, + NULL +}; static int linux_elf_modevent(module_t mod, int type, void *data) Modified: stable/7/sys/arm/arm/elf_machdep.c ============================================================================== --- stable/7/sys/arm/arm/elf_machdep.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/arm/arm/elf_machdep.c Fri Jan 9 11:09:57 2009 (r186936) @@ -46,59 +46,60 @@ __FBSDID("$FreeBSD$"); #include struct sysentvec elf32_freebsd_sysvec = { - SYS_MAXSYSCALL, - sysent, - 0, - 0, - NULL, - 0, - NULL, - NULL, - __elfN(freebsd_fixup), - sendsig, - sigcode, - &szsigcode, - NULL, - "FreeBSD ELF32", - __elfN(coredump), - NULL, - MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_setregs, - NULL + .sv_size = SYS_MAXSYSCALL, + .sv_table = sysent, + .sv_mask = 0, + .sv_sigsize = 0, + .sv_sigtbl = NULL, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = __elfN(freebsd_fixup), + .sv_sendsig = sendsig, + .sv_sigcode = sigcode, + .sv_szsigcode = &szsigcode, + .sv_prepsyscall = NULL, + .sv_name = "FreeBSD ELF32", + .sv_coredump = __elfN(coredump), + .sv_imgact_try = NULL, + .sv_minsigstksz = MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; static Elf32_Brandinfo freebsd_brand_info = { - ELFOSABI_FREEBSD, - EM_ARM, - "FreeBSD", - NULL, - "/libexec/ld-elf.so.1", - &elf32_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_ARM, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/libexec/ld-elf.so.1", + .sysvec = &elf32_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_info); static Elf32_Brandinfo freebsd_brand_oinfo = { - ELFOSABI_FREEBSD, - EM_ARM, - "FreeBSD", - NULL, - "/usr/libexec/ld-elf.so.1", - &elf32_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_ARM, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/usr/libexec/ld-elf.so.1", + .sysvec = &elf32_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, Modified: stable/7/sys/compat/ia32/ia32_sysvec.c ============================================================================== --- stable/7/sys/compat/ia32/ia32_sysvec.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/compat/ia32/ia32_sysvec.c Fri Jan 9 11:09:57 2009 (r186936) @@ -111,61 +111,61 @@ SYSCTL_ULONG(_compat_ia32, OID_AUTO, max TUNABLE_ULONG("compat.ia32.maxvmem", &ia32_maxvmem); struct sysentvec ia32_freebsd_sysvec = { - FREEBSD32_SYS_MAXSYSCALL, - freebsd32_sysent, - 0, - 0, - NULL, - 0, - NULL, - NULL, - elf32_freebsd_fixup, - ia32_sendsig, - ia32_sigcode, - &sz_ia32_sigcode, - NULL, - "FreeBSD ELF32", - elf32_coredump, - NULL, - MINSIGSTKSZ, - IA32_PAGE_SIZE, - 0, - FREEBSD32_USRSTACK, - FREEBSD32_USRSTACK, - FREEBSD32_PS_STRINGS, - VM_PROT_ALL, - ia32_copyout_strings, - ia32_setregs, - ia32_fixlimit, - &ia32_maxssiz + .sv_size = FREEBSD32_SYS_MAXSYSCALL, + .sv_table = freebsd32_sysent, + .sv_mask = 0, + .sv_sigsize = 0, + .sv_sigtbl = NULL, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = elf32_freebsd_fixup, + .sv_sendsig = ia32_sendsig, + .sv_sigcode = ia32_sigcode, + .sv_szsigcode = &sz_ia32_sigcode, + .sv_prepsyscall = NULL, + .sv_name = "FreeBSD ELF32", + .sv_coredump = elf32_coredump, + .sv_imgact_try = NULL, + .sv_minsigstksz = MINSIGSTKSZ, + .sv_pagesize = IA32_PAGE_SIZE, + .sv_minuser = 0, + .sv_maxuser = FREEBSD32_USRSTACK, + .sv_usrstack = FREEBSD32_USRSTACK, + .sv_psstrings = FREEBSD32_PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = ia32_copyout_strings, + .sv_setregs = ia32_setregs, + .sv_fixlimit = ia32_fixlimit, + .sv_maxssiz = &ia32_maxssiz }; static Elf32_Brandinfo ia32_brand_info = { - ELFOSABI_FREEBSD, - EM_386, - "FreeBSD", - NULL, - "/libexec/ld-elf.so.1", - &ia32_freebsd_sysvec, - "/libexec/ld-elf32.so.1", - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_386, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/libexec/ld-elf.so.1", + .sysvec = &ia32_freebsd_sysvec, + .interp_newpath = "/libexec/ld-elf32.so.1", + .flags = BI_CAN_EXEC_DYN +}; SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, &ia32_brand_info); static Elf32_Brandinfo ia32_brand_oinfo = { - ELFOSABI_FREEBSD, - EM_386, - "FreeBSD", - NULL, - "/usr/libexec/ld-elf.so.1", - &ia32_freebsd_sysvec, - "/libexec/ld-elf32.so.1", - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_386, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/usr/libexec/ld-elf.so.1", + .sysvec = &ia32_freebsd_sysvec, + .interp_newpath = "/libexec/ld-elf32.so.1", + .flags = BI_CAN_EXEC_DYN, +}; SYSINIT(oia32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, Modified: stable/7/sys/compat/svr4/svr4_sysvec.c ============================================================================== --- stable/7/sys/compat/svr4/svr4_sysvec.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/compat/svr4/svr4_sysvec.c Fri Jan 9 11:09:57 2009 (r186936) @@ -167,44 +167,46 @@ extern int svr4_szsigcode; extern char svr4_sigcode[]; struct sysentvec svr4_sysvec = { - SVR4_SYS_MAXSYSCALL, - svr4_sysent, - 0xff, - SVR4_NSIG-1, /* NB: signal trans table indexed with signno-1 */ - bsd_to_svr4_sig+1, - ELAST, /* ELAST */ - bsd_to_svr4_errno, - NULL, - svr4_fixup, - svr4_sendsig, - svr4_sigcode, - &svr4_szsigcode, - NULL, - "SVR4", - elf32_coredump, - NULL, - SVR4_MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_setregs, - NULL + .sv_size = SVR4_SYS_MAXSYSCALL, + .sv_table = svr4_sysent, + .sv_mask = 0xff, + .sv_sigsize = SVR4_NSIG-1, /* NB: signal trans table indexed with signno-1 */ + .sv_sigtbl = bsd_to_svr4_sig+1, + .sv_errsize = ELAST, /* ELAST */ + .sv_errtbl = bsd_to_svr4_errno, + .sv_transtrap = NULL, + .sv_fixup = svr4_fixup, + .sv_sendsig = svr4_sendsig, + .sv_sigcode = svr4_sigcode, + .sv_szsigcode = &svr4_szsigcode, + .sv_prepsyscall = NULL, + .sv_name = "SVR4", + .sv_coredump = elf32_coredump, + .sv_imgact_try = NULL, + .sv_minsigstksz = SVR4_MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; const char svr4_emul_path[] = "/compat/svr4"; Elf32_Brandinfo svr4_brand = { - ELFOSABI_SYSV, - EM_386, /* XXX only implemented for x86 so far. */ - "SVR4", - svr4_emul_path, - "/lib/libc.so.1", - &svr4_sysvec, - NULL, + .brand = ELFOSABI_SYSV, + .machine = EM_386, /* XXX only implemented for x86 so far. */ + .compat_3_brand = "SVR4", + .emul_path = svr4_emul_path, + .interp_path = "/lib/libc.so.1", + .sysvec = &svr4_sysvec, + .interp_newpath = NULL, + .flags = 0 }; static int Modified: stable/7/sys/i386/i386/elf_machdep.c ============================================================================== --- stable/7/sys/i386/i386/elf_machdep.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/i386/i386/elf_machdep.c Fri Jan 9 11:09:57 2009 (r186936) @@ -46,59 +46,60 @@ __FBSDID("$FreeBSD$"); #include struct sysentvec elf32_freebsd_sysvec = { - SYS_MAXSYSCALL, - sysent, - 0, - 0, - NULL, - 0, - NULL, - NULL, - __elfN(freebsd_fixup), - sendsig, - sigcode, - &szsigcode, - NULL, - "FreeBSD ELF32", - __elfN(coredump), - NULL, - MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_setregs, - NULL + .sv_size = SYS_MAXSYSCALL, + .sv_table = sysent, + .sv_mask = 0, + .sv_sigsize = 0, + .sv_sigtbl = NULL, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = __elfN(freebsd_fixup), + .sv_sendsig = sendsig, + .sv_sigcode = sigcode, + .sv_szsigcode = &szsigcode, + .sv_prepsyscall = NULL, + .sv_name = "FreeBSD ELF32", + .sv_coredump = __elfN(coredump), + .sv_imgact_try = NULL, + .sv_minsigstksz = MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; static Elf32_Brandinfo freebsd_brand_info = { - ELFOSABI_FREEBSD, - EM_386, - "FreeBSD", - NULL, - "/libexec/ld-elf.so.1", - &elf32_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_386, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/libexec/ld-elf.so.1", + .sysvec = &elf32_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_info); static Elf32_Brandinfo freebsd_brand_oinfo = { - ELFOSABI_FREEBSD, - EM_386, - "FreeBSD", - NULL, - "/usr/libexec/ld-elf.so.1", - &elf32_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_386, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/usr/libexec/ld-elf.so.1", + .sysvec = &elf32_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, Modified: stable/7/sys/i386/ibcs2/ibcs2_sysvec.c ============================================================================== --- stable/7/sys/i386/ibcs2/ibcs2_sysvec.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/i386/ibcs2/ibcs2_sysvec.c Fri Jan 9 11:09:57 2009 (r186936) @@ -59,32 +59,33 @@ extern char sigcode[]; static int ibcs2_fixup(register_t **, struct image_params *); struct sysentvec ibcs2_svr3_sysvec = { - sizeof (ibcs2_sysent) / sizeof (ibcs2_sysent[0]), - ibcs2_sysent, - 0xFF, - IBCS2_SIGTBLSZ, - bsd_to_ibcs2_sig, - ELAST + 1, - bsd_to_ibcs2_errno, - NULL, /* trap-to-signal translation function */ - ibcs2_fixup, /* fixup */ - sendsig, - sigcode, /* use generic trampoline */ - &szsigcode, /* use generic trampoline size */ - NULL, /* prepsyscall */ - "IBCS2 COFF", - NULL, /* we don't have a COFF coredump function */ - NULL, - IBCS2_MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_setregs, - NULL + .sv_size = sizeof (ibcs2_sysent) / sizeof (ibcs2_sysent[0]), + .sv_table = ibcs2_sysent, + .sv_mask = 0xff, + .sv_sigsize = IBCS2_SIGTBLSZ, + .sv_sigtbl = bsd_to_ibcs2_sig, + .sv_errsize = ELAST + 1, + .sv_errtbl = bsd_to_ibcs2_errno, + .sv_transtrap = NULL, + .sv_fixup = ibcs2_fixup, + .sv_sendsig = sendsig, + .sv_sigcode = sigcode, /* use generic trampoline */ + .sv_szsigcode = &szsigcode, + .sv_prepsyscall = NULL, + .sv_name = "IBCS2 COFF", + .sv_coredump = NULL, /* we don't have a COFF coredump function */ + .sv_imgact_try = NULL, + .sv_minsigstksz = IBCS2_MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; static int Modified: stable/7/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/7/sys/i386/linux/linux_sysvec.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/i386/linux/linux_sysvec.c Fri Jan 9 11:09:57 2009 (r186936) @@ -813,90 +813,92 @@ exec_linux_setregs(struct thread *td, u_ } struct sysentvec linux_sysvec = { - LINUX_SYS_MAXSYSCALL, - linux_sysent, - 0, - LINUX_SIGTBLSZ, - bsd_to_linux_signal, - ELAST + 1, - bsd_to_linux_errno, - translate_traps, - linux_fixup, - linux_sendsig, - linux_sigcode, - &linux_szsigcode, - linux_prepsyscall, - "Linux a.out", - NULL, - exec_linux_imgact_try, - LINUX_MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_linux_setregs, - NULL + .sv_size = LINUX_SYS_MAXSYSCALL, + .sv_table = linux_sysent, + .sv_mask = 0, + .sv_sigsize = LINUX_SIGTBLSZ, + .sv_sigtbl = bsd_to_linux_signal, + .sv_errsize = ELAST + 1, + .sv_errtbl = bsd_to_linux_errno, + .sv_transtrap = translate_traps, + .sv_fixup = linux_fixup, + .sv_sendsig = linux_sendsig, + .sv_sigcode = linux_sigcode, + .sv_szsigcode = &linux_szsigcode, + .sv_prepsyscall = linux_prepsyscall, + .sv_name = "Linux a.out", + .sv_coredump = NULL, + .sv_imgact_try = exec_linux_imgact_try, + .sv_minsigstksz = LINUX_MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_linux_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; struct sysentvec elf_linux_sysvec = { - LINUX_SYS_MAXSYSCALL, - linux_sysent, - 0, - LINUX_SIGTBLSZ, - bsd_to_linux_signal, - ELAST + 1, - bsd_to_linux_errno, - translate_traps, - elf_linux_fixup, - linux_sendsig, - linux_sigcode, - &linux_szsigcode, - linux_prepsyscall, - "Linux ELF", - elf32_coredump, - exec_linux_imgact_try, - LINUX_MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_linux_setregs, - NULL + .sv_size = LINUX_SYS_MAXSYSCALL, + .sv_table = linux_sysent, + .sv_mask = 0, + .sv_sigsize = LINUX_SIGTBLSZ, + .sv_sigtbl = bsd_to_linux_signal, + .sv_errsize = ELAST + 1, + .sv_errtbl = bsd_to_linux_errno, + .sv_transtrap = translate_traps, + .sv_fixup = elf_linux_fixup, + .sv_sendsig = linux_sendsig, + .sv_sigcode = linux_sigcode, + .sv_szsigcode = &linux_szsigcode, + .sv_prepsyscall = linux_prepsyscall, + .sv_name = "Linux ELF", + .sv_coredump = elf32_coredump, + .sv_imgact_try = exec_linux_imgact_try, + .sv_minsigstksz = LINUX_MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_linux_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; static Elf32_Brandinfo linux_brand = { - ELFOSABI_LINUX, - EM_386, - "Linux", - "/compat/linux", - "/lib/ld-linux.so.1", - &elf_linux_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_LINUX, + .machine = EM_386, + .compat_3_brand = "Linux", + .emul_path = "/compat/linux", + .interp_path = "/lib/ld-linux.so.1", + .sysvec = &elf_linux_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; static Elf32_Brandinfo linux_glibc2brand = { - ELFOSABI_LINUX, - EM_386, - "Linux", - "/compat/linux", - "/lib/ld-linux.so.2", - &elf_linux_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_LINUX, + .machine = EM_386, + .compat_3_brand = "Linux", + .emul_path = "/compat/linux", + .interp_path = "/lib/ld-linux.so.2", + .sysvec = &elf_linux_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; Elf32_Brandinfo *linux_brandlist[] = { - &linux_brand, - &linux_glibc2brand, - NULL - }; + &linux_brand, + &linux_glibc2brand, + NULL +}; static int linux_elf_modevent(module_t mod, int type, void *data) Modified: stable/7/sys/ia64/ia64/elf_machdep.c ============================================================================== --- stable/7/sys/ia64/ia64/elf_machdep.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/ia64/ia64/elf_machdep.c Fri Jan 9 11:09:57 2009 (r186936) @@ -54,56 +54,57 @@ Elf_Addr link_elf_get_gp(linker_file_t); extern Elf_Addr fptr_storage[]; struct sysentvec elf64_freebsd_sysvec = { - SYS_MAXSYSCALL, - sysent, - 0, - 0, - NULL, - 0, - NULL, - NULL, - __elfN(freebsd_fixup), - sendsig, - NULL, /* sigcode */ - NULL, /* &szsigcode */ - NULL, - "FreeBSD ELF64", - __elfN(coredump), - NULL, - MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_READ|VM_PROT_WRITE, - exec_copyout_strings, - exec_setregs, - NULL + .sv_size = SYS_MAXSYSCALL, + .sv_table = sysent, + .sv_mask = 0, + .sv_sigsize = 0, + .sv_sigtbl = NULL, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = __elfN(freebsd_fixup), + .sv_sendsig = sendsig, + .sv_sigcode = NULL, + .sv_szsigcode = NULL, + .sv_prepsyscall = NULL, + .sv_name = "FreeBSD ELF64", + .sv_coredump = __elfN(coredump), + .sv_imgact_try = NULL, + .sv_minsigstksz = MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_READ|VM_PROT_WRITE, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; static Elf64_Brandinfo freebsd_brand_info = { - ELFOSABI_FREEBSD, - EM_IA_64, - "FreeBSD", - NULL, - "/libexec/ld-elf.so.1", - &elf64_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, + .brand = ELFOSABI_FREEBSD, + .machine = EM_IA_64, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/libexec/ld-elf.so.1", + .sysvec = &elf64_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, }; SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_info); static Elf64_Brandinfo freebsd_brand_oinfo = { - ELFOSABI_FREEBSD, - EM_IA_64, - "FreeBSD", - NULL, - "/usr/libexec/ld-elf.so.1", - &elf64_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, + .brand = ELFOSABI_FREEBSD, + .machine = EM_IA_64, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/usr/libexec/ld-elf.so.1", + .sysvec = &elf64_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, }; SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_oinfo); Modified: stable/7/sys/kern/imgact_aout.c ============================================================================== --- stable/7/sys/kern/imgact_aout.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/kern/imgact_aout.c Fri Jan 9 11:09:57 2009 (r186936) @@ -56,32 +56,33 @@ static int exec_aout_imgact(struct image static int aout_fixup(register_t **stack_base, struct image_params *imgp); struct sysentvec aout_sysvec = { - SYS_MAXSYSCALL, - sysent, - 0, - 0, - NULL, - 0, - NULL, - NULL, - aout_fixup, - sendsig, - sigcode, - &szsigcode, - NULL, - "FreeBSD a.out", - NULL, - NULL, - MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_setregs, - NULL + .sv_size = SYS_MAXSYSCALL, + .sv_table = sysent, + .sv_mask = 0, + .sv_sigsize = 0, + .sv_sigtbl = NULL, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = aout_fixup, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 11:20:51 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 879DA106568A; Fri, 9 Jan 2009 11:20:51 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73AB68FC13; Fri, 9 Jan 2009 11:20:51 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09BKpKq055100; Fri, 9 Jan 2009 11:20:51 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09BKpRX055098; Fri, 9 Jan 2009 11:20:51 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901091120.n09BKpRX055098@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Jan 2009 11:20:51 +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: r186937 - stable/7/usr.sbin/mergemaster X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 11:20:53 -0000 Author: dougb Date: Fri Jan 9 11:20:51 2009 New Revision: 186937 URL: http://svn.freebsd.org/changeset/base/186937 Log: MFC the changes from r179725, documentation of the AUTO_UPGRADE knob, and 186677:186749: o Removal of 184781, 184804, and 184832 (automatic installation of files that differ only by VCS Id) o Fix cross-platform builds o Various improvements to the mtree (-U) feature o Remove the last of the MAKEDEV stuff o Switch to using the top level (e.g., /usr/src) Makefile, and specify that we should use the *.mk files from the source directory instead of the installed versions. o Check for the deprecated 'nodev' option in /etc/fstab o Add support for the IGNORE_FILES variable o Before installing a file check to make sure that the target does not already exist as a directory o Check to be sure that the file installed and error out if not o We only need to check for the presence of the target of $PAGER if that variable is actually set Modified: stable/7/usr.sbin/mergemaster/ (props changed) stable/7/usr.sbin/mergemaster/mergemaster.8 stable/7/usr.sbin/mergemaster/mergemaster.sh Modified: stable/7/usr.sbin/mergemaster/mergemaster.8 ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.8 Fri Jan 9 11:09:57 2009 (r186936) +++ stable/7/usr.sbin/mergemaster/mergemaster.8 Fri Jan 9 11:20:51 2009 (r186937) @@ -1,4 +1,4 @@ -.\" Copyright (c) 1998-2003 Douglas Barton +.\" Copyright (c) 1998-2009 Douglas Barton .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 4, 2006 +.Dd January 2, 2009 .Dt MERGEMASTER 8 .Os .Sh NAME @@ -32,14 +32,14 @@ .Nd merge configuration files, et al during an upgrade .Sh SYNOPSIS .Nm -.Op Fl scrvahipCPU +.Op Fl achiprsvCPU +.Op Fl A Ar Target architecture +.Op Fl D Ar /destdir/path .Op Fl m Ar /path/to/sources .Op Fl t Ar /path/to/temp/root .Op Fl d .Op Fl u Ar N .Op Fl w Ar N -.Op Fl A Ar architecture -.Op Fl D Ar /path .Sh DESCRIPTION The .Nm @@ -54,7 +54,7 @@ recommended that you back up your directory before beginning this process. .Pp The script uses -.Pa /usr/src/etc/Makefile +.Pa /usr/src/Makefile to build a temporary root environment from .Pa / down, populating that environment with the various @@ -218,6 +218,14 @@ Specify the path to the directory where .Xr make 1 . (In other words, where your sources are, but -s was already taken.) +In previous versions of +.Nm +you needed to specify the path all the way to +.Pa src/etc . +Starting with r186678 you only need to specify the path to +.Pa src . +.Nm +will convert the path for you if you use the old method. .It Fl t Ar /path/to/temp/root Create the temporary root environment in .Pa /path/to/temp/root @@ -236,7 +244,7 @@ Supply an alternate screen width to the .Xr sdiff 1 command in numbers of columns. The default is 80. -.It Fl A Ar architecture +.It Fl A Ar Target architecture Specify an alternative .Ev TARGET_ARCH architecture name. @@ -294,24 +302,33 @@ with all values commented out: # These are options for mergemaster, with their default values listed # The following options have command line overrides # +# The target architecture (unset by default) +#ARCHSTRING='TARGET_ARCH=' +# +# Sourcedir is the directory to do the 'make' in (where the new files are) +#SOURCEDIR='/usr/src' +# # Directory to install the temporary root environment into #TEMPROOT='/var/tmp/temproot' # +# Specify the destination directory for the installed files +#DESTDIR= +# # Strict comparison bypasses the CVS $Id tests and compares every file #STRICT=no # # Type of diff, such as unified, context, etc. #DIFF_FLAG='-u' # -# Additional options for diff. This will get unset when using -s. -#DIFF_OPTIONS='-I$\&FreeBSD:.*[$]' # Ignores CVS Id tags -# # Verbose mode includes more details and additional checks #VERBOSE= # # Automatically install files that do not exist on the system already #AUTO_INSTALL= # +# Automatically upgrade files that have not been user modified +#AUTO_UPGRADE= +# # Compare /etc/rc.conf[.local] to /etc/defaults/rc.conf #COMP_CONFS=yes # @@ -319,25 +336,26 @@ with all values commented out: #PRESERVE_FILES=yes #PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` # -# Sourcedir is the directory to do the 'make' in (where the new files are) -#SOURCEDIR='/usr/src/etc' -# # The umask for mergemaster to compare the default file's modes to #NEW_UMASK=022 # -# Specify the destination directory for the installed files -#DESTDIR= -# # The following options have no command line overrides +# +# Files to always avoid comparing +#IGNORE_FILES='/etc/motd /etc/printcap foo bar' +# +# Additional options for diff. This will get unset when using -s. +#DIFF_OPTIONS='-I$\&FreeBSD:.*[$]' # Ignores CVS Id tags +# +# Location to store the list of mtree values for AUTO_UPGRADE purposes +#MTREEDB='/var/db' +# # For those who just cannot stand including the full path to PAGER #DONT_CHECK_PAGER= # # If you set 'yes' above, make sure to include the PATH to your pager #PATH=/bin:/usr/bin:/usr/sbin # -# Don't compare the old and new motd files -#IGNORE_MOTD=yes -# # Specify the path to scripts to run before the comparison starts, # and/or after the script has finished its work #MM_PRE_COMPARE_SCRIPT= @@ -354,6 +372,11 @@ Invalid command line option Failure to create the temporary root environment .Pp Failure to populate the temporary root +.Pp +Presence of the 'nodev' option in +.Pa /etc/fstab +.Pp +Failure to install a file .Sh EXAMPLES Typically all you will need to do is type .Nm Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.sh Fri Jan 9 11:09:57 2009 (r186936) +++ stable/7/usr.sbin/mergemaster/mergemaster.sh Fri Jan 9 11:20:51 2009 (r186937) @@ -5,7 +5,7 @@ # Compare files created by /usr/src/etc/Makefile (or the directory # the user specifies) with the currently installed copies. -# Copyright 1998-2004 Douglas Barton +# Copyright 1998-2009 Douglas Barton # DougB@FreeBSD.org # $FreeBSD$ @@ -244,10 +244,6 @@ press_to_continue () { # TEMPROOT='/var/tmp/temproot' -# Assign the location of the mtree database -# -MTREEDB='/var/db/mergemaster.mtree' - # Read /etc/mergemaster.rc first so the one in $HOME can override # if [ -r /etc/mergemaster.rc ]; then @@ -260,12 +256,17 @@ if [ -r "$HOME/.mergemasterrc" ]; then . "$HOME/.mergemasterrc" fi +# Assign the location of the mtree database +# +MTREEDB=${MTREEDB:-/var/db} +MTREEFILE="${MTREEDB}/mergemaster.mtree" + # Check the command line options # while getopts ":ascrvhipCPm:t:du:w:D:A:U" COMMAND_LINE_ARGUMENT ; do case "${COMMAND_LINE_ARGUMENT}" in A) - ARCHSTRING='MACHINE_ARCH='${OPTARG} + ARCHSTRING='TARGET_ARCH='${OPTARG} ;; U) AUTO_UPGRADE=yes @@ -338,10 +339,30 @@ if [ -n "${PRESERVE_FILES}" -a -z "${PRE PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` fi -# Check the for the mtree database in DESTDIR. -if [ ! -f ${DESTDIR}${MTREEDB} ]; then - echo "*** Unable to find mtree database. Skipping auto-upgrade." - unset AUTO_UPGRADE +# Check for the mtree database in DESTDIR +case "${AUTO_UPGRADE}" in +'') ;; # If the option is not set no need to run the test or warn the user +*) + if [ ! -f "${DESTDIR}${MTREEFILE}" ]; then + echo '' + echo "*** Unable to find mtree database. Skipping auto-upgrade." + echo '' + press_to_continue + unset AUTO_UPGRADE + fi + ;; +esac + +if [ -e "${DESTDIR}/etc/fstab" ]; then + if grep -q nodev ${DESTDIR}/etc/fstab; then + echo '' + echo "*** You have the deprecated 'nodev' option in ${DESTDIR}/etc/fstab." + echo " This can prevent the filesystem from being mounted on reboot." + echo " Please update your fstab before continuing." + echo " See fstab(5) for more information." + echo '' + exit 1 + fi fi echo '' @@ -350,7 +371,8 @@ echo '' # case "${DONT_CHECK_PAGER}" in '') - while ! type "${PAGER%% *}" >/dev/null && [ -n "${PAGER}" ]; do +check_pager () { + while ! type "${PAGER%% *}" >/dev/null; do echo " *** Your PAGER environment variable specifies '${PAGER}', but" echo " due to the limited PATH that I use for security reasons," echo " I cannot execute it. So, what would you like to do?" @@ -392,6 +414,10 @@ case "${DONT_CHECK_PAGER}" in esac echo '' done +} + if [ -n "${PAGER}" ]; then + check_pager + fi ;; esac @@ -412,14 +438,25 @@ DIFF_FLAG=${DIFF_FLAG:--u} # Assign the source directory # -SOURCEDIR=${SOURCEDIR:-/usr/src/etc} +SOURCEDIR=${SOURCEDIR:-/usr/src} +if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a \ + -f ${SOURCEDIR}/../Makefile.inc1 ]; then + echo " *** The source directory you specified (${SOURCEDIR})" + echo " will be reset to ${SOURCEDIR}/.." + echo '' + sleep 3 + SOURCEDIR=${SOURCEDIR}/.. +fi + +# Setup make to use system files from SOURCEDIR +MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk" # Check DESTDIR against the mergemaster mtree database to see what # files the user changed from the reference files. # CHANGED= -if [ -n "${AUTO_UPGRADE}" -a -f "${DESTDIR}${MTREEDB}" ]; then - for file in `mtree -eq -f ${DESTDIR}${MTREEDB} -p ${DESTDIR}/ \ +if [ -n "${AUTO_UPGRADE}" -a -f "${DESTDIR}${MTREEFILE}" ]; then + for file in `mtree -eq -f ${DESTDIR}${MTREEFILE} -p ${DESTDIR}/ \ 2>/dev/null | awk '($2 == "changed") {print $1}'`; do if [ -f "${DESTDIR}/$file" ]; then CHANGED="${CHANGED} ${DESTDIR}/$file" @@ -552,14 +589,14 @@ case "${RERUN}" in case "${DESTDIR}" in '') ;; *) - make DESTDIR=${DESTDIR} ${ARCHSTRING} distrib-dirs + ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs ;; esac - make DESTDIR=${TEMPROOT} ${ARCHSTRING} distrib-dirs && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} obj && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} all && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} \ - DESTDIR=${TEMPROOT} distribution;} || + od=${TEMPROOT}/usr/obj + ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} everything SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} || { echo ''; echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to"; echo " the temproot environment"; @@ -569,8 +606,8 @@ case "${RERUN}" in *) # Only set up files that are crucial to {build|install}world { mkdir -p ${TEMPROOT}/etc && - cp -p ${SOURCEDIR}/master.passwd ${TEMPROOT}/etc && - cp -p ${SOURCEDIR}/group ${TEMPROOT}/etc;} || + cp -p ${SOURCEDIR}/etc/master.passwd ${TEMPROOT}/etc && + cp -p ${SOURCEDIR}/etc/group ${TEMPROOT}/etc;} || { echo ''; echo ' *** FATAL ERROR: Cannot copy files to the temproot environment'; echo ''; @@ -599,17 +636,23 @@ case "${RERUN}" in esac # Avoid comparing the motd if the user specifies it in .mergemasterrc + # Compatibility shim to be removed in FreeBSD 9.x case "${IGNORE_MOTD}" in '') ;; - *) rm -f ${TEMPROOT}/etc/motd + *) IGNORE_FILES="${IGNORE_FILES} /etc/motd" + echo '' + echo "*** You have the IGNORE_MOTD option set in your mergemaster rc file." + echo " This option is deprecated in favor of the IGNORE_FILES option." + echo " Please update your rc file accordingly." + echo '' + press_to_continue ;; esac - # Avoid trying to update MAKEDEV if /dev is on a devfs - if /sbin/sysctl vfs.devfs.generation > /dev/null 2>&1 ; then - rm -f ${TEMPROOT}/dev/MAKEDEV ${TEMPROOT}/dev/MAKEDEV.local - fi - + # Avoid comparing the following user specified files + for file in ${IGNORE_FILES}; do + test -e ${TEMPROOT}/${file} && unlink ${TEMPROOT}/${file} + done ;; # End of the "RERUN" test esac @@ -626,9 +669,9 @@ find ${TEMPROOT}/usr/obj -type f -delete find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null # Build the mtree database in a temporary location. -# TODO: Possibly use mktemp instead for security reasons? +MTREENEW=`mktemp -t mergemaster.mtree` case "${PRE_WORLD}" in -'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${DESTDIR}${MTREEDB}.new 2>/dev/null +'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${DESTDIR}${MTREENEW} 2>/dev/null ;; *) # We don't want to mess with the mtree database on a pre-world run. ;; @@ -647,7 +690,7 @@ if [ -z "${NEW_UMASK}" -a -z "${AUTO_RUN echo '' echo " *** Your umask is currently set to ${USER_UMASK}. By default, this script" echo " installs all files with the same user, group and modes that" - echo " they are created with by ${SOURCEDIR}/Makefile, compared to" + echo " they are created with by ${SOURCEDIR}/etc/Makefile, compared to" echo " a umask of 022. This umask allows world read permission when" echo " the file's default permissions have it." echo '' @@ -714,6 +757,12 @@ esac # Use the umask/mode information to install the files # Create directories as needed # +install_error () { + echo "*** FATAL ERROR: Unable to install ${1} to ${2}" + echo '' + exit 1 +} + do_install_and_rm () { case "${PRESERVE_FILES}" in [Yy][Ee][Ss]) @@ -724,8 +773,15 @@ do_install_and_rm () { ;; esac - install -m "${1}" "${2}" "${3}" && - rm -f "${2}" + if [ ! -d "${3}/${2##*/}" ]; then + if install -m ${1} ${2} ${3}; then + unlink ${2} + else + install_error ${2} ${3} + fi + else + install_error ${2} ${3} + fi } # 4095 = "obase=10;ibase=8;07777" | bc @@ -828,11 +884,6 @@ mm_install () { ;; esac else # File matched -x - case "${1#.}" in - /dev/MAKEDEV) - NEED_MAKEDEV=yes - ;; - esac do_install_and_rm "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" fi return $? @@ -904,7 +955,7 @@ if [ -r "${MM_PRE_COMPARE_SCRIPT}" ]; th fi # Using -size +0 avoids uselessly checking the empty log files created -# by ${SOURCEDIR}/Makefile and the device entries in ./dev, but does +# by ${SOURCEDIR}/etc/Makefile and the device entries in ./dev, but does # check the scripts in ./dev, as we'd like (assuming no devfs of course). # for COMPFILE in `find . -type f -size +0`; do @@ -986,9 +1037,10 @@ done # This is for the do way up there a echo '' echo "*** Comparison complete" -if [ -f "${DESTDIR}${MTREEDB}.new" ]; then +if [ -f "${DESTDIR}${MTREENEW}" ]; then echo "*** Saving mtree database for future upgrades" - mv -f ${DESTDIR}${MTREEDB}.new ${DESTDIR}${MTREEDB} 2>/dev/null + test -e "${MTREEFILE}" && unlink ${MTREEFILE} + mv ${DESTDIR}${MTREENEW} ${DESTDIR}${MTREEFILE} fi echo '' @@ -1096,16 +1148,6 @@ run_it_now () { esac } -case "${NEED_MAKEDEV}" in -'') ;; -*) - echo '' - echo "*** You installed a new ${DESTDIR}/dev/MAKEDEV script, so make sure that you run" - echo " 'cd ${DESTDIR}/dev && /bin/sh MAKEDEV all' to rebuild your devices" - run_it_now "cd ${DESTDIR}/dev && /bin/sh MAKEDEV all" - ;; -esac - case "${NEED_NEWALIASES}" in '') ;; *) @@ -1187,7 +1229,7 @@ esac case "${PRE_WORLD}" in '') ;; *) - MAKE_CONF="${SOURCEDIR%etc}share/examples/etc/make.conf" + MAKE_CONF="${SOURCEDIR}/share/examples/etc/make.conf" (echo '' echo '*** Comparing make variables' From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 11:21:26 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25019106566C; Fri, 9 Jan 2009 11:21:26 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 117518FC25; Fri, 9 Jan 2009 11:21:25 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09BLPZ3055160; Fri, 9 Jan 2009 11:21:25 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09BLP32055158; Fri, 9 Jan 2009 11:21:25 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901091121.n09BLP32055158@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Jan 2009 11:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186938 - stable/6/usr.sbin/mergemaster X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 11:21:27 -0000 Author: dougb Date: Fri Jan 9 11:21:25 2009 New Revision: 186938 URL: http://svn.freebsd.org/changeset/base/186938 Log: MFC the changes from r179725, documentation of the AUTO_UPGRADE knob, and 186677:186749: o Removal of 184781, 184804, and 184832 (automatic installation of files that differ only by VCS Id) o Fix cross-platform builds o Various improvements to the mtree (-U) feature o Remove the last of the MAKEDEV stuff o Switch to using the top level (e.g., /usr/src) Makefile, and specify that we should use the *.mk files from the source directory instead of the installed versions. o Check for the deprecated 'nodev' option in /etc/fstab o Add support for the IGNORE_FILES variable o Before installing a file check to make sure that the target does not already exist as a directory o Check to be sure that the file installed and error out if not o We only need to check for the presence of the target of $PAGER if that variable is actually set Modified: stable/6/usr.sbin/mergemaster/ (props changed) stable/6/usr.sbin/mergemaster/mergemaster.8 stable/6/usr.sbin/mergemaster/mergemaster.sh Modified: stable/6/usr.sbin/mergemaster/mergemaster.8 ============================================================================== --- stable/6/usr.sbin/mergemaster/mergemaster.8 Fri Jan 9 11:20:51 2009 (r186937) +++ stable/6/usr.sbin/mergemaster/mergemaster.8 Fri Jan 9 11:21:25 2009 (r186938) @@ -1,4 +1,4 @@ -.\" Copyright (c) 1998-2003 Douglas Barton +.\" Copyright (c) 1998-2009 Douglas Barton .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 4, 2006 +.Dd January 2, 2009 .Dt MERGEMASTER 8 .Os .Sh NAME @@ -32,14 +32,14 @@ .Nd merge configuration files, et al during an upgrade .Sh SYNOPSIS .Nm -.Op Fl scrvahipCPU +.Op Fl achiprsvCPU +.Op Fl A Ar Target architecture +.Op Fl D Ar /destdir/path .Op Fl m Ar /path/to/sources .Op Fl t Ar /path/to/temp/root .Op Fl d .Op Fl u Ar N .Op Fl w Ar N -.Op Fl A Ar architecture -.Op Fl D Ar /path .Sh DESCRIPTION The .Nm @@ -54,7 +54,7 @@ recommended that you back up your directory before beginning this process. .Pp The script uses -.Pa /usr/src/etc/Makefile +.Pa /usr/src/Makefile to build a temporary root environment from .Pa / down, populating that environment with the various @@ -218,6 +218,14 @@ Specify the path to the directory where .Xr make 1 . (In other words, where your sources are, but -s was already taken.) +In previous versions of +.Nm +you needed to specify the path all the way to +.Pa src/etc . +Starting with r186678 you only need to specify the path to +.Pa src . +.Nm +will convert the path for you if you use the old method. .It Fl t Ar /path/to/temp/root Create the temporary root environment in .Pa /path/to/temp/root @@ -236,7 +244,7 @@ Supply an alternate screen width to the .Xr sdiff 1 command in numbers of columns. The default is 80. -.It Fl A Ar architecture +.It Fl A Ar Target architecture Specify an alternative .Ev TARGET_ARCH architecture name. @@ -294,24 +302,33 @@ with all values commented out: # These are options for mergemaster, with their default values listed # The following options have command line overrides # +# The target architecture (unset by default) +#ARCHSTRING='TARGET_ARCH=' +# +# Sourcedir is the directory to do the 'make' in (where the new files are) +#SOURCEDIR='/usr/src' +# # Directory to install the temporary root environment into #TEMPROOT='/var/tmp/temproot' # +# Specify the destination directory for the installed files +#DESTDIR= +# # Strict comparison bypasses the CVS $Id tests and compares every file #STRICT=no # # Type of diff, such as unified, context, etc. #DIFF_FLAG='-u' # -# Additional options for diff. This will get unset when using -s. -#DIFF_OPTIONS='-I$\&FreeBSD:.*[$]' # Ignores CVS Id tags -# # Verbose mode includes more details and additional checks #VERBOSE= # # Automatically install files that do not exist on the system already #AUTO_INSTALL= # +# Automatically upgrade files that have not been user modified +#AUTO_UPGRADE= +# # Compare /etc/rc.conf[.local] to /etc/defaults/rc.conf #COMP_CONFS=yes # @@ -319,25 +336,26 @@ with all values commented out: #PRESERVE_FILES=yes #PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` # -# Sourcedir is the directory to do the 'make' in (where the new files are) -#SOURCEDIR='/usr/src/etc' -# # The umask for mergemaster to compare the default file's modes to #NEW_UMASK=022 # -# Specify the destination directory for the installed files -#DESTDIR= -# # The following options have no command line overrides +# +# Files to always avoid comparing +#IGNORE_FILES='/etc/motd /etc/printcap foo bar' +# +# Additional options for diff. This will get unset when using -s. +#DIFF_OPTIONS='-I$\&FreeBSD:.*[$]' # Ignores CVS Id tags +# +# Location to store the list of mtree values for AUTO_UPGRADE purposes +#MTREEDB='/var/db' +# # For those who just cannot stand including the full path to PAGER #DONT_CHECK_PAGER= # # If you set 'yes' above, make sure to include the PATH to your pager #PATH=/bin:/usr/bin:/usr/sbin # -# Don't compare the old and new motd files -#IGNORE_MOTD=yes -# # Specify the path to scripts to run before the comparison starts, # and/or after the script has finished its work #MM_PRE_COMPARE_SCRIPT= @@ -354,6 +372,11 @@ Invalid command line option Failure to create the temporary root environment .Pp Failure to populate the temporary root +.Pp +Presence of the 'nodev' option in +.Pa /etc/fstab +.Pp +Failure to install a file .Sh EXAMPLES Typically all you will need to do is type .Nm Modified: stable/6/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/6/usr.sbin/mergemaster/mergemaster.sh Fri Jan 9 11:20:51 2009 (r186937) +++ stable/6/usr.sbin/mergemaster/mergemaster.sh Fri Jan 9 11:21:25 2009 (r186938) @@ -5,7 +5,7 @@ # Compare files created by /usr/src/etc/Makefile (or the directory # the user specifies) with the currently installed copies. -# Copyright 1998-2004 Douglas Barton +# Copyright 1998-2009 Douglas Barton # DougB@FreeBSD.org # $FreeBSD$ @@ -244,10 +244,6 @@ press_to_continue () { # TEMPROOT='/var/tmp/temproot' -# Assign the location of the mtree database -# -MTREEDB='/var/db/mergemaster.mtree' - # Read /etc/mergemaster.rc first so the one in $HOME can override # if [ -r /etc/mergemaster.rc ]; then @@ -260,12 +256,17 @@ if [ -r "$HOME/.mergemasterrc" ]; then . "$HOME/.mergemasterrc" fi +# Assign the location of the mtree database +# +MTREEDB=${MTREEDB:-/var/db} +MTREEFILE="${MTREEDB}/mergemaster.mtree" + # Check the command line options # while getopts ":ascrvhipCPm:t:du:w:D:A:U" COMMAND_LINE_ARGUMENT ; do case "${COMMAND_LINE_ARGUMENT}" in A) - ARCHSTRING='MACHINE_ARCH='${OPTARG} + ARCHSTRING='TARGET_ARCH='${OPTARG} ;; U) AUTO_UPGRADE=yes @@ -338,10 +339,30 @@ if [ -n "${PRESERVE_FILES}" -a -z "${PRE PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` fi -# Check the for the mtree database in DESTDIR. -if [ ! -f ${DESTDIR}${MTREEDB} ]; then - echo "*** Unable to find mtree database. Skipping auto-upgrade." - unset AUTO_UPGRADE +# Check for the mtree database in DESTDIR +case "${AUTO_UPGRADE}" in +'') ;; # If the option is not set no need to run the test or warn the user +*) + if [ ! -f "${DESTDIR}${MTREEFILE}" ]; then + echo '' + echo "*** Unable to find mtree database. Skipping auto-upgrade." + echo '' + press_to_continue + unset AUTO_UPGRADE + fi + ;; +esac + +if [ -e "${DESTDIR}/etc/fstab" ]; then + if grep -q nodev ${DESTDIR}/etc/fstab; then + echo '' + echo "*** You have the deprecated 'nodev' option in ${DESTDIR}/etc/fstab." + echo " This can prevent the filesystem from being mounted on reboot." + echo " Please update your fstab before continuing." + echo " See fstab(5) for more information." + echo '' + exit 1 + fi fi echo '' @@ -350,7 +371,8 @@ echo '' # case "${DONT_CHECK_PAGER}" in '') - while ! type "${PAGER%% *}" >/dev/null && [ -n "${PAGER}" ]; do +check_pager () { + while ! type "${PAGER%% *}" >/dev/null; do echo " *** Your PAGER environment variable specifies '${PAGER}', but" echo " due to the limited PATH that I use for security reasons," echo " I cannot execute it. So, what would you like to do?" @@ -392,6 +414,10 @@ case "${DONT_CHECK_PAGER}" in esac echo '' done +} + if [ -n "${PAGER}" ]; then + check_pager + fi ;; esac @@ -412,14 +438,25 @@ DIFF_FLAG=${DIFF_FLAG:--u} # Assign the source directory # -SOURCEDIR=${SOURCEDIR:-/usr/src/etc} +SOURCEDIR=${SOURCEDIR:-/usr/src} +if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a \ + -f ${SOURCEDIR}/../Makefile.inc1 ]; then + echo " *** The source directory you specified (${SOURCEDIR})" + echo " will be reset to ${SOURCEDIR}/.." + echo '' + sleep 3 + SOURCEDIR=${SOURCEDIR}/.. +fi + +# Setup make to use system files from SOURCEDIR +MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk" # Check DESTDIR against the mergemaster mtree database to see what # files the user changed from the reference files. # CHANGED= -if [ -n "${AUTO_UPGRADE}" -a -f "${DESTDIR}${MTREEDB}" ]; then - for file in `mtree -eq -f ${DESTDIR}${MTREEDB} -p ${DESTDIR}/ \ +if [ -n "${AUTO_UPGRADE}" -a -f "${DESTDIR}${MTREEFILE}" ]; then + for file in `mtree -eq -f ${DESTDIR}${MTREEFILE} -p ${DESTDIR}/ \ 2>/dev/null | awk '($2 == "changed") {print $1}'`; do if [ -f "${DESTDIR}/$file" ]; then CHANGED="${CHANGED} ${DESTDIR}/$file" @@ -552,14 +589,14 @@ case "${RERUN}" in case "${DESTDIR}" in '') ;; *) - make DESTDIR=${DESTDIR} ${ARCHSTRING} distrib-dirs + ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs ;; esac - make DESTDIR=${TEMPROOT} ${ARCHSTRING} distrib-dirs && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} obj && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} all && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} \ - DESTDIR=${TEMPROOT} distribution;} || + od=${TEMPROOT}/usr/obj + ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} everything SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} || { echo ''; echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to"; echo " the temproot environment"; @@ -569,8 +606,8 @@ case "${RERUN}" in *) # Only set up files that are crucial to {build|install}world { mkdir -p ${TEMPROOT}/etc && - cp -p ${SOURCEDIR}/master.passwd ${TEMPROOT}/etc && - cp -p ${SOURCEDIR}/group ${TEMPROOT}/etc;} || + cp -p ${SOURCEDIR}/etc/master.passwd ${TEMPROOT}/etc && + cp -p ${SOURCEDIR}/etc/group ${TEMPROOT}/etc;} || { echo ''; echo ' *** FATAL ERROR: Cannot copy files to the temproot environment'; echo ''; @@ -599,17 +636,17 @@ case "${RERUN}" in esac # Avoid comparing the motd if the user specifies it in .mergemasterrc + # Compatibility shim to be removed in FreeBSD 9.x case "${IGNORE_MOTD}" in '') ;; - *) rm -f ${TEMPROOT}/etc/motd + *) IGNORE_FILES="${IGNORE_FILES} /etc/motd" ;; esac - # Avoid trying to update MAKEDEV if /dev is on a devfs - if /sbin/sysctl vfs.devfs.generation > /dev/null 2>&1 ; then - rm -f ${TEMPROOT}/dev/MAKEDEV ${TEMPROOT}/dev/MAKEDEV.local - fi - + # Avoid comparing the following user specified files + for file in ${IGNORE_FILES}; do + test -e ${TEMPROOT}/${file} && unlink ${TEMPROOT}/${file} + done ;; # End of the "RERUN" test esac @@ -626,9 +663,9 @@ find ${TEMPROOT}/usr/obj -type f -delete find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null # Build the mtree database in a temporary location. -# TODO: Possibly use mktemp instead for security reasons? +MTREENEW=`mktemp -t mergemaster.mtree` case "${PRE_WORLD}" in -'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${DESTDIR}${MTREEDB}.new 2>/dev/null +'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${DESTDIR}${MTREENEW} 2>/dev/null ;; *) # We don't want to mess with the mtree database on a pre-world run. ;; @@ -647,7 +684,7 @@ if [ -z "${NEW_UMASK}" -a -z "${AUTO_RUN echo '' echo " *** Your umask is currently set to ${USER_UMASK}. By default, this script" echo " installs all files with the same user, group and modes that" - echo " they are created with by ${SOURCEDIR}/Makefile, compared to" + echo " they are created with by ${SOURCEDIR}/etc/Makefile, compared to" echo " a umask of 022. This umask allows world read permission when" echo " the file's default permissions have it." echo '' @@ -714,6 +751,12 @@ esac # Use the umask/mode information to install the files # Create directories as needed # +install_error () { + echo "*** FATAL ERROR: Unable to install ${1} to ${2}" + echo '' + exit 1 +} + do_install_and_rm () { case "${PRESERVE_FILES}" in [Yy][Ee][Ss]) @@ -724,8 +767,15 @@ do_install_and_rm () { ;; esac - install -m "${1}" "${2}" "${3}" && - rm -f "${2}" + if [ ! -d "${3}/${2##*/}" ]; then + if install -m ${1} ${2} ${3}; then + unlink ${2} + else + install_error ${2} ${3} + fi + else + install_error ${2} ${3} + fi } # 4095 = "obase=10;ibase=8;07777" | bc @@ -828,11 +878,6 @@ mm_install () { ;; esac else # File matched -x - case "${1#.}" in - /dev/MAKEDEV) - NEED_MAKEDEV=yes - ;; - esac do_install_and_rm "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" fi return $? @@ -904,7 +949,7 @@ if [ -r "${MM_PRE_COMPARE_SCRIPT}" ]; th fi # Using -size +0 avoids uselessly checking the empty log files created -# by ${SOURCEDIR}/Makefile and the device entries in ./dev, but does +# by ${SOURCEDIR}/etc/Makefile and the device entries in ./dev, but does # check the scripts in ./dev, as we'd like (assuming no devfs of course). # for COMPFILE in `find . -type f -size +0`; do @@ -947,25 +992,6 @@ for COMPFILE in `find . -type f -size +0 echo " *** Temp ${COMPFILE} and installed have the same CVS Id, deleting" rm "${COMPFILE}" ;; - - *) - tempfoo=`basename $0` - TMPFILE1=`mktemp -t ${tempfoo}` || break - TMPFILE2=`mktemp -t ${tempfoo}` || break - sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${DESTDIR}${COMPFILE#.}" > "${TMPFILE1}" - sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${COMPFILE}" > "${TMPFILE2}" - if diff -q ${DIFF_OPTIONS} "${TMPFILE1}" "${TMPFILE2}" > \ - /dev/null 2>&1; then - echo " *** Temp ${COMPFILE} and installed are the same except CVS Id, replacing" - if mm_install "${COMPFILE}"; then - echo " *** ${COMPFILE} upgraded successfully" - echo '' - else - echo " *** Problem upgrading ${COMPFILE}, it will remain to merge by hand" - fi - fi - rm -f "${TMPFILE1}" "${TMPFILE2}" - ;; esac ;; esac @@ -1005,9 +1031,10 @@ done # This is for the do way up there a echo '' echo "*** Comparison complete" -if [ -f "${DESTDIR}${MTREEDB}.new" ]; then +if [ -f "${DESTDIR}${MTREENEW}" ]; then echo "*** Saving mtree database for future upgrades" - mv -f ${DESTDIR}${MTREEDB}.new ${DESTDIR}${MTREEDB} 2>/dev/null + test -e "${MTREEFILE}" && unlink ${MTREEFILE} + mv ${DESTDIR}${MTREENEW} ${DESTDIR}${MTREEFILE} fi echo '' @@ -1115,16 +1142,6 @@ run_it_now () { esac } -case "${NEED_MAKEDEV}" in -'') ;; -*) - echo '' - echo "*** You installed a new ${DESTDIR}/dev/MAKEDEV script, so make sure that you run" - echo " 'cd ${DESTDIR}/dev && /bin/sh MAKEDEV all' to rebuild your devices" - run_it_now "cd ${DESTDIR}/dev && /bin/sh MAKEDEV all" - ;; -esac - case "${NEED_NEWALIASES}" in '') ;; *) @@ -1206,7 +1223,7 @@ esac case "${PRE_WORLD}" in '') ;; *) - MAKE_CONF="${SOURCEDIR%etc}share/examples/etc/make.conf" + MAKE_CONF="${SOURCEDIR}/share/examples/etc/make.conf" (echo '' echo '*** Comparing make variables' From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 11:36:30 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E06F1065688; Fri, 9 Jan 2009 11:36:30 +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 4A3488FC19; Fri, 9 Jan 2009 11:36:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09BaU6R055482; Fri, 9 Jan 2009 11:36:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09BaU39055481; Fri, 9 Jan 2009 11:36:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901091136.n09BaU39055481@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 11:36:30 +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: r186939 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 11:36:31 -0000 Author: mav Date: Fri Jan 9 11:36:30 2009 New Revision: 186939 URL: http://svn.freebsd.org/changeset/base/186939 Log: MFC rev. 186154 If possible, try to obtain max_mhz on cpufreq attach instead of first request. On HyperThreading CPUs logical cores have same frequency, so setting it on any core will change the other's one. In most cases first request to the second core will be the "set" request, done after setting frequency of the first core. In such case second CPU will obtain throttled frequency of the first core as it's max_mhz making cpufreq broken due to different frequency sets. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/kern_cpu.c Modified: stable/7/sys/kern/kern_cpu.c ============================================================================== --- stable/7/sys/kern/kern_cpu.c Fri Jan 9 11:21:25 2009 (r186938) +++ stable/7/sys/kern/kern_cpu.c Fri Jan 9 11:36:30 2009 (r186939) @@ -144,7 +144,9 @@ static int cpufreq_attach(device_t dev) { struct cpufreq_softc *sc; + struct pcpu *pc; device_t parent; + uint64_t rate; int numdevs; CF_DEBUG("initializing %s\n", device_get_nameunit(dev)); @@ -156,7 +158,12 @@ cpufreq_attach(device_t dev) CF_MTX_INIT(&sc->lock); sc->curr_level.total_set.freq = CPUFREQ_VAL_UNKNOWN; SLIST_INIT(&sc->saved_freq); - sc->max_mhz = CPUFREQ_VAL_UNKNOWN; + /* Try to get current CPU freq to use it as maximum later if needed */ + pc = cpu_get_pcpu(dev); + if (cpu_est_clockrate(pc->pc_cpuid, &rate) == 0) + sc->max_mhz = rate / 1000000; + else + sc->max_mhz = CPUFREQ_VAL_UNKNOWN; /* * Only initialize one set of sysctls for all CPUs. In the future, From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 13:53:44 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB17F10656D1; Fri, 9 Jan 2009 13:53:44 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D76AD8FC1D; Fri, 9 Jan 2009 13:53:44 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09DriDl058569; Fri, 9 Jan 2009 13:53:44 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09DriYq058568; Fri, 9 Jan 2009 13:53:44 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <200901091353.n09DriYq058568@svn.freebsd.org> From: Peter Holm Date: Fri, 9 Jan 2009 13:53:44 +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: r186950 - in stable/7/sys: . contrib/pf dev/cxgb kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 13:53:46 -0000 Author: pho Date: Fri Jan 9 13:53:44 2009 New Revision: 186950 URL: http://svn.freebsd.org/changeset/base/186950 Log: MFC r186510: Prevent overflow of uio_resid. Approved by: kib Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/vfs_syscalls.c Modified: stable/7/sys/kern/vfs_syscalls.c ============================================================================== --- stable/7/sys/kern/vfs_syscalls.c Fri Jan 9 13:18:13 2009 (r186949) +++ stable/7/sys/kern/vfs_syscalls.c Fri Jan 9 13:53:44 2009 (r186950) @@ -3800,6 +3800,8 @@ kern_getdirentries(struct thread *td, in int error, eofflag; AUDIT_ARG(fd, fd); + if (count > INT_MAX) + return (EINVAL); if ((error = getvnode(td->td_proc->p_fd, fd, &fp)) != 0) return (error); if ((fp->f_flag & FREAD) == 0) { From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 15:13:47 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 418C61065691; Fri, 9 Jan 2009 15:13:47 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F2AC8FC0A; Fri, 9 Jan 2009 15:13:47 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09FDlLY060242; Fri, 9 Jan 2009 15:13:47 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09FDluo060241; Fri, 9 Jan 2009 15:13:47 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <200901091513.n09FDluo060241@svn.freebsd.org> From: Peter Holm Date: Fri, 9 Jan 2009 15:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186954 - in stable/6/sys: . kern X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 15:13:48 -0000 Author: pho Date: Fri Jan 9 15:13:46 2009 New Revision: 186954 URL: http://svn.freebsd.org/changeset/base/186954 Log: MFC r186510: Prevent overflow of uio_resid. Approved by: kib Modified: stable/6/sys/ (props changed) stable/6/sys/kern/vfs_syscalls.c Modified: stable/6/sys/kern/vfs_syscalls.c ============================================================================== --- stable/6/sys/kern/vfs_syscalls.c Fri Jan 9 14:41:36 2009 (r186953) +++ stable/6/sys/kern/vfs_syscalls.c Fri Jan 9 15:13:46 2009 (r186954) @@ -3697,6 +3697,8 @@ getdirentries(td, uap) int error, eofflag; AUDIT_ARG(fd, uap->fd); + if (uap->count > INT_MAX) + return (EINVAL); if ((error = getvnode(td->td_proc->p_fd, uap->fd, &fp)) != 0) return (error); if ((fp->f_flag & FREAD) == 0) { From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 16:24:10 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C511D10656D3; Fri, 9 Jan 2009 16:24:10 +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 B14D28FC14; Fri, 9 Jan 2009 16:24:10 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09GOA6t061660; Fri, 9 Jan 2009 16:24:10 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09GOAcu061659; Fri, 9 Jan 2009 16:24:10 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200901091624.n09GOAcu061659@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 9 Jan 2009 16:24:10 +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: r186957 - head/lib/libc/string stable/7/lib/libc/string X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 16:24:12 -0000 Author: ru Date: Fri Jan 9 16:24:10 2009 New Revision: 186957 URL: http://svn.freebsd.org/changeset/base/186957 Log: Sort MLINKS. Modified: stable/7/lib/libc/string/Makefile.inc Changes in other areas also in this revision: Modified: head/lib/libc/string/Makefile.inc Modified: stable/7/lib/libc/string/Makefile.inc ============================================================================== --- stable/7/lib/libc/string/Makefile.inc Fri Jan 9 16:22:32 2009 (r186956) +++ stable/7/lib/libc/string/Makefile.inc Fri Jan 9 16:24:10 2009 (r186957) @@ -35,34 +35,45 @@ MAN+= bcmp.3 bcopy.3 bstring.3 bzero.3 f strspn.3 strstr.3 strtok.3 strxfrm.3 swab.3 wcscoll.3 wcstok.3 \ wcswidth.3 wcsxfrm.3 wmemchr.3 -MLINKS+=ffs.3 ffsl.3 -MLINKS+=ffs.3 fls.3 -MLINKS+=ffs.3 flsl.3 -MLINKS+=ffs.3 ffsll.3 -MLINKS+=ffs.3 flsll.3 +MLINKS+=ffs.3 ffsl.3 \ + ffs.3 ffsll.3 \ + ffs.3 fls.3 \ + ffs.3 flsl.3 \ + ffs.3 flsll.3 MLINKS+=index.3 rindex.3 MLINKS+=memchr.3 memrchr.3 MLINKS+=strcasecmp.3 strncasecmp.3 MLINKS+=strcat.3 strncat.3 MLINKS+=strchr.3 strrchr.3 MLINKS+=strcmp.3 strncmp.3 -MLINKS+=strcpy.3 stpcpy.3 +MLINKS+=strcpy.3 stpcpy.3 \ + strcpy.3 strncpy.3 MLINKS+=strdup.3 strndup.3 -MLINKS+=strcpy.3 strncpy.3 -MLINKS+=strerror.3 perror.3 strerror.3 sys_errlist.3 strerror.3 sys_nerr.3 -MLINKS+=strerror.3 strerror_r.3 +MLINKS+=strerror.3 perror.3 \ + strerror.3 strerror_r.3 \ + strerror.3 sys_errlist.3 \ + strerror.3 sys_nerr.3 MLINKS+=strlcpy.3 strlcat.3 +MLINKS+=strstr.3 strcasestr.3 \ + strstr.3 strnstr.3 MLINKS+=strtok.3 strtok_r.3 -MLINKS+=strstr.3 strcasestr.3 -MLINKS+=strstr.3 strnstr.3 -MLINKS+=wmemchr.3 wmemcmp.3 wmemchr.3 wmemcpy.3 \ - wmemchr.3 wmemmove.3 wmemchr.3 wmemset.3 \ - wmemchr.3 wcscat.3 wmemchr.3 wcschr.3 \ - wmemchr.3 wcscmp.3 wmemchr.3 wcscpy.3 \ - wmemchr.3 wcscspn.3 wmemchr.3 wcsdup.3 \ +MLINKS+=wmemchr.3 wcscat.3 \ + wmemchr.3 wcschr.3 \ + wmemchr.3 wcscmp.3 \ + wmemchr.3 wcscpy.3 \ + wmemchr.3 wcscspn.3 \ + wmemchr.3 wcsdup.3 \ wmemchr.3 wcslcat.3 \ - wmemchr.3 wcslcpy.3 wmemchr.3 wcslen.3 \ - wmemchr.3 wcsncat.3 wmemchr.3 wcsncmp.3 \ - wmemchr.3 wcsncpy.3 wmemchr.3 wcspbrk.3 \ - wmemchr.3 wcsrchr.3 wmemchr.3 wcsspn.3 \ - wmemchr.3 wcsstr.3 + wmemchr.3 wcslcpy.3 \ + wmemchr.3 wcslen.3 \ + wmemchr.3 wcsncat.3 \ + wmemchr.3 wcsncmp.3 \ + wmemchr.3 wcsncpy.3 \ + wmemchr.3 wcspbrk.3 \ + wmemchr.3 wcsrchr.3 \ + wmemchr.3 wcsspn.3 \ + wmemchr.3 wcsstr.3 \ + wmemchr.3 wmemcmp.3 \ + wmemchr.3 wmemcpy.3 \ + wmemchr.3 wmemmove.3 \ + wmemchr.3 wmemset.3 From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 16:37:29 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFC8510657E4; Fri, 9 Jan 2009 16:37:29 +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 DD4D88FC22; Fri, 9 Jan 2009 16:37:29 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09GbTkS061955; Fri, 9 Jan 2009 16:37:29 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09GbTn5061954; Fri, 9 Jan 2009 16:37:29 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200901091637.n09GbTn5061954@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 9 Jan 2009 16:37:29 +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: r186958 - in stable/7/gnu/usr.bin/cvs: . contrib X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 16:37:31 -0000 Author: ru Date: Fri Jan 9 16:37:29 2009 New Revision: 186958 URL: http://svn.freebsd.org/changeset/base/186958 Log: MFC: Instead of using .POSIX:, use the cool looking "@:" rule. Modified: stable/7/gnu/usr.bin/cvs/ (props changed) stable/7/gnu/usr.bin/cvs/contrib/Makefile Modified: stable/7/gnu/usr.bin/cvs/contrib/Makefile ============================================================================== --- stable/7/gnu/usr.bin/cvs/contrib/Makefile Fri Jan 9 16:24:10 2009 (r186957) +++ stable/7/gnu/usr.bin/cvs/contrib/Makefile Fri Jan 9 16:37:29 2009 (r186958) @@ -1,7 +1,5 @@ # $FreeBSD$ -.POSIX: - .include "../Makefile.inc" .PATH: ${CVSDIR}/contrib @@ -21,6 +19,10 @@ CLEANFILES+= $(SCRIPTS) .SUFFIXES: .sh .pl .in +# Prevent Makefile.in from overwriting Makefile through the suffix rules. +Makefile: + @: + .sh: cp ${.IMPSRC} ${.TARGET} From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 18:08:51 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02566106564A; Fri, 9 Jan 2009 18:08:51 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2EB88FC18; Fri, 9 Jan 2009 18:08:50 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09I8oet064445; Fri, 9 Jan 2009 18:08:50 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09I8oFr064442; Fri, 9 Jan 2009 18:08:50 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901091808.n09I8oFr064442@svn.freebsd.org> From: Sam Leffler Date: Fri, 9 Jan 2009 18:08:50 +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: r186962 - in stable/7/tools/tools/nanobsd: . Files/root X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:08:52 -0000 Author: sam Date: Fri Jan 9 18:08:50 2009 New Revision: 186962 URL: http://svn.freebsd.org/changeset/base/186962 Log: sync with HEAD OK'd by: phk Added: stable/7/tools/tools/nanobsd/Files/root/save_cfg - copied unchanged from r181082, head/tools/tools/nanobsd/Files/root/save_cfg Modified: stable/7/tools/tools/nanobsd/ (props changed) stable/7/tools/tools/nanobsd/FlashDevice.sub stable/7/tools/tools/nanobsd/nanobsd.sh Copied: stable/7/tools/tools/nanobsd/Files/root/save_cfg (from r181082, head/tools/tools/nanobsd/Files/root/save_cfg) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/tools/tools/nanobsd/Files/root/save_cfg Fri Jan 9 18:08:50 2009 (r186962, copy of r181082, head/tools/tools/nanobsd/Files/root/save_cfg) @@ -0,0 +1,42 @@ +#!/bin/sh +# +# Copyright (c) 2006 Mathieu Arnold +# 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$ +# + +set -e + +trap "umount /cfg" 1 2 15 EXIT +mount /cfg +( +cd /cfg +for i in "$@" `find * -type f` +do + cmp -s /etc/$i /cfg/$i || cp -pfv /etc/$i /cfg/$i +done +) +umount /cfg +trap 1 2 15 EXIT Modified: stable/7/tools/tools/nanobsd/FlashDevice.sub ============================================================================== --- stable/7/tools/tools/nanobsd/FlashDevice.sub Fri Jan 9 17:21:22 2009 (r186961) +++ stable/7/tools/tools/nanobsd/FlashDevice.sub Fri Jan 9 18:08:50 2009 (r186962) @@ -117,7 +117,7 @@ sub_FlashDevice () { NANO_SECTS=63 ;; 4096|4096mb|4g) - NANO_MEDIASIZE=`expr 4097802240 / 512` + NANO_MEDIASIZE=`expr -e 4097802240 / 512` NANO_HEADS=16 NANO_SECTS=63 ;; @@ -128,9 +128,9 @@ sub_FlashDevice () { esac ;; siliconsystems) - case $2 in + case $a2 in 4096|4g) - NANO_MEDIASIZE=`expr 4224761856 / 512` + NANO_MEDIASIZE=`expr -e 4224761856 / 512` NANO_HEADS=16 NANO_SECTS=63 ;; @@ -141,7 +141,7 @@ sub_FlashDevice () { esac ;; soekris) - case $2 in + case $a2 in net4526 | 4526 | net4826 | 4826 | 64 | 64mb) NANO_MEDIASIZE=125056 NANO_HEADS=4 @@ -154,7 +154,7 @@ sub_FlashDevice () { esac ;; transcend) - case $2 in + case $a2 in dom064m) NANO_MEDIASIZE=125184 NANO_HEADS=4 Modified: stable/7/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- stable/7/tools/tools/nanobsd/nanobsd.sh Fri Jan 9 17:21:22 2009 (r186961) +++ stable/7/tools/tools/nanobsd/nanobsd.sh Fri Jan 9 18:08:50 2009 (r186962) @@ -47,15 +47,23 @@ NANO_TOOLS=tools/tools/nanobsd # Where cust_pkg() finds packages to install NANO_PACKAGE_DIR=${NANO_SRC}/${NANO_TOOLS}/Pkg +NANO_PACKAGE_LIST="*" # Object tree directory # default is subdir of /usr/obj # XXX: MAKEOBJDIRPREFIX handling... ? #NANO_OBJ="" +# The directory to put the final images +# default is ${NANO_OBJ} +#NANO_DISKIMGDIR="" + # Parallel Make NANO_PMAKE="make -j 3" +# The default name for any image we create. +NANO_IMGNAME="_.disk.full" + # Options to put in make.conf during buildworld only CONF_BUILD=' ' @@ -71,6 +79,9 @@ NANO_KERNEL=GENERIC # Customize commands. NANO_CUSTOMIZE="" +# Late customize commands. +NANO_LATE_CUSTOMIZE="" + # Newfs paramters to use NANO_NEWFS="-b 4096 -f 512 -i 8192 -O1 -U" @@ -78,7 +89,7 @@ NANO_NEWFS="-b 4096 -f 512 -i 8192 -O1 - NANO_DRIVE=ad0 # Target media size in 512 bytes sectors -NANO_MEDIASIZE=1000000 +NANO_MEDIASIZE=1200000 # Number of code images on media (1 or 2) NANO_IMAGES=2 @@ -114,6 +125,13 @@ NANO_HEADS=16 NANO_BOOT0CFG="-o packet -s 1 -m 3" NANO_BOOTLOADER="boot/boot0sio" +# Backing type of md(4) device +# Can be "file" or "swap" +NANO_MD_BACKING="file" + +# Progress Print level +PPLEVEL=3 + ####################################################################### # Not a variable at this time @@ -127,7 +145,7 @@ NANO_ARCH=i386 ####################################################################### clean_build ( ) ( - echo "## Clean and create object directory (${MAKEOBJDIRPREFIX})" + pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})" if rm -rf ${MAKEOBJDIRPREFIX} > /dev/null 2>&1 ; then true @@ -140,24 +158,25 @@ clean_build ( ) ( ) make_conf_build ( ) ( - echo "## Construct build make.conf ($NANO_MAKE_CONF)" + pprint 2 "Construct build make.conf ($NANO_MAKE_CONF)" echo "${CONF_WORLD}" > ${NANO_MAKE_CONF} echo "${CONF_BUILD}" >> ${NANO_MAKE_CONF} ) build_world ( ) ( - echo "## run buildworld" - echo "### log: ${MAKEOBJDIRPREFIX}/_.bw" + pprint 2 "run buildworld" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bw" cd ${NANO_SRC} - ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF} buildworld \ + env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} \ + __MAKE_CONF=${NANO_MAKE_CONF} buildworld \ > ${MAKEOBJDIRPREFIX}/_.bw 2>&1 ) build_kernel ( ) ( - echo "## build kernel ($NANO_KERNEL)" - echo "### log: ${MAKEOBJDIRPREFIX}/_.bk" + pprint 2 "build kernel ($NANO_KERNEL)" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bk" if [ -f ${NANO_KERNEL} ] ; then cp ${NANO_KERNEL} ${NANO_SRC}/sys/${NANO_ARCH}/conf @@ -168,14 +187,14 @@ build_kernel ( ) ( # when cross-building unset TARGET_CPUTYPE unset TARGET_BIG_ENDIAN - ${NANO_PMAKE} buildkernel \ + env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ > ${MAKEOBJDIRPREFIX}/_.bk 2>&1 ) ) clean_world ( ) ( - echo "## Clean and create world directory (${NANO_WORLDDIR})" + pprint 2 "Clean and create world directory (${NANO_WORLDDIR})" if rm -rf ${NANO_WORLDDIR}/ > /dev/null 2>&1 ; then true else @@ -186,17 +205,18 @@ clean_world ( ) ( ) make_conf_install ( ) ( - echo "## Construct install make.conf ($NANO_MAKE_CONF)" + pprint 2 "Construct install make.conf ($NANO_MAKE_CONF)" echo "${CONF_WORLD}" > ${NANO_MAKE_CONF} echo "${CONF_INSTALL}" >> ${NANO_MAKE_CONF} ) install_world ( ) ( - echo "## installworld" - echo "### log: ${MAKEOBJDIRPREFIX}/_.iw" + pprint 2 "installworld" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.iw" cd ${NANO_SRC} + env TARGET_ARCH=${NANO_ARCH} \ ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF} installworld \ DESTDIR=${NANO_WORLDDIR} \ > ${MAKEOBJDIRPREFIX}/_.iw 2>&1 @@ -205,21 +225,22 @@ install_world ( ) ( install_etc ( ) ( - echo "## install /etc" - echo "### log: ${MAKEOBJDIRPREFIX}/_.etc" + pprint 2 "install /etc" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.etc" cd ${NANO_SRC} + env TARGET_ARCH=${NANO_ARCH} \ ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF} distribution \ DESTDIR=${NANO_WORLDDIR} \ > ${MAKEOBJDIRPREFIX}/_.etc 2>&1 ) install_kernel ( ) ( - echo "## install kernel" - echo "### log: ${MAKEOBJDIRPREFIX}/_.ik" + pprint 2 "install kernel" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.ik" cd ${NANO_SRC} - ${NANO_PMAKE} installkernel \ + env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ DESTDIR=${NANO_WORLDDIR} \ __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ > ${MAKEOBJDIRPREFIX}/_.ik 2>&1 @@ -227,19 +248,31 @@ install_kernel ( ) ( run_customize() ( - echo "## run customize scripts" + pprint 2 "run customize scripts" for c in $NANO_CUSTOMIZE do - echo "## customize \"$c\"" - echo "### log: ${MAKEOBJDIRPREFIX}/_.cust.$c" - echo "### `type $c`" + pprint 2 "customize \"$c\"" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.cust.$c" + pprint 4 "`type $c`" ( $c ) > ${MAKEOBJDIRPREFIX}/_.cust.$c 2>&1 done ) +run_late_customize() ( + + pprint 2 "run late customize scripts" + for c in $NANO_LATE_CUSTOMIZE + do + pprint 2 "late customize \"$c\"" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.late_cust.$c" + pprint 4 "`type $c`" + ( $c ) > ${MAKEOBJDIRPREFIX}/_.late_cust.$c 2>&1 + done +) + setup_nanobsd ( ) ( - echo "## configure nanobsd setup" - echo "### log: ${MAKEOBJDIRPREFIX}/_.dl" + pprint 2 "configure nanobsd setup" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.dl" ( cd ${NANO_WORLDDIR} @@ -249,7 +282,7 @@ setup_nanobsd ( ) ( # have hardcoded paths under ${prefix}/etc are not tweakable. if [ -d usr/local/etc ] ; then ( - mkdir etc/local + mkdir -p etc/local cd usr/local/etc find . -print | cpio -dumpl ../../../etc/local cd .. @@ -283,7 +316,7 @@ setup_nanobsd ( ) ( ) setup_nanobsd_etc ( ) ( - echo "## configure nanobsd /etc" + pprint 2 "configure nanobsd /etc" ( cd ${NANO_WORLDDIR} @@ -314,8 +347,8 @@ prune_usr() ( ) create_i386_diskimage ( ) ( - echo "## build diskimage" - echo "### log: ${MAKEOBJDIRPREFIX}/_.di" + pprint 2 "build diskimage" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.di" ( echo $NANO_MEDIASIZE $NANO_IMAGES \ @@ -372,24 +405,34 @@ create_i386_diskimage ( ) ( # Data partition (if any) starts at cylinder boundary. if ($7 > 0) { print "p 4 165 " c, dsl * cs - } else if ($7 < 0 && $1 > $c) { - print "p 4 165 " c, $1 - $c + } else if ($7 < 0 && $1 > c) { + print "p 4 165 " c, $1 - c } else if ($1 < c) { print "Disk space overcommitted by", \ c - $1, "sectors" > "/dev/stderr" exit 2 } + + # Force slice 1 to be marked active. This is necessary + # for booting the image from a USB device to work. + print "a 1" } ' > ${MAKEOBJDIRPREFIX}/_.fdisk - IMG=${MAKEOBJDIRPREFIX}/_.disk.full + IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} MNT=${MAKEOBJDIRPREFIX}/_.mnt mkdir -p ${MNT} - dd if=/dev/zero of=${IMG} bs=${NANO_SECTS}b \ - count=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` - - MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} -y ${NANO_HEADS}` + if [ "${NANO_MD_BACKING}" = "swap" ] ; then + MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}` + else + echo "Creating md backing file..." + dd if=/dev/zero of=${IMG} bs=${NANO_SECTS}b \ + count=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` + MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}` + fi trap "df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT @@ -405,14 +448,17 @@ create_i386_diskimage ( ) ( newfs ${NANO_NEWFS} /dev/${MD}s1a mount /dev/${MD}s1a ${MNT} df -i ${MNT} + echo "Copying worlddir..." ( cd ${NANO_WORLDDIR} && find . -print | cpio -dump ${MNT} ) df -i ${MNT} + echo "Generating mtree..." ( cd ${MNT} && mtree -c ) > ${MAKEOBJDIRPREFIX}/_.mtree ( cd ${MNT} && du -k ) > ${MAKEOBJDIRPREFIX}/_.du umount ${MNT} if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then # Duplicate to second image (if present) + echo "Duplicating to second image..." dd if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k mount /dev/${MD}s2a ${MNT} for f in ${MNT}/etc/fstab ${MNT}/conf/base/etc/fstab @@ -433,7 +479,13 @@ create_i386_diskimage ( ) ( # XXX: fill from where ? fi - dd if=/dev/${MD}s1 of=${MAKEOBJDIRPREFIX}/_.disk.image bs=64k + if [ "${NANO_MD_BACKING}" = "swap" ] ; then + echo "Writing out _.disk.full..." + dd if=/dev/${MD} of=${IMG} bs=64k + fi + + echo "Writing out _.disk.image..." + dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k mdconfig -d -u $MD ) > ${MAKEOBJDIRPREFIX}/_.di 2>&1 ) @@ -464,13 +516,52 @@ FlashDevice () { sub_FlashDevice $1 $2 } +####################################################################### +# USB device geometries +# +# Usage: +# UsbDevice Generic 1000 # a generic flash key sold as having 1GB +# +# This function will set NANO_MEDIASIZE, NANO_HEADS and NANO_SECTS for you. +# +# Note that the capacity of a flash key is usually advertised in MB or +# GB, *not* MiB/GiB. As such, the precise number of cylinders available +# for C/H/S geometry may vary depending on the actual flash geometry. +# +# The following generic device layouts are understood: +# generic An alias for generic-hdd. +# generic-hdd 255H 63S/T xxxxC with no MBR restrictions. +# generic-fdd 64H 32S/T xxxxC with no MBR restrictions. +# +# The generic-hdd device is preferred for flash devices larger than 1GB. +# + +UsbDevice () { + a1=`echo $1 | tr '[:upper:]' '[:lower:]'` + case $a1 in + generic-fdd) + NANO_HEADS=64 + NANO_SECTS=32 + NANO_MEDIASIZE=$(( $2 * 1000 * 1000 / 512 )) + ;; + generic|generic-hdd) + NANO_HEADS=255 + NANO_SECTS=63 + NANO_MEDIASIZE=$(( $2 * 1000 * 1000 / 512 )) + ;; + *) + echo "Unknown USB flash device" + exit 2 + ;; + esac +} ####################################################################### # Setup serial console cust_comconsole () ( # Enable getty on console - sed -i "" -e /ttyd0/s/off/on/ ${NANO_WORLDDIR}/etc/ttys + sed -i "" -e /tty[du]0/s/off/on/ ${NANO_WORLDDIR}/etc/ttys # Disable getty on syscons devices sed -i "" -e '/^ttyv[0-8]/s/ on/ off/' ${NANO_WORLDDIR}/etc/ttys @@ -492,7 +583,7 @@ cust_allow_ssh_root () ( cust_install_files () ( cd ${NANO_TOOLS}/Files - find . -print | grep -v /CVS | cpio -dumpv ${NANO_WORLDDIR} + find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} ) ####################################################################### @@ -502,7 +593,11 @@ cust_pkg () ( # Copy packages into chroot mkdir -p ${NANO_WORLDDIR}/Pkg - cp ${NANO_PACKAGE_DIR}/* ${NANO_WORLDDIR}/Pkg + ( + cd ${NANO_PACKAGE_DIR} + find ${NANO_PACKAGE_LIST} -print | + cpio -dumpv ${NANO_WORLDDIR}/Pkg + ) # Count & report how many we have to install todo=`ls ${NANO_WORLDDIR}/Pkg | wc -l` @@ -511,7 +606,7 @@ cust_pkg () ( echo "===" while true do - # Record how may we have now + # Record how many we have now have=`ls ${NANO_WORLDDIR}/var/db/pkg | wc -l` # Attempt to install more packages @@ -547,16 +642,37 @@ customize_cmd () { } ####################################################################### +# Convenience function: +# Register $1 as late customize function to run just before +# image creation. + +late_customize_cmd () { + NANO_LATE_CUSTOMIZE="$NANO_LATE_CUSTOMIZE $1" +} + +####################################################################### # # All set up to go... # ####################################################################### +# Progress Print +# Print $2 at level $1. +pprint() { + if [ "$1" -le $PPLEVEL ]; then + printf "%.${1}s %s\n" "#####" "$2" + fi +} + usage () { ( - echo "Usage: $0 [-b/-k/-w] [-c config_file]" + echo "Usage: $0 [-bikqvw] [-c config_file]" echo " -b suppress builds (both kernel and world)" + echo " -i suppress disk image build" echo " -k suppress buildkernel" + echo " -n add -DNO_CLEAN to buildworld, buildkernel, etc" + echo " -q make output more quite" + echo " -v make output more verbose" echo " -w suppress buildworld" echo " -c specify config file" ) 1>&2 @@ -566,11 +682,13 @@ usage () { ####################################################################### # Parse arguments +do_clean=true do_kernel=true do_world=true +do_image=true set +e -args=`getopt bc:hkw $*` +args=`getopt bc:hiknqvw $*` if [ $? -ne 0 ] ; then usage exit 2 @@ -583,29 +701,45 @@ do case "$i" in -b) - shift; do_world=false do_kernel=false + shift ;; -k) - shift; do_kernel=false + shift ;; -c) . "$2" - shift; - shift; + shift + shift ;; -h) usage ;; + -i) + do_image=false + shift + ;; + -n) + do_clean=false + shift + ;; + -q) + PPLEVEL=$(($PPLEVEL - 1)) + shift + ;; + -v) + PPLEVEL=$(($PPLEVEL + 1)) + shift + ;; -w) - shift; do_world=false + shift ;; --) - shift; - break; + shift + break esac done @@ -624,6 +758,10 @@ else MAKEOBJDIRPREFIX=${NANO_OBJ} fi +if [ "x${NANO_DISKIMGDIR}" = "x" ] ; then + NANO_DISKIMGDIR=${MAKEOBJDIRPREFIX} +fi + NANO_WORLDDIR=${MAKEOBJDIRPREFIX}/_.w NANO_MAKE_CONF=${MAKEOBJDIRPREFIX}/make.conf @@ -636,6 +774,12 @@ else exit 1 fi +if $do_clean ; then + true +else + NANO_PMAKE="${NANO_PMAKE} -DNO_CLEAN" +fi + export MAKEOBJDIRPREFIX export NANO_ARCH @@ -646,6 +790,7 @@ export NANO_DATASIZE export NANO_DRIVE export NANO_HEADS export NANO_IMAGES +export NANO_IMGNAME export NANO_MAKE_CONF export NANO_MEDIASIZE export NANO_NAME @@ -662,18 +807,24 @@ export NANO_BOOTLOADER ####################################################################### # And then it is as simple as that... +pprint 1 "NanoBSD image ${NANO_NAME} build starting" + if $do_world ; then - clean_build + if $do_clean ; then + clean_build + else + pprint 2 "Using existing build tree (as instructed)" + fi make_conf_build build_world else - echo "## Skipping buildworld (as instructed)" + pprint 2 "Skipping buildworld (as instructed)" fi if $do_kernel ; then build_kernel else - echo "## Skipping buildkernel (as instructed)" + pprint 2 "Skipping buildkernel (as instructed)" fi clean_world @@ -686,7 +837,13 @@ install_kernel run_customize setup_nanobsd prune_usr -create_${NANO_ARCH}_diskimage +run_late_customize +if $do_image ; then + create_${NANO_ARCH}_diskimage + echo "# Created NanoBSD disk image: ${MAKEOBJDIRPREFIX}/${NANO_IMGNAME}" +else + pprint 2 "Skipping image build (as instructed)" +fi last_orders -echo "# NanoBSD image completed" +pprint 1 "NanoBSD image ${NANO_NAME} completed" From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 20:28:44 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1C37106564A; Fri, 9 Jan 2009 20:28:43 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F3FC8FC08; Fri, 9 Jan 2009 20:28:43 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09KShKi067489; Fri, 9 Jan 2009 20:28:43 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09KShDU067488; Fri, 9 Jan 2009 20:28:43 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200901092028.n09KShDU067488@svn.freebsd.org> From: "George V. Neville-Neil" Date: Fri, 9 Jan 2009 20:28:43 +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: r186966 - stable/7/sys/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:28:45 -0000 Author: gnn Date: Fri Jan 9 20:28:43 2009 New Revision: 186966 URL: http://svn.freebsd.org/changeset/base/186966 Log: Make it so that debug builds with CTF (i.e. DTrace) have proper debugging symbols in the kernel. Reviewed by: jhb Modified: stable/7/sys/conf/kern.pre.mk Modified: stable/7/sys/conf/kern.pre.mk ============================================================================== --- stable/7/sys/conf/kern.pre.mk Fri Jan 9 19:49:32 2009 (r186965) +++ stable/7/sys/conf/kern.pre.mk Fri Jan 9 20:28:43 2009 (r186966) @@ -26,6 +26,7 @@ COPTFLAGS?= -O .else . if defined(DEBUG) _MINUS_O= -O +CTFFLAGS+= -g . else _MINUS_O= -O2 . endif From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 20:33:07 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FD9A106564A; Fri, 9 Jan 2009 20:33:07 +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 7CE018FC1B; Fri, 9 Jan 2009 20:33:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09KX74G067626; Fri, 9 Jan 2009 20:33:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09KX7oW067624; Fri, 9 Jan 2009 20:33:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092033.n09KX7oW067624@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:33:07 +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: r186967 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:33:08 -0000 Author: mav Date: Fri Jan 9 20:33:07 2009 New Revision: 186967 URL: http://svn.freebsd.org/changeset/base/186967 Log: MFC rev. 184139, 184141, 184937 Add "SD host controller" subclass. Add HDA multimedia subclass. Add ADMA, SATA and SAS mass storage subclasses. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/pci/pci.c stable/7/sys/dev/pci/pcireg.h Modified: stable/7/sys/dev/pci/pci.c ============================================================================== --- stable/7/sys/dev/pci/pci.c Fri Jan 9 20:28:43 2009 (r186966) +++ stable/7/sys/dev/pci/pci.c Fri Jan 9 20:33:07 2009 (r186967) @@ -2948,6 +2948,9 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_FLOPPY, "floppy disk"}, {PCIC_STORAGE, PCIS_STORAGE_IPI, "IPI"}, {PCIC_STORAGE, PCIS_STORAGE_RAID, "RAID"}, + {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, + {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, + {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, @@ -2962,6 +2965,7 @@ static struct {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_VIDEO, "video"}, {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_AUDIO, "audio"}, {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_TELE, "telephony"}, + {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_HDA, "HDA"}, {PCIC_MEMORY, -1, "memory"}, {PCIC_MEMORY, PCIS_MEMORY_RAM, "RAM"}, {PCIC_MEMORY, PCIS_MEMORY_FLASH, "flash"}, @@ -2986,6 +2990,7 @@ static struct {PCIC_BASEPERIPH, PCIS_BASEPERIPH_TIMER, "timer"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_RTC, "realtime clock"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PCIHOT, "PCI hot-plug controller"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_SDHC, "SD host controller"}, {PCIC_INPUTDEV, -1, "input device"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_KEYBOARD, "keyboard"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_DIGITIZER,"digitizer"}, Modified: stable/7/sys/dev/pci/pcireg.h ============================================================================== --- stable/7/sys/dev/pci/pcireg.h Fri Jan 9 20:28:43 2009 (r186966) +++ stable/7/sys/dev/pci/pcireg.h Fri Jan 9 20:33:07 2009 (r186967) @@ -255,6 +255,7 @@ #define PCIS_MULTIMEDIA_VIDEO 0x00 #define PCIS_MULTIMEDIA_AUDIO 0x01 #define PCIS_MULTIMEDIA_TELE 0x02 +#define PCIS_MULTIMEDIA_HDA 0x03 #define PCIS_MULTIMEDIA_OTHER 0x80 #define PCIC_MEMORY 0x05 From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 20:34:32 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADC501065670; Fri, 9 Jan 2009 20:34: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 9B9558FC1A; Fri, 9 Jan 2009 20:34:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09KYWid067689; Fri, 9 Jan 2009 20:34:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09KYWTk067688; Fri, 9 Jan 2009 20:34:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092034.n09KYWTk067688@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:34:32 +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: r186968 - stable/7/usr.sbin/pciconf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:34:33 -0000 Author: mav Date: Fri Jan 9 20:34:32 2009 New Revision: 186968 URL: http://svn.freebsd.org/changeset/base/186968 Log: MFC rev. 184140, 184142, 184936 Add "SD host controller" subclass. Add HDA multimedia subclass. Add ADMA, SATA and SAS mass storage subclasses. Modified: stable/7/usr.sbin/pciconf/ (props changed) stable/7/usr.sbin/pciconf/pciconf.c Modified: stable/7/usr.sbin/pciconf/pciconf.c ============================================================================== --- stable/7/usr.sbin/pciconf/pciconf.c Fri Jan 9 20:33:07 2009 (r186967) +++ stable/7/usr.sbin/pciconf/pciconf.c Fri Jan 9 20:34:32 2009 (r186968) @@ -272,6 +272,9 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_FLOPPY, "floppy disk"}, {PCIC_STORAGE, PCIS_STORAGE_IPI, "IPI"}, {PCIC_STORAGE, PCIS_STORAGE_RAID, "RAID"}, + {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, + {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, + {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, @@ -286,6 +289,7 @@ static struct {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_VIDEO, "video"}, {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_AUDIO, "audio"}, {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_TELE, "telephony"}, + {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_HDA, "HDA"}, {PCIC_MEMORY, -1, "memory"}, {PCIC_MEMORY, PCIS_MEMORY_RAM, "RAM"}, {PCIC_MEMORY, PCIS_MEMORY_FLASH, "flash"}, @@ -310,6 +314,7 @@ static struct {PCIC_BASEPERIPH, PCIS_BASEPERIPH_TIMER, "timer"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_RTC, "realtime clock"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PCIHOT, "PCI hot-plug controller"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_SDHC, "SD host controller"}, {PCIC_INPUTDEV, -1, "input device"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_KEYBOARD, "keyboard"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_DIGITIZER,"digitizer"}, From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 20:38:22 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 116C31065672; Fri, 9 Jan 2009 20:38:22 +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 F2E838FC1E; Fri, 9 Jan 2009 20:38:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09KcLD3067836; Fri, 9 Jan 2009 20:38:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09KcLDf067835; Fri, 9 Jan 2009 20:38:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092038.n09KcLDf067835@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:38:21 +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: r186969 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netgraph X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:38:22 -0000 Author: mav Date: Fri Jan 9 20:38:21 2009 New Revision: 186969 URL: http://svn.freebsd.org/changeset/base/186969 Log: MFC rev. 185179 Remove unneeded NULL check. At first msg can't be null here and and at second NG_FREE_MSG() also checks it. Found with: Coverity Prevent(tm) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netgraph/ng_base.c Modified: stable/7/sys/netgraph/ng_base.c ============================================================================== --- stable/7/sys/netgraph/ng_base.c Fri Jan 9 20:34:32 2009 (r186968) +++ stable/7/sys/netgraph/ng_base.c Fri Jan 9 20:38:21 2009 (r186969) @@ -2847,8 +2847,7 @@ ng_generic_msg(node_p here, item_p item, */ out: NG_RESPOND_MSG(error, here, item, resp); - if (msg) - NG_FREE_MSG(msg); + NG_FREE_MSG(msg); return (error); } From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 20:40:19 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67D191065704; Fri, 9 Jan 2009 20:40:19 +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 545478FC27; Fri, 9 Jan 2009 20:40:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09KeJQr067941; Fri, 9 Jan 2009 20:40:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09KeJtY067940; Fri, 9 Jan 2009 20:40:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092040.n09KeJtY067940@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:40:19 +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: r186970 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netgraph X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:40:21 -0000 Author: mav Date: Fri Jan 9 20:40:19 2009 New Revision: 186970 URL: http://svn.freebsd.org/changeset/base/186970 Log: MFC rev. 185182 Fix typo. Clear session stats instead of config and part of stats. Found with: Coverity Prevent(tm) CID: 2472 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netgraph/ng_l2tp.c Modified: stable/7/sys/netgraph/ng_l2tp.c ============================================================================== --- stable/7/sys/netgraph/ng_l2tp.c Fri Jan 9 20:38:21 2009 (r186969) +++ stable/7/sys/netgraph/ng_l2tp.c Fri Jan 9 20:40:19 2009 (r186970) @@ -733,7 +733,7 @@ ng_l2tp_reset_session(hook_p hook, void if (hpriv != NULL) { hpriv->conf.control_dseq = 0; hpriv->conf.enable_dseq = 0; - bzero(&hpriv->conf, sizeof(struct ng_l2tp_session_stats)); + bzero(&hpriv->stats, sizeof(struct ng_l2tp_session_stats)); hpriv->nr = 0; hpriv->ns = 0; } From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 20:41:58 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C633D1065677; Fri, 9 Jan 2009 20:41:58 +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 B34C18FC1F; Fri, 9 Jan 2009 20:41:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09KfwIq068042; Fri, 9 Jan 2009 20:41:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09KfwwJ068041; Fri, 9 Jan 2009 20:41:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092041.n09KfwwJ068041@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:41:58 +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: r186971 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netgraph X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:42:00 -0000 Author: mav Date: Fri Jan 9 20:41:58 2009 New Revision: 186971 URL: http://svn.freebsd.org/changeset/base/186971 Log: MFC rev. 185183 Remove unused variable. Found with: Coverity Prevent(tm) CID: 3682 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netgraph/ng_socket.c Modified: stable/7/sys/netgraph/ng_socket.c ============================================================================== --- stable/7/sys/netgraph/ng_socket.c Fri Jan 9 20:40:19 2009 (r186970) +++ stable/7/sys/netgraph/ng_socket.c Fri Jan 9 20:41:58 2009 (r186971) @@ -259,9 +259,8 @@ ngc_send(struct socket *so, int flags, s if (msg->header.typecookie == NGM_GENERIC_COOKIE && msg->header.cmd == NGM_MKPEER) { struct ngm_mkpeer *const mkp = (struct ngm_mkpeer *) msg->data; - struct ng_type *type; - if ((type = ng_findtype(mkp->type)) == NULL) { + if (ng_findtype(mkp->type) == NULL) { char filename[NG_TYPESIZ + 3]; int fileid; @@ -275,7 +274,7 @@ ngc_send(struct socket *so, int flags, s } /* See if type has been loaded successfully. */ - if ((type = ng_findtype(mkp->type)) == NULL) { + if (ng_findtype(mkp->type) == NULL) { free(msg, M_NETGRAPH_MSG); (void)kern_kldunload(curthread, fileid, LINKER_UNLOAD_NORMAL); From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 20:43:06 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBA3110657B5; Fri, 9 Jan 2009 20:43:06 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7DC98FC25; Fri, 9 Jan 2009 20:43:06 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09Kh6tS068112; Fri, 9 Jan 2009 20:43:06 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Kh6xl068111; Fri, 9 Jan 2009 20:43:06 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200901092043.n09Kh6xl068111@svn.freebsd.org> From: "George V. Neville-Neil" Date: Fri, 9 Jan 2009 20:43:06 +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: r186972 - stable/7/sys/conf X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:43:09 -0000 Author: gnn Date: Fri Jan 9 20:43:06 2009 New Revision: 186972 URL: http://svn.freebsd.org/changeset/base/186972 Log: Revert the last checkin as it's supposed to go against HEAD first. Modified: stable/7/sys/conf/kern.pre.mk Modified: stable/7/sys/conf/kern.pre.mk ============================================================================== --- stable/7/sys/conf/kern.pre.mk Fri Jan 9 20:41:58 2009 (r186971) +++ stable/7/sys/conf/kern.pre.mk Fri Jan 9 20:43:06 2009 (r186972) @@ -26,7 +26,6 @@ COPTFLAGS?= -O .else . if defined(DEBUG) _MINUS_O= -O -CTFFLAGS+= -g . else _MINUS_O= -O2 . endif From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 20:55:26 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1486106566C; Fri, 9 Jan 2009 20:55:26 +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 CDB8E8FC16; Fri, 9 Jan 2009 20:55:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09KtQp7068455; Fri, 9 Jan 2009 20:55:26 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09KtQpv068452; Fri, 9 Jan 2009 20:55:26 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092055.n09KtQpv068452@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:55:26 +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: r186973 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netgraph/netflow X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:55:27 -0000 Author: mav Date: Fri Jan 9 20:55:26 2009 New Revision: 186973 URL: http://svn.freebsd.org/changeset/base/186973 Log: MFC rev. 183693 Add ability to generate egress netflow instead or in addition to ingress. Use mbuf tagging for accounted packets to not account packets twice when both ingress and egress netflow enabled. To keep compatibility new "setconfig" message added to control new functionality. By default node works as before, doing only ingress accounting without using mbuf tags. Reviewed by: glebius Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netgraph/netflow/netflow.c stable/7/sys/netgraph/netflow/ng_netflow.c stable/7/sys/netgraph/netflow/ng_netflow.h Modified: stable/7/sys/netgraph/netflow/netflow.c ============================================================================== --- stable/7/sys/netgraph/netflow/netflow.c Fri Jan 9 20:43:06 2009 (r186972) +++ stable/7/sys/netgraph/netflow/netflow.c Fri Jan 9 20:55:26 2009 (r186973) @@ -395,8 +395,7 @@ ng_netflow_cache_flush(priv_p priv) /* Insert packet from into flow cache. */ int -ng_netflow_flow_add(priv_p priv, struct ip *ip, iface_p iface, - struct ifnet *ifp) +ng_netflow_flow_add(priv_p priv, struct ip *ip, unsigned int src_if_index) { register struct flow_entry *fle, *fle1; struct flow_hash_entry *hsh; @@ -427,12 +426,7 @@ ng_netflow_flow_add(priv_p priv, struct r.r_ip_p = ip->ip_p; r.r_tos = ip->ip_tos; - /* Configured in_ifx overrides mbuf's */ - if (iface->info.ifinfo_index == 0) { - if (ifp != NULL) - r.r_i_ifx = ifp->if_index; - } else - r.r_i_ifx = iface->info.ifinfo_index; + r.r_i_ifx = src_if_index; /* * XXX NOTE: only first fragment of fragmented TCP, UDP and Modified: stable/7/sys/netgraph/netflow/ng_netflow.c ============================================================================== --- stable/7/sys/netgraph/netflow/ng_netflow.c Fri Jan 9 20:43:06 2009 (r186972) +++ stable/7/sys/netgraph/netflow/ng_netflow.c Fri Jan 9 20:55:26 2009 (r186973) @@ -106,6 +106,14 @@ static const struct ng_parse_type ng_net &ng_netflow_settimeouts_type_fields }; +/* Parse type for ng_netflow_setconfig */ +static const struct ng_parse_struct_field ng_netflow_setconfig_type_fields[] + = NG_NETFLOW_SETCONFIG_TYPE; +static const struct ng_parse_type ng_netflow_setconfig_type = { + &ng_parse_struct_type, + &ng_netflow_setconfig_type_fields +}; + /* List of commands and how to convert arguments to/from ASCII */ static const struct ng_cmdlist ng_netflow_cmds[] = { { @@ -143,6 +151,13 @@ static const struct ng_cmdlist ng_netflo &ng_netflow_settimeouts_type, NULL }, + { + NGM_NETFLOW_COOKIE, + NGM_NETFLOW_SETCONFIG, + "setconfig", + &ng_netflow_setconfig_type, + NULL + }, { 0 } }; @@ -167,7 +182,7 @@ static int ng_netflow_constructor(node_p node) { priv_p priv; - int error = 0; + int error = 0, i; /* Initialize private data */ MALLOC(priv, priv_p, sizeof(*priv), M_NETGRAPH, M_NOWAIT); @@ -183,6 +198,10 @@ ng_netflow_constructor(node_p node) priv->info.nfinfo_inact_t = INACTIVE_TIMEOUT; priv->info.nfinfo_act_t = ACTIVE_TIMEOUT; + /* Set default config */ + for (i = 0; i < NG_NETFLOW_MAXIFACES; i++) + priv->ifaces[i].info.conf = NG_NETFLOW_CONF_INGRESS; + /* Initialize callout handle */ callout_init(&priv->exp_callout, CALLOUT_MPSAFE); @@ -399,6 +418,22 @@ ng_netflow_rcvmsg (node_p node, item_p i break; } + case NGM_NETFLOW_SETCONFIG: + { + struct ng_netflow_setconfig *set; + + if (msg->header.arglen != sizeof(struct ng_netflow_settimeouts)) + ERROUT(EINVAL); + + set = (struct ng_netflow_setconfig *)msg->data; + + if (set->iface >= NG_NETFLOW_MAXIFACES) + ERROUT(EINVAL); + + priv->ifaces[set->iface].info.conf = set->conf; + + break; + } case NGM_NETFLOW_SHOW: { uint32_t *last; @@ -445,10 +480,13 @@ ng_netflow_rcvdata (hook_p hook, item_p const node_p node = NG_HOOK_NODE(hook); const priv_p priv = NG_NODE_PRIVATE(node); const iface_p iface = NG_HOOK_PRIVATE(hook); + hook_p out; struct mbuf *m = NULL; struct ip *ip; + struct m_tag *mtag; int pullup_len = 0; - int error = 0; + int error = 0, bypass = 0; + unsigned int src_if_index; if (hook == priv->export) { /* @@ -459,16 +497,48 @@ ng_netflow_rcvdata (hook_p hook, item_p ERROUT(EINVAL); }; - if (hook == iface->out) { - /* - * Data arrived on out hook. Bypass it. - */ - if (iface->hook == NULL) + if (hook == iface->hook) { + if ((iface->info.conf & NG_NETFLOW_CONF_INGRESS) == 0) + bypass = 1; + out = iface->out; + } else if (hook == iface->out) { + if ((iface->info.conf & NG_NETFLOW_CONF_EGRESS) == 0) + bypass = 1; + out = iface->hook; + } else + ERROUT(EINVAL); + + if ((!bypass) && + (iface->info.conf & (NG_NETFLOW_CONF_ONCE | NG_NETFLOW_CONF_THISONCE))) { + mtag = m_tag_locate(NGI_M(item), MTAG_NETFLOW, + MTAG_NETFLOW_CALLED, NULL); + while (mtag != NULL) { + if ((iface->info.conf & NG_NETFLOW_CONF_ONCE) || + ((ng_ID_t *)(mtag + 1))[0] == NG_NODE_ID(node)) { + bypass = 1; + break; + } + mtag = m_tag_locate(NGI_M(item), MTAG_NETFLOW, + MTAG_NETFLOW_CALLED, mtag); + } + } + + if (bypass) { + if (out == NULL) ERROUT(ENOTCONN); - NG_FWD_ITEM_HOOK(error, item, iface->hook); + NG_FWD_ITEM_HOOK(error, item, out); return (error); } + + if (iface->info.conf & (NG_NETFLOW_CONF_ONCE | NG_NETFLOW_CONF_THISONCE)) { + mtag = m_tag_alloc(MTAG_NETFLOW, MTAG_NETFLOW_CALLED, + sizeof(ng_ID_t), M_NOWAIT); + if (mtag) { + ((ng_ID_t *)(mtag + 1))[0] = NG_NODE_ID(node); + m_tag_prepend(NGI_M(item), mtag); + } + } NGI_GET_M(item, m); @@ -592,12 +662,20 @@ ng_netflow_rcvdata (hook_p hook, item_p #undef M_CHECK - error = ng_netflow_flow_add(priv, ip, iface, m->m_pkthdr.rcvif); + /* Determine packet input interface. Prefer configured. */ + src_if_index = 0; + if (hook == iface->out || iface->info.ifinfo_index == 0) { + if (m->m_pkthdr.rcvif != NULL) + src_if_index = m->m_pkthdr.rcvif->if_index; + } else + src_if_index = iface->info.ifinfo_index; + + error = ng_netflow_flow_add(priv, ip, src_if_index); bypass: - if (iface->out != NULL) { + if (out != NULL) { /* XXX: error gets overwritten here */ - NG_FWD_NEW_DATA(error, item, iface->out, m); + NG_FWD_NEW_DATA(error, item, out, m); return (error); } done: Modified: stable/7/sys/netgraph/netflow/ng_netflow.h ============================================================================== --- stable/7/sys/netgraph/netflow/ng_netflow.h Fri Jan 9 20:43:06 2009 (r186972) +++ stable/7/sys/netgraph/netflow/ng_netflow.h Fri Jan 9 20:55:26 2009 (r186973) @@ -50,6 +50,7 @@ enum { NGM_NETFLOW_SETDLT = 4, /* set data-link type */ NGM_NETFLOW_SETIFINDEX = 5, /* set interface index */ NGM_NETFLOW_SETTIMEOUTS = 6, /* set active/inactive flow timeouts */ + NGM_NETFLOW_SETCONFIG = 7, /* set flow generation options */ }; /* This structure is returned by the NGM_NETFLOW_INFO message */ @@ -71,6 +72,7 @@ struct ng_netflow_ifinfo { uint8_t ifinfo_dlt; /* Data Link Type, DLT_XXX */ #define MAXDLTNAMELEN 20 u_int16_t ifinfo_index; /* connected iface index */ + uint32_t conf; }; @@ -92,6 +94,17 @@ struct ng_netflow_settimeouts { uint32_t active_timeout; /* flow active timeout */ }; +#define NG_NETFLOW_CONF_INGRESS 1 +#define NG_NETFLOW_CONF_EGRESS 2 +#define NG_NETFLOW_CONF_ONCE 4 +#define NG_NETFLOW_CONF_THISONCE 8 + +/* This structure is passed to NGM_NETFLOW_SETCONFIG */ +struct ng_netflow_setconfig { + u_int16_t iface; /* which iface config change */ + u_int32_t conf; /* new config */ +}; + /* This is unique data, which identifies flow */ struct flow_rec { struct in_addr r_src; @@ -182,6 +195,7 @@ struct flow_entry { { "packets", &ng_parse_uint32_type }, \ { "data link type", &ng_parse_uint8_type }, \ { "index", &ng_parse_uint16_type }, \ + { "conf", &ng_parse_uint32_type }, \ { NULL } \ } @@ -206,6 +220,13 @@ struct flow_entry { { NULL } \ } +/* Parse the setifindex structure */ +#define NG_NETFLOW_SETCONFIG_TYPE { \ + { "iface", &ng_parse_uint16_type }, \ + { "conf", &ng_parse_uint32_type }, \ + { NULL } \ +} + /* Private hook data */ struct ng_netflow_iface { hook_p hook; /* NULL when disconnected */ @@ -263,12 +284,15 @@ struct flow_hash_entry { #define ERROUT(x) { error = (x); goto done; } +#define MTAG_NETFLOW 1221656444 +#define MTAG_NETFLOW_CALLED 0 + /* Prototypes for netflow.c */ int ng_netflow_cache_init(priv_p); void ng_netflow_cache_flush(priv_p); void ng_netflow_copyinfo(priv_p, struct ng_netflow_info *); timeout_t ng_netflow_expire; -int ng_netflow_flow_add(priv_p, struct ip *, iface_p, struct ifnet *); +int ng_netflow_flow_add(priv_p, struct ip *, unsigned int src_if_index); int ng_netflow_flow_show(priv_p, uint32_t last, struct ng_mesg *); #endif /* _KERNEL */ From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 20:57:01 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EDC01065672; Fri, 9 Jan 2009 20:57:01 +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 6CE938FC0C; Fri, 9 Jan 2009 20:57:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09Kv1hS068548; Fri, 9 Jan 2009 20:57:01 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Kv12s068547; Fri, 9 Jan 2009 20:57:01 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092057.n09Kv12s068547@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:57:01 +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: r186974 - stable/7/share/man/man4 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:57:02 -0000 Author: mav Date: Fri Jan 9 20:57:01 2009 New Revision: 186974 URL: http://svn.freebsd.org/changeset/base/186974 Log: MFC rev. 183695 Document new NGM_NETFLOW_SETCONFIG control message. Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/igb.4 (props changed) stable/7/share/man/man4/ng_netflow.4 Modified: stable/7/share/man/man4/ng_netflow.4 ============================================================================== --- stable/7/share/man/man4/ng_netflow.4 Fri Jan 9 20:55:26 2009 (r186973) +++ stable/7/share/man/man4/ng_netflow.4 Fri Jan 9 20:57:01 2009 (r186974) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 2, 2006 +.Dd October 8, 2008 .Os .Dt NG_NETFLOW 4 .Sh NAME @@ -71,7 +71,8 @@ and the same number of hooks named etc., plus a single hook named .Va export . -The node does NetFlow accounting of data received on +By default (ingress NetFlow enabled) node does NetFlow accounting of data +received on .Va iface* hooks. If corresponding @@ -81,7 +82,7 @@ If data is received on .Va out hook, it is bypassed to corresponding .Va iface -hook without any processing. +hook without any processing (egress NetFlow disabled by default). When full export datagram is built it is sent to the .Va export hook. @@ -162,6 +163,31 @@ struct ng_netflow_settimeouts { uint32_t active_timeout; }; .Ed +.It Dv NGM_NETFLOW_SETCONFIG +Sets configuration for the specified interface. +This message requires +.Vt "struct ng_netflow_setconfig" +as an argument: +.Bd -literal -offset 4n +struct ng_netflow_setconfig { + u_int16_t iface; + u_int32_t conf; +#define NG_NETFLOW_CONF_INGRESS 1 +#define NG_NETFLOW_CONF_EGRESS 2 +#define NG_NETFLOW_CONF_ONCE 4 +#define NG_NETFLOW_CONF_THISONCE 8 +}; +.Ed +.Pp +Configuration is a bitmask of several options. Option NG_NETFLOW_CONF_INGRESS +enabled by default enables ingress NetFlow generation (for data coming from +ifaceX hook). Option NG_NETFLOW_CONF_EGRESS enables egress NetFlow (for data +coming from outX hook). Option NG_NETFLOW_CONF_ONCE defines that packet should +be accounted only once if it several times passes via netflow node. Option +NG_NETFLOW_CONF_THISONCE defines that packet should be accounted only once +if it several times passes via exactly this netflow node. Last two options are +important to avoid duplicate accounting when both ingress and egress NetFlow +are enabled. .It Dv NGM_NETFLOW_SHOW This control message asks a node to dump the entire contents of the flow cache. It is called from @@ -191,6 +217,8 @@ commands are: .Qq Li "setifindex { iface = %u index = %u }" .It Dv NGM_NETFLOW_SETTIMEOUTS .Qq Li "settimeouts { inactive = %u active = %u }" +.It Dv NGM_NETFLOW_SETCONFIG +.Qq Li "setconfig { iface = %u conf = %u }" .El .Sh SHUTDOWN This node shuts down upon receipt of a From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 21:02:55 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D2BA1065672; Fri, 9 Jan 2009 21:02:55 +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 EECBA8FC08; Fri, 9 Jan 2009 21:02:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09L2sYc068795; Fri, 9 Jan 2009 21:02:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09L2sMa068794; Fri, 9 Jan 2009 21:02:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092102.n09L2sMa068794@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 21:02:54 +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: r186976 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netgraph X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 21:02:55 -0000 Author: mav Date: Fri Jan 9 21:02:54 2009 New Revision: 186976 URL: http://svn.freebsd.org/changeset/base/186976 Log: MFC rev. 182995 We can't implicitly trust the hook on NGQF_FN/NGQF_FN2 processing in ng_apply_item(). There are possible (and I have got one) use-after-free class panics because of it. If hook is specified, require it to be valid at the apply time. The only exceptions are the internal ng_con_part2(), ng_con_part3() and ng_rmhook_part2() functions which are specially made to work with invalid hooks. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netgraph/ng_base.c Modified: stable/7/sys/netgraph/ng_base.c ============================================================================== --- stable/7/sys/netgraph/ng_base.c Fri Jan 9 20:57:43 2009 (r186975) +++ stable/7/sys/netgraph/ng_base.c Fri Jan 9 21:02:54 2009 (r186976) @@ -2377,19 +2377,27 @@ ng_apply_item(node_p node, item_p item, case NGQF_FN: case NGQF_FN2: /* - * We have to implicitly trust the hook, - * as some of these are used for system purposes - * where the hook is invalid. In the case of - * the shutdown message we allow it to hit + * In the case of the shutdown message we allow it to hit * even if the node is invalid. */ - if ((NG_NODE_NOT_VALID(node)) - && (NGI_FN(item) != &ng_rmnode)) { + if (NG_NODE_NOT_VALID(node) && + NGI_FN(item) != &ng_rmnode) { TRAP_ERROR(); error = EINVAL; NG_FREE_ITEM(item); break; } + /* Same is about some internal functions and invalid hook. */ + if (hook && NG_HOOK_NOT_VALID(hook) && + NGI_FN2(item) != &ng_con_part2 && + NGI_FN2(item) != &ng_con_part3 && + NGI_FN(item) != &ng_rmhook_part2) { + TRAP_ERROR(); + error = EINVAL; + NG_FREE_ITEM(item); + break; + } + if ((item->el_flags & NGQF_TYPE) == NGQF_FN) { (*NGI_FN(item))(node, hook, NGI_ARG1(item), NGI_ARG2(item)); From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 22:10:07 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 611D4106567A; Fri, 9 Jan 2009 22:10:07 +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 4D2BC8FC19; Fri, 9 Jan 2009 22:10:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09MA7fv070529; Fri, 9 Jan 2009 22:10:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09MA7Xb070527; Fri, 9 Jan 2009 22:10:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092210.n09MA7Xb070527@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 22:10:07 +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: r186982 - stable/7/usr.sbin/powerd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 22:10:08 -0000 Author: mav Date: Fri Jan 9 22:10:07 2009 New Revision: 186982 URL: http://svn.freebsd.org/changeset/base/186982 Log: Sync powerd with CURRENT. 1. Make it more SMP polite. Previous version uses average CPU load that often leads to load underestimation. It make powerd with default configuration unusable on systems with more then 2 CPUs. I propose to use summary load instead of average one. IMO this is the best we can do without specially tuned scheduler. Also as soon as measuring total load on SMP systems is more useful then total idle, I have switched to it. 2. Make powerd's operation independent from number and size of frequency levels. I have added internal frequency counter which translated into real frequencies only on a last stage and only as good as gone. Some systems may have only several power levels, while others - many of them, so adaptation time with previous approach was completely different. 3. As part of previous I have changed adaptive mode to rise frequency on demand up to 2 times and fall on 1/8 per time internal. 4. For desktop (AC-powered) systems I have added one more mode - "hiadaptive". It rises frequency twice faster, drops it 4 times slower, prefers twice lower CPU load and has additional delay before leaving the highest frequency after the period of maximum load. This mode was specially made to improve interactivity of the systems where operation capabilities are more significant then power consumption, but keeping maximum frequency all the time is not needed. 5. I have reduced default polling interval from 1/2 to 1/4 of second. It is not so important for algorithm math now, but gives better system interactivity. 6. Restore original frequency on exit. 7. getopt(3) returns -1, not EOF. Discussed on: mobile@ Modified: stable/7/usr.sbin/powerd/powerd.8 stable/7/usr.sbin/powerd/powerd.c Modified: stable/7/usr.sbin/powerd/powerd.8 ============================================================================== --- stable/7/usr.sbin/powerd/powerd.8 Fri Jan 9 22:06:48 2009 (r186981) +++ stable/7/usr.sbin/powerd/powerd.8 Fri Jan 9 22:10:07 2009 (r186982) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 6, 2005 +.Dd December 24, 2008 .Dt POWERD 8 .Os .Sh NAME @@ -47,7 +47,8 @@ utility monitors the system state and se accordingly. It offers three modes (maximum, minimum, and adaptive) that can be individually selected while on AC power or batteries. -The modes maximum, minimum, and adaptive may be abbreviated max, min, adp. +The modes maximum, minimum, adaptive and hiadaptive may be abbreviated +max, min, adp, hadp. .Pp Maximum mode chooses the highest performance values. Minimum mode selects the lowest performance values to get the most power @@ -56,8 +57,10 @@ Adaptive mode attempts to strike a balan the system appears idle and increasing it when the system is busy. It offers a good balance between a small performance loss for greatly increased power savings. -The default mode is -adaptive. +Hiadaptive mode is alike adaptive mode, but tuned for systems where +performance and interactivity are more important then power consumption. +It rises frequency faster, drops slower and keeps twice lower CPU load. +The default mode is adaptive for battery power and hiadaptive for the rest. .Pp The .Nm @@ -72,10 +75,9 @@ Selects the .Ar mode to use while on battery power. .It Fl i Ar percent -Specifies the CPU idle percent level when -adaptive +Specifies the CPU load percent level when adaptive mode should begin to degrade performance to save power. -The default is 90% or higher. +The default is 50% or lower. .It Fl n Ar mode Selects the .Ar mode @@ -83,16 +85,15 @@ to use normally when the AC line state i .It Fl p Ar ival Specifies a different polling interval (in milliseconds) for AC line state and system idle levels. -The default is 500 ms. +The default is 250 ms. .It Fl P Ar pidfile Specifies an alternative file in which the process ID should be stored. The default is .Pa /var/run/powerd.pid . .It Fl r Ar percent -Specifies the CPU idle percent level where -adaptive +Specifies the CPU load percent level where adaptive mode should consider the CPU running and increase performance. -The default is 65% or lower. +The default is 75% or higher. .It Fl v Verbose mode. Messages about power changes will be printed to stdout and Modified: stable/7/usr.sbin/powerd/powerd.c ============================================================================== --- stable/7/usr.sbin/powerd/powerd.c Fri Jan 9 22:06:48 2009 (r186981) +++ stable/7/usr.sbin/powerd/powerd.c Fri Jan 9 22:10:07 2009 (r186982) @@ -50,13 +50,14 @@ __FBSDID("$FreeBSD$"); #include #endif -#define DEFAULT_ACTIVE_PERCENT 65 -#define DEFAULT_IDLE_PERCENT 90 -#define DEFAULT_POLL_INTERVAL 500 /* Poll interval in milliseconds */ +#define DEFAULT_ACTIVE_PERCENT 75 +#define DEFAULT_IDLE_PERCENT 50 +#define DEFAULT_POLL_INTERVAL 250 /* Poll interval in milliseconds */ typedef enum { MODE_MIN, MODE_ADAPTIVE, + MODE_HIADAPTIVE, MODE_MAX, } modes_t; @@ -77,7 +78,7 @@ const char *modes[] = { #define DEVDPIPE "/var/run/devd.pipe" #define DEVCTL_MAXBUF 1024 -static int read_usage_times(long *idle, long *total); +static int read_usage_times(int *load); static int read_freqs(int *numfreqs, int **freqs, int **power); static int set_freq(int freq); static void acline_init(void); @@ -89,7 +90,7 @@ static void parse_mode(char *arg, int *m static void usage(void); /* Sysctl data structures. */ -static int cp_time_mib[2]; +static int cp_times_mib[2]; static int freq_mib[4]; static int levels_mib[4]; static int acline_mib[3]; @@ -119,27 +120,49 @@ static int devd_pipe = -1; static struct timeval tried_devd; static int -read_usage_times(long *idle, long *total) +read_usage_times(int *load) { - static long idle_old, total_old; - long cp_time[CPUSTATES], i, total_new; - size_t cp_time_len; - int error; + static long *cp_times = NULL, *cp_times_old = NULL; + static int ncpus = 0; + size_t cp_times_len; + int error, cpu, i, total; + + if (cp_times == NULL) { + cp_times_len = 0; + error = sysctl(cp_times_mib, 2, NULL, &cp_times_len, NULL, 0); + if (error) + return (error); + if ((cp_times = malloc(cp_times_len)) == NULL) + return (errno); + if ((cp_times_old = malloc(cp_times_len)) == NULL) { + free(cp_times); + cp_times = NULL; + return (errno); + } + ncpus = cp_times_len / (sizeof(long) * CPUSTATES); + } - cp_time_len = sizeof(cp_time); - error = sysctl(cp_time_mib, 2, cp_time, &cp_time_len, NULL, 0); + cp_times_len = sizeof(long) * CPUSTATES * ncpus; + error = sysctl(cp_times_mib, 2, cp_times, &cp_times_len, NULL, 0); if (error) return (error); - for (total_new = 0, i = 0; i < CPUSTATES; i++) - total_new += cp_time[i]; - - if (idle) - *idle = cp_time[CP_IDLE] - idle_old; - if (total) - *total = total_new - total_old; + + if (load) { + *load = 0; + for (cpu = 0; cpu < ncpus; cpu++) { + total = 0; + for (i = 0; i < CPUSTATES; i++) { + total += cp_times[cpu * CPUSTATES + i] - + cp_times_old[cpu * CPUSTATES + i]; + } + if (total == 0) + continue; + *load += 100 - (cp_times[cpu * CPUSTATES + CP_IDLE] - + cp_times_old[cpu * CPUSTATES + CP_IDLE]) * 100 / total; + } + } - idle_old = cp_time[CP_IDLE]; - total_old = total_new; + memcpy(cp_times_old, cp_times, cp_times_len); return (0); } @@ -190,6 +213,21 @@ read_freqs(int *numfreqs, int **freqs, i } static int +get_freq(void) +{ + size_t len; + int curfreq; + + len = sizeof(curfreq); + if (sysctl(freq_mib, 4, &curfreq, &len, NULL, 0) != 0) { + if (vflag) + warn("error reading current CPU frequency"); + curfreq = 0; + } + return (curfreq); +} + +static int set_freq(int freq) { @@ -201,6 +239,19 @@ set_freq(int freq) return (0); } +static int +get_freq_id(int freq, int *freqs, int numfreqs) +{ + int i = 1; + + while (i < numfreqs) { + if (freqs[i] < freq) + break; + i++; + } + return (i - 1); +} + /* * Try to use ACPI to find the AC line status. If this fails, fall back * to APM. If nothing succeeds, we'll just run in default mode. @@ -341,6 +392,8 @@ parse_mode(char *arg, int *mode, int ch) *mode = MODE_MAX; else if (strcmp(arg, "adaptive") == 0 || strcmp(arg, "adp") == 0) *mode = MODE_ADAPTIVE; + else if (strcmp(arg, "hiadaptive") == 0 || strcmp(arg, "hadp") == 0) + *mode = MODE_HIADAPTIVE; else errx(1, "bad option: -%c %s", (char)ch, optarg); } @@ -369,14 +422,14 @@ main(int argc, char * argv[]) int nfds; struct pidfh *pfh = NULL; const char *pidfile = NULL; - long idle, total; - int curfreq, *freqs, i, *mwatts, numfreqs; + int freq, curfreq, initfreq, *freqs, i, j, *mwatts, numfreqs, load; int ch, mode, mode_ac, mode_battery, mode_none; uint64_t mjoules_used; size_t len; /* Default mode for all AC states is adaptive. */ - mode_ac = mode_battery = mode_none = MODE_ADAPTIVE; + mode_ac = mode_none = MODE_HIADAPTIVE; + mode_battery = MODE_ADAPTIVE; cpu_running_mark = DEFAULT_ACTIVE_PERCENT; cpu_idle_mark = DEFAULT_IDLE_PERCENT; poll_ival = DEFAULT_POLL_INTERVAL; @@ -387,7 +440,7 @@ main(int argc, char * argv[]) if (geteuid() != 0) errx(1, "must be root to run"); - while ((ch = getopt(argc, argv, "a:b:i:n:p:P:r:v")) != EOF) + while ((ch = getopt(argc, argv, "a:b:i:n:p:P:r:v")) != -1) switch (ch) { case 'a': parse_mode(optarg, &mode_ac, ch); @@ -418,7 +471,7 @@ main(int argc, char * argv[]) break; case 'r': cpu_running_mark = atoi(optarg); - if (cpu_running_mark < 0 || cpu_running_mark > 100) { + if (cpu_running_mark <= 0 || cpu_running_mark > 100) { warnx("%d is not a valid percent", cpu_running_mark); usage(); @@ -438,8 +491,8 @@ main(int argc, char * argv[]) /* Look up various sysctl MIBs. */ len = 2; - if (sysctlnametomib("kern.cp_time", cp_time_mib, &len)) - err(1, "lookup kern.cp_time"); + if (sysctlnametomib("kern.cp_times", cp_times_mib, &len)) + err(1, "lookup kern.cp_times"); len = 4; if (sysctlnametomib("dev.cpu.0.freq", freq_mib, &len)) err(1, "lookup freq"); @@ -447,8 +500,8 @@ main(int argc, char * argv[]) if (sysctlnametomib("dev.cpu.0.freq_levels", levels_mib, &len)) err(1, "lookup freq_levels"); - /* Check if we can read the idle time and supported freqs. */ - if (read_usage_times(NULL, NULL)) + /* Check if we can read the load and supported freqs. */ + if (read_usage_times(NULL)) err(1, "read_usage_times"); if (read_freqs(&numfreqs, &freqs, &mwatts)) err(1, "error reading supported CPU frequencies"); @@ -483,6 +536,9 @@ main(int argc, char * argv[]) signal(SIGINT, handle_sigs); signal(SIGTERM, handle_sigs); + freq = initfreq = get_freq(); + if (freq < 1) + freq = 1; /* Main loop. */ for (;;) { FD_ZERO(&fdset); @@ -522,37 +578,30 @@ main(int argc, char * argv[]) } /* Read the current frequency. */ - len = sizeof(curfreq); - if (sysctl(freq_mib, 4, &curfreq, &len, NULL, 0) != 0) { - if (vflag) - warn("error reading current CPU frequency"); + if ((curfreq = get_freq()) == 0) continue; - } + i = get_freq_id(curfreq, freqs, numfreqs); + if (vflag) { - for (i = 0; i < numfreqs; i++) { - if (freqs[i] == curfreq) - break; - } - /* Keep a sum of all power actually used. */ - if (i < numfreqs && mwatts[i] != -1) + if (mwatts[i] != -1) mjoules_used += (mwatts[i] * (poll_ival / 1000)) / 1000; } /* Always switch to the lowest frequency in min mode. */ if (mode == MODE_MIN) { - if (curfreq != freqs[numfreqs - 1]) { + freq = freqs[numfreqs - 1]; + if (curfreq != freq) { if (vflag) { printf("now operating on %s power; " "changing frequency to %d MHz\n", - modes[acline_status], - freqs[numfreqs - 1]); + modes[acline_status], freq); } - if (set_freq(freqs[numfreqs - 1]) != 0) { + if (set_freq(freq) != 0) { warn("error setting CPU freq %d", - freqs[numfreqs - 1]); + freq); continue; } } @@ -561,16 +610,16 @@ main(int argc, char * argv[]) /* Always switch to the highest frequency in max mode. */ if (mode == MODE_MAX) { - if (curfreq != freqs[0]) { + freq = freqs[0]; + if (curfreq != freq) { if (vflag) { printf("now operating on %s power; " "changing frequency to %d MHz\n", - modes[acline_status], - freqs[0]); + modes[acline_status], freq); } - if (set_freq(freqs[0]) != 0) { + if (set_freq(freq) != 0) { warn("error setting CPU freq %d", - freqs[0]); + freq); continue; } } @@ -578,46 +627,63 @@ main(int argc, char * argv[]) } /* Adaptive mode; get the current CPU usage times. */ - if (read_usage_times(&idle, &total)) { + if (read_usage_times(&load)) { if (vflag) warn("read_usage_times() failed"); continue; } - - /* - * If we're idle less than the active mark, bump up two levels. - * If we're idle more than the idle mark, drop down one level. - */ - for (i = 0; i < numfreqs - 1; i++) { - if (freqs[i] == curfreq) - break; - } - if (idle < (total * cpu_running_mark) / 100 && - curfreq < freqs[0]) { - i -= 2; - if (i < 0) - i = 0; - if (vflag) { - printf("idle time < %d%%, increasing clock" - " speed from %d MHz to %d MHz\n", - cpu_running_mark, curfreq, freqs[i]); + + if (mode == MODE_ADAPTIVE) { + if (load > cpu_running_mark) { + if (load > 95 || load > cpu_running_mark * 2) + freq *= 2; + else + freq = freq * load / cpu_running_mark; + if (freq > freqs[0]) + freq = freqs[0]; + } else if (load < cpu_idle_mark && + curfreq * load < freqs[get_freq_id( + freq * 7 / 8, freqs, numfreqs)] * + cpu_running_mark) { + freq = freq * 7 / 8; + if (freq < freqs[numfreqs - 1]) + freq = freqs[numfreqs - 1]; } - if (set_freq(freqs[i])) - warn("error setting CPU frequency %d", - freqs[i]); - } else if (idle > (total * cpu_idle_mark) / 100 && - curfreq > freqs[numfreqs - 1]) { - i++; + } else { /* MODE_HIADAPTIVE */ + if (load > cpu_running_mark / 2) { + if (load > 95 || load > cpu_running_mark) + freq *= 4; + else + freq = freq * load * 2 / cpu_running_mark; + if (freq > freqs[0] * 2) + freq = freqs[0] * 2; + } else if (load < cpu_idle_mark / 2 && + curfreq * load < freqs[get_freq_id( + freq * 31 / 32, freqs, numfreqs)] * + cpu_running_mark / 2) { + freq = freq * 31 / 32; + if (freq < freqs[numfreqs - 1]) + freq = freqs[numfreqs - 1]; + } + } + if (vflag) { + printf("load %3d%%, current freq %4d MHz (%2d), wanted freq %4d MHz\n", + load, curfreq, i, freq); + } + j = get_freq_id(freq, freqs, numfreqs); + if (i != j) { if (vflag) { - printf("idle time > %d%%, decreasing clock" + printf("changing clock" " speed from %d MHz to %d MHz\n", - cpu_idle_mark, curfreq, freqs[i]); + freqs[i], freqs[j]); } - if (set_freq(freqs[i]) != 0) + if (set_freq(freqs[j])) warn("error setting CPU frequency %d", - freqs[i]); + freqs[j]); } } + if (set_freq(initfreq)) + warn("error setting CPU frequency %d", initfreq); free(freqs); free(mwatts); devd_close(); From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 22:19:49 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 032C91065774; Fri, 9 Jan 2009 22:19:49 +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 E50298FC08; Fri, 9 Jan 2009 22:19:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09MJmeV070744; Fri, 9 Jan 2009 22:19:48 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09MJm8F070743; Fri, 9 Jan 2009 22:19:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092219.n09MJm8F070743@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 22:19:48 +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: r186983 - stable/7 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 22:19:50 -0000 Author: mav Date: Fri Jan 9 22:19:48 2009 New Revision: 186983 URL: http://svn.freebsd.org/changeset/base/186983 Log: powerd(8) was updated to get better SMP support. Meanings of the -i and -r command line options were changed. Modified: stable/7/UPDATING Modified: stable/7/UPDATING ============================================================================== --- stable/7/UPDATING Fri Jan 9 22:10:07 2009 (r186982) +++ stable/7/UPDATING Fri Jan 9 22:19:48 2009 (r186983) @@ -8,6 +8,10 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20090110: + powerd(8) was updated to get better SMP support. + Meanings of the -i and -r command line options were changed. + 20090107: snd_hda(4) driver was updated to version 20081226_0122. From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 23:14:13 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 662131065670; Fri, 9 Jan 2009 23:14:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 412B08FC16; Fri, 9 Jan 2009 23:14:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id C55F946B03; Fri, 9 Jan 2009 18:14:12 -0500 (EST) Date: Fri, 9 Jan 2009 23:14:12 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Motin In-Reply-To: <200901092210.n09MA7Xb070527@svn.freebsd.org> Message-ID: References: <200901092210.n09MA7Xb070527@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r186982 - stable/7/usr.sbin/powerd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 23:14:14 -0000 On Fri, 9 Jan 2009, Alexander Motin wrote: > Modified: > stable/7/usr.sbin/powerd/powerd.8 > stable/7/usr.sbin/powerd/powerd.c I notice that you didn't use svn merge for this MFC, so there's no tracking of what revs were merged. Was it just everything to date? Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-stable@FreeBSD.ORG Fri Jan 9 23:54:15 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E69DA106564A; Fri, 9 Jan 2009 23:54:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D31B88FC1F; Fri, 9 Jan 2009 23:54:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09NsFGT072643; Fri, 9 Jan 2009 23:54:15 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09NsFvH072638; Fri, 9 Jan 2009 23:54:15 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901092354.n09NsFvH072638@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Jan 2009 23:54:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186985 - in stable/6/lib/bind: dns dns/dns lwres/lwres X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 23:54:16 -0000 Author: dougb Date: Fri Jan 9 23:54:15 2009 New Revision: 186985 URL: http://svn.freebsd.org/changeset/base/186985 Log: Non-functional changes to comments, copyrights, and VCS Ids related to the 9.3.6-P1 import Modified: stable/6/lib/bind/dns/code.h stable/6/lib/bind/dns/dns/enumclass.h stable/6/lib/bind/dns/dns/enumtype.h stable/6/lib/bind/dns/dns/rdatastruct.h stable/6/lib/bind/lwres/lwres/platform.h Modified: stable/6/lib/bind/dns/code.h ============================================================================== --- stable/6/lib/bind/dns/code.h Fri Jan 9 22:35:25 2009 (r186984) +++ stable/6/lib/bind/dns/code.h Fri Jan 9 23:54:15 2009 (r186985) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: stable/6/lib/bind/dns/dns/enumclass.h ============================================================================== --- stable/6/lib/bind/dns/dns/enumclass.h Fri Jan 9 22:35:25 2009 (r186984) +++ stable/6/lib/bind/dns/dns/enumclass.h Fri Jan 9 23:54:15 2009 (r186985) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: stable/6/lib/bind/dns/dns/enumtype.h ============================================================================== --- stable/6/lib/bind/dns/dns/enumtype.h Fri Jan 9 22:35:25 2009 (r186984) +++ stable/6/lib/bind/dns/dns/enumtype.h Fri Jan 9 23:54:15 2009 (r186985) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: stable/6/lib/bind/dns/dns/rdatastruct.h ============================================================================== --- stable/6/lib/bind/dns/dns/rdatastruct.h Fri Jan 9 22:35:25 2009 (r186984) +++ stable/6/lib/bind/dns/dns/rdatastruct.h Fri Jan 9 23:54:15 2009 (r186985) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -1044,10 +1044,10 @@ typedef struct dns_rdata_loc { #endif /* GENERIC_LOC_29_H */ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") - * Copyright (C) 1999-2002 Internet Software Consortium. + * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 1999-2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or 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. * @@ -1063,7 +1063,7 @@ typedef struct dns_rdata_loc { #ifndef GENERIC_NXT_30_H #define GENERIC_NXT_30_H 1 -/* $Id: nxt_30.h,v 1.18.12.3 2004/03/08 09:04:41 marka Exp $ */ +/* $Id: nxt_30.h,v 1.18.12.6 2007/08/28 07:19:15 tbox Exp $ */ /* RFC 2535 */ @@ -1336,10 +1336,10 @@ dns_rdata_opt_current(dns_rdata_opt_t *, #endif /* GENERIC_OPT_41_H */ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") - * Copyright (C) 2002 Internet Software Consortium. + * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2002, 2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or 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. * @@ -1355,7 +1355,7 @@ dns_rdata_opt_current(dns_rdata_opt_t *, #ifndef IN_1_APL_42_H #define IN_1_APL_42_H 1 -/* $Id: apl_42.h,v 1.1.202.3 2004/03/08 09:04:44 marka Exp $ */ +/* $Id: apl_42.h,v 1.1.202.6 2007/08/28 07:19:15 tbox Exp $ */ typedef struct dns_rdata_apl_ent { isc_boolean_t negative; @@ -1499,10 +1499,10 @@ typedef struct dns_rdata_rrsig { #endif /* GENERIC_DNSSIG_46_H */ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or 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. * @@ -1518,9 +1518,10 @@ typedef struct dns_rdata_rrsig { #ifndef GENERIC_NSEC_47_H #define GENERIC_NSEC_47_H 1 -/* $Id: nsec_47.h,v 1.4.2.1 2004/03/08 02:08:03 marka Exp $ */ +/* $Id: nsec_47.h,v 1.4.2.3 2008/07/15 23:45:44 tbox Exp $ */ -/* draft-ietf-dnsext-nsec-rdata-01.txt */ +/*! + * \brief Per RFC 3845 */ typedef struct dns_rdata_nsec { dns_rdatacommon_t common; Modified: stable/6/lib/bind/lwres/lwres/platform.h ============================================================================== --- stable/6/lib/bind/lwres/lwres/platform.h Fri Jan 9 22:35:25 2009 (r186984) +++ stable/6/lib/bind/lwres/lwres/platform.h Fri Jan 9 23:54:15 2009 (r186985) @@ -1,10 +1,10 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") - * Copyright (C) 2000, 2001 Internet Software Consortium. + * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2000, 2001, 2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or 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. * @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: platform.h.in,v 1.12.2.1.10.5 2005/06/08 02:08:32 marka Exp $ */ +/* $Id: platform.h.in,v 1.12.2.1.10.8 2007/08/28 07:19:18 tbox Exp $ */ #ifndef LWRES_PLATFORM_H #define LWRES_PLATFORM_H 1 From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 00:31:12 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 969381065679; Sat, 10 Jan 2009 00:31:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id DE5688FC21; Sat, 10 Jan 2009 00:31:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 231279149; Sat, 10 Jan 2009 01:31:09 +0200 Message-ID: <4967DE41.20109@FreeBSD.org> Date: Sat, 10 Jan 2009 01:31:13 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.17 (X11/20081029) MIME-Version: 1.0 To: Robert Watson References: <200901092210.n09MA7Xb070527@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r186982 - stable/7/usr.sbin/powerd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 00:31:13 -0000 Robert Watson wrote: > > On Fri, 9 Jan 2009, Alexander Motin wrote: > >> Modified: >> stable/7/usr.sbin/powerd/powerd.8 >> stable/7/usr.sbin/powerd/powerd.c > > I notice that you didn't use svn merge for this MFC, so there's no > tracking of what revs were merged. Was it just everything to date? I just copied files completely, so everything is merged now. AFAIK it was decided that merge info is not mandatory before 9.x branching. I'm just not very good with this merge stuff yet. -- Alexander Motin From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 00:40:44 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74F68106566C for ; Sat, 10 Jan 2009 00:40:44 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id ED6168FC0C for ; Sat, 10 Jan 2009 00:40:43 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 5027 invoked by uid 399); 10 Jan 2009 00:14:02 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 10 Jan 2009 00:14:02 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4967E849.8070100@FreeBSD.org> Date: Fri, 09 Jan 2009 16:14:01 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.19 (X11/20090102) MIME-Version: 1.0 To: Alexander Motin References: <200901092210.n09MA7Xb070527@svn.freebsd.org> <4967DE41.20109@FreeBSD.org> In-Reply-To: <4967DE41.20109@FreeBSD.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-stable-7@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r186982 - stable/7/usr.sbin/powerd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 00:40:44 -0000 Alexander Motin wrote: > Robert Watson wrote: >> >> On Fri, 9 Jan 2009, Alexander Motin wrote: >> >>> Modified: >>> stable/7/usr.sbin/powerd/powerd.8 >>> stable/7/usr.sbin/powerd/powerd.c >> >> I notice that you didn't use svn merge for this MFC, so there's no >> tracking of what revs were merged. Was it just everything to date? > > I just copied files completely, so everything is merged now. > > AFAIK it was decided that merge info is not mandatory before 9.x > branching. I'm just not very good with this merge stuff yet. For something like this it's quite simple, just do the merge in usr.sbin/powerd. Let's say you want to merge all the changes starting with r185050: Set REPO to something useful like svn+ssh://svn.freebsd.org/base/ svn merge -r 185050:186476 $REPO/head/usr.sbin/powerd . If you want to cherry-pick individual changes, use for example '-c 185050' instead of the -r option above. And the good news is that it's not too late to record your merge info. Figure out the range of changes that you have incorporated into the latest update, and use -r and the --record only option to merge. hth, Doug -- This .signature sanitized for your protection From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 00:41:31 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E9BB1065670; Sat, 10 Jan 2009 00:41:31 +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 E7D2D8FC16; Sat, 10 Jan 2009 00:41:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A0fUeL074000; Sat, 10 Jan 2009 00:41:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A0fUp3073999; Sat, 10 Jan 2009 00:41:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901100041.n0A0fUp3073999@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Jan 2009 00:41:30 +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: r186991 - stable/7/usr.sbin/powerd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 00:41:31 -0000 Author: mav Date: Sat Jan 10 00:41:30 2009 New Revision: 186991 URL: http://svn.freebsd.org/changeset/base/186991 Log: Mark that powerd is completely merged. Modified: stable/7/usr.sbin/powerd/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 01:22:24 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56A1B106564A; Sat, 10 Jan 2009 01:22:24 +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 2ACAE8FC08; Sat, 10 Jan 2009 01:22:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A1MOIQ075372; Sat, 10 Jan 2009 01:22:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A1MOhc075371; Sat, 10 Jan 2009 01:22:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901100122.n0A1MOhc075371@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Jan 2009 01:22:24 +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: r186992 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 01:22:25 -0000 Author: mav Date: Sat Jan 10 01:22:23 2009 New Revision: 186992 URL: http://svn.freebsd.org/changeset/base/186992 Log: Mark all snd_hda commits up to 186511 as merged. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 03:00:22 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40B8B106564A; Sat, 10 Jan 2009 03:00:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 294D48FC19; Sat, 10 Jan 2009 03:00:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A30MXi077531; Sat, 10 Jan 2009 03:00:22 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A30M5b077529; Sat, 10 Jan 2009 03:00:22 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901100300.n0A30M5b077529@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Jan 2009 03:00:22 +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: r186996 - in stable/7/contrib/bind9: . bin/check bin/dig bin/dnssec bin/named bin/named/include/named bin/named/unix bin/named/unix/include/named bin/nsupdate bin/rndc doc/arm doc/misc ... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 03:00:23 -0000 Author: dougb Date: Sat Jan 10 03:00:21 2009 New Revision: 186996 URL: http://svn.freebsd.org/changeset/base/186996 Log: MFC the BIND 9.4.3 and 9.4.3-P1 updates Added: stable/7/contrib/bind9/aclocal.m4 - copied unchanged from r186462, head/contrib/bind9/aclocal.m4 stable/7/contrib/bind9/bin/nsupdate/nsupdate.1 - copied unchanged from r186462, head/contrib/bind9/bin/nsupdate/nsupdate.1 stable/7/contrib/bind9/config.h.in - copied unchanged from r186462, head/contrib/bind9/config.h.in stable/7/contrib/bind9/doc/misc/sort-options.pl - copied unchanged from r186462, head/contrib/bind9/doc/misc/sort-options.pl stable/7/contrib/bind9/doc/rfc/rfc4648.txt - copied unchanged from r186462, head/contrib/bind9/doc/rfc/rfc4648.txt stable/7/contrib/bind9/doc/rfc/rfc4701.txt - copied unchanged from r186462, head/contrib/bind9/doc/rfc/rfc4701.txt stable/7/contrib/bind9/doc/rfc/rfc5155.txt - copied unchanged from r186462, head/contrib/bind9/doc/rfc/rfc5155.txt stable/7/contrib/bind9/lib/bind/aclocal.m4 - copied unchanged from r186462, head/contrib/bind9/lib/bind/aclocal.m4 stable/7/contrib/bind9/lib/bind/config.h.in - copied unchanged from r186462, head/contrib/bind9/lib/bind/config.h.in stable/7/contrib/bind9/lib/bind/include/isc/platform.h.in - copied unchanged from r186462, head/contrib/bind9/lib/bind/include/isc/platform.h.in stable/7/contrib/bind9/lib/isc/include/isc/portset.h - copied unchanged from r186462, head/contrib/bind9/lib/isc/include/isc/portset.h stable/7/contrib/bind9/lib/isc/portset.c - copied unchanged from r186462, head/contrib/bind9/lib/isc/portset.c Deleted: stable/7/contrib/bind9/bin/nsupdate/nsupdate.8 Modified: stable/7/contrib/bind9/ (props changed) stable/7/contrib/bind9/CHANGES stable/7/contrib/bind9/COPYRIGHT stable/7/contrib/bind9/FAQ stable/7/contrib/bind9/FAQ.xml stable/7/contrib/bind9/README stable/7/contrib/bind9/bin/check/check-tool.c stable/7/contrib/bind9/bin/check/named-checkconf.c stable/7/contrib/bind9/bin/check/named-checkzone.c stable/7/contrib/bind9/bin/dig/dig.1 stable/7/contrib/bind9/bin/dig/dig.c stable/7/contrib/bind9/bin/dig/dig.docbook stable/7/contrib/bind9/bin/dig/dig.html stable/7/contrib/bind9/bin/dig/dighost.c stable/7/contrib/bind9/bin/dig/host.1 stable/7/contrib/bind9/bin/dig/host.docbook stable/7/contrib/bind9/bin/dig/host.html stable/7/contrib/bind9/bin/dnssec/dnssec-keygen.8 stable/7/contrib/bind9/bin/dnssec/dnssec-keygen.docbook stable/7/contrib/bind9/bin/dnssec/dnssec-keygen.html stable/7/contrib/bind9/bin/dnssec/dnssec-signzone.8 stable/7/contrib/bind9/bin/dnssec/dnssec-signzone.c stable/7/contrib/bind9/bin/dnssec/dnssec-signzone.docbook stable/7/contrib/bind9/bin/dnssec/dnssec-signzone.html stable/7/contrib/bind9/bin/named/client.c stable/7/contrib/bind9/bin/named/config.c stable/7/contrib/bind9/bin/named/controlconf.c stable/7/contrib/bind9/bin/named/include/named/globals.h stable/7/contrib/bind9/bin/named/interfacemgr.c stable/7/contrib/bind9/bin/named/lwaddr.c stable/7/contrib/bind9/bin/named/lwdgnba.c stable/7/contrib/bind9/bin/named/lwdnoop.c stable/7/contrib/bind9/bin/named/lwresd.8 stable/7/contrib/bind9/bin/named/lwresd.c stable/7/contrib/bind9/bin/named/lwresd.docbook stable/7/contrib/bind9/bin/named/lwresd.html stable/7/contrib/bind9/bin/named/main.c stable/7/contrib/bind9/bin/named/named.8 stable/7/contrib/bind9/bin/named/named.conf.5 stable/7/contrib/bind9/bin/named/named.conf.docbook stable/7/contrib/bind9/bin/named/named.conf.html stable/7/contrib/bind9/bin/named/named.docbook stable/7/contrib/bind9/bin/named/named.html stable/7/contrib/bind9/bin/named/query.c stable/7/contrib/bind9/bin/named/server.c stable/7/contrib/bind9/bin/named/unix/include/named/os.h stable/7/contrib/bind9/bin/named/unix/os.c stable/7/contrib/bind9/bin/named/update.c stable/7/contrib/bind9/bin/nsupdate/Makefile.in stable/7/contrib/bind9/bin/nsupdate/nsupdate.c stable/7/contrib/bind9/bin/nsupdate/nsupdate.docbook stable/7/contrib/bind9/bin/nsupdate/nsupdate.html stable/7/contrib/bind9/bin/rndc/rndc-confgen.c stable/7/contrib/bind9/bin/rndc/rndc.8 stable/7/contrib/bind9/bin/rndc/rndc.c stable/7/contrib/bind9/bin/rndc/rndc.docbook stable/7/contrib/bind9/bin/rndc/rndc.html stable/7/contrib/bind9/configure.in stable/7/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/7/contrib/bind9/doc/arm/Bv9ARM.ch01.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch02.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch03.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch05.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch10.html stable/7/contrib/bind9/doc/arm/Bv9ARM.html stable/7/contrib/bind9/doc/arm/Bv9ARM.pdf stable/7/contrib/bind9/doc/arm/man.dig.html stable/7/contrib/bind9/doc/arm/man.dnssec-keygen.html stable/7/contrib/bind9/doc/arm/man.dnssec-signzone.html stable/7/contrib/bind9/doc/arm/man.host.html stable/7/contrib/bind9/doc/arm/man.named-checkconf.html stable/7/contrib/bind9/doc/arm/man.named-checkzone.html stable/7/contrib/bind9/doc/arm/man.named.html stable/7/contrib/bind9/doc/arm/man.rndc-confgen.html stable/7/contrib/bind9/doc/arm/man.rndc.conf.html stable/7/contrib/bind9/doc/arm/man.rndc.html stable/7/contrib/bind9/doc/misc/Makefile.in stable/7/contrib/bind9/doc/misc/format-options.pl stable/7/contrib/bind9/doc/misc/migration stable/7/contrib/bind9/doc/misc/options stable/7/contrib/bind9/doc/rfc/index stable/7/contrib/bind9/lib/bind/api stable/7/contrib/bind9/lib/bind/bsd/Makefile.in stable/7/contrib/bind9/lib/bind/bsd/strerror.c stable/7/contrib/bind9/lib/bind/bsd/strtoul.c stable/7/contrib/bind9/lib/bind/configure.in stable/7/contrib/bind9/lib/bind/dst/Makefile.in stable/7/contrib/bind9/lib/bind/dst/dst_api.c stable/7/contrib/bind9/lib/bind/dst/hmac_link.c stable/7/contrib/bind9/lib/bind/dst/support.c stable/7/contrib/bind9/lib/bind/include/Makefile.in stable/7/contrib/bind9/lib/bind/include/arpa/nameser.h stable/7/contrib/bind9/lib/bind/include/isc/assertions.h stable/7/contrib/bind9/lib/bind/include/isc/eventlib.h stable/7/contrib/bind9/lib/bind/include/isc/misc.h stable/7/contrib/bind9/lib/bind/include/netdb.h stable/7/contrib/bind9/lib/bind/include/resolv.h stable/7/contrib/bind9/lib/bind/inet/Makefile.in stable/7/contrib/bind9/lib/bind/inet/inet_net_pton.c stable/7/contrib/bind9/lib/bind/inet/inet_network.c stable/7/contrib/bind9/lib/bind/irs/Makefile.in stable/7/contrib/bind9/lib/bind/irs/dns_ho.c stable/7/contrib/bind9/lib/bind/irs/getnetgrent.c stable/7/contrib/bind9/lib/bind/irs/getnetgrent_r.c stable/7/contrib/bind9/lib/bind/irs/irp.c stable/7/contrib/bind9/lib/bind/isc/Makefile.in stable/7/contrib/bind9/lib/bind/isc/assertions.c stable/7/contrib/bind9/lib/bind/isc/bitncmp.c stable/7/contrib/bind9/lib/bind/isc/ctl_clnt.c stable/7/contrib/bind9/lib/bind/isc/ctl_srvr.c stable/7/contrib/bind9/lib/bind/isc/logging.c stable/7/contrib/bind9/lib/bind/nameser/Makefile.in stable/7/contrib/bind9/lib/bind/port_after.h.in stable/7/contrib/bind9/lib/bind/port_before.h.in stable/7/contrib/bind9/lib/bind/resolv/Makefile.in stable/7/contrib/bind9/lib/bind/resolv/res_debug.c stable/7/contrib/bind9/lib/bind/resolv/res_mkquery.c stable/7/contrib/bind9/lib/bind/resolv/res_query.c stable/7/contrib/bind9/lib/bind/resolv/res_send.c stable/7/contrib/bind9/lib/bind9/api stable/7/contrib/bind9/lib/bind9/check.c stable/7/contrib/bind9/lib/dns/acache.c stable/7/contrib/bind9/lib/dns/adb.c stable/7/contrib/bind9/lib/dns/api stable/7/contrib/bind9/lib/dns/cache.c stable/7/contrib/bind9/lib/dns/dispatch.c stable/7/contrib/bind9/lib/dns/dst_parse.c stable/7/contrib/bind9/lib/dns/dst_parse.h stable/7/contrib/bind9/lib/dns/include/dns/dispatch.h stable/7/contrib/bind9/lib/dns/journal.c stable/7/contrib/bind9/lib/dns/master.c stable/7/contrib/bind9/lib/dns/masterdump.c stable/7/contrib/bind9/lib/dns/message.c stable/7/contrib/bind9/lib/dns/openssldsa_link.c stable/7/contrib/bind9/lib/dns/opensslrsa_link.c stable/7/contrib/bind9/lib/dns/rbt.c stable/7/contrib/bind9/lib/dns/rbtdb.c stable/7/contrib/bind9/lib/dns/rdata/generic/nsec_47.c stable/7/contrib/bind9/lib/dns/rdata/generic/nsec_47.h stable/7/contrib/bind9/lib/dns/rdata/generic/txt_16.c stable/7/contrib/bind9/lib/dns/rdata/in_1/apl_42.c stable/7/contrib/bind9/lib/dns/rdata/in_1/naptr_35.c stable/7/contrib/bind9/lib/dns/request.c stable/7/contrib/bind9/lib/dns/resolver.c stable/7/contrib/bind9/lib/dns/rootns.c stable/7/contrib/bind9/lib/dns/sdb.c stable/7/contrib/bind9/lib/dns/tkey.c stable/7/contrib/bind9/lib/dns/tsig.c stable/7/contrib/bind9/lib/dns/validator.c stable/7/contrib/bind9/lib/dns/view.c stable/7/contrib/bind9/lib/dns/xfrin.c stable/7/contrib/bind9/lib/dns/zone.c stable/7/contrib/bind9/lib/isc/Makefile.in stable/7/contrib/bind9/lib/isc/api stable/7/contrib/bind9/lib/isc/assertions.c stable/7/contrib/bind9/lib/isc/include/isc/assertions.h stable/7/contrib/bind9/lib/isc/include/isc/lex.h stable/7/contrib/bind9/lib/isc/include/isc/mem.h stable/7/contrib/bind9/lib/isc/include/isc/msgs.h stable/7/contrib/bind9/lib/isc/include/isc/platform.h.in stable/7/contrib/bind9/lib/isc/include/isc/resource.h stable/7/contrib/bind9/lib/isc/include/isc/socket.h stable/7/contrib/bind9/lib/isc/include/isc/timer.h stable/7/contrib/bind9/lib/isc/include/isc/types.h stable/7/contrib/bind9/lib/isc/mem.c stable/7/contrib/bind9/lib/isc/print.c stable/7/contrib/bind9/lib/isc/pthreads/mutex.c stable/7/contrib/bind9/lib/isc/timer.c stable/7/contrib/bind9/lib/isc/unix/app.c stable/7/contrib/bind9/lib/isc/unix/include/isc/net.h stable/7/contrib/bind9/lib/isc/unix/net.c stable/7/contrib/bind9/lib/isc/unix/resource.c stable/7/contrib/bind9/lib/isc/unix/socket.c stable/7/contrib/bind9/lib/isc/unix/socket_p.h stable/7/contrib/bind9/lib/isc/unix/time.c stable/7/contrib/bind9/lib/isccfg/api stable/7/contrib/bind9/lib/isccfg/namedconf.c stable/7/contrib/bind9/lib/lwres/api stable/7/contrib/bind9/make/rules.in stable/7/contrib/bind9/version Modified: stable/7/contrib/bind9/CHANGES ============================================================================== --- stable/7/contrib/bind9/CHANGES Sat Jan 10 02:33:31 2009 (r186995) +++ stable/7/contrib/bind9/CHANGES Sat Jan 10 03:00:21 2009 (r186996) @@ -1,14 +1,166 @@ - --- 9.4.2-P2 released --- + --- 9.4.3-P1 released --- -2406. [bug] Some operating systems have FD_SETSIZE set to a - low value by default, which can cause resource - exhaustion when many simultaneous connections are - open. Linux in particular makes it difficult to - increase this value. To use more sockets with - select(), set ISC_SOCKET_FDSETSIZE. Example: - STD_CDEFINES="-DISC_SOCKET_FDSETSIZE=4096" ./configure - (This should not be necessary in most cases, and - never for an authoritative-only server.) [RT #18328] +2522. [security] Handle -1 from DSA_do_verify(). + +2498. [bug] Removed a bogus function argument used with + ISC_SOCKET_USE_POLLWATCH: it could cause compiler + warning or crash named with the debug 1 level + of logging. [RT #18917] + + --- 9.4.3 released --- + +2490. [port] aix: work around a kernel bug where IPV6_RECVPKTINFO + is cleared when IPV6_V6ONLY is set. [RT #18785] + +2489. [port] solaris: Workaround Solaris's kernel bug about + /dev/poll: + http://bugs.opensolaris.org/view_bug.do?bug_id=6724237 + Define ISC_SOCKET_USE_POLLWATCH at build time to enable + this workaround. [RT #18870] + + --- 9.4.3rc1 released --- + +2473. [port] linux: raise the limit on open files to the possible + maximum value before spawning threads; 'files' + specified in named.conf doesn't seem to work with + threads as expected. [RT #18784] + +2472. [port] linux: check the number of available cpu's before + calling chroot as it depends on "/proc". [RT #16923] + +2471. [bug] named-checkzone was not reporting missing manditory + glue when sibling checks were disabled. [RT #18768] + +2469. [port] solaris: Work around Solaris's select() limitations. + [RT #18769] + +2468. [bug] Resolver could try unreachable servers multiple times. + [RT #18739] + +2467. [bug] Failure of fcntl(F_DUPFD) wasn't logged. [RT #18740] + +2466. [doc] ARM: explain max-cache-ttl 0 SERVFAIL issue. + [RT #18302] + +2465. [bug] Adb's handling of lame addresses was different + for IPv4 and IPv6. [RT #18738] + +2463. [port] linux: POSIX doesn't include the IPv6 Advanced Socket + API and glibc hides parts of the IPv6 Advanced Socket + API as a result. This is stupid as it breaks how the + two halves (Basic and Advanced) of the IPv6 Socket API were designed to be used but we have to live with it. + Define _GNU_SOURCE to pull in the IPv6 Advanced Socket + API. [RT #18388] + +2462. [doc] Document -m (enable memory usage debugging) + option for dig. [RT #18757] + +2461. [port] sunos: Change #2363 was not complete. [RT #17513] + +2458. [doc] ARM: update and correction for max-cache-size. + [RT #18294] + +2455. [bug] Stop metadata being transfered via axfr/ixfr. + [RT #18639] + +2453. [bug] Remove NULL pointer dereference in dns_journal_print(). + [RT #18316] + +2449. [bug] libbind: Out of bounds reference in dns_ho.c:addrsort. + [RT #18044] + +2445. [doc] ARM out-of-date on empty reverse zones (list includes + RFC1918 address, but these are not yet compiled in). + [RT #18578] + +2444. [port] Linux, FreeBSD, AIX: Turn off path mtu discovery + (clear DF) for UDP responses and requests. + + --- 9.4.3b3 released --- + +2443. [bug] win32: UDP connect() would not generate an event, + and so connected UDP sockets would never clean up. + Fix this by doing an immediate WSAConnect() rather + than an io completion port type for UDP. + +2438. [bug] Timeouts could be logged incorrectly under win32. + [RT #18617] + +2437. [bug] Sockets could be closed too early, leading to + inconsistent states in the socket module. [RT #18298] + +2436. [security] win32: UDP client handler can be shutdown. [RT #18576] + +2433. [tuning] Set initial timeout to 800ms. + +2432. [bug] More Windows socket handling improvements. Stop + using I/O events and use IO Completion Ports + throughout. Rewrite the receive path logic to make + it easier to support multiple simultaneous + requestrs in the future. Add stricter consistency + checking as a compile-time option (define + ISC_SOCKET_CONSISTENCY_CHECKS; defaults to off). + +2430. [bug] win32: isc_interval_set() could round down to + zero if the input was less than NS_INTERVAL + nanoseconds. Round up instead. [RT #18549] + +2429. [doc] nsupdate should be in section 1 of the man pages. + [RT #18283] + +2426. [bug] libbind: inet_net_pton() can sometimes return the + wrong value if excessively large netmasks are + supplied. [RT #18512] + +2425. [bug] named didn't detect unavailable query source addresses + at load time. [RT #18536] + +2424. [port] configure now probes for a working epoll + implementation. Allow the use of kqueue, + epoll and /dev/poll to be selected at compile + time. [RT #18277] + +2422. [bug] Handle the special return value of a empty node as + if it was a NXRRSET in the validator. [RT #18447] + +2421. [func] Add new command line option '-S' for named to specify + the max number of sockets. [RT #18493] + Use caution: this option may not work for some + operating systems without rebuilding named. + +2420. [bug] Windows socket handling cleanup. Let the io + completion event send out cancelled read/write + done events, which keeps us from writing to memeory + we no longer have ownership of. Add debugging + socket_log() function. Rework TCP socket handling + to not leak sockets. + +2417. [bug] Connecting UDP sockets for outgoing queries could + unexpectedly fail with an 'address already in use' + error. [RT #18411] + +2416. [func] Log file descriptors that cause exceeding the + internal maximum. [RT #18460] + +2414. [bug] A masterdump context held the database lock too long, + causing various troubles such as dead lock and + recursive lock acquisition. [RT #18311, #18456] + +2413. [bug] Fixed an unreachable code path in socket.c. [RT #18442] + +2412. [bug] win32: address a resourse leak. [RT #18374] + +2411. [bug] Allow using a larger number of sockets than FD_SETSIZE + for select(). To enable this, set ISC_SOCKET_MAXSOCKETS + at compilation time. [RT #18433] + +2410. [bug] Correctly delete m_versionInfo. [RT #18432] + +2408. [bug] A duplicate TCP dispatch event could be sent, which + could then trigger an assertion failure in + resquery_response(). [RT #18275] + +2407. [port] hpux: test for sys/dyntune.h. [RT #18421] 2404. [port] hpux: files unlimited support. @@ -39,15 +191,271 @@ 2392. [bug] remove 'grep -q' from acl test script, some platforms don't support it. [RT #18253] +2391 [port] hpux: cover additional recvmsg() error codes. + [RT #18301] + +2390 [bug] dispatch.c could make a false warning on 'odd socket'. + [RT #18301]. + +2389 [bug] Move the "working directory writable" check to after + the ns_os_changeuser() call. [RT #18326] + +2386. [func] Add warning about too small 'open files' limit. + [RT #18269] + + --- 9.4.3b2 released --- + +2385. [bug] A condition variable in socket.c could leak in + rare error handling [RT #17968]. + +2384. [security] Additional support for query port randomization (change + #2375) including performance improvement and port range + specification. [RT #17949, #18098] + +2383. [bug] named could double queries when they resulted in + SERVFAIL due to overkilling EDNS0 failure detection. + [RT #18182] + +2382. [doc] Add descriptions of IPSECKEY, SPF and SSHFP to ARM. + +2381. [port] dlz/mysql: support multiple install layouts for + mysql. /include/{,mysql/}mysql.h and + /lib/{,mysql/}. [RT #18152] + +2380. [bug] dns_view_find() was not returning NXDOMAIN/NXRRSET + proofs which, in turn, caused validation failures + for insecure zones immediately below a secure zone + the server was authoritative for. [RT #18112] + +2379. [contrib] queryperf/gen-data-queryperf.py: removed redundant + TLDs and supported RRs with TTLs [RT #17972] + +2377. [bug] Address race condition in dnssec-signzone. [RT #18142] + +2376. [bug] Change #2144 was not complete. + +2375. [security] Fully randomize UDP query ports to improve + forgery resilience. [RT #17949] + +2372. [bug] fixed incorrect TAG_HMACSHA256_BITS value [RT #18047] + +2369. [bug] libbind: Array bounds overrun on read in bitncmp(). + [RT #18054] + +2364. [bug] named could trigger a assertion when serving a + malformed signed zone. [RT #17828] + +2363. [port] sunos: pre-set "lt_cv_sys_max_cmd_len=4096;". + [RT #17513] + +2361. [bug] "recursion" statistics counter could be counted + multiple times for a single query. [RT #17990] + + --- 9.4.3b1 released --- + +2358. [doc] Update host's default query description. [RT #17934] + +2356. [bug] Built in mutex profiler was not scalable enough. + [RT #17436] + +2353. [func] libbind: nsid support. [RT #17091] + +2350. [port] win32: IPv6 support. [RT #17797] + +2347. [bug] Delete now traverses the RB tree in the canonical + order. [RT #17451] + +2345. [bug] named-checkconf failed to detect when forwarders + were set at both the options/view level and in + a root zone. [RT #17671] + +2344. [bug] Improve "logging{ file ...; };" documentation. + [RT #17888] + +2343. [bug] (Seemingly) duplicate IPv6 entries could be + created in ADB. [RT #17837] + +2341. [bug] libbind: add missing -I../include for off source + tree builds. [RT #17606] + +2340. [port] openbsd: interface configuration. [RT #17700] + +2339. [port] tru64: support for libbind. [RT #17589] + +2338. [bug] check_ds() could be called with a non DS rdataset. + [RT #17598] + +2337. [bug] BUILD_LDFLAGS was not being correctly set. [RT #17614] + +2335. [port] sunos: libbind and *printf() support for long long. + [RT #17513] + +2334. [bug] Bad REQUIRES in fromstruct_in_naptr(), off by one + bug in fromstruct_txt(). [RT #17609] + +2333. [bug] Fix off by one error in isc_time_nowplusinterval(). + [RT #17608] + +2332. [contrib] query-loc-0.4.0. [RT #17602] + +2331. [bug] Failure to regenerate any signatures was not being + reported nor being past back to the UPDATE client. + [RT #17570] + +2330. [bug] Remove potential race condition when handling + over memory events. [RT #17572] + + WARNING: API CHANGE: over memory callback + function now needs to call isc_mem_waterack(). + See for details. + +2329. [bug] Clearer help text for dig's '-x' and '-i' options. + +2328. [maint] Add AAAA addresses for A.ROOT-SERVERS.NET, + F.ROOT-SERVERS.NET, H.ROOT-SERVERS.NET, + J.ROOT-SERVERS.NET, K.ROOT-SERVERS.NET and + M.ROOT-SERVERS.NET. + +2326. [bug] It was possible to trigger a INSIST in the acache + processing. + +2325. [port] Linux: use capset() function if available. [RT #17557] + +2323. [port] tru64: namespace clash. [RT #17547] + 2322. [port] MacOS: work around the limitation of setrlimit() for RLIMIT_NOFILE. [RT #17526] - --- 9.4.2-P1 released --- +2319. [bug] Silence Coverity warnings in + lib/dns/rdata/in_1/apl_42.c. [RT #17469] -2375. [security] Fully randomize UDP query ports to improve - forgery resilience. [RT #17949] +2318. [port] sunos fixes for libbind. [RT #17514] + +2314. [bug] Uninitialized memory use on error path in + bin/named/lwdnoop.c. [RT #17476] + +2313. [cleanup] Silence Coverity warnings. Handle private stacks. + [RT #17447] [RT #17478] + +2312. [cleanup] Silence Coverity warning in lib/isc/unix/socket.c. + [RT #17458] + +2311. [func] Update ACL regression test. [RT #17462] + +2310. [bug] dig, host, nslookup: flush stdout before emitting + debug/fatal messages. [RT #17501] + +2308. [cleanup] Silence Coverity warning in bin/named/controlconf.c. + [RT #17495] + +2307. [bug] Remove infinite loop from lib/dns/sdb.c. [RT #17496] + +2306. [bug] Remove potential race from lib/dns/resolver.c. + [RT #17470] + +2305. [security] inet_network() buffer overflow. CVE-2008-0122. + +2304. [bug] Check returns from all dns_rdata_tostruct() calls. + [RT #17460] + +2303. [bug] Remove unnecessary code from bin/named/lwdgnba.c. + [RT #17471] + +2302. [bug] Fix memset() calls in lib/tests/t_api.c. [RT #17472] + +2301. [bug] Remove resource leak and fix error messages in + bin/tests/system/lwresd/lwtest.c. [RT #17474] + +2300. [bug] Fixed failure to close open file in + bin/tests/names/t_names.c. [RT #17473] + +2299. [bug] Remove unnecessary NULL check in + bin/nsupdate/nsupdate.c. [RT #17475] + +2298. [bug] isc_mutex_lock() failure not caught in + bin/tests/timers/t_timers.c. [RT #17468] + +2297. [bug] isc_entropy_createfilesource() failure not caught in + bin/tests/dst/t_dst.c. [RT #17467] + +2296. [port] Allow docbook stylesheet location to be specified to + configure. [RT #17457] + +2295. [bug] Silence static overrun error in bin/named/lwaddr.c. + [RT #17459] + +2293. [func] Add ACL regression test. [RT #17375] + +2292. [bug] Log if the working directory is not writable. + [RT #17312] + +2291. [bug] PR_SET_DUMPABLE may be set too late. Also report + failure to set PR_SET_DUMPABLE. [RT #17312] + +2290. [bug] Let AD in the query signal that the client wants AD + set in the response. [RT #17301] + +2288. [port] win32: mark service as running when we have finished + loading. [RT #17441] + +2287. [bug] Use 'volatile' if the compiler supports it. [RT #17413] + +2284. [bug] Memory leak in UPDATE prerequisite processing. + [RT #17377] + +2283. [bug] TSIG keys were not attaching to the memory + context. TSIG keys should use the rings + memory context rather than the clients memory + context. [RT #17377] + +2279. [bug] Use setsockopt(SO_NOSIGPIPE), when available, + to protect applications from receiving spurious + SIGPIPE signals when using the resolver. + +2278. [bug] win32: handle the case where Windows returns no + search list or DNS suffix. [RT #17354] + +2277. [bug] Empty zone names were not correctly being caught at + in the post parse checks. [RT #17357] + +2273. [bug] Adjust log level to WARNING when saving inconsistent + stub/slave master and journal files. [RT# 17279] + +2272. [bug] Handle illegal dnssec-lookaside trust-anchor names. + [RT #17262] + +2270. [bug] dns_db_closeversion() version->writer could be reset + before it is tested. [RT #17290] + +2269. [contrib] dbus memory leaks and missing va_end calls. [RT #17232] + +2268. [bug] 0.IN-ADDR.ARPA was missing from the empty zones + list. + +2266. [bug] client.c:get_clientmctx() returned the same mctx + once the pool of mctx's was filled. [RT #17218] + +2265. [bug] Test that the memory context's basic_table is non NULL + before freeing. [RT #17265] + +2264. [bug] Server prefix length was being ignored. [RT #17308] + +2263. [bug] "named-checkconf -z" failed to set default value + for "check-integrity". [RT #17306] + +2262. [bug] Error status from all but the last view could be + lost. [RT #17292] + +2260. [bug] Reported wrong clients-per-query when increasing the + value. [RT #17236] + +2247. [doc] Sort doc/misc/options. [RT #17067] + +2246. [bug] Make the startup of test servers (ans.pl) more + robust. [RT #17147] --- 9.4.2 released --- + --- 9.4.2rc2 released --- 2259. [bug] Reverse incorrect LIBINTERFACE bump of libisc @@ -63,7 +471,7 @@ 2256. [bug] win32: Correctly register the installation location of bindevt.dll. [RT #17159] -2255. [bug] L.ROOT-SERVERS.NET is now 199.7.83.42. +2255. [maint] L.ROOT-SERVERS.NET is now 199.7.83.42. 2254. [bug] timer.c:dispatch() failed to lock timer->lock when reading timer->idle allowing it to see @@ -76,16 +484,16 @@ reality. Note there is behaviour change for BIND 9.5. [RT #17113] -2249. [bug] Only set Authentic Data bit if client requested +2249. [bug] Only set Authentic Data bit if client requested DNSSEC, per RFC 3655 [RT #17175] -2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] +2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] 2245. [bug] Validating lack of DS records at trust anchors wasn't working. [RT #17151] 2238. [bug] It was possible to trigger a REQUIRE when a - validation was cancelled. [RT #17106] + validation was canceled. [RT #17106] 2237. [bug] libbind: res_init() was not thread aware. [RT #17123] @@ -94,8 +502,8 @@ 2235. [bug] was not being installed. [RT #17135] -2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] - +2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] + 2232. [bug] dns_adb_findaddrinfo() could fail and return ISC_R_SUCCESS. [RT #17137] @@ -110,7 +518,7 @@ 2227. [cleanup] Tidied up the FAQ. [RT #17121] 2225. [bug] More support for systems with no IPv4 addresses. - [RT #17111] + [RT #17111] 2224. [bug] Defer journal compaction if a xfrin is in progress. [RT #17119] @@ -124,15 +532,15 @@ 2220. [bug] win32: Address a race condition in final shutdown of the Windows socket code. [RT #17028] - -2219. [bug] Apply zone consistancy checks to additions, not + +2219. [bug] Apply zone consistency checks to additions, not removals, when updating. [RT #17049] 2218. [bug] Remove unnecessary REQUIRE from dns_validator_create(). [RT #16976] 2216. [cleanup] Fix a number of errors reported by Coverity. - [RT #17094] + [RT #17094] 2215. [bug] Bad REQUIRE check isc_hmacsha1_verify(). [RT #17094] @@ -175,13 +583,13 @@ localhost;) is used. [RT #16987] - + 2205. [bug] libbind: change #2119 broke thread support. [RT #16982] 2203. [security] Query id generation was cryptographically weak. [RT # 16915] -2202. [security] The default acls for allow-query-cache and +2202. [security] The default acls for allow-query-cache and allow-recursion were not being applied. [RT #16960] 2200. [bug] The search for cached NSEC records was stopping to @@ -216,7 +624,7 @@ 2187. [bug] query_addds(), query_addwildcardproof() and query_addnxrrsetnsec() should take a version - arguement. [RT #16368] + argument. [RT #16368] 2186. [port] cygwin: libbind: check for struct sockaddr_storage independently of IPv6. [RT #16482] @@ -243,7 +651,7 @@ debug level 10+. [RT #16798] 2176. [contrib] dbus update to handle race condition during - initialisation (Bugzilla 235809). [RT #16842] + initialization (Bugzilla 235809). [RT #16842] 2175. [bug] win32: windows broadcast condition variable support was broken. [RT #16592] @@ -274,7 +682,7 @@ a server address as a name to be looked up, causing unexpected output. [RT #16743] -2164. [bug] The code to determine how named-checkzone / +2164. [bug] The code to determine how named-checkzone / named-compilezone was called failed under windows. [RT #16764] @@ -288,7 +696,7 @@ 2159. [bug] Array bounds overrun in acache processing. [RT #16710] -2158. [bug] ns_client_isself() failed to initialise key +2158. [bug] ns_client_isself() failed to initialize key leading to a REQUIRE failure. [RT #16688] 2156. [bug] Fix node reference leaks in lookup.c:lookup_find(), @@ -363,7 +771,7 @@ 2136. [bug] nslookup/host looped if there was no search list and the host didn't exist. [RT #16657] -2135. [bug] Uninitialised rdataset in sdlz.c. [RT# 16656] +2135. [bug] Uninitialized rdataset in sdlz.c. [RT# 16656] 2133. [port] powerpc: Support both IBM and MacOS Power PC assembler syntaxes. [RT #16647] @@ -379,7 +787,7 @@ 2127. [port] Improved OpenSSL 0.9.8 support. [RT #16563] -2126. [security] Serialise validation of type ANY responses. [RT #16555] +2126. [security] Serialize validation of type ANY responses. [RT #16555] 2125. [bug] dns_zone_getzeronosoattl() REQUIRE failure if DLZ was defined. [RT #16574] @@ -419,7 +827,7 @@ 2111. [bug] Fix a number of errors reported by Coverity. [RT #16507] -2110. [bug] "minimal-response yes;" interacted badly with BIND 8 +2110. [bug] "minimal-responses yes;" interacted badly with BIND 8 priming queries. [RT #16491] 2109. [port] libbind: silence aix 5.3 compiler warnings. [RT #16502] @@ -431,7 +839,7 @@ 2103. [port] Add /usr/sfw to list of locations for OpenSSL under Solaris. -2102. [port] Silence solaris 10 warnings. +2102. [port] Silence Solaris 10 warnings. --- 9.4.0b4 released --- @@ -441,7 +849,7 @@ 2100. [port] win32: copy libeay32.dll to Build\Debug. Copy Debug\named-checkzone to Debug\named-compilezone. -2099. [port] win32: more manifiest issues. +2099. [port] win32: more manifest issues. 2098. [bug] Race in rbtdb.c:no_references(), which occasionally triggered an INSIST failure about the node lock @@ -457,14 +865,14 @@ 2095. [port] libbind: alway prototype inet_cidr_ntop_ipv6() and net_cidr_ntop_ipv6(). [RT #16388] - + 2094. [contrib] Update named-bootconf. [RT# 16404] 2093. [bug] named-checkzone -s was broken. 2092. [bug] win32: dig, host, nslookup. Use registry config if resolv.conf does not exist or no nameservers - listed. [RT #15877] + listed. [RT #15877] 2091. [port] dighost.c: race condition on cleanup. [RT #16417] @@ -507,7 +915,7 @@ 2078. [bug] dnssec-checkzone output style "default" was badly named. It is now called "relative". [RT #16326] -2077. [bug] 'dnssec-signzone -O raw' wasn't outputing the +2077. [bug] 'dnssec-signzone -O raw' wasn't outputting the complete signed zone. [RT #16326] 2076. [bug] Several files were missing #include @@ -592,7 +1000,7 @@ [RT #16287] 2049. [bug] Restore SOA before AXFR when falling back from - a attempted IXFR when transfering in a zone. + a attempted IXFR when transferring in a zone. Allow a initial SOA query before attempting a AXFR to be requested. [RT #16156] @@ -601,7 +1009,7 @@ the OS always returned the same local port. [RT #16182] -2047. [bug] Failed to initialise the interface flags to zero. +2047. [bug] Failed to initialize the interface flags to zero. [RT #16245] 2046. [bug] rbtdb.c:rdataset_setadditional() could cause duplicate @@ -641,7 +1049,7 @@ 2034. [bug] gcc: set -fno-strict-aliasing. [RT #16124] -2033. [bug] We wern't creating multiple client memory contexts +2033. [bug] We weren't creating multiple client memory contexts on demand as expected. [RT #16095] --- 9.4.0a6 released --- @@ -657,7 +1065,7 @@ 2029. [bug] host printed out the server multiple times when specified on the command line. [RT #15992] -2028. [port] linux: socket.c compatability for old systems. +2028. [port] linux: socket.c compatibility for old systems. [RT #16015] 2027. [port] libbind: Solaris x86 support. [RT #16020] @@ -667,7 +1075,7 @@ 2025. [func] Update "zone serial unchanged" message. [RT #16026] -2024. [bug] named emited spurious "zone serial unchanged" +2024. [bug] named emitted spurious "zone serial unchanged" messages on reload. [RT #16027] 2023. [bug] "make install" should create ${localstatedir}/run and @@ -695,7 +1103,7 @@ --- 9.4.0a5 released --- 2015. [cleanup] use-additional-cache is now acache-enable for - consistancy. Default acache-enable off in BIND 9.4 + consistency. Default acache-enable off in BIND 9.4 as it requires memory usage to be configured. It may be enabled by default in BIND 9.5 once we have more experience with it. @@ -715,9 +1123,9 @@ --- 9.4.0a4 released --- -2009. [bug] libbind: coverity fixes. [RT #15808] +2009. [bug] libbind: Coverity fixes. [RT #15808] -2008. [func] It is now posssible to enable/disable DNSSEC +2008. [func] It is now possible to enable/disable DNSSEC validation from rndc. This is useful for the mobile hosts where the current connection point breaks DNSSEC (firewall/proxy). [RT #15592] @@ -729,7 +1137,7 @@ be changed to yes in 9.5.0. [RT #15674] 2006. [security] Allow-query-cache and allow-recursion now default - to the builtin acls "localnets" and "localhost". + to the built in acls "localnets" and "localhost". This is being done to make caching servers less attractive as reflective amplifying targets for @@ -777,7 +1185,7 @@ 1994. [port] OpenSSL 0.9.8 support. [RT #15694] -1993. [bug] Log messsage, via syslog, were missing the space +1993. [bug] Log messages, via syslog, were missing the space after the timestamp if "print-time yes" was specified. [RT #15844] @@ -785,11 +1193,11 @@ view. [RT #15825] 1991. [cleanup] The configuration data, once read, should be treated - as readonly. Expand the use of const to enforce this + as read only. Expand the use of const to enforce this at compile time. [RT #15813] 1990. [bug] libbind: isc's override of broken gettimeofday() - implementions was not always effective. + implementations was not always effective. [RT #15709] 1989. [bug] win32: don't check the service password when @@ -811,7 +1219,7 @@ server for the zone. Also any zones that contain DLV records should be removed when upgrading a slave zone. You do not however have to upgrade all - servers for a zone with DLV records simultaniously. + servers for a zone with DLV records simultaneously. 1984. [func] dig, nslookup and host now advertise a 4096 byte EDNS UDP buffer size by default. [RT #15855] @@ -848,7 +1256,7 @@ 1973. [func] TSIG HMACSHA1, HMACSHA224, HMACSHA256, HMACSHA384 and HMACSHA512 support. [RT #13606] -1972. [contrib] DBUS dynamic forwarders integation from +1972. [contrib] DBUS dynamic forwarders integration from Jason Vas Dias . 1971. [port] linux: make detection of missing IF_NAMESIZE more @@ -872,7 +1280,7 @@ 1964. [func] Separate out MX and SRV to CNAME checks. [RT #15723] -1963. [port] Tru64 4.0E doesn't support send() and recv(). +1963. [port] Tru64 4.0E doesn't support send() and recv(). [RT #15586] 1962. [bug] Named failed to clear old update-policy when it @@ -898,7 +1306,7 @@ by native compiler. See README for additional cross compile support information. [RT #15148] -1955. [bug] Pre-allocate the cache cleaning interator. [RT #14998] +1955. [bug] Pre-allocate the cache cleaning iterator. [RT #14998] 1954. [func] Named now falls back to advertising EDNS with a 512 byte receive buffer if the initial EDNS queries @@ -915,7 +1323,7 @@ 1951. [security] Drop queries from particular well known ports. Don't return FORMERR to queries from particular well known ports. [RT #15636] - + 1950. [port] Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket. This prevents the source address being set for TCP connections. [RT #15628] @@ -934,10 +1342,10 @@ 1946. [bug] resume_dslookup() could trigger a REQUIRE failure when using forwarders. [RT #15549] -1945. [cleanup] dnssec-keygen: RSA (RSAMD5) is nolonger recommended. +1945. [cleanup] dnssec-keygen: RSA (RSAMD5) is no longer recommended. To generate a RSAMD5 key you must explicitly request RSAMD5. [RT #13780] - + 1944. [cleanup] isc_hash_create() does not need a read/write lock. [RT #15522] @@ -1028,15 +1436,15 @@ 1917. [doc] funcsynopsisinfo wasn't being treated as verbatim when generating man pages. [RT #15385] -1916. [func] Integrate contibuted IDN code from JPNIC. [RT #15383] +1916. [func] Integrate contributed IDN code from JPNIC. [RT #15383] 1915. [bug] dig +ndots was broken. [RT #15215] 1914. [protocol] DS is required to accept mnemonic algorithms (RFC 4034). Still emit numeric algorithms for - compatability with RFC 3658. [RT #15354] + compatibility with RFC 3658. [RT #15354] -1913. [func] Integrate contibuted DLZ code into named. [RT #11382] +1913. [func] Integrate contributed DLZ code into named. [RT #11382] 1912. [port] aix: atomic locking for powerpc. [RT #15020] @@ -1059,7 +1467,7 @@ [RT #15034] 1905. [bug] Strings returned from cfg_obj_asstring() should be - treated as read-only. The prototype for + treated as read-only. The prototype for cfg_obj_asstring() has been updated to reflect this. [RT #15256] @@ -1108,7 +1516,7 @@ 1891. [port] freebsd: pthread_mutex_init can fail if it runs out of memory. [RT #14995] -1890. [func] Raise the UDP recieve buffer size to 32k if it is +1890. [func] Raise the UDP receive buffer size to 32k if it is less than 32k. [RT #14953] 1889. [port] sunos: non blocking i/o support. [RT #14951] @@ -1148,7 +1556,7 @@ [RT #2471] 1877. [bug] Fix unreasonably low quantum on call to - dns_rbt_destroy2(). Remove unnecessay unhash_node() + dns_rbt_destroy2(). Remove unnecessary unhash_node() call. [RT #14919] 1876. [func] Additional memory debugging support to track size @@ -1189,10 +1597,10 @@ 1863. [bug] rrset-order "fixed" error messages not complete. 1862. [func] Add additional zone data constancy checks. - named-checkzone has extended checking of NS, MX and + named-checkzone has extended checking of NS, MX and SRV record and the hosts they reference. named has extended post zone load checks. - New zone options: check-mx and integrity-check. + New zone options: check-mx and integrity-check. [RT #4940] 1861. [bug] dig could trigger a INSIST on certain malformed @@ -1230,24 +1638,24 @@ 1850. [bug] Memory leak in lwres_getipnodebyaddr(). [RT #14591] 1849. [doc] All forms of the man pages (docbook, man, html) should - have consistant copyright dates. + have consistent copyright dates. 1848. [bug] Improve SMF integration. [RT #13238] 1847. [bug] isc_ondestroy_init() is called too late in - dns_rbtdb_create()/dns_rbtdb64_create(). + dns_rbtdb_create()/dns_rbtdb64_create(). [RT #13661] - + 1846. [contrib] query-loc-0.3.0 from Stephane Bortzmeyer . -1845. [bug] Improve error reporting to distingish between +1845. [bug] Improve error reporting to distinguish between accept()/fcntl() and socket()/fcntl() errors. [RT #13745] 1844. [bug] inet_pton() accepted more that 4 hexadecimal digits for each 16 bit piece of the IPv6 address. The text - representation of a IPv6 address has been tighted + representation of a IPv6 address has been tightened to disallow this (draft-ietf-ipv6-addr-arch-v4-02.txt). [RT #5662] @@ -1475,7 +1883,7 @@ 1765. [bug] configure --with-openssl=auto failed. [RT #12937] 1764. [bug] dns_zone_replacedb failed to emit a error message - if there was no SOA record in the replacment db. + if there was no SOA record in the replacement db. [RT #13016] 1763. [func] Perform sanity checks on NS records which refer to @@ -1503,7 +1911,7 @@ 1755. [func] allow-update is now settable at the options / view level. [RT #6636] -1754. [bug] We wern't always attempting to query the parent +1754. [bug] We weren't always attempting to query the parent server for the DS records at the zone cut. [RT #12774] @@ -1523,8 +1931,8 @@ [RT #12866] 1748. [func] dig now returns the byte count for axfr/ixfr. - -1747. [bug] BIND 8 compatability: named/named-checkconf failed + +1747. [bug] BIND 8 compatibility: named/named-checkconf failed to parse "host-statistics-max" in named.conf. 1746. [func] Make public the function to read a key file, @@ -1541,7 +1949,7 @@ requested number of worker threads then destruction of the manager would trigger an INSIST() failure. [RT #12790] - + 1742. [bug] Deleting all records at a node then adding a previously existing record, in a single UPDATE transaction, failed to leave / regenerate the @@ -1552,7 +1960,7 @@ 1740. [bug] Replace rbt's hash algorithm as it performed badly with certain zones. [RT #12729] - + NOTE: a hash context now needs to be established via isc_hash_create() if the application was not already doing this. @@ -1567,7 +1975,7 @@ 1736. [bug] dst_key_fromnamedfile() could fail to read a public key. [RT #12687] - + 1735. [bug] 'dig +sigtrace' could die with a REQUIRE failure. [RE #12688] @@ -1607,7 +2015,7 @@ [RT #12519] 1721. [bug] Error message from the journal processing were not - always identifing the relevent journal. [RT #12519] + always identifying the relevant journal. [RT #12519] 1720. [bug] 'dig +chase' did not terminate on a RFC 2308 Type 1 negative response. [RT #12506] @@ -1664,7 +2072,7 @@ 1703. [bug] named would loop sending NOTIFY messages when it failed to receive a response. [RT #12322] -1702. [bug] also-notify should not be applied to builtin zones. +1702. [bug] also-notify should not be applied to built in zones. [RT #12323] 1701. [doc] A minimal named.conf man page. @@ -1744,7 +2152,7 @@ 1675. [bug] named would sometimes add extra NSEC records to the authority section. - + 1674. [port] linux: increase buffer size used to scan /proc/net/if_inet6. @@ -1816,7 +2224,7 @@ 1648. [func] Update dnssec-lookaside named.conf syntax to support multiple dnssec-lookaside namespaces (not yet - implemented). + implemented). 1647. [bug] It was possible trigger a INSIST when chasing a DS record that required walking back over a empty node. @@ -1829,7 +2237,7 @@ masters with keys are specified. 1644. [bug] Update the journal modification time after a - sucessfull refresh query. [RT #11436] + successful refresh query. [RT #11436] 1643. [bug] dns_db_closeversion() could leak memory / node references. [RT #11163] @@ -1846,11 +2254,11 @@ 1638. [bug] "ixfr-from-differences" could generate a REQUIRE failure if the journal open failed. [RT #11347] - + 1637. [bug] Node reference leak on error in addnoqname(). 1636. [bug] The dump done callback could get ISC_R_SUCCESS even if *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 03:01:19 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65CD31065673; Sat, 10 Jan 2009 03:01:19 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5082B8FC1B; Sat, 10 Jan 2009 03:01:19 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A31Jp8077711; Sat, 10 Jan 2009 03:01:19 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A31IwY077698; Sat, 10 Jan 2009 03:01:18 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901100301.n0A31IwY077698@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Jan 2009 03:01:18 +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: r186997 - in stable/7: lib/bind lib/bind/bind lib/bind/dns lib/bind/dns/dns lib/bind/isc lib/bind/isc/isc share/doc/bind9 usr.bin/nsupdate X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 03:01:20 -0000 Author: dougb Date: Sat Jan 10 03:01:18 2009 New Revision: 186997 URL: http://svn.freebsd.org/changeset/base/186997 Log: MFC the BIND 9.4.3 and 9.4.3-P1 updates Modified: stable/7/lib/bind/ (props changed) stable/7/lib/bind/bind/config.h stable/7/lib/bind/bind/port_after.h stable/7/lib/bind/bind/port_before.h stable/7/lib/bind/config.h stable/7/lib/bind/dns/code.h stable/7/lib/bind/dns/dns/enumclass.h stable/7/lib/bind/dns/dns/enumtype.h stable/7/lib/bind/dns/dns/rdatastruct.h stable/7/lib/bind/isc/Makefile stable/7/lib/bind/isc/isc/platform.h stable/7/share/doc/bind9/Makefile stable/7/usr.bin/nsupdate/Makefile Modified: stable/7/lib/bind/bind/config.h ============================================================================== --- stable/7/lib/bind/bind/config.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/bind/config.h Sat Jan 10 03:01:18 2009 (r186997) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ -/* config.h. Generated by configure. */ +/* config.h. Generated from config.h.in by configure. */ /* #undef _SOCKADDR_LEN */ #define HAVE_FCNTL_H 1 #define HAVE_PATHS_H 1 @@ -8,6 +8,7 @@ /* #undef HAVE_STROPTS_H */ #define HAVE_SYS_TIMERS_H 1 #define HAVE_SYS_SELECT_H 1 +#define HAVE_MEMORY_H 1 /* #undef SYS_CDEFS_H */ /* #undef _POSIX_PTHREAD_SEMANTICS */ /* #undef POSIX_GETPWUID_R */ @@ -16,14 +17,20 @@ /* #undef POSIX_GETGRNAM_R */ #define HAVE_MEMMOVE 1 #define HAVE_MEMCHR 1 +/* #undef SPRINTF_CHAR */ +/* #undef VSPRINTF_CHAR */ +#define USE_SYSERROR_LIST 1 +/* #undef NEED_STRTOUL */ +/* #undef NEED_SUN4PROTOS */ +/* #undef REENABLE_SEND */ /* #undef NEED_SETGROUPENT */ /* #undef NEED_GETGROUPLIST */ /* define if prototype for getgrnam_r() is required */ -/* #undef NEED_GETGRNAM_R */ -/* #undef NEED_GETGRGID_R */ -/* #undef NEED_GETGRENT_R */ +/* #undef NEED_GETGRNAM_R */ +/* #undef NEED_GETGRGID_R */ +/* #undef NEED_GETGRENT_R */ #define NEED_SETGRENT_R 1 #define NEED_ENDGRENT_R 1 @@ -46,7 +53,7 @@ /* #undef ssize_t */ /* #undef uintptr_t */ -/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */ +/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */ /* #undef SHUTUP_SPUTAUX */ #ifdef SHUTUP_SPUTAUX struct __sFILE; Modified: stable/7/lib/bind/bind/port_after.h ============================================================================== --- stable/7/lib/bind/bind/port_after.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/bind/port_after.h Sat Jan 10 03:01:18 2009 (r186997) @@ -18,12 +18,20 @@ #include #endif /* HAVE_SYS_SELECT_H */ +#ifdef REENABLE_SEND +#undef send +#endif + #undef NEED_PSELECT #define HAVE_SA_LEN 1 #define HAVE_MINIMUM_IFREQ 1 #undef NEED_DAEMON #undef NEED_STRSEP #undef NEED_STRERROR +#ifdef NEED_STRERROR +const char *isc_strerror(int); +#define strerror isc_strerror +#endif #define HAS_INET6_STRUCTS 1 #define HAVE_SIN6_SCOPE_ID 1 #undef NEED_IN6ADDR_ANY @@ -32,12 +40,18 @@ #undef NEED_GETTIMEOFDAY #define HAVE_STRNDUP 1 #undef USE_FIONBIO_IOCTL -#undef USE_SYSERROR_LIST #undef INNETGR_ARGS #undef SETNETGRENT_ARGS #define USE_IFNAMELINKID 1 #define PORT_NONBLOCK O_NONBLOCK +#ifndef _POSIX_PATH_MAX +#define _POSIX_PATH_MAX 255 +#endif +#ifndef PATH_MAX +#define PATH_MAX _POSIX_PATH_MAX +#endif + /* * We need to know the IPv6 address family number even on IPv4-only systems. * Note that this is NOT a protocol constant, and that if the system has its @@ -311,16 +325,16 @@ innetgr_r(const char *, const char *, co #endif #ifdef NEED_SETNETGRENT_R -#ifdef NGR_R_ENT_ARGS -NGR_R_SET_RETURN setnetgrent_r(const char *netgroup, NGR_R_ENT_ARGS); +#ifdef NGR_R_SET_ARGS +NGR_R_SET_RETURN setnetgrent_r(NGR_R_SET_CONST char *netgroup, NGR_R_SET_ARGS); #else -NGR_R_SET_RETURN setnetgrent_r(const char *netgroup); +NGR_R_SET_RETURN setnetgrent_r(NGR_R_SET_CONST char *netgroup); #endif #endif #ifdef NEED_ENDNETGRENT_R -#ifdef NGR_R_ENT_ARGS -NGR_R_END_RETURN endnetgrent_r(NGR_R_ENT_ARGS); +#ifdef NGR_R_END_ARGS +NGR_R_END_RETURN endnetgrent_r(NGR_R_END_ARGS); #else NGR_R_END_RETURN endnetgrent_r(void); #endif @@ -386,10 +400,12 @@ int isc__gettimeofday(struct timeval *tv int isc__gettimeofday(struct timeval *tp, struct timezone *tzp); #endif -int getnetgrent(char **machinep, char **userp, char **domainp); +int getnetgrent(NGR_R_CONST char **machinep, NGR_R_CONST char **userp, + NGR_R_CONST char **domainp); #ifdef NGR_R_ARGS -int getnetgrent_r(char **machinep, char **userp, char **domainp, NGR_R_ARGS); +int getnetgrent_r(NGR_R_CONST char **machinep, NGR_R_CONST char **userp, + NGR_R_CONST char **domainp, NGR_R_ARGS); #endif #ifdef SETNETGRENT_ARGS @@ -407,11 +423,87 @@ int innetgr(const char *netgroup, const const char *user, const char *domain); #endif -#ifdef NGR_R_ENT_ARGS +#ifdef NGR_R_SET_ARGS NGR_R_SET_RETURN -setnetgrent_r(const char *netgroup, NGR_R_ENT_ARGS); +setnetgrent_r(NGR_R_SET_CONST char *netgroup, NGR_R_SET_ARGS); #else NGR_R_SET_RETURN -setnetgrent_r(const char *netgroup); +setnetgrent_r(NGR_R_SET_CONST char *netgroup); +#endif + +#ifdef NEED_STRTOUL +unsigned long strtoul(const char *, char **, int); #endif + +#ifdef NEED_SUN4PROTOS +#include +#ifndef __SIZE_TYPE__ +#define __SIZE_TYPE__ int +#endif +struct sockaddr; +struct iovec; +struct timeval; +struct timezone; +int fprintf(FILE *, const char *, ...); +int getsockname(int, struct sockaddr *, int *); +int getpeername(int, struct sockaddr *, int *); +int socket(int, int, int); +int connect(int, const struct sockaddr *, int); +int writev(int, struct iovec *, int); +int readv(int, struct iovec *, int); +int send(int, const char *, int, int); +void bzero(char *, int); +int recvfrom(int, char *, int, int, struct sockaddr *, int *); +int syslog(int, const char *, ... ); +int printf(const char *, ...); +__SIZE_TYPE__ fread(void *, __SIZE_TYPE__, __SIZE_TYPE__, FILE *); +__SIZE_TYPE__ fwrite(const void *, __SIZE_TYPE__, __SIZE_TYPE__, FILE *); +int fclose(FILE *); +int ungetc(int, FILE *); +int scanf(const char *, ...); +int sscanf(const char *, const char *, ... ); +int tolower(int); +int toupper(int); +int strcasecmp(const char *, const char *); +int strncasecmp(const char *, const char *, int); +int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); +#ifdef gettimeofday +#undef gettimeofday +int gettimeofday(struct timeval *, struct timezone *); +#define gettimeofday isc__gettimeofday +#else +int gettimeofday(struct timeval *, struct timezone *); +#endif +long strtol(const char*, char **, int); +int fseek(FILE *, long, int); +int setsockopt(int, int, int, const char *, int); +int bind(int, const struct sockaddr *, int); +void bcopy(char *, char *, int); +int fputc(char, FILE *); +int listen(int, int); +int accept(int, struct sockaddr *, int *); +int getsockopt(int, int, int, char *, int *); +int vfprintf(FILE *, const char *, va_list); +int fflush(FILE *); +int fgetc(FILE *); +int fputs(const char *, FILE *); +int fchown(int, int, int); +void setbuf(FILE *, char *); +int gethostname(char *, int); +int rename(const char *, const char *); +time_t time(time_t *); +int fscanf(FILE *, const char *, ...); +int sscanf(const char *, const char *, ...); +int ioctl(int, int, caddr_t); +void perror(const char *); + +#if !defined(__USE_FIXED_PROTOTYPES__) && !defined(__cplusplus) && !defined(__STRICT_ANSI__) +/* + * 'gcc -ansi' changes the prototype for vsprintf(). + * Use this prototype when 'gcc -ansi' is not in effect. + */ +char *vsprintf(char *, const char *, va_list); +#endif +#endif + #endif Modified: stable/7/lib/bind/bind/port_before.h ============================================================================== --- stable/7/lib/bind/bind/port_before.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/bind/port_before.h Sat Jan 10 03:01:18 2009 (r186997) @@ -4,6 +4,10 @@ #define port_before_h #include +#ifdef NEED_SUN4PROTOS +#define _PARAMS(x) x +#endif + struct group; /* silence warning */ struct passwd; /* silence warning */ struct timeval; /* silence warning */ @@ -83,15 +87,22 @@ struct timespec { #define NGR_R_BAD (0) #define NGR_R_COPY buf, buflen #define NGR_R_COPY_ARGS NGR_R_ARGS +#define NGR_R_CONST #define NGR_R_END_RESULT(x) /*empty*/ #define NGR_R_END_RETURN void -#undef NGR_R_ENT_ARGS /*empty*/ +#undef NGR_R_END_ARGS /*empty*/ #define NGR_R_OK 1 #define NGR_R_RETURN int +#define NGR_R_SET_CONST const #undef NGR_R_SET_RESULT /*empty*/ #define NGR_R_SET_RETURN void +#undef NGR_R_SET_ARGS +#if !defined(NGR_R_SET_ARGS) && defined(NGR_R_END_ARGS) +#define NGR_R_SET_ARGS NGR_R_END_ARGS +#endif + #define PROTO_R_ARGS char *buf, size_t buflen, struct protoent **answerp #define PROTO_R_BAD ERANGE #define PROTO_R_COPY buf, buflen Modified: stable/7/lib/bind/config.h ============================================================================== --- stable/7/lib/bind/config.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/config.h Sat Jan 10 03:01:18 2009 (r186997) @@ -160,6 +160,12 @@ int sigwait(const unsigned int *set, int /* Define if you cannot bind() before connect() for TCP sockets. */ /* #undef BROKEN_TCP_BIND_BEFORE_CONNECT */ +/* Solaris hack to get select_large_fdset. */ +/* #undef FD_SETSIZE */ + +/* Define to 1 if you have the `capset' function. */ +/* #undef HAVE_CAPSET */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_DLFCN_H */ @@ -217,6 +223,15 @@ int sigwait(const unsigned int *set, int /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_CAPABILITY_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DEVPOLL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DYNTUNE_H */ + /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 @@ -303,7 +318,7 @@ int sigwait(const unsigned int *set, int /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus -#define inline +#define inline /**/ #endif /* Define to `unsigned int' if does not define. */ @@ -314,3 +329,7 @@ int sigwait(const unsigned int *set, int /* Define to `unsigned long' if does not define. */ /* #undef uintptr_t */ + +/* Define to empty if the keyword `volatile' does not work. Warning: valid + code using `volatile' can become incorrect without. Disable with care. */ +/* #undef volatile */ Modified: stable/7/lib/bind/dns/code.h ============================================================================== --- stable/7/lib/bind/dns/code.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/dns/code.h Sat Jan 10 03:01:18 2009 (r186997) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: stable/7/lib/bind/dns/dns/enumclass.h ============================================================================== --- stable/7/lib/bind/dns/dns/enumclass.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/dns/dns/enumclass.h Sat Jan 10 03:01:18 2009 (r186997) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: stable/7/lib/bind/dns/dns/enumtype.h ============================================================================== --- stable/7/lib/bind/dns/dns/enumtype.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/dns/dns/enumtype.h Sat Jan 10 03:01:18 2009 (r186997) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: stable/7/lib/bind/dns/dns/rdatastruct.h ============================================================================== --- stable/7/lib/bind/dns/dns/rdatastruct.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/dns/dns/rdatastruct.h Sat Jan 10 03:01:18 2009 (r186997) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -1608,10 +1608,10 @@ typedef struct dns_rdata_rrsig { #endif /* GENERIC_DNSSIG_46_H */ /* - * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or 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. * @@ -1627,10 +1627,10 @@ typedef struct dns_rdata_rrsig { #ifndef GENERIC_NSEC_47_H #define GENERIC_NSEC_47_H 1 -/* $Id: nsec_47.h,v 1.4.20.2 2005/04/29 00:16:37 marka Exp $ */ +/* $Id: nsec_47.h,v 1.4.20.4 2008/07/15 23:46:14 tbox Exp $ */ /*! - * \brief Per draft-ietf-dnsext-nsec-rdata-01.txt */ + * \brief Per RFC 3845 */ typedef struct dns_rdata_nsec { dns_rdatacommon_t common; Modified: stable/7/lib/bind/isc/Makefile ============================================================================== --- stable/7/lib/bind/isc/Makefile Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/isc/Makefile Sat Jan 10 03:01:18 2009 (r186997) @@ -32,7 +32,7 @@ SRCS+= inet_pton.c \ hash.c heap.c hex.c hmacmd5.c hmacsha.c \ lex.c lfsr.c lib.c log.c md5.c \ mem.c mutexblock.c netaddr.c netscope.c ondestroy.c \ - parseint.c print.c quota.c random.c \ + parseint.c portset.c print.c quota.c random.c \ ratelimiter.c refcount.c region.c result.c rwlock.c \ serial.c sha1.c sha2.c sockaddr.c string.c strtoul.c \ symtab.c task.c taskpool.c timer.c version.c @@ -84,6 +84,7 @@ INCS= ${SRCDIR}/include/isc/app.h \ ${SRCDIR}/include/isc/ondestroy.h \ ${SRCDIR}/include/isc/os.h \ ${SRCDIR}/include/isc/parseint.h \ + ${SRCDIR}/include/isc/portset.h \ ${SRCDIR}/include/isc/print.h \ ${SRCDIR}/include/isc/quota.h \ ${SRCDIR}/include/isc/random.h \ Modified: stable/7/lib/bind/isc/isc/platform.h ============================================================================== --- stable/7/lib/bind/isc/isc/platform.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/isc/isc/platform.h Sat Jan 10 03:01:18 2009 (r186997) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: platform.h.in,v 1.34.18.9 2007/09/13 05:04:01 each Exp $ */ +/* $Id: platform.h.in,v 1.34.18.11 2008/06/24 23:45:55 tbox Exp $ */ #ifndef ISC_PLATFORM_H #define ISC_PLATFORM_H 1 @@ -142,6 +142,21 @@ */ #undef ISC_PLATFORM_FIXIN6ISADDR +/*! \brief + * Define if the system supports kqueue multiplexing + */ +#define ISC_PLATFORM_HAVEKQUEUE 1 + +/*! \brief + * Define if the system supports epoll multiplexing + */ +#undef ISC_PLATFORM_HAVEEPOLL + +/*! \brief + * Define if the system supports /dev/poll multiplexing + */ +#undef ISC_PLATFORM_HAVEDEVPOLL + /* *** Printing. ***/ @@ -226,19 +241,19 @@ /* * If the "xadd" operation is available on this architecture, - * ISC_PLATFORM_HAVEXADD will be defined. + * ISC_PLATFORM_HAVEXADD will be defined. */ #define ISC_PLATFORM_HAVEXADD 1 /* * If the "atomic swap" operation is available on this architecture, - * ISC_PLATFORM_HAVEATOMICSTORE" will be defined. + * ISC_PLATFORM_HAVEATOMICSTORE" will be defined. */ #define ISC_PLATFORM_HAVEATOMICSTORE 1 /* * If the "compare-and-exchange" operation is available on this architecture, - * ISC_PLATFORM_HAVECMPXCHG will be defined. + * ISC_PLATFORM_HAVECMPXCHG will be defined. */ #define ISC_PLATFORM_HAVECMPXCHG 1 Modified: stable/7/share/doc/bind9/Makefile ============================================================================== --- stable/7/share/doc/bind9/Makefile Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/share/doc/bind9/Makefile Sat Jan 10 03:01:18 2009 (r186997) @@ -20,7 +20,7 @@ ARM= Bv9ARM.ch01.html Bv9ARM.ch02.html man.rndc.html ARMDIR= ${TOPDIR}/arm MISC= dnssec format-options.pl ipv6 migration migration-4to9 \ - options rfc-compliance roadmap sdb + options rfc-compliance roadmap sdb sort-options.pl MISCDIR= ${TOPDIR}/misc .include Modified: stable/7/usr.bin/nsupdate/Makefile ============================================================================== --- stable/7/usr.bin/nsupdate/Makefile Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/usr.bin/nsupdate/Makefile Sat Jan 10 03:01:18 2009 (r186997) @@ -18,7 +18,7 @@ CFLAGS+= -I${BIND_DIR}/lib/isc/${ISC_ATO DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} -MAN= nsupdate.8 +MAN= nsupdate.1 MANFILTER= sed -e "s@/etc/named\.conf@/etc/namedb/named.conf@g" \ -e "s@^\.HP [0-9]* @@" From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 03:04:21 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4911106566C; Sat, 10 Jan 2009 03:04:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B89CB8FC08; Sat, 10 Jan 2009 03:04:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A34Lpw077819; Sat, 10 Jan 2009 03:04:21 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A34LDl077818; Sat, 10 Jan 2009 03:04:21 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901100304.n0A34LDl077818@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Jan 2009 03:04:21 +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: r186998 - in stable/7: share/doc/bind9 usr.bin/nsupdate X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 03:04:22 -0000 Author: dougb Date: Sat Jan 10 03:04:21 2009 New Revision: 186998 URL: http://svn.freebsd.org/changeset/base/186998 Log: MFC the BIND 9.4.3 and 9.4.3-P1 updates Modified: stable/7/share/doc/bind9/ (props changed) stable/7/usr.bin/nsupdate/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 03:07:25 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C74C106566C for ; Sat, 10 Jan 2009 03:07:25 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 146788FC0A for ; Sat, 10 Jan 2009 03:07:25 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 4341 invoked by uid 399); 10 Jan 2009 03:07:23 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 10 Jan 2009 03:07:23 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <496810EA.9080508@FreeBSD.org> Date: Fri, 09 Jan 2009 19:07:22 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.19 (X11/20090102) MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org References: <200901100304.n0A34LDl077818@svn.freebsd.org> In-Reply-To: <200901100304.n0A34LDl077818@svn.freebsd.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r186998 - in stable/7: share/doc/bind9 usr.bin/nsupdate X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 03:07:26 -0000 Doug Barton wrote: > Author: dougb > Date: Sat Jan 10 03:04:21 2009 > New Revision: 186998 > URL: http://svn.freebsd.org/changeset/base/186998 > > Log: > MFC the BIND 9.4.3 and 9.4.3-P1 updates > > Modified: > stable/7/share/doc/bind9/ (props changed) > stable/7/usr.bin/nsupdate/ (props changed) In case someone is curious, when I listed the non-contrib changes on the command line I inadvertently left out these mergeinfo updates on the directories. Doug -- This .signature sanitized for your protection From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 03:11:20 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E6B21065670 for ; Sat, 10 Jan 2009 03:11:20 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id B62878FC16 for ; Sat, 10 Jan 2009 03:11:19 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 8154 invoked by uid 399); 10 Jan 2009 03:11:19 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 10 Jan 2009 03:11:19 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <496811D6.5010700@FreeBSD.org> Date: Fri, 09 Jan 2009 19:11:18 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.19 (X11/20090102) MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org References: <200901100300.n0A30M5b077529@svn.freebsd.org> In-Reply-To: <200901100300.n0A30M5b077529@svn.freebsd.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r186996 - in stable/7/contrib/bind9: . bin/check bin/dig bin/dnssec bin/named bin/named/include/named bin/named/unix bin/named/unix/include/named bin/nsupdate bin/rndc doc/arm doc/misc ... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 03:11:20 -0000 Doug Barton wrote: > Author: dougb > Date: Sat Jan 10 03:00:21 2009 > New Revision: 186996 > URL: http://svn.freebsd.org/changeset/base/186996 > > Log: > MFC the BIND 9.4.3 and 9.4.3-P1 updates In case anyone is curious, 9.4.3 has been in HEAD for > 2 weeks. The changes for -P1 only touch a few files in contrib/bind9, are only relevant to those who verify signatures with DNSSEC, and have been requested by the security team. Thus the uncustomarily short MFC. Doug -- This .signature sanitized for your protection From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 04:30:28 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1597E106566B; Sat, 10 Jan 2009 04:30:28 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F25258FC0A; Sat, 10 Jan 2009 04:30:27 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A4URN7079554; Sat, 10 Jan 2009 04:30:27 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A4UR2c079552; Sat, 10 Jan 2009 04:30:27 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901100430.n0A4UR2c079552@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Jan 2009 04:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186999 - in stable/6/contrib/bind9: . bin/dig bin/dnssec bin/named bin/named/include/named bin/named/unix bin/named/unix/include/named bin/nsupdate bin/rndc doc/arm doc/misc doc/rfc li... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 04:30:28 -0000 Author: dougb Date: Sat Jan 10 04:30:27 2009 New Revision: 186999 URL: http://svn.freebsd.org/changeset/base/186999 Log: Merge from vendor/bind9/dist-9.3 as of the 9.3.6-P1 import Added: stable/6/contrib/bind9/aclocal.m4 - copied unchanged from r186989, vendor/bind9/dist-9.3/aclocal.m4 stable/6/contrib/bind9/bin/nsupdate/nsupdate.1 - copied unchanged from r186989, vendor/bind9/dist-9.3/bin/nsupdate/nsupdate.1 stable/6/contrib/bind9/config.h.in - copied unchanged from r186989, vendor/bind9/dist-9.3/config.h.in stable/6/contrib/bind9/doc/rfc/rfc4648.txt - copied unchanged from r186989, vendor/bind9/dist-9.3/doc/rfc/rfc4648.txt stable/6/contrib/bind9/doc/rfc/rfc4701.txt - copied unchanged from r186989, vendor/bind9/dist-9.3/doc/rfc/rfc4701.txt stable/6/contrib/bind9/doc/rfc/rfc5155.txt - copied unchanged from r186989, vendor/bind9/dist-9.3/doc/rfc/rfc5155.txt stable/6/contrib/bind9/lib/bind/aclocal.m4 - copied unchanged from r186989, vendor/bind9/dist-9.3/lib/bind/aclocal.m4 stable/6/contrib/bind9/lib/bind/config.h.in - copied unchanged from r186989, vendor/bind9/dist-9.3/lib/bind/config.h.in stable/6/contrib/bind9/lib/isc/include/isc/portset.h - copied unchanged from r186989, vendor/bind9/dist-9.3/lib/isc/include/isc/portset.h stable/6/contrib/bind9/lib/isc/portset.c - copied unchanged from r186989, vendor/bind9/dist-9.3/lib/isc/portset.c Deleted: stable/6/contrib/bind9/bin/nsupdate/nsupdate.8 Modified: stable/6/contrib/bind9/ (props changed) stable/6/contrib/bind9/CHANGES stable/6/contrib/bind9/FAQ stable/6/contrib/bind9/FAQ.xml stable/6/contrib/bind9/README stable/6/contrib/bind9/bin/dig/dig.1 stable/6/contrib/bind9/bin/dig/dig.c stable/6/contrib/bind9/bin/dig/dig.docbook stable/6/contrib/bind9/bin/dig/dig.html stable/6/contrib/bind9/bin/dig/dighost.c stable/6/contrib/bind9/bin/dig/host.1 stable/6/contrib/bind9/bin/dig/host.docbook stable/6/contrib/bind9/bin/dig/host.html stable/6/contrib/bind9/bin/dnssec/dnssec-keygen.8 stable/6/contrib/bind9/bin/dnssec/dnssec-keygen.docbook stable/6/contrib/bind9/bin/dnssec/dnssec-keygen.html stable/6/contrib/bind9/bin/dnssec/dnssec-signzone.8 stable/6/contrib/bind9/bin/dnssec/dnssec-signzone.c stable/6/contrib/bind9/bin/dnssec/dnssec-signzone.docbook stable/6/contrib/bind9/bin/dnssec/dnssec-signzone.html stable/6/contrib/bind9/bin/named/client.c stable/6/contrib/bind9/bin/named/config.c stable/6/contrib/bind9/bin/named/controlconf.c stable/6/contrib/bind9/bin/named/include/named/globals.h stable/6/contrib/bind9/bin/named/interfacemgr.c stable/6/contrib/bind9/bin/named/lwresd.8 stable/6/contrib/bind9/bin/named/lwresd.c stable/6/contrib/bind9/bin/named/lwresd.docbook stable/6/contrib/bind9/bin/named/lwresd.html stable/6/contrib/bind9/bin/named/main.c stable/6/contrib/bind9/bin/named/named.8 stable/6/contrib/bind9/bin/named/named.conf.5 stable/6/contrib/bind9/bin/named/named.conf.docbook stable/6/contrib/bind9/bin/named/named.conf.html stable/6/contrib/bind9/bin/named/named.docbook stable/6/contrib/bind9/bin/named/named.html stable/6/contrib/bind9/bin/named/query.c stable/6/contrib/bind9/bin/named/server.c stable/6/contrib/bind9/bin/named/unix/include/named/os.h stable/6/contrib/bind9/bin/named/unix/os.c stable/6/contrib/bind9/bin/named/update.c stable/6/contrib/bind9/bin/nsupdate/Makefile.in stable/6/contrib/bind9/bin/nsupdate/nsupdate.docbook stable/6/contrib/bind9/bin/nsupdate/nsupdate.html stable/6/contrib/bind9/bin/rndc/rndc-confgen.c stable/6/contrib/bind9/bin/rndc/rndc.c stable/6/contrib/bind9/configure.in stable/6/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/6/contrib/bind9/doc/arm/Bv9ARM.ch02.html stable/6/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/6/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/6/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/6/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/6/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/6/contrib/bind9/doc/arm/Bv9ARM.html stable/6/contrib/bind9/doc/arm/Bv9ARM.pdf stable/6/contrib/bind9/doc/misc/options stable/6/contrib/bind9/doc/rfc/index stable/6/contrib/bind9/lib/bind/api stable/6/contrib/bind9/lib/bind/bsd/Makefile.in stable/6/contrib/bind9/lib/bind/bsd/strerror.c stable/6/contrib/bind9/lib/bind/bsd/strtoul.c stable/6/contrib/bind9/lib/bind/configure.in stable/6/contrib/bind9/lib/bind/dst/Makefile.in stable/6/contrib/bind9/lib/bind/dst/dst_api.c stable/6/contrib/bind9/lib/bind/dst/hmac_link.c stable/6/contrib/bind9/lib/bind/dst/support.c stable/6/contrib/bind9/lib/bind/include/arpa/nameser.h stable/6/contrib/bind9/lib/bind/include/isc/assertions.h stable/6/contrib/bind9/lib/bind/include/isc/misc.h stable/6/contrib/bind9/lib/bind/include/resolv.h stable/6/contrib/bind9/lib/bind/inet/Makefile.in stable/6/contrib/bind9/lib/bind/inet/inet_net_pton.c stable/6/contrib/bind9/lib/bind/irs/Makefile.in stable/6/contrib/bind9/lib/bind/irs/dns_ho.c stable/6/contrib/bind9/lib/bind/irs/irp.c stable/6/contrib/bind9/lib/bind/isc/Makefile.in stable/6/contrib/bind9/lib/bind/isc/assertions.c stable/6/contrib/bind9/lib/bind/isc/bitncmp.c stable/6/contrib/bind9/lib/bind/isc/ctl_clnt.c stable/6/contrib/bind9/lib/bind/isc/ctl_srvr.c stable/6/contrib/bind9/lib/bind/nameser/Makefile.in stable/6/contrib/bind9/lib/bind/port_after.h.in stable/6/contrib/bind9/lib/bind/resolv/Makefile.in stable/6/contrib/bind9/lib/bind/resolv/res_debug.c stable/6/contrib/bind9/lib/bind/resolv/res_mkquery.c stable/6/contrib/bind9/lib/bind/resolv/res_query.c stable/6/contrib/bind9/lib/bind9/api stable/6/contrib/bind9/lib/bind9/check.c stable/6/contrib/bind9/lib/dns/adb.c stable/6/contrib/bind9/lib/dns/api stable/6/contrib/bind9/lib/dns/cache.c stable/6/contrib/bind9/lib/dns/dispatch.c stable/6/contrib/bind9/lib/dns/include/dns/dispatch.h stable/6/contrib/bind9/lib/dns/journal.c stable/6/contrib/bind9/lib/dns/masterdump.c stable/6/contrib/bind9/lib/dns/message.c stable/6/contrib/bind9/lib/dns/openssldsa_link.c stable/6/contrib/bind9/lib/dns/opensslrsa_link.c stable/6/contrib/bind9/lib/dns/rbt.c stable/6/contrib/bind9/lib/dns/rdata/generic/nsec_47.c stable/6/contrib/bind9/lib/dns/rdata/generic/nsec_47.h stable/6/contrib/bind9/lib/dns/rdata/generic/txt_16.c stable/6/contrib/bind9/lib/dns/rdata/in_1/naptr_35.c stable/6/contrib/bind9/lib/dns/request.c stable/6/contrib/bind9/lib/dns/resolver.c stable/6/contrib/bind9/lib/dns/validator.c stable/6/contrib/bind9/lib/dns/view.c stable/6/contrib/bind9/lib/dns/xfrin.c stable/6/contrib/bind9/lib/isc/Makefile.in stable/6/contrib/bind9/lib/isc/api stable/6/contrib/bind9/lib/isc/assertions.c stable/6/contrib/bind9/lib/isc/include/isc/assertions.h stable/6/contrib/bind9/lib/isc/include/isc/mem.h stable/6/contrib/bind9/lib/isc/include/isc/msgs.h stable/6/contrib/bind9/lib/isc/include/isc/platform.h.in stable/6/contrib/bind9/lib/isc/include/isc/resource.h stable/6/contrib/bind9/lib/isc/include/isc/socket.h stable/6/contrib/bind9/lib/isc/include/isc/timer.h stable/6/contrib/bind9/lib/isc/include/isc/types.h stable/6/contrib/bind9/lib/isc/mem.c stable/6/contrib/bind9/lib/isc/print.c stable/6/contrib/bind9/lib/isc/pthreads/mutex.c stable/6/contrib/bind9/lib/isc/timer.c stable/6/contrib/bind9/lib/isc/unix/app.c stable/6/contrib/bind9/lib/isc/unix/include/isc/net.h stable/6/contrib/bind9/lib/isc/unix/net.c stable/6/contrib/bind9/lib/isc/unix/resource.c stable/6/contrib/bind9/lib/isc/unix/socket.c stable/6/contrib/bind9/lib/isc/unix/socket_p.h stable/6/contrib/bind9/lib/isc/unix/time.c stable/6/contrib/bind9/lib/isccfg/api stable/6/contrib/bind9/lib/isccfg/namedconf.c stable/6/contrib/bind9/version Modified: stable/6/contrib/bind9/CHANGES ============================================================================== --- stable/6/contrib/bind9/CHANGES Sat Jan 10 03:04:21 2009 (r186998) +++ stable/6/contrib/bind9/CHANGES Sat Jan 10 04:30:27 2009 (r186999) @@ -1,14 +1,154 @@ - --- 9.3.5-P2 released --- + --- 9.3.6-P1 released --- -2406. [bug] Some operating systems have FD_SETSIZE set to a - low value by default, which can cause resource - exhaustion when many simultaneous connections are - open. Linux in particular makes it difficult to - increase this value. To use more sockets with - select(), set ISC_SOCKET_FDSETSIZE. Example: - STD_CDEFINES="-DISC_SOCKET_FDSETSIZE=4096" ./configure - (This should not be necessary in most cases, and - never for an authoritative-only server.) [RT #18328] +2522. [security] Handle -1 from DSA_do_verify(). + +2498. [bug] Removed a bogus function argument used with + ISC_SOCKET_USE_POLLWATCH: it could cause compiler + warning or crash named with the debug 1 level + of logging. [RT #18917] + + --- 9.3.6 released --- + +2490. [port] aix: work around a kernel bug where IPV6_RECVPKTINFO + is cleared when IPV6_V6ONLY is set. [RT #18785] + +2489. [port] solaris: Workaround Solaris's kernel bug about + /dev/poll: + http://bugs.opensolaris.org/view_bug.do?bug_id=6724237 + Define ISC_SOCKET_USE_POLLWATCH at build time to enable + this workaround. [RT #18870] + + --- 9.3.6rc1 released --- + +2473. [port] linux: raise the limit on open files to the possible + maximum value before spawning threads; 'files' + specified in named.conf doesn't seem to work with + threads as expected. [RT #18784] + +2472. [port] linux: check the number of available cpu's before + calling chroot as it depends on "/proc". [RT #16923] + +2469. [port] solaris: Work around Solaris's select() limitations. + [RT #18769] + +2468. [bug] Resolver could try unreachable servers multiple times. + [RT #18739] + +2467. [bug] Failure of fcntl(F_DUPFD) wasn't logged. [RT #18740] + +2465. [bug] Adb's handling of lame addresses was different + for IPv4 and IPv6. [RT #18738] + +2463. [port] linux: POSIX doesn't include the IPv6 Advanced Socket + API and glibc hides parts of the IPv6 Advanced Socket + API as a result. This is stupid as it breaks how the + two halves (Basic and Advanced) of the IPv6 Socket API were designed to be used but we have to live with it. + Define _GNU_SOURCE to pull in the IPv6 Advanced Socket + API. [RT #18388] + +2462. [doc] Document -m (enable memory usage debugging) + option for dig. [RT #18757] + +2461. [port] sunos: Change #2363 was not complete. [RT #17513] + +2458. [doc] ARM: update and correction for max-cache-size. + [RT #18294] + +2455. [bug] Stop metadata being transfered via axfr/ixfr. + [RT #18639] + +2453. [bug] Remove NULL pointer dereference in dns_journal_print(). + [RT #18316] + +2449. [bug] libbind: Out of bounds reference in dns_ho.c:addrsort. + [RT #18044] + +2444. [port] Linux, FreeBSD, AIX: Turn off path mtu discovery + (clear DF) for UDP responses and requests. + + --- 9.3.6b1 released --- + +2443. [bug] win32: UDP connect() would not generate an event, + and so connected UDP sockets would never clean up. + Fix this by doing an immediate WSAConnect() rather + than an io completion port type for UDP. + +2438. [bug] Timeouts could be logged incorrectly under win32. + [RT #18617] + +2437. [bug] Sockets could be closed too early, leading to + inconsistent states in the socket module. [RT #18298] + +2436. [security] win32: UDP client handler can be shutdown. [RT #18576] + +2432. [bug] More Windows socket handling improvements. Stop + using I/O events and use IO Completion Ports + throughout. Rewrite the receive path logic to make + it easier to support multiple simultaneous + requestrs in the future. Add stricter consistency + checking as a compile-time option (define + ISC_SOCKET_CONSISTENCY_CHECKS; defaults to off). + +2430. [bug] win32: isc_interval_set() could round down to + zero if the input was less than NS_INTERVAL + nanoseconds. Round up instead. [RT #18549] + +2429. [doc] nsupdate should be in section 1 of the man pages. + [RT #18283] + +2426. [bug] libbind: inet_net_pton() can sometimes return the + wrong value if excessively large netmasks are + supplied. [RT #18512] + +2425. [bug] named didn't detect unavailable query source addresses + at load time. [RT #18536] + +2424. [port] configure now probes for a working epoll + implementation. Allow the use of kqueue, + epoll and /dev/poll to be selected at compile + time. [RT #18277] + +2422. [bug] Handle the special return value of a empty node as + if it was a NXRRSET in the validator. [RT #18447] + +2421. [func] Add new command line option '-S' for named to specify + the max number of sockets. [RT #18493] + Use caution: this option may not work for some + operating systems without rebuilding named. + +2420. [bug] Windows socket handling cleanup. Let the io + completion event send out cancelled read/write + done events, which keeps us from writing to memeory + we no longer have ownership of. Add debugging + socket_log() function. Rework TCP socket handling + to not leak sockets. + +2417. [bug] Connecting UDP sockets for outgoing queries could + unexpectedly fail with an 'address already in use' + error. [RT #18411] + +2416. [func] Log file descriptors that cause exceeding the + internal maximum. [RT #18460] + +2414. [bug] A masterdump context held the database lock too long, + causing various troubles such as dead lock and + recursive lock acquisition. [RT #18311, #18456] + +2413. [bug] Fixed an unreachable code path in socket.c. [RT #18442] + +2412. [bug] win32: address a resourse leak. [RT #18374] + +2411. [bug] Allow using a larger number of sockets than FD_SETSIZE + for select(). To enable this, set ISC_SOCKET_MAXSOCKETS + at compilation time. [RT #18433] + +2410. [bug] Correctly delete m_versionInfo. [RT #18432] + +2408. [bug] A duplicate TCP dispatch event could be sent, which + could then trigger an assertion failure in + resquery_response(). [RT #18275] + +2407. [port] hpux: test for sys/dyntune.h. [RT #18421] 2404. [port] hpux: files unlimited support. @@ -22,7 +162,7 @@ 2399. [bug] Abort timeout queries to reduce the number of open UDP sockets. [RT #18367] -2398. [bug] Improve file descriptor management. New, +2398. [bug] Improve file descriptor management. New, temporary, named.conf option reserved-sockets, default 512. [RT #18344] @@ -39,11 +179,111 @@ 2392. [bug] remove 'grep -q' from acl test script, some platforms don't support it. [RT #18253] - --- 9.3.5-P1 released --- +2391 [port] hpux: cover additional recvmsg() error codes. + [RT #18301] + +2390 [bug] dispatch.c could make a false warning on 'odd socket'. + [RT #18301]. + +2389 [bug] Move the "working directory writable" check to after + the ns_os_changeuser() call. [RT #18326] + +2386. [func] Add warning about too small 'open files' limit. + [RT #18269] + +2385. [bug] A condition variable in socket.c could leak in + rare error handling [RT #17968]. + +2384. [security] Additional support for query port randomization (change + #2375) including performance improvement and port range + specification. [RT #17949, #18098] + +2383. [bug] named could double queries when they resulted in + SERVFAIL due to overkilling EDNS0 failure detection. + [RT #18182] + +2382. [doc] Add a description SSHFP to ARM. + +2380. [bug] dns_view_find() was not returning NXDOMAIN/NXRRSET + proofs which, in turn, caused validation failures + for insecure zones immediately below a secure zone + the server was authoritative for. [RT #18112] -2375. [security] Fully randomize UDP query ports to improve +2379. [contrib] queryperf/gen-data-queryperf.py: removed redundant + TLDs and supported RRs with TTLs [RT #17972] + +2377. [bug] Address race condition in dnssec-signzone. [RT #18142] + +2376. [bug] Change #2144 was not complete. + +2375. [security] Fully randomize UDP query ports to improve forgery resilience. [RT #17949] +2369. [bug] libbind: Array bounds overrun on read in bitncmp(). + [RT #18054] + +2364. [bug] named could trigger an assertion when serving a + malformed signed zone. [RT #17828] + +2363. [port] sunos: pre-set "lt_cv_sys_max_cmd_len=4096;". + [RT #17513] + +2361. [bug] "recursion" statistics counter could be counted + multiple times for a single query. [RT #17990] + +2358. [doc] Update host's default query description. [RT #17934] + +2356. [bug] Built in mutex profiler was not scalable enough. + [RT #17436] + +2353. [func] libbind: nsid support. [RT #17091] + +2350. [port] win32: IPv6 support. [RT #17797] + +2347. [bug] Delete now traverses the RB tree in the canonical + order. [RT #17451] + +2345. [bug] named-checkconf failed to detect when forwarders + were set at both the options/view level and in + a root zone. [RT #17671] + +2344. [bug] Improve "logging{ file ...; };" documentation. + [RT #17888] + +2343. [bug] (Seemingly) duplicate IPv6 entries could be + created in ADB. [RT #17837] + +2341. [bug] libbind: add missing -I../include for off source + tree builds. [RT #17606] + +2340. [port] openbsd: interface configuration. [RT #17700] + +2335. [port] sunos: libbind and *printf() support for long long. + [RT #17513] + +2334. [bug] Bad REQUIRES in fromstruct_in_naptr(), off by one + bug in fromstruct_txt(). [RT #17609] + +2333. [bug] Fix off by one error in isc_time_nowplusinterval(). + [RT #17608] + +2332. [contrib] query-loc-0.4.0. [RT #17602] + +2331. [bug] Failure to regenerate any signatures was not being + reported nor being past back to the UPDATE client. + [RT #17570] + +2330. [bug] Remove potential race condition when handling + over memory events. [RT #17572] + + WARNING: API CHANGE: over memory callback + function now needs to call isc_mem_waterack(). + See for details. + +2329. [bug] Clearer help text for dig's '-x' and '-i' options. + +2325. [port] Linux: use capset() function if available. [RT #17557] + --- 9.3.5 released --- --- 9.3.5rc2 released --- @@ -65,11 +305,11 @@ 2322. [port] MacOS: work around the limitation of setrlimit() for RLIMIT_NOFILE. [RT #17526] -2321. [bug] Silence Coverity warnings in lib/dns/master.c, +2321. [bug] Silence Coverity warnings in lib/dns/master.c, lib/dns/rbtdb.c, lib/isccfg/namedconf.c, lib/dns/tsig.c and bin/dnssec/dnssec-signzone.c. -2319. [bug] Silence Coverity warnings in +2319. [bug] Silence Coverity warnings in lib/dns/rdata/in_1/apl_42.c. [RT #17469] 2318. [port] sunos fixes for libbind. [RT #17514] @@ -83,7 +323,7 @@ 2312. [cleanup] Silence Coverity warning in lib/isc/unix/socket.c. [RT #17458] -2311. [func] Update ACL regression test. [RT #17462] +2311. [func] Update ACL regression test. [RT #17462] 2310. [bug] dig, host, nslookup: flush stdout before emitting debug/fatal messages. [RT #17501] @@ -106,7 +346,7 @@ 2301. [bug] Remove resource leak and fix error messages in bin/tests/system/lwresd/lwtest.c. [RT #17474] -2300. [bug] Fixed failure to close open file in +2300. [bug] Fixed failure to close open file in bin/tests/names/t_names.c. [RT #17473] 2299. [bug] Remove unnecessary NULL check in @@ -129,7 +369,7 @@ 2292. [bug] Log if the working directory is not writable. [RT #17312] -2291. [bug] PR_SET_DUMPABLE may be set too late. Also report +2291. [bug] PR_SET_DUMPABLE may be set too late. Also report failure to set PR_SET_DUMPABLE. [RT #17312] 2290. [bug] Let AD in the query signal that the client wants AD @@ -148,7 +388,7 @@ memory context rather than the clients memory context. [RT #17377] -2279. [bug] Use setsockopt(SO_NOSIGPIPE), when available, +2279. [bug] Use setsockopt(SO_NOSIGPIPE), when available, to protect applications from receiving spurious SIGPIPE signals when using the resolver. @@ -157,7 +397,7 @@ --- 9.3.5b1 released --- -2273. [bug] Adjust log level to WARNING when saving inconsistant +2273. [bug] Adjust log level to WARNING when saving inconsistent stub/slave master and journal files. [RT# 17279] 2272. [bug] Handle illegal dnssec-lookaside trust-anchor names. @@ -194,10 +434,10 @@ reality. Note there is behaviour change for BIND 9.5. [RT #17113] -2249. [bug] Only set Authentic Data bit if client requested +2249. [bug] Only set Authentic Data bit if client requested DNSSEC, per RFC 3655 [RT #17175] -2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] +2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] 2247. [doc] Sort doc/misc/options. [RT #17067] @@ -208,18 +448,18 @@ working. [RT #17151] 2238. [bug] It was possible to trigger a REQUIRE when a - validation was cancelled. [RT #17106] + validation was canceled. [RT #17106] 2237. [bug] libbind: res_init() was not thread aware. [RT #17123] 2236. [bug] dnssec-signzone failed to preserve the case of of wildcard owner names. [RT #17085] -2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] - +2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] + 2229. [bug] Null pointer dereference on query pool creation - failure. [RT #17133] - + failure. [RT #17133] + 2232. [bug] dns_adb_findaddrinfo() could fail and return ISC_R_SUCCESS. [RT #17137] @@ -230,10 +470,10 @@ 2227. [cleanup] Tidied up the FAQ. [RT #17121] -2226. [bug] Fix build error. [RT #17124] +2226. [bug] Fix build error. [RT #17124] 2225. [bug] More support for systems with no IPv4 addresses. - [RT #17111] + [RT #17111] 2224. [bug] Defer journal compaction if a xfrin is in progress. [RT #17119] @@ -247,12 +487,12 @@ 2220. [bug] win32: Address a race condition in final shutdown of the Windows socket code. [RT #17028] - + 2218. [bug] Remove unnecessary REQUIRE from dns_validator_create(). [RT #16976] 2216. [cleanup] Fix a number of errors reported by Coverity. - [RT #17094] + [RT #17094] 2214. [bug] Deregister OpenSSL lock callback when cleaning up. [RT #17098] @@ -297,7 +537,7 @@ 2187. [bug] query_addds(), query_addwildcardproof() and query_addnxrrsetnsec() should take a version - arguement. [RT #16368] + argument. [RT #16368] 2186. [port] cygwin: libbind: check for struct sockaddr_storage independently of IPv6. [RT #16482] @@ -324,7 +564,7 @@ debug level 10+. [RT #16798] 2176. [contrib] dbus update to handle race condition during - initialisation (Bugzilla 235809). [RT #16842] + initialization (Bugzilla 235809). [RT #16842] 2175. [bug] win32: windows broadcast condition variable support was broken. [RT #16592] @@ -444,7 +684,7 @@ 2111. [bug] Fix a number of errors reported by Coverity. [RT #16507] -2110. [bug] "minimal-response yes;" interacted badly with BIND 8 +2110. [bug] "minimal-responses yes;" interacted badly with BIND 8 priming queries. [RT #16491] 2109. [port] libbind: silence aix 5.3 compiler warnings. [RT #16502] @@ -453,7 +693,7 @@ 2203. [security] Query id generation was cryptographically weak. [RT # 16915] - + 2193. [port] win32: BINDInstall.exe is now linked statically. [RT #16906] @@ -463,7 +703,7 @@ --- 9.3.4 released --- -2126. [security] Serialise validation of type ANY responses. [RT #16555] +2126. [security] Serialize validation of type ANY responses. [RT #16555] 2124. [security] It was possible to dereference a freed fetch context. [RT #16584] @@ -477,14 +717,14 @@ 2103. [port] Add /usr/sfw to list of locations for OpenSSL under Solaris. -2102. [port] Silence solaris 10 warnings. +2102. [port] Silence Solaris 10 warnings. 2101. [bug] OpenSSL version checks were not quite right. [RT #16476] 2100. [port] win32: copy libeay32.dll to Build\Debug. -2099. [port] win32: more manifiest issues. +2099. [port] win32: more manifest issues. --- 9.3.3rc3 released --- @@ -493,12 +733,12 @@ 2095. [port] libbind: alway prototype inet_cidr_ntop_ipv6() and net_cidr_ntop_ipv6(). [RT #16388] - + 2094. [contrib] Update named-bootconf. [RT# 16404] 2092. [bug] win32: dig, host, nslookup. Use registry config if resolv.conf does not exist or no nameservers - listed. [RT #15877] + listed. [RT #15877] 2091. [port] dighost.c: race condition on cleanup. [RT #16417] @@ -588,7 +828,7 @@ [RT #16287] 2049. [bug] Restore SOA before AXFR when falling back from - a attempted IXFR when transfering in a zone. + a attempted IXFR when transferring in a zone. Allow a initial SOA query before attempting a AXFR to be requested. [RT #16156] @@ -597,7 +837,7 @@ the OS always returned the same local port. [RT #16182] -2047. [bug] Failed to initialise the interface flags to zero. +2047. [bug] Failed to initialize the interface flags to zero. [RT #16245] 2043. [port] nsupdate/nslookup: Force the flushing of the prompt @@ -626,7 +866,7 @@ 2029. [bug] host printed out the server multiple times when specified on the command line. [RT #15992] -2028. [port] linux: socket.c compatability for old systems. +2028. [port] linux: socket.c compatibility for old systems. [RT #16015] 2027. [port] libbind: Solaris x86 support. [RT #16020] @@ -634,7 +874,7 @@ 2026. [bug] Rate limit the two recursive client exceeded messages. [RT #16044] -2024. [bug] named emited spurious "zone serial unchanged" +2024. [bug] named emitted spurious "zone serial unchanged" messages on reload. [RT #16027] 2023. [bug] "make install" should create ${localstatedir}/run and @@ -647,7 +887,7 @@ 2013. [bug] Handle unexpected TSIGs on unsigned AXFR/IXFR responses more gracefully. [RT #15941] -2009. [bug] libbind: coverity fixes. [RT #15808] +2009. [bug] libbind: Coverity fixes. [RT #15808] 2005. [bug] libbind: Retransmission timeouts should be based on which attempt it is to the nameserver @@ -679,16 +919,16 @@ 1994. [port] OpenSSL 0.9.8 support. [RT #15694] -1993. [bug] Log messsage, via syslog, were missing the space +1993. [bug] Log messages, via syslog, were missing the space after the timestamp if "print-time yes" was specified. [RT #15844] 1991. [cleanup] The configuration data, once read, should be treated - as readonly. Expand the use of const to enforce this + as read only. Expand the use of const to enforce this at compile time. [RT #15813] 1990. [bug] libbind: isc's override of broken gettimeofday() - implementions was not always effective. + implementations was not always effective. [RT #15709] 1989. [bug] win32: don't check the service password when @@ -703,7 +943,7 @@ server for the zone. Also any zones that contain DLV records should be removed when upgrading a slave zone. You do not however have to upgrade all - servers for a zone with DLV records simultaniously. + servers for a zone with DLV records simultaneously. 1982. [bug] DNSKEY was being accepted on the parent side of a delegation. KEY is still accepted there for @@ -728,7 +968,7 @@ 1974. [doc] List each of the zone types and associated zone options separately in the ARM. -1972. [contrib] DBUS dynamic forwarders integation from +1972. [contrib] DBUS dynamic forwarders integration from Jason Vas Dias . 1971. [port] linux: make detection of missing IF_NAMESIZE more @@ -745,7 +985,7 @@ 1966. [bug] Don't set CD when we have fallen back to plain DNS. [RT #15727] -1963. [port] Tru64 4.0E doesn't support send() and recv(). +1963. [port] Tru64 4.0E doesn't support send() and recv(). [RT #15586] 1962. [bug] Named failed to clear old update-policy when it @@ -767,7 +1007,7 @@ by native compiler. See README for additional cross compile support information. [RT #15148] -1955. [bug] Pre-allocate the cache cleaning interator. [RT #14998] +1955. [bug] Pre-allocate the cache cleaning iterator. [RT #14998] 1952. [port] hpux: tell the linker to build a runtime link path "-Wl,+b:". [RT #14816]. @@ -775,7 +1015,7 @@ 1951. [security] Drop queries from particular well known ports. Don't return FORMERR to queries from particular well known ports. [RT #15636] - + 1950. [port] Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket. This prevents the source address being set for TCP connections. [RT #15628] @@ -803,7 +1043,7 @@ 1940. [bug] Fixed a number of error conditions reported by Coverity. -1939. [bug] The resolver could dereference a null pointer after +1939. [bug] The resolver could dereference a null pointer after validation if all the queries have timed out. [RT #15528] @@ -848,7 +1088,7 @@ 1914. [protocol] DS is required to accept mnemonic algorithms (RFC 4034). Still emit numeric algorithms for - compatability with RFC 3658. [RT #15354] + compatibility with RFC 3658. [RT #15354] 1911. [bug] Update windows socket code. [RT #14965] @@ -892,7 +1132,7 @@ 1881. [func] Add a system test for named-checkconf. [RT #14931] 1877. [bug] Fix unreasonably low quantum on call to - dns_rbt_destroy2(). Remove unnecessay unhash_node() + dns_rbt_destroy2(). Remove unnecessary unhash_node() call. [RT #14919] 1875. [bug] process_dhtkey() was using the wrong memory context @@ -951,24 +1191,24 @@ 1850. [bug] Memory leak in lwres_getipnodebyaddr(). [RT #14591] 1849. [doc] All forms of the man pages (docbook, man, html) should - have consistant copyright dates. + have consistent copyright dates. 1848. [bug] Improve SMF integration. [RT #13238] 1847. [bug] isc_ondestroy_init() is called too late in - dns_rbtdb_create()/dns_rbtdb64_create(). + dns_rbtdb_create()/dns_rbtdb64_create(). [RT #13661] - + 1846. [contrib] query-loc-0.3.0 from Stephane Bortzmeyer . -1845. [bug] Improve error reporting to distingish between +1845. [bug] Improve error reporting to distinguish between accept()/fcntl() and socket()/fcntl() errors. [RT #13745] 1844. [bug] inet_pton() accepted more that 4 hexadecimal digits for each 16 bit piece of the IPv6 address. The text - representation of a IPv6 address has been tighted + representation of a IPv6 address has been tightened to disallow this (draft-ietf-ipv6-addr-arch-v4-02.txt). [RT #5662] @@ -1026,7 +1266,7 @@ 1822. [bug] check-names test for RT was reversed. [RT #13382] -1821. [doc] acls definitions are no longer required to be +1821. [doc] acls definitions are no longer required to be in named.conf prior to reference. They can be defined after being referenced. @@ -1052,7 +1292,7 @@ 1807. [bug] When forwarding (forward only) set the active domain from the forward zone name. [RT #13526] - + 1804. [bug] Ensure that if we are queried for glue that it fits in the additional section or TC is set to tell the client to retry using TCP. [RT #10114] @@ -1165,7 +1405,7 @@ 1765. [bug] configure --with-openssl=auto failed. [RT #12937] 1764. [bug] dns_zone_replacedb failed to emit a error message - if there was no SOA record in the replacment db. + if there was no SOA record in the replacement db. [RT #13016] 1762. [bug] isc_interfaceiter_create() could return ISC_R_SUCCESS @@ -1180,7 +1420,7 @@ 1759. [bug] Named failed to startup if the OS supported IPv6 but had no IPv6 interfaces configured. [RT #12942] -1754. [bug] We wern't always attempting to query the parent +1754. [bug] We weren't always attempting to query the parent server for the DS records at the zone cut. [RT #12774] @@ -1199,7 +1439,7 @@ 1749. [bug] 'check-names response ignore;' failed to ignore. [RT #12866] -1747. [bug] BIND 8 compatability: named/named-checkconf failed +1747. [bug] BIND 8 compatibility: named/named-checkconf failed to parse "host-statistics-max" in named.conf. 1745. [bug] Dig/host/nslookup accept replies from link locals @@ -1213,7 +1453,7 @@ requested number of worker threads then destruction of the manager would trigger an INSIST() failure. [RT #12790] - + 1742. [bug] Deleting all records at a node then adding a previously existing record, in a single UPDATE transaction, failed to leave / regenerate the @@ -1224,7 +1464,7 @@ 1740. [bug] Replace rbt's hash algorithm as it performed badly with certain zones. [RT #12729] - + NOTE: a hash context now needs to be established via isc_hash_create() if the application was not already doing this. @@ -1239,7 +1479,7 @@ 1736. [bug] dst_key_fromnamedfile() could fail to read a public key. [RT #12687] - + 1735. [bug] 'dig +sigtrace' could die with a REQUIRE failure. [RE #12688] @@ -1277,7 +1517,7 @@ [RT #12519] 1721. [bug] Error message from the journal processing were not - always identifing the relevent journal. [RT #12519] + always identifying the relevant journal. [RT #12519] 1720. [bug] 'dig +chase' did not terminate on a RFC 2308 Type 1 negative response. [RT #12506] @@ -1330,7 +1570,7 @@ 1703. [bug] named would loop sending NOTIFY messages when it failed to receive a response. [RT #12322] -1702. [bug] also-notify should not be applied to builtin zones. +1702. [bug] also-notify should not be applied to built in zones. [RT #12323] 1701. [doc] A minimal named.conf man page. @@ -1402,7 +1642,7 @@ 1675. [bug] named would sometimes add extra NSEC records to the authority section. - + 1674. [port] linux: increase buffer size used to scan /proc/net/if_inet6. @@ -1473,7 +1713,7 @@ 1648. [func] Update dnssec-lookaside named.conf syntax to support multiple dnssec-lookaside namespaces (not yet - implemented). + implemented). 1647. [bug] It was possible trigger a INSIST when chasing a DS record that required walking back over a empty node. @@ -1486,7 +1726,7 @@ masters with keys are specified. 1644. [bug] Update the journal modification time after a - sucessfull refresh query. [RT #11436] + successful refresh query. [RT #11436] 1643. [bug] dns_db_closeversion() could leak memory / node references. [RT #11163] @@ -1505,11 +1745,11 @@ 1638. [bug] "ixfr-from-differences" could generate a REQUIRE failure if the journal open failed. [RT #11347] - + 1637. [bug] Node reference leak on error in addnoqname(). 1636. [bug] The dump done callback could get ISC_R_SUCCESS even if - a error had occured. The database version no longer + a error had occurred. The database version no longer matched the version of the database that was dumped. 1635. [bug] Memory leak on error in query_addds(). @@ -1542,7 +1782,7 @@ 1625. [bug] named failed to load/transfer RFC2535 signed zones which contained CNAMES. [RT# 11237] -1606. [bug] DLV insecurity proof was failing. +1606. [bug] DLV insecurity proof was failing. 1605. [func] New dns_db_find() option DNS_DBFIND_COVERINGNSEC. @@ -1618,14 +1858,14 @@ 1604. [bug] A xfrout_ctx_create() failure would result in xfrout_ctx_destroy() being called with a partially initialized structure. - + 1603. [bug] nsupdate: set interactive based on isatty(). [RT# 10929] 1602. [bug] Logging to a file failed unless a size was specified. [RT# 10925] -1601. [bug] Silence spurious warning 'both "recursion no;" and +1601. [bug] Silence spurious warning 'both "recursion no;" and "allow-recursion" active' warning from view "_bind". [RT# 10920] @@ -1860,7 +2100,7 @@ type, class and responding nameserver. 1511. [bug] delegation-only was generating false positives - on negative answers from subzones. + on negative answers from sub-zones. 1510. [func] New view option "root-delegation-only". Apply delegation-only check to all TLDs and root. @@ -3568,7 +3808,7 @@ 954. [bug] When requesting AXFRs or IXFRs using dig, host, or nslookup, the RD bit should not be set as zone - transfers are inherently nonrecursive. [RT #1575] + transfers are inherently non-recursive. [RT #1575] 953. [func] The /var/run/named.key file from change #843 has been replaced by /etc/rndc.key. Both @@ -3841,7 +4081,7 @@ 860. [func] Drop cross class glue in zone transfers. 859. [bug] Cache cleaning now won't swamp the CPU if there - is a persistent overlimit condition. + is a persistent over limit condition. 858. [func] isc_mem_setwater() no longer requires that when the callback function is non-NULL then its hi_water @@ -4017,7 +4257,7 @@ 811. [bug] Parentheses were not quoted in zone dumps. [RT #1194] 810. [bug] The signer name in SIG records was not properly - downcased when signing/verifying records. [RT #1186] + down-cased when signing/verifying records. [RT #1186] 809. [bug] Configuring a non-local address as a transfer-source could cause an assertion failure during load. @@ -4029,9 +4269,9 @@ ignored like it should be. 806. [bug] DNS_R_SEENINCLUDE was failing to propagate back up - the calling stack to the zone maintence level, causing - zones to not reload when an included file was touched - but the top-level zone file was not. + the calling stack to the zone maintenance level, + causing zones to not reload when an included file was + touched but the top-level zone file was not. 805. [bug] When using "forward only", missing root hints should not cause queries to fail. [RT #1143] @@ -4071,7 +4311,7 @@ in rndc.conf. 793. [cleanup] The DNSSEC tools could create filenames that were - illegal or contained shell metacharacters. They + illegal or contained shell meta-characters. They now use a different text encoding of names that doesn't have these problems. [RT #1101] @@ -4095,7 +4335,7 @@ names when mapping them into file names. 786. [bug] When DNSSEC signing/verifying data, owner names were - not properly downcased. + not properly down-cased. 785. [bug] A race condition in the resolver could cause an assertion failure. [RT #673, #872, #1048] @@ -4114,7 +4354,7 @@ 780. [bug] Error handling code dealing with out of memory or other rare errors could lead to assertion failures - by calling functions on unitialized names. [RT #1065] + by calling functions on uninitialized names. [RT #1065] 779. [func] Added the "minimal-responses" option. @@ -4257,7 +4497,7 @@ 735. [doc] Add BIND 4 migration notes. 734. [bug] An attempt to re-lock the zone lock could occur if - the server was shutdown during a zone tranfer. + the server was shutdown during a zone transfer. [RT #830] 733. [bug] Reference counts of dns_acl_t objects need to be @@ -4397,7 +4637,7 @@ 688. [func] "make tags" now works on systems with the "Exuberant Ctags" etags. - 687. [bug] Only say we have IPv6, with sufficent functionality, + 687. [bug] Only say we have IPv6, with sufficient functionality, if it has actually been tested. [RT #586] 686. [bug] dig and nslookup can now be properly aborted during @@ -4713,7 +4953,7 @@ --- 9.1.0b1 released --- 591. [bug] Work around non-reentrancy in openssl by disabling - precomputation in keys. + pre-computation in keys. 590. [doc] There are now man pages for the lwres library in doc/man/lwres. @@ -4762,7 +5002,7 @@ source address for notify messages. 577. [func] Log illegal RDATA combinations. e.g. multiple - singlton types, cname and other data. + singleton types, cname and other data. 576. [doc] isc_log_create() description did not match reality. @@ -4773,7 +5013,7 @@ have their responses validated and would leak memory. 573. [bug] The journal files of IXFRed slave zones were - inadvertantly discarded on server reload, causing + inadvertently discarded on server reload, causing "journal out of sync with zone" errors on subsequent reloads. [RT #482] @@ -4938,7 +5178,7 @@ others). 519. [bug] dns_name_split() would improperly split some bitstring - labels, zeroing a few of the least signficant bits in + labels, zeroing a few of the least significant bits in the prefix part. When such an improperly created prefix was returned to the RBT database, the bogus label was dutifully stored, corrupting the tree. @@ -4966,7 +5206,7 @@ 513. [func] New functionality added to rdnc and server to allow individual zones to be refreshed or reloaded. - 512. [bug] The zone transfer code could throw an execption with + 512. [bug] The zone transfer code could throw an exception with an invalid IXFR stream. 511. [bug] The message code could throw an assertion on an @@ -5157,7 +5397,7 @@ 452. [bug] Warn if the unimplemented option "statistics-file" is specified in named.conf. [RT #301] - 451. [func] Update forwarding implememted. + 451. [func] Update forwarding implemented. 450. [func] New function ns_client_sendraw(). @@ -5258,7 +5498,7 @@ e.g. due to corrupt zones with multiple SOA records. [RT #279] - 423. [bug] When responding to a recusive query, errors that occur + 423. [bug] When responding to a recursive query, errors that occur after following a CNAME should cause the query to fail. [RT #274] @@ -5303,7 +5543,7 @@ 409. [bug] If named was shut down early in the startup process, ns_omapi_shutdown() would attempt to lock - an unintialized mutex. [RT #262] + an uninitialized mutex. [RT #262] 408. [bug] stub zones could leak memory and reference counts if all the masters were unreachable. @@ -5370,7 +5610,7 @@ making the functions dns_zone_adddbarg() and dns_zone_cleardbargs() unnecessary. - 389. [bug] Attempting to send a reqeust over IPv6 using + 389. [bug] Attempting to send a request over IPv6 using dns_request_create() on a system without IPv6 support caused an assertion failure [RT #235]. @@ -5427,7 +5667,7 @@ of a very large RRset could cause an assertion failure during logging. - 370. [bug] The error messages for rollforward failures were + 370. [bug] The error messages for roll-forward failures were overly terse. 369. [func] Support new named.conf options, view and zone @@ -5569,7 +5809,7 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 04:33:33 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEA7A106566B; Sat, 10 Jan 2009 04:33:33 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCC9B8FC08; Sat, 10 Jan 2009 04:33:33 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A4XXjV079661; Sat, 10 Jan 2009 04:33:33 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A4XXgI079660; Sat, 10 Jan 2009 04:33:33 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901100433.n0A4XXgI079660@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Jan 2009 04:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187000 - stable/6/lib/bind/isc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 04:33:34 -0000 Author: dougb Date: Sat Jan 10 04:33:33 2009 New Revision: 187000 URL: http://svn.freebsd.org/changeset/base/187000 Log: Add the relevant object and include files for the update to 9.3.6-P1 Modified: stable/6/lib/bind/isc/Makefile Modified: stable/6/lib/bind/isc/Makefile ============================================================================== --- stable/6/lib/bind/isc/Makefile Sat Jan 10 04:30:27 2009 (r186999) +++ stable/6/lib/bind/isc/Makefile Sat Jan 10 04:33:33 2009 (r187000) @@ -30,7 +30,7 @@ SRCS+= inet_pton.c \ hash.c heap.c hex.c hmacmd5.c \ lex.c lfsr.c lib.c log.c md5.c \ mem.c mutexblock.c netaddr.c netscope.c ondestroy.c \ - parseint.c print.c quota.c random.c \ + parseint.c portset.c print.c quota.c random.c \ ratelimiter.c region.c result.c rwlock.c \ serial.c sha1.c sockaddr.c string.c strtoul.c \ symtab.c task.c taskpool.c timer.c version.c @@ -77,6 +77,7 @@ INCS= ${SRCDIR}/include/isc/app.h \ ${SRCDIR}/include/isc/ondestroy.h \ ${SRCDIR}/include/isc/os.h \ ${SRCDIR}/include/isc/parseint.h \ + ${SRCDIR}/include/isc/portset.h \ ${SRCDIR}/include/isc/print.h \ ${SRCDIR}/include/isc/quota.h \ ${SRCDIR}/include/isc/random.h \ From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 04:34:20 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 508961065673; Sat, 10 Jan 2009 04:34:20 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D2BB8FC1D; Sat, 10 Jan 2009 04:34:20 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A4YKto079715; Sat, 10 Jan 2009 04:34:20 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A4YJYQ079711; Sat, 10 Jan 2009 04:34:19 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901100434.n0A4YJYQ079711@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Jan 2009 04:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187001 - in stable/6/lib/bind: . bind isc/isc X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 04:34:21 -0000 Author: dougb Date: Sat Jan 10 04:34:19 2009 New Revision: 187001 URL: http://svn.freebsd.org/changeset/base/187001 Log: Substantive updates to generated files for 9.3.6-P1 Modified: stable/6/lib/bind/bind/config.h stable/6/lib/bind/bind/port_after.h stable/6/lib/bind/config.h stable/6/lib/bind/isc/isc/platform.h Modified: stable/6/lib/bind/bind/config.h ============================================================================== --- stable/6/lib/bind/bind/config.h Sat Jan 10 04:33:33 2009 (r187000) +++ stable/6/lib/bind/bind/config.h Sat Jan 10 04:34:19 2009 (r187001) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ -/* config.h. Generated by configure. */ +/* config.h. Generated from config.h.in by configure. */ /* #undef _SOCKADDR_LEN */ #define HAVE_FCNTL_H 1 #define HAVE_PATHS_H 1 @@ -8,6 +8,7 @@ /* #undef HAVE_STROPTS_H */ #define HAVE_SYS_TIMERS_H 1 #define HAVE_SYS_SELECT_H 1 +#define HAVE_MEMORY_H 1 /* #undef SYS_CDEFS_H */ /* #undef _POSIX_PTHREAD_SEMANTICS */ /* #undef POSIX_GETPWUID_R */ @@ -16,14 +17,19 @@ /* #undef POSIX_GETGRNAM_R */ #define HAVE_MEMMOVE 1 #define HAVE_MEMCHR 1 +/* #undef SPRINTF_CHAR */ +/* #undef VSPRINTF_CHAR */ +#define USE_SYSERROR_LIST 1 +/* #undef NEED_STRTOUL */ +/* #undef NEED_SUN4PROTOS */ /* #undef NEED_SETGROUPENT */ /* #undef NEED_GETGROUPLIST */ /* define if prototype for getgrnam_r() is required */ -/* #undef NEED_GETGRNAM_R */ -/* #undef NEED_GETGRGID_R */ -/* #undef NEED_GETGRENT_R */ +/* #undef NEED_GETGRNAM_R */ +/* #undef NEED_GETGRGID_R */ +/* #undef NEED_GETGRENT_R */ #define NEED_SETGRENT_R 1 #define NEED_ENDGRENT_R 1 @@ -43,9 +49,10 @@ #define HAS_PW_CLASS 1 +/* #undef ssize_t */ /* #undef uintptr_t */ -/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */ +/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */ /* #undef SHUTUP_SPUTAUX */ #ifdef SHUTUP_SPUTAUX struct __sFILE; Modified: stable/6/lib/bind/bind/port_after.h ============================================================================== --- stable/6/lib/bind/bind/port_after.h Sat Jan 10 04:33:33 2009 (r187000) +++ stable/6/lib/bind/bind/port_after.h Sat Jan 10 04:34:19 2009 (r187001) @@ -24,6 +24,10 @@ #undef NEED_DAEMON #undef NEED_STRSEP #undef NEED_STRERROR +#ifdef NEED_STRERROR +const char *isc_strerror(int); +#define strerror isc_strerror +#endif #define HAS_INET6_STRUCTS 1 #define HAVE_SIN6_SCOPE_ID 1 #undef NEED_IN6ADDR_ANY @@ -32,7 +36,6 @@ #undef NEED_GETTIMEOFDAY #undef HAVE_STRNDUP #undef USE_FIONBIO_IOCTL -#undef USE_SYSERROR_LIST #undef INNETGR_ARGS #undef SETNETGRENT_ARGS #define USE_IFNAMELINKID 1 @@ -421,4 +424,80 @@ setnetgrent_r(const char *netgroup, NGR_ NGR_R_SET_RETURN setnetgrent_r(const char *netgroup); #endif + +#ifdef NEED_STRTOUL +unsigned long strtoul(const char *, char **, int); +#endif + +#ifdef NEED_SUN4PROTOS +#include +#ifndef __SIZE_TYPE__ +#define __SIZE_TYPE__ int +#endif +struct sockaddr; +struct iovec; +struct timeval; +struct timezone; +int fprintf(FILE *, const char *, ...); +int getsockname(int, struct sockaddr *, int *); +int getpeername(int, struct sockaddr *, int *); +int socket(int, int, int); +int connect(int, const struct sockaddr *, int); +int writev(int, struct iovec *, int); +int readv(int, struct iovec *, int); +int send(int, const char *, int, int); +void bzero(char *, int); +int recvfrom(int, char *, int, int, struct sockaddr *, int *); +int syslog(int, const char *, ... ); +int printf(const char *, ...); +__SIZE_TYPE__ fread(void *, __SIZE_TYPE__, __SIZE_TYPE__, FILE *); +__SIZE_TYPE__ fwrite(const void *, __SIZE_TYPE__, __SIZE_TYPE__, FILE *); +int fclose(FILE *); +int ungetc(int, FILE *); +int scanf(const char *, ...); +int sscanf(const char *, const char *, ... ); +int tolower(int); +int toupper(int); +int strcasecmp(const char *, const char *); +int strncasecmp(const char *, const char *, int); +int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); +#ifdef gettimeofday +#undef gettimeofday +int gettimeofday(struct timeval *, struct timezone *); +#define gettimeofday isc__gettimeofday +#else +int gettimeofday(struct timeval *, struct timezone *); +#endif +long strtol(const char*, char **, int); +int fseek(FILE *, long, int); +int setsockopt(int, int, int, const char *, int); +int bind(int, const struct sockaddr *, int); +void bcopy(char *, char *, int); +int fputc(char, FILE *); +int listen(int, int); +int accept(int, struct sockaddr *, int *); +int getsockopt(int, int, int, char *, int *); +int vfprintf(FILE *, const char *, va_list); +int fflush(FILE *); +int fgetc(FILE *); +int fputs(const char *, FILE *); +int fchown(int, int, int); +void setbuf(FILE *, char *); +int gethostname(char *, int); +int rename(const char *, const char *); +time_t time(time_t *); +int fscanf(FILE *, const char *, ...); +int sscanf(const char *, const char *, ...); +int ioctl(int, int, caddr_t); +void perror(const char *); + +#if !defined(__USE_FIXED_PROTOTYPES__) && !defined(__cplusplus) && !defined(__STRICT_ANSI__) +/* + * 'gcc -ansi' changes the prototype for vsprintf(). + * Use this prototype when 'gcc -ansi' is not in effect. + */ +char *vsprintf(char *, const char *, va_list); +#endif +#endif + #endif Modified: stable/6/lib/bind/config.h ============================================================================== --- stable/6/lib/bind/config.h Sat Jan 10 04:33:33 2009 (r187000) +++ stable/6/lib/bind/config.h Sat Jan 10 04:34:19 2009 (r187001) @@ -156,6 +156,12 @@ int sigwait(const unsigned int *set, int /* Define if you cannot bind() before connect() for TCP sockets. */ /* #undef BROKEN_TCP_BIND_BEFORE_CONNECT */ +/* Solaris hack to get select_large_fdset. */ +/* #undef FD_SETSIZE */ + +/* Define to 1 if you have the `capset' function. */ +/* #undef HAVE_CAPSET */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_DLFCN_H */ @@ -207,6 +213,15 @@ int sigwait(const unsigned int *set, int /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_CAPABILITY_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DEVPOLL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DYNTUNE_H */ + /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 @@ -283,7 +298,7 @@ int sigwait(const unsigned int *set, int /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus -#define inline +/* #undef inline */ #endif /* Define to `unsigned int' if does not define. */ Modified: stable/6/lib/bind/isc/isc/platform.h ============================================================================== --- stable/6/lib/bind/isc/isc/platform.h Sat Jan 10 04:33:33 2009 (r187000) +++ stable/6/lib/bind/isc/isc/platform.h Sat Jan 10 04:34:19 2009 (r187001) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2007, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: platform.h.in,v 1.24.2.1.10.13 2007/09/13 23:45:58 tbox Exp $ */ +/* $Id: platform.h.in,v 1.24.2.1.10.15 2008/06/25 23:45:37 tbox Exp $ */ #ifndef ISC_PLATFORM_H #define ISC_PLATFORM_H 1 @@ -144,6 +144,21 @@ *** Printing. ***/ +/*! \brief + * Define if the system supports kqueue multiplexing + */ +#define ISC_PLATFORM_HAVEKQUEUE 1 + +/*! \brief + * Define if the system supports epoll multiplexing + */ +#undef ISC_PLATFORM_HAVEEPOLL + +/*! \brief + * Define if the system supports /dev/poll multiplexing + */ +#undef ISC_PLATFORM_HAVEDEVPOLL + /* * If this system needs vsnprintf() and snprintf(), ISC_PLATFORM_NEEDVSNPRINTF * will be defined. From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 04:35:13 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 015B91065674; Sat, 10 Jan 2009 04:35:13 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E36AE8FC14; Sat, 10 Jan 2009 04:35:12 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A4ZC6Z079773; Sat, 10 Jan 2009 04:35:12 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A4ZCLr079772; Sat, 10 Jan 2009 04:35:12 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901100435.n0A4ZCLr079772@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Jan 2009 04:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187002 - stable/6/usr.bin/nsupdate X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 04:35:14 -0000 Author: dougb Date: Sat Jan 10 04:35:12 2009 New Revision: 187002 URL: http://svn.freebsd.org/changeset/base/187002 Log: In 9.3.6-P1 the man page has moved to section 1 Modified: stable/6/usr.bin/nsupdate/Makefile Modified: stable/6/usr.bin/nsupdate/Makefile ============================================================================== --- stable/6/usr.bin/nsupdate/Makefile Sat Jan 10 04:34:19 2009 (r187001) +++ stable/6/usr.bin/nsupdate/Makefile Sat Jan 10 04:35:12 2009 (r187002) @@ -17,7 +17,7 @@ CFLAGS+= -I${SRCDIR}/include DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} -MAN= nsupdate.8 +MAN= nsupdate.1 MANFILTER= sed -e "s@/etc/named\.conf@/etc/namedb/named.conf@g" \ -e "s@^\.HP [0-9]* @@" From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 10:25:26 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27AB5106566C; Sat, 10 Jan 2009 10:25:26 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 14F3E8FC0A; Sat, 10 Jan 2009 10:25:26 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AAPPVt086549; Sat, 10 Jan 2009 10:25:25 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AAPP5b086546; Sat, 10 Jan 2009 10:25:25 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901101025.n0AAPP5b086546@svn.freebsd.org> From: Antoine Brodin Date: Sat, 10 Jan 2009 10:25:25 +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: r187015 - in stable/7: . tools/build/mk X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 10:25:26 -0000 Author: antoine Date: Sat Jan 10 10:25:25 2009 New Revision: 187015 URL: http://svn.freebsd.org/changeset/base/187015 Log: MFC r183002 to stable/7: Add files to remove when WITHOUT_HESIOD is set. This fixes "make check-old" when WITH_HESIOD is set. PR: 122406 MFC after: 1 month Modified: stable/7/ObsoleteFiles.inc stable/7/tools/build/mk/OptionalObsoleteFiles.inc Modified: stable/7/ObsoleteFiles.inc ============================================================================== --- stable/7/ObsoleteFiles.inc Sat Jan 10 09:17:16 2009 (r187014) +++ stable/7/ObsoleteFiles.inc Sat Jan 10 10:25:25 2009 (r187015) @@ -3531,7 +3531,6 @@ OLD_FILES+=usr/games/worm OLD_FILES+=usr/games/worms OLD_FILES+=usr/games/wump OLD_FILES+=sbin/mount_reiserfs -OLD_FILES+=usr/bin/hesinfo OLD_FILES+=usr/include/c++/3.4/ext/demangle.h OLD_FILES+=usr/include/cam/cam_extend.h OLD_FILES+=usr/include/dev/wi/wi_hostap.h @@ -3941,10 +3940,8 @@ OLD_FILES+=usr/share/doc/ntp/release.htm OLD_FILES+=usr/share/doc/ntp/tickadj.htm OLD_FILES+=usr/share/doc/papers/nqnfs.ascii.gz OLD_FILES+=usr/share/doc/papers/px.ascii.gz -OLD_FILES+=usr/share/man/man1/hesinfo.1.gz OLD_FILES+=usr/share/man/man3/mbrune.3.gz OLD_FILES+=usr/share/man/man3/rune.3.gz -OLD_FILES+=usr/share/man/man3/hesiod.3.gz OLD_FILES+=usr/share/man/man3/mac_is_present_np.3.gz OLD_FILES+=usr/share/man/man3/fpsetsticky.3.gz OLD_FILES+=usr/share/man/man3/gss_krb5_copy_ccache.3.gz @@ -3959,7 +3956,6 @@ OLD_FILES+=usr/share/man/man3/setruneloc OLD_FILES+=usr/share/man/man3/setinvalidrune.3.gz OLD_FILES+=usr/share/man/man3/mbrune.3.gz OLD_FILES+=usr/share/man/man3/rune.3.gz -OLD_FILES+=usr/share/man/man3/hesiod.3.gz OLD_FILES+=usr/share/man/man3/mac_is_present_np.3.gz OLD_FILES+=usr/share/man/man3/fpsetsticky.3.gz OLD_FILES+=usr/share/man/man3/gss_krb5_copy_ccache.3.gz @@ -3975,7 +3971,6 @@ OLD_FILES+=usr/share/man/man3/setinvalid OLD_FILES+=usr/share/man/man3/fungetrune.3.gz OLD_FILES+=usr/share/man/man3/fputrune.3.gz OLD_FILES+=usr/share/man/man3/fgetrune.3.gz -OLD_FILES+=usr/share/man/man5/hesiod.conf.5.gz OLD_FILES+=usr/share/man/man5/usbd.conf.5.gz .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" OLD_FILES+=usr/share/man/man8/boot_i386.8.gz Modified: stable/7/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/7/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 10 09:17:16 2009 (r187014) +++ stable/7/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 10 10:25:25 2009 (r187015) @@ -402,9 +402,13 @@ OLD_FILES+=usr/share/man/man1/gcov.1.gz # to be filled in #.endif -#.if ${MK_HESIOD} == no -# to be filled in -#.endif +.if ${MK_HESIOD} == no +OLD_FILES+=usr/bin/hesinfo +OLD_FILES+=usr/include/hesiod.h +OLD_FILES+=usr/share/man/man1/hesinfo.1.gz +OLD_FILES+=usr/share/man/man3/hesiod.3.gz +OLD_FILES+=usr/share/man/man5/hesiod.conf.5.gz +.endif #.if ${MK_HTML} == no # to be filled in From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 10:30:01 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11FE6106566C; Sat, 10 Jan 2009 10:30:01 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E00C78FC08; Sat, 10 Jan 2009 10:30:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 843AE46B32; Sat, 10 Jan 2009 05:30:00 -0500 (EST) Date: Sat, 10 Jan 2009 10:30:00 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Motin In-Reply-To: <200901100041.n0A0fUp3073999@svn.freebsd.org> Message-ID: References: <200901100041.n0A0fUp3073999@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r186991 - stable/7/usr.sbin/powerd X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 10:30:01 -0000 On Sat, 10 Jan 2009, Alexander Motin wrote: > Author: mav > Date: Sat Jan 10 00:41:30 2009 > New Revision: 186991 > URL: http://svn.freebsd.org/changeset/base/186991 > > Log: > Mark that powerd is completely merged. Thanks! This does make it a lot easier to inspect the merge history and look for missing merges. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 11:45:47 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5C7D1065678; Sat, 10 Jan 2009 11:45:47 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91F2E8FC19; Sat, 10 Jan 2009 11:45:47 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ABjl10096428; Sat, 10 Jan 2009 11:45:47 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ABjlKg096426; Sat, 10 Jan 2009 11:45:47 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901101145.n0ABjlKg096426@svn.freebsd.org> From: Antoine Brodin Date: Sat, 10 Jan 2009 11:45:47 +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: r187017 - in stable/7: contrib/telnet contrib/telnet/arpa include include/arpa X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 11:45:48 -0000 Author: antoine Date: Sat Jan 10 11:45:47 2009 New Revision: 187017 URL: http://svn.freebsd.org/changeset/base/187017 Log: MFC r183004 to stable/7: Fix TELOPT(opt) when opt > TELOPT_TN3270E. PR: 127194 Submitted by: Joost Bekkers MFC after: 1 month Modified: stable/7/contrib/telnet/ (props changed) stable/7/contrib/telnet/arpa/telnet.h stable/7/include/ (props changed) stable/7/include/arpa/telnet.h Modified: stable/7/contrib/telnet/arpa/telnet.h ============================================================================== --- stable/7/contrib/telnet/arpa/telnet.h Sat Jan 10 10:58:41 2009 (r187016) +++ stable/7/contrib/telnet/arpa/telnet.h Sat Jan 10 11:45:47 2009 (r187017) @@ -140,8 +140,8 @@ const char *telopts[NTELOPTS+1] = { "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", - "ENCRYPT", "NEW-ENVIRON", "TN3270E", "CHARSET", "COM-PORT", - "KERMIT", + "ENCRYPT", "NEW-ENVIRON", "TN3270E", "XAUTH", "CHARSET", + "RSP", "COM-PORT", "SLE", "STARTTLS", "KERMIT", 0 }; #define TELOPT_FIRST TELOPT_BINARY Modified: stable/7/include/arpa/telnet.h ============================================================================== --- stable/7/include/arpa/telnet.h Sat Jan 10 10:58:41 2009 (r187016) +++ stable/7/include/arpa/telnet.h Sat Jan 10 11:45:47 2009 (r187017) @@ -140,8 +140,8 @@ const char *telopts[NTELOPTS+1] = { "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", - "ENCRYPT", "NEW-ENVIRON", "TN3270E", "CHARSET", "COM-PORT", - "KERMIT", + "ENCRYPT", "NEW-ENVIRON", "TN3270E", "XAUTH", "CHARSET", + "RSP", "COM-PORT", "SLE", "STARTTLS", "KERMIT", 0 }; #define TELOPT_FIRST TELOPT_BINARY From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 14:53:48 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54F541065676; Sat, 10 Jan 2009 14:53:48 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F9DF8FC13; Sat, 10 Jan 2009 14:53:48 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AErmh1000266; Sat, 10 Jan 2009 14:53:48 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AErmLq000261; Sat, 10 Jan 2009 14:53:48 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200901101453.n0AErmLq000261@svn.freebsd.org> From: Robert Noland Date: Sat, 10 Jan 2009 14:53:48 +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: r187021 - in stable/7/sys: . conf dev/drm modules/drm/i915 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 14:53:49 -0000 Author: rnoland Date: Sat Jan 10 14:53:47 2009 New Revision: 187021 URL: http://svn.freebsd.org/changeset/base/187021 Log: MFC most all of drm from HEAD. This brings in the following: Merged /head/sys:r182080,182467-182469,182883-182884,183573, 183603-183605,183828,183830-183834,184212-184213,184263, 184373-184375 - Support for latest Intel chips - Support and fixes for many AMD/ATI chips r500 and below - Support AMD/ATI IGP based chips (rs690/rs485) - Lots of code cleanups - Lots of other fixes and changes since the existing drm is 2+ years old Approved by: kib Added: stable/7/sys/dev/drm/drm_internal.h - copied unchanged from r182080, head/sys/dev/drm/drm_internal.h stable/7/sys/dev/drm/i915_suspend.c - copied, changed from r182080, head/sys/dev/drm/i915_suspend.c stable/7/sys/dev/drm/radeon_microcode.h - copied unchanged from r182080, head/sys/dev/drm/radeon_microcode.h Modified: stable/7/sys/ (props changed) stable/7/sys/conf/files stable/7/sys/dev/drm/ati_pcigart.c stable/7/sys/dev/drm/drm-subprocess.pl stable/7/sys/dev/drm/drm.h stable/7/sys/dev/drm/drmP.h stable/7/sys/dev/drm/drm_agpsupport.c stable/7/sys/dev/drm/drm_atomic.h stable/7/sys/dev/drm/drm_auth.c stable/7/sys/dev/drm/drm_bufs.c stable/7/sys/dev/drm/drm_context.c stable/7/sys/dev/drm/drm_dma.c stable/7/sys/dev/drm/drm_drawable.c stable/7/sys/dev/drm/drm_drv.c stable/7/sys/dev/drm/drm_fops.c stable/7/sys/dev/drm/drm_ioctl.c stable/7/sys/dev/drm/drm_irq.c stable/7/sys/dev/drm/drm_linux_list.h stable/7/sys/dev/drm/drm_lock.c stable/7/sys/dev/drm/drm_memory.c stable/7/sys/dev/drm/drm_pci.c stable/7/sys/dev/drm/drm_pciids.h stable/7/sys/dev/drm/drm_sarea.h stable/7/sys/dev/drm/drm_scatter.c stable/7/sys/dev/drm/drm_sysctl.c stable/7/sys/dev/drm/drm_vm.c stable/7/sys/dev/drm/i915_dma.c stable/7/sys/dev/drm/i915_drm.h stable/7/sys/dev/drm/i915_drv.c stable/7/sys/dev/drm/i915_drv.h stable/7/sys/dev/drm/i915_irq.c stable/7/sys/dev/drm/i915_mem.c stable/7/sys/dev/drm/mach64_dma.c stable/7/sys/dev/drm/mach64_drm.h stable/7/sys/dev/drm/mach64_drv.c stable/7/sys/dev/drm/mach64_drv.h stable/7/sys/dev/drm/mach64_irq.c stable/7/sys/dev/drm/mach64_state.c stable/7/sys/dev/drm/mga_dma.c stable/7/sys/dev/drm/mga_drm.h stable/7/sys/dev/drm/mga_drv.c stable/7/sys/dev/drm/mga_drv.h stable/7/sys/dev/drm/mga_irq.c stable/7/sys/dev/drm/mga_state.c stable/7/sys/dev/drm/mga_warp.c stable/7/sys/dev/drm/r128_cce.c stable/7/sys/dev/drm/r128_drm.h stable/7/sys/dev/drm/r128_drv.c stable/7/sys/dev/drm/r128_drv.h stable/7/sys/dev/drm/r128_irq.c stable/7/sys/dev/drm/r128_state.c stable/7/sys/dev/drm/r300_cmdbuf.c stable/7/sys/dev/drm/r300_reg.h stable/7/sys/dev/drm/radeon_cp.c stable/7/sys/dev/drm/radeon_drm.h stable/7/sys/dev/drm/radeon_drv.c stable/7/sys/dev/drm/radeon_drv.h stable/7/sys/dev/drm/radeon_irq.c stable/7/sys/dev/drm/radeon_mem.c stable/7/sys/dev/drm/radeon_state.c stable/7/sys/dev/drm/savage_bci.c stable/7/sys/dev/drm/savage_drm.h stable/7/sys/dev/drm/savage_drv.c stable/7/sys/dev/drm/savage_drv.h stable/7/sys/dev/drm/savage_state.c stable/7/sys/dev/drm/sis_drv.c stable/7/sys/dev/drm/sis_drv.h stable/7/sys/dev/drm/sis_mm.c stable/7/sys/dev/drm/tdfx_drv.c stable/7/sys/modules/drm/i915/Makefile Modified: stable/7/sys/conf/files ============================================================================== --- stable/7/sys/conf/files Sat Jan 10 14:14:00 2009 (r187020) +++ stable/7/sys/conf/files Sat Jan 10 14:53:47 2009 (r187021) @@ -576,6 +576,7 @@ dev/drm/i915_dma.c optional i915drm dev/drm/i915_drv.c optional i915drm dev/drm/i915_irq.c optional i915drm dev/drm/i915_mem.c optional i915drm +dev/drm/i915_suspend.c optional i915drm dev/drm/mach64_dma.c optional mach64drm dev/drm/mach64_drv.c optional mach64drm dev/drm/mach64_irq.c optional mach64drm Modified: stable/7/sys/dev/drm/ati_pcigart.c ============================================================================== --- stable/7/sys/dev/drm/ati_pcigart.c Sat Jan 10 14:14:00 2009 (r187020) +++ stable/7/sys/dev/drm/ati_pcigart.c Sat Jan 10 14:53:47 2009 (r187021) @@ -1,6 +1,3 @@ -/* ati_pcigart.h -- ATI PCI GART support -*- linux-c -*- - * Created: Wed Dec 13 21:52:19 2000 by gareth@valinux.com - */ /*- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. @@ -32,72 +29,194 @@ #include __FBSDID("$FreeBSD$"); +/** @file ati_pcigart.c + * Implementation of ATI's PCIGART, which provides an aperture in card virtual + * address space with addresses remapped to system memory. + */ + #include "dev/drm/drmP.h" #define ATI_PCIGART_PAGE_SIZE 4096 /* PCI GART page size */ -#define ATI_MAX_PCIGART_PAGES 8192 /* 32 MB aperture, 4K pages */ -#define ATI_PCIGART_TABLE_SIZE 32768 +#define ATI_PCIGART_PAGE_MASK (~(ATI_PCIGART_PAGE_SIZE-1)) + +#define ATI_PCIE_WRITE 0x4 +#define ATI_PCIE_READ 0x8 -int drm_ati_pcigart_init(drm_device_t *dev, drm_ati_pcigart_info *gart_info) +static void +drm_ati_alloc_pcigart_table_cb(void *arg, bus_dma_segment_t *segs, + int nsegs, int error) { - unsigned long pages; - u32 *pci_gart = NULL, page_base; - int i, j; + struct drm_dma_handle *dmah = arg; - if (dev->sg == NULL) { - DRM_ERROR( "no scatter/gather memory!\n" ); - return 0; + if (error != 0) + return; + + KASSERT(nsegs == 1, + ("drm_ati_alloc_pcigart_table_cb: bad dma segment count")); + + dmah->busaddr = segs[0].ds_addr; +} + +static int +drm_ati_alloc_pcigart_table(struct drm_device *dev, + struct drm_ati_pcigart_info *gart_info) +{ + struct drm_dma_handle *dmah; + int flags, ret; + + dmah = malloc(sizeof(struct drm_dma_handle), DRM_MEM_DMA, + M_ZERO | M_NOWAIT); + if (dmah == NULL) + return ENOMEM; + + DRM_UNLOCK(); + ret = bus_dma_tag_create(NULL, PAGE_SIZE, 0, /* tag, align, boundary */ + gart_info->table_mask, BUS_SPACE_MAXADDR, /* lowaddr, highaddr */ + NULL, NULL, /* filtfunc, filtfuncargs */ + gart_info->table_size, 1, /* maxsize, nsegs */ + gart_info->table_size, /* maxsegsize */ + BUS_DMA_ALLOCNOW, NULL, NULL, /* flags, lockfunc, lockfuncargs */ + &dmah->tag); + if (ret != 0) { + free(dmah, DRM_MEM_DMA); + return ENOMEM; } - if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) { - /* GART table in system memory */ - dev->sg->dmah = drm_pci_alloc(dev, ATI_PCIGART_TABLE_SIZE, 0, - 0xfffffffful); - if (dev->sg->dmah == NULL) { - DRM_ERROR("cannot allocate PCI GART table!\n"); - return 0; - } + flags = BUS_DMA_NOWAIT | BUS_DMA_ZERO; + if (gart_info->gart_reg_if == DRM_ATI_GART_IGP) + flags |= BUS_DMA_NOCACHE; - gart_info->addr = (void *)dev->sg->dmah->vaddr; - gart_info->bus_addr = dev->sg->dmah->busaddr; - pci_gart = (u32 *)dev->sg->dmah->vaddr; - } else { - /* GART table in framebuffer memory */ - pci_gart = gart_info->addr; + ret = bus_dmamem_alloc(dmah->tag, &dmah->vaddr, flags, &dmah->map); + if (ret != 0) { + bus_dma_tag_destroy(dmah->tag); + free(dmah, DRM_MEM_DMA); + return ENOMEM; } - - pages = DRM_MIN(dev->sg->pages, ATI_MAX_PCIGART_PAGES); + DRM_LOCK(); - bzero(pci_gart, ATI_PCIGART_TABLE_SIZE); + ret = bus_dmamap_load(dmah->tag, dmah->map, dmah->vaddr, + gart_info->table_size, drm_ati_alloc_pcigart_table_cb, dmah, 0); + if (ret != 0) { + bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); + bus_dma_tag_destroy(dmah->tag); + free(dmah, DRM_MEM_DMA); + return ENOMEM; + } - KASSERT(PAGE_SIZE >= ATI_PCIGART_PAGE_SIZE, ("page size too small")); + dev->sg->dmah = dmah; - for ( i = 0 ; i < pages ; i++ ) { - page_base = (u32) dev->sg->busaddr[i]; + return 0; +} - for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) { - if (gart_info->is_pcie) - *pci_gart = (cpu_to_le32(page_base) >> 8) | 0xc; - else - *pci_gart = cpu_to_le32(page_base); - pci_gart++; - page_base += ATI_PCIGART_PAGE_SIZE; - } +static void +drm_ati_free_pcigart_table(struct drm_device *dev, + struct drm_ati_pcigart_info *gart_info) +{ + struct drm_dma_handle *dmah = dev->sg->dmah; + + bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); + bus_dma_tag_destroy(dmah->tag); + free(dmah, DRM_MEM_DMA); + dev->sg->dmah = NULL; +} + +int +drm_ati_pcigart_cleanup(struct drm_device *dev, + struct drm_ati_pcigart_info *gart_info) +{ + /* we need to support large memory configurations */ + if (dev->sg == NULL) { + DRM_ERROR("no scatter/gather memory!\n"); + return 0; } - DRM_MEMORYBARRIER(); + if (gart_info->bus_addr) { + if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) { + gart_info->bus_addr = 0; + if (dev->sg->dmah) + drm_ati_free_pcigart_table(dev, gart_info); + } + } return 1; } -int drm_ati_pcigart_cleanup(drm_device_t *dev, drm_ati_pcigart_info *gart_info) +int +drm_ati_pcigart_init(struct drm_device *dev, + struct drm_ati_pcigart_info *gart_info) { + void *address = NULL; + unsigned long pages; + u32 *pci_gart, page_base; + dma_addr_t bus_address = 0; + dma_addr_t entry_addr; + int i, j, ret = 0; + int max_pages; + + /* we need to support large memory configurations */ if (dev->sg == NULL) { - DRM_ERROR( "no scatter/gather memory!\n" ); - return 0; + DRM_ERROR("no scatter/gather memory!\n"); + goto done; } - drm_pci_free(dev, dev->sg->dmah); + if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) { + DRM_DEBUG("PCI: no table in VRAM: using normal RAM\n"); - return 1; + ret = drm_ati_alloc_pcigart_table(dev, gart_info); + if (ret) { + DRM_ERROR("cannot allocate PCI GART page!\n"); + goto done; + } + + address = (void *)dev->sg->dmah->vaddr; + bus_address = dev->sg->dmah->busaddr; + } else { + address = gart_info->addr; + bus_address = gart_info->bus_addr; + DRM_DEBUG("PCI: Gart Table: VRAM %08X mapped at %08lX\n", + (unsigned int)bus_address, (unsigned long)address); + } + + pci_gart = (u32 *) address; + + max_pages = (gart_info->table_size / sizeof(u32)); + pages = (dev->sg->pages <= max_pages) + ? dev->sg->pages : max_pages; + + memset(pci_gart, 0, max_pages * sizeof(u32)); + + KASSERT(PAGE_SIZE >= ATI_PCIGART_PAGE_SIZE, ("page size too small")); + + for (i = 0; i < pages; i++) { + entry_addr = dev->sg->busaddr[i]; + for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) { + page_base = (u32) entry_addr & ATI_PCIGART_PAGE_MASK; + switch(gart_info->gart_reg_if) { + case DRM_ATI_GART_IGP: + page_base |= + (upper_32_bits(entry_addr) & 0xff) << 4; + page_base |= 0xc; + break; + case DRM_ATI_GART_PCIE: + page_base >>= 8; + page_base |= + (upper_32_bits(entry_addr) & 0xff) << 24; + page_base |= ATI_PCIE_READ | ATI_PCIE_WRITE; + break; + default: + case DRM_ATI_GART_PCI: + break; + } + *pci_gart = cpu_to_le32(page_base); + pci_gart++; + entry_addr += ATI_PCIGART_PAGE_SIZE; + } + } + + ret = 1; + + done: + gart_info->addr = address; + gart_info->bus_addr = bus_address; + return ret; } Modified: stable/7/sys/dev/drm/drm-subprocess.pl ============================================================================== --- stable/7/sys/dev/drm/drm-subprocess.pl Sat Jan 10 14:14:00 2009 (r187020) +++ stable/7/sys/dev/drm/drm-subprocess.pl Sat Jan 10 14:53:47 2009 (r187021) @@ -37,6 +37,7 @@ while (<>) { s/#include "(.*)_drm.h/#include "dev\/drm\/\1_drm.h/; s/#include "mga_ucode.h/#include "dev\/drm\/mga_ucode.h/; s/#include "r300_reg.h/#include "dev\/drm\/r300_reg.h/; + s/#include "radeon_microcode.h/#include "dev\/drm\/radeon_microcode.h/; s/#include "sis_ds.h/#include "dev\/drm\/sis_ds.h/; s/#include "drm/#include "dev\/drm\/drm/; print; @@ -47,4 +48,4 @@ while (<>) { # if we never found the copyright header, then we're still a line behind. if (!$foundopening) { print $lastline; -} \ No newline at end of file +} Modified: stable/7/sys/dev/drm/drm.h ============================================================================== --- stable/7/sys/dev/drm/drm.h Sat Jan 10 14:14:00 2009 (r187020) +++ stable/7/sys/dev/drm/drm.h Sat Jan 10 14:53:47 2009 (r187021) @@ -64,6 +64,9 @@ __FBSDID("$FreeBSD$"); #ifndef __user #define __user #endif +#ifndef __iomem +#define __iomem +#endif #ifdef __GNUC__ # define DEPRECATED __attribute__ ((deprecated)) @@ -72,9 +75,6 @@ __FBSDID("$FreeBSD$"); #endif #if defined(__linux__) -#if defined(__KERNEL__) -#include -#endif #include /* For _IO* macros */ #define DRM_IOCTL_NR(n) _IOC_NR(n) #define DRM_IOC_VOID _IOC_NONE @@ -83,14 +83,7 @@ __FBSDID("$FreeBSD$"); #define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE #define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size) #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) -#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && defined(IN_MODULE) -/* Prevent name collision when including sys/ioccom.h */ -#undef ioctl -#include -#define ioctl(a,b,c) xf86ioctl(a,b,c) -#else #include -#endif /* __FreeBSD__ && xf86ioctl */ #define DRM_IOCTL_NR(n) ((n) & 0xff) #define DRM_IOC_VOID IOC_VOID #define DRM_IOC_READ IOC_OUT @@ -99,24 +92,6 @@ __FBSDID("$FreeBSD$"); #define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size) #endif -#define XFREE86_VERSION(major,minor,patch,snap) \ - ((major << 16) | (minor << 8) | patch) - -#ifndef CONFIG_XFREE86_VERSION -#define CONFIG_XFREE86_VERSION XFREE86_VERSION(4,1,0,0) -#endif - -#if CONFIG_XFREE86_VERSION < XFREE86_VERSION(4,1,0,0) -#define DRM_PROC_DEVICES "/proc/devices" -#define DRM_PROC_MISC "/proc/misc" -#define DRM_PROC_DRM "/proc/drm" -#define DRM_DEV_DRM "/dev/drm" -#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) -#define DRM_DEV_UID 0 -#define DRM_DEV_GID 0 -#endif - -#if CONFIG_XFREE86_VERSION >= XFREE86_VERSION(4,1,0,0) #ifdef __OpenBSD__ #define DRM_MAJOR 81 #endif @@ -124,7 +99,7 @@ __FBSDID("$FreeBSD$"); #define DRM_MAJOR 226 #endif #define DRM_MAX_MINOR 15 -#endif + #define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ #define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ #define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */ @@ -139,6 +114,7 @@ __FBSDID("$FreeBSD$"); #if defined(__linux__) typedef unsigned int drm_handle_t; #else +#include typedef unsigned long drm_handle_t; /**< To mapped regions */ #endif typedef unsigned int drm_context_t; /**< GLXContext handle */ @@ -154,23 +130,23 @@ typedef unsigned int drm_magic_t; /**< M * \note KW: Actually it's illegal to change either for * backwards-compatibility reasons. */ -typedef struct drm_clip_rect { +struct drm_clip_rect { unsigned short x1; unsigned short y1; unsigned short x2; unsigned short y2; -} drm_clip_rect_t; +}; /** * Texture region, */ -typedef struct drm_tex_region { +struct drm_tex_region { unsigned char next; unsigned char prev; unsigned char in_use; unsigned char padding; unsigned int age; -} drm_tex_region_t; +}; /** * Hardware lock. @@ -179,10 +155,10 @@ typedef struct drm_tex_region { * processor bus contention on a multiprocessor system, there should not be any * other data stored in the same cache line. */ -typedef struct drm_hw_lock { +struct drm_hw_lock { __volatile__ unsigned int lock; /**< lock variable */ char padding[60]; /**< Pad to cache line */ -} drm_hw_lock_t; +}; /* This is beyond ugly, and only works on GCC. However, it allows me to use * drm.h in places (i.e., in the X-server) where I can't use size_t. The real @@ -205,7 +181,7 @@ typedef struct drm_hw_lock { * * \sa drmGetVersion(). */ -typedef struct drm_version { +struct drm_version { int version_major; /**< Major version */ int version_minor; /**< Minor version */ int version_patchlevel; /**< Patch level */ @@ -215,35 +191,35 @@ typedef struct drm_version { char __user *date; /**< User-space buffer to hold date */ DRM_SIZE_T desc_len; /**< Length of desc buffer */ char __user *desc; /**< User-space buffer to hold desc */ -} drm_version_t; +}; /** * DRM_IOCTL_GET_UNIQUE ioctl argument type. * * \sa drmGetBusid() and drmSetBusId(). */ -typedef struct drm_unique { +struct drm_unique { DRM_SIZE_T unique_len; /**< Length of unique */ char __user *unique; /**< Unique name for driver instantiation */ -} drm_unique_t; +}; #undef DRM_SIZE_T -typedef struct drm_list { +struct drm_list { int count; /**< Length of user-space structures */ - drm_version_t __user *version; -} drm_list_t; + struct drm_version __user *version; +}; -typedef struct drm_block { +struct drm_block { int unused; -} drm_block_t; +}; /** * DRM_IOCTL_CONTROL ioctl argument type. * * \sa drmCtlInstHandler() and drmCtlUninstHandler(). */ -typedef struct drm_control { +struct drm_control { enum { DRM_ADD_COMMAND, DRM_RM_COMMAND, @@ -251,37 +227,39 @@ typedef struct drm_control { DRM_UNINST_HANDLER } func; int irq; -} drm_control_t; +}; /** * Type of memory to map. */ -typedef enum drm_map_type { +enum drm_map_type { _DRM_FRAME_BUFFER = 0, /**< WC (no caching), no core dump */ _DRM_REGISTERS = 1, /**< no caching, no core dump */ _DRM_SHM = 2, /**< shared, cached */ _DRM_AGP = 3, /**< AGP/GART */ _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */ - _DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */ -} drm_map_type_t; + _DRM_CONSISTENT = 5, /**< Consistent memory for PCI DMA */ + _DRM_TTM = 6 +}; /** * Memory mapping flags. */ -typedef enum drm_map_flags { +enum drm_map_flags { _DRM_RESTRICTED = 0x01, /**< Cannot be mapped to user-virtual */ _DRM_READ_ONLY = 0x02, _DRM_LOCKED = 0x04, /**< shared, cached, locked */ _DRM_KERNEL = 0x08, /**< kernel requires access */ _DRM_WRITE_COMBINING = 0x10, /**< use write-combining if available */ _DRM_CONTAINS_LOCK = 0x20, /**< SHM page that contains lock */ - _DRM_REMOVABLE = 0x40 /**< Removable mapping */ -} drm_map_flags_t; + _DRM_REMOVABLE = 0x40, /**< Removable mapping */ + _DRM_DRIVER = 0x80 /**< Managed by driver */ +}; -typedef struct drm_ctx_priv_map { +struct drm_ctx_priv_map { unsigned int ctx_id; /**< Context requesting private mapping */ void *handle; /**< Handle of map */ -} drm_ctx_priv_map_t; +}; /** * DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP and DRM_IOCTL_RM_MAP ioctls @@ -289,30 +267,30 @@ typedef struct drm_ctx_priv_map { * * \sa drmAddMap(). */ -typedef struct drm_map { +struct drm_map { unsigned long offset; /**< Requested physical address (0 for SAREA)*/ unsigned long size; /**< Requested physical size (bytes) */ - drm_map_type_t type; /**< Type of memory to map */ - drm_map_flags_t flags; /**< Flags */ + enum drm_map_type type; /**< Type of memory to map */ + enum drm_map_flags flags; /**< Flags */ void *handle; /**< User-space: "Handle" to pass to mmap() */ /**< Kernel-space: kernel-virtual address */ int mtrr; /**< MTRR slot used */ /* Private data */ -} drm_map_t; +}; /** * DRM_IOCTL_GET_CLIENT ioctl argument type. */ -typedef struct drm_client { +struct drm_client { int idx; /**< Which client desired? */ int auth; /**< Is client authenticated? */ unsigned long pid; /**< Process ID */ unsigned long uid; /**< User ID */ unsigned long magic; /**< Magic */ unsigned long iocs; /**< Ioctl count */ -} drm_client_t; +}; -typedef enum { +enum drm_stat_type { _DRM_STAT_LOCK, _DRM_STAT_OPENS, _DRM_STAT_CLOSES, @@ -330,23 +308,23 @@ typedef enum { _DRM_STAT_SPECIAL, /**< Special DMA (e.g., priority or polled) */ _DRM_STAT_MISSED /**< Missed DMA opportunity */ /* Add to the *END* of the list */ -} drm_stat_type_t; +}; /** * DRM_IOCTL_GET_STATS ioctl argument type. */ -typedef struct drm_stats { +struct drm_stats { unsigned long count; struct { unsigned long value; - drm_stat_type_t type; + enum drm_stat_type type; } data[15]; -} drm_stats_t; +}; /** * Hardware locking flags. */ -typedef enum drm_lock_flags { +enum drm_lock_flags { _DRM_LOCK_READY = 0x01, /**< Wait until hardware is ready for DMA */ _DRM_LOCK_QUIESCENT = 0x02, /**< Wait until hardware quiescent */ _DRM_LOCK_FLUSH = 0x04, /**< Flush this context's DMA queue first */ @@ -356,17 +334,17 @@ typedef enum drm_lock_flags { full-screen DGA-like mode. */ _DRM_HALT_ALL_QUEUES = 0x10, /**< Halt all current and future queues */ _DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */ -} drm_lock_flags_t; +}; /** * DRM_IOCTL_LOCK, DRM_IOCTL_UNLOCK and DRM_IOCTL_FINISH ioctl argument type. * * \sa drmGetLock() and drmUnlock(). */ -typedef struct drm_lock { +struct drm_lock { int context; - drm_lock_flags_t flags; -} drm_lock_t; + enum drm_lock_flags flags; +}; /** * DMA flags @@ -376,7 +354,7 @@ typedef struct drm_lock { * * \sa drm_dma. */ -typedef enum drm_dma_flags { +enum drm_dma_flags { /* Flags for DMA buffer dispatch */ _DRM_DMA_BLOCK = 0x01, /**< * Block until buffer dispatched. @@ -395,14 +373,14 @@ typedef enum drm_dma_flags { _DRM_DMA_WAIT = 0x10, /**< Wait for free buffers */ _DRM_DMA_SMALLER_OK = 0x20, /**< Smaller-than-requested buffers OK */ _DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */ -} drm_dma_flags_t; +}; /** * DRM_IOCTL_ADD_BUFS and DRM_IOCTL_MARK_BUFS ioctl argument type. * * \sa drmAddBufs(). */ -typedef struct drm_buf_desc { +struct drm_buf_desc { int count; /**< Number of buffers of this size */ int size; /**< Size in bytes */ int low_mark; /**< Low water mark */ @@ -411,54 +389,55 @@ typedef struct drm_buf_desc { _DRM_PAGE_ALIGN = 0x01, /**< Align on page boundaries for DMA */ _DRM_AGP_BUFFER = 0x02, /**< Buffer is in AGP space */ _DRM_SG_BUFFER = 0x04, /**< Scatter/gather memory buffer */ - _DRM_FB_BUFFER = 0x08 /**< Buffer is in frame buffer */ + _DRM_FB_BUFFER = 0x08, /**< Buffer is in frame buffer */ + _DRM_PCI_BUFFER_RO = 0x10 /**< Map PCI DMA buffer read-only */ } flags; unsigned long agp_start; /**< * Start address of where the AGP buffers are * in the AGP aperture */ -} drm_buf_desc_t; +}; /** * DRM_IOCTL_INFO_BUFS ioctl argument type. */ -typedef struct drm_buf_info { +struct drm_buf_info { int count; /**< Number of buffers described in list */ - drm_buf_desc_t __user *list; /**< List of buffer descriptions */ -} drm_buf_info_t; + struct drm_buf_desc __user *list; /**< List of buffer descriptions */ +}; /** * DRM_IOCTL_FREE_BUFS ioctl argument type. */ -typedef struct drm_buf_free { +struct drm_buf_free { int count; int __user *list; -} drm_buf_free_t; +}; /** * Buffer information * * \sa drm_buf_map. */ -typedef struct drm_buf_pub { +struct drm_buf_pub { int idx; /**< Index into the master buffer list */ int total; /**< Buffer size */ int used; /**< Amount of buffer in use (for DMA) */ void __user *address; /**< Address of buffer */ -} drm_buf_pub_t; +}; /** * DRM_IOCTL_MAP_BUFS ioctl argument type. */ -typedef struct drm_buf_map { +struct drm_buf_map { int count; /**< Length of the buffer list */ #if defined(__cplusplus) void __user *c_virtual; #else void __user *virtual; /**< Mmap'd area in user-virtual */ #endif - drm_buf_pub_t __user *list; /**< Buffer information */ -} drm_buf_map_t; + struct drm_buf_pub __user *list; /**< Buffer information */ +}; /** * DRM_IOCTL_DMA ioctl argument type. @@ -467,84 +446,103 @@ typedef struct drm_buf_map { * * \sa drmDMA(). */ -typedef struct drm_dma { +struct drm_dma { int context; /**< Context handle */ int send_count; /**< Number of buffers to send */ int __user *send_indices; /**< List of handles to buffers */ int __user *send_sizes; /**< Lengths of data to send */ - drm_dma_flags_t flags; /**< Flags */ + enum drm_dma_flags flags; /**< Flags */ int request_count; /**< Number of buffers requested */ int request_size; /**< Desired size for buffers */ int __user *request_indices; /**< Buffer information */ int __user *request_sizes; int granted_count; /**< Number of buffers granted */ -} drm_dma_t; +}; -typedef enum { +enum drm_ctx_flags { _DRM_CONTEXT_PRESERVED = 0x01, _DRM_CONTEXT_2DONLY = 0x02 -} drm_ctx_flags_t; +}; /** * DRM_IOCTL_ADD_CTX ioctl argument type. * * \sa drmCreateContext() and drmDestroyContext(). */ -typedef struct drm_ctx { +struct drm_ctx { drm_context_t handle; - drm_ctx_flags_t flags; -} drm_ctx_t; + enum drm_ctx_flags flags; +}; /** * DRM_IOCTL_RES_CTX ioctl argument type. */ -typedef struct drm_ctx_res { +struct drm_ctx_res { int count; - drm_ctx_t __user *contexts; -} drm_ctx_res_t; + struct drm_ctx __user *contexts; +}; /** * DRM_IOCTL_ADD_DRAW and DRM_IOCTL_RM_DRAW ioctl argument type. */ -typedef struct drm_draw { +struct drm_draw { drm_drawable_t handle; -} drm_draw_t; +}; + +/** + * DRM_IOCTL_UPDATE_DRAW ioctl argument type. + */ +typedef enum { + DRM_DRAWABLE_CLIPRECTS, +} drm_drawable_info_type_t; + +struct drm_update_draw { + drm_drawable_t handle; + unsigned int type; + unsigned int num; + unsigned long long data; +}; /** * DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type. */ -typedef struct drm_auth { +struct drm_auth { drm_magic_t magic; -} drm_auth_t; +}; /** * DRM_IOCTL_IRQ_BUSID ioctl argument type. * * \sa drmGetInterruptFromBusID(). */ -typedef struct drm_irq_busid { +struct drm_irq_busid { int irq; /**< IRQ number */ int busnum; /**< bus number */ int devnum; /**< device number */ int funcnum; /**< function number */ -} drm_irq_busid_t; +}; -typedef enum { +enum drm_vblank_seq_type { _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ + _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ + _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ + _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking */ -} drm_vblank_seq_type_t; +}; -#define _DRM_VBLANK_FLAGS_MASK _DRM_VBLANK_SIGNAL +#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE) +#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_SIGNAL | _DRM_VBLANK_SECONDARY | \ + _DRM_VBLANK_NEXTONMISS) struct drm_wait_vblank_request { - drm_vblank_seq_type_t type; + enum drm_vblank_seq_type type; unsigned int sequence; unsigned long signal; }; struct drm_wait_vblank_reply { - drm_vblank_seq_type_t type; + enum drm_vblank_seq_type type; unsigned int sequence; long tval_sec; long tval_usec; @@ -555,41 +553,55 @@ struct drm_wait_vblank_reply { * * \sa drmWaitVBlank(). */ -typedef union drm_wait_vblank { +union drm_wait_vblank { struct drm_wait_vblank_request request; struct drm_wait_vblank_reply reply; -} drm_wait_vblank_t; +}; + + +#define _DRM_PRE_MODESET 1 +#define _DRM_POST_MODESET 2 + +/** + * DRM_IOCTL_MODESET_CTL ioctl argument type + * + * \sa drmModesetCtl(). + */ +struct drm_modeset_ctl { + uint32_t crtc; + uint32_t cmd; +}; /** * DRM_IOCTL_AGP_ENABLE ioctl argument type. * * \sa drmAgpEnable(). */ -typedef struct drm_agp_mode { +struct drm_agp_mode { unsigned long mode; /**< AGP mode */ -} drm_agp_mode_t; +}; /** * DRM_IOCTL_AGP_ALLOC and DRM_IOCTL_AGP_FREE ioctls argument type. * * \sa drmAgpAlloc() and drmAgpFree(). */ -typedef struct drm_agp_buffer { +struct drm_agp_buffer { unsigned long size; /**< In bytes -- will round to page boundary */ unsigned long handle; /**< Used for binding / unbinding */ unsigned long type; /**< Type of memory to allocate */ unsigned long physical; /**< Physical used by i810 */ -} drm_agp_buffer_t; +}; /** * DRM_IOCTL_AGP_BIND and DRM_IOCTL_AGP_UNBIND ioctls argument type. * * \sa drmAgpBind() and drmAgpUnbind(). */ -typedef struct drm_agp_binding { +struct drm_agp_binding { unsigned long handle; /**< From drm_agp_buffer */ unsigned long offset; /**< In bytes -- will round to page boundary */ -} drm_agp_binding_t; +}; /** * DRM_IOCTL_AGP_INFO ioctl argument type. @@ -598,7 +610,7 @@ typedef struct drm_agp_binding { * drmAgpBase(), drmAgpSize(), drmAgpMemoryUsed(), drmAgpMemoryAvail(), * drmAgpVendorId() and drmAgpDeviceId(). */ -typedef struct drm_agp_info { +struct drm_agp_info { int agp_version_major; int agp_version_minor; unsigned long mode; @@ -612,25 +624,368 @@ typedef struct drm_agp_info { unsigned short id_vendor; unsigned short id_device; /*@} */ -} drm_agp_info_t; +}; /** * DRM_IOCTL_SG_ALLOC ioctl argument type. */ -typedef struct drm_scatter_gather { +struct drm_scatter_gather { unsigned long size; /**< In bytes -- will round to page boundary */ unsigned long handle; /**< Used for mapping / unmapping */ -} drm_scatter_gather_t; +}; /** * DRM_IOCTL_SET_VERSION ioctl argument type. */ -typedef struct drm_set_version { +struct drm_set_version { int drm_di_major; int drm_di_minor; int drm_dd_major; int drm_dd_minor; -} drm_set_version_t; +}; + + +#define DRM_FENCE_FLAG_EMIT 0x00000001 +#define DRM_FENCE_FLAG_SHAREABLE 0x00000002 +/** + * On hardware with no interrupt events for operation completion, + * indicates that the kernel should sleep while waiting for any blocking + * operation to complete rather than spinning. + * + * Has no effect otherwise. + */ +#define DRM_FENCE_FLAG_WAIT_LAZY 0x00000004 +#define DRM_FENCE_FLAG_NO_USER 0x00000010 + +/* Reserved for driver use */ +#define DRM_FENCE_MASK_DRIVER 0xFF000000 + +#define DRM_FENCE_TYPE_EXE 0x00000001 + +struct drm_fence_arg { + unsigned int handle; + unsigned int fence_class; + unsigned int type; + unsigned int flags; + unsigned int signaled; + unsigned int error; + unsigned int sequence; + unsigned int pad64; + uint64_t expand_pad[2]; /*Future expansion */ +}; + +/* Buffer permissions, referring to how the GPU uses the buffers. + * these translate to fence types used for the buffers. + * Typically a texture buffer is read, A destination buffer is write and + * a command (batch-) buffer is exe. Can be or-ed together. + */ + +#define DRM_BO_FLAG_READ (1ULL << 0) +#define DRM_BO_FLAG_WRITE (1ULL << 1) +#define DRM_BO_FLAG_EXE (1ULL << 2) + +/* + * All of the bits related to access mode + */ +#define DRM_BO_MASK_ACCESS (DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_EXE) +/* + * Status flags. Can be read to determine the actual state of a buffer. + * Can also be set in the buffer mask before validation. + */ + +/* + * Mask: Never evict this buffer. Not even with force. This type of buffer is only + * available to root and must be manually removed before buffer manager shutdown + * or lock. + * Flags: Acknowledge + */ +#define DRM_BO_FLAG_NO_EVICT (1ULL << 4) + +/* + * Mask: Require that the buffer is placed in mappable memory when validated. + * If not set the buffer may or may not be in mappable memory when validated. + * Flags: If set, the buffer is in mappable memory. + */ +#define DRM_BO_FLAG_MAPPABLE (1ULL << 5) + +/* Mask: The buffer should be shareable with other processes. + * Flags: The buffer is shareable with other processes. + */ +#define DRM_BO_FLAG_SHAREABLE (1ULL << 6) + +/* Mask: If set, place the buffer in cache-coherent memory if available. + * If clear, never place the buffer in cache coherent memory if validated. + * Flags: The buffer is currently in cache-coherent memory. + */ +#define DRM_BO_FLAG_CACHED (1ULL << 7) + +/* Mask: Make sure that every time this buffer is validated, + * it ends up on the same location provided that the memory mask is the same. + * The buffer will also not be evicted when claiming space for + * other buffers. Basically a pinned buffer but it may be thrown out as + * part of buffer manager shutdown or locking. + * Flags: Acknowledge. + */ +#define DRM_BO_FLAG_NO_MOVE (1ULL << 8) + +/* Mask: Make sure the buffer is in cached memory when mapped. In conjunction + * with DRM_BO_FLAG_CACHED it also allows the buffer to be bound into the GART + * with unsnooped PTEs instead of snooped, by using chipset-specific cache + * flushing at bind time. A better name might be DRM_BO_FLAG_TT_UNSNOOPED, + * as the eviction to local memory (TTM unbind) on map is just a side effect + * to prevent aggressive cache prefetch from the GPU disturbing the cache + * management that the DRM is doing. + * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 16:01:21 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5443A1065673; Sat, 10 Jan 2009 16:01:21 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D5838FC20; Sat, 10 Jan 2009 16:01:21 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AG1LDd002522; Sat, 10 Jan 2009 16:01:21 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AG1KkC002515; Sat, 10 Jan 2009 16:01:20 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901101601.n0AG1KkC002515@svn.freebsd.org> From: Daniel Gerzo Date: Sat, 10 Jan 2009 16:01:20 +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: r187022 - in stable/7: bin bin/chio bin/cp bin/sh bin/test sbin sbin/atacontrol sbin/ddb sbin/devfs sbin/dhclient sbin/fdisk sbin/fsck_ffs sbin/geom sbin/geom/class/part sbin/geom/misc ... X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 16:01:22 -0000 Author: danger (doc committer) Date: Sat Jan 10 16:01:20 2009 New Revision: 187022 URL: http://svn.freebsd.org/changeset/base/187022 Log: MFC r186843 - r186849 - rename the RETURN VALUES section to EXIT STATUS - convert to .Ex macro Modified: stable/7/bin/ (props changed) stable/7/bin/chio/ (props changed) stable/7/bin/cp/ (props changed) stable/7/bin/sh/ (props changed) stable/7/bin/test/test.1 stable/7/sbin/ (props changed) stable/7/sbin/atacontrol/ (props changed) stable/7/sbin/ddb/ (props changed) stable/7/sbin/devfs/ (props changed) stable/7/sbin/dhclient/ (props changed) stable/7/sbin/fdisk/ (props changed) stable/7/sbin/fsck_ffs/ (props changed) stable/7/sbin/geom/ (props changed) stable/7/sbin/geom/class/part/ (props changed) stable/7/sbin/geom/misc/ (props changed) stable/7/sbin/ifconfig/ (props changed) stable/7/sbin/init/ (props changed) stable/7/sbin/ipfw/ (props changed) stable/7/sbin/md5/ (props changed) stable/7/sbin/mdconfig/ (props changed) stable/7/sbin/mksnap_ffs/ (props changed) stable/7/sbin/mount/ (props changed) stable/7/sbin/natd/ (props changed) stable/7/sbin/ping/ping.8 stable/7/sbin/ping6/ (props changed) stable/7/sbin/sconfig/ (props changed) stable/7/usr.sbin/ (props changed) stable/7/usr.sbin/adduser/ (props changed) stable/7/usr.sbin/bsnmpd/modules/snmp_pf/ (props changed) stable/7/usr.sbin/cdcontrol/ (props changed) stable/7/usr.sbin/config/ (props changed) stable/7/usr.sbin/cron/ (props changed) stable/7/usr.sbin/cron/cron/ (props changed) stable/7/usr.sbin/extattr/ (props changed) stable/7/usr.sbin/freebsd-update/ (props changed) stable/7/usr.sbin/fwcontrol/ (props changed) stable/7/usr.sbin/iostat/ (props changed) stable/7/usr.sbin/mergemaster/ (props changed) stable/7/usr.sbin/mld6query/mld6query.8 stable/7/usr.sbin/mountd/ (props changed) stable/7/usr.sbin/mtree/ (props changed) stable/7/usr.sbin/ndiscvt/ (props changed) stable/7/usr.sbin/newsyslog/newsyslog.conf.5 (props changed) stable/7/usr.sbin/nscd/ (props changed) stable/7/usr.sbin/ntp/ (props changed) stable/7/usr.sbin/pciconf/ (props changed) stable/7/usr.sbin/pkg_install/ (props changed) stable/7/usr.sbin/pmcstat/ (props changed) stable/7/usr.sbin/portsnap/ (props changed) stable/7/usr.sbin/powerd/ (props changed) stable/7/usr.sbin/pw/ (props changed) stable/7/usr.sbin/rpc.lockd/ (props changed) stable/7/usr.sbin/rpc.statd/ (props changed) stable/7/usr.sbin/rpc.yppasswdd/ (props changed) stable/7/usr.sbin/rrenumd/rrenumd.8 stable/7/usr.sbin/rtadvd/rtadvd.8 stable/7/usr.sbin/rtsold/rtsold.8 stable/7/usr.sbin/setfib/ (props changed) stable/7/usr.sbin/sysinstall/ (props changed) stable/7/usr.sbin/syslogd/ (props changed) stable/7/usr.sbin/traceroute/ (props changed) stable/7/usr.sbin/traceroute6/traceroute6.8 stable/7/usr.sbin/tzsetup/ (props changed) stable/7/usr.sbin/wpa/wpa_supplicant/ (props changed) Modified: stable/7/bin/test/test.1 ============================================================================== --- stable/7/bin/test/test.1 Sat Jan 10 14:53:47 2009 (r187021) +++ stable/7/bin/test/test.1 Sat Jan 10 16:01:20 2009 (r187022) @@ -310,7 +310,7 @@ are evaluated consistently according to standards document. All other cases are subject to the ambiguity in the command semantics. -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm utility exits with one of the following values: Modified: stable/7/sbin/ping/ping.8 ============================================================================== --- stable/7/sbin/ping/ping.8 Sat Jan 10 14:53:47 2009 (r187021) +++ stable/7/sbin/ping/ping.8 Sat Jan 10 16:01:20 2009 (r187022) @@ -503,7 +503,7 @@ packets that they use for packets, for example either 30 or 60. Others may use completely wild values. .El -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm utility returns an exit status of zero if at least one response was Modified: stable/7/usr.sbin/mld6query/mld6query.8 ============================================================================== --- stable/7/usr.sbin/mld6query/mld6query.8 Sat Jan 10 14:53:47 2009 (r187021) +++ stable/7/usr.sbin/mld6query/mld6query.8 Sat Jan 10 16:01:20 2009 (r187022) @@ -75,7 +75,7 @@ similarly, MLD report packet will be tra .Fl dr options are for debugging purposes only. .\" -.Sh RETURN VALUES +.Sh EXIT STATUS The program exits with 0 on success, non-zero on failures. .\" .\" .Sh SEE ALSO Modified: stable/7/usr.sbin/rrenumd/rrenumd.8 ============================================================================== --- stable/7/usr.sbin/rrenumd/rrenumd.8 Sat Jan 10 14:53:47 2009 (r187021) +++ stable/7/usr.sbin/rrenumd/rrenumd.8 Sat Jan 10 16:01:20 2009 (r187022) @@ -82,7 +82,7 @@ Configuration information is obtained fr .It Fl c Ar conf_file Specify a configuration file where configuration information is kept. .El -.Sh RETURN VALUES +.Sh EXIT STATUS The program exits with 0 on success, and non-zero on failures. .Sh SEE ALSO .Xr rrenumd.conf 5 , Modified: stable/7/usr.sbin/rtadvd/rtadvd.8 ============================================================================== --- stable/7/usr.sbin/rtadvd/rtadvd.8 Sat Jan 10 14:53:47 2009 (r187021) +++ stable/7/usr.sbin/rtadvd/rtadvd.8 Sat Jan 10 16:01:20 2009 (r187022) @@ -162,10 +162,8 @@ In this case, will transmit router advertisement with router lifetime 0 to all the interfaces .Pq in accordance with RFC2461 6.2.5 . -.Sh RETURN VALUES -The -.Nm -program exits 0 on success, and >0 on failures. +.Sh EXIT STATUS +.Ex -std .Sh FILES .Bl -tag -width Pa -compact .It Pa /etc/rtadvd.conf Modified: stable/7/usr.sbin/rtsold/rtsold.8 ============================================================================== --- stable/7/usr.sbin/rtsold/rtsold.8 Sat Jan 10 14:53:47 2009 (r187021) +++ stable/7/usr.sbin/rtsold/rtsold.8 Sat Jan 10 16:01:20 2009 (r187022) @@ -220,10 +220,8 @@ must be the absolute path from root to t file, and be created by the same owner who runs .Nm . .El -.Sh RETURN VALUES -The -.Nm -program exits 0 on success, and >0 on failures. +.Sh EXIT STATUS +.Ex -std .\" .Sh FILES .Bl -tag -width /var/run/rtsold.dump -compact Modified: stable/7/usr.sbin/traceroute6/traceroute6.8 ============================================================================== --- stable/7/usr.sbin/traceroute6/traceroute6.8 Sat Jan 10 14:53:47 2009 (r187021) +++ stable/7/usr.sbin/traceroute6/traceroute6.8 Sat Jan 10 16:01:20 2009 (r187022) @@ -162,7 +162,7 @@ This was more interesting in the IPv4 ca where some IP stack bugs could be identified by this behaviour. .El .\" -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm utility will exit with 0 on success, and non-zero on errors. From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 16:19:39 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81A291065678; Sat, 10 Jan 2009 16:19:39 +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 7C11E8FC2A; Sat, 10 Jan 2009 16:19:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AGJcii002928; Sat, 10 Jan 2009 16:19:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AGJcU7002927; Sat, 10 Jan 2009 16:19:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901101619.n0AGJcU7002927@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 10 Jan 2009 16:19:38 +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: r187023 - stable/7/sys/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 16:19:40 -0000 Author: kib Date: Sat Jan 10 16:19:38 2009 New Revision: 187023 URL: http://svn.freebsd.org/changeset/base/187023 Log: Bump __FreeBSD_version after the strndup() merge to stable/7. Requested by: Florian Smeets Modified: stable/7/sys/sys/param.h Modified: stable/7/sys/sys/param.h ============================================================================== --- stable/7/sys/sys/param.h Sat Jan 10 16:01:20 2009 (r187022) +++ stable/7/sys/sys/param.h Sat Jan 10 16:19:38 2009 (r187023) @@ -57,7 +57,7 @@ * is created, otherwise 1. */ #undef __FreeBSD_version -#define __FreeBSD_version 701100 /* Master, propagated to newvers */ +#define __FreeBSD_version 701101 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 16:42:14 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5100D106566B; Sat, 10 Jan 2009 16:42:14 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C4F08FC13; Sat, 10 Jan 2009 16:42:14 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AGgE5b003433; Sat, 10 Jan 2009 16:42:14 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AGgD02003429; Sat, 10 Jan 2009 16:42:13 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200901101642.n0AGgD02003429@svn.freebsd.org> From: Robert Noland Date: Sat, 10 Jan 2009 16:42:13 +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: r187025 - in stable/7/sys: . contrib/pf dev/cxgb dev/drm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 16:42:15 -0000 Author: rnoland Date: Sat Jan 10 16:42:13 2009 New Revision: 187025 URL: http://svn.freebsd.org/changeset/base/187025 Log: MFC - Sync drm to HEAD Merged /head/sys:r186295,186299-186300,186386,186465 This brings 7 up to date with HEAD. - Use bus_dma to allocate scatter/gather pages for pci GART. This fixes "garbled" screen issues on pci based radeons. - Prevent drm from attaching to secondary devices even if they have the the same pci id. - Attempt at making DRM_DEBUG c99 compliant (needs more work) Approved by: kib Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/drm/drmP.h stable/7/sys/dev/drm/drm_drv.c stable/7/sys/dev/drm/drm_scatter.c stable/7/sys/dev/drm/radeon_irq.c Modified: stable/7/sys/dev/drm/drmP.h ============================================================================== --- stable/7/sys/dev/drm/drmP.h Sat Jan 10 16:24:58 2009 (r187024) +++ stable/7/sys/dev/drm/drmP.h Sat Jan 10 16:42:13 2009 (r187025) @@ -87,6 +87,7 @@ struct drm_file; #include #include #include +#include #include #include @@ -211,15 +212,6 @@ enum { #define DRM_MTRR_WC MDF_WRITECOMBINE #define jiffies ticks -/* Capabilities taken from src/sys/dev/pci/pcireg.h. */ -#ifndef PCIY_AGP -#define PCIY_AGP 0x02 -#endif - -#ifndef PCIY_EXPRESS -#define PCIY_EXPRESS 0x10 -#endif - typedef unsigned long dma_addr_t; typedef u_int64_t u64; typedef u_int32_t u32; @@ -308,16 +300,16 @@ for ( ret = 0 ; !ret && !(condition) ; ) DRM_LOCK(); \ } -#define DRM_ERROR(fmt, arg...) \ +#define DRM_ERROR(fmt, ...) \ printf("error: [" DRM_NAME ":pid%d:%s] *ERROR* " fmt, \ - DRM_CURRENTPID, __func__ , ## arg) + DRM_CURRENTPID, __func__ , ##__VA_ARGS__) -#define DRM_INFO(fmt, arg...) printf("info: [" DRM_NAME "] " fmt , ## arg) +#define DRM_INFO(fmt, ...) printf("info: [" DRM_NAME "] " fmt , ##__VA_ARGS__) -#define DRM_DEBUG(fmt, arg...) do { \ +#define DRM_DEBUG(fmt, ...) do { \ if (drm_debug_flag) \ printf("[" DRM_NAME ":pid%d:%s] " fmt, DRM_CURRENTPID, \ - __func__ , ## arg); \ + __func__ , ##__VA_ARGS__); \ } while (0) typedef struct drm_pci_id_list @@ -473,11 +465,13 @@ typedef struct drm_agp_head { } drm_agp_head_t; typedef struct drm_sg_mem { - unsigned long handle; - void *virtual; - int pages; - dma_addr_t *busaddr; - drm_dma_handle_t *dmah; /* Handle to PCI memory for ATI PCIGART table */ + unsigned long handle; + void *virtual; + int pages; + dma_addr_t *busaddr; + struct drm_dma_handle *sg_dmah; /* Handle for sg_pages */ + struct drm_dma_handle *dmah; /* Handle to PCI memory */ + /* for ATI PCIGART table */ } drm_sg_mem_t; typedef TAILQ_HEAD(drm_map_list, drm_local_map) drm_map_list_t; Modified: stable/7/sys/dev/drm/drm_drv.c ============================================================================== --- stable/7/sys/dev/drm/drm_drv.c Sat Jan 10 16:24:58 2009 (r187024) +++ stable/7/sys/dev/drm/drm_drv.c Sat Jan 10 16:42:13 2009 (r187025) @@ -152,6 +152,10 @@ int drm_probe(device_t dev, drm_pci_id_l device = pci_get_device(dev); #endif + if (pci_get_class(dev) != PCIC_DISPLAY + || pci_get_subclass(dev) != PCIS_DISPLAY_VGA) + return ENXIO; + id_entry = drm_find_description(vendor, device, idlist); if (id_entry != NULL) { device_set_desc(dev, id_entry->name); Modified: stable/7/sys/dev/drm/drm_scatter.c ============================================================================== --- stable/7/sys/dev/drm/drm_scatter.c Sat Jan 10 16:24:58 2009 (r187024) +++ stable/7/sys/dev/drm/drm_scatter.c Sat Jan 10 16:42:13 2009 (r187025) @@ -39,20 +39,16 @@ __FBSDID("$FreeBSD$"); #include "dev/drm/drmP.h" -#define DEBUG_SCATTER 0 +static void drm_sg_alloc_cb(void *arg, bus_dma_segment_t *segs, + int nsegs, int error); -void drm_sg_cleanup(drm_sg_mem_t *entry) +int +drm_sg_alloc(struct drm_device *dev, struct drm_scatter_gather *request) { - free((void *)entry->handle, DRM_MEM_PAGES); - free(entry->busaddr, DRM_MEM_PAGES); - free(entry, DRM_MEM_SGLISTS); -} - -int drm_sg_alloc(struct drm_device * dev, struct drm_scatter_gather * request) -{ - drm_sg_mem_t *entry; + struct drm_sg_mem *entry; + struct drm_dma_handle *dmah; unsigned long pages; - int i; + int ret; if (dev->sg) return EINVAL; @@ -69,21 +65,56 @@ int drm_sg_alloc(struct drm_device * dev entry->busaddr = malloc(pages * sizeof(*entry->busaddr), DRM_MEM_PAGES, M_WAITOK | M_ZERO); if (!entry->busaddr) { - drm_sg_cleanup(entry); + free(entry, DRM_MEM_SGLISTS); return ENOMEM; } - entry->handle = (long)malloc(pages << PAGE_SHIFT, DRM_MEM_PAGES, - M_WAITOK | M_ZERO); - if (entry->handle == 0) { - drm_sg_cleanup(entry); + dmah = malloc(sizeof(struct drm_dma_handle), DRM_MEM_DMA, + M_ZERO | M_NOWAIT); + if (dmah == NULL) { + free(entry->busaddr, DRM_MEM_PAGES); + free(entry, DRM_MEM_SGLISTS); + return ENOMEM; + } + + ret = bus_dma_tag_create(NULL, PAGE_SIZE, 0, /* tag, align, boundary */ + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, /* lowaddr, highaddr */ + NULL, NULL, /* filtfunc, filtfuncargs */ + request->size, pages, /* maxsize, nsegs */ + PAGE_SIZE, 0, /* maxsegsize, flags */ + NULL, NULL, /* lockfunc, lockfuncargs */ + &dmah->tag); + if (ret != 0) { + free(dmah, DRM_MEM_DMA); + free(entry->busaddr, DRM_MEM_PAGES); + free(entry, DRM_MEM_SGLISTS); return ENOMEM; } - for (i = 0; i < pages; i++) { - entry->busaddr[i] = vtophys(entry->handle + i * PAGE_SIZE); + ret = bus_dmamem_alloc(dmah->tag, &dmah->vaddr, + BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_NOCACHE, &dmah->map); + if (ret != 0) { + bus_dma_tag_destroy(dmah->tag); + free(dmah, DRM_MEM_DMA); + free(entry->busaddr, DRM_MEM_PAGES); + free(entry, DRM_MEM_SGLISTS); + return ENOMEM; } + ret = bus_dmamap_load(dmah->tag, dmah->map, dmah->vaddr, + request->size, drm_sg_alloc_cb, entry, 0); + if (ret != 0) { + bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); + bus_dma_tag_destroy(dmah->tag); + free(dmah, DRM_MEM_DMA); + free(entry->busaddr, DRM_MEM_PAGES); + free(entry, DRM_MEM_SGLISTS); + return ENOMEM; + } + + entry->sg_dmah = dmah; + entry->handle = (unsigned long)dmah->vaddr; + DRM_DEBUG("sg alloc handle = %08lx\n", entry->handle); entry->virtual = (void *)entry->handle; @@ -101,22 +132,49 @@ int drm_sg_alloc(struct drm_device * dev return 0; } -int drm_sg_alloc_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv) +static void +drm_sg_alloc_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + struct drm_sg_mem *entry = arg; + int i; + + if (error != 0) + return; + + for(i = 0 ; i < nsegs ; i++) { + entry->busaddr[i] = segs[i].ds_addr; + } +} + +int +drm_sg_alloc_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) { struct drm_scatter_gather *request = data; - int ret; - DRM_DEBUG("%s\n", __FUNCTION__); + DRM_DEBUG("\n"); + + return drm_sg_alloc(dev, request); +} - ret = drm_sg_alloc(dev, request); - return ret; +void +drm_sg_cleanup(struct drm_sg_mem *entry) +{ + struct drm_dma_handle *dmah = entry->sg_dmah; + + bus_dmamap_unload(dmah->tag, dmah->map); + bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); + bus_dma_tag_destroy(dmah->tag); + free(dmah, DRM_MEM_DMA); + free(entry->busaddr, DRM_MEM_PAGES); + free(entry, DRM_MEM_SGLISTS); } -int drm_sg_free(struct drm_device *dev, void *data, struct drm_file *file_priv) +int +drm_sg_free(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_scatter_gather *request = data; - drm_sg_mem_t *entry; + struct drm_sg_mem *entry; DRM_LOCK(); entry = dev->sg; Modified: stable/7/sys/dev/drm/radeon_irq.c ============================================================================== --- stable/7/sys/dev/drm/radeon_irq.c Sat Jan 10 16:24:58 2009 (r187024) +++ stable/7/sys/dev/drm/radeon_irq.c Sat Jan 10 16:42:13 2009 (r187025) @@ -47,7 +47,8 @@ void radeon_irq_set_state(struct drm_dev else dev_priv->irq_enable_reg &= ~mask; - RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg); + if (dev->irq_enabled) + RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg); } static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state) @@ -59,7 +60,8 @@ static void r500_vbl_irq_set_state(struc else dev_priv->r500_disp_irq_reg &= ~mask; - RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg); + if (dev->irq_enabled) + RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg); } int radeon_enable_vblank(struct drm_device *dev, int crtc) From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 16:57:23 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F85C1065677; Sat, 10 Jan 2009 16:57:23 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B5C88FC12; Sat, 10 Jan 2009 16:57:23 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AGvMmx003743; Sat, 10 Jan 2009 16:57:22 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AGvMMk003741; Sat, 10 Jan 2009 16:57:22 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901101657.n0AGvMMk003741@svn.freebsd.org> From: Antoine Brodin Date: Sat, 10 Jan 2009 16:57:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187026 - in stable/6: contrib/telnet contrib/telnet/arpa include include/arpa X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 16:57:23 -0000 Author: antoine Date: Sat Jan 10 16:57:22 2009 New Revision: 187026 URL: http://svn.freebsd.org/changeset/base/187026 Log: MFC r183004 to stable/6: Fix TELOPT(opt) when opt > TELOPT_TN3270E. PR: 127194 Submitted by: Joost Bekkers MFC after: 1 month Modified: stable/6/contrib/telnet/ (props changed) stable/6/contrib/telnet/arpa/telnet.h stable/6/include/ (props changed) stable/6/include/arpa/telnet.h Modified: stable/6/contrib/telnet/arpa/telnet.h ============================================================================== --- stable/6/contrib/telnet/arpa/telnet.h Sat Jan 10 16:42:13 2009 (r187025) +++ stable/6/contrib/telnet/arpa/telnet.h Sat Jan 10 16:57:22 2009 (r187026) @@ -140,8 +140,8 @@ const char *telopts[NTELOPTS+1] = { "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", - "ENCRYPT", "NEW-ENVIRON", "TN3270E", "CHARSET", "COM-PORT", - "KERMIT", + "ENCRYPT", "NEW-ENVIRON", "TN3270E", "XAUTH", "CHARSET", + "RSP", "COM-PORT", "SLE", "STARTTLS", "KERMIT", 0 }; #define TELOPT_FIRST TELOPT_BINARY Modified: stable/6/include/arpa/telnet.h ============================================================================== --- stable/6/include/arpa/telnet.h Sat Jan 10 16:42:13 2009 (r187025) +++ stable/6/include/arpa/telnet.h Sat Jan 10 16:57:22 2009 (r187026) @@ -140,8 +140,8 @@ const char *telopts[NTELOPTS+1] = { "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", - "ENCRYPT", "NEW-ENVIRON", "TN3270E", "CHARSET", "COM-PORT", - "KERMIT", + "ENCRYPT", "NEW-ENVIRON", "TN3270E", "XAUTH", "CHARSET", + "RSP", "COM-PORT", "SLE", "STARTTLS", "KERMIT", 0 }; #define TELOPT_FIRST TELOPT_BINARY From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 17:56:51 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D1771065688; Sat, 10 Jan 2009 17:56:51 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17ED48FC26; Sat, 10 Jan 2009 17:56:51 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AHuovw005003; Sat, 10 Jan 2009 17:56:50 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AHuof9005002; Sat, 10 Jan 2009 17:56:50 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901101756.n0AHuof9005002@svn.freebsd.org> From: Antoine Brodin Date: Sat, 10 Jan 2009 17:56:50 +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: r187029 - in stable/7/sys: . conf contrib/pf dev/ath/ath_hal dev/cxgb dev/hptiop X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 17:56:53 -0000 Author: antoine Date: Sat Jan 10 17:56:50 2009 New Revision: 187029 URL: http://svn.freebsd.org/changeset/base/187029 Log: MFC r183590 to stable/7: - Spell cam correctly (scbus), this makes it possible to compile hptiop in GENERIC and LINT. [1] - Rename hpt_dbg_level to hpt_iop_dbg_level to avoid multiple definition of hpt_dbg_level (hptmv also has hpt_dbg_level). PR: 127551 [1] Reviewed by: scottl@ MFC after: 1 month Modified: stable/7/sys/ (props changed) stable/7/sys/conf/files stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/hptiop/hptiop.h Modified: stable/7/sys/conf/files ============================================================================== --- stable/7/sys/conf/files Sat Jan 10 17:22:49 2009 (r187028) +++ stable/7/sys/conf/files Sat Jan 10 17:56:50 2009 (r187029) @@ -685,7 +685,7 @@ dev/hifn/hifn7751.c optional hifn dev/hme/if_hme.c optional hme dev/hme/if_hme_pci.c optional hme pci dev/hme/if_hme_sbus.c optional hme sbus -dev/hptiop/hptiop.c optional hptiop cam +dev/hptiop/hptiop.c optional hptiop scbus dev/hwpmc/hwpmc_logging.c optional hwpmc dev/hwpmc/hwpmc_mod.c optional hwpmc dev/ichsmb/ichsmb.c optional ichsmb Modified: stable/7/sys/dev/hptiop/hptiop.h ============================================================================== --- stable/7/sys/dev/hptiop/hptiop.h Sat Jan 10 17:22:49 2009 (r187028) +++ stable/7/sys/dev/hptiop/hptiop.h Sat Jan 10 17:56:50 2009 (r187029) @@ -32,8 +32,8 @@ __FBSDID("$FreeBSD$"); #define DBG 0 #ifdef DBG -int hpt_dbg_level = 0; -#define KdPrint(x) do { if (hpt_dbg_level) printf x; } while (0) +int hpt_iop_dbg_level = 0; +#define KdPrint(x) do { if (hpt_iop_dbg_level) printf x; } while (0) #define HPT_ASSERT(x) assert(x) #else #define KdPrint(x) From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 19:00:18 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 326DC10656FD; Sat, 10 Jan 2009 19:00:18 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 718A98FC08; Sat, 10 Jan 2009 19:00:17 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AJ0H6B006282; Sat, 10 Jan 2009 19:00:17 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AJ0Hv1006281; Sat, 10 Jan 2009 19:00:17 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901101900.n0AJ0Hv1006281@svn.freebsd.org> From: Antoine Brodin Date: Sat, 10 Jan 2009 19:00:17 +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: r187031 - in stable/7/etc: . periodic/security X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 19:00:20 -0000 Author: antoine Date: Sat Jan 10 19:00:17 2009 New Revision: 187031 URL: http://svn.freebsd.org/changeset/base/187031 Log: MFC r181531 to stable/7: Improve periodic/security/550.ipfwlimit a bit: - don't run it if net.inet.ip.fw.verbose = 0 as it is pointless - handle rules without logging limit correctly [1] (those rules show up without logamount in "ipfw -a list") PR: conf/126060 [1] MFC after: 1 month Modified: stable/7/etc/ (props changed) stable/7/etc/periodic/security/550.ipfwlimit Modified: stable/7/etc/periodic/security/550.ipfwlimit ============================================================================== --- stable/7/etc/periodic/security/550.ipfwlimit Sat Jan 10 18:19:22 2009 (r187030) +++ stable/7/etc/periodic/security/550.ipfwlimit Sat Jan 10 19:00:17 2009 (r187031) @@ -42,19 +42,16 @@ rc=0 case "$daily_status_security_ipfwlimit_enable" in [Yy][Ee][Ss]) - IPFW_LOG_LIMIT=`sysctl -n net.inet.ip.fw.verbose_limit 2> /dev/null` - if [ $? -ne 0 ]; then + IPFW_VERBOSE=`sysctl -n net.inet.ip.fw.verbose 2> /dev/null` + if [ $? -ne 0 ] || [ "$IPFW_VERBOSE" -eq 0 ]; then exit 0 fi TMP=`mktemp -t security` ipfw -a list | grep " log " | \ grep '^[[:digit:]]\+[[:space:]]\+[[:digit:]]\+' | \ - awk -v limit="$IPFW_LOG_LIMIT" \ + awk \ '{if ($6 == "logamount") { if ($2 > $7) - {print $0} - } else { - if ($2 > limit) {print $0}} }' > ${TMP} From owner-svn-src-stable@FreeBSD.ORG Sat Jan 10 19:03:35 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D41F7106567C; Sat, 10 Jan 2009 19:03:35 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C14798FC14; Sat, 10 Jan 2009 19:03:35 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AJ3Zch006411; Sat, 10 Jan 2009 19:03:35 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AJ3ZGS006410; Sat, 10 Jan 2009 19:03:35 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901101903.n0AJ3ZGS006410@svn.freebsd.org> From: Antoine Brodin Date: Sat, 10 Jan 2009 19:03:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187033 - in stable/6/etc: . periodic/security X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 19:03:36 -0000 Author: antoine Date: Sat Jan 10 19:03:35 2009 New Revision: 187033 URL: http://svn.freebsd.org/changeset/base/187033 Log: MFC r181531 to stable/6: Improve periodic/security/550.ipfwlimit a bit: - don't run it if net.inet.ip.fw.verbose = 0 as it is pointless - handle rules without logging limit correctly [1] (those rules show up without logamount in "ipfw -a list") PR: conf/126060 [1] MFC after: 1 month Modified: stable/6/etc/ (props changed) stable/6/etc/periodic/security/550.ipfwlimit Modified: stable/6/etc/periodic/security/550.ipfwlimit ============================================================================== --- stable/6/etc/periodic/security/550.ipfwlimit Sat Jan 10 19:01:29 2009 (r187032) +++ stable/6/etc/periodic/security/550.ipfwlimit Sat Jan 10 19:03:35 2009 (r187033) @@ -42,19 +42,16 @@ rc=0 case "$daily_status_security_ipfwlimit_enable" in [Yy][Ee][Ss]) - IPFW_LOG_LIMIT=`sysctl -n net.inet.ip.fw.verbose_limit 2> /dev/null` - if [ $? -ne 0 ]; then + IPFW_VERBOSE=`sysctl -n net.inet.ip.fw.verbose 2> /dev/null` + if [ $? -ne 0 ] || [ "$IPFW_VERBOSE" -eq 0 ]; then exit 0 fi TMP=`mktemp -t security` ipfw -a list | grep " log " | \ grep '^[[:digit:]]\+[[:space:]]\+[[:digit:]]\+' | \ - awk -v limit="$IPFW_LOG_LIMIT" \ + awk \ '{if ($6 == "logamount") { if ($2 > $7) - {print $0} - } else { - if ($2 > limit) {print $0}} }' > ${TMP}