From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 02:34:06 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B2CF106564A; Sun, 28 Dec 2008 02:34:06 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C70518FC21; Sun, 28 Dec 2008 02:34:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mBS2WulL056031; Sat, 27 Dec 2008 19:32:56 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 27 Dec 2008 19:33:08 -0700 (MST) Message-Id: <20081227.193308.255407637.imp@bsdimp.com> To: yanefbsd@gmail.com From: "M. Warner Losh" In-Reply-To: <26259E4E-6E26-4DAE-8046-80C7C46B7CD5@gmail.com> References: <200812271507.mBRF7pkv074681@svn.freebsd.org> <20081227150827.D97918@maildrop.int.zabbadoz.net> <26259E4E-6E26-4DAE-8046-80C7C46B7CD5@gmail.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, bz@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186519 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 02:34:06 -0000 In message: <26259E4E-6E26-4DAE-8046-80C7C46B7CD5@gmail.com> Garrett Cooper writes: : > - For mips which is not yet part of universe: : > + kernels compile fine after I had fixed one earlier today. : > + world does not build but fails in libpam. : : *paging mr Losh -- mr Losh!* Still working on a solution that's correct and mutually acceptable to DES. i think the ball is in my court. Warner From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 02:39:44 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6119B1065678 for ; Sun, 28 Dec 2008 02:39:44 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outK.internet-mail-service.net (outk.internet-mail-service.net [216.240.47.234]) by mx1.freebsd.org (Postfix) with ESMTP id 423FA8FC1A for ; Sun, 28 Dec 2008 02:39:44 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id A900F2366; Sat, 27 Dec 2008 18:39:43 -0800 (PST) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 405D72D6017; Sat, 27 Dec 2008 18:39:43 -0800 (PST) Message-ID: <4956E6EE.6080009@elischer.org> Date: Sat, 27 Dec 2008 18:39:42 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: "M. Warner Losh" References: <200812271507.mBRF7pkv074681@svn.freebsd.org> <20081227150827.D97918@maildrop.int.zabbadoz.net> <26259E4E-6E26-4DAE-8046-80C7C46B7CD5@gmail.com> <20081227.193308.255407637.imp@bsdimp.com> In-Reply-To: <20081227.193308.255407637.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, yanefbsd@gmail.com, svn-src-all@FreeBSD.org, bz@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186519 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 02:39:44 -0000 M. Warner Losh wrote: > In message: <26259E4E-6E26-4DAE-8046-80C7C46B7CD5@gmail.com> > Garrett Cooper writes: > : > - For mips which is not yet part of universe: > : > + kernels compile fine after I had fixed one earlier today. > : > + world does not build but fails in libpam. > : > : *paging mr Losh -- mr Losh!* > > Still working on a solution that's correct and mutually acceptable to > DES. i think the ball is in my court. "mutually acceptable to DES" (?) One presumes he agrees with himself? (snark) > > Warner From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 04:51:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D543106564A; Sun, 28 Dec 2008 04:51:01 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id 0B2DD8FC13; Sun, 28 Dec 2008 04:51:01 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id BB8E9FEF3; Sun, 28 Dec 2008 17:50:59 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ryz7mACwc+1Q; Sun, 28 Dec 2008 17:50:55 +1300 (NZDT) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Sun, 28 Dec 2008 17:50:55 +1300 (NZDT) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id 3C76C1142B; Sun, 28 Dec 2008 17:50:55 +1300 (NZDT) Date: Sat, 27 Dec 2008 20:50:55 -0800 From: Andrew Thompson To: Stanislav Sedov Message-ID: <20081228045055.GA81182@citylink.fud.org.nz> References: <200812272048.mBRKmBKo082102@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812272048.mBRKmBKo082102@svn.freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186529 - head/sys/dev/acpi_support X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 04:51:01 -0000 On Sat, Dec 27, 2008 at 08:48:11PM +0000, Stanislav Sedov wrote: > Author: stas > Date: Sat Dec 27 20:48:11 2008 > New Revision: 186529 > URL: http://svn.freebsd.org/changeset/base/186529 > > Log: > - Fix incorrect array declaration that was causing the stack overflow > on some (most?) Asus laptops. > > Discussed with: rpaulo > Approved by: kib (mentor) > MFC after: 2 weeks > > Modified: > head/sys/dev/acpi_support/acpi_asus.c > > Modified: head/sys/dev/acpi_support/acpi_asus.c > ============================================================================== > --- head/sys/dev/acpi_support/acpi_asus.c Sat Dec 27 20:37:53 2008 (r186528) > +++ head/sys/dev/acpi_support/acpi_asus.c Sat Dec 27 20:48:11 2008 (r186529) > @@ -976,7 +976,7 @@ acpi_asus_sysctl_set(struct acpi_asus_so > { > ACPI_STATUS status = AE_OK; > ACPI_OBJECT_LIST acpiargs; > - ACPI_OBJECT acpiarg[0]; > + ACPI_OBJECT acpiarg[1]; > > ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); > ACPI_SERIAL_ASSERT(asus); Thanks! I have had panics that I think are related to this. Andrew From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 05:32:17 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B35521065673; Sun, 28 Dec 2008 05:32:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F8F38FC12; Sun, 28 Dec 2008 05:32:17 +0000 (UTC) (envelope-from delphij@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 mBS5WHiC003751; Sun, 28 Dec 2008 05:32:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBS5WHjW003749; Sun, 28 Dec 2008 05:32:17 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200812280532.mBS5WHjW003749@svn.freebsd.org> From: Xin LI Date: Sun, 28 Dec 2008 05:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186533 - in releng/7.1/sys: . contrib/pf dev/bce dev/cxgb modules/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 05:32:17 -0000 Author: delphij Date: Sun Dec 28 05:32:17 2008 New Revision: 186533 URL: http://svn.freebsd.org/changeset/base/186533 Log: Revert the bce(4) MFC and restore the state of code as of before changeset 184826. Some pending reliability changes needs to be tested throughly and it does not seem to be a good idea to ship the current state of bce(4) with the release. Thanks for everyone who provided testing and sorry for the mess. Approved by: re (kensmith) Modified: releng/7.1/sys/ (props changed) releng/7.1/sys/contrib/pf/ (props changed) releng/7.1/sys/dev/bce/if_bce.c releng/7.1/sys/dev/bce/if_bcefw.h releng/7.1/sys/dev/bce/if_bcereg.h releng/7.1/sys/dev/cxgb/ (props changed) releng/7.1/sys/modules/cxgb/ (props changed) Modified: releng/7.1/sys/dev/bce/if_bce.c ============================================================================== --- releng/7.1/sys/dev/bce/if_bce.c Sat Dec 27 23:24:59 2008 (r186532) +++ releng/7.1/sys/dev/bce/if_bce.c Sun Dec 28 05:32:17 2008 (r186533) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2006-2008 Broadcom Corporation + * Copyright (c) 2006-2007 Broadcom Corporation * David Christensen . All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,19 +34,13 @@ __FBSDID("$FreeBSD$"); /* * The following controllers are supported by this driver: * BCM5706C A2, A3 - * BCM5706S A2, A3 * BCM5708C B1, B2 - * BCM5708S B1, B2 - * BCM5709C A1, C0 - * BCM5716 C0 * * The following controllers are not supported by this driver: - * BCM5706C A0, A1 (pre-production) - * BCM5706S A0, A1 (pre-production) - * BCM5708C A0, B0 (pre-production) - * BCM5708S A0, B0 (pre-production) - * BCM5709C A0 B0, B1, B2 (pre-production) - * BCM5709S A0, A1, B0, B1, B2, C0 (pre-production) + * BCM5706C A0, A1 + * BCM5706S A0, A1, A2, A3 + * BCM5708C A0, B0 + * BCM5708S A0, B0, B1, B2 */ #include "opt_bce.h" @@ -86,12 +80,6 @@ __FBSDID("$FreeBSD$"); int bce_debug_bootcode_running_failure = 0; #endif -/****************************************************************************/ -/* BCE Build Time Options */ -/****************************************************************************/ -#define BCE_USE_SPLIT_HEADER 1 -/* #define BCE_NVRAM_WRITE_SUPPORT 1 */ - /****************************************************************************/ /* PCI Device ID Table */ @@ -122,19 +110,6 @@ static struct bce_type bce_devs[] = { /* BCM5708S controllers and OEM boards. */ { BRCM_VENDORID, BRCM_DEVICEID_BCM5708S, PCI_ANY_ID, PCI_ANY_ID, "Broadcom NetXtreme II BCM5708 1000Base-SX" }, - - /* BCM5709C controllers and OEM boards. */ - { BRCM_VENDORID, BRCM_DEVICEID_BCM5709, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5709 1000Base-T" }, - - /* BCM5709S controllers and OEM boards. */ - { BRCM_VENDORID, BRCM_DEVICEID_BCM5709S, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5709 1000Base-SX" }, - - /* BCM5716 controllers and OEM boards. */ - { BRCM_VENDORID, BRCM_DEVICEID_BCM5716, PCI_ANY_ID, PCI_ANY_ID, - "Broadcom NetXtreme II BCM5716 1000Base-T" }, - { 0, 0, 0, 0, NULL } }; @@ -144,110 +119,91 @@ static struct bce_type bce_devs[] = { /****************************************************************************/ static struct flash_spec flash_table[] = { -#define BUFFERED_FLAGS (BCE_NV_BUFFERED | BCE_NV_TRANSLATE) -#define NONBUFFERED_FLAGS (BCE_NV_WREN) - /* Slow EEPROM */ {0x00000000, 0x40830380, 0x009f0081, 0xa184a053, 0xaf000400, - BUFFERED_FLAGS, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, + 1, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, SEEPROM_BYTE_ADDR_MASK, SEEPROM_TOTAL_SIZE, "EEPROM - slow"}, /* Expansion entry 0001 */ {0x08000002, 0x4b808201, 0x00050081, 0x03840253, 0xaf020406, - NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 0001"}, /* Saifun SA25F010 (non-buffered flash) */ /* strap, cfg1, & write1 need updates */ {0x04000001, 0x47808201, 0x00050081, 0x03840253, 0xaf020406, - NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE*2, "Non-buffered flash (128kB)"}, /* Saifun SA25F020 (non-buffered flash) */ /* strap, cfg1, & write1 need updates */ {0x0c000003, 0x4f808201, 0x00050081, 0x03840253, 0xaf020406, - NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE*4, "Non-buffered flash (256kB)"}, /* Expansion entry 0100 */ {0x11000000, 0x53808201, 0x00050081, 0x03840253, 0xaf020406, - NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 0100"}, /* Entry 0101: ST M45PE10 (non-buffered flash, TetonII B0) */ {0x19000002, 0x5b808201, 0x000500db, 0x03840253, 0xaf020406, - NONBUFFERED_FLAGS, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, + 0, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, ST_MICRO_FLASH_BYTE_ADDR_MASK, ST_MICRO_FLASH_BASE_TOTAL_SIZE*2, "Entry 0101: ST M45PE10 (128kB non-bufferred)"}, /* Entry 0110: ST M45PE20 (non-buffered flash)*/ {0x15000001, 0x57808201, 0x000500db, 0x03840253, 0xaf020406, - NONBUFFERED_FLAGS, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, + 0, ST_MICRO_FLASH_PAGE_BITS, ST_MICRO_FLASH_PAGE_SIZE, ST_MICRO_FLASH_BYTE_ADDR_MASK, ST_MICRO_FLASH_BASE_TOTAL_SIZE*4, "Entry 0110: ST M45PE20 (256kB non-bufferred)"}, /* Saifun SA25F005 (non-buffered flash) */ /* strap, cfg1, & write1 need updates */ {0x1d000003, 0x5f808201, 0x00050081, 0x03840253, 0xaf020406, - NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, SAIFUN_FLASH_BASE_TOTAL_SIZE, "Non-buffered flash (64kB)"}, /* Fast EEPROM */ {0x22000000, 0x62808380, 0x009f0081, 0xa184a053, 0xaf000400, - BUFFERED_FLAGS, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, + 1, SEEPROM_PAGE_BITS, SEEPROM_PAGE_SIZE, SEEPROM_BYTE_ADDR_MASK, SEEPROM_TOTAL_SIZE, "EEPROM - fast"}, /* Expansion entry 1001 */ {0x2a000002, 0x6b808201, 0x00050081, 0x03840253, 0xaf020406, - NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 1001"}, /* Expansion entry 1010 */ {0x26000001, 0x67808201, 0x00050081, 0x03840253, 0xaf020406, - NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 1010"}, /* ATMEL AT45DB011B (buffered flash) */ {0x2e000003, 0x6e808273, 0x00570081, 0x68848353, 0xaf000400, - BUFFERED_FLAGS, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, BUFFERED_FLASH_BYTE_ADDR_MASK, BUFFERED_FLASH_TOTAL_SIZE, "Buffered flash (128kB)"}, /* Expansion entry 1100 */ {0x33000000, 0x73808201, 0x00050081, 0x03840253, 0xaf020406, - NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 1100"}, /* Expansion entry 1101 */ {0x3b000002, 0x7b808201, 0x00050081, 0x03840253, 0xaf020406, - NONBUFFERED_FLAGS, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, + 0, SAIFUN_FLASH_PAGE_BITS, SAIFUN_FLASH_PAGE_SIZE, SAIFUN_FLASH_BYTE_ADDR_MASK, 0, "Entry 1101"}, /* Ateml Expansion entry 1110 */ {0x37000001, 0x76808273, 0x00570081, 0x68848353, 0xaf000400, - BUFFERED_FLAGS, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, BUFFERED_FLASH_BYTE_ADDR_MASK, 0, "Entry 1110 (Atmel)"}, /* ATMEL AT45DB021B (buffered flash) */ {0x3f000003, 0x7e808273, 0x00570081, 0x68848353, 0xaf000400, - BUFFERED_FLAGS, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, + 1, BUFFERED_FLASH_PAGE_BITS, BUFFERED_FLASH_PAGE_SIZE, BUFFERED_FLASH_BYTE_ADDR_MASK, BUFFERED_FLASH_TOTAL_SIZE*2, "Buffered flash (256kB)"}, }; -/* - * The BCM5709 controllers transparently handle the - * differences between Atmel 264 byte pages and all - * flash devices which use 256 byte pages, so no - * logical-to-physical mapping is required in the - * driver. - */ -static struct flash_spec flash_5709 = { - .flags = BCE_NV_BUFFERED, - .page_bits = BCM5709_FLASH_PAGE_BITS, - .page_size = BCM5709_FLASH_PAGE_SIZE, - .addr_mask = BCM5709_FLASH_BYTE_ADDR_MASK, - .total_size = BUFFERED_FLASH_TOTAL_SIZE * 2, - .name = "5709/5716 buffered flash (256kB)", -}; - /****************************************************************************/ /* FreeBSD device entry points. */ @@ -262,41 +218,19 @@ static int bce_shutdown (device_t); /* BCE Debug Data Structure Dump Routines */ /****************************************************************************/ #ifdef BCE_DEBUG -static u32 bce_reg_rd (struct bce_softc *, u32); -static void bce_reg_wr (struct bce_softc *, u32, u32); -static void bce_reg_wr16 (struct bce_softc *, u32, u16); -static u32 bce_ctx_rd (struct bce_softc *, u32, u32); -static void bce_dump_enet (struct bce_softc *, struct mbuf *); static void bce_dump_mbuf (struct bce_softc *, struct mbuf *); -static void bce_dump_tx_mbuf_chain (struct bce_softc *, u16, int); -static void bce_dump_rx_mbuf_chain (struct bce_softc *, u16, int); -#ifdef BCE_USE_SPLIT_HEADER -static void bce_dump_pg_mbuf_chain (struct bce_softc *, u16, int); -#endif +static void bce_dump_tx_mbuf_chain (struct bce_softc *, int, int); +static void bce_dump_rx_mbuf_chain (struct bce_softc *, int, int); static void bce_dump_txbd (struct bce_softc *, int, struct tx_bd *); static void bce_dump_rxbd (struct bce_softc *, int, struct rx_bd *); -#ifdef BCE_USE_SPLIT_HEADER -static void bce_dump_pgbd (struct bce_softc *, int, struct rx_bd *); -#endif static void bce_dump_l2fhdr (struct bce_softc *, int, struct l2_fhdr *); -static void bce_dump_ctx (struct bce_softc *, u16); -static void bce_dump_ftqs (struct bce_softc *); -static void bce_dump_tx_chain (struct bce_softc *, u16, int); -static void bce_dump_rx_chain (struct bce_softc *, u16, int); -#ifdef BCE_USE_SPLIT_HEADER -static void bce_dump_pg_chain (struct bce_softc *, u16, int); -#endif +static void bce_dump_tx_chain (struct bce_softc *, int, int); +static void bce_dump_rx_chain (struct bce_softc *, int, int); static void bce_dump_status_block (struct bce_softc *); static void bce_dump_stats_block (struct bce_softc *); static void bce_dump_driver_state (struct bce_softc *); static void bce_dump_hw_state (struct bce_softc *); -static void bce_dump_mq_regs (struct bce_softc *); static void bce_dump_bc_state (struct bce_softc *); -static void bce_dump_txp_state (struct bce_softc *, int); -static void bce_dump_rxp_state (struct bce_softc *, int); -static void bce_dump_tpat_state (struct bce_softc *, int); -static void bce_dump_cp_state (struct bce_softc *, int); -static void bce_dump_com_state (struct bce_softc *, int); static void bce_breakpoint (struct bce_softc *); #endif @@ -334,7 +268,6 @@ static int bce_nvram_write (struct bc /****************************************************************************/ /* */ /****************************************************************************/ -static void bce_get_media (struct bce_softc *); static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); static int bce_dma_alloc (device_t); static void bce_dma_free (struct bce_softc *); @@ -346,34 +279,19 @@ static void bce_release_resources (struc static int bce_fw_sync (struct bce_softc *, u32); static void bce_load_rv2p_fw (struct bce_softc *, u32 *, u32, u32); static void bce_load_cpu_fw (struct bce_softc *, struct cpu_reg *, struct fw_info *); -static void bce_init_rxp_cpu (struct bce_softc *); -static void bce_init_txp_cpu (struct bce_softc *); -static void bce_init_tpat_cpu (struct bce_softc *); -static void bce_init_cp_cpu (struct bce_softc *); -static void bce_init_com_cpu (struct bce_softc *); static void bce_init_cpus (struct bce_softc *); -static void bce_print_adapter_info (struct bce_softc *); -static void bce_probe_pci_caps (device_t, struct bce_softc *); static void bce_stop (struct bce_softc *); static int bce_reset (struct bce_softc *, u32); static int bce_chipinit (struct bce_softc *); static int bce_blockinit (struct bce_softc *); +static int bce_get_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *); static int bce_init_tx_chain (struct bce_softc *); -static void bce_free_tx_chain (struct bce_softc *); - -static int bce_get_rx_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *); -static int bce_init_rx_chain (struct bce_softc *); static void bce_fill_rx_chain (struct bce_softc *); +static int bce_init_rx_chain (struct bce_softc *); static void bce_free_rx_chain (struct bce_softc *); - -#ifdef BCE_USE_SPLIT_HEADER -static int bce_get_pg_buf (struct bce_softc *, struct mbuf *, u16 *, u16 *); -static int bce_init_pg_chain (struct bce_softc *); -static void bce_fill_pg_chain (struct bce_softc *); -static void bce_free_pg_chain (struct bce_softc *); -#endif +static void bce_free_tx_chain (struct bce_softc *); static int bce_tx_encap (struct bce_softc *, struct mbuf **); static void bce_start_locked (struct ifnet *); @@ -387,16 +305,19 @@ static void bce_init_locked (struct bc static void bce_init (void *); static void bce_mgmt_init_locked (struct bce_softc *sc); -static void bce_init_ctx (struct bce_softc *); +static void bce_init_context (struct bce_softc *); static void bce_get_mac_addr (struct bce_softc *); static void bce_set_mac_addr (struct bce_softc *); static void bce_phy_intr (struct bce_softc *); -static inline u16 bce_get_hw_rx_cons(struct bce_softc *); static void bce_rx_intr (struct bce_softc *); static void bce_tx_intr (struct bce_softc *); static void bce_disable_intr (struct bce_softc *); -static void bce_enable_intr (struct bce_softc *, int); +static void bce_enable_intr (struct bce_softc *); +#ifdef DEVICE_POLLING +static void bce_poll_locked (struct ifnet *, enum poll_cmd, int); +static void bce_poll (struct ifnet *, enum poll_cmd, int); +#endif static void bce_intr (void *); static void bce_set_rx_mode (struct bce_softc *); static void bce_stats_update (struct bce_softc *); @@ -409,28 +330,20 @@ static void bce_add_sysctls (struct bc /* FreeBSD device dispatch table. */ /****************************************************************************/ static device_method_t bce_methods[] = { - /* Device interface (device_if.h) */ + /* Device interface */ DEVMETHOD(device_probe, bce_probe), DEVMETHOD(device_attach, bce_attach), DEVMETHOD(device_detach, bce_detach), DEVMETHOD(device_shutdown, bce_shutdown), -/* Supported by device interface but not used here. */ -/* DEVMETHOD(device_identify, bce_identify), */ -/* DEVMETHOD(device_suspend, bce_suspend), */ -/* DEVMETHOD(device_resume, bce_resume), */ -/* DEVMETHOD(device_quiesce, bce_quiesce), */ - /* Bus interface (bus_if.h) */ + /* bus interface */ DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface (miibus_if.h) */ + /* MII interface */ DEVMETHOD(miibus_readreg, bce_miibus_read_reg), DEVMETHOD(miibus_writereg, bce_miibus_write_reg), DEVMETHOD(miibus_statchg, bce_miibus_statchg), -/* Supported by MII interface but not used here. */ -/* DEVMETHOD(miibus_linkchg, bce_miibus_linkchg), */ -/* DEVMETHOD(miibus_mediainit, bce_miibus_mediainit), */ { 0, 0 } }; @@ -454,26 +367,19 @@ DRIVER_MODULE(miibus, bce, miibus_driver /****************************************************************************/ /* Tunable device values */ /****************************************************************************/ -SYSCTL_NODE(_hw, OID_AUTO, bce, CTLFLAG_RD, 0, "bce driver parameters"); +static int bce_tso_enable = TRUE; +static int bce_msi_enable = 1; /* Allowable values are TRUE or FALSE */ -static int bce_tso_enable = TRUE; TUNABLE_INT("hw.bce.tso_enable", &bce_tso_enable); +/* Allowable values are 0 (IRQ only) and 1 (IRQ or MSI) */ +TUNABLE_INT("hw.bce.msi_enable", &bce_msi_enable); + +SYSCTL_NODE(_hw, OID_AUTO, bce, CTLFLAG_RD, 0, "bce driver parameters"); SYSCTL_UINT(_hw_bce, OID_AUTO, tso_enable, CTLFLAG_RDTUN, &bce_tso_enable, 0, "TSO Enable/Disable"); - -/* Allowable values are 0 (IRQ), 1 (MSI/IRQ), and 2 (MSI-X/MSI/IRQ) */ -/* ToDo: Add MSI-X support. */ -static int bce_msi_enable = 1; -TUNABLE_INT("hw.bce.msi_enable", &bce_msi_enable); SYSCTL_UINT(_hw_bce, OID_AUTO, msi_enable, CTLFLAG_RDTUN, &bce_msi_enable, 0, -"MSI-X|MSI|INTx selector"); - -/* ToDo: Add tunable to enable/disable strict MTU handling. */ -/* Currently allows "loose" RX MTU checking (i.e. sets the */ -/* H/W RX MTU to the size of the largest receive buffer, or */ -/* 2048 bytes). */ - +"MSI | INTx selector"); /****************************************************************************/ /* Device probe function. */ @@ -505,14 +411,14 @@ bce_probe(device_t dev) svid = pci_get_subvendor(dev); sdid = pci_get_subdevice(dev); - DBPRINT(sc, BCE_EXTREME_LOAD, + DBPRINT(sc, BCE_VERBOSE_LOAD, "%s(); VID = 0x%04X, DID = 0x%04X, SVID = 0x%04X, " "SDID = 0x%04X\n", __FUNCTION__, vid, did, svid, sdid); /* Look through the list of known devices for a match. */ while(t->bce_name != NULL) { - if ((vid == t->bce_vid) && (did == t->bce_did) && + if ((vid == t->bce_vid) && (did == t->bce_did) && ((svid == t->bce_svid) || (t->bce_svid == PCI_ANY_ID)) && ((sdid == t->bce_sdid) || (t->bce_sdid == PCI_ANY_ID))) { @@ -522,7 +428,7 @@ bce_probe(device_t dev) return(ENOMEM); /* Print out the device identity. */ - snprintf(descbuf, BCE_DEVDESC_MAX, "%s (%c%d)", + snprintf(descbuf, BCE_DEVDESC_MAX, "%s (%c%d)", t->bce_name, (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); @@ -539,109 +445,6 @@ bce_probe(device_t dev) /****************************************************************************/ -/* PCI Capabilities Probe Function. */ -/* */ -/* Walks the PCI capabiites list for the device to find what features are */ -/* supported. */ -/* */ -/* Returns: */ -/* None. */ -/****************************************************************************/ -static void -bce_print_adapter_info(struct bce_softc *sc) -{ - DBENTER(BCE_VERBOSE_LOAD); - - BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid); - printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A', - ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); - - /* Bus info. */ - if (sc->bce_flags & BCE_PCIE_FLAG) { - printf("Bus (PCIe x%d, ", sc->link_width); - switch (sc->link_speed) { - case 1: printf("2.5Gbps); "); break; - case 2: printf("5Gbps); "); break; - default: printf("Unknown link speed); "); - } - } else { - printf("Bus (PCI%s, %s, %dMHz); ", - ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), - ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"), - sc->bus_speed_mhz); - } - - /* Firmware version and device features. */ - printf("F/W (0x%08X); Flags( ", sc->bce_fw_ver); -#ifdef BCE_USE_SPLIT_HEADER - printf("SPLT "); -#endif - if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) - printf("MFW "); - if (sc->bce_flags & BCE_USING_MSI_FLAG) - printf("MSI "); - if (sc->bce_flags & BCE_USING_MSIX_FLAG) - printf("MSI-X "); - if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) - printf("2.5G "); - printf(")\n"); - - DBEXIT(BCE_VERBOSE_LOAD); -} - - -/****************************************************************************/ -/* PCI Capabilities Probe Function. */ -/* */ -/* Walks the PCI capabiites list for the device to find what features are */ -/* supported. */ -/* */ -/* Returns: */ -/* None. */ -/****************************************************************************/ -static void -bce_probe_pci_caps(device_t dev, struct bce_softc *sc) -{ - u32 reg; - - DBENTER(BCE_VERBOSE_LOAD); - - /* Check if PCI-X capability is enabled. */ - if (pci_find_extcap(dev, PCIY_PCIX, ®) == 0) { - if (reg != 0) - sc->bce_cap_flags |= BCE_PCIX_CAPABLE_FLAG; - } - - /* Check if PCIe capability is enabled. */ - if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) { - if (reg != 0) { - u16 link_status = pci_read_config(dev, reg + 0x12, 2); - DBPRINT(sc, BCE_INFO_LOAD, "PCIe link_status = 0x%08X\n", - link_status); - sc->link_speed = link_status & 0xf; - sc->link_width = (link_status >> 4) & 0x3f; - sc->bce_cap_flags |= BCE_PCIE_CAPABLE_FLAG; - sc->bce_flags |= BCE_PCIE_FLAG; - } - } - - /* Check if MSI capability is enabled. */ - if (pci_find_extcap(dev, PCIY_MSI, ®) == 0) { - if (reg != 0) - sc->bce_cap_flags |= BCE_MSI_CAPABLE_FLAG; - } - - /* Check if MSI-X capability is enabled. */ - if (pci_find_extcap(dev, PCIY_MSIX, ®) == 0) { - if (reg != 0) - sc->bce_cap_flags |= BCE_MSIX_CAPABLE_FLAG; - } - - DBEXIT(BCE_VERBOSE_LOAD); -} - - -/****************************************************************************/ /* Device attach function. */ /* */ /* Allocates device resources, performs secondary chip identification, */ @@ -657,19 +460,21 @@ bce_attach(device_t dev) struct bce_softc *sc; struct ifnet *ifp; u32 val; - int error, rid, rc = 0; + int count, mbuf, rid, rc = 0; sc = device_get_softc(dev); sc->bce_dev = dev; - DBENTER(BCE_VERBOSE_LOAD | BCE_VERBOSE_RESET); + DBPRINT(sc, BCE_VERBOSE_RESET, "Entering %s()\n", __FUNCTION__); - sc->bce_unit = device_get_unit(dev); + mbuf = device_get_unit(dev); /* Set initial device and PHY flags */ sc->bce_flags = 0; sc->bce_phy_flags = 0; + sc->bce_unit = mbuf; + pci_enable_busmaster(dev); /* Allocate PCI memory resources. */ @@ -678,7 +483,7 @@ bce_attach(device_t dev) &rid, RF_ACTIVE | PCI_RF_DENSE); if (sc->bce_res_mem == NULL) { - BCE_PRINTF("%s(%d): PCI memory allocation failed\n", + BCE_PRINTF("%s(%d): PCI memory allocation failed\n", __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; @@ -689,74 +494,25 @@ bce_attach(device_t dev) sc->bce_bhandle = rman_get_bushandle(sc->bce_res_mem); sc->bce_vhandle = (vm_offset_t) rman_get_virtual(sc->bce_res_mem); - bce_probe_pci_caps(dev, sc); - - rid = 1; -#if 0 - /* Try allocating MSI-X interrupts. */ - if ((sc->bce_cap_flags & BCE_MSIX_CAPABLE_FLAG) && - (bce_msi_enable >= 2) && - ((sc->bce_res_irq = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &rid, RF_ACTIVE)) != NULL)) { - - msi_needed = sc->bce_msi_count = 1; - - if (((error = pci_alloc_msix(dev, &sc->bce_msi_count)) != 0) || - (sc->bce_msi_count != msi_needed)) { - BCE_PRINTF("%s(%d): MSI-X allocation failed! Requested = %d," - "Received = %d, error = %d\n", __FILE__, __LINE__, - msi_needed, sc->bce_msi_count, error); - sc->bce_msi_count = 0; - pci_release_msi(dev); - bus_release_resource(dev, SYS_RES_MEMORY, rid, - sc->bce_res_irq); - sc->bce_res_irq = NULL; - } else { - DBPRINT(sc, BCE_INFO_LOAD, "%s(): Using MSI-X interrupt.\n", - __FUNCTION__); - sc->bce_flags |= BCE_USING_MSIX_FLAG; - sc->bce_intr = bce_intr; - } - } -#endif - - /* Try allocating a MSI interrupt. */ - if ((sc->bce_cap_flags & BCE_MSI_CAPABLE_FLAG) && - (bce_msi_enable >= 1) && (sc->bce_msi_count == 0)) { - sc->bce_msi_count = 1; - if ((error = pci_alloc_msi(dev, &sc->bce_msi_count)) != 0) { - BCE_PRINTF("%s(%d): MSI allocation failed! error = %d\n", - __FILE__, __LINE__, error); - sc->bce_msi_count = 0; - pci_release_msi(dev); - } else { - DBPRINT(sc, BCE_INFO_LOAD, "%s(): Using MSI interrupt.\n", - __FUNCTION__); - sc->bce_flags |= BCE_USING_MSI_FLAG; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) - sc->bce_flags |= BCE_ONE_SHOT_MSI_FLAG; - sc->bce_irq_rid = 1; - sc->bce_intr = bce_intr; - } - } + /* If MSI is enabled in the driver, get the vector count. */ + count = bce_msi_enable ? pci_msi_count(dev) : 0; - /* Try allocating a legacy interrupt. */ - if (sc->bce_msi_count == 0) { - DBPRINT(sc, BCE_INFO_LOAD, "%s(): Using INTx interrupt.\n", - __FUNCTION__); + /* Allocate PCI IRQ resources. */ + if (count == 1 && pci_alloc_msi(dev, &count) == 0 && count == 1) { + rid = 1; + sc->bce_flags |= BCE_USING_MSI_FLAG; + DBPRINT(sc, BCE_VERBOSE_LOAD, + "Allocating %d MSI interrupt(s)\n", count); + } else { rid = 0; - sc->bce_intr = bce_intr; + DBPRINT(sc, BCE_VERBOSE_LOAD, "Allocating IRQ interrupt\n"); } - sc->bce_res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, - &rid, RF_SHAREABLE | RF_ACTIVE); - - sc->bce_irq_rid = rid; + sc->bce_res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE); - /* Report any IRQ allocation errors. */ if (sc->bce_res_irq == NULL) { - BCE_PRINTF("%s(%d): PCI map interrupt failed!\n", + BCE_PRINTF("%s(%d): PCI map interrupt failed!\n", __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; @@ -784,22 +540,18 @@ bce_attach(device_t dev) case BCE_CHIP_ID_5706_A1: case BCE_CHIP_ID_5708_A0: case BCE_CHIP_ID_5708_B0: - case BCE_CHIP_ID_5709_A0: - case BCE_CHIP_ID_5709_B0: - case BCE_CHIP_ID_5709_B1: - case BCE_CHIP_ID_5709_B2: BCE_PRINTF("%s(%d): Unsupported controller revision (%c%d)!\n", - __FILE__, __LINE__, + __FILE__, __LINE__, (((pci_read_config(dev, PCIR_REVID, 4) & 0xf0) >> 4) + 'A'), (pci_read_config(dev, PCIR_REVID, 4) & 0xf)); rc = ENODEV; goto bce_attach_fail; } - /* - * The embedded PCIe to PCI-X bridge (EPB) - * in the 5708 cannot address memory above - * 40 bits (E7_5708CB1_23043 & E6_5708SB1_23043). + /* + * The embedded PCIe to PCI-X bridge (EPB) + * in the 5708 cannot address memory above + * 40 bits (E7_5708CB1_23043 & E6_5708SB1_23043). */ if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5708) sc->max_bus_addr = BCE_BUS_SPACE_MAXADDR; @@ -813,23 +565,25 @@ bce_attach(device_t dev) */ val = REG_RD_IND(sc, BCE_SHM_HDR_SIGNATURE); if ((val & BCE_SHM_HDR_SIGNATURE_SIG_MASK) == BCE_SHM_HDR_SIGNATURE_SIG) - /* Multi-port devices use different offsets in shared memory. */ - sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0 + - (pci_get_function(sc->bce_dev) << 2)); + sc->bce_shmem_base = REG_RD_IND(sc, BCE_SHM_HDR_ADDR_0); else sc->bce_shmem_base = HOST_VIEW_SHMEM_BASE; - DBPRINT(sc, BCE_VERBOSE_FIRMWARE, "%s(): bce_shmem_base = 0x%08X\n", + DBPRINT(sc, BCE_VERBOSE_FIRMWARE, "%s(): bce_shmem_base = 0x%08X\n", __FUNCTION__, sc->bce_shmem_base); - /* Fetch the bootcode revision. */ - sc->bce_fw_ver = REG_RD_IND(sc, sc->bce_shmem_base + + sc->bce_fw_ver = REG_RD_IND(sc, sc->bce_shmem_base + BCE_DEV_INFO_BC_REV); + DBPRINT(sc, BCE_INFO_FIRMWARE, "%s(): bce_fw_ver = 0x%08X\n", + __FUNCTION__, sc->bce_fw_ver); /* Check if any management firmware is running. */ val = REG_RD_IND(sc, sc->bce_shmem_base + BCE_PORT_FEATURE); - if (val & (BCE_PORT_FEATURE_ASF_ENABLED | BCE_PORT_FEATURE_IMD_ENABLED)) + if (val & (BCE_PORT_FEATURE_ASF_ENABLED | BCE_PORT_FEATURE_IMD_ENABLED)) { sc->bce_flags |= BCE_MFW_ENABLE_FLAG; + DBPRINT(sc, BCE_INFO_LOAD, "%s(): BCE_MFW_ENABLE_FLAG\n", + __FUNCTION__); + } /* Get PCI bus information (speed and type). */ val = REG_RD(sc, BCE_PCICFG_MISC_STATUS); @@ -878,7 +632,7 @@ bce_attach(device_t dev) /* Reset the controller and announce to bootcode that driver is present. */ if (bce_reset(sc, BCE_DRV_MSG_CODE_RESET)) { - BCE_PRINTF("%s(%d): Controller reset failed!\n", + BCE_PRINTF("%s(%d): Controller reset failed!\n", __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; @@ -908,7 +662,7 @@ bce_attach(device_t dev) * should be ready before generating an * interrupt while ticks control how long * a BD can sit in the chain before - * generating an interrupt. Set the default + * generating an interrupt. Set the default * values for the RX and TX chains. */ @@ -939,14 +693,33 @@ bce_attach(device_t dev) /* Update statistics once every second. */ sc->bce_stats_ticks = 1000000 & 0xffff00; - /* Find the media type for the adapter. */ - bce_get_media(sc); + /* + * The SerDes based NetXtreme II controllers + * that support 2.5Gb operation (currently + * 5708S) use a PHY at address 2, otherwise + * the PHY is present at address 1. + */ + sc->bce_phy_addr = 1; + + if (BCE_CHIP_BOND_ID(sc) & BCE_CHIP_BOND_ID_SERDES_BIT) { + sc->bce_phy_flags |= BCE_PHY_SERDES_FLAG; + sc->bce_flags |= BCE_NO_WOL_FLAG; + if (BCE_CHIP_NUM(sc) != BCE_CHIP_NUM_5706) { + sc->bce_phy_addr = 2; + val = REG_RD_IND(sc, sc->bce_shmem_base + + BCE_SHARED_HW_CFG_CONFIG); + if (val & BCE_SHARED_HW_CFG_PHY_2_5G) { + sc->bce_phy_flags |= BCE_PHY_2_5G_CAPABLE_FLAG; + DBPRINT(sc, BCE_INFO_LOAD, "Found 2.5Gb capable adapter\n"); + } + } + } /* Store data needed by PHY driver for backplane applications */ sc->bce_shared_hw_cfg = REG_RD_IND(sc, sc->bce_shmem_base + BCE_SHARED_HW_CFG_CONFIG); sc->bce_port_hw_cfg = REG_RD_IND(sc, sc->bce_shmem_base + - BCE_PORT_HW_CFG_CONFIG); + BCE_SHARED_HW_CFG_CONFIG); /* Allocate DMA memory resources. */ if (bce_dma_alloc(dev)) { @@ -959,7 +732,7 @@ bce_attach(device_t dev) /* Allocate an ifnet structure. */ ifp = sc->bce_ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { - BCE_PRINTF("%s(%d): Interface allocation failed!\n", + BCE_PRINTF("%s(%d): Interface allocation failed!\n", __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; @@ -984,24 +757,10 @@ bce_attach(device_t dev) ifp->if_capenable = ifp->if_capabilities; - /* - * Assume standard mbuf sizes for buffer allocation. - * This may change later if the MTU size is set to - * something other than 1500. - */ -#ifdef BCE_USE_SPLIT_HEADER - sc->rx_bd_mbuf_alloc_size = MHLEN; - /* Make sure offset is 16 byte aligned for hardware. */ - sc->rx_bd_mbuf_align_pad = roundup2((MSIZE - MHLEN), 16) - - (MSIZE - MHLEN); - sc->rx_bd_mbuf_data_len = sc->rx_bd_mbuf_alloc_size - - sc->rx_bd_mbuf_align_pad; - sc->pg_bd_mbuf_alloc_size = MCLBYTES; -#else - sc->rx_bd_mbuf_alloc_size = MCLBYTES; - sc->rx_bd_mbuf_align_pad = roundup2(MCLBYTES, 16) - MCLBYTES; - sc->rx_bd_mbuf_data_len = sc->rx_bd_mbuf_alloc_size - - sc->rx_bd_mbuf_align_pad; + /* Assume a standard 1500 byte MTU size for mbuf allocations. */ + sc->mbuf_alloc_size = MCLBYTES; +#ifdef DEVICE_POLLING + ifp->if_capabilities |= IFCAP_POLLING; #endif ifp->if_snd.ifq_drv_maxlen = USABLE_TX_BD; @@ -1016,7 +775,7 @@ bce_attach(device_t dev) /* Check for an MII child bus by probing the PHY. */ if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd, bce_ifmedia_sts)) { - BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n", + BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n", __FILE__, __LINE__); rc = ENXIO; goto bce_attach_fail; @@ -1034,31 +793,30 @@ bce_attach(device_t dev) #endif /* Hookup IRQ last. */ - rc = bus_setup_intr(dev, sc->bce_res_irq, INTR_TYPE_NET | INTR_MPSAFE, - NULL, bce_intr, sc, &sc->bce_intrhand); + rc = bus_setup_intr(dev, sc->bce_res_irq, INTR_TYPE_NET | INTR_MPSAFE, NULL, + bce_intr, sc, &sc->bce_intrhand); if (rc) { - BCE_PRINTF("%s(%d): Failed to setup IRQ!\n", + BCE_PRINTF("%s(%d): Failed to setup IRQ!\n", __FILE__, __LINE__); bce_detach(dev); goto bce_attach_exit; } - /* - * At this point we've acquired all the resources + /* + * At this point we've acquired all the resources * we need to run so there's no turning back, we're * cleared for launch. */ /* Print some important debugging info. */ - DBRUNMSG(BCE_INFO, bce_dump_driver_state(sc)); + DBRUN(BCE_INFO, bce_dump_driver_state(sc)); /* Add the supported sysctls to the kernel. */ bce_add_sysctls(sc); BCE_LOCK(sc); - - /* + /* * The chip reset earlier notified the bootcode that * a driver is present. We now need to start our pulse * routine so that the bootcode is reminded that we're @@ -1070,9 +828,21 @@ bce_attach(device_t dev) BCE_UNLOCK(sc); /* Finally, print some useful adapter info */ - bce_print_adapter_info(sc); - DBPRINT(sc, BCE_FATAL, "%s(): sc = %p\n", - __FUNCTION__, sc); + BCE_PRINTF("ASIC (0x%08X); ", sc->bce_chipid); + printf("Rev (%c%d); ", ((BCE_CHIP_ID(sc) & 0xf000) >> 12) + 'A', + ((BCE_CHIP_ID(sc) & 0x0ff0) >> 4)); + printf("Bus (PCI%s, %s, %dMHz); ", + ((sc->bce_flags & BCE_PCIX_FLAG) ? "-X" : ""), + ((sc->bce_flags & BCE_PCI_32BIT_FLAG) ? "32-bit" : "64-bit"), + sc->bus_speed_mhz); + printf("F/W (0x%08X); Flags( ", sc->bce_fw_ver); + if (sc->bce_flags & BCE_MFW_ENABLE_FLAG) + printf("MFW "); + if (sc->bce_flags & BCE_USING_MSI_FLAG) + printf("MSI "); + if (sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG) + printf("2.5G "); + printf(")\n"); goto bce_attach_exit; @@ -1081,7 +851,7 @@ bce_attach_fail: bce_attach_exit: - DBEXIT(BCE_VERBOSE_LOAD | BCE_VERBOSE_RESET); + DBPRINT(sc, BCE_VERBOSE_RESET, "Exiting %s()\n", __FUNCTION__); return(rc); } @@ -1102,23 +872,26 @@ bce_detach(device_t dev) struct ifnet *ifp; u32 msg; - DBENTER(BCE_VERBOSE_UNLOAD | BCE_VERBOSE_RESET); + DBPRINT(sc, BCE_VERBOSE_RESET, "Entering %s()\n", __FUNCTION__); ifp = sc->bce_ifp; - /* Stop and reset the controller. */ - BCE_LOCK(sc); +#ifdef DEVICE_POLLING + if (ifp->if_capenable & IFCAP_POLLING) + ether_poll_deregister(ifp); +#endif /* Stop the pulse so the bootcode can go to driver absent state. */ callout_stop(&sc->bce_pulse_callout); + /* Stop and reset the controller. */ + BCE_LOCK(sc); bce_stop(sc); if (sc->bce_flags & BCE_NO_WOL_FLAG) msg = BCE_DRV_MSG_CODE_UNLOAD_LNK_DN; else msg = BCE_DRV_MSG_CODE_UNLOAD; bce_reset(sc, msg); - BCE_UNLOCK(sc); ether_ifdetach(ifp); @@ -1130,7 +903,7 @@ bce_detach(device_t dev) /* Release all remaining resources. */ bce_release_resources(sc); - DBEXIT(BCE_VERBOSE_UNLOAD | BCE_VERBOSE_RESET); + DBPRINT(sc, BCE_VERBOSE_RESET, "Exiting %s()\n", __FUNCTION__); return(0); } @@ -1150,7 +923,7 @@ bce_shutdown(device_t dev) struct bce_softc *sc = device_get_softc(dev); u32 msg; - DBENTER(BCE_VERBOSE); + DBPRINT(sc, BCE_VERBOSE_SPECIAL, "Entering %s()\n", __FUNCTION__); BCE_LOCK(sc); bce_stop(sc); @@ -1160,60 +933,13 @@ bce_shutdown(device_t dev) msg = BCE_DRV_MSG_CODE_UNLOAD; bce_reset(sc, msg); BCE_UNLOCK(sc); - - DBEXIT(BCE_VERBOSE); + + DBPRINT(sc, BCE_VERBOSE_SPECIAL, "Exiting %s()\n", __FUNCTION__); return (0); } -#ifdef BCE_DEBUG -/****************************************************************************/ -/* Register read. */ -/* */ -/* Returns: */ -/* The value of the register. */ -/****************************************************************************/ -static u32 -bce_reg_rd(struct bce_softc *sc, u32 offset) -{ - u32 val = bus_space_read_4(sc->bce_btag, sc->bce_bhandle, offset); - DBPRINT(sc, BCE_INSANE_REG, "%s(); offset = 0x%08X, val = 0x%08X\n", - __FUNCTION__, offset, val); - return val; -} - - -/****************************************************************************/ -/* Register write (16 bit). */ -/* */ -/* Returns: */ -/* Nothing. */ -/****************************************************************************/ -static void -bce_reg_wr16(struct bce_softc *sc, u32 offset, u16 val) -{ - DBPRINT(sc, BCE_INSANE_REG, "%s(); offset = 0x%08X, val = 0x%04X\n", - __FUNCTION__, offset, val); - bus_space_write_2(sc->bce_btag, sc->bce_bhandle, offset, val); -} - - -/****************************************************************************/ -/* Register write. */ -/* */ -/* Returns: */ -/* Nothing. */ -/****************************************************************************/ -static void -bce_reg_wr(struct bce_softc *sc, u32 offset, u32 val) -{ - DBPRINT(sc, BCE_INSANE_REG, "%s(); offset = 0x%08X, val = 0x%08X\n", - __FUNCTION__, offset, val); - bus_space_write_4(sc->bce_btag, sc->bce_bhandle, offset, val); -} -#endif - /****************************************************************************/ /* Indirect register read. */ /* */ @@ -1235,7 +961,7 @@ bce_reg_rd_ind(struct bce_softc *sc, u32 { u32 val; val = pci_read_config(dev, BCE_PCICFG_REG_WINDOW, 4); - DBPRINT(sc, BCE_INSANE_REG, "%s(); offset = 0x%08X, val = 0x%08X\n", + DBPRINT(sc, BCE_EXCESSIVE, "%s(); offset = 0x%08X, val = 0x%08X\n", __FUNCTION__, offset, val); return val; } @@ -1261,7 +987,7 @@ bce_reg_wr_ind(struct bce_softc *sc, u32 device_t dev; dev = sc->bce_dev; - DBPRINT(sc, BCE_INSANE_REG, "%s(); offset = 0x%08X, val = 0x%08X\n", + DBPRINT(sc, BCE_EXCESSIVE, "%s(); offset = 0x%08X, val = 0x%08X\n", __FUNCTION__, offset, val); pci_write_config(dev, BCE_PCICFG_REG_WINDOW_ADDRESS, offset, 4); @@ -1269,58 +995,6 @@ bce_reg_wr_ind(struct bce_softc *sc, u32 } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 05:35:30 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5F8F106564A; Sun, 28 Dec 2008 05:35:30 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id C33CF8FC0C; Sun, 28 Dec 2008 05:35:30 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id B21FE1A3C3D; Sat, 27 Dec 2008 21:35:30 -0800 (PST) Date: Sat, 27 Dec 2008 21:35:30 -0800 From: Alfred Perlstein To: Scott Long Message-ID: <20081228053530.GF18389@elvis.mu.org> References: <4947D474.9040802@samsco.org> <20081216.101038.1172765453.imp@bsdimp.com> <4947F363.4010909@samsco.org> <20081216.120412.1346820326.imp@bsdimp.com> <20081227003826.GV18389@elvis.mu.org> <72A0CF67-F521-4C4B-955D-A80A77CC1165@samsco.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <72A0CF67-F521-4C4B-955D-A80A77CC1165@samsco.org> User-Agent: Mutt/1.4.2.3i Cc: "svn-src-head@freebsd.org" , "mav@freebsd.org" , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "M. Warner Losh" Subject: Re: svn commit: r186182 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 05:35:31 -0000 * Scott Long [081226 18:34] wrote: > > On Dec 26, 2008, at 5:38 PM, Alfred Perlstein > wrote: > > > >Easy enough to stash a "once" varible in the generic device struct > >and warn when returning from an isr when INVARIANTS or something is > >turned on. > > > >Then you'd only get one warning per device once it happens. > > > > > > I prefer to do nothing. It's not unsafe or erroneous to access cfg > registers. But if some kind of message does get added, I insist that > it drop all pretenses and say, "you're too poor to run freebsd, come > back when you can afford better hardware.". :) Well that could be the result of a driver that has a "bug" that makes it access cfg space when it does not need to, as what seems to have just been fixed. -- - Alfred Perlstein From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 05:38:49 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65F301065670; Sun, 28 Dec 2008 05:38:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 546EB8FC12; Sun, 28 Dec 2008 05:38:49 +0000 (UTC) (envelope-from delphij@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 mBS5cnfe004016; Sun, 28 Dec 2008 05:38:49 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBS5cnsO004015; Sun, 28 Dec 2008 05:38:49 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200812280538.mBS5cnsO004015@svn.freebsd.org> From: Xin LI Date: Sun, 28 Dec 2008 05:38:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186534 - releng/7.1/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 05:38:49 -0000 Author: delphij Date: Sun Dec 28 05:38:49 2008 New Revision: 186534 URL: http://svn.freebsd.org/changeset/base/186534 Log: Revert MFC of 185574 in response of changeset 186533 which removed BCM5709/5716 support. Approved by: re (kensmith) Modified: releng/7.1/share/man/man4/ (props changed) releng/7.1/share/man/man4/bce.4 Modified: releng/7.1/share/man/man4/bce.4 ============================================================================== --- releng/7.1/share/man/man4/bce.4 Sun Dec 28 05:32:17 2008 (r186533) +++ releng/7.1/share/man/man4/bce.4 Sun Dec 28 05:38:49 2008 (r186534) @@ -28,12 +28,12 @@ .\" .\" $FreeBSD$ .\" -.Dd December 2, 2008 +.Dd June 24, 2007 .Dt BCE 4 .Os .Sh NAME .Nm bce -.Nd "Broadcom NetXtreme II (BCM5706/5708/5709/5716) PCI/PCIe Gigabit Ethernet adapter driver" +.Nd "Broadcom NetXtreme II (BCM5706/BCM5708) PCI/PCIe Gigabit Ethernet adapter driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -53,13 +53,12 @@ if_bce_load="YES" The .Nm driver supports Broadcom's NetXtreme II product family, including the -BCM5706, BCM5708, BCM5709 and BCM5716 Ethernet controllers. +BCM5706 and BCM5708 Ethernet controllers. .Pp The NetXtreme II product family is composed of various Converged NIC (or CNIC) Ethernet controllers which support a TCP Offload Engine (TOE), Remote DMA (RDMA), and iSCSI acceleration, in addition to standard L2 Ethernet traffic, all on the same controller. -.Pp The following features are supported in the .Nm driver under @@ -137,26 +136,10 @@ following: .Pp .Bl -bullet -compact .It -Broadcom NetXtreme II BCM5706 1000Base-SX -.It -Broadcom NetXtreme II BCM5706 1000Base-T -.It -Broadcom NetXtreme II BCM5708 1000Base-SX -.It -Broadcom NetXtreme II BCM5708 1000Base-T -.It -Broadcom NetXtreme II BCM5709 1000Base-SX -.It -Broadcom NetXtreme II BCM5709 1000Base-T -.It -Broadcom NetXtreme II BCM5716 1000Base-T -.It Dell PowerEdge 1950 integrated BCM5708 NIC .It Dell PowerEdge 2950 integrated BCM5708 NIC .It -HP NC370F Multifunction Gigabit Server Adapter -.It HP NC370T Multifunction Gigabit Server Adapter .It HP NC370i Multifunction Gigabit Server Adapter From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 06:12:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B2331065670; Sun, 28 Dec 2008 06:12:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id CC60B8FC17; Sun, 28 Dec 2008 06:12:40 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mBS6CHia057516; Sat, 27 Dec 2008 23:12:17 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 27 Dec 2008 23:12:29 -0700 (MST) Message-Id: <20081227.231229.139568214.imp@bsdimp.com> To: alfred@freebsd.org From: "M. Warner Losh" In-Reply-To: <20081228053530.GF18389@elvis.mu.org> References: <20081227003826.GV18389@elvis.mu.org> <72A0CF67-F521-4C4B-955D-A80A77CC1165@samsco.org> <20081228053530.GF18389@elvis.mu.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, scottl@samsco.org, src-committers@freebsd.org, mav@freebsd.org Subject: Re: svn commit: r186182 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 06:12:41 -0000 In message: <20081228053530.GF18389@elvis.mu.org> Alfred Perlstein writes: : * Scott Long [081226 18:34] wrote: : > : > On Dec 26, 2008, at 5:38 PM, Alfred Perlstein : > wrote: : > > : > >Easy enough to stash a "once" varible in the generic device struct : > >and warn when returning from an isr when INVARIANTS or something is : > >turned on. : > > : > >Then you'd only get one warning per device once it happens. : > > : > > : > : > I prefer to do nothing. It's not unsafe or erroneous to access cfg : > registers. But if some kind of message does get added, I insist that : > it drop all pretenses and say, "you're too poor to run freebsd, come : > back when you can afford better hardware.". :) : : Well that could be the result of a driver that has a "bug" that : makes it access cfg space when it does not need to, as what seems : to have just been fixed. I think we need to have better tools to peer into what's going on inside a driver (or other well defined areas of the kernel). Maybe dtrace might be the right way to do this? Warner From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 07:53:03 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82AD11065673; Sun, 28 Dec 2008 07:53:03 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 3F41B8FC13; Sun, 28 Dec 2008 07:53:03 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 35C8E170E2; Sun, 28 Dec 2008 07:53:02 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id mBS7r1h9032524; Sun, 28 Dec 2008 07:53:01 GMT (envelope-from phk@critter.freebsd.dk) To: Alfred Perlstein From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sat, 27 Dec 2008 21:35:30 PST." <20081228053530.GF18389@elvis.mu.org> Date: Sun, 28 Dec 2008 07:53:01 +0000 Message-ID: <32523.1230450781@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Scott Long , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , "mav@freebsd.org" , "M. Warner Losh" Subject: Re: svn commit: r186182 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 07:53:03 -0000 In message <20081228053530.GF18389@elvis.mu.org>, Alfred Perlstein writes: >* Scott Long [081226 18:34] wrote: >> I prefer to do nothing. It's not unsafe or erroneous to access cfg >> registers. But if some kind of message does get added, I insist that >> it drop all pretenses and say, "you're too poor to run freebsd, come >> back when you can afford better hardware.". :) > >Well that could be the result of a driver that has a "bug" that >makes it access cfg space when it does not need to, as what seems >to have just been fixed. How about adding a counter and a rate warning under INVARIANTS ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 11:04:24 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67FE91065674; Sun, 28 Dec 2008 11:04:24 +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 55FDC8FC14; Sun, 28 Dec 2008 11:04:24 +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 mBSB4OMD011861; Sun, 28 Dec 2008 11:04:24 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBSB4OWj011860; Sun, 28 Dec 2008 11:04:24 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812281104.mBSB4OWj011860@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 28 Dec 2008 11:04:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186539 - head/sys/arm/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 11:04:24 -0000 Author: bz Date: Sun Dec 28 11:04:24 2008 New Revision: 186539 URL: http://svn.freebsd.org/changeset/base/186539 Log: Include std.ixp425 for "cpu" and comment out duplicate memory map options. Using the already included std.avila is not considered to be entirely right (and the options slightly differ) but the best match we currently have. Upcoming work should fit better. Reorder another variable to match the layout of other configs. Reviewed by: sam, warner (earlier version with options removed) Modified: head/sys/arm/conf/NSLU Modified: head/sys/arm/conf/NSLU ============================================================================== --- head/sys/arm/conf/NSLU Sun Dec 28 07:09:00 2008 (r186538) +++ head/sys/arm/conf/NSLU Sun Dec 28 11:04:24 2008 (r186539) @@ -19,14 +19,18 @@ ident NSLU -options PHYSADDR=0x10000000 -options KERNPHYSADDR=0x10200000 -options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm -options FLASHADDR=0x50000000 -options LOADERRAMADDR=0x00000000 -options STARTUP_PAGETABLE_ADDR=0x10000000 +# XXX What is defined in std.avila does not exactly match the following: +#options PHYSADDR=0x10000000 +#options KERNPHYSADDR=0x10200000 +#options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm +#options FLASHADDR=0x50000000 +#options LOADERRAMADDR=0x00000000 +#options STARTUP_PAGETABLE_ADDR=0x10000000 +include "../xscale/ixp425/std.ixp425" +# NB: memory mapping is defined in std.avila (see also comment above) include "../xscale/ixp425/std.avila" +options XSCALE_CACHE_READ_WRITE_ALLOCATE #To statically compile in device wiring instead of /boot/device.hints hints "NSLU.hints" #Default places to look for devices. makeoptions MODULES_OVERRIDE="" @@ -99,7 +103,6 @@ device bpf device pty device loop -options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 13:50:59 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36DE91065670; Sun, 28 Dec 2008 13:50:59 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2211C8FC17; Sun, 28 Dec 2008 13:50:59 +0000 (UTC) (envelope-from ganbold@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 mBSDowkM014914; Sun, 28 Dec 2008 13:50:58 GMT (envelope-from ganbold@svn.freebsd.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBSDowSF014913; Sun, 28 Dec 2008 13:50:58 GMT (envelope-from ganbold@svn.freebsd.org) Message-Id: <200812281350.mBSDowSF014913@svn.freebsd.org> From: Ganbold Tsagaankhuu Date: Sun, 28 Dec 2008 13:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186540 - head/sys/compat/ndis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 13:50:59 -0000 Author: ganbold (doc committer) Date: Sun Dec 28 13:50:58 2008 New Revision: 186540 URL: http://svn.freebsd.org/changeset/base/186540 Log: Remove unused variable. Found with: Coverity Prevent(tm) CID: 542 Approved by: weongyo Modified: head/sys/compat/ndis/kern_windrv.c Modified: head/sys/compat/ndis/kern_windrv.c ============================================================================== --- head/sys/compat/ndis/kern_windrv.c Sun Dec 28 11:04:24 2008 (r186539) +++ head/sys/compat/ndis/kern_windrv.c Sun Dec 28 13:50:58 2008 (r186540) @@ -883,13 +883,10 @@ static void x86_oldldt(dummy) void *dummy; { - struct thread *t; struct x86desc *gdt; struct gdt gtable; uint16_t ltable; - t = curthread; - mtx_lock_spin(&dt_lock); /* Grab location of existing GDT. */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 14:32:28 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CF5A1065674; Sun, 28 Dec 2008 14:32:28 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 377FC8FC20; Sun, 28 Dec 2008 14:32:28 +0000 (UTC) (envelope-from kmacy@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 mBSEWR8F015812; Sun, 28 Dec 2008 14:32:27 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBSEWRkK015811; Sun, 28 Dec 2008 14:32:27 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812281432.mBSEWRkK015811@svn.freebsd.org> From: Kip Macy Date: Sun, 28 Dec 2008 14:32:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186541 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 14:32:28 -0000 Author: kmacy Date: Sun Dec 28 14:32:27 2008 New Revision: 186541 URL: http://svn.freebsd.org/changeset/base/186541 Log: drop rnh lock before destroying it Modified: head/sys/kern/vfs_export.c Modified: head/sys/kern/vfs_export.c ============================================================================== --- head/sys/kern/vfs_export.c Sun Dec 28 13:50:58 2008 (r186540) +++ head/sys/kern/vfs_export.c Sun Dec 28 14:32:27 2008 (r186541) @@ -244,6 +244,7 @@ vfs_free_addrlist(struct netexport *nep) if ((rnh = nep->ne_rtable[i])) { RADIX_NODE_HEAD_LOCK(rnh); (*rnh->rnh_walktree) (rnh, vfs_free_netcred, rnh); + RADIX_NODE_HEAD_UNLOCK(rnh); RADIX_NODE_HEAD_DESTROY(rnh); free(rnh, M_RTABLE); nep->ne_rtable[i] = NULL; /* not SMP safe XXX */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 19:32:09 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E61F1065675 for ; Sun, 28 Dec 2008 19:32:09 +0000 (UTC) (envelope-from stas@SpringDaemons.com) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 038858FC0C for ; Sun, 28 Dec 2008 19:32:09 +0000 (UTC) (envelope-from stas@SpringDaemons.com) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 5D6DD8FC4F for ; Sun, 28 Dec 2008 22:20:12 +0300 (MSK) Received: from sputnik.SpringDaemons.com (unknown [195.161.8.1]) by mx0.deglitch.com (Postfix) with ESMTPA id 7D9F08FC18; Sun, 28 Dec 2008 22:20:08 +0300 (MSK) Received: by sputnik.SpringDaemons.com (Postfix, from userid 1024) id EA98CB86F; Sun, 28 Dec 2008 22:30:45 +0300 (MSK) Date: Sun, 28 Dec 2008 22:30:39 +0300 From: Stanislav Sedov To: Andrew Thompson Message-Id: <20081228223039.cf28e3e2.stas@FreeBSD.org> In-Reply-To: <20081228045055.GA81182@citylink.fud.org.nz> References: <200812272048.mBRKmBKo082102@svn.freebsd.org> <20081228045055.GA81182@citylink.fud.org.nz> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprin: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Sun Dec 28 22:20:12 2008 X-DSPAM-Confidence: 1.0000 X-DSPAM-Improbability: 1 in 98689409 chance of being spam X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 4957d16c967001291218750 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186529 - head/sys/dev/acpi_support X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 19:32:09 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sat, 27 Dec 2008 20:50:55 -0800 Andrew Thompson mentioned: > On Sat, Dec 27, 2008 at 08:48:11PM +0000, Stanislav Sedov wrote: > > Author: stas > > Date: Sat Dec 27 20:48:11 2008 > > New Revision: 186529 > > URL: http://svn.freebsd.org/changeset/base/186529 > > > > Log: > > - Fix incorrect array declaration that was causing the stack overflow > > on some (most?) Asus laptops. > > > > Discussed with: rpaulo > > Approved by: kib (mentor) > > MFC after: 2 weeks > > > > Modified: > > head/sys/dev/acpi_support/acpi_asus.c > > > > Modified: head/sys/dev/acpi_support/acpi_asus.c > > ============================================================================== > > --- head/sys/dev/acpi_support/acpi_asus.c Sat Dec 27 20:37:53 2008 (r186528) > > +++ head/sys/dev/acpi_support/acpi_asus.c Sat Dec 27 20:48:11 2008 (r186529) > > @@ -976,7 +976,7 @@ acpi_asus_sysctl_set(struct acpi_asus_so > > { > > ACPI_STATUS status = AE_OK; > > ACPI_OBJECT_LIST acpiargs; > > - ACPI_OBJECT acpiarg[0]; > > + ACPI_OBJECT acpiarg[1]; > > > > ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); > > ACPI_SERIAL_ASSERT(asus); > > Thanks! I have had panics that I think are related to this. > I wonder how does gcc allowed this. It emits warnings only in pedantic mode which we cannot use to compile kernel with. Coverity is also calm about this issue. - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAklX0+UACgkQK/VZk+smlYEhJQCfc1cQKsaC1WufslPzh6A2Ys4f V9gAn0ctgYE++vyx/6dVJWI0EEYm6H0a =G9UK -----END PGP SIGNATURE----- !DSPAM:4957d16c967001291218750! From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 21:00:40 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C79310656D6; Sun, 28 Dec 2008 21:00:40 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4EB7B8FC1A; Sun, 28 Dec 2008 21:00:40 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from [IPv6:2001:7b8:3a7:0:f53f:ada1:a081:da3b] (unknown [IPv6:2001:7b8:3a7:0:f53f:ada1:a081:da3b]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id BB61411F859; Sun, 28 Dec 2008 22:00:38 +0100 (CET) Message-ID: <4957E8F5.90202@andric.com> Date: Sun, 28 Dec 2008 22:00:37 +0100 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1b3pre) Gecko/20081219 Shredder/3.0b2pre MIME-Version: 1.0 To: Stanislav Sedov References: <200812272048.mBRKmBKo082102@svn.freebsd.org> <20081228045055.GA81182@citylink.fud.org.nz> <20081228223039.cf28e3e2.stas@FreeBSD.org> In-Reply-To: <20081228223039.cf28e3e2.stas@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andrew Thompson Subject: Re: svn commit: r186529 - head/sys/dev/acpi_support X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 21:00:40 -0000 On 2008-12-28 20:30, Stanislav Sedov wrote: >>> - ACPI_OBJECT acpiarg[0]; >>> + ACPI_OBJECT acpiarg[1]; > I wonder how does gcc allowed this. It emits warnings only in > pedantic mode which we cannot use to compile kernel with. Zero-sized arrays are non-standard, but have been allowed by gcc (and many other compilers) since a long time, so it is logical that it doesn't warn about it by default. Maybe you can try compiling it with gcc 4.3.x; I have received several "array subscript is above array bounds" warnings using it. However, it's GPL3, which might open up several cans of worms... From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 21:09:18 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1691C1065674 for ; Sun, 28 Dec 2008 21:09:18 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id 982C08FC13 for ; Sun, 28 Dec 2008 21:09:17 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id CD23E667B1 for ; Sun, 28 Dec 2008 22:09:15 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id 1ED678DE5A; Sun, 28 Dec 2008 22:09:16 +0100 (CET) Date: Sun, 28 Dec 2008 22:09:16 +0100 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Message-ID: <20081228210916.GA13945@britannica.bec.de> References: <200812272048.mBRKmBKo082102@svn.freebsd.org> <20081228045055.GA81182@citylink.fud.org.nz> <20081228223039.cf28e3e2.stas@FreeBSD.org> <4957E8F5.90202@andric.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4957E8F5.90202@andric.com> User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: svn commit: r186529 - head/sys/dev/acpi_support X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 21:09:18 -0000 On Sun, Dec 28, 2008 at 10:00:37PM +0100, Dimitry Andric wrote: > On 2008-12-28 20:30, Stanislav Sedov wrote: > >>> - ACPI_OBJECT acpiarg[0]; > >>> + ACPI_OBJECT acpiarg[1]; > > I wonder how does gcc allowed this. It emits warnings only in > > pedantic mode which we cannot use to compile kernel with. > > Zero-sized arrays are non-standard, but have been allowed by gcc (and > many other compilers) since a long time, so it is logical that it > doesn't warn about it by default. Having no size at all would be standard compliant, e.g. acpiarg[[]; Joreg From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 21:18:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92DB11065675; Sun, 28 Dec 2008 21:18:01 +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 85DFF8FC08; Sun, 28 Dec 2008 21:18:01 +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 mBSLI14Y024057; Sun, 28 Dec 2008 21:18:01 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBSLI1Fh024056; Sun, 28 Dec 2008 21:18:01 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812282118.mBSLI1Fh024056@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 28 Dec 2008 21:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186544 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 21:18:01 -0000 Author: bz Date: Sun Dec 28 21:18:01 2008 New Revision: 186544 URL: http://svn.freebsd.org/changeset/base/186544 Log: For consistency use LLE_IS_VALID() in this 4th place that is actually interested in the (void *)-1 return value hack. This way we can easily identify those special parts of the code. Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Sun Dec 28 17:16:32 2008 (r186543) +++ head/sys/netinet/in.c Sun Dec 28 21:18:01 2008 (r186544) @@ -1153,7 +1153,7 @@ in_lltable_lookup(struct lltable *llt, u lle = (void *)-1; } - if (lle != NULL && lle != (void *)-1) { + if (LLE_IS_VALID(lle)) { if (flags & LLE_EXCLUSIVE) LLE_WLOCK(lle); else From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 22:40:44 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 143531065673; Sun, 28 Dec 2008 22:40:44 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 023658FC13; Sun, 28 Dec 2008 22:40:44 +0000 (UTC) (envelope-from rwatson@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 mBSMehpQ025566; Sun, 28 Dec 2008 22:40:43 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBSMeg07025549; Sun, 28 Dec 2008 22:40:42 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812282240.mBSMeg07025549@svn.freebsd.org> From: Robert Watson Date: Sun, 28 Dec 2008 22:40:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186545 - in vendor/openbsm/dist: . bin bin/audit bin/auditd bin/auditfilterd bin/auditreduce bin/praudit bsm compat config etc libauditd libbsm man modules modules/auditfilter_noop sys... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 22:40:44 -0000 Author: rwatson Date: Sun Dec 28 22:40:42 2008 New Revision: 186545 URL: http://svn.freebsd.org/changeset/base/186545 Log: Vendor import of OpenBSM 1.1 alpha4, which incorporates the following changes since the last imported OpenBSM release: OpenBSM 1.1 alpha 4 - With the addition of BSM error number mapping, we also need to map the local error number passed to audit_submit(3) to a BSM error number, rather than have the caller perform that conversion. - Reallocate user audit events to avoid collisions with Solaris; adopt a more formal allocation scheme, and add some events allocated in Solaris that will be of immediate use on other platforms. - Add an event for Calife. - Add au_strerror(3), which allows generating strings for BSM errors directly, rather than requiring applications to map to the local error space, which might not be able to entirely represent the BSM error number space. - Major auditd rewrite for launchd(8) support. Add libauditd library that is shared between launchd and auditd. - Add AUDIT_TRIGGER_INITIALIZE trigger (sent via 'audit -i') for (re)starting auditing under launchd(8) on Mac OS X. - Add 'current' symlink to active audit trail. - Add crash recovery of previous audit trail file when detected on audit startup that it has not been properly terminated. - Add the event AUE_audit_recovery to indicated when an audit trail file has been recovered from not being properly terminated. This event is stored in the new audit trail file and includes the path of recovered audit trail file. - Mac OS X and FreeBSD dependent code in auditd.c is separated into auditd_darwin.c and auditd_fbsd.c files. - Add an event for the posix_spawn(2) and fsgetpath(2) Mac OS X system calls. - For Mac OS X, we use ASL(3) instead of syslog(3) for logging. - Add support for NOTICE level logging. OpenBSM 1.1 alpha 3 - Add two new functions, au_bsm_to_errno() and au_errno_to_bsm(), to map between BSM error numbers (largely the Solaris definitions) and local errno(2) values for 32-bit and 64-bit return tokens. This is required as operating systems don't agree on some of the values of more recent error numbers. - Fix a bug how au_to_exec_args(3) and au_to_exec_env(3) calculates the total size for the token. This bug resulted in "unknown" tokens being printed after the exec args/env tokens. - Support for AUT_SOCKET_EX extended socket tokens, which describe a socket using a pair of IPv4/IPv6 and port tuples. - OpenBSM BSM file header version bumped for 1.1 release. - Deprecated Darwin constants, such as TRAILER_PAD_MAGIC, removed. Obtained from: TrustedBSD Project Sponsored by: Apple Inc. Added: vendor/openbsm/dist/bin/auditd/auditd_darwin.c vendor/openbsm/dist/bin/auditd/auditd_fbsd.c vendor/openbsm/dist/bsm/auditd_lib.h vendor/openbsm/dist/libauditd/ vendor/openbsm/dist/libauditd/Makefile.am vendor/openbsm/dist/libauditd/Makefile.in vendor/openbsm/dist/libauditd/auditd_lib.c vendor/openbsm/dist/libbsm/au_errno.3 vendor/openbsm/dist/libbsm/bsm_errno.c vendor/openbsm/dist/sys/bsm/audit_errno.h vendor/openbsm/dist/test/reference/E2BIG_record (contents, props changed) vendor/openbsm/dist/test/reference/EACCES_record (contents, props changed) vendor/openbsm/dist/test/reference/EBADF_record (contents, props changed) vendor/openbsm/dist/test/reference/EBUSY_record (contents, props changed) vendor/openbsm/dist/test/reference/ECHILD_record (contents, props changed) vendor/openbsm/dist/test/reference/EDEADLK_record (contents, props changed) vendor/openbsm/dist/test/reference/EEXIST_record (contents, props changed) vendor/openbsm/dist/test/reference/EFAULT_record (contents, props changed) vendor/openbsm/dist/test/reference/EFBIG_record (contents, props changed) vendor/openbsm/dist/test/reference/EINTR_record (contents, props changed) vendor/openbsm/dist/test/reference/EINVAL_record (contents, props changed) vendor/openbsm/dist/test/reference/EIO_record (contents, props changed) vendor/openbsm/dist/test/reference/EISDIR_record (contents, props changed) vendor/openbsm/dist/test/reference/EMFILE_record (contents, props changed) vendor/openbsm/dist/test/reference/EMLINK_record (contents, props changed) vendor/openbsm/dist/test/reference/ENFILE_record (contents, props changed) vendor/openbsm/dist/test/reference/ENODEV_record (contents, props changed) vendor/openbsm/dist/test/reference/ENOENT_record (contents, props changed) vendor/openbsm/dist/test/reference/ENOEXEC_record (contents, props changed) vendor/openbsm/dist/test/reference/ENOMEM_record (contents, props changed) vendor/openbsm/dist/test/reference/ENOSPC_record (contents, props changed) vendor/openbsm/dist/test/reference/ENOTBLK_record (contents, props changed) vendor/openbsm/dist/test/reference/ENOTDIR_record (contents, props changed) vendor/openbsm/dist/test/reference/ENOTTY_record (contents, props changed) vendor/openbsm/dist/test/reference/ENXIO_record (contents, props changed) vendor/openbsm/dist/test/reference/EPERM_record (contents, props changed) vendor/openbsm/dist/test/reference/EPIPE_record (contents, props changed) vendor/openbsm/dist/test/reference/EROFS_record (contents, props changed) vendor/openbsm/dist/test/reference/ESPIPE_record (contents, props changed) vendor/openbsm/dist/test/reference/ESRCH_record (contents, props changed) vendor/openbsm/dist/test/reference/ETXTBSY_record (contents, props changed) vendor/openbsm/dist/test/reference/EXDEV_record (contents, props changed) vendor/openbsm/dist/test/reference/socketex_record (contents, props changed) vendor/openbsm/dist/test/reference/socketex_token (contents, props changed) Modified: vendor/openbsm/dist/Makefile.am vendor/openbsm/dist/Makefile.in vendor/openbsm/dist/NEWS vendor/openbsm/dist/README vendor/openbsm/dist/TODO vendor/openbsm/dist/VERSION vendor/openbsm/dist/bin/Makefile.in vendor/openbsm/dist/bin/audit/Makefile.am vendor/openbsm/dist/bin/audit/Makefile.in vendor/openbsm/dist/bin/audit/audit.8 vendor/openbsm/dist/bin/audit/audit.c vendor/openbsm/dist/bin/auditd/Makefile.am vendor/openbsm/dist/bin/auditd/Makefile.in vendor/openbsm/dist/bin/auditd/audit_warn.c vendor/openbsm/dist/bin/auditd/auditd.8 vendor/openbsm/dist/bin/auditd/auditd.c vendor/openbsm/dist/bin/auditd/auditd.h vendor/openbsm/dist/bin/auditfilterd/Makefile.in vendor/openbsm/dist/bin/auditreduce/Makefile.in vendor/openbsm/dist/bin/auditreduce/auditreduce.c vendor/openbsm/dist/bin/praudit/Makefile.in vendor/openbsm/dist/bsm/Makefile.am vendor/openbsm/dist/bsm/Makefile.in vendor/openbsm/dist/bsm/audit_uevents.h vendor/openbsm/dist/bsm/libbsm.h vendor/openbsm/dist/compat/endian.h vendor/openbsm/dist/config/config.h.in vendor/openbsm/dist/configure vendor/openbsm/dist/configure.ac vendor/openbsm/dist/etc/audit_event vendor/openbsm/dist/libbsm/Makefile.am vendor/openbsm/dist/libbsm/Makefile.in vendor/openbsm/dist/libbsm/au_token.3 vendor/openbsm/dist/libbsm/audit_submit.3 vendor/openbsm/dist/libbsm/bsm_audit.c vendor/openbsm/dist/libbsm/bsm_class.c vendor/openbsm/dist/libbsm/bsm_control.c vendor/openbsm/dist/libbsm/bsm_event.c vendor/openbsm/dist/libbsm/bsm_io.c vendor/openbsm/dist/libbsm/bsm_mask.c vendor/openbsm/dist/libbsm/bsm_token.c vendor/openbsm/dist/libbsm/bsm_user.c vendor/openbsm/dist/libbsm/bsm_wrappers.c vendor/openbsm/dist/libbsm/libbsm.3 vendor/openbsm/dist/man/Makefile.in vendor/openbsm/dist/man/audit.log.5 vendor/openbsm/dist/modules/Makefile.in vendor/openbsm/dist/modules/auditfilter_noop/Makefile.in vendor/openbsm/dist/sys/Makefile.in vendor/openbsm/dist/sys/bsm/Makefile.am vendor/openbsm/dist/sys/bsm/Makefile.in vendor/openbsm/dist/sys/bsm/audit.h vendor/openbsm/dist/sys/bsm/audit_internal.h vendor/openbsm/dist/sys/bsm/audit_kevents.h vendor/openbsm/dist/sys/bsm/audit_record.h vendor/openbsm/dist/test/Makefile.in vendor/openbsm/dist/test/bsm/Makefile.in vendor/openbsm/dist/test/bsm/generate.c vendor/openbsm/dist/test/reference/arg32_record vendor/openbsm/dist/test/reference/data_record vendor/openbsm/dist/test/reference/file_record vendor/openbsm/dist/test/reference/header32_token vendor/openbsm/dist/test/reference/in_addr_record vendor/openbsm/dist/test/reference/ip_record vendor/openbsm/dist/test/reference/ipc_record vendor/openbsm/dist/test/reference/iport_record vendor/openbsm/dist/test/reference/opaque_record vendor/openbsm/dist/test/reference/path_record vendor/openbsm/dist/test/reference/process32_record vendor/openbsm/dist/test/reference/process32ex_record-IPv4 vendor/openbsm/dist/test/reference/process32ex_record-IPv6 vendor/openbsm/dist/test/reference/process64_record vendor/openbsm/dist/test/reference/process64ex_record-IPv4 vendor/openbsm/dist/test/reference/process64ex_record-IPv6 vendor/openbsm/dist/test/reference/return32_record vendor/openbsm/dist/test/reference/return32_token vendor/openbsm/dist/test/reference/seq_record vendor/openbsm/dist/test/reference/subject32_record vendor/openbsm/dist/test/reference/subject32ex_record vendor/openbsm/dist/test/reference/text_record vendor/openbsm/dist/test/reference/zonename_record vendor/openbsm/dist/tools/Makefile.in Modified: vendor/openbsm/dist/Makefile.am ============================================================================== --- vendor/openbsm/dist/Makefile.am Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/Makefile.am Sun Dec 28 22:40:42 2008 (r186545) @@ -1,15 +1,23 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/Makefile.am#3 $ +# $P4: //depot/projects/trustedbsd/openbsm/Makefile.am#4 $ # SUBDIRS = \ - bsm \ + bsm + +if HAVE_AUDIT_SYSCALLS +SUBDIRS += \ + libauditd +endif + +SUBDIRS += \ libbsm \ bin \ man \ modules \ sys + EXTRA_DIST = \ CHANGELOG \ LICENSE \ Modified: vendor/openbsm/dist/Makefile.in ============================================================================== --- vendor/openbsm/dist/Makefile.in Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/Makefile.in Sun Dec 28 22:40:42 2008 (r186545) @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/Makefile.in#8 $ +# $P4: //depot/projects/trustedbsd/openbsm/Makefile.in#9 $ # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -35,6 +35,9 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +@HAVE_AUDIT_SYSCALLS_TRUE@am__append_1 = \ +@HAVE_AUDIT_SYSCALLS_TRUE@ libauditd + subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/config/config.h.in \ @@ -63,7 +66,7 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-re distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) +DIST_SUBDIRS = bsm libauditd libbsm bin man modules sys DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -183,14 +186,7 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = \ - bsm \ - libbsm \ - bin \ - man \ - modules \ - sys - +SUBDIRS = bsm $(am__append_1) libbsm bin man modules sys EXTRA_DIST = \ CHANGELOG \ LICENSE \ Modified: vendor/openbsm/dist/NEWS ============================================================================== --- vendor/openbsm/dist/NEWS Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/NEWS Sun Dec 28 22:40:42 2008 (r186545) @@ -1,5 +1,50 @@ OpenBSM Version History +OpenBSM 1.1 alpha 4 + +- With the addition of BSM error number mapping, we also need to map the + local error number passed to audit_submit(3) to a BSM error number, rather + than have the caller perform that conversion. +- Reallocate user audit events to avoid collisions with Solaris; adopt a more + formal allocation scheme, and add some events allocated in Solaris that + will be of immediate use on other platforms. +- Add an event for Calife. +- Add au_strerror(3), which allows generating strings for BSM errors + directly, rather than requiring applications to map to the local error + space, which might not be able to entirely represent the BSM error number + space. +- Major auditd rewrite for launchd(8) support. Add libauditd library that is + shared between launchd and auditd. +- Add AUDIT_TRIGGER_INITIALIZE trigger (sent via 'audit -i') for (re)starting + auditing under launchd(8) on Mac OS X. +- Add 'current' symlink to active audit trail. +- Add crash recovery of previous audit trail file when detected on audit + startup that it has not been properly terminated. +- Add the event AUE_audit_recovery to indicated when an audit trail file has + been recovered from not being properly terminated. This event is stored + in the new audit trail file and includes the path of recovered audit trail + file. +- Mac OS X and FreeBSD dependent code in auditd.c is separated into + auditd_darwin.c and auditd_fbsd.c files. +- Add an event for the posix_spawn(2) and fsgetpath(2) Mac OS X system calls. +- For Mac OS X, we use ASL(3) instead of syslog(3) for logging. +- Add support for NOTICE level logging. + +OpenBSM 1.1 alpha 3 + +- Add two new functions, au_bsm_to_errno() and au_errno_to_bsm(), to map + between BSM error numbers (largely the Solaris definitions) and local + errno(2) values for 32-bit and 64-bit return tokens. This is required as + operating systems don't agree on some of the values of more recent error + numbers. +- Fix a bug how au_to_exec_args(3) and au_to_exec_env(3) calculates the total + size for the token. This bug resulted in "unknown" tokens being printed + after the exec args/env tokens. +- Support for AUT_SOCKET_EX extended socket tokens, which describe a socket + using a pair of IPv4/IPv6 and port tuples. +- OpenBSM BSM file header version bumped for 1.1 release. +- Deprecated Darwin constants, such as TRAILER_PAD_MAGIC, removed. + OpenBSM 1.1 alpha 2 - Include files in OpenBSM are now broken out into two parts: library builds @@ -348,4 +393,4 @@ OpenBSM 1.0 alpha 1 to support reloading of kernel event table. - Allow comments in /etc/security configuration files. -$P4: //depot/projects/trustedbsd/openbsm/NEWS#9 $ +$P4: //depot/projects/trustedbsd/openbsm/NEWS#21 $ Modified: vendor/openbsm/dist/README ============================================================================== --- vendor/openbsm/dist/README Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/README Sun Dec 28 22:40:42 2008 (r186545) @@ -1,4 +1,4 @@ -OpenBSM 1.1 alpha 1 +OpenBSM 1.1 alpha 4 Introduction @@ -19,6 +19,7 @@ OpenBSM consists of several directories: bsm/ Library include files for BSM compat/ Compatibility code to build on various OS's etc/ Sample /etc/security configuration files + libauditd Common audit management functions for auditd and launchd libbsm/ Implementation of BSM library interfaces and man pages man/ System call and configuration file man pages modules/ Directory for auditfilterd module source @@ -55,4 +56,4 @@ Information on TrustedBSD may be found o http://www.TrustedBSD.org/ -$P4: //depot/projects/trustedbsd/openbsm/README#32 $ +$P4: //depot/projects/trustedbsd/openbsm/README#34 $ Modified: vendor/openbsm/dist/TODO ============================================================================== --- vendor/openbsm/dist/TODO Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/TODO Sun Dec 28 22:40:42 2008 (r186545) @@ -20,5 +20,7 @@ OpenBSM TODO - Document audit_warn event arguments. - Allow the path /etc/security to be configured at configure-time so that alternative locations can be used. +- NLS support for au_strerror(3), which provides error strings for BSM errors + not available on the local OS platform. -$P4: //depot/projects/trustedbsd/openbsm/TODO#11 $ +$P4: //depot/projects/trustedbsd/openbsm/TODO#12 $ Modified: vendor/openbsm/dist/VERSION ============================================================================== --- vendor/openbsm/dist/VERSION Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/VERSION Sun Dec 28 22:40:42 2008 (r186545) @@ -1 +1 @@ -OPENBSM_1_1_ALPHA_2 +OPENBSM_1_1_ALPHA_4 Modified: vendor/openbsm/dist/bin/Makefile.in ============================================================================== --- vendor/openbsm/dist/bin/Makefile.in Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/bin/Makefile.in Sun Dec 28 22:40:42 2008 (r186545) @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/Makefile.in#8 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/Makefile.in#10 $ # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ Modified: vendor/openbsm/dist/bin/audit/Makefile.am ============================================================================== --- vendor/openbsm/dist/bin/audit/Makefile.am Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/bin/audit/Makefile.am Sun Dec 28 22:40:42 2008 (r186545) @@ -1,5 +1,5 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/audit/Makefile.am#4 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/audit/Makefile.am#6 $ # if USE_NATIVE_INCLUDES @@ -13,11 +13,11 @@ audit_LDADD = $(top_builddir)/libbsm/lib man8_MANS = audit.8 if USE_MACH_IPC -audit_SOURCES = auditd_control_user.c audit.c -CLEANFILES = auditd_control_user.c auditd_control_user.h +audit_SOURCES = auditd_controlUser.c audit.c +CLEANFILES = auditd_controlUser.c auditd_control.h -auditd_control_user.c: $(top_srcdir)/bin/auditd/auditd_control.defs - $(MIG) -user auditd_control_user.c -header auditd_control_user.h -server /dev/null -sheader /dev/null $(top_srcdir)/bin/auditd/auditd_control.defs +auditd_controlUser.c auditd_control.h: $(top_srcdir)/bin/auditd/auditd_control.defs + $(MIG) -user auditd_controlUser.c -header auditd_control.h -server /dev/null -sheader /dev/null $(top_srcdir)/bin/auditd/auditd_control.defs else audit_SOURCES = audit.c endif Modified: vendor/openbsm/dist/bin/audit/Makefile.in ============================================================================== --- vendor/openbsm/dist/bin/audit/Makefile.in Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/bin/audit/Makefile.in Sun Dec 28 22:40:42 2008 (r186545) @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/audit/Makefile.in#9 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/audit/Makefile.in#11 $ # VPATH = @srcdir@ @@ -49,9 +49,9 @@ CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(sbin_PROGRAMS) -am__audit_SOURCES_DIST = audit.c auditd_control_user.c +am__audit_SOURCES_DIST = audit.c auditd_controlUser.c @USE_MACH_IPC_FALSE@am_audit_OBJECTS = audit.$(OBJEXT) -@USE_MACH_IPC_TRUE@am_audit_OBJECTS = auditd_control_user.$(OBJEXT) \ +@USE_MACH_IPC_TRUE@am_audit_OBJECTS = auditd_controlUser.$(OBJEXT) \ @USE_MACH_IPC_TRUE@ audit.$(OBJEXT) audit_OBJECTS = $(am_audit_OBJECTS) audit_DEPENDENCIES = $(top_builddir)/libbsm/libbsm.la @@ -188,8 +188,8 @@ top_srcdir = @top_srcdir@ audit_LDADD = $(top_builddir)/libbsm/libbsm.la man8_MANS = audit.8 @USE_MACH_IPC_FALSE@audit_SOURCES = audit.c -@USE_MACH_IPC_TRUE@audit_SOURCES = auditd_control_user.c audit.c -@USE_MACH_IPC_TRUE@CLEANFILES = auditd_control_user.c auditd_control_user.h +@USE_MACH_IPC_TRUE@audit_SOURCES = auditd_controlUser.c audit.c +@USE_MACH_IPC_TRUE@CLEANFILES = auditd_controlUser.c auditd_control.h all: all-am .SUFFIXES: @@ -262,7 +262,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd_control_user.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd_controlUser.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -521,8 +521,8 @@ uninstall-man: uninstall-man8 uninstall-sbinPROGRAMS -@USE_MACH_IPC_TRUE@auditd_control_user.c: $(top_srcdir)/bin/auditd/auditd_control.defs -@USE_MACH_IPC_TRUE@ $(MIG) -user auditd_control_user.c -header auditd_control_user.h -server /dev/null -sheader /dev/null $(top_srcdir)/bin/auditd/auditd_control.defs +@USE_MACH_IPC_TRUE@auditd_controlUser.c auditd_control.h: $(top_srcdir)/bin/auditd/auditd_control.defs +@USE_MACH_IPC_TRUE@ $(MIG) -user auditd_controlUser.c -header auditd_control.h -server /dev/null -sheader /dev/null $(top_srcdir)/bin/auditd/auditd_control.defs # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Modified: vendor/openbsm/dist/bin/audit/audit.8 ============================================================================== --- vendor/openbsm/dist/bin/audit/audit.8 Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/bin/audit/audit.8 Sun Dec 28 22:40:42 2008 (r186545) @@ -25,9 +25,9 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.8#11 $ +.\" $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.8#13 $ .\" -.Dd October 2, 2006 +.Dd December 11, 2008 .Dt AUDIT 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nd audit management utility .Sh SYNOPSIS .Nm -.Fl n | s | t +.Fl i | n | s | t .Sh DESCRIPTION The .Nm @@ -43,6 +43,13 @@ utility controls the state of the audit One of the following flags is required as an argument to .Nm : .Bl -tag -width indent +.It Fl i +Initializes and starts auditing. +This option is currently for Mac OS X only +and requires +.Xr auditd 8 +to be configured to run under +.Xr launchd 8 . .It Fl n Forces the audit system to close the existing audit log file and rotate to a new log file in a location specified in the audit control file. @@ -59,6 +66,13 @@ and renamed to indicate the time of the The .Xr auditd 8 daemon must already be running. +Optionally, it can be configured to be started +on-demand by +.Xr launchd 8 +(Mac OS X only). +The +.Nm +utility requires audit administrator privileges for successful operation. .Sh FILES .Bl -tag -width ".Pa /etc/security/audit_control" -compact .It Pa /etc/security/audit_control @@ -67,7 +81,8 @@ Audit policy file used to configure the .Sh SEE ALSO .Xr audit 4 , .Xr audit_control 5 , -.Xr auditd 8 +.Xr auditd 8 , +.Xr launchd 8 .Sh HISTORY The OpenBSM implementation was created by McAfee Research, the security division of McAfee Inc., under contract to Apple Computer Inc.\& in 2004. Modified: vendor/openbsm/dist/bin/audit/audit.c ============================================================================== --- vendor/openbsm/dist/bin/audit/audit.c Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/bin/audit/audit.c Sun Dec 28 22:40:42 2008 (r186545) @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.c#11 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.c#13 $ */ /* * Program to trigger the audit daemon with a message that is either: @@ -47,6 +47,7 @@ #include +#include #include #include #include @@ -64,7 +65,15 @@ static int send_trigger(unsigned int); #include #include -#include "auditd_control_user.h" +#include "auditd_control.h" + +/* + * XXX the following is temporary until this can be added to the kernel + * audit.h header. + */ +#ifndef AUDIT_TRIGGER_INITIALIZE +#define AUDIT_TRIGGER_INITIALIZE 7 +#endif static int send_trigger(unsigned int trigger) @@ -74,7 +83,12 @@ send_trigger(unsigned int trigger) error = host_get_audit_control_port(mach_host_self(), &serverPort); if (error != KERN_SUCCESS) { - mach_error("Cannot get auditd_control Mach port: ", error); + if (geteuid() != 0) { + errno = EPERM; + perror("audit requires root privileges"); + } else + mach_error("Cannot get auditd_control Mach port:", + error); return (-1); } @@ -96,7 +110,10 @@ send_trigger(unsigned int trigger) error = auditon(A_SENDTRIGGER, &trigger, sizeof(trigger)); if (error != 0) { - perror("Error sending trigger"); + if (error == EPERM) + perror("audit requires root privileges"); + else + perror("Error sending trigger"); return (-1); } @@ -108,7 +125,7 @@ static void usage(void) { - (void)fprintf(stderr, "Usage: audit -n | -s | -t \n"); + (void)fprintf(stderr, "Usage: audit -i | -n | -s | -t \n"); exit(-1); } @@ -124,9 +141,13 @@ main(int argc, char **argv) if (argc != 2) usage(); - while ((ch = getopt(argc, argv, "nst")) != -1) { + while ((ch = getopt(argc, argv, "inst")) != -1) { switch(ch) { + case 'i': + trigger = AUDIT_TRIGGER_INITIALIZE; + break; + case 'n': trigger = AUDIT_TRIGGER_ROTATE_USER; break; Modified: vendor/openbsm/dist/bin/auditd/Makefile.am ============================================================================== --- vendor/openbsm/dist/bin/auditd/Makefile.am Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/bin/auditd/Makefile.am Sun Dec 28 22:40:42 2008 (r186545) @@ -1,5 +1,5 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/Makefile.am#4 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/Makefile.am#5 $ # if USE_NATIVE_INCLUDES @@ -9,18 +9,18 @@ INCLUDES = -I$(top_builddir) -I$(top_src endif sbin_PROGRAMS = auditd -auditd_LDADD = $(top_builddir)/libbsm/libbsm.la +auditd_LDADD = $(top_builddir)/libbsm/libbsm.la $(top_builddir)/libauditd/libauditd.la man8_MANS = auditd.8 if USE_MACH_IPC -auditd_SOURCES = auditd_control_server.c audit_triggers_server.c audit_warn.c auditd.c -CLEANFILES = auditd_control_server.c auditd_control_server.h audit_triggers_server.c audit_triggers_server.h +auditd_SOURCES = auditd_controlServer.c audit_triggersServer.c audit_warn.c auditd.c auditd_darwin.c +CLEANFILES = auditd_control_server.c auditd_controlServer.h audit_triggersServer.c audit_triggersServer.h -auditd_control_server.c: auditd_control.defs - $(MIG) -user /dev/null -header /dev/null -server auditd_control_server.c -sheader auditd_control_server.h $(top_srcdir)/bin/auditd/auditd_control.defs +auditd_controlServer.c auditd_controlServer.h: auditd_control.defs + $(MIG) -user /dev/null -header /dev/null -server auditd_controlServer.c -sheader auditd_controlServer.h $(top_srcdir)/bin/auditd/auditd_control.defs -audit_triggers_server.c: audit_triggers.defs - $(MIG) -user /dev/null -header /dev/null -server audit_triggers_server.c -sheader audit_triggers_server.h $(top_srcdir)/bin/auditd/audit_triggers.defs +audit_triggersServer.c audit_triggersServer.h: audit_triggers.defs + $(MIG) -user /dev/null -header /dev/null -server audit_triggersServer.c -sheader audit_triggersServer.h $(top_srcdir)/bin/auditd/audit_triggers.defs else -auditd_SOURCES = audit_warn.c auditd.c +auditd_SOURCES = audit_warn.c auditd.c auditd_fbsd.c endif Modified: vendor/openbsm/dist/bin/auditd/Makefile.in ============================================================================== --- vendor/openbsm/dist/bin/auditd/Makefile.in Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/bin/auditd/Makefile.in Sun Dec 28 22:40:42 2008 (r186545) @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/Makefile.in#9 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/Makefile.in#10 $ # VPATH = @srcdir@ @@ -49,16 +49,17 @@ CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(sbin_PROGRAMS) -am__auditd_SOURCES_DIST = audit_warn.c auditd.c \ - auditd_control_server.c audit_triggers_server.c +am__auditd_SOURCES_DIST = audit_warn.c auditd.c auditd_fbsd.c \ + auditd_controlServer.c audit_triggersServer.c auditd_darwin.c @USE_MACH_IPC_FALSE@am_auditd_OBJECTS = audit_warn.$(OBJEXT) \ -@USE_MACH_IPC_FALSE@ auditd.$(OBJEXT) -@USE_MACH_IPC_TRUE@am_auditd_OBJECTS = \ -@USE_MACH_IPC_TRUE@ auditd_control_server.$(OBJEXT) \ -@USE_MACH_IPC_TRUE@ audit_triggers_server.$(OBJEXT) \ -@USE_MACH_IPC_TRUE@ audit_warn.$(OBJEXT) auditd.$(OBJEXT) +@USE_MACH_IPC_FALSE@ auditd.$(OBJEXT) auditd_fbsd.$(OBJEXT) +@USE_MACH_IPC_TRUE@am_auditd_OBJECTS = auditd_controlServer.$(OBJEXT) \ +@USE_MACH_IPC_TRUE@ audit_triggersServer.$(OBJEXT) \ +@USE_MACH_IPC_TRUE@ audit_warn.$(OBJEXT) auditd.$(OBJEXT) \ +@USE_MACH_IPC_TRUE@ auditd_darwin.$(OBJEXT) auditd_OBJECTS = $(am_auditd_OBJECTS) -auditd_DEPENDENCIES = $(top_builddir)/libbsm/libbsm.la +auditd_DEPENDENCIES = $(top_builddir)/libbsm/libbsm.la \ + $(top_builddir)/libauditd/libauditd.la DEFAULT_INCLUDES = -I. -I$(top_builddir)/config@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles @@ -189,11 +190,11 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @USE_NATIVE_INCLUDES_FALSE@INCLUDES = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/sys @USE_NATIVE_INCLUDES_TRUE@INCLUDES = -I$(top_builddir) -I$(top_srcdir) -auditd_LDADD = $(top_builddir)/libbsm/libbsm.la +auditd_LDADD = $(top_builddir)/libbsm/libbsm.la $(top_builddir)/libauditd/libauditd.la man8_MANS = auditd.8 -@USE_MACH_IPC_FALSE@auditd_SOURCES = audit_warn.c auditd.c -@USE_MACH_IPC_TRUE@auditd_SOURCES = auditd_control_server.c audit_triggers_server.c audit_warn.c auditd.c -@USE_MACH_IPC_TRUE@CLEANFILES = auditd_control_server.c auditd_control_server.h audit_triggers_server.c audit_triggers_server.h +@USE_MACH_IPC_FALSE@auditd_SOURCES = audit_warn.c auditd.c auditd_fbsd.c +@USE_MACH_IPC_TRUE@auditd_SOURCES = auditd_controlServer.c audit_triggersServer.c audit_warn.c auditd.c auditd_darwin.c +@USE_MACH_IPC_TRUE@CLEANFILES = auditd_control_server.c auditd_controlServer.h audit_triggersServer.c audit_triggersServer.h all: all-am .SUFFIXES: @@ -265,10 +266,12 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit_triggers_server.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit_triggersServer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit_warn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd_control_server.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd_controlServer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd_darwin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd_fbsd.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -527,11 +530,11 @@ uninstall-man: uninstall-man8 uninstall-sbinPROGRAMS -@USE_MACH_IPC_TRUE@auditd_control_server.c: auditd_control.defs -@USE_MACH_IPC_TRUE@ $(MIG) -user /dev/null -header /dev/null -server auditd_control_server.c -sheader auditd_control_server.h $(top_srcdir)/bin/auditd/auditd_control.defs +@USE_MACH_IPC_TRUE@auditd_controlServer.c auditd_controlServer.h: auditd_control.defs +@USE_MACH_IPC_TRUE@ $(MIG) -user /dev/null -header /dev/null -server auditd_controlServer.c -sheader auditd_controlServer.h $(top_srcdir)/bin/auditd/auditd_control.defs -@USE_MACH_IPC_TRUE@audit_triggers_server.c: audit_triggers.defs -@USE_MACH_IPC_TRUE@ $(MIG) -user /dev/null -header /dev/null -server audit_triggers_server.c -sheader audit_triggers_server.h $(top_srcdir)/bin/auditd/audit_triggers.defs +@USE_MACH_IPC_TRUE@audit_triggersServer.c audit_triggersServer.h: audit_triggers.defs +@USE_MACH_IPC_TRUE@ $(MIG) -user /dev/null -header /dev/null -server audit_triggersServer.c -sheader audit_triggersServer.h $(top_srcdir)/bin/auditd/audit_triggers.defs # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Modified: vendor/openbsm/dist/bin/auditd/audit_warn.c ============================================================================== --- vendor/openbsm/dist/bin/auditd/audit_warn.c Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/bin/auditd/audit_warn.c Sun Dec 28 22:40:42 2008 (r186545) @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/audit_warn.c#9 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/audit_warn.c#10 $ */ #include @@ -71,20 +71,15 @@ auditwarnlog(char *args[]) } /* - * Indicates that the hard limit for all filesystems has been exceeded count - * times. + * Indicates that the hard limit for all filesystems has been exceeded. */ int -audit_warn_allhard(int count) +audit_warn_allhard(void) { - char intstr[12]; - char *args[3]; - - snprintf(intstr, 12, "%d", count); + char *args[2]; args[0] = HARDLIM_ALL_WARN; - args[1] = intstr; - args[2] = NULL; + args[1] = NULL; return (auditwarnlog(args)); } Modified: vendor/openbsm/dist/bin/auditd/auditd.8 ============================================================================== --- vendor/openbsm/dist/bin/auditd/auditd.8 Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/bin/auditd/auditd.8 Sun Dec 28 22:40:42 2008 (r186545) @@ -25,9 +25,9 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.8#14 $ +.\" $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.8#16 $ .\" -.Dd October 2, 2006 +.Dd December 11, 2008 .Dt AUDITD 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nd audit log management daemon .Sh SYNOPSIS .Nm -.Op Fl d +.Op Fl d | l .Sh DESCRIPTION The .Nm @@ -50,7 +50,16 @@ The options are as follows: .Bl -tag -width indent .It Fl d Starts the daemon in debug mode \[em] it will not daemonize. +.It Fl l +This option is for when +.Nm +is configured to start on-demand using +.Xr launchd 8 . .El +.Pp +Optionally, the audit review group "audit" may be created. +Non-privileged +users that are members of this group may read the audit trail log files. .Sh NOTE To assure uninterrupted audit support, the .Nm @@ -63,20 +72,33 @@ the .Pa audit_control file. .Pp -.\" Sending a -.\" .Dv SIGHUP -.\" to a running -.\" .Nm -.\" daemon will force it to exit. -Sending a -.Dv SIGTERM -to a running +If +.Nm +is started on-demand by +.Xr launchd 8 +then auditing should only be started and stopped with +.Xr audit 8 . +.Pp +On Mac OS X, .Nm -daemon will force it to exit. +uses the +.Xr asl 3 +API for writing system log messages. +Therefore, only the audit administrator +and members of the audit review group will be able to read the +system log entries. .Sh FILES -.Bl -tag -width ".Pa /var/audit" -compact +.Bl -tag -width ".Pa /etc/security" -compact .It Pa /var/audit Default directory for storing audit log files. +.Pp +.It Pa /etc/security +The directory containing the auditing configuration files +.Xr audit_class 5 , +.Xr audit_control 5 , +.Xr audit_event 5 , +and +.Xr audit_warn 5 . .El .Sh COMPATIBILITY The historical @@ -92,9 +114,14 @@ and and are no longer available as arguments to .Nm . .Sh SEE ALSO +.Xr asl 3 , .Xr audit 4 , +.Xr audit_class 5 , .Xr audit_control 5 , -.Xr audit 8 +.Xr audit_event 5 , +.Xr audit_warn 5 , +.Xr audit 8 , +.Xr launchd 8 .Sh HISTORY The OpenBSM implementation was created by McAfee Research, the security division of McAfee Inc., under contract to Apple Computer Inc.\& in 2004. Modified: vendor/openbsm/dist/bin/auditd/auditd.c ============================================================================== --- vendor/openbsm/dist/bin/auditd/auditd.c Sun Dec 28 21:18:01 2008 (r186544) +++ vendor/openbsm/dist/bin/auditd/auditd.c Sun Dec 28 22:40:42 2008 (r186545) @@ -26,30 +26,29 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#39 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#40 $ */ -#include +#include #include #include -#include -#include #ifdef HAVE_FULL_QUEUE_H #include #else /* !HAVE_FULL_QUEUE_H */ #include #endif /* !HAVE_FULL_QUEUE_H */ +#include +#include #include #include #include #include +#include #include -#include - #include #include #include @@ -60,115 +59,88 @@ #include #include #include -#include -#include #include "auditd.h" -#ifdef USE_MACH_IPC -#include -#include -#include -#include -#include -#include - -#include "auditd_control_server.h" -#include "audit_triggers_server.h" -#endif /* USE_MACH_IPC */ #ifndef HAVE_STRLCPY #include #endif -#define NA_EVENT_STR_SIZE 25 -#define POL_STR_SIZE 128 -static int ret, minval; -static char *lastfile = NULL; -static int allhardcount = 0; -static int sigchlds, sigchlds_handled; -static int sighups, sighups_handled; -#ifndef USE_MACH_IPC -static int sigterms, sigterms_handled; -static int triggerfd = 0; - -#else /* USE_MACH_IPC */ - -static mach_port_t control_port = MACH_PORT_NULL; -static mach_port_t signal_port = MACH_PORT_NULL; -static mach_port_t port_set = MACH_PORT_NULL; - -#ifndef __BSM_INTERNAL_NOTIFY_KEY -#define __BSM_INTERNAL_NOTIFY_KEY "com.apple.audit.change" -#endif /* __BSM_INTERNAL_NOTIFY_KEY */ -#endif /* USE_MACH_IPC */ - -static TAILQ_HEAD(, dir_ent) dir_q; - -static int config_audit_controls(void); - /* - * Error starting auditd + * XXX the following is temporary until this can be added to the kernel + * audit.h header. */ -static void -fail_exit(void) -{ - - audit_warn_nostart(); - exit(1); -} +#ifndef AUDIT_TRIGGER_INITIALIZE +#define AUDIT_TRIGGER_INITIALIZE 7 +#endif /* - * Free our local list of directory names. + * LaunchD flag (Mac OS X and, maybe, FreeBSD only.) See launchd(8) and + * http://wiki.freebsd.org/launchd for more information. + * + * In order for auditd to work "on demand" with launchd(8) it can't: + * call daemon(3) + * call fork and having the parent process exit + * change uids or gids. + * set up the current working directory or chroot. + * set the session id + * change stdio to /dev/null. + * call setrusage(2) + * call setpriority(2) + * Ignore SIGTERM. + * auditd (in 'launchd mode') is launched on demand so it must catch + * SIGTERM to exit cleanly. + */ +static int launchd_flag = 0; + +/* + * The GID of the audit review group (if used). The audit trail files and + * system logs (Mac OS X only) can only be reviewed by members of this group + * or the audit administrator (aka. "root"). */ -static void -free_dir_q(void) -{ - struct dir_ent *dirent; +static gid_t audit_review_gid = -1; - while ((dirent = TAILQ_FIRST(&dir_q))) { - TAILQ_REMOVE(&dir_q, dirent, dirs); - free(dirent->dirname); - free(dirent); - } -} +/* + * The path and file name of the last audit trail file. + */ +static char *lastfile = NULL; /* - * Generate the timestamp string. + * Error starting auditd. Run warn script and exit. */ -static int -getTSstr(char *buf, int len) +static void +fail_exit(void) { - struct timeval ts; - struct timezone tzp; - time_t tt; - if (gettimeofday(&ts, &tzp) != 0) - return (-1); - tt = (time_t)ts.tv_sec; - if (!strftime(buf, len, "%Y%m%d%H%M%S", gmtime(&tt))) - return (-1); - return (0); + audit_warn_nostart(); + exit(1); } /* - * Concat the directory name to the given file name. - * XXX We should affix the hostname also + * Follow the 'current' symlink to get the active trail file name. */ static char * -affixdir(char *name, struct dir_ent *dirent) +get_curfile(void) { - char *fn = NULL; + char *cf; + int len; - syslog(LOG_DEBUG, "dir = %s", dirent->dirname); - /* - * Sanity check on file name. - */ - if (strlen(name) != (FILENAME_LEN - 1)) { - syslog(LOG_ERR, "Invalid file name: %s", name); + cf = malloc(MAXPATHLEN); + if (cf == NULL) { + auditd_log_err("malloc failed: %m"); + return (NULL); + } + + len = readlink(AUDIT_CURRENT_LINK, cf, MAXPATHLEN - 1); + if (len < 0) { + free(cf); return (NULL); } - asprintf(&fn, "%s/%s", dirent->dirname, name); - return (fn); + + /* readlink() doesn't terminate string. */ + cf[len] = '\0'; + + return (cf); } /* @@ -181,6 +153,10 @@ close_lastfile(char *TS) char *oldname; size_t len; + /* If lastfile is NULL try to get it from the 'current' link. */ + if (lastfile == NULL) + lastfile = get_curfile(); + if (lastfile != NULL) { len = strlen(lastfile) + 1; oldname = (char *)malloc(len); @@ -192,16 +168,21 @@ close_lastfile(char *TS) if ((ptr = strstr(lastfile, NOT_TERMINATED)) != NULL) { strlcpy(ptr, TS, TIMESTAMP_LEN); if (rename(oldname, lastfile) != 0) - syslog(LOG_ERR, + auditd_log_err( "Could not rename %s to %s: %m", oldname, lastfile); else { - syslog(LOG_INFO, "renamed %s to %s", + /* + * Remove the 'current' symlink since the link + * is now invalid. + */ + (void) unlink(AUDIT_CURRENT_LINK); + auditd_log_notice( "renamed %s to %s", oldname, lastfile); audit_warn_closefile(lastfile); } } else - syslog(LOG_ERR, "Could not rename %s to %s", oldname, + auditd_log_err( "Could not rename %s to %s", oldname, lastfile); free(lastfile); free(oldname); @@ -211,168 +192,81 @@ close_lastfile(char *TS) } /* - * Create the new audit file with appropriate permissions and ownership. Try - * to clean up if something goes wrong. - */ -static int -#ifdef AUDIT_REVIEW_GROUP -open_trail(const char *fname, uid_t uid, gid_t gid) -#else -open_trail(const char *fname) -#endif -{ - int error, fd; - - fd = open(fname, O_RDONLY | O_CREAT, S_IRUSR | S_IRGRP); - if (fd < 0) - return (-1); -#ifdef AUDIT_REVIEW_GROUP - if (fchown(fd, uid, gid) < 0) { - error = errno; - close(fd); - (void)unlink(fname); - errno = error; - return (-1); - } -#endif - return (fd); -} - -/* * Create the new file name, swap with existing audit file. */ static int swap_audit_file(void) { - char timestr[FILENAME_LEN]; - char *fn; + int err; + char *newfile; char TS[TIMESTAMP_LEN]; - struct dir_ent *dirent; -#ifdef AUDIT_REVIEW_GROUP - struct group *grp; - gid_t gid; - uid_t uid; -#endif - int error, fd; + time_t tt; - if (getTSstr(TS, TIMESTAMP_LEN) != 0) + if (getTSstr(tt, TS, TIMESTAMP_LEN) != 0) return (-1); + err = auditd_swap_trail(TS, &newfile, audit_review_gid, + audit_warn_getacdir); + if (err != ADE_NOERR) { + auditd_log_err( "%s: %m", auditd_strerror(err)); + if (err != ADE_ACTL) + return (-1); + } - snprintf(timestr, FILENAME_LEN, "%s.%s", TS, NOT_TERMINATED); - -#ifdef AUDIT_REVIEW_GROUP /* - * XXXRW: Currently, this code falls back to the daemon gid, which is - * likely the wheel group. Is there a better way to deal with this? + * Only close the last file if were in an auditing state before + * calling swap_audit_file(). We may need to recover from a crash. */ - grp = getgrnam(AUDIT_REVIEW_GROUP); - if (grp == NULL) { - syslog(LOG_INFO, - "Audit review group '%s' not available, using daemon gid", - AUDIT_REVIEW_GROUP); - gid = -1; - } else - gid = grp->gr_gid; - uid = getuid(); -#endif + if (auditd_get_state() == AUD_STATE_ENABLED) + close_lastfile(TS); - /* Try until we succeed. */ - while ((dirent = TAILQ_FIRST(&dir_q))) { - if ((fn = affixdir(timestr, dirent)) == NULL) { - syslog(LOG_INFO, "Failed to swap log at time %s", - timestr); - return (-1); - } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 22:52:08 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B5E71065679; Sun, 28 Dec 2008 22:52:08 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 342A78FC14; Sun, 28 Dec 2008 22:52:08 +0000 (UTC) (envelope-from rwatson@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 mBSMq8PT025883; Sun, 28 Dec 2008 22:52:08 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBSMq82l025882; Sun, 28 Dec 2008 22:52:08 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812282252.mBSMq82l025882@svn.freebsd.org> From: Robert Watson Date: Sun, 28 Dec 2008 22:52:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186546 - vendor/openbsm/1.1-ALPHA-4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 22:52:08 -0000 Author: rwatson Date: Sun Dec 28 22:52:07 2008 New Revision: 186546 URL: http://svn.freebsd.org/changeset/base/186546 Log: Tag OpenBSM 1.1-alpha4 vendor import. Added: vendor/openbsm/1.1-ALPHA-4/ - copied from r186545, vendor/openbsm/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 23:47:32 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E22511065676; Sun, 28 Dec 2008 23:47:32 +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 D33EF8FC0C; Sun, 28 Dec 2008 23:47:32 +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 mBSNlWbR027668; Sun, 28 Dec 2008 23:47:32 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBSNlWwY027667; Sun, 28 Dec 2008 23:47:32 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200812282347.mBSNlWwY027667@svn.freebsd.org> From: Daniel Gerzo Date: Sun, 28 Dec 2008 23:47: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: r186547 - in stable/7/sys: . boot/common contrib/pf dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 23:47:33 -0000 Author: danger (doc committer) Date: Sun Dec 28 23:47:32 2008 New Revision: 186547 URL: http://svn.freebsd.org/changeset/base/186547 Log: MFC r185692: - correct variable name PR: docs/129448 Submitted by: Kenyon Ralph Approved by: re@ (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/boot/common/loader.8 stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/boot/common/loader.8 ============================================================================== --- stable/7/sys/boot/common/loader.8 Sun Dec 28 22:52:07 2008 (r186546) +++ stable/7/sys/boot/common/loader.8 Sun Dec 28 23:47:32 2008 (r186547) @@ -454,7 +454,7 @@ if the script terminates with a non-zero or if a SIGTERM is delivered to the .Xr init 8 process (PID 1). -.It Va init_script +.It Va init_shell Defines the shell binary to be used for executing the various shell scripts. The default is .Dq Li /bin/sh . From owner-svn-src-all@FreeBSD.ORG Sun Dec 28 23:50:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC5401065673; Sun, 28 Dec 2008 23:50:05 +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 CE74E8FC0C; Sun, 28 Dec 2008 23:50:05 +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 mBSNo5Ae027886; Sun, 28 Dec 2008 23:50:05 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBSNo5qi027885; Sun, 28 Dec 2008 23:50:05 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200812282350.mBSNo5qi027885@svn.freebsd.org> From: Daniel Gerzo Date: Sun, 28 Dec 2008 23:50:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186548 - in releng/7.1/sys: . boot/common contrib/pf dev/cxgb modules/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2008 23:50:06 -0000 Author: danger (doc committer) Date: Sun Dec 28 23:50:05 2008 New Revision: 186548 URL: http://svn.freebsd.org/changeset/base/186548 Log: MFC r185692 - correct variable name PR: docs/129448 Submitted by: Kenyon Ralph Approved by: re@ (kensmith) Modified: releng/7.1/sys/ (props changed) releng/7.1/sys/boot/common/loader.8 releng/7.1/sys/contrib/pf/ (props changed) releng/7.1/sys/dev/cxgb/ (props changed) releng/7.1/sys/modules/cxgb/ (props changed) Modified: releng/7.1/sys/boot/common/loader.8 ============================================================================== --- releng/7.1/sys/boot/common/loader.8 Sun Dec 28 23:47:32 2008 (r186547) +++ releng/7.1/sys/boot/common/loader.8 Sun Dec 28 23:50:05 2008 (r186548) @@ -454,7 +454,7 @@ if the script terminates with a non-zero or if a SIGTERM is delivered to the .Xr init 8 process (PID 1). -.It Va init_script +.It Va init_shell Defines the shell binary to be used for executing the various shell scripts. The default is .Dq Li /bin/sh . From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 00:58:21 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8D8D106564A; Mon, 29 Dec 2008 00:58:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ABB868FC13; Mon, 29 Dec 2008 00:58:21 +0000 (UTC) (envelope-from delphij@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 mBT0wLMT032938; Mon, 29 Dec 2008 00:58:21 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBT0wLVI032937; Mon, 29 Dec 2008 00:58:21 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200812290058.mBT0wLVI032937@svn.freebsd.org> From: Xin LI Date: Mon, 29 Dec 2008 00:58:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186550 - releng/7.1/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 00:58:21 -0000 Author: delphij Date: Mon Dec 29 00:58:21 2008 New Revision: 186550 URL: http://svn.freebsd.org/changeset/base/186550 Log: Reflect what is actually being supported by bce(4) in RELENG_7_1. Approved by: re (kensmith) Modified: releng/7.1/share/man/man4/bce.4 Modified: releng/7.1/share/man/man4/bce.4 ============================================================================== --- releng/7.1/share/man/man4/bce.4 Mon Dec 29 00:55:33 2008 (r186549) +++ releng/7.1/share/man/man4/bce.4 Mon Dec 29 00:58:21 2008 (r186550) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 24, 2007 +.Dd December 28, 2008 .Dt BCE 4 .Os .Sh NAME @@ -136,10 +136,20 @@ following: .Pp .Bl -bullet -compact .It +Broadcom NetXtreme II BCM5706 1000Base-T +.It +Broadcom NetXtreme II BCM5706 1000Base-SX +.It +Broadcom NetXtreme II BCM5708 1000Base-T +.It +Broadcom NetXtreme II BCM5708 1000Base-SX +.It Dell PowerEdge 1950 integrated BCM5708 NIC .It Dell PowerEdge 2950 integrated BCM5708 NIC .It +HP NC370F Multifunction Gigabit Server Adapter +.It HP NC370T Multifunction Gigabit Server Adapter .It HP NC370i Multifunction Gigabit Server Adapter From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 01:06:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52CDE106564A; Mon, 29 Dec 2008 01:06:12 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4373F8FC18; Mon, 29 Dec 2008 01:06:12 +0000 (UTC) (envelope-from delphij@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 mBT16CFZ033572; Mon, 29 Dec 2008 01:06:12 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBT16C5p033569; Mon, 29 Dec 2008 01:06:12 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200812290106.mBT16C5p033569@svn.freebsd.org> From: Xin LI Date: Mon, 29 Dec 2008 01:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186551 - in releng/7.1/sys: . dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 01:06:12 -0000 Author: delphij Date: Mon Dec 29 01:06:11 2008 New Revision: 186551 URL: http://svn.freebsd.org/changeset/base/186551 Log: Revert r184442 (ata(4) changes to support ICH10 and ITE8213F chips) to previous state due to some late problem reports on -stable@. Approved by: re (kensmith) Modified: releng/7.1/sys/ (props changed) releng/7.1/sys/dev/ata/ata-chipset.c releng/7.1/sys/dev/ata/ata-pci.h Modified: releng/7.1/sys/dev/ata/ata-chipset.c ============================================================================== --- releng/7.1/sys/dev/ata/ata-chipset.c Mon Dec 29 00:58:21 2008 (r186550) +++ releng/7.1/sys/dev/ata/ata-chipset.c Mon Dec 29 01:06:11 2008 (r186551) @@ -102,8 +102,7 @@ static int ata_intel_31244_status(device static void ata_intel_31244_tf_write(struct ata_request *request); static void ata_intel_31244_reset(device_t dev); static int ata_ite_chipinit(device_t dev); -static void ata_ite_8213_setmode(device_t dev, int mode); -static void ata_ite_821x_setmode(device_t dev, int mode); +static void ata_ite_setmode(device_t dev, int mode); static int ata_jmicron_chipinit(device_t dev); static int ata_jmicron_allocate(device_t dev); static void ata_jmicron_reset(device_t dev); @@ -1763,66 +1762,58 @@ ata_intel_ident(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); static struct ata_chip_id ids[] = - {{ ATA_I82371FB, 0, 0, 2, ATA_WDMA2, "PIIX" }, - { ATA_I82371SB, 0, 0, 2, ATA_WDMA2, "PIIX3" }, - { ATA_I82371AB, 0, 0, 2, ATA_UDMA2, "PIIX4" }, - { ATA_I82443MX, 0, 0, 2, ATA_UDMA2, "PIIX4" }, - { ATA_I82451NX, 0, 0, 2, ATA_UDMA2, "PIIX4" }, - { ATA_I82801AB, 0, 0, 2, ATA_UDMA2, "ICH0" }, - { ATA_I82801AA, 0, 0, 2, ATA_UDMA4, "ICH" }, - { ATA_I82372FB, 0, 0, 2, ATA_UDMA4, "ICH" }, - { ATA_I82801BA, 0, 0, 2, ATA_UDMA5, "ICH2" }, - { ATA_I82801BA_1, 0, 0, 2, ATA_UDMA5, "ICH2" }, - { ATA_I82801CA, 0, 0, 2, ATA_UDMA5, "ICH3" }, - { ATA_I82801CA_1, 0, 0, 2, ATA_UDMA5, "ICH3" }, - { ATA_I82801DB, 0, 0, 2, ATA_UDMA5, "ICH4" }, - { ATA_I82801DB_1, 0, 0, 2, ATA_UDMA5, "ICH4" }, - { ATA_I82801EB, 0, 0, 2, ATA_UDMA5, "ICH5" }, - { ATA_I82801EB_S1, 0, 0, 2, ATA_SA150, "ICH5" }, - { ATA_I82801EB_R1, 0, 0, 2, ATA_SA150, "ICH5" }, - { ATA_I6300ESB, 0, 0, 2, ATA_UDMA5, "6300ESB" }, - { ATA_I6300ESB_S1, 0, 0, 2, ATA_SA150, "6300ESB" }, - { ATA_I6300ESB_R1, 0, 0, 2, ATA_SA150, "6300ESB" }, - { ATA_I82801FB, 0, 0, 2, ATA_UDMA5, "ICH6" }, - { ATA_I82801FB_S1, 0, AHCI, 0, ATA_SA150, "ICH6" }, - { ATA_I82801FB_R1, 0, AHCI, 0, ATA_SA150, "ICH6" }, - { ATA_I82801FBM, 0, AHCI, 0, ATA_SA150, "ICH6M" }, - { ATA_I82801GB, 0, 0, 1, ATA_UDMA5, "ICH7" }, - { ATA_I82801GB_S1, 0, AHCI, 0, ATA_SA300, "ICH7" }, - { ATA_I82801GB_R1, 0, AHCI, 0, ATA_SA300, "ICH7" }, - { ATA_I82801GB_AH, 0, AHCI, 0, ATA_SA300, "ICH7" }, - { ATA_I82801GBM_S1, 0, AHCI, 0, ATA_SA300, "ICH7M" }, - { ATA_I82801GBM_R1, 0, AHCI, 0, ATA_SA300, "ICH7M" }, - { ATA_I82801GBM_AH, 0, AHCI, 0, ATA_SA300, "ICH7M" }, - { ATA_I63XXESB2, 0, 0, 1, ATA_UDMA5, "63XXESB2" }, - { ATA_I63XXESB2_S1, 0, AHCI, 0, ATA_SA300, "63XXESB2" }, - { ATA_I63XXESB2_S2, 0, AHCI, 0, ATA_SA300, "63XXESB2" }, - { ATA_I63XXESB2_R1, 0, AHCI, 0, ATA_SA300, "63XXESB2" }, - { ATA_I63XXESB2_R2, 0, AHCI, 0, ATA_SA300, "63XXESB2" }, - { ATA_I82801HB_S1, 0, AHCI, 0, ATA_SA300, "ICH8" }, - { ATA_I82801HB_S2, 0, AHCI, 0, ATA_SA300, "ICH8" }, - { ATA_I82801HB_R1, 0, AHCI, 0, ATA_SA300, "ICH8" }, - { ATA_I82801HB_AH4, 0, AHCI, 0, ATA_SA300, "ICH8" }, - { ATA_I82801HB_AH6, 0, AHCI, 0, ATA_SA300, "ICH8" }, - { ATA_I82801HBM, 0, 0, 1, ATA_UDMA5, "ICH8M" }, - { ATA_I82801HBM_S1, 0, AHCI, 0, ATA_SA300, "ICH8M" }, - { ATA_I82801HBM_S2, 0, AHCI, 0, ATA_SA300, "ICH8M" }, - { ATA_I82801HBM_S3, 0, AHCI, 0, ATA_SA300, "ICH8M" }, - { ATA_I82801IB_S1, 0, AHCI, 0, ATA_SA300, "ICH9" }, - { ATA_I82801IB_S2, 0, AHCI, 0, ATA_SA300, "ICH9" }, - { ATA_I82801IB_AH2, 0, AHCI, 0, ATA_SA300, "ICH9" }, - { ATA_I82801IB_AH4, 0, AHCI, 0, ATA_SA300, "ICH9" }, - { ATA_I82801IB_AH6, 0, AHCI, 0, ATA_SA300, "ICH9" }, - { ATA_I82801IB_R1, 0, AHCI, 0, ATA_SA300, "ICH9" }, - { ATA_I82801JIB_S1, 0, AHCI, 0, ATA_SA300, "ICH10" }, - { ATA_I82801JIB_AH, 0, AHCI, 0, ATA_SA300, "ICH10" }, - { ATA_I82801JIB_R1, 0, AHCI, 0, ATA_SA300, "ICH10" }, - { ATA_I82801JIB_S2, 0, AHCI, 0, ATA_SA300, "ICH10" }, - { ATA_I82801JD_S1, 0, AHCI, 0, ATA_SA300, "ICH10" }, - { ATA_I82801JD_AH, 0, AHCI, 0, ATA_SA300, "ICH10" }, - { ATA_I82801JD_R1, 0, AHCI, 0, ATA_SA300, "ICH10" }, - { ATA_I82801JD_S2, 0, AHCI, 0, ATA_SA300, "ICH10" }, - { ATA_I31244, 0, 0, 2, ATA_SA150, "31244" }, + {{ ATA_I82371FB, 0, 0, 0x00, ATA_WDMA2, "PIIX" }, + { ATA_I82371SB, 0, 0, 0x00, ATA_WDMA2, "PIIX3" }, + { ATA_I82371AB, 0, 0, 0x00, ATA_UDMA2, "PIIX4" }, + { ATA_I82443MX, 0, 0, 0x00, ATA_UDMA2, "PIIX4" }, + { ATA_I82451NX, 0, 0, 0x00, ATA_UDMA2, "PIIX4" }, + { ATA_I82801AB, 0, 0, 0x00, ATA_UDMA2, "ICH0" }, + { ATA_I82801AA, 0, 0, 0x00, ATA_UDMA4, "ICH" }, + { ATA_I82372FB, 0, 0, 0x00, ATA_UDMA4, "ICH" }, + { ATA_I82801BA, 0, 0, 0x00, ATA_UDMA5, "ICH2" }, + { ATA_I82801BA_1, 0, 0, 0x00, ATA_UDMA5, "ICH2" }, + { ATA_I82801CA, 0, 0, 0x00, ATA_UDMA5, "ICH3" }, + { ATA_I82801CA_1, 0, 0, 0x00, ATA_UDMA5, "ICH3" }, + { ATA_I82801DB, 0, 0, 0x00, ATA_UDMA5, "ICH4" }, + { ATA_I82801DB_1, 0, 0, 0x00, ATA_UDMA5, "ICH4" }, + { ATA_I82801EB, 0, 0, 0x00, ATA_UDMA5, "ICH5" }, + { ATA_I82801EB_S1, 0, 0, 0x00, ATA_SA150, "ICH5" }, + { ATA_I82801EB_R1, 0, 0, 0x00, ATA_SA150, "ICH5" }, + { ATA_I6300ESB, 0, 0, 0x00, ATA_UDMA5, "6300ESB" }, + { ATA_I6300ESB_S1, 0, 0, 0x00, ATA_SA150, "6300ESB" }, + { ATA_I6300ESB_R1, 0, 0, 0x00, ATA_SA150, "6300ESB" }, + { ATA_I82801FB, 0, 0, 0x00, ATA_UDMA5, "ICH6" }, + { ATA_I82801FB_S1, 0, AHCI, 0x00, ATA_SA150, "ICH6" }, + { ATA_I82801FB_R1, 0, AHCI, 0x00, ATA_SA150, "ICH6" }, + { ATA_I82801FBM, 0, AHCI, 0x00, ATA_SA150, "ICH6M" }, + { ATA_I82801GB, 0, 0, 0x00, ATA_UDMA5, "ICH7" }, + { ATA_I82801GB_S1, 0, AHCI, 0x00, ATA_SA300, "ICH7" }, + { ATA_I82801GB_R1, 0, AHCI, 0x00, ATA_SA300, "ICH7" }, + { ATA_I82801GB_AH, 0, AHCI, 0x00, ATA_SA300, "ICH7" }, + { ATA_I82801GBM_S1, 0, AHCI, 0x00, ATA_SA300, "ICH7M" }, + { ATA_I82801GBM_R1, 0, AHCI, 0x00, ATA_SA300, "ICH7M" }, + { ATA_I82801GBM_AH, 0, AHCI, 0x00, ATA_SA300, "ICH7M" }, + { ATA_I63XXESB2, 0, 0, 0x00, ATA_UDMA5, "63XXESB2" }, + { ATA_I63XXESB2_S1, 0, AHCI, 0x00, ATA_SA300, "63XXESB2" }, + { ATA_I63XXESB2_S2, 0, AHCI, 0x00, ATA_SA300, "63XXESB2" }, + { ATA_I63XXESB2_R1, 0, AHCI, 0x00, ATA_SA300, "63XXESB2" }, + { ATA_I63XXESB2_R2, 0, AHCI, 0x00, ATA_SA300, "63XXESB2" }, + { ATA_I82801HB_S1, 0, AHCI, 0x00, ATA_SA300, "ICH8" }, + { ATA_I82801HB_S2, 0, AHCI, 0x00, ATA_SA300, "ICH8" }, + { ATA_I82801HB_R1, 0, AHCI, 0x00, ATA_SA300, "ICH8" }, + { ATA_I82801HB_AH4, 0, AHCI, 0x00, ATA_SA300, "ICH8" }, + { ATA_I82801HB_AH6, 0, AHCI, 0x00, ATA_SA300, "ICH8" }, + { ATA_I82801HBM, 0, 0, 0x00, ATA_UDMA5, "ICH8M" }, + { ATA_I82801HBM_S1, 0, 0, 0x00, ATA_SA150, "ICH8M" }, + { ATA_I82801HBM_S2, 0, AHCI, 0x00, ATA_SA300, "ICH8M" }, + { ATA_I82801HBM_S3, 0, AHCI, 0x00, ATA_SA300, "ICH8M" }, + { ATA_I82801IB_S1, 0, AHCI, 0x00, ATA_SA300, "ICH9" }, + { ATA_I82801IB_S2, 0, AHCI, 0x00, ATA_SA300, "ICH9" }, + { ATA_I82801IB_AH2, 0, AHCI, 0x00, ATA_SA300, "ICH9" }, + { ATA_I82801IB_AH4, 0, AHCI, 0x00, ATA_SA300, "ICH9" }, + { ATA_I82801IB_AH6, 0, AHCI, 0x00, ATA_SA300, "ICH9" }, + { ATA_I82801IB_R1, 0, AHCI, 0x00, ATA_SA300, "ICH9" }, + { ATA_I31244, 0, 0, 0x00, ATA_SA150, "31244" }, { 0, 0, 0, 0, 0, 0}}; if (!(ctlr->chip = ata_match_chip(dev, ids))) @@ -1864,7 +1855,6 @@ ata_intel_chipinit(device_t dev) /* non SATA intel chips goes here */ else if (ctlr->chip->max_dma < ATA_SA150) { - ctlr->channels = ctlr->chip->cfg2; ctlr->allocate = ata_intel_allocate; ctlr->setmode = ata_intel_new_setmode; } @@ -1998,54 +1988,52 @@ ata_intel_new_setmode(device_t dev, int device_printf(dev, "%ssetting %s on %s chip\n", (error) ? "FAILURE " : "", ata_mode2str(mode), ctlr->chip->text); - if (!error) { - if (mode >= ATA_UDMA0) { - u_int8_t utimings[] = { 0x00, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10 }; - - pci_write_config(gparent, 0x48, reg48 | (0x0001 << devno), 2); - pci_write_config(gparent, 0x4a, - (reg4a & ~(0x3 << (devno << 2))) | - (utimings[mode & ATA_MODE_MASK] << (devno<<2)), 2); - } - else { - pci_write_config(gparent, 0x48, reg48 & ~(0x0001 << devno), 2); - pci_write_config(gparent, 0x4a, (reg4a & ~(0x3 << (devno << 2))),2); - } - reg54 |= 0x0400; - if (mode >= ATA_UDMA2) - reg54 |= (0x1 << devno); - else - reg54 &= ~(0x1 << devno); - if (mode >= ATA_UDMA5) - reg54 |= (0x1000 << devno); - else - reg54 &= ~(0x1000 << devno); + if (error) + return; - pci_write_config(gparent, 0x54, reg54, 2); + if (mode >= ATA_UDMA0) { + pci_write_config(gparent, 0x48, reg48 | (0x0001 << devno), 2); + pci_write_config(gparent, 0x4a, + (reg4a & ~(0x3 << (devno << 2))) | + ((0x01 + !(mode & 0x01)) << (devno << 2)), 2); + } + else { + pci_write_config(gparent, 0x48, reg48 & ~(0x0001 << devno), 2); + pci_write_config(gparent, 0x4a, (reg4a & ~(0x3 << (devno << 2))), 2); + } + reg54 |= 0x0400; + if (mode >= ATA_UDMA2) + pci_write_config(gparent, 0x54, reg54 | (0x1 << devno), 2); + else + pci_write_config(gparent, 0x54, reg54 & ~(0x1 << devno), 2); - reg40 &= ~0x00ff00ff; - reg40 |= 0x40774077; + if (mode >= ATA_UDMA5) + pci_write_config(gparent, 0x54, reg54 | (0x1000 << devno), 2); + else + pci_write_config(gparent, 0x54, reg54 & ~(0x1000 << devno), 2); - if (atadev->unit == ATA_MASTER) { - mask40 = 0x3300; - new40 = timings[ata_mode2idx(mode)] << 8; - } - else { - mask44 = 0x0f; - new44 = ((timings[ata_mode2idx(mode)] & 0x30) >> 2) | - (timings[ata_mode2idx(mode)] & 0x03); - } - if (ch->unit) { - mask40 <<= 16; - new40 <<= 16; - mask44 <<= 4; - new44 <<= 4; - } - pci_write_config(gparent, 0x40, (reg40 & ~mask40) | new40, 4); - pci_write_config(gparent, 0x44, (reg44 & ~mask44) | new44, 1); + reg40 &= ~0x00ff00ff; + reg40 |= 0x40774077; - atadev->mode = mode; + if (atadev->unit == ATA_MASTER) { + mask40 = 0x3300; + new40 = timings[ata_mode2idx(mode)] << 8; + } + else { + mask44 = 0x0f; + new44 = ((timings[ata_mode2idx(mode)] & 0x30) >> 2) | + (timings[ata_mode2idx(mode)] & 0x03); + } + if (ch->unit) { + mask40 <<= 16; + new40 <<= 16; + mask44 <<= 4; + new44 <<= 4; } + pci_write_config(gparent, 0x40, (reg40 & ~mask40) | new40, 4); + pci_write_config(gparent, 0x44, (reg44 & ~mask44) | new44, 1); + + atadev->mode = mode; } static void @@ -2205,8 +2193,7 @@ ata_ite_ident(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); static struct ata_chip_id ids[] = - {{ ATA_IT8213F, 0x00, 0x00, 0x00, ATA_UDMA6, "IT8213F" }, - { ATA_IT8212F, 0x00, 0x00, 0x00, ATA_UDMA6, "IT8212F" }, + {{ ATA_IT8212F, 0x00, 0x00, 0x00, ATA_UDMA6, "IT8212F" }, { ATA_IT8211F, 0x00, 0x00, 0x00, ATA_UDMA6, "IT8211F" }, { 0, 0, 0, 0, 0, 0}}; @@ -2226,28 +2213,19 @@ ata_ite_chipinit(device_t dev) if (ata_setup_interrupt(dev)) return ENXIO; - if (ctlr->chip->chipid == ATA_IT8213F) { - /* the ITE 8213F only has one channel */ - ctlr->channels = 1; + ctlr->setmode = ata_ite_setmode; - ctlr->setmode = ata_ite_8213_setmode; - } - else { - /* set PCI mode and 66Mhz reference clock */ - pci_write_config(dev, 0x50, pci_read_config(dev, 0x50, 1) & ~0x83, 1); - - /* set default active & recover timings */ - pci_write_config(dev, 0x54, 0x31, 1); - pci_write_config(dev, 0x56, 0x31, 1); - - ctlr->setmode = ata_ite_821x_setmode; - } + /* set PCI mode and 66Mhz reference clock */ + pci_write_config(dev, 0x50, pci_read_config(dev, 0x50, 1) & ~0x83, 1); + /* set default active & recover timings */ + pci_write_config(dev, 0x54, 0x31, 1); + pci_write_config(dev, 0x56, 0x31, 1); return 0; } static void -ata_ite_821x_setmode(device_t dev, int mode) +ata_ite_setmode(device_t dev, int mode) { device_t gparent = GRANDPARENT(dev); struct ata_channel *ch = device_get_softc(device_get_parent(dev)); @@ -2307,80 +2285,6 @@ ata_ite_821x_setmode(device_t dev, int m } } -static void -ata_ite_8213_setmode(device_t dev, int mode) -{ - device_t gparent = GRANDPARENT(dev); - struct ata_pci_controller *ctlr = device_get_softc(gparent); - struct ata_device *atadev = device_get_softc(dev); - u_int16_t reg40 = pci_read_config(gparent, 0x40, 2); - u_int8_t reg44 = pci_read_config(gparent, 0x44, 1); - u_int8_t reg48 = pci_read_config(gparent, 0x48, 1); - u_int16_t reg4a = pci_read_config(gparent, 0x4a, 2); - u_int16_t reg54 = pci_read_config(gparent, 0x54, 2); - u_int16_t mask40 = 0, new40 = 0; - u_int8_t mask44 = 0, new44 = 0; - int devno = atadev->unit; - int error; - u_int8_t timings[] = { 0x00, 0x00, 0x10, 0x21, 0x23, 0x10, 0x21, 0x23, - 0x23, 0x23, 0x23, 0x23, 0x23, 0x23 }; - - mode = ata_limit_mode(dev, mode, ctlr->chip->max_dma); - - if (mode > ATA_UDMA2 && !(reg54 & (0x10 << devno))) { - ata_print_cable(dev, "controller"); - mode = ATA_UDMA2; - } - - error = ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode); - - if (bootverbose) - device_printf(dev, "%ssetting %s on %s chip\n", - (error) ? "FAILURE " : "", - ata_mode2str(mode), ctlr->chip->text); - if (!error) { - if (mode >= ATA_UDMA0) { - u_int8_t utimings[] = { 0x00, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10 }; - - pci_write_config(gparent, 0x48, reg48 | (0x0001 << devno), 2); - pci_write_config(gparent, 0x4a, - (reg4a & ~(0x3 << (devno << 2))) | - (utimings[mode & ATA_MODE_MASK] << (devno<<2)), 2); - } - else { - pci_write_config(gparent, 0x48, reg48 & ~(0x0001 << devno), 2); - pci_write_config(gparent, 0x4a, (reg4a & ~(0x3 << (devno << 2))),2); - } - if (mode >= ATA_UDMA2) - reg54 |= (0x1 << devno); - else - reg54 &= ~(0x1 << devno); - if (mode >= ATA_UDMA5) - reg54 |= (0x1000 << devno); - else - reg54 &= ~(0x1000 << devno); - pci_write_config(gparent, 0x54, reg54, 2); - - reg40 &= 0xff00; - reg40 |= 0x4033; - if (atadev->unit == ATA_MASTER) { - reg40 |= (ata_atapi(dev) ? 0x04 : 0x00); - mask40 = 0x3300; - new40 = timings[ata_mode2idx(mode)] << 8; - } - else { - reg40 |= (ata_atapi(dev) ? 0x40 : 0x00); - mask44 = 0x0f; - new44 = ((timings[ata_mode2idx(mode)] & 0x30) >> 2) | - (timings[ata_mode2idx(mode)] & 0x03); - } - pci_write_config(gparent, 0x40, (reg40 & ~mask40) | new40, 4); - pci_write_config(gparent, 0x44, (reg44 & ~mask44) | new44, 1); - - atadev->mode = mode; - } -} - /* * JMicron chipset support functions @@ -4613,7 +4517,7 @@ ata_sii_chipinit(device_t dev) ctlr->r_type2 = SYS_RES_MEMORY; ctlr->r_rid2 = PCIR_BAR(5); if (!(ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2, - &ctlr->r_rid2, RF_ACTIVE))){ + &ctlr->r_rid2, RF_ACTIVE))) { if (ctlr->chip->chipid != ATA_SII0680 || (pci_read_config(dev, 0x8a, 1) & 1)) return ENXIO; Modified: releng/7.1/sys/dev/ata/ata-pci.h ============================================================================== --- releng/7.1/sys/dev/ata/ata-pci.h Mon Dec 29 00:58:21 2008 (r186550) +++ releng/7.1/sys/dev/ata/ata-pci.h Mon Dec 29 01:06:11 2008 (r186551) @@ -180,20 +180,11 @@ struct ata_connect_task { #define ATA_I82801IB_AH4 0x29238086 #define ATA_I82801IB_R1 0x29258086 #define ATA_I82801IB_S2 0x29268086 -#define ATA_I82801JIB_S1 0x3a208086 -#define ATA_I82801JIB_AH 0x3a228086 -#define ATA_I82801JIB_R1 0x3a258086 -#define ATA_I82801JIB_S2 0x3a268086 -#define ATA_I82801JD_S1 0x3a008086 -#define ATA_I82801JD_AH 0x3a028086 -#define ATA_I82801JD_R1 0x3a058086 -#define ATA_I82801JD_S2 0x3a068086 #define ATA_I31244 0x32008086 #define ATA_ITE_ID 0x1283 #define ATA_IT8211F 0x82111283 #define ATA_IT8212F 0x82121283 -#define ATA_IT8213F 0x82131283 #define ATA_JMICRON_ID 0x197b #define ATA_JMB360 0x2360197b From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 01:09:40 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F34B106564A; Mon, 29 Dec 2008 01:09:40 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91EFF8FC17; Mon, 29 Dec 2008 01:09:40 +0000 (UTC) (envelope-from delphij@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 mBT19eos033903; Mon, 29 Dec 2008 01:09:40 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBT19eD8033902; Mon, 29 Dec 2008 01:09:40 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200812290109.mBT19eD8033902@svn.freebsd.org> From: Xin LI Date: Mon, 29 Dec 2008 01:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186552 - releng/7.1/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 01:09:40 -0000 Author: delphij Date: Mon Dec 29 01:09:40 2008 New Revision: 186552 URL: http://svn.freebsd.org/changeset/base/186552 Log: Revert partially manual page changes as we reveted ICH10 and IT8213F support. Approved by: re (kensmith) Modified: releng/7.1/share/man/man4/ (props changed) releng/7.1/share/man/man4/ata.4 Modified: releng/7.1/share/man/man4/ata.4 ============================================================================== --- releng/7.1/share/man/man4/ata.4 Mon Dec 29 01:06:11 2008 (r186551) +++ releng/7.1/share/man/man4/ata.4 Mon Dec 29 01:09:40 2008 (r186552) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 4, 2008 +.Dd August 31, 2008 .Dt ATA 4 .Os .Sh NAME @@ -121,9 +121,9 @@ Cyrix 5530. .It HighPoint: HPT302, HPT366, HPT368, HPT370, HPT371, HPT372, HPT372N, HPT374. .It Intel: -6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5, ICH6, ICH7, ICH8, ICH9, ICH10. +6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5, ICH6, ICH7, ICH8, ICH9. .It ITE: -IT8211F, IT8212F, IT8213F. +IT8211F, IT8212F. .It JMicron: JMB360, JMB361, JMB363, JMB365, JMB366, JMB368. .It Marvell From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 06:31:04 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA7F71065674; Mon, 29 Dec 2008 06:31:04 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B685F8FC08; Mon, 29 Dec 2008 06:31:04 +0000 (UTC) (envelope-from kmacy@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 mBT6V43M047195; Mon, 29 Dec 2008 06:31:04 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBT6V3KJ047176; Mon, 29 Dec 2008 06:31:03 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812290631.mBT6V3KJ047176@svn.freebsd.org> From: Kip Macy Date: Mon, 29 Dec 2008 06:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186557 - in head/sys: dev/xen/blkfront dev/xen/console dev/xen/evtchn dev/xen/netfront i386/conf i386/i386 i386/include/xen i386/isa i386/xen xen xen/evtchn xen/xenbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 06:31:04 -0000 Author: kmacy Date: Mon Dec 29 06:31:03 2008 New Revision: 186557 URL: http://svn.freebsd.org/changeset/base/186557 Log: merge 186535, 186537, and 186538 from releng_7_xen Log: - merge in latest xenbus from dfr's xenhvm - fix race condition in xs_read_reply by converting tsleep to mtx_sleep Log: unmask evtchn in bind_{virq, ipi}_to_irq Log: - remove code for handling case of not being able to sleep - eliminate tsleep - make sleeps atomic Added: head/sys/xen/evtchn.h (contents, props changed) head/sys/xen/hypervisor.h (contents, props changed) head/sys/xen/xen_intr.h (contents, props changed) Deleted: head/sys/i386/include/xen/evtchn.h head/sys/i386/include/xen/hypervisor.h head/sys/i386/include/xen/xen_intr.h Modified: head/sys/dev/xen/blkfront/blkfront.c head/sys/dev/xen/console/console.c head/sys/dev/xen/console/xencons_ring.c head/sys/dev/xen/evtchn/evtchn_dev.c head/sys/dev/xen/netfront/netfront.c head/sys/i386/conf/XEN head/sys/i386/i386/genassym.c head/sys/i386/i386/machdep.c head/sys/i386/i386/vm_machdep.c head/sys/i386/include/xen/xenfunc.h head/sys/i386/isa/npx.c head/sys/i386/xen/clock.c head/sys/i386/xen/mp_machdep.c head/sys/i386/xen/mptable.c head/sys/i386/xen/pmap.c head/sys/i386/xen/xen_machdep.c head/sys/xen/evtchn/evtchn.c head/sys/xen/evtchn/evtchn_dev.c head/sys/xen/features.c head/sys/xen/gnttab.c head/sys/xen/gnttab.h head/sys/xen/xenbus/xenbus_client.c head/sys/xen/xenbus/xenbus_comms.c head/sys/xen/xenbus/xenbus_comms.h head/sys/xen/xenbus/xenbus_dev.c head/sys/xen/xenbus/xenbus_probe.c head/sys/xen/xenbus/xenbus_probe_backend.c head/sys/xen/xenbus/xenbus_xs.c head/sys/xen/xenbus/xenbusvar.h Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/dev/xen/blkfront/blkfront.c Mon Dec 29 06:31:03 2008 (r186557) @@ -40,10 +40,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include -#include -#include +#include +#include #include #include #include @@ -214,7 +214,7 @@ xlvbd_add(device_t dev, blkif_sector_t c struct xb_softc *sc; int unit, error = 0; const char *name; - + blkfront_vdevice_to_unit(vdevice, &unit, &name); sc = (struct xb_softc *)malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO); @@ -227,12 +227,12 @@ xlvbd_add(device_t dev, blkif_sector_t c memset(&sc->xb_disk, 0, sizeof(sc->xb_disk)); sc->xb_disk = disk_alloc(); - sc->xb_disk->d_unit = unit; + sc->xb_disk->d_unit = sc->xb_unit; sc->xb_disk->d_open = blkif_open; sc->xb_disk->d_close = blkif_close; sc->xb_disk->d_ioctl = blkif_ioctl; sc->xb_disk->d_strategy = xb_strategy; - sc->xb_disk->d_name = "xbd"; + sc->xb_disk->d_name = name; sc->xb_disk->d_drv1 = sc; sc->xb_disk->d_sectorsize = sector_size; @@ -329,8 +329,8 @@ blkfront_attach(device_t dev) /* FIXME: Use dynamic device id if this is not set. */ err = xenbus_scanf(XBT_NIL, xenbus_get_node(dev), - "virtual-device", "%i", &vdevice); - if (err != 1) { + "virtual-device", NULL, "%i", &vdevice); + if (err) { xenbus_dev_fatal(dev, err, "reading virtual-device"); printf("couldn't find virtual device"); return (err); @@ -363,9 +363,8 @@ blkfront_attach(device_t dev) info->handle = strtoul(strrchr(xenbus_get_node(dev),'/')+1, NULL, 0); err = talk_to_backend(dev, info); - if (err) { - return err; - } + if (err) + return (err); return (0); } @@ -381,7 +380,8 @@ blkfront_resume(device_t dev) blkif_free(info, 1); err = talk_to_backend(dev, info); - if (!err) + + if (info->connected == BLKIF_STATE_SUSPENDED && !err) blkif_recover(info); return err; @@ -427,7 +427,7 @@ talk_to_backend(device_t dev, struct blk } err = xenbus_transaction_end(xbt, 0); if (err) { - if (err == -EAGAIN) + if (err == EAGAIN) goto again; xenbus_dev_fatal(dev, err, "completing transaction"); goto destroy_blkring; @@ -450,7 +450,7 @@ static int setup_blkring(device_t dev, struct blkfront_info *info) { blkif_sring_t *sring; - int err; + int error; info->ring_ref = GRANT_INVALID_REF; @@ -462,28 +462,27 @@ setup_blkring(device_t dev, struct blkfr SHARED_RING_INIT(sring); FRONT_RING_INIT(&info->ring, sring, PAGE_SIZE); - err = xenbus_grant_ring(dev, (vtomach(info->ring.sring) >> PAGE_SHIFT)); - if (err < 0) { + error = xenbus_grant_ring(dev, (vtomach(info->ring.sring) >> PAGE_SHIFT), + &info->ring_ref); + if (error) { free(sring, M_DEVBUF); info->ring.sring = NULL; goto fail; } - info->ring_ref = err; - err = bind_listening_port_to_irqhandler(xenbus_get_otherend_id(dev), + error = bind_listening_port_to_irqhandler(xenbus_get_otherend_id(dev), "xbd", (driver_intr_t *)blkif_int, info, - INTR_TYPE_BIO | INTR_MPSAFE, NULL); - if (err <= 0) { - xenbus_dev_fatal(dev, err, + INTR_TYPE_BIO | INTR_MPSAFE, &info->irq); + if (error) { + xenbus_dev_fatal(dev, error, "bind_evtchn_to_irqhandler failed"); goto fail; } - info->irq = err; - return 0; + return (0); fail: blkif_free(info, 0); - return err; + return (error); } @@ -999,7 +998,7 @@ blkif_free(struct blkfront_info *info, i info->ring.sring = NULL; } if (info->irq) - unbind_from_irqhandler(info->irq, info); + unbind_from_irqhandler(info->irq); info->irq = 0; } Modified: head/sys/dev/xen/console/console.c ============================================================================== --- head/sys/dev/xen/console/console.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/dev/xen/console/console.c Mon Dec 29 06:31:03 2008 (r186557) @@ -15,8 +15,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include +#include +#include #include #include #include @@ -75,17 +75,17 @@ static unsigned int wc, wp; /* write_con #define XCUNIT(x) (dev2unit(x)) #define ISTTYOPEN(tp) ((tp) && ((tp)->t_state & TS_ISOPEN)) #define CN_LOCK_INIT(x, _name) \ - mtx_init(&x, _name, NULL, MTX_SPIN|MTX_RECURSE) + mtx_init(&x, _name, NULL, MTX_DEF|MTX_RECURSE) #define CN_LOCK(l) \ do { \ if (panicstr == NULL) \ - mtx_lock_spin(&(l)); \ + mtx_lock(&(l)); \ } while (0) #define CN_UNLOCK(l) \ do { \ if (panicstr == NULL) \ - mtx_unlock_spin(&(l)); \ + mtx_unlock(&(l)); \ } while (0) #define CN_LOCK_ASSERT(x) mtx_assert(&x, MA_OWNED) #define CN_LOCK_DESTROY(x) mtx_destroy(&x) @@ -216,6 +216,8 @@ xc_probe(device_t dev) static int xc_attach(device_t dev) { + int error; + struct xc_softc *sc = (struct xc_softc *)device_get_softc(dev); if (xen_start_info->flags & SIF_INITDOMAIN) { xc_consdev.cn_putc = xccnputc_dom0; @@ -232,14 +234,15 @@ xc_attach(device_t dev) callout_reset(&xc_callout, XC_POLLTIME, xc_timeout, xccons); if (xen_start_info->flags & SIF_INITDOMAIN) { - PANIC_IF(bind_virq_to_irqhandler( - VIRQ_CONSOLE, - 0, - "console", - NULL, - xencons_priv_interrupt, - INTR_TYPE_TTY) < 0); + error = bind_virq_to_irqhandler( + VIRQ_CONSOLE, + 0, + "console", + NULL, + xencons_priv_interrupt, + sc, INTR_TYPE_TTY, NULL); + KASSERT(error >= 0, ("can't register console interrupt")); } Modified: head/sys/dev/xen/console/xencons_ring.c ============================================================================== --- head/sys/dev/xen/console/xencons_ring.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/dev/xen/console/xencons_ring.c Mon Dec 29 06:31:03 2008 (r186557) @@ -15,19 +15,20 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include #define console_evtchn console.domU.evtchn extern char *console_page; - +extern struct mtx cn_mtx; + static inline struct xencons_interface * xencons_interface(void) { @@ -82,6 +83,7 @@ xencons_handle_input(void *unused) struct xencons_interface *intf; XENCONS_RING_IDX cons, prod; + mtx_lock(&cn_mtx); intf = xencons_interface(); cons = intf->in_cons; @@ -99,6 +101,7 @@ xencons_handle_input(void *unused) notify_remote_via_evtchn(xen_start_info->console_evtchn); xencons_tx(); + mtx_unlock(&cn_mtx); } void Modified: head/sys/dev/xen/evtchn/evtchn_dev.c ============================================================================== --- head/sys/dev/xen/evtchn/evtchn_dev.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/dev/xen/evtchn/evtchn_dev.c Mon Dec 29 06:31:03 2008 (r186557) @@ -26,13 +26,13 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include #include -#include +#include typedef struct evtchn_sotfc { Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/dev/xen/netfront/netfront.c Mon Dec 29 06:31:03 2008 (r186557) @@ -62,9 +62,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -363,24 +363,25 @@ makembuf (struct mbuf *buf) static int xen_net_read_mac(device_t dev, uint8_t mac[]) { - char *s; - int i; - char *e; - char *macstr = xenbus_read(XBT_NIL, xenbus_get_node(dev), "mac", NULL); - if (IS_ERR(macstr)) { - return PTR_ERR(macstr); - } + int error, i; + char *s, *e, *macstr; + + error = xenbus_read(XBT_NIL, xenbus_get_node(dev), "mac", NULL, + (void **) &macstr); + if (error) + return (error); + s = macstr; for (i = 0; i < ETHER_ADDR_LEN; i++) { mac[i] = strtoul(s, &e, 16); if (s == e || (e[0] != ':' && e[0] != 0)) { free(macstr, M_DEVBUF); - return ENOENT; + return (ENOENT); } s = &e[1]; } free(macstr, M_DEVBUF); - return 0; + return (0); } /** @@ -422,13 +423,11 @@ netfront_attach(device_t dev) * leave the device-layer structures intact so that this is transparent to the * rest of the kernel. */ -static int +static int netfront_resume(device_t dev) { struct netfront_info *info = device_get_softc(dev); - - DPRINTK("%s\n", xenbus_get_node(dev)); - + netif_disconnect_backend(info); return (0); } @@ -532,7 +531,7 @@ setup_device(device_t dev, struct netfro { netif_tx_sring_t *txs; netif_rx_sring_t *rxs; - int err; + int error; struct ifnet *ifp; ifp = info->xn_ifp; @@ -545,51 +544,45 @@ setup_device(device_t dev, struct netfro txs = (netif_tx_sring_t *)malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT|M_ZERO); if (!txs) { - err = ENOMEM; - xenbus_dev_fatal(dev, err, "allocating tx ring page"); + error = ENOMEM; + xenbus_dev_fatal(dev, error, "allocating tx ring page"); goto fail; } SHARED_RING_INIT(txs); FRONT_RING_INIT(&info->tx, txs, PAGE_SIZE); - err = xenbus_grant_ring(dev, virt_to_mfn(txs)); - if (err < 0) + error = xenbus_grant_ring(dev, virt_to_mfn(txs), &info->tx_ring_ref); + if (error) goto fail; - info->tx_ring_ref = err; rxs = (netif_rx_sring_t *)malloc(PAGE_SIZE, M_DEVBUF, M_NOWAIT|M_ZERO); if (!rxs) { - err = ENOMEM; - xenbus_dev_fatal(dev, err, "allocating rx ring page"); + error = ENOMEM; + xenbus_dev_fatal(dev, error, "allocating rx ring page"); goto fail; } SHARED_RING_INIT(rxs); FRONT_RING_INIT(&info->rx, rxs, PAGE_SIZE); - err = xenbus_grant_ring(dev, virt_to_mfn(rxs)); - if (err < 0) + error = xenbus_grant_ring(dev, virt_to_mfn(rxs), &info->rx_ring_ref); + if (error) goto fail; - info->rx_ring_ref = err; -#if 0 - network_connect(info); -#endif - err = bind_listening_port_to_irqhandler(xenbus_get_otherend_id(dev), - "xn", xn_intr, info, INTR_TYPE_NET | INTR_MPSAFE, NULL); + error = bind_listening_port_to_irqhandler(xenbus_get_otherend_id(dev), + "xn", xn_intr, info, INTR_TYPE_NET | INTR_MPSAFE, &info->irq); - if (err <= 0) { - xenbus_dev_fatal(dev, err, + if (error) { + xenbus_dev_fatal(dev, error, "bind_evtchn_to_irqhandler failed"); goto fail; } - info->irq = err; - + show_device(info); - return 0; + return (0); fail: netif_free(info); - return err; + return (error); } /** @@ -1225,7 +1218,7 @@ xennet_get_responses(struct netfront_inf MULTI_update_va_mapping(mcl, (u_long)vaddr, (((vm_paddr_t)mfn) << PAGE_SHIFT) | PG_RW | PG_V | PG_M | PG_A, 0); - pfn = (uint32_t)m->m_ext.ext_arg1; + pfn = (uintptr_t)m->m_ext.ext_arg1; mmu->ptr = ((vm_paddr_t)mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE; mmu->val = pfn; @@ -1557,18 +1550,18 @@ xn_stop(struct netfront_info *sc) int network_connect(struct netfront_info *np) { - int i, requeue_idx, err; + int i, requeue_idx, error; grant_ref_t ref; netif_rx_request_t *req; u_int feature_rx_copy, feature_rx_flip; - err = xenbus_scanf(XBT_NIL, xenbus_get_otherend_path(np->xbdev), - "feature-rx-copy", "%u", &feature_rx_copy); - if (err != 1) + error = xenbus_scanf(XBT_NIL, xenbus_get_otherend_path(np->xbdev), + "feature-rx-copy", NULL, "%u", &feature_rx_copy); + if (error) feature_rx_copy = 0; - err = xenbus_scanf(XBT_NIL, xenbus_get_otherend_path(np->xbdev), - "feature-rx-flip", "%u", &feature_rx_flip); - if (err != 1) + error = xenbus_scanf(XBT_NIL, xenbus_get_otherend_path(np->xbdev), + "feature-rx-flip", NULL, "%u", &feature_rx_flip); + if (error) feature_rx_flip = 1; /* @@ -1581,9 +1574,9 @@ network_connect(struct netfront_info *np XN_LOCK(np); /* Recovery procedure: */ - err = talk_to_backend(np->xbdev, np); - if (err) - return (err); + error = talk_to_backend(np->xbdev, np); + if (error) + return (error); /* Step 1: Reinitialise variables. */ netif_release_tx_bufs(np); @@ -1591,6 +1584,7 @@ network_connect(struct netfront_info *np /* Step 2: Rebuild the RX buffer freelist and the RX ring itself. */ for (requeue_idx = 0, i = 0; i < NET_RX_RING_SIZE; i++) { struct mbuf *m; + u_long pfn; if (np->rx_mbufs[i] == NULL) continue; @@ -1598,15 +1592,16 @@ network_connect(struct netfront_info *np m = np->rx_mbufs[requeue_idx] = xennet_get_rx_mbuf(np, i); ref = np->grant_rx_ref[requeue_idx] = xennet_get_rx_ref(np, i); req = RING_GET_REQUEST(&np->rx, requeue_idx); + pfn = vtophys(mtod(m, vm_offset_t)) >> PAGE_SHIFT; if (!np->copying_receiver) { gnttab_grant_foreign_transfer_ref(ref, xenbus_get_otherend_id(np->xbdev), - vtophys(mtod(m, vm_offset_t))); + pfn); } else { gnttab_grant_foreign_access_ref(ref, xenbus_get_otherend_id(np->xbdev), - vtophys(mtod(m, vm_offset_t)), 0); + PFNTOMFN(pfn), 0); } req->gref = ref; req->id = requeue_idx; @@ -1707,7 +1702,7 @@ create_netdev(device_t dev) ifp = np->xn_ifp = if_alloc(IFT_ETHER); ifp->if_softc = np; if_initname(ifp, "xn", device_get_unit(dev)); - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = xn_ioctl; ifp->if_output = ether_output; ifp->if_start = xn_start; @@ -1777,11 +1772,14 @@ static void netif_free(struct netfront_i #endif } - - static void netif_disconnect_backend(struct netfront_info *info) { - xn_stop(info); + XN_RX_LOCK(info); + XN_TX_LOCK(info); + netfront_carrier_off(info); + XN_TX_UNLOCK(info); + XN_RX_UNLOCK(info); + end_access(info->tx_ring_ref, info->tx.sring); end_access(info->rx_ring_ref, info->rx.sring); info->tx_ring_ref = GRANT_INVALID_REF; @@ -1789,12 +1787,9 @@ static void netif_disconnect_backend(str info->tx.sring = NULL; info->rx.sring = NULL; -#if 0 if (info->irq) - unbind_from_irqhandler(info->irq, info->netdev); -#else - panic("FIX ME"); -#endif + unbind_from_irqhandler(info->irq); + info->irq = 0; } Modified: head/sys/i386/conf/XEN ============================================================================== --- head/sys/i386/conf/XEN Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/i386/conf/XEN Mon Dec 29 06:31:03 2008 (r186557) @@ -9,9 +9,9 @@ ident XEN makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions MODULES_OVERRIDE="" -#options SCHED_ULE # ULE scheduler -#options PREEMPTION # Enable kernel thread preemption -options SCHED_4BSD +options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption +#options SCHED_4BSD options INET # InterNETworking options INET6 # IPv6 communications protocols Modified: head/sys/i386/i386/genassym.c ============================================================================== --- head/sys/i386/i386/genassym.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/i386/i386/genassym.c Mon Dec 29 06:31:03 2008 (r186557) @@ -234,7 +234,7 @@ ASSYM(BUS_SPACE_HANDLE_IAT, offsetof(str #endif #ifdef XEN -#include +#include ASSYM(PC_CR3, offsetof(struct pcpu, pc_cr3)); ASSYM(HYPERVISOR_VIRT_START, __HYPERVISOR_VIRT_START); #endif Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/i386/i386/machdep.c Mon Dec 29 06:31:03 2008 (r186557) @@ -144,11 +144,11 @@ uint32_t arch_i386_xbox_memsize = 0; #ifdef XEN /* XEN includes */ #include -#include +#include #include #include #include -#include +#include void Xhypervisor_callback(void); void failsafe_callback(void); Modified: head/sys/i386/i386/vm_machdep.c ============================================================================== --- head/sys/i386/i386/vm_machdep.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/i386/i386/vm_machdep.c Mon Dec 29 06:31:03 2008 (r186557) @@ -89,7 +89,7 @@ __FBSDID("$FreeBSD$"); #include #ifdef XEN -#include +#include #endif #ifdef PC98 #include Modified: head/sys/i386/include/xen/xenfunc.h ============================================================================== --- head/sys/i386/include/xen/xenfunc.h Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/i386/include/xen/xenfunc.h Mon Dec 29 06:31:03 2008 (r186557) @@ -33,7 +33,7 @@ #define _XEN_XENFUNC_H_ #include -#include +#include #include #include #include Modified: head/sys/i386/isa/npx.c ============================================================================== --- head/sys/i386/isa/npx.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/i386/isa/npx.c Mon Dec 29 06:31:03 2008 (r186557) @@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$"); #include #ifdef XEN #include -#include +#include #endif #ifdef DEV_ISA Modified: head/sys/i386/xen/clock.c ============================================================================== --- head/sys/i386/xen/clock.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/i386/xen/clock.c Mon Dec 29 06:31:03 2008 (r186557) @@ -78,11 +78,11 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include #include -#include +#include #include #include #include @@ -791,18 +791,20 @@ static struct vcpu_set_periodic_timer xe void cpu_initclocks(void) { - int time_irq; - + unsigned int time_irq; + int error; + xen_set_periodic_tick.period_ns = NS_PER_TICK; HYPERVISOR_vcpu_op(VCPUOP_set_periodic_timer, 0, &xen_set_periodic_tick); - - if ((time_irq = bind_virq_to_irqhandler(VIRQ_TIMER, 0, "clk", - clkintr, NULL, - INTR_TYPE_CLK | INTR_FAST)) < 0) { + + error = bind_virq_to_irqhandler(VIRQ_TIMER, 0, "clk", + clkintr, NULL, NULL, + INTR_TYPE_CLK | INTR_FAST, &time_irq); + if (error) panic("failed to register clock interrupt\n"); - } + /* should fast clock be enabled ? */ @@ -811,18 +813,19 @@ cpu_initclocks(void) int ap_cpu_initclocks(int cpu) { - int time_irq; + unsigned int time_irq; + int error; xen_set_periodic_tick.period_ns = NS_PER_TICK; HYPERVISOR_vcpu_op(VCPUOP_set_periodic_timer, cpu, &xen_set_periodic_tick); - - if ((time_irq = bind_virq_to_irqhandler(VIRQ_TIMER, cpu, "clk", - clkintr2, NULL, - INTR_TYPE_CLK | INTR_FAST)) < 0) { + error = bind_virq_to_irqhandler(VIRQ_TIMER, 0, "clk", + clkintr, NULL, NULL, + INTR_TYPE_CLK | INTR_FAST, &time_irq); + if (error) panic("failed to register clock interrupt\n"); - } + return (0); } Modified: head/sys/i386/xen/mp_machdep.c ============================================================================== --- head/sys/i386/xen/mp_machdep.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/i386/xen/mp_machdep.c Mon Dec 29 06:31:03 2008 (r186557) @@ -85,9 +85,9 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include +#include +#include +#include #include #define stop_cpus_with_nmi 0 @@ -464,7 +464,8 @@ static int xen_smp_intr_init(unsigned int cpu) { int rc; - + unsigned int irq; + per_cpu(resched_irq, cpu) = per_cpu(callfunc_irq, cpu) = -1; sprintf(resched_name[cpu], "resched%u", cpu); @@ -472,22 +473,22 @@ xen_smp_intr_init(unsigned int cpu) cpu, resched_name[cpu], smp_reschedule_interrupt, - INTR_FAST|INTR_TYPE_TTY|INTR_MPSAFE); + INTR_FAST|INTR_TYPE_TTY|INTR_MPSAFE, &irq); printf("cpu=%d irq=%d vector=%d\n", cpu, rc, RESCHEDULE_VECTOR); - per_cpu(resched_irq, cpu) = rc; + per_cpu(resched_irq, cpu) = irq; sprintf(callfunc_name[cpu], "callfunc%u", cpu); rc = bind_ipi_to_irqhandler(CALL_FUNCTION_VECTOR, cpu, callfunc_name[cpu], smp_call_function_interrupt, - INTR_FAST|INTR_TYPE_TTY|INTR_MPSAFE); + INTR_FAST|INTR_TYPE_TTY|INTR_MPSAFE, &irq); if (rc < 0) goto fail; - per_cpu(callfunc_irq, cpu) = rc; + per_cpu(callfunc_irq, cpu) = irq; printf("cpu=%d irq=%d vector=%d\n", cpu, rc, CALL_FUNCTION_VECTOR); @@ -500,9 +501,9 @@ xen_smp_intr_init(unsigned int cpu) fail: if (per_cpu(resched_irq, cpu) >= 0) - unbind_from_irqhandler(per_cpu(resched_irq, cpu), NULL); + unbind_from_irqhandler(per_cpu(resched_irq, cpu)); if (per_cpu(callfunc_irq, cpu) >= 0) - unbind_from_irqhandler(per_cpu(callfunc_irq, cpu), NULL); + unbind_from_irqhandler(per_cpu(callfunc_irq, cpu)); return rc; } Modified: head/sys/i386/xen/mptable.c ============================================================================== --- head/sys/i386/xen/mptable.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/i386/xen/mptable.c Mon Dec 29 06:31:03 2008 (r186557) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include #include Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/i386/xen/pmap.c Mon Dec 29 06:31:03 2008 (r186557) @@ -154,7 +154,7 @@ __FBSDID("$FreeBSD$"); #endif #include -#include +#include #include #include #include Modified: head/sys/i386/xen/xen_machdep.c ============================================================================== --- head/sys/i386/xen/xen_machdep.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/i386/xen/xen_machdep.c Mon Dec 29 06:31:03 2008 (r186557) @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); -#include +#include #include #include #include Added: head/sys/xen/evtchn.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/xen/evtchn.h Mon Dec 29 06:31:03 2008 (r186557) @@ -0,0 +1,94 @@ +/****************************************************************************** + * evtchn.h + * + * Communication via Xen event channels. + * Also definitions for the device that demuxes notifications to userspace. + * + * Copyright (c) 2004, K A Fraser + * + * $FreeBSD$ + */ + +#ifndef __ASM_EVTCHN_H__ +#define __ASM_EVTCHN_H__ +#include +#include +#include +#include + +/* + * LOW-LEVEL DEFINITIONS + */ + +/* + * Unlike notify_remote_via_evtchn(), this is safe to use across + * save/restore. Notifications on a broken connection are silently dropped. + */ +void notify_remote_via_irq(int irq); + + +/* Entry point for notifications into Linux subsystems. */ +void evtchn_do_upcall(struct trapframe *frame); + +/* Entry point for notifications into the userland character device. */ +void evtchn_device_upcall(int port); + +void mask_evtchn(int port); + +void unmask_evtchn(int port); + +#ifdef SMP +void rebind_evtchn_to_cpu(int port, unsigned int cpu); +#else +#define rebind_evtchn_to_cpu(port, cpu) ((void)0) +#endif + +static inline +int test_and_set_evtchn_mask(int port) +{ + shared_info_t *s = HYPERVISOR_shared_info; + return synch_test_and_set_bit(port, s->evtchn_mask); +} + +static inline void +clear_evtchn(int port) +{ + shared_info_t *s = HYPERVISOR_shared_info; + synch_clear_bit(port, &s->evtchn_pending[0]); +} + +static inline void +notify_remote_via_evtchn(int port) +{ + struct evtchn_send send = { .port = port }; + (void)HYPERVISOR_event_channel_op(EVTCHNOP_send, &send); +} + +/* + * Use these to access the event channel underlying the IRQ handle returned + * by bind_*_to_irqhandler(). + */ +int irq_to_evtchn_port(int irq); + +void ipi_pcpu(unsigned int cpu, int vector); + +/* + * CHARACTER-DEVICE DEFINITIONS + */ + +#define PORT_NORMAL 0x0000 +#define PORT_EXCEPTION 0x8000 +#define PORTIDX_MASK 0x7fff + +/* /dev/xen/evtchn resides at device number major=10, minor=200 */ +#define EVTCHN_MINOR 200 + +/* /dev/xen/evtchn ioctls: */ +/* EVTCHN_RESET: Clear and reinit the event buffer. Clear error condition. */ +#define EVTCHN_RESET _IO('E', 1) +/* EVTCHN_BIND: Bind to the specified event-channel port. */ +#define EVTCHN_BIND _IO('E', 2) +/* EVTCHN_UNBIND: Unbind from the specified event-channel port. */ +#define EVTCHN_UNBIND _IO('E', 3) + +#endif /* __ASM_EVTCHN_H__ */ Modified: head/sys/xen/evtchn/evtchn.c ============================================================================== --- head/sys/xen/evtchn/evtchn.c Mon Dec 29 04:40:52 2008 (r186556) +++ head/sys/xen/evtchn/evtchn.c Mon Dec 29 06:31:03 2008 (r186557) @@ -23,10 +23,10 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include -#include -#include +#include +#include #include @@ -76,6 +76,7 @@ static struct mtx irq_mapping_update_loc static struct xenpic *xp; struct xenpic_intsrc { struct intsrc xp_intsrc; + void *xp_cookie; uint8_t xp_vector; boolean_t xp_masked; }; @@ -295,6 +296,7 @@ bind_caller_port_to_irq(unsigned int cal } irq_bindcount[irq]++; + unmask_evtchn(caller_port); out: mtx_unlock_spin(&irq_mapping_update_lock); @@ -320,6 +322,7 @@ bind_local_port_to_irq(unsigned int loca evtchn_to_irq[local_port] = irq; irq_info[irq] = mk_irq_info(IRQT_LOCAL_PORT, 0, local_port); irq_bindcount[irq]++; + unmask_evtchn(local_port); out: mtx_unlock_spin(&irq_mapping_update_lock); @@ -361,7 +364,7 @@ static int bind_virq_to_irq(unsigned int virq, unsigned int cpu) { struct evtchn_bind_virq bind_virq; - int evtchn, irq; + int evtchn = 0, irq; mtx_lock_spin(&irq_mapping_update_lock); @@ -385,6 +388,7 @@ bind_virq_to_irq(unsigned int virq, unsi } irq_bindcount[irq]++; + unmask_evtchn(evtchn); out: mtx_unlock_spin(&irq_mapping_update_lock); @@ -398,8 +402,9 @@ int bind_ipi_to_irq(unsigned int ipi, unsigned int cpu) { struct evtchn_bind_ipi bind_ipi; - int evtchn, irq; - + int irq; + int evtchn = 0; + mtx_lock_spin(&irq_mapping_update_lock); if ((irq = per_cpu(ipi_to_irq, cpu)[ipi]) == -1) { @@ -418,6 +423,7 @@ bind_ipi_to_irq(unsigned int ipi, unsign bind_evtchn_to_cpu(evtchn, cpu); } irq_bindcount[irq]++; + unmask_evtchn(evtchn); out: mtx_unlock_spin(&irq_mapping_update_lock); @@ -465,20 +471,25 @@ bind_caller_port_to_irqhandler(unsigned driver_intr_t handler, void *arg, unsigned long irqflags, - void **cookiep) + unsigned int *irqp) { unsigned int irq; - int retval; + int error; irq = bind_caller_port_to_irq(caller_port); intr_register_source(&xp->xp_pins[irq].xp_intsrc); - retval = intr_add_handler(devname, irq, NULL, handler, arg, irqflags, cookiep); - if (retval != 0) { + error = intr_add_handler(devname, irq, NULL, handler, arg, irqflags, + &xp->xp_pins[irq].xp_cookie); + + if (error) { unbind_from_irq(irq); - return -retval; + return (error); } - return irq; + if (irqp) + *irqp = irq; + + return (0); } int @@ -488,43 +499,50 @@ bind_listening_port_to_irqhandler( driver_intr_t handler, void *arg, unsigned long irqflags, - void **cookiep) + unsigned int *irqp) { unsigned int irq; - int retval; + int error; irq = bind_listening_port_to_irq(remote_domain); intr_register_source(&xp->xp_pins[irq].xp_intsrc); - retval = intr_add_handler(devname, irq, NULL, handler, arg, irqflags, cookiep); - if (retval != 0) { + error = intr_add_handler(devname, irq, NULL, handler, arg, irqflags, + &xp->xp_pins[irq].xp_cookie); + if (error) { unbind_from_irq(irq); - return -retval; + return (error); } - - return irq; + if (irqp) + *irqp = irq; + + return (0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 08:05:49 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB2C51065676; Mon, 29 Dec 2008 08:05:49 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C36008FC1E; Mon, 29 Dec 2008 08:05:49 +0000 (UTC) (envelope-from obrien@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 mBT85nF5048955; Mon, 29 Dec 2008 08:05:49 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBT85nDx048952; Mon, 29 Dec 2008 08:05:49 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200812290805.mBT85nDx048952@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 29 Dec 2008 08:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186558 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 08:05:50 -0000 Author: obrien Date: Mon Dec 29 08:05:49 2008 New Revision: 186558 URL: http://svn.freebsd.org/changeset/base/186558 Log: Consistently use Var_SetGlobal(). Modified: head/usr.bin/make/for.c head/usr.bin/make/parse.c head/usr.bin/make/suff.c Modified: head/usr.bin/make/for.c ============================================================================== --- head/usr.bin/make/for.c Mon Dec 29 06:31:03 2008 (r186557) +++ head/usr.bin/make/for.c Mon Dec 29 08:05:49 2008 (r186558) @@ -254,7 +254,7 @@ For_Run(int lineno) LST_FOREACH(ln, &values) { val = Lst_Datum(ln); - Var_Set(var, val, VAR_GLOBAL); + Var_SetGlobal(var, val); DEBUGF(FOR, ("--- %s = %s\n", var, val)); str = Buf_Peel(Var_SubstOnly(var, Buf_Data(buf), FALSE)); Modified: head/usr.bin/make/parse.c ============================================================================== --- head/usr.bin/make/parse.c Mon Dec 29 06:31:03 2008 (r186557) +++ head/usr.bin/make/parse.c Mon Dec 29 08:05:49 2008 (r186558) @@ -1076,7 +1076,7 @@ ParseDoDependency(char *line) break; case Posix: is_posix = TRUE; - Var_Set("%POSIX", "1003.2", VAR_GLOBAL); + Var_SetGlobal("%POSIX", "1003.2"); break; default: break; Modified: head/usr.bin/make/suff.c ============================================================================== --- head/usr.bin/make/suff.c Mon Dec 29 06:31:03 2008 (r186557) +++ head/usr.bin/make/suff.c Mon Dec 29 08:05:49 2008 (r186558) @@ -785,11 +785,11 @@ Suff_DoPaths(void) } ptr = Path_MakeFlags("-I", &inIncludes); - Var_Set(".INCLUDES", ptr, VAR_GLOBAL); + Var_SetGlobal(".INCLUDES", ptr); free(ptr); ptr = Path_MakeFlags("-L", &inLibs); - Var_Set(".LIBS", ptr, VAR_GLOBAL); + Var_SetGlobal(".LIBS", ptr); free(ptr); Path_Clear(&inIncludes); From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 10:26:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 987DE1065688; Mon, 29 Dec 2008 10:26:02 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E3F58FC18; Mon, 29 Dec 2008 10:26:02 +0000 (UTC) (envelope-from obrien@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 mBTAQ2Sf051646; Mon, 29 Dec 2008 10:26:02 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBTAQ224051640; Mon, 29 Dec 2008 10:26:02 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200812291026.mBTAQ224051640@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 29 Dec 2008 10:26:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186559 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 10:26:02 -0000 Author: obrien Date: Mon Dec 29 10:26:02 2008 New Revision: 186559 URL: http://svn.freebsd.org/changeset/base/186559 Log: 1. Add the ability to tweak the token output before targets in job mode. E.g., .MAKE.JOB.PREFIX=${.newline}---[${.MAKE.PID}] would produce ---[1234] target --- 2. Added ${.newline} as a simple means of being able to include '\n' in the assignment of .MAKE.JOB.PREFIX Obtained from: NetBSD Modified: head/usr.bin/make/job.c head/usr.bin/make/job.h head/usr.bin/make/main.c head/usr.bin/make/make.1 head/usr.bin/make/make.h head/usr.bin/make/parse.c Modified: head/usr.bin/make/job.c ============================================================================== --- head/usr.bin/make/job.c Mon Dec 29 08:05:49 2008 (r186558) +++ head/usr.bin/make/job.c Mon Dec 29 10:26:02 2008 (r186559) @@ -321,10 +321,11 @@ static GNode *lastNode; /* The node for static const char *targFmt; /* Format string to use to head output from a * job when it's not the most-recent job heard * from */ +static char *targPrefix = NULL; /* What we print at the start of targFmt */ -#define TARG_FMT "--- %s ---\n" /* Default format */ +#define TARG_FMT "%s %s ---\n" /* Default format */ #define MESSAGE(fp, gn) \ - fprintf(fp, targFmt, gn->name); + fprintf(fp, targFmt, targPrefix, gn->name); /* * When JobStart attempts to run a job but isn't allowed to @@ -2283,6 +2284,18 @@ Job_Make(GNode *gn) JobStart(gn, 0, NULL); } +void +Job_SetPrefix(void) +{ + + if (targPrefix) { + free(targPrefix); + } else if (!Var_Exists(MAKE_JOB_PREFIX, VAR_GLOBAL)) { + Var_SetGlobal(MAKE_JOB_PREFIX, "---"); + } + targPrefix = Var_Subst("${" MAKE_JOB_PREFIX "}", VAR_GLOBAL, 0)->buf; +} + /** * Job_Init * Initialize the process module, given a maximum number of jobs. @@ -2350,7 +2363,7 @@ Job_Init(int maxproc) lastNode = NULL; - if ((maxJobs == 1 && fifoFd < 0) || beVerbose == 0) { + if (maxJobs == 1 && fifoFd < 0) { /* * If only one job can run at a time, there's no need for a * banner, no is there? Modified: head/usr.bin/make/job.h ============================================================================== --- head/usr.bin/make/job.h Mon Dec 29 08:05:49 2008 (r186558) +++ head/usr.bin/make/job.h Mon Dec 29 10:26:02 2008 (r186559) @@ -67,6 +67,7 @@ Boolean Job_Empty(void); void Job_Finish(void); void Job_Wait(void); void Job_AbortAll(void); +void Job_SetPrefix(void); void Proc_Init(void); Modified: head/usr.bin/make/main.c ============================================================================== --- head/usr.bin/make/main.c Mon Dec 29 08:05:49 2008 (r186558) +++ head/usr.bin/make/main.c Mon Dec 29 10:26:02 2008 (r186559) @@ -1029,6 +1029,16 @@ main(int argc, char **argv) #ifdef MAKE_VERSION Var_SetGlobal("MAKE_VERSION", MAKE_VERSION); #endif + Var_SetGlobal(".newline", "\n"); /* handy for :@ loops */ + { + char tmp[64]; + + snprintf(tmp, sizeof(tmp), "%u", getpid()); + Var_SetGlobal(".MAKE.PID", tmp); + snprintf(tmp, sizeof(tmp), "%u", getppid()); + Var_SetGlobal(".MAKE.PPID", tmp); + } + Job_SetPrefix(); /* * First snag things out of the MAKEFLAGS environment Modified: head/usr.bin/make/make.1 ============================================================================== --- head/usr.bin/make/make.1 Mon Dec 29 08:05:49 2008 (r186558) +++ head/usr.bin/make/make.1 Mon Dec 29 10:26:02 2008 (r186559) @@ -32,7 +32,7 @@ .\" @(#)make.1 8.8 (Berkeley) 6/13/95 .\" $FreeBSD$ .\" -.Dd December 26, 2008 +.Dd December 29, 2008 .Dt MAKE 1 .Os .Sh NAME @@ -763,6 +763,31 @@ contains all the options from the environment variable plus any options specified on .Nm Ns 's command line. +.It Va .MAKE.PID +The process-id of +.Nm . +.It Va .MAKE.PPID +The parent process-id of +.Nm . +.It Va .MAKE.JOB.PREFIX +If +.Nm +is run with +.Fl j Fl v +then output for each target is prefixed with a token +.Ql --- target --- +the first part of which can be controlled via +.Va .MAKE.JOB.PREFIX . +.br +For example: +.Li .MAKE.JOB.PREFIX=${.newline}---${MAKE:T}[${.MAKE.PID}] +would produce tokens like +.Ql ---make[1234] target --- +or +.Li .MAKE.JOB.PREFIX=---pid[${.MAKE.PID}],ppid[${.MAKE.PPID}] +would produce tokens like +.Ql ---pid[56789],ppid[1234] target --- +making it easier to track the degree of parallelism being achieved. .It Va .TARGETS List of targets .Nm Modified: head/usr.bin/make/make.h ============================================================================== --- head/usr.bin/make/make.h Mon Dec 29 08:05:49 2008 (r186558) +++ head/usr.bin/make/make.h Mon Dec 29 10:26:02 2008 (r186559) @@ -49,6 +49,8 @@ #include "util.h" +#define MAKE_JOB_PREFIX ".MAKE.JOB.PREFIX" + struct GNode; struct Lst; struct Buffer; Modified: head/usr.bin/make/parse.c ============================================================================== --- head/usr.bin/make/parse.c Mon Dec 29 08:05:49 2008 (r186558) +++ head/usr.bin/make/parse.c Mon Dec 29 10:26:02 2008 (r186559) @@ -1533,6 +1533,8 @@ Parse_DoVar(char *line, GNode *ctxt) */ Var_Set(line, cp, ctxt); } + if (strcmp(line, MAKE_JOB_PREFIX) == 0) + Job_SetPrefix(); } /*- From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 12:07:18 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AD51106564A; Mon, 29 Dec 2008 12:07:18 +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 814B98FC18; Mon, 29 Dec 2008 12:07:18 +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 mBTC7IxH056728; Mon, 29 Dec 2008 12:07:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBTC7IOg056727; Mon, 29 Dec 2008 12:07:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812291207.mBTC7IOg056727@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 29 Dec 2008 12:07:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186560 - head/sys/fs/pseudofs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 12:07:18 -0000 Author: kib Date: Mon Dec 29 12:07:18 2008 New Revision: 186560 URL: http://svn.freebsd.org/changeset/base/186560 Log: After the pfs_vncache_mutex is dropped, another thread may attempt to do pfs_vncache_alloc() for the same pfs_node and pid. In this case, we could end up with two vnodes for the pair. Recheck the cache under the locked pfs_vncache_mutex after all sleeping operations are done [1]. This case mostly cannot happen now because pseudofs uses exclusive vnode locking for lookup. But it does drop the vnode lock for dotdot lookups, and Marcus' pseudofs_vptocnp implementation is vulnerable too. Do not call free() on the struct pfs_vdata after insmntque() failure, because vp->v_data points to the structure, and pseudofs_reclaim() frees it by the call to pfs_vncache_free(). Tested by: pho [1] Approved by: des MFC after: 2 weeks Modified: head/sys/fs/pseudofs/pseudofs_vncache.c Modified: head/sys/fs/pseudofs/pseudofs_vncache.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs_vncache.c Mon Dec 29 10:26:02 2008 (r186559) +++ head/sys/fs/pseudofs/pseudofs_vncache.c Mon Dec 29 12:07:18 2008 (r186560) @@ -111,7 +111,7 @@ int pfs_vncache_alloc(struct mount *mp, struct vnode **vpp, struct pfs_node *pn, pid_t pid) { - struct pfs_vdata *pvd; + struct pfs_vdata *pvd, *pvd2; struct vnode *vp; int error; @@ -146,19 +146,11 @@ retry: } } mtx_unlock(&pfs_vncache_mutex); - ++pfs_vncache_misses; /* nope, get a new one */ pvd = malloc(sizeof *pvd, M_PFSVNCACHE, M_WAITOK); - mtx_lock(&pfs_vncache_mutex); - if (++pfs_vncache_entries > pfs_vncache_maxentries) - pfs_vncache_maxentries = pfs_vncache_entries; - mtx_unlock(&pfs_vncache_mutex); error = getnewvnode("pseudofs", mp, &pfs_vnodeops, vpp); if (error) { - mtx_lock(&pfs_vncache_mutex); - --pfs_vncache_entries; - mtx_unlock(&pfs_vncache_mutex); free(pvd, M_PFSVNCACHE); return (error); } @@ -200,14 +192,35 @@ retry: vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); error = insmntque(*vpp, mp); if (error != 0) { - mtx_lock(&pfs_vncache_mutex); - --pfs_vncache_entries; - mtx_unlock(&pfs_vncache_mutex); - free(pvd, M_PFSVNCACHE); *vpp = NULLVP; return (error); } +retry2: mtx_lock(&pfs_vncache_mutex); + /* + * Other thread may race with us, creating the entry we are + * going to insert into the cache. Recheck after + * pfs_vncache_mutex is reacquired. + */ + for (pvd2 = pfs_vncache; pvd2; pvd2 = pvd2->pvd_next) { + if (pvd2->pvd_pn == pn && pvd2->pvd_pid == pid && + pvd2->pvd_vnode->v_mount == mp) { + vp = pvd2->pvd_vnode; + VI_LOCK(vp); + mtx_unlock(&pfs_vncache_mutex); + if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, curthread) == 0) { + ++pfs_vncache_hits; + vgone(*vpp); + *vpp = vp; + cache_purge(vp); + return (0); + } + goto retry2; + } + } + ++pfs_vncache_misses; + if (++pfs_vncache_entries > pfs_vncache_maxentries) + pfs_vncache_maxentries = pfs_vncache_entries; pvd->pvd_prev = NULL; pvd->pvd_next = pfs_vncache; if (pvd->pvd_next) From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 12:12:23 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9D2B1065672; Mon, 29 Dec 2008 12:12:23 +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 902C78FC1C; Mon, 29 Dec 2008 12:12:23 +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 mBTCCNuD056861; Mon, 29 Dec 2008 12:12:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBTCCN0I056860; Mon, 29 Dec 2008 12:12:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812291212.mBTCCN0I056860@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 29 Dec 2008 12:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186561 - head/sys/fs/pseudofs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 12:12:23 -0000 Author: kib Date: Mon Dec 29 12:12:23 2008 New Revision: 186561 URL: http://svn.freebsd.org/changeset/base/186561 Log: Drop the pseudofs vnode lock around call to pfs_read handler. The handler may need to lock arbitrary vnodes, causing either lock order reversal or recursive vnode lock acquisition. Tested by: pho Approved by: des MFC after: 2 weeks Modified: head/sys/fs/pseudofs/pseudofs_vnops.c Modified: head/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs_vnops.c Mon Dec 29 12:07:18 2008 (r186560) +++ head/sys/fs/pseudofs/pseudofs_vnops.c Mon Dec 29 12:12:23 2008 (r186561) @@ -476,7 +476,7 @@ pfs_read(struct vop_read_args *va) struct uio *uio = va->a_uio; struct proc *proc; struct sbuf *sb = NULL; - int error; + int error, locked; unsigned int buflen, offset, resid; PFS_TRACE(("%s", pn->pn_name)); @@ -502,13 +502,15 @@ pfs_read(struct vop_read_args *va) PROC_UNLOCK(proc); } + vhold(vn); + locked = VOP_ISLOCKED(vn); + VOP_UNLOCK(vn, 0); + if (pn->pn_flags & PFS_RAWRD) { PFS_TRACE(("%lu resid", (unsigned long)uio->uio_resid)); error = pn_fill(curthread, proc, pn, NULL, uio); PFS_TRACE(("%lu resid", (unsigned long)uio->uio_resid)); - if (proc != NULL) - PRELE(proc); - PFS_RETURN (error); + goto ret; } /* beaucoup sanity checks so we don't ask for bogus allocation */ @@ -518,34 +520,35 @@ pfs_read(struct vop_read_args *va) (buflen = offset + resid + 1) < offset || buflen > INT_MAX) { if (proc != NULL) PRELE(proc); - PFS_RETURN (EINVAL); + error = EINVAL; + goto ret; } if (buflen > MAXPHYS + 1) { - if (proc != NULL) - PRELE(proc); - PFS_RETURN (EIO); + error = EIO; + goto ret; } sb = sbuf_new(sb, NULL, buflen, 0); if (sb == NULL) { - if (proc != NULL) - PRELE(proc); - PFS_RETURN (EIO); + error = EIO; + goto ret; } error = pn_fill(curthread, proc, pn, sb, uio); - if (proc != NULL) - PRELE(proc); - if (error) { sbuf_delete(sb); - PFS_RETURN (error); + goto ret; } sbuf_finish(sb); error = uiomove_frombuf(sbuf_data(sb), sbuf_len(sb), uio); sbuf_delete(sb); +ret: + vn_lock(vn, locked | LK_RETRY); + vdrop(vn); + if (proc != NULL) + PRELE(proc); PFS_RETURN (error); } From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 12:41:33 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52AF61065672; Mon, 29 Dec 2008 12:41:33 +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 3910B8FC12; Mon, 29 Dec 2008 12:41:33 +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 mBTCfXHF057411; Mon, 29 Dec 2008 12:41:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBTCfXIZ057410; Mon, 29 Dec 2008 12:41:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812291241.mBTCfXIZ057410@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 29 Dec 2008 12:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186562 - head/sys/fs/procfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 12:41:33 -0000 Author: kib Date: Mon Dec 29 12:41:32 2008 New Revision: 186562 URL: http://svn.freebsd.org/changeset/base/186562 Log: Use curproc->p_sysent->sv_flags bit SV_ILP32 for detection of the 32 bit caller, instead of direct comparision with ia32_freebsd_sysvec. Tested by: pho Approved by: des MFC after: 2 weeks Modified: head/sys/fs/procfs/procfs_map.c Modified: head/sys/fs/procfs/procfs_map.c ============================================================================== --- head/sys/fs/procfs/procfs_map.c Mon Dec 29 12:12:23 2008 (r186561) +++ head/sys/fs/procfs/procfs_map.c Mon Dec 29 12:41:32 2008 (r186562) @@ -46,6 +46,9 @@ #include #include #include +#ifdef COMPAT_IA32 +#include +#endif #include #include @@ -59,15 +62,6 @@ #include #include -#ifdef COMPAT_IA32 -#include -#include -#include - -extern struct sysentvec ia32_freebsd_sysvec; -#endif - - #define MEBUFFERSIZE 256 /* @@ -104,8 +98,8 @@ procfs_doprocmap(PFS_FILL_ARGS) return (EOPNOTSUPP); #ifdef COMPAT_IA32 - if (curthread->td_proc->p_sysent == &ia32_freebsd_sysvec) { - if (p->p_sysent != &ia32_freebsd_sysvec) + if (curproc->p_sysent->sv_flags & SV_ILP32) { + if (!(p->p_sysent->sv_flags & SV_ILP32)) return (EOPNOTSUPP); wrap32 = 1; } From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 12:45:11 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A9F61065674; Mon, 29 Dec 2008 12:45:11 +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 704508FC13; Mon, 29 Dec 2008 12:45:11 +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 mBTCjBuT057538; Mon, 29 Dec 2008 12:45:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBTCjBUn057535; Mon, 29 Dec 2008 12:45:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812291245.mBTCjBUn057535@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 29 Dec 2008 12:45:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186563 - in head/sys: compat/linprocfs fs/procfs kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 12:45:11 -0000 Author: kib Date: Mon Dec 29 12:45:11 2008 New Revision: 186563 URL: http://svn.freebsd.org/changeset/base/186563 Log: vm_map_lock_read() does not increment map->timestamp, so we should compare map->timestamp with saved timestamp after map read lock is reacquired, not with saved timestamp + 1. The only consequence of the +1 was unconditional lookup of the next map entry, though. Tested by: pho Approved by: des MFC after: 2 weeks Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/fs/procfs/procfs_map.c head/sys/kern/kern_proc.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Mon Dec 29 12:41:32 2008 (r186562) +++ head/sys/compat/linprocfs/linprocfs.c Mon Dec 29 12:45:11 2008 (r186563) @@ -980,7 +980,7 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) error = 0; break; } - if (last_timestamp + 1 != map->timestamp) { + if (last_timestamp != map->timestamp) { /* * Look again for the entry because the map was * modified while it was unlocked. Specifically, Modified: head/sys/fs/procfs/procfs_map.c ============================================================================== --- head/sys/fs/procfs/procfs_map.c Mon Dec 29 12:41:32 2008 (r186562) +++ head/sys/fs/procfs/procfs_map.c Mon Dec 29 12:45:11 2008 (r186563) @@ -224,7 +224,7 @@ procfs_doprocmap(PFS_FILL_ARGS) error = 0; break; } - if (last_timestamp + 1 != map->timestamp) { + if (last_timestamp != map->timestamp) { /* * Look again for the entry because the map was * modified while it was unlocked. Specifically, Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Mon Dec 29 12:41:32 2008 (r186562) +++ head/sys/kern/kern_proc.c Mon Dec 29 12:45:11 2008 (r186563) @@ -1500,7 +1500,7 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A vm_map_lock_read(map); if (error) break; - if (last_timestamp + 1 != map->timestamp) { + if (last_timestamp != map->timestamp) { vm_map_lookup_entry(map, addr - 1, &tmp_entry); entry = tmp_entry; } @@ -1677,7 +1677,7 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR vm_map_lock_read(map); if (error) break; - if (last_timestamp + 1 != map->timestamp) { + if (last_timestamp != map->timestamp) { vm_map_lookup_entry(map, addr - 1, &tmp_entry); entry = tmp_entry; } From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 12:58:46 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4538A106564A; Mon, 29 Dec 2008 12:58:46 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 28F108FC13; Mon, 29 Dec 2008 12:58:46 +0000 (UTC) (envelope-from ed@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 mBTCwknp057885; Mon, 29 Dec 2008 12:58:46 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBTCwjDv057880; Mon, 29 Dec 2008 12:58:45 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200812291258.mBTCwjDv057880@svn.freebsd.org> From: Ed Schouten Date: Mon, 29 Dec 2008 12:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186564 - in head/sys: compat/freebsd32 compat/linux i386/ibcs2 kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 12:58:46 -0000 Author: ed Date: Mon Dec 29 12:58:45 2008 New Revision: 186564 URL: http://svn.freebsd.org/changeset/base/186564 Log: Push down Giant inside sysctl. Also add some more assertions to the code. In the existing code we didn't really enforce that callers hold Giant before calling userland_sysctl(), even though there is no guarantee it is safe. Fix this by just placing Giant locks around the call to the oid handler. This also means we only pick up Giant for a very short period of time. Maybe we should add MPSAFE flags to sysctl or phase it out all together. I've also added SYSCTL_LOCK_ASSERT(). We have to make sure sysctl_root() and name2oid() are called with the sysctl lock held. Reviewed by: Jille Timmermans Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/linux/linux_misc.c head/sys/i386/ibcs2/ibcs2_sysi86.c head/sys/kern/kern_sysctl.c head/sys/kern/kern_xxx.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Mon Dec 29 12:45:11 2008 (r186563) +++ head/sys/compat/freebsd32/freebsd32_misc.c Mon Dec 29 12:58:45 2008 (r186564) @@ -2019,7 +2019,6 @@ freebsd32_sysctl(struct thread *td, stru error = copyin(uap->name, name, uap->namelen * sizeof(int)); if (error) return (error); - mtx_lock(&Giant); if (uap->oldlenp) oldlen = fuword32(uap->oldlenp); else @@ -2028,12 +2027,10 @@ freebsd32_sysctl(struct thread *td, stru uap->old, &oldlen, 1, uap->new, uap->newlen, &j, SCTL_MASK32); if (error && error != ENOMEM) - goto done2; + return (error); if (uap->oldlenp) suword32(uap->oldlenp, j); -done2: - mtx_unlock(&Giant); - return (error); + return (0); } int Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Mon Dec 29 12:45:11 2008 (r186563) +++ head/sys/compat/linux/linux_misc.c Mon Dec 29 12:58:45 2008 (r186564) @@ -1682,7 +1682,6 @@ int linux_sethostname(struct thread *td, struct linux_sethostname_args *args) { int name[2]; - int error; #ifdef DEBUG if (ldebug(sethostname)) @@ -1691,18 +1690,14 @@ linux_sethostname(struct thread *td, str name[0] = CTL_KERN; name[1] = KERN_HOSTNAME; - mtx_lock(&Giant); - error = userland_sysctl(td, name, 2, 0, 0, 0, args->hostname, - args->len, 0, 0); - mtx_unlock(&Giant); - return (error); + return (userland_sysctl(td, name, 2, 0, 0, 0, args->hostname, + args->len, 0, 0)); } int linux_setdomainname(struct thread *td, struct linux_setdomainname_args *args) { int name[2]; - int error; #ifdef DEBUG if (ldebug(setdomainname)) @@ -1711,11 +1706,8 @@ linux_setdomainname(struct thread *td, s name[0] = CTL_KERN; name[1] = KERN_NISDOMAINNAME; - mtx_lock(&Giant); - error = userland_sysctl(td, name, 2, 0, 0, 0, args->name, - args->len, 0, 0); - mtx_unlock(&Giant); - return (error); + return (userland_sysctl(td, name, 2, 0, 0, 0, args->name, + args->len, 0, 0)); } int Modified: head/sys/i386/ibcs2/ibcs2_sysi86.c ============================================================================== --- head/sys/i386/ibcs2/ibcs2_sysi86.c Mon Dec 29 12:45:11 2008 (r186563) +++ head/sys/i386/ibcs2/ibcs2_sysi86.c Mon Dec 29 12:58:45 2008 (r186564) @@ -74,15 +74,11 @@ ibcs2_sysi86(struct thread *td, struct i case SETNAME: { /* set hostname given string w/ len <= 7 chars */ int name[2]; - int error; name[0] = CTL_KERN; name[1] = KERN_HOSTNAME; - mtx_lock(&Giant); - error = userland_sysctl(td, name, 2, 0, 0, 0, - args->arg, 7, 0, 0); - mtx_unlock(&Giant); - return (error); + return (userland_sysctl(td, name, 2, 0, 0, 0, + args->arg, 7, 0, 0)); } case SI86_MEM: /* size of physical memory */ Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Mon Dec 29 12:45:11 2008 (r186563) +++ head/sys/kern/kern_sysctl.c Mon Dec 29 12:58:45 2008 (r186564) @@ -71,6 +71,7 @@ static struct sx sysctllock; #define SYSCTL_LOCK() sx_xlock(&sysctllock) #define SYSCTL_UNLOCK() sx_xunlock(&sysctllock) +#define SYSCTL_LOCK_ASSERT() sx_assert(&sysctllock, SX_XLOCKED) #define SYSCTL_INIT() sx_init(&sysctllock, "sysctl lock") static int sysctl_root(SYSCTL_HANDLER_ARGS); @@ -686,6 +687,8 @@ name2oid (char *name, int *oid, int *len struct sysctl_oid_list *lsp = &sysctl__children; char *p; + SYSCTL_LOCK_ASSERT(); + if (!*name) return (ENOENT); @@ -742,6 +745,8 @@ sysctl_sysctl_name2oid(SYSCTL_HANDLER_AR int error, oid[CTL_MAXNAME], len; struct sysctl_oid *op = 0; + SYSCTL_LOCK_ASSERT(); + if (!req->newlen) return (ENOENT); if (req->newlen >= MAXPATHLEN) /* XXX arbitrary, undocumented */ @@ -1086,14 +1091,12 @@ kernel_sysctl(struct thread *td, int *na req.lock = REQ_LOCKED; SYSCTL_LOCK(); - error = sysctl_root(0, name, namelen, &req); + SYSCTL_UNLOCK(); if (req.lock == REQ_WIRED && req.validlen > 0) vsunlock(req.oldptr, req.validlen); - SYSCTL_UNLOCK(); - if (error && error != ENOMEM) return (error); @@ -1118,6 +1121,11 @@ kernel_sysctlbyname(struct thread *td, c oid[1] = 3; /* name2oid */ oidlen = sizeof(oid); + /* + * XXX: Prone to a possible race condition between lookup and + * execution? Maybe put locking around it? + */ + error = kernel_sysctl(td, oid, 2, oid, &oidlen, (void *)name, strlen(name), &plen, flags); if (error) @@ -1270,6 +1278,8 @@ sysctl_root(SYSCTL_HANDLER_ARGS) struct sysctl_oid *oid; int error, indx, lvl; + SYSCTL_LOCK_ASSERT(); + error = sysctl_find_oid(arg1, arg2, &oid, &indx, req); if (error) return (error); @@ -1324,7 +1334,11 @@ sysctl_root(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); #endif + + /* XXX: Handlers are not guaranteed to be Giant safe! */ + mtx_lock(&Giant); error = oid->oid_handler(oid, arg1, arg2, req); + mtx_unlock(&Giant); return (error); } @@ -1352,20 +1366,13 @@ __sysctl(struct thread *td, struct sysct if (error) return (error); - mtx_lock(&Giant); - error = userland_sysctl(td, name, uap->namelen, uap->old, uap->oldlenp, 0, uap->new, uap->newlen, &j, 0); if (error && error != ENOMEM) - goto done2; - if (uap->oldlenp) { - int i = copyout(&j, uap->oldlenp, sizeof(j)); - if (i) - error = i; - } -done2: - mtx_unlock(&Giant); + return (error); + if (uap->oldlenp) + error = copyout(&j, uap->oldlenp, sizeof(j)); return (error); } @@ -1426,12 +1433,12 @@ userland_sysctl(struct thread *td, int * uio_yield(); } - if (req.lock == REQ_WIRED && req.validlen > 0) - vsunlock(req.oldptr, req.validlen); - CURVNET_RESTORE(); SYSCTL_UNLOCK(); + if (req.lock == REQ_WIRED && req.validlen > 0) + vsunlock(req.oldptr, req.validlen); + if (error && error != ENOMEM) return (error); @@ -1519,8 +1526,6 @@ ogetkerninfo(struct thread *td, struct g size_t size; u_int needed = 0; - mtx_lock(&Giant); - switch (uap->op & 0xff00) { case KINFO_RT: @@ -1653,7 +1658,6 @@ ogetkerninfo(struct thread *td, struct g error = copyout(&size, uap->size, sizeof(size)); } } - mtx_unlock(&Giant); return (error); } #endif /* COMPAT_43 */ Modified: head/sys/kern/kern_xxx.c ============================================================================== --- head/sys/kern/kern_xxx.c Mon Dec 29 12:45:11 2008 (r186563) +++ head/sys/kern/kern_xxx.c Mon Dec 29 12:58:45 2008 (r186564) @@ -62,16 +62,12 @@ ogethostname(td, uap) struct gethostname_args *uap; { int name[2]; - int error; size_t len = uap->len; name[0] = CTL_KERN; name[1] = KERN_HOSTNAME; - mtx_lock(&Giant); - error = userland_sysctl(td, name, 2, uap->hostname, &len, - 1, 0, 0, 0, 0); - mtx_unlock(&Giant); - return(error); + return (userland_sysctl(td, name, 2, uap->hostname, &len, + 1, 0, 0, 0, 0)); } #ifndef _SYS_SYSPROTO_H_ @@ -91,11 +87,8 @@ osethostname(td, uap) name[0] = CTL_KERN; name[1] = KERN_HOSTNAME; - mtx_lock(&Giant); - error = userland_sysctl(td, name, 2, 0, 0, 0, uap->hostname, - uap->len, 0, 0); - mtx_unlock(&Giant); - return (error); + return (userland_sysctl(td, name, 2, 0, 0, 0, uap->hostname, + uap->len, 0, 0)); } #ifndef _SYS_SYSPROTO_H_ @@ -173,11 +166,10 @@ freebsd4_uname(struct thread *td, struct name[0] = CTL_KERN; name[1] = KERN_OSTYPE; len = sizeof (uap->name->sysname); - mtx_lock(&Giant); error = userland_sysctl(td, name, 2, uap->name->sysname, &len, 1, 0, 0, 0, 0); if (error) - goto done2; + return (error); subyte( uap->name->sysname + sizeof(uap->name->sysname) - 1, 0); name[1] = KERN_HOSTNAME; @@ -185,7 +177,7 @@ freebsd4_uname(struct thread *td, struct error = userland_sysctl(td, name, 2, uap->name->nodename, &len, 1, 0, 0, 0, 0); if (error) - goto done2; + return (error); subyte( uap->name->nodename + sizeof(uap->name->nodename) - 1, 0); name[1] = KERN_OSRELEASE; @@ -193,7 +185,7 @@ freebsd4_uname(struct thread *td, struct error = userland_sysctl(td, name, 2, uap->name->release, &len, 1, 0, 0, 0, 0); if (error) - goto done2; + return (error); subyte( uap->name->release + sizeof(uap->name->release) - 1, 0); /* @@ -202,7 +194,7 @@ freebsd4_uname(struct thread *td, struct error = userland_sysctl(td, name, 2, uap->name->version, &len, 1, 0, 0, 0, 0); if (error) - goto done2; + return (error); subyte( uap->name->version + sizeof(uap->name->version) - 1, 0); */ @@ -214,11 +206,11 @@ freebsd4_uname(struct thread *td, struct for(us = uap->name->version; *s && *s != ':'; s++) { error = subyte( us++, *s); if (error) - goto done2; + return (error); } error = subyte( us++, 0); if (error) - goto done2; + return (error); name[0] = CTL_HW; name[1] = HW_MACHINE; @@ -226,11 +218,9 @@ freebsd4_uname(struct thread *td, struct error = userland_sysctl(td, name, 2, uap->name->machine, &len, 1, 0, 0, 0, 0); if (error) - goto done2; + return (error); subyte( uap->name->machine + sizeof(uap->name->machine) - 1, 0); -done2: - mtx_unlock(&Giant); - return (error); + return (0); } #ifndef _SYS_SYSPROTO_H_ @@ -245,16 +235,12 @@ freebsd4_getdomainname(struct thread *td struct freebsd4_getdomainname_args *uap) { int name[2]; - int error; size_t len = uap->len; name[0] = CTL_KERN; name[1] = KERN_NISDOMAINNAME; - mtx_lock(&Giant); - error = userland_sysctl(td, name, 2, uap->domainname, &len, - 1, 0, 0, 0, 0); - mtx_unlock(&Giant); - return(error); + return (userland_sysctl(td, name, 2, uap->domainname, &len, + 1, 0, 0, 0, 0)); } #ifndef _SYS_SYSPROTO_H_ @@ -269,14 +255,10 @@ freebsd4_setdomainname(struct thread *td struct freebsd4_setdomainname_args *uap) { int name[2]; - int error; name[0] = CTL_KERN; name[1] = KERN_NISDOMAINNAME; - mtx_lock(&Giant); - error = userland_sysctl(td, name, 2, 0, 0, 0, uap->domainname, - uap->len, 0, 0); - mtx_unlock(&Giant); - return (error); + return (userland_sysctl(td, name, 2, 0, 0, 0, uap->domainname, + uap->len, 0, 0)); } #endif /* COMPAT_FREEBSD4 */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 13:25:58 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F23B21065670; Mon, 29 Dec 2008 13:25: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 D72A78FC0C; Mon, 29 Dec 2008 13:25:58 +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 mBTDPw9s058444; Mon, 29 Dec 2008 13:25:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBTDPwtm058443; Mon, 29 Dec 2008 13:25:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812291325.mBTDPwtm058443@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 29 Dec 2008 13:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186565 - head/sys/fs/pseudofs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 13:25:59 -0000 Author: kib Date: Mon Dec 29 13:25:58 2008 New Revision: 186565 URL: http://svn.freebsd.org/changeset/base/186565 Log: When the insmntque() in the pfs_vncache_alloc() fails, vop_reclaim calls pfs_vncache_free() that removes pvd from the list, while it is not yet put on the list. Prevent the invalid removal from the list by clearing pvd_next and pvd_prev for the newly allocated pvd, and only move pfs_vncache list head when the pvd was at the head. Suggested and approved by: des MFC after: 2 weeks Modified: head/sys/fs/pseudofs/pseudofs_vncache.c Modified: head/sys/fs/pseudofs/pseudofs_vncache.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs_vncache.c Mon Dec 29 12:58:45 2008 (r186564) +++ head/sys/fs/pseudofs/pseudofs_vncache.c Mon Dec 29 13:25:58 2008 (r186565) @@ -149,6 +149,7 @@ retry: /* nope, get a new one */ pvd = malloc(sizeof *pvd, M_PFSVNCACHE, M_WAITOK); + pvd->pvd_next = pvd->pvd_prev = NULL; error = getnewvnode("pseudofs", mp, &pfs_vnodeops, vpp); if (error) { free(pvd, M_PFSVNCACHE); @@ -245,7 +246,7 @@ pfs_vncache_free(struct vnode *vp) pvd->pvd_next->pvd_prev = pvd->pvd_prev; if (pvd->pvd_prev) pvd->pvd_prev->pvd_next = pvd->pvd_next; - else + else if (pfs_vncache == pvd) pfs_vncache = pvd->pvd_next; --pfs_vncache_entries; mtx_unlock(&pfs_vncache_mutex); From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 13:42:33 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8BAD1065674 for ; Mon, 29 Dec 2008 13:42:33 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 6ECB98FC08 for ; Mon, 29 Dec 2008 13:42:33 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id B89966D43F; Mon, 29 Dec 2008 13:42:32 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 8FC038448F; Mon, 29 Dec 2008 14:42:32 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: vadim_nuclight@mail.ru References: <200810311447.m9VElFtp083250@svn.freebsd.org> <20081101212937.D12448@delplex.bde.org> <20081201104920.4b001553.stas@FreeBSD.org> <864p1orvj0.fsf@ds4.des.no> <200812291301.mBTD1qZb056125@server.filona.x88.info> Date: Mon, 29 Dec 2008 14:42:32 +0100 In-Reply-To: <200812291301.mBTD1qZb056125@server.filona.x88.info> (Vadim Goncharov's message of "Mon, 29 Dec 2008 19:01:52 +0600") Message-ID: <86k59j5c8n.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r184509 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 13:42:33 -0000 Vadim Goncharov writes: > There are people and projects using it, inspired by, guess what? style(9)! > For example, me is one of them. What people do with style(9) outside FreeBSD is not FreeBSD's problem. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 14:59:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBB411065675; Mon, 29 Dec 2008 14:59:22 +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 9D9F98FC19; Mon, 29 Dec 2008 14:59:22 +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 mBTExMpX060161; Mon, 29 Dec 2008 14:59:22 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBTExMC8060160; Mon, 29 Dec 2008 14:59:22 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200812291459.mBTExMC8060160@svn.freebsd.org> From: "Simon L. Nielsen" Date: Mon, 29 Dec 2008 14:59:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186566 - head/usr.sbin/usbdevs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 14:59:22 -0000 Author: simon Date: Mon Dec 29 14:59:22 2008 New Revision: 186566 URL: http://svn.freebsd.org/changeset/base/186566 Log: Add missing -o to usage output. MFC after: 3 days Modified: head/usr.sbin/usbdevs/usbdevs.c Modified: head/usr.sbin/usbdevs/usbdevs.c ============================================================================== --- head/usr.sbin/usbdevs/usbdevs.c Mon Dec 29 13:25:58 2008 (r186565) +++ head/usr.sbin/usbdevs/usbdevs.c Mon Dec 29 14:59:22 2008 (r186566) @@ -65,7 +65,7 @@ int main(int, char **); void usage() { - fprintf(stderr, "usage: %s [-a addr] [-d] [-f dev] [-v]\n", + fprintf(stderr, "usage: %s [-a addr] [-d] [-f dev] [-o] [-v]\n", getprogname()); exit(1); } From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 18:42:53 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B229C106564A; Mon, 29 Dec 2008 18:42:53 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 71AE48FC13; Mon, 29 Dec 2008 18:42:53 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mBTIgW7u096286; Mon, 29 Dec 2008 11:42:32 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 29 Dec 2008 11:42:41 -0700 (MST) Message-Id: <20081229.114241.756909212.imp@bsdimp.com> To: rik@freebsd.org From: "M. Warner Losh" In-Reply-To: <200812271522.mBRFMMHY074982@svn.freebsd.org> References: <200812271522.mBRFMMHY074982@svn.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186520 - head/sys/dev/puc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 18:42:54 -0000 In message: <200812271522.mBRFMMHY074982@svn.freebsd.org> Roman Kurakin writes: : Author: rik : Date: Sat Dec 27 15:22:22 2008 : New Revision: 186520 : URL: http://svn.freebsd.org/changeset/base/186520 : : Log: : Add support for the Oxford OX16PCI958-based card. : : Note, that the patch provided with this card for the Linux states that : the card uses DEFAULT_RCLK * 2, while in fact it is '* 10'. So probably : we should also use the subdevice/subvendord here. For now just ignore : that fact. I've had problems with doing that on some Oxford based cards. The vendor that uses them doesn't set them up, so you can't tell my cardbus oxford card from the pcie oxford card that someone else sent me patches for: both with different clock multipliers... Warner From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 18:58:23 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EA74106566B; Mon, 29 Dec 2008 18:58:23 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C4CA8FC16; Mon, 29 Dec 2008 18:58:23 +0000 (UTC) (envelope-from rwatson@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 mBTIwNC4064462; Mon, 29 Dec 2008 18:58:23 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBTIwNed064453; Mon, 29 Dec 2008 18:58:23 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812291858.mBTIwNed064453@svn.freebsd.org> From: Robert Watson Date: Mon, 29 Dec 2008 18:58:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186567 - head/usr.bin/procstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 18:58:23 -0000 Author: rwatson Date: Mon Dec 29 18:58:22 2008 New Revision: 186567 URL: http://svn.freebsd.org/changeset/base/186567 Log: Include param.h instead of types.h before user.h so that the nested include of param.h can be removed from audit.h. MFC after: 3 weeks Modified: head/usr.bin/procstat/procstat.c head/usr.bin/procstat/procstat_args.c head/usr.bin/procstat/procstat_basic.c head/usr.bin/procstat/procstat_bin.c head/usr.bin/procstat/procstat_cred.c head/usr.bin/procstat/procstat_files.c head/usr.bin/procstat/procstat_kstack.c head/usr.bin/procstat/procstat_threads.c head/usr.bin/procstat/procstat_vm.c Modified: head/usr.bin/procstat/procstat.c ============================================================================== --- head/usr.bin/procstat/procstat.c Mon Dec 29 14:59:22 2008 (r186566) +++ head/usr.bin/procstat/procstat.c Mon Dec 29 18:58:22 2008 (r186567) @@ -26,7 +26,7 @@ * $FreeBSD$ */ -#include +#include #include #include Modified: head/usr.bin/procstat/procstat_args.c ============================================================================== --- head/usr.bin/procstat/procstat_args.c Mon Dec 29 14:59:22 2008 (r186566) +++ head/usr.bin/procstat/procstat_args.c Mon Dec 29 18:58:22 2008 (r186567) @@ -26,7 +26,7 @@ * $FreeBSD$ */ -#include +#include #include #include Modified: head/usr.bin/procstat/procstat_basic.c ============================================================================== --- head/usr.bin/procstat/procstat_basic.c Mon Dec 29 14:59:22 2008 (r186566) +++ head/usr.bin/procstat/procstat_basic.c Mon Dec 29 18:58:22 2008 (r186567) @@ -26,7 +26,7 @@ * $FreeBSD$ */ -#include +#include #include #include Modified: head/usr.bin/procstat/procstat_bin.c ============================================================================== --- head/usr.bin/procstat/procstat_bin.c Mon Dec 29 14:59:22 2008 (r186566) +++ head/usr.bin/procstat/procstat_bin.c Mon Dec 29 18:58:22 2008 (r186567) @@ -26,7 +26,7 @@ * $FreeBSD$ */ -#include +#include #include #include Modified: head/usr.bin/procstat/procstat_cred.c ============================================================================== --- head/usr.bin/procstat/procstat_cred.c Mon Dec 29 14:59:22 2008 (r186566) +++ head/usr.bin/procstat/procstat_cred.c Mon Dec 29 18:58:22 2008 (r186567) @@ -26,7 +26,7 @@ * $FreeBSD$ */ -#include +#include #include #include Modified: head/usr.bin/procstat/procstat_files.c ============================================================================== --- head/usr.bin/procstat/procstat_files.c Mon Dec 29 14:59:22 2008 (r186566) +++ head/usr.bin/procstat/procstat_files.c Mon Dec 29 18:58:22 2008 (r186567) @@ -26,7 +26,7 @@ * $FreeBSD$ */ -#include +#include #include #include #include Modified: head/usr.bin/procstat/procstat_kstack.c ============================================================================== --- head/usr.bin/procstat/procstat_kstack.c Mon Dec 29 14:59:22 2008 (r186566) +++ head/usr.bin/procstat/procstat_kstack.c Mon Dec 29 18:58:22 2008 (r186567) @@ -26,7 +26,7 @@ * $FreeBSD$ */ -#include +#include #include #include Modified: head/usr.bin/procstat/procstat_threads.c ============================================================================== --- head/usr.bin/procstat/procstat_threads.c Mon Dec 29 14:59:22 2008 (r186566) +++ head/usr.bin/procstat/procstat_threads.c Mon Dec 29 18:58:22 2008 (r186567) @@ -26,7 +26,7 @@ * $FreeBSD$ */ -#include +#include #include #include Modified: head/usr.bin/procstat/procstat_vm.c ============================================================================== --- head/usr.bin/procstat/procstat_vm.c Mon Dec 29 14:59:22 2008 (r186566) +++ head/usr.bin/procstat/procstat_vm.c Mon Dec 29 18:58:22 2008 (r186567) @@ -26,7 +26,7 @@ * $FreeBSD$ */ -#include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 18:59:50 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 868FB106566C; Mon, 29 Dec 2008 18:59:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 744D28FC08; Mon, 29 Dec 2008 18:59:50 +0000 (UTC) (envelope-from rwatson@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 mBTIxog9064521; Mon, 29 Dec 2008 18:59:50 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBTIxowt064520; Mon, 29 Dec 2008 18:59:50 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812291859.mBTIxowt064520@svn.freebsd.org> From: Robert Watson Date: Mon, 29 Dec 2008 18:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186568 - head/cddl/contrib/opensolaris/cmd/zinject X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 18:59:51 -0000 Author: rwatson Date: Mon Dec 29 18:59:50 2008 New Revision: 186568 URL: http://svn.freebsd.org/changeset/base/186568 Log: Include param.h instead of types.h before mount.h so that the nested include of param.h can be removed from audit.h. MFC after: 3 days Modified: head/cddl/contrib/opensolaris/cmd/zinject/zinject.c Modified: head/cddl/contrib/opensolaris/cmd/zinject/zinject.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zinject/zinject.c Mon Dec 29 18:58:22 2008 (r186567) +++ head/cddl/contrib/opensolaris/cmd/zinject/zinject.c Mon Dec 29 18:59:50 2008 (r186568) @@ -146,6 +146,7 @@ #include #include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 19:00:28 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAE70106566B; Mon, 29 Dec 2008 19:00:28 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B90BA8FC1C; Mon, 29 Dec 2008 19:00:28 +0000 (UTC) (envelope-from rwatson@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 mBTJ0Sxm064591; Mon, 29 Dec 2008 19:00:28 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBTJ0SBC064590; Mon, 29 Dec 2008 19:00:28 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812291900.mBTJ0SBC064590@svn.freebsd.org> From: Robert Watson Date: Mon, 29 Dec 2008 19:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186569 - head/usr.bin/fstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 19:00:29 -0000 Author: rwatson Date: Mon Dec 29 19:00:28 2008 New Revision: 186569 URL: http://svn.freebsd.org/changeset/base/186569 Log: Include param.h instead of types.h before mount.h so that the nested include of param.h can be removed from audit.h. MFC after: 3 weeks Modified: head/usr.bin/fstat/zfs.c Modified: head/usr.bin/fstat/zfs.c ============================================================================== --- head/usr.bin/fstat/zfs.c Mon Dec 29 18:59:50 2008 (r186568) +++ head/usr.bin/fstat/zfs.c Mon Dec 29 19:00:28 2008 (r186569) @@ -26,7 +26,7 @@ * $FreeBSD$ */ -#include +#include #define _KERNEL #include #undef _KERNEL From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 19:24:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FCD01065670; Mon, 29 Dec 2008 19:24:01 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C0E28FC1F; Mon, 29 Dec 2008 19:24:01 +0000 (UTC) (envelope-from ed@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 mBTJO1jH065044; Mon, 29 Dec 2008 19:24:01 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBTJO1lP065042; Mon, 29 Dec 2008 19:24:01 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200812291924.mBTJO1lP065042@svn.freebsd.org> From: Ed Schouten Date: Mon, 29 Dec 2008 19:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186570 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 19:24:01 -0000 Author: ed Date: Mon Dec 29 19:24:00 2008 New Revision: 186570 URL: http://svn.freebsd.org/changeset/base/186570 Log: Fix compilation. Also move ogetkerninfo() to kern_xxx.c. It seems I forgot to remove `int error' from a single piece of code. I'm also moving ogetkerninfo() to kern_xxx.c, because it belongs to the class of compat system information system calls, not the generic sysctl code. Modified: head/sys/kern/kern_sysctl.c head/sys/kern/kern_xxx.c Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Mon Dec 29 19:00:28 2008 (r186569) +++ head/sys/kern/kern_sysctl.c Mon Dec 29 19:24:00 2008 (r186570) @@ -1450,214 +1450,3 @@ userland_sysctl(struct thread *td, int * } return (error); } - -#ifdef COMPAT_43 -#include -#include - -#define KINFO_PROC (0<<8) -#define KINFO_RT (1<<8) -#define KINFO_VNODE (2<<8) -#define KINFO_FILE (3<<8) -#define KINFO_METER (4<<8) -#define KINFO_LOADAVG (5<<8) -#define KINFO_CLOCKRATE (6<<8) - -/* Non-standard BSDI extension - only present on their 4.3 net-2 releases */ -#define KINFO_BSDI_SYSINFO (101<<8) - -/* - * XXX this is bloat, but I hope it's better here than on the potentially - * limited kernel stack... -Peter - */ - -static struct { - int bsdi_machine; /* "i386" on BSD/386 */ -/* ^^^ this is an offset to the string, relative to the struct start */ - char *pad0; - long pad1; - long pad2; - long pad3; - u_long pad4; - u_long pad5; - u_long pad6; - - int bsdi_ostype; /* "BSD/386" on BSD/386 */ - int bsdi_osrelease; /* "1.1" on BSD/386 */ - long pad7; - long pad8; - char *pad9; - - long pad10; - long pad11; - int pad12; - long pad13; - quad_t pad14; - long pad15; - - struct timeval pad16; - /* we dont set this, because BSDI's uname used gethostname() instead */ - int bsdi_hostname; /* hostname on BSD/386 */ - - /* the actual string data is appended here */ - -} bsdi_si; - -/* - * this data is appended to the end of the bsdi_si structure during copyout. - * The "char *" offsets are relative to the base of the bsdi_si struct. - * This contains "FreeBSD\02.0-BUILT-nnnnnn\0i386\0", and these strings - * should not exceed the length of the buffer here... (or else!! :-) - */ -static char bsdi_strings[80]; /* It had better be less than this! */ - -#ifndef _SYS_SYSPROTO_H_ -struct getkerninfo_args { - int op; - char *where; - size_t *size; - int arg; -}; -#endif -int -ogetkerninfo(struct thread *td, struct getkerninfo_args *uap) -{ - int error, name[6]; - size_t size; - u_int needed = 0; - - switch (uap->op & 0xff00) { - - case KINFO_RT: - name[0] = CTL_NET; - name[1] = PF_ROUTE; - name[2] = 0; - name[3] = (uap->op & 0xff0000) >> 16; - name[4] = uap->op & 0xff; - name[5] = uap->arg; - error = userland_sysctl(td, name, 6, uap->where, uap->size, - 0, 0, 0, &size, 0); - break; - - case KINFO_VNODE: - name[0] = CTL_KERN; - name[1] = KERN_VNODE; - error = userland_sysctl(td, name, 2, uap->where, uap->size, - 0, 0, 0, &size, 0); - break; - - case KINFO_PROC: - name[0] = CTL_KERN; - name[1] = KERN_PROC; - name[2] = uap->op & 0xff; - name[3] = uap->arg; - error = userland_sysctl(td, name, 4, uap->where, uap->size, - 0, 0, 0, &size, 0); - break; - - case KINFO_FILE: - name[0] = CTL_KERN; - name[1] = KERN_FILE; - error = userland_sysctl(td, name, 2, uap->where, uap->size, - 0, 0, 0, &size, 0); - break; - - case KINFO_METER: - name[0] = CTL_VM; - name[1] = VM_TOTAL; - error = userland_sysctl(td, name, 2, uap->where, uap->size, - 0, 0, 0, &size, 0); - break; - - case KINFO_LOADAVG: - name[0] = CTL_VM; - name[1] = VM_LOADAVG; - error = userland_sysctl(td, name, 2, uap->where, uap->size, - 0, 0, 0, &size, 0); - break; - - case KINFO_CLOCKRATE: - name[0] = CTL_KERN; - name[1] = KERN_CLOCKRATE; - error = userland_sysctl(td, name, 2, uap->where, uap->size, - 0, 0, 0, &size, 0); - break; - - case KINFO_BSDI_SYSINFO: { - /* - * this is pretty crude, but it's just enough for uname() - * from BSDI's 1.x libc to work. - * - * *size gives the size of the buffer before the call, and - * the amount of data copied after a successful call. - * If successful, the return value is the amount of data - * available, which can be larger than *size. - * - * BSDI's 2.x product apparently fails with ENOMEM if *size - * is too small. - */ - - u_int left; - char *s; - - bzero((char *)&bsdi_si, sizeof(bsdi_si)); - bzero(bsdi_strings, sizeof(bsdi_strings)); - - s = bsdi_strings; - - bsdi_si.bsdi_ostype = (s - bsdi_strings) + sizeof(bsdi_si); - strcpy(s, ostype); - s += strlen(s) + 1; - - bsdi_si.bsdi_osrelease = (s - bsdi_strings) + sizeof(bsdi_si); - strcpy(s, osrelease); - s += strlen(s) + 1; - - bsdi_si.bsdi_machine = (s - bsdi_strings) + sizeof(bsdi_si); - strcpy(s, machine); - s += strlen(s) + 1; - - needed = sizeof(bsdi_si) + (s - bsdi_strings); - - if ((uap->where == NULL) || (uap->size == NULL)) { - /* process is asking how much buffer to supply.. */ - size = needed; - error = 0; - break; - } - - if ((error = copyin(uap->size, &size, sizeof(size))) != 0) - break; - - /* if too much buffer supplied, trim it down */ - if (size > needed) - size = needed; - - /* how much of the buffer is remaining */ - left = size; - - if ((error = copyout((char *)&bsdi_si, uap->where, left)) != 0) - break; - - /* is there any point in continuing? */ - if (left > sizeof(bsdi_si)) { - left -= sizeof(bsdi_si); - error = copyout(&bsdi_strings, - uap->where + sizeof(bsdi_si), left); - } - break; - } - - default: - error = EOPNOTSUPP; - break; - } - if (error == 0) { - td->td_retval[0] = needed ? needed : size; - if (uap->size) { - error = copyout(&size, uap->size, sizeof(size)); - } - } - return (error); -} -#endif /* COMPAT_43 */ Modified: head/sys/kern/kern_xxx.c ============================================================================== --- head/sys/kern/kern_xxx.c Mon Dec 29 19:00:28 2008 (r186569) +++ head/sys/kern/kern_xxx.c Mon Dec 29 19:24:00 2008 (r186570) @@ -42,10 +42,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #if defined(COMPAT_43) @@ -83,7 +85,6 @@ osethostname(td, uap) register struct sethostname_args *uap; { int name[2]; - int error; name[0] = CTL_KERN; name[1] = KERN_HOSTNAME; @@ -139,6 +140,212 @@ oquota(td, uap) return (ENOSYS); } + +#define KINFO_PROC (0<<8) +#define KINFO_RT (1<<8) +#define KINFO_VNODE (2<<8) +#define KINFO_FILE (3<<8) +#define KINFO_METER (4<<8) +#define KINFO_LOADAVG (5<<8) +#define KINFO_CLOCKRATE (6<<8) + +/* Non-standard BSDI extension - only present on their 4.3 net-2 releases */ +#define KINFO_BSDI_SYSINFO (101<<8) + +/* + * XXX this is bloat, but I hope it's better here than on the potentially + * limited kernel stack... -Peter + */ + +static struct { + int bsdi_machine; /* "i386" on BSD/386 */ +/* ^^^ this is an offset to the string, relative to the struct start */ + char *pad0; + long pad1; + long pad2; + long pad3; + u_long pad4; + u_long pad5; + u_long pad6; + + int bsdi_ostype; /* "BSD/386" on BSD/386 */ + int bsdi_osrelease; /* "1.1" on BSD/386 */ + long pad7; + long pad8; + char *pad9; + + long pad10; + long pad11; + int pad12; + long pad13; + quad_t pad14; + long pad15; + + struct timeval pad16; + /* we dont set this, because BSDI's uname used gethostname() instead */ + int bsdi_hostname; /* hostname on BSD/386 */ + + /* the actual string data is appended here */ + +} bsdi_si; + +/* + * this data is appended to the end of the bsdi_si structure during copyout. + * The "char *" offsets are relative to the base of the bsdi_si struct. + * This contains "FreeBSD\02.0-BUILT-nnnnnn\0i386\0", and these strings + * should not exceed the length of the buffer here... (or else!! :-) + */ +static char bsdi_strings[80]; /* It had better be less than this! */ + +#ifndef _SYS_SYSPROTO_H_ +struct getkerninfo_args { + int op; + char *where; + size_t *size; + int arg; +}; +#endif +int +ogetkerninfo(struct thread *td, struct getkerninfo_args *uap) +{ + int error, name[6]; + size_t size; + u_int needed = 0; + + switch (uap->op & 0xff00) { + + case KINFO_RT: + name[0] = CTL_NET; + name[1] = PF_ROUTE; + name[2] = 0; + name[3] = (uap->op & 0xff0000) >> 16; + name[4] = uap->op & 0xff; + name[5] = uap->arg; + error = userland_sysctl(td, name, 6, uap->where, uap->size, + 0, 0, 0, &size, 0); + break; + + case KINFO_VNODE: + name[0] = CTL_KERN; + name[1] = KERN_VNODE; + error = userland_sysctl(td, name, 2, uap->where, uap->size, + 0, 0, 0, &size, 0); + break; + + case KINFO_PROC: + name[0] = CTL_KERN; + name[1] = KERN_PROC; + name[2] = uap->op & 0xff; + name[3] = uap->arg; + error = userland_sysctl(td, name, 4, uap->where, uap->size, + 0, 0, 0, &size, 0); + break; + + case KINFO_FILE: + name[0] = CTL_KERN; + name[1] = KERN_FILE; + error = userland_sysctl(td, name, 2, uap->where, uap->size, + 0, 0, 0, &size, 0); + break; + + case KINFO_METER: + name[0] = CTL_VM; + name[1] = VM_TOTAL; + error = userland_sysctl(td, name, 2, uap->where, uap->size, + 0, 0, 0, &size, 0); + break; + + case KINFO_LOADAVG: + name[0] = CTL_VM; + name[1] = VM_LOADAVG; + error = userland_sysctl(td, name, 2, uap->where, uap->size, + 0, 0, 0, &size, 0); + break; + + case KINFO_CLOCKRATE: + name[0] = CTL_KERN; + name[1] = KERN_CLOCKRATE; + error = userland_sysctl(td, name, 2, uap->where, uap->size, + 0, 0, 0, &size, 0); + break; + + case KINFO_BSDI_SYSINFO: { + /* + * this is pretty crude, but it's just enough for uname() + * from BSDI's 1.x libc to work. + * + * *size gives the size of the buffer before the call, and + * the amount of data copied after a successful call. + * If successful, the return value is the amount of data + * available, which can be larger than *size. + * + * BSDI's 2.x product apparently fails with ENOMEM if *size + * is too small. + */ + + u_int left; + char *s; + + bzero((char *)&bsdi_si, sizeof(bsdi_si)); + bzero(bsdi_strings, sizeof(bsdi_strings)); + + s = bsdi_strings; + + bsdi_si.bsdi_ostype = (s - bsdi_strings) + sizeof(bsdi_si); + strcpy(s, ostype); + s += strlen(s) + 1; + + bsdi_si.bsdi_osrelease = (s - bsdi_strings) + sizeof(bsdi_si); + strcpy(s, osrelease); + s += strlen(s) + 1; + + bsdi_si.bsdi_machine = (s - bsdi_strings) + sizeof(bsdi_si); + strcpy(s, machine); + s += strlen(s) + 1; + + needed = sizeof(bsdi_si) + (s - bsdi_strings); + + if ((uap->where == NULL) || (uap->size == NULL)) { + /* process is asking how much buffer to supply.. */ + size = needed; + error = 0; + break; + } + + if ((error = copyin(uap->size, &size, sizeof(size))) != 0) + break; + + /* if too much buffer supplied, trim it down */ + if (size > needed) + size = needed; + + /* how much of the buffer is remaining */ + left = size; + + if ((error = copyout((char *)&bsdi_si, uap->where, left)) != 0) + break; + + /* is there any point in continuing? */ + if (left > sizeof(bsdi_si)) { + left -= sizeof(bsdi_si); + error = copyout(&bsdi_strings, + uap->where + sizeof(bsdi_si), left); + } + break; + } + + default: + error = EOPNOTSUPP; + break; + } + if (error == 0) { + td->td_retval[0] = needed ? needed : size; + if (uap->size) { + error = copyout(&size, uap->size, sizeof(size)); + } + } + return (error); +} #endif /* COMPAT_43 */ #ifdef COMPAT_FREEBSD4 From owner-svn-src-all@FreeBSD.ORG Mon Dec 29 20:50:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73BAB106564A; Mon, 29 Dec 2008 20:50:38 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 468D38FC32; Mon, 29 Dec 2008 20:50:38 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 360951A3C3D; Mon, 29 Dec 2008 12:50:38 -0800 (PST) Date: Mon, 29 Dec 2008 12:50:38 -0800 From: Alfred Perlstein To: Poul-Henning Kamp Message-ID: <20081229205038.GL20239@elvis.mu.org> References: <20081228053530.GF18389@elvis.mu.org> <32523.1230450781@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32523.1230450781@critter.freebsd.dk> User-Agent: Mutt/1.4.2.3i Cc: Scott Long , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , "mav@freebsd.org" , "M. Warner Losh" Subject: Re: svn commit: r186182 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2008 20:50:39 -0000 * Poul-Henning Kamp [081227 23:53] wrote: > In message <20081228053530.GF18389@elvis.mu.org>, Alfred Perlstein writes: > >* Scott Long [081226 18:34] wrote: > > >> I prefer to do nothing. It's not unsafe or erroneous to access cfg > >> registers. But if some kind of message does get added, I insist that > >> it drop all pretenses and say, "you're too poor to run freebsd, come > >> back when you can afford better hardware.". :) > > > >Well that could be the result of a driver that has a "bug" that > >makes it access cfg space when it does not need to, as what seems > >to have just been fixed. > > How about adding a counter and a rate warning under INVARIANTS ? Yeah, again it's one of those things that I think I understand at a high level, but I don't have the hands-on skills to do it in a timely manner. I'll look into it if people keep tripping over this. thank you, -Alfred From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 00:57:40 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C63A106566B; Tue, 30 Dec 2008 00:57:40 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF3698FC16; Tue, 30 Dec 2008 00:57:39 +0000 (UTC) (envelope-from obrien@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 mBU0vdks071574; Tue, 30 Dec 2008 00:57:39 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBU0vd9u071571; Tue, 30 Dec 2008 00:57:39 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200812300057.mBU0vd9u071571@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 30 Dec 2008 00:57:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186581 - in head/usr.sbin: sade sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 00:57:40 -0000 Author: obrien Date: Tue Dec 30 00:57:39 2008 New Revision: 186581 URL: http://svn.freebsd.org/changeset/base/186581 Log: Sound less scary about errorousous disk geometry due to wanting to limit to 65535 cylinders. Submitted by: Carlos A. M. dos Santos Modified: head/usr.sbin/sade/disks.c head/usr.sbin/sysinstall/disks.c head/usr.sbin/sysinstall/sysinstall.8 Modified: head/usr.sbin/sade/disks.c ============================================================================== --- head/usr.sbin/sade/disks.c Tue Dec 30 00:50:25 2008 (r186580) +++ head/usr.sbin/sade/disks.c Tue Dec 30 00:57:39 2008 (r186581) @@ -103,6 +103,47 @@ record_chunks(Disk *d) static daddr_t Total; static void +check_geometry(Disk *d) +{ + int sg; + +#ifdef PC98 + if (d->bios_cyl >= 65536 || d->bios_hd > 256 || d->bios_sect >= 256) +#else + if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) +#endif + { + dialog_clear_norefresh(); + sg = msgYesNo("WARNING: It is safe to use a geometry of %lu/%lu/%lu for %s on\n" + "computers with modern BIOS versions. If this disk is to be used\n" + "on rather old machines, however, it is recommended to ensure that\n" + "it does not have more than 65535 cylinders, or more than 255 heads\n" + "or more than " +#ifdef PC98 + "255" +#else + "63" +#endif + " sectors per track.\n" + "\n" + "Would you like that to keep using the current geometry?\n", + d->bios_cyl, d->bios_hd, d->bios_sect, d->name); + if (sg == 1) { + Sanitize_Bios_Geom(d); + msgConfirm("A geometry of %lu/%lu/%lu was calculated for %s.\n" + "\n" + "If you are not sure about this, please consult the Hardware Guide\n" + "in the Documentation submenu or use the (G)eometry command to\n" + "change it. Remember: you need to enter whatever your BIOS thinks\n" + "the geometry is! For IDE, it's what you were told in the BIOS\n" + "setup. For SCSI, it's the translation mode your controller is\n" + "using. Do NOT use a ``physical geometry''.\n", + d->bios_cyl, d->bios_hd, d->bios_sect, d->name); + } + } +} + +static void print_chunks(Disk *d, int u) { int row; @@ -116,26 +157,6 @@ print_chunks(Disk *d, int u) Total = 0; for (i = 0; chunk_info[i]; i++) Total += chunk_info[i]->size; -#ifdef PC98 - if (d->bios_cyl >= 65536 || d->bios_hd > 256 || d->bios_sect >= 256) { -#else - if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) { -#endif - dialog_clear_norefresh(); - msgConfirm("WARNING: A geometry of %lu/%lu/%lu for %s is incorrect. Using\n" - "a more likely geometry. If this geometry is incorrect or you\n" - "are unsure as to whether or not it's correct, please consult\n" - "the Hardware Guide in the Documentation submenu or use the\n" - "(G)eometry command to change it now.\n\n" - "Remember: you need to enter whatever your BIOS thinks the\n" - "geometry is! For IDE, it's what you were told in the BIOS\n" - "setup. For SCSI, it's the translation mode your controller is\n" - "using. Do NOT use a ``physical geometry''.", - d->bios_cyl, d->bios_hd, d->bios_sect, d->name); - Sanitize_Bios_Geom(d); - msgDebug("Sanitized geometry for %s is %lu/%lu/%lu.\n", - d->name, d->bios_cyl, d->bios_hd, d->bios_sect); - } attrset(A_NORMAL); mvaddstr(0, 0, "Disk name:\t"); clrtobot(); @@ -339,6 +360,9 @@ diskPartition(Device *dev) /* Set up the chunk array */ record_chunks(d); + /* Give the user a chance to sanitize the disk geometry, if necessary */ + check_geometry(d); + while (chunking) { char *val, geometry[80]; @@ -909,22 +933,25 @@ diskPartitionNonInteractive(Device *dev) record_chunks(d); cp = variable_get(VAR_GEOMETRY); if (cp) { - msgDebug("Setting geometry from script to: %s\n", cp); - d->bios_cyl = strtol(cp, &cp, 0); - d->bios_hd = strtol(cp + 1, &cp, 0); - d->bios_sect = strtol(cp + 1, 0, 0); - } - + if (!strcasecmp(cp, "sane")) { #ifdef PC98 - if (d->bios_cyl >= 65536 || d->bios_hd > 256 || d->bios_sect >= 256) { + if (d->bios_cyl >= 65536 || d->bios_hd > 256 || d->bios_sect >= 256) #else - if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) { + if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) #endif - msgDebug("Warning: A geometry of %lu/%lu/%lu for %s is incorrect.\n", - d->bios_cyl, d->bios_hd, d->bios_sect, d->name); - Sanitize_Bios_Geom(d); - msgDebug("Sanitized geometry for %s is %lu/%lu/%lu.\n", - d->name, d->bios_cyl, d->bios_hd, d->bios_sect); + { + msgDebug("Warning: A geometry of %lu/%lu/%lu for %s is incorrect.\n", + d->bios_cyl, d->bios_hd, d->bios_sect, d->name); + Sanitize_Bios_Geom(d); + msgDebug("Sanitized geometry for %s is %lu/%lu/%lu.\n", + d->name, d->bios_cyl, d->bios_hd, d->bios_sect); + } + } else { + msgDebug("Setting geometry from script to: %s\n", cp); + d->bios_cyl = strtol(cp, &cp, 0); + d->bios_hd = strtol(cp + 1, &cp, 0); + d->bios_sect = strtol(cp + 1, 0, 0); + } } cp = variable_get(VAR_PARTITION); Modified: head/usr.sbin/sysinstall/disks.c ============================================================================== --- head/usr.sbin/sysinstall/disks.c Tue Dec 30 00:50:25 2008 (r186580) +++ head/usr.sbin/sysinstall/disks.c Tue Dec 30 00:57:39 2008 (r186581) @@ -106,6 +106,47 @@ record_chunks(Disk *d) static daddr_t Total; static void +check_geometry(Disk *d) +{ + int sg; + +#ifdef PC98 + if (d->bios_cyl >= 65536 || d->bios_hd > 256 || d->bios_sect >= 256) +#else + if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) +#endif + { + dialog_clear_norefresh(); + sg = msgYesNo("WARNING: It is safe to use a geometry of %lu/%lu/%lu for %s on\n" + "computers with modern BIOS versions. If this disk is to be used\n" + "on rather old machines, however, it is recommended to ensure that\n" + "it does not have more than 65535 cylinders, or more than 255 heads\n" + "or more than " +#ifdef PC98 + "255" +#else + "63" +#endif + " sectors per track.\n" + "\n" + "Would you like that to keep using the current geometry?\n", + d->bios_cyl, d->bios_hd, d->bios_sect, d->name); + if (sg == 1) { + Sanitize_Bios_Geom(d); + msgConfirm("A geometry of %lu/%lu/%lu was calculated for %s.\n" + "\n" + "If you are not sure about this, please consult the Hardware Guide\n" + "in the Documentation submenu or use the (G)eometry command to\n" + "change it. Remember: you need to enter whatever your BIOS thinks\n" + "the geometry is! For IDE, it's what you were told in the BIOS\n" + "setup. For SCSI, it's the translation mode your controller is\n" + "using. Do NOT use a ``physical geometry''.\n", + d->bios_cyl, d->bios_hd, d->bios_sect, d->name); + } + } +} + +static void print_chunks(Disk *d, int u) { int row; @@ -119,24 +160,6 @@ print_chunks(Disk *d, int u) Total = 0; for (i = 0; chunk_info[i]; i++) Total += chunk_info[i]->size; -#ifdef PC98 - if (d->bios_cyl >= 65536 || d->bios_hd > 256 || d->bios_sect >= 256) { -#else - if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) { -#endif - dialog_clear_norefresh(); - msgConfirm("WARNING: A geometry of %lu/%lu/%lu for %s is incorrect. Using\n" - "a more likely geometry. If this geometry is incorrect or you\n" - "are unsure as to whether or not it's correct, please consult\n" - "the Hardware Guide in the Documentation submenu or use the\n" - "(G)eometry command to change it now.\n\n" - "Remember: you need to enter whatever your BIOS thinks the\n" - "geometry is! For IDE, it's what you were told in the BIOS\n" - "setup. For SCSI, it's the translation mode your controller is\n" - "using. Do NOT use a ``physical geometry''.", - d->bios_cyl, d->bios_hd, d->bios_sect, d->name); - Sanitize_Bios_Geom(d); - } attrset(A_NORMAL); mvaddstr(0, 0, "Disk name:\t"); clrtobot(); @@ -341,6 +364,9 @@ diskPartition(Device *dev) /* Set up the chunk array */ record_chunks(d); + /* Give the user a chance to sanitize the disk geometry, if necessary */ + check_geometry(d); + while (chunking) { char *val, geometry[80]; @@ -916,21 +942,24 @@ diskPartitionNonInteractive(Device *dev) record_chunks(d); cp = variable_get(VAR_GEOMETRY); if (cp) { - msgDebug("Setting geometry from script to: %s\n", cp); - d->bios_cyl = strtol(cp, &cp, 0); - d->bios_hd = strtol(cp + 1, &cp, 0); - d->bios_sect = strtol(cp + 1, 0, 0); - } else { + if (!strcasecmp(cp, "sane")) { #ifdef PC98 - if (d->bios_cyl >= 65536 || d->bios_hd > 256 || d->bios_sect >= 256) { + if (d->bios_cyl >= 65536 || d->bios_hd > 256 || d->bios_sect >= 256) #else - if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) { + if (d->bios_cyl > 65536 || d->bios_hd > 256 || d->bios_sect >= 64) #endif - msgDebug("Warning: A geometry of %lu/%lu/%lu for %s is incorrect.\n", - d->bios_cyl, d->bios_hd, d->bios_sect, d->name); - Sanitize_Bios_Geom(d); - msgDebug("Sanitized geometry for %s is %lu/%lu/%lu.\n", - d->name, d->bios_cyl, d->bios_hd, d->bios_sect); + { + msgDebug("Warning: A geometry of %lu/%lu/%lu for %s is incorrect.\n", + d->bios_cyl, d->bios_hd, d->bios_sect, d->name); + Sanitize_Bios_Geom(d); + msgDebug("Sanitized geometry for %s is %lu/%lu/%lu.\n", + d->name, d->bios_cyl, d->bios_hd, d->bios_sect); + } + } else { + msgDebug("Setting geometry from script to: %s\n", cp); + d->bios_cyl = strtol(cp, &cp, 0); + d->bios_hd = strtol(cp + 1, &cp, 0); + d->bios_sect = strtol(cp + 1, 0, 0); } } Modified: head/usr.sbin/sysinstall/sysinstall.8 ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.8 Tue Dec 30 00:50:25 2008 (r186580) +++ head/usr.sbin/sysinstall/sysinstall.8 Tue Dec 30 00:57:39 2008 (r186581) @@ -249,6 +249,12 @@ Invokes the disk partition (MBR) editor. .Bl -tag -width findx .It geometry The disk geometry, as a cyls/heads/sectors formatted string. +The word "sane" instructs +.Nm +to calculate a safe (not necessarily optimal) geometry if the +current one has more than 65535 cylinders, more than 256 heads or +more than 63 sectors per track (255 sectors on the PC98 +architecture). Default: no change to geometry. .It partition From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 01:33:16 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29754106566C; Tue, 30 Dec 2008 01:33:16 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19DB08FC1B; Tue, 30 Dec 2008 01:33:16 +0000 (UTC) (envelope-from obrien@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 mBU1XFM2072237; Tue, 30 Dec 2008 01:33:15 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBU1XFlb072236; Tue, 30 Dec 2008 01:33:15 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200812300133.mBU1XFlb072236@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 30 Dec 2008 01:33:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186582 - head/usr.sbin/gssd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 01:33:16 -0000 Author: obrien Date: Tue Dec 30 01:33:15 2008 New Revision: 186582 URL: http://svn.freebsd.org/changeset/base/186582 Log: Add gssd.h to the list of SRCS so one can build without 'make depend' first. Modified: head/usr.sbin/gssd/Makefile Modified: head/usr.sbin/gssd/Makefile ============================================================================== --- head/usr.sbin/gssd/Makefile Tue Dec 30 00:57:39 2008 (r186581) +++ head/usr.sbin/gssd/Makefile Tue Dec 30 01:33:15 2008 (r186582) @@ -2,7 +2,7 @@ PROG= gssd MAN= gssd.8 -SRCS= gssd.c gssd_svc.c gssd_xdr.c gssd_prot.c +SRCS= gssd.c gssd.h gssd_svc.c gssd_xdr.c gssd_prot.c CFLAGS+= -I. WARNS?= 1 From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 04:46:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DFBF106566B; Tue, 30 Dec 2008 04:46:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D22F8FC17; Tue, 30 Dec 2008 04:46:25 +0000 (UTC) (envelope-from imp@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 mBU4kPim076321; Tue, 30 Dec 2008 04:46:25 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBU4kPPg076320; Tue, 30 Dec 2008 04:46:25 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812300446.mBU4kPPg076320@svn.freebsd.org> From: Warner Losh Date: Tue, 30 Dec 2008 04:46:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186586 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 04:46:26 -0000 Author: imp Date: Tue Dec 30 04:46:25 2008 New Revision: 186586 URL: http://svn.freebsd.org/changeset/base/186586 Log: Bump the odometer of the years. A little early this year for 7.1R. Modified: head/COPYRIGHT Modified: head/COPYRIGHT ============================================================================== --- head/COPYRIGHT Tue Dec 30 04:38:39 2008 (r186585) +++ head/COPYRIGHT Tue Dec 30 04:46:25 2008 (r186586) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (C) 1992-2008 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2009 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 04:48:59 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B62A106564A; Tue, 30 Dec 2008 04:48:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A6608FC0C; Tue, 30 Dec 2008 04:48:59 +0000 (UTC) (envelope-from imp@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 mBU4mxMR076397; Tue, 30 Dec 2008 04:48:59 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBU4mxSu076396; Tue, 30 Dec 2008 04:48:59 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812300448.mBU4mxSu076396@svn.freebsd.org> From: Warner Losh Date: Tue, 30 Dec 2008 04:48:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186587 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 04:48:59 -0000 Author: imp Date: Tue Dec 30 04:48:59 2008 New Revision: 186587 URL: http://svn.freebsd.org/changeset/base/186587 Log: Bump the odometer of the years, this time a bit early for 7.1R. Modified: head/sys/sys/copyright.h Modified: head/sys/sys/copyright.h ============================================================================== --- head/sys/sys/copyright.h Tue Dec 30 04:46:25 2008 (r186586) +++ head/sys/sys/copyright.h Tue Dec 30 04:48:59 2008 (r186587) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2008 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2009 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2008 The FreeBSD Project.\n" + "Copyright (c) 1992-2009 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 05:04:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 492FC106564A; Tue, 30 Dec 2008 05:04:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36A228FC1D; Tue, 30 Dec 2008 05:04:07 +0000 (UTC) (envelope-from imp@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 mBU547f1076910; Tue, 30 Dec 2008 05:04:07 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBU5475u076909; Tue, 30 Dec 2008 05:04:07 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812300504.mBU5475u076909@svn.freebsd.org> From: Warner Losh Date: Tue, 30 Dec 2008 05:04: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: r186589 - stable/7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 05:04:07 -0000 Author: imp Date: Tue Dec 30 05:04:06 2008 New Revision: 186589 URL: http://svn.freebsd.org/changeset/base/186589 Log: MFC: Merge copyright bump. Approved by: re@ (kensmith) Modified: stable/7/COPYRIGHT (contents, props changed) Modified: stable/7/COPYRIGHT ============================================================================== --- stable/7/COPYRIGHT Tue Dec 30 05:00:10 2008 (r186588) +++ stable/7/COPYRIGHT Tue Dec 30 05:04:06 2008 (r186589) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (C) 1992-2008 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2009 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 05:08:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8916106566C; Tue, 30 Dec 2008 05:08:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A63BC8FC1A; Tue, 30 Dec 2008 05:08:05 +0000 (UTC) (envelope-from imp@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 mBU585PZ077033; Tue, 30 Dec 2008 05:08:05 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBU585gV077032; Tue, 30 Dec 2008 05:08:05 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812300508.mBU585gV077032@svn.freebsd.org> From: Warner Losh Date: Tue, 30 Dec 2008 05:08: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: r186590 - stable/7/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 05:08:06 -0000 Author: imp Date: Tue Dec 30 05:08:05 2008 New Revision: 186590 URL: http://svn.freebsd.org/changeset/base/186590 Log: Merge copyright bump. Approved by: re@ (kensmith) Modified: stable/7/sys/sys/copyright.h (contents, props changed) Modified: stable/7/sys/sys/copyright.h ============================================================================== --- stable/7/sys/sys/copyright.h Tue Dec 30 05:04:06 2008 (r186589) +++ stable/7/sys/sys/copyright.h Tue Dec 30 05:08:05 2008 (r186590) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2008 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2009 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2008 The FreeBSD Project.\n" + "Copyright (c) 1992-2009 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 05:36:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 302EC106566B; Tue, 30 Dec 2008 05:36:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D8B18FC1C; Tue, 30 Dec 2008 05:36:19 +0000 (UTC) (envelope-from imp@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 mBU5aJSn078450; Tue, 30 Dec 2008 05:36:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBU5aJYS078449; Tue, 30 Dec 2008 05:36:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812300536.mBU5aJYS078449@svn.freebsd.org> From: Warner Losh Date: Tue, 30 Dec 2008 05:36:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186595 - releng/7.1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 05:36:19 -0000 Author: imp Date: Tue Dec 30 05:36:18 2008 New Revision: 186595 URL: http://svn.freebsd.org/changeset/base/186595 Log: Merge bump of copyright. Approved by: re@ (kensmith) Modified: releng/7.1/COPYRIGHT (contents, props changed) Modified: releng/7.1/COPYRIGHT ============================================================================== --- releng/7.1/COPYRIGHT Tue Dec 30 05:36:13 2008 (r186594) +++ releng/7.1/COPYRIGHT Tue Dec 30 05:36:18 2008 (r186595) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (C) 1992-2008 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2009 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 05:37:40 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 537FE106566B; Tue, 30 Dec 2008 05:37:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 411068FC0C; Tue, 30 Dec 2008 05:37:40 +0000 (UTC) (envelope-from imp@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 mBU5be3U078537; Tue, 30 Dec 2008 05:37:40 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBU5beo6078536; Tue, 30 Dec 2008 05:37:40 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812300537.mBU5beo6078536@svn.freebsd.org> From: Warner Losh Date: Tue, 30 Dec 2008 05:37:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186596 - releng/7.1/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 05:37:40 -0000 Author: imp Date: Tue Dec 30 05:37:39 2008 New Revision: 186596 URL: http://svn.freebsd.org/changeset/base/186596 Log: Bump year. Approved by: re@ (kensmith) Modified: releng/7.1/sys/sys/copyright.h (contents, props changed) Modified: releng/7.1/sys/sys/copyright.h ============================================================================== --- releng/7.1/sys/sys/copyright.h Tue Dec 30 05:36:18 2008 (r186595) +++ releng/7.1/sys/sys/copyright.h Tue Dec 30 05:37:39 2008 (r186596) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2008 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2009 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2008 The FreeBSD Project.\n" + "Copyright (c) 1992-2009 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 08:57:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 405751065673 for ; Tue, 30 Dec 2008 08:57:05 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: from andxor.it (relay.andxor.it [195.223.2.3]) by mx1.freebsd.org (Postfix) with SMTP id 7644F8FC1B for ; Tue, 30 Dec 2008 08:57:04 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: (qmail 43255 invoked from network); 30 Dec 2008 08:30:22 -0000 Received: from unknown (HELO ale.andxor.it) (192.168.2.5) by andxor.it with SMTP; 30 Dec 2008 08:30:22 -0000 Message-ID: <4959DC1D.2040302@FreeBSD.org> Date: Tue, 30 Dec 2008 09:30:21 +0100 From: Alex Dupre User-Agent: Thunderbird 2.0.0.17 (X11/20080929) MIME-Version: 1.0 To: "M. Warner Losh" References: <200812271522.mBRFMMHY074982@svn.freebsd.org> <20081229.114241.756909212.imp@bsdimp.com> In-Reply-To: <20081229.114241.756909212.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: rik@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186520 - head/sys/dev/puc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 08:57:05 -0000 M. Warner Losh ha scritto: > I've had problems with doing that on some Oxford based cards. The > vendor that uses them doesn't set them up, so you can't tell my > cardbus oxford card from the pcie oxford card that someone else sent > me patches for: both with different clock multipliers... I think you are referring to me, check the thread "uart and Oxford". For the records: http://www.softio.com/ic0659kb.htm uart0@pci3:0:0: class=0x070006 card=0x00011415 chip=0x950b1415 rev=0x00 hdr=0x00 vendor = 'Oxford Semiconductor Ltd' device = 'OXCB950 Integrated High Performance UART (CardBus/PCI Interface)' class = simple comms subclass = UART To use it I had to apply the following patch to uart_bus_pci.c -{ 0x1415, 0x950b, 0xffff, 0, "Oxford Semiconductor OXCB950 Cardbus 16950 UART", 0x10, 16384000 }, +{ 0x1415, 0x950b, 0xffff, 0, "Oxford Semiconductor OXCB950 Cardbus 16950 UART", 0x10 }, -- Alex Dupre From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 09:40:51 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 595EE106564A; Tue, 30 Dec 2008 09:40:51 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 482A68FC19; Tue, 30 Dec 2008 09:40:51 +0000 (UTC) (envelope-from luigi@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 mBU9epxx086196; Tue, 30 Dec 2008 09:40:51 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBU9epuS086194; Tue, 30 Dec 2008 09:40:51 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200812300940.mBU9epuS086194@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 30 Dec 2008 09:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186598 - head/sys/boot/i386/boot0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 09:40:51 -0000 Author: luigi Date: Tue Dec 30 09:40:50 2008 New Revision: 186598 URL: http://svn.freebsd.org/changeset/base/186598 Log: A number of small changes to make the 'save choice to disk' safer, and re-enable it as default. In particular: + re-enable the 'update' flag in the Makefile (of course!); + commit Warner's patch "orb $NOUPDATE,_FLAGS(%bp)" to avoid writing to disk in case of a timeout/default choice; + fix an off-by-one count in the partition scan code that would print the wrong name for unknown partitions; + unconditionally change the boot prompt to 'Boot:' instead of 'Default:' to make room for the extra code/checks/messages. Some of the changes listed below are also made to save space; + rearrange and fix comments for known partition types. Right now we explicitly recognise *BSD, Linux, FAT16 (type 6, used on many USB keys), NTFS (type 7), FAT32 (type 11). Depending on other options we also recognise Extended (type 5), FAT12 (type 1) and FAT16 < 32MB (type 4). + Add an entry "F6 PXE" when the code is built with -DPXE (which is a default now). Technically, F6 boots through INT18, so the prompt 'PXE' is a bit misleading. Unfortunately the name INT18 is too long and does not fit in - we could use ROM perhaps. The reason I picked 'PXE' is that on many (I believe) new systems INT18 calls PXE. Apart from the choice of the name for PXE/ROM/INT18, this should close pending issues on the 1-sector boot0 code and we should be able to move the code to RELENG_7 when it reopens. No boot0cfg changes are necessary. MFC after: 3 weeks Modified: head/sys/boot/i386/boot0/Makefile head/sys/boot/i386/boot0/boot0.S Modified: head/sys/boot/i386/boot0/Makefile ============================================================================== --- head/sys/boot/i386/boot0/Makefile Tue Dec 30 08:06:03 2008 (r186597) +++ head/sys/boot/i386/boot0/Makefile Tue Dec 30 09:40:50 2008 (r186598) @@ -30,7 +30,7 @@ CFLAGS += ${OPTS} # with the one in the boot sector. # Default boot flags: -BOOT_BOOT0_FLAGS?= 0xcf +BOOT_BOOT0_FLAGS?= 0x8f # The number of timer ticks to wait for a keypress before assuming the default # selection. Since there are 18.2 ticks per second, the default value of Modified: head/sys/boot/i386/boot0/boot0.S ============================================================================== --- head/sys/boot/i386/boot0/boot0.S Tue Dec 30 08:06:03 2008 (r186597) +++ head/sys/boot/i386/boot0/boot0.S Tue Dec 30 09:40:50 2008 (r186598) @@ -22,6 +22,7 @@ #endif #ifdef PXE /* enable PXE/INT18 booting with F6 */ +#define SAVE_MORE_MEMORY #endif #ifdef CHECK_DRIVE /* make sure we boot from a HD. */ @@ -274,10 +275,11 @@ read_entry: movb %ch,-0x4(%bx) # Zero a * Scan the table of bootable ids, which starts at %di and has * length TLEN. On a match, %di points to the element following the * match; the corresponding offset to the description is $(TLEN-1) - * bytes ahead. If we don't find a match, we hit the 'unknown' entry. + * bytes ahead. We use a count of TLEN+1 so if we don't find a match + * within the first TLEN entries, we hit the 'unknown' entry. */ movw $bootable_ids,%di # Lookup tables - movb $(TLEN),%cl # Number of entries + movb $(TLEN+1),%cl # Number of entries repne # Locate scasb # type /* @@ -324,7 +326,7 @@ print_drive: addb $'0'|0x80,%al # Save callw putx # item /* * Menu is complete, display a prompt followed by current selection. - * 'decw %si' makes the register point to the space after 'Default: ' + * 'decw %si' makes the register point to the space after 'Boot: ' * so we do not see an extra CRLF on the screen. */ print_prompt: movw $prompt,%si # Display @@ -371,6 +373,7 @@ read_key: * Timed out or default selection */ use_default: movb _OPT(%bp),%al # Load default + orb $NOUPDATE,_FLAGS(%bp) # Disable updates jmp check_selection # Join common code /* @@ -585,13 +588,12 @@ intx13: # Prepare CHS parameters * Various menu strings. 'item' goes after 'prompt' to save space. * Also use shorter versions to make room for the PXE/INT18 code. */ +prompt: #ifdef PXE -prompt: .ascii "\nBoot:" -item: .ascii " "; .byte ' '|0x80 -#else -prompt: .ascii "\nDefault:" -item: .ascii " "; .byte ' '|0x80 + .ascii "\nF6 PXE\r" #endif + .ascii "\nBoot:" +item: .ascii " "; .byte ' '|0x80 crlf: .ascii "\r"; .byte '\n'|0x80 /* Partition type tables */ @@ -602,13 +604,13 @@ bootable_ids: * Corresponding descriptions are at desc_ofs: * Entries don't need to be sorted. */ - .byte 0x1, 0x6, 0x7, 0xb, 0xc -#ifndef SAVE_MEMORY - .byte 0xe -#endif - .byte 0x83, 0xa5, 0xa6, 0xa9, 0x4 + .byte 0x83, 0xa5, 0xa6, 0xa9, 0x06, 0x07, 0x0b #ifndef SAVE_MORE_MEMORY - .byte 0x5, 0xf + .byte 0x05 # extended partition +#endif +#ifndef SAVE_MEMORY /* other DOS partitions */ + .byte 0x01 # FAT12 + .byte 0x04 # FAT16 < 32M #endif desc_ofs: @@ -617,24 +619,21 @@ desc_ofs: * actual partition name. The last entry must point to os_misc, * which is used for non-matching names. */ - .byte os_dos-. # 1, FAT12 DOS - .byte os_dos-. # 6, FAT16 <32M, DOS/WIN - .byte os_win-. # 7, FAT16 >=32M Windows - .byte os_win-. # 11, FAT32 - .byte os_win-. # 12, FAT32-LBA -#ifndef SAVE_MEMORY - .byte os_win-. # 14, FAT16-LBA -#endif .byte os_linux-. # 131, Linux .byte os_freebsd-. # 165, FreeBSD .byte os_bsd-. # 166, OpenBSD .byte os_bsd-. # 169, NetBSD - .byte os_dos-. # 4, FAT16 < 32M + .byte os_dos-. # 6, FAT16 >= 32M + .byte os_win-. # 7, NTFS + .byte os_win-. # 11, FAT32 + #ifndef SAVE_MORE_MEMORY .byte os_ext-. # 5, DOS Ext - .byte os_ext-. # 15, DOS Ext-LBA #endif - +#ifndef SAVE_MEMORY + .byte os_dos-. # 1, FAT12 DOS + .byte os_dos-. # 4, FAT16 <32M +#endif .byte os_misc-. # Unknown /* @@ -643,10 +642,10 @@ desc_ofs: */ os_misc: .byte '?'|0x80 os_dos: -#ifndef SAVE_MEMORY /* DOS string only if room */ +#ifndef SAVE_MORE_MEMORY /* 'DOS' remapped to 'WIN' if no room */ .ascii "DO"; .byte 'S'|0x80 #endif -os_win: .ascii "WI"; .byte 'N'|0x80 +os_win: .ascii "Wi"; .byte 'n'|0x80 os_linux: .ascii "Linu"; .byte 'x'|0x80 os_freebsd: .ascii "Free" os_bsd: .ascii "BS"; .byte 'D'|0x80 From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 09:43:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25B4C106564A; Tue, 30 Dec 2008 09:43:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 14C438FC13; Tue, 30 Dec 2008 09:43:02 +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 mBU9h1sm086343; Tue, 30 Dec 2008 09:43:01 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBU9h1DZ086342; Tue, 30 Dec 2008 09:43:01 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200812300943.mBU9h1DZ086342@svn.freebsd.org> From: Alexander Motin Date: Tue, 30 Dec 2008 09:43:01 +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: r186599 - stable/6/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 09:43:02 -0000 Author: mav Date: Tue Dec 30 09:43:01 2008 New Revision: 186599 URL: http://svn.freebsd.org/changeset/base/186599 Log: MFC rev. 1.227 ng_node and ng_worklist locks both migrated from being spinning locks to adaptive mutexes. Let witness(4) calm down and bring proper types of those locks to the lock order database. Modified: stable/6/sys/kern/subr_witness.c Modified: stable/6/sys/kern/subr_witness.c ============================================================================== --- stable/6/sys/kern/subr_witness.c Tue Dec 30 09:40:50 2008 (r186598) +++ stable/6/sys/kern/subr_witness.c Tue Dec 30 09:43:01 2008 (r186599) @@ -349,6 +349,12 @@ static struct witness_order_list_entry o { "so_snd", &lock_class_mtx_sleep }, { NULL, NULL }, /* + * Netgraph + */ + { "ng_node", &lock_class_mtx_sleep }, + { "ng_worklist", &lock_class_mtx_sleep }, + { NULL, NULL }, + /* * CDEV */ { "system map", &lock_class_mtx_sleep }, @@ -370,8 +376,6 @@ static struct witness_order_list_entry o { "uart_hwmtx", &lock_class_mtx_spin }, { "sabtty", &lock_class_mtx_spin }, { "zstty", &lock_class_mtx_spin }, - { "ng_node", &lock_class_mtx_spin }, - { "ng_worklist", &lock_class_mtx_spin }, { "fast_taskqueue", &lock_class_mtx_spin }, { "intr table", &lock_class_mtx_spin }, { "sleepq chain", &lock_class_mtx_spin }, From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 11:12:33 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1B091065673; Tue, 30 Dec 2008 11:12:33 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 2D01A8FC16; Tue, 30 Dec 2008 11:12:32 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id D1BF86D449; Tue, 30 Dec 2008 11:12:31 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id BB07C84460; Tue, 30 Dec 2008 12:12:31 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "M. Warner Losh" References: <200812271507.mBRF7pkv074681@svn.freebsd.org> <20081227150827.D97918@maildrop.int.zabbadoz.net> <26259E4E-6E26-4DAE-8046-80C7C46B7CD5@gmail.com> <20081227.193308.255407637.imp@bsdimp.com> Date: Tue, 30 Dec 2008 12:12:31 +0100 In-Reply-To: <20081227.193308.255407637.imp@bsdimp.com> (M. Warner Losh's message of "Sat, 27 Dec 2008 19:33:08 -0700 (MST)") Message-ID: <86r63p5334.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@FreeBSD.org, yanefbsd@gmail.com, svn-src-all@FreeBSD.org, bz@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186519 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 11:12:34 -0000 "M. Warner Losh" writes: > Still working on a solution that's correct and mutually acceptable to > DES. i think the ball is in my court. No, it's a build system issue. If it's in anyone's court, it would be ru@'s. The problem is that we need to use different CFLAGS for .o and .So. The quick and dirty fix is to override the .c.o rule for PAM modules: Index: /home/des/freebsd/base/head/lib/libpam/modules/Makefile.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- /home/des/freebsd/base/head/lib/libpam/modules/Makefile.inc (revision 1= 86063) +++ /home/des/freebsd/base/head/lib/libpam/modules/Makefile.inc (working co= py) @@ -19,4 +19,7 @@ LDADD+=3D -lpam .endif =20 +.c.o: + ${CC} ${CFLAGS} -DOPENPAM_STATIC_MODULES -c ${.IMPSRC} + .include "../Makefile.inc" A cleaner but more intrusive fix would be to add STATIC_CFLAGS and SHARED_CFLAGS variables: Index: lib/libpam/modules/Makefile.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/libpam/modules/Makefile.inc (revision 186599) +++ lib/libpam/modules/Makefile.inc (working copy) @@ -6,6 +6,7 @@ NO_PROFILE=3D =20 CFLAGS+=3D -I${PAMDIR}/include -I${.CURDIR}/../../libpam +STATIC_CFLAGS+=3D -DOPENPAM_STATIC_MODULES WARNS?=3D 4 =20 # This is nasty. Index: share/mk/bsd.lib.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- share/mk/bsd.lib.mk (revision 186063) +++ share/mk/bsd.lib.mk (working copy) @@ -54,9 +54,9 @@ =20 .if !defined(PICFLAG) .if ${MACHINE_ARCH} =3D=3D "sparc64" -PICFLAG=3D-fPIC +PICFLAG=3D-fPIC -DPIC .else -PICFLAG=3D-fpic +PICFLAG=3D-fpic -DPIC .endif .endif =20 @@ -73,7 +73,7 @@ .endif =20 .c.So: - ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CC} ${PICFLAG} ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif @@ -82,7 +82,7 @@ ${CXX} ${PO_FLAG} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} =20 .cc.So .C.So .cpp.So .cxx.So: - ${CXX} ${PICFLAG} -DPIC ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CXX} ${PICFLAG} ${SHARED_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARG= ET} =20 .f.po: ${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC} @@ -121,7 +121,7 @@ .endif =20 .asm.So: - ${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} \ + ${CC} -x assembler-with-cpp ${PICFLAG} ${SHARED_CFLAGS} ${CFLAGS} \ -c ${.IMPSRC} -o ${.TARGET} .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} @@ -134,7 +134,7 @@ .endif =20 .S.So: - ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} + ${CC} ${PICFLAG} ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif Index: share/mk/sys.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- share/mk/sys.mk (revision 186063) +++ share/mk/sys.mk (working copy) @@ -159,7 +159,7 @@ # DOUBLE SUFFIX RULES =20 .c.o: - ${CC} ${CFLAGS} -c ${.IMPSRC} + ${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif @@ -172,7 +172,7 @@ =20 .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} - ${CC} ${CFLAGS} -c y.tab.c + ${CC} ${STATIC_CFLAGS} ${CFLAGS} -c y.tab.c rm -f y.tab.c mv y.tab.o ${.TARGET} .if defined(CTFCONVERT) @@ -181,7 +181,7 @@ =20 .l.o: ${LEX} ${LFLAGS} ${.IMPSRC} - ${CC} ${CFLAGS} -c lex.yy.c + ${CC} ${STATIC_CFLAGS} ${CFLAGS} -c lex.yy.c rm -f lex.yy.c mv lex.yy.o ${.TARGET} .if defined(CTFCONVERT) @@ -197,7 +197,7 @@ mv lex.yy.c ${.TARGET} =20 .c.a: - ${CC} ${CFLAGS} -c ${.IMPSRC} + ${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} ${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o rm -f ${.PREFIX}.o =20 @@ -229,16 +229,16 @@ .endif =20 .c.o: - ${CC} ${CFLAGS} -c ${.IMPSRC} + ${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif =20 .cc .cpp .cxx .C: - ${CXX} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} + ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o = ${.TARGET} =20 .cc.o .cpp.o .cxx.o .C.o: - ${CXX} ${CXXFLAGS} -c ${.IMPSRC} + ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} =20 .m.o: ${OBJC} ${OBJCFLAGS} -c ${.IMPSRC} @@ -260,13 +260,13 @@ ${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} -c ${.IMPSRC} =20 .S.o: - ${CC} ${CFLAGS} -c ${.IMPSRC} + ${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif =20 .asm.o: - ${CC} -x assembler-with-cpp ${CFLAGS} -c ${.IMPSRC} + ${CC} -x assembler-with-cpp ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif @@ -280,7 +280,7 @@ # XXX not -j safe .y.o: ${YACC} ${YFLAGS} ${.IMPSRC} - ${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET} + ${CC} ${STATIC_CFLAGS} ${CFLAGS} -c y.tab.c -o ${.TARGET} rm -f y.tab.c .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} @@ -303,7 +303,7 @@ ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.TARGET} =20 .s.out .c.out .o.out: - ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} + ${CC} ${STATIC_CFLAGS} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TA= RGET} .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .endif @@ -319,7 +319,7 @@ # XXX not -j safe .y.out: ${YACC} ${YFLAGS} ${.IMPSRC} - ${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET} + ${CC} ${STATIC_CFLAGS} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.T= ARGET} rm -f y.tab.c .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} @@ -327,7 +327,7 @@ =20 .l.out: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c - ${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET} + ${CC} ${STATIC_CFLAGS} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -l= l -o ${.TARGET} rm -f ${.PREFIX}.tmp.c .if defined(CTFCONVERT) ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 11:40:45 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20066106566C; Tue, 30 Dec 2008 11:40:45 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-bw0-f19.google.com (mail-bw0-f19.google.com [209.85.218.19]) by mx1.freebsd.org (Postfix) with ESMTP id 973408FC13; Tue, 30 Dec 2008 11:40:43 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: by bwz12 with SMTP id 12so13962022bwz.19 for ; Tue, 30 Dec 2008 03:40:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=HaO+LJwqCrIDQMJiADpFVrVaPPgDzTj5kBEWPkUtQhk=; b=l5ZSs3zXFNk0NgZznMKFN1Bvcg0ngxUrVGnmshKnTOEEyBEro0agdOMX6LHcsX5W/3 yrlE9KI3qLI3N8tES9Zz9j+ZZpqiNYOAUGDHca/cIG/hnZpJ1lDPz2WritmdsBO3I01X P0smhiHc6ecUYsfpuPR9DmEAHxLEozI+hPYrM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=D/lrNKr5vNdtUXdqkjMKIbeKozBYDBgv6zhOfy/OnEJMtNi0WHErwRGaP2DwTWCRZt lJJXzovJZJ3e6/rp7Z1NOQ5xJO+rQKs6cv4yczJLEsAhLxUTdunGR/3F4YkhZ0O5fZP/ /S6GM+YbkIcRzVp5A1tj5rPhNe439Yd08pDuc= Received: by 10.103.218.19 with SMTP id v19mr5236115muq.46.1230637240219; Tue, 30 Dec 2008 03:40:40 -0800 (PST) Received: by 10.103.137.8 with HTTP; Tue, 30 Dec 2008 03:40:40 -0800 (PST) Message-ID: Date: Tue, 30 Dec 2008 09:40:40 -0200 From: "Carlos A. M. dos Santos" To: "Luigi Rizzo" In-Reply-To: <200812300940.mBU9epuS086194@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812300940.mBU9epuS086194@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186598 - head/sys/boot/i386/boot0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 11:40:45 -0000 On Tue, Dec 30, 2008 at 7:40 AM, Luigi Rizzo wrote: > Author: luigi > Date: Tue Dec 30 09:40:50 2008 > New Revision: 186598 > URL: http://svn.freebsd.org/changeset/base/186598 > ---8<--- > + Add an entry "F6 PXE" when the code is built with -DPXE (which is > a default now). Technically, F6 boots through INT18, so the prompt 'PXE' > is a bit misleading. Unfortunately the name INT18 > is too long and does not fit in - we could use ROM perhaps. > The reason I picked 'PXE' is that on many (I believe) new systems > INT18 calls PXE. ---8<--- I think "PXE" will look a bit cryptic for most users. What about using "Net", instead? -- cd /usr/ports/sysutils/life make clean From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 12:51:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D5B51065673; Tue, 30 Dec 2008 12:51:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D17A8FC13; Tue, 30 Dec 2008 12:51:15 +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 mBUCpFMY093819; Tue, 30 Dec 2008 12:51:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUCpFr9093818; Tue, 30 Dec 2008 12:51:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812301251.mBUCpFr9093818@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 30 Dec 2008 12:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186600 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 12:51:15 -0000 Author: kib Date: Tue Dec 30 12:51:14 2008 New Revision: 186600 URL: http://svn.freebsd.org/changeset/base/186600 Log: 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. Reported and reviewed by: kan Tested by: pho MFC after: 2 weeks Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Dec 30 09:43:01 2008 (r186599) +++ head/sys/kern/vfs_cache.c Tue Dec 30 12:51:14 2008 (r186600) @@ -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-all@FreeBSD.ORG Tue Dec 30 12:51:57 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2800B1065674; Tue, 30 Dec 2008 12:51:57 +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 17C5B8FC14; Tue, 30 Dec 2008 12:51: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 mBUCpuvS093864; Tue, 30 Dec 2008 12:51:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUCpuUk093863; Tue, 30 Dec 2008 12:51:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812301251.mBUCpuUk093863@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 30 Dec 2008 12:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186601 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 12:51:57 -0000 Author: kib Date: Tue Dec 30 12:51:56 2008 New Revision: 186601 URL: http://svn.freebsd.org/changeset/base/186601 Log: Clear the pointers to the file in the struct filedesc before file is closed in fdfree. Otherwise, sysctl_kern_proc_filedesc may dereference stale struct file * values. Reported and tested by: pho MFC after: 1 month Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Tue Dec 30 12:51:14 2008 (r186600) +++ head/sys/kern/kern_descrip.c Tue Dec 30 12:51:56 2008 (r186601) @@ -1703,14 +1703,16 @@ fdfree(struct thread *td) FILEDESC_XUNLOCK(fdp); if (i > 0) return; - /* - * We are the last reference to the structure, so we can - * safely assume it will not change out from under us. - */ + fpp = fdp->fd_ofiles; for (i = fdp->fd_lastfile; i-- >= 0; fpp++) { - if (*fpp) - (void) closef(*fpp, td); + if (*fpp) { + FILEDESC_XLOCK(fdp); + fp = *fpp; + *fpp = NULL; + FILEDESC_XUNLOCK(fdp); + (void) closef(fp, td); + } } FILEDESC_XLOCK(fdp); From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 14:08:49 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 531991065675 for ; Tue, 30 Dec 2008 14:08:49 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 04CFB8FC12 for ; Tue, 30 Dec 2008 14:08:48 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 503816D449; Tue, 30 Dec 2008 14:08:48 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 2DDF3844B0; Tue, 30 Dec 2008 15:08:48 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: vadim_nuclight@mail.ru References: <200810311447.m9VElFtp083250@svn.freebsd.org> <20081101212937.D12448@delplex.bde.org> <20081201104920.4b001553.stas@FreeBSD.org> <864p1orvj0.fsf@ds4.des.no> <200812291301.mBTD1qZb056125@server.filona.x88.info> <86k59j5c8n.fsf@ds4.des.no> <200812301213.mBUCDjQj069651@server.filona.x88.info> Date: Tue, 30 Dec 2008 15:08:48 +0100 In-Reply-To: <200812301213.mBUCDjQj069651@server.filona.x88.info> (Vadim Goncharov's message of "Tue, 30 Dec 2008 18:13:45 +0600") Message-ID: <86abad4uxb.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r184509 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 14:08:50 -0000 Vadim Goncharov writes: > You've skipped major arguments in favor of minor one. If your "major argument" was this: > Not a reason to live with this instead of moving to documented set of > exit codes. then I'm afraid you're going to have to rephrase it. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 16:00:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27B421065675; Tue, 30 Dec 2008 16:00:37 +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 D3FC88FC1F; Tue, 30 Dec 2008 16:00:36 +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 mBUG0aNb097946; Tue, 30 Dec 2008 16:00:36 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUG0aEB097945; Tue, 30 Dec 2008 16:00:36 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812301600.mBUG0aEB097945@svn.freebsd.org> From: Ken Smith Date: Tue, 30 Dec 2008 16:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186602 - head/gnu/usr.bin/man/manpath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 16:00:38 -0000 Author: kensmith Date: Tue Dec 30 16:00:36 2008 New Revision: 186602 URL: http://svn.freebsd.org/changeset/base/186602 Log: Remove the /usr/X11R6 paths. It has been long enough since the X stuff moved to /usr/local. Checked with: des (last person to have fiddled with this) MFC after: 1 month Modified: head/gnu/usr.bin/man/manpath/manpath.config Modified: head/gnu/usr.bin/man/manpath/manpath.config ============================================================================== --- head/gnu/usr.bin/man/manpath/manpath.config Tue Dec 30 12:51:56 2008 (r186601) +++ head/gnu/usr.bin/man/manpath/manpath.config Tue Dec 30 16:00:36 2008 (r186602) @@ -17,14 +17,12 @@ MANDATORY_MANPATH /usr/share/openssl/man # check if the directory exists and if it does, add it to MANPATH # OPTIONAL_MANPATH /usr/local/man -OPTIONAL_MANPATH /usr/X11R6/man # # set up PATH to MANPATH mapping # MANPATH_MAP /bin /usr/share/man MANPATH_MAP /usr/bin /usr/share/man MANPATH_MAP /usr/local/bin /usr/local/man -MANPATH_MAP /usr/X11R6/bin /usr/X11R6/man # # set man locales, if needed # From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 16:09:57 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98ACC106566B; Tue, 30 Dec 2008 16:09:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83ACA8FC1A; Tue, 30 Dec 2008 16:09:57 +0000 (UTC) (envelope-from rwatson@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 mBUG9vto098127; Tue, 30 Dec 2008 16:09:57 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUG9vcA098126; Tue, 30 Dec 2008 16:09:57 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812301609.mBUG9vcA098126@svn.freebsd.org> From: Robert Watson Date: Tue, 30 Dec 2008 16:09:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186603 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 16:09:58 -0000 Author: rwatson Date: Tue Dec 30 16:09:57 2008 New Revision: 186603 URL: http://svn.freebsd.org/changeset/base/186603 Log: Rename mbcnt to mbcnt_delta in uipc_send() -- unlike other local variables named mbcnt in uipc_usrreq.c, this instance is a delta rather than a cache of sb_mbcnt. MFC after: 3 weeks Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Tue Dec 30 16:00:36 2008 (r186602) +++ head/sys/kern/uipc_usrreq.c Tue Dec 30 16:09:57 2008 (r186603) @@ -754,7 +754,7 @@ uipc_send(struct socket *so, int flags, { struct unpcb *unp, *unp2; struct socket *so2; - u_int mbcnt, sbcc; + u_int mbcnt_delta, sbcc; u_long newhiwat; int error = 0; @@ -884,7 +884,7 @@ uipc_send(struct socket *so, int flags, control = NULL; } else sbappend_locked(&so2->so_rcv, m); - mbcnt = so2->so_rcv.sb_mbcnt - unp2->unp_mbcnt; + mbcnt_delta = so2->so_rcv.sb_mbcnt - unp2->unp_mbcnt; unp2->unp_mbcnt = so2->so_rcv.sb_mbcnt; sbcc = so2->so_rcv.sb_cc; sorwakeup_locked(so2); @@ -893,7 +893,7 @@ uipc_send(struct socket *so, int flags, newhiwat = so->so_snd.sb_hiwat - (sbcc - unp2->unp_cc); (void)chgsbsize(so->so_cred->cr_uidinfo, &so->so_snd.sb_hiwat, newhiwat, RLIM_INFINITY); - so->so_snd.sb_mbmax -= mbcnt; + so->so_snd.sb_mbmax -= mbcnt_delta; SOCKBUF_UNLOCK(&so->so_snd); unp2->unp_cc = sbcc; UNP_PCB_UNLOCK(unp2); From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 17:16:53 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FA6E106566C; Tue, 30 Dec 2008 17:16:53 +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 09D4B8FC3C; Tue, 30 Dec 2008 17:16:53 +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 mBUHGqmS099436; Tue, 30 Dec 2008 17:16:52 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUHGqog099435; Tue, 30 Dec 2008 17:16:52 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812301716.mBUHGqog099435@svn.freebsd.org> From: Ken Smith Date: Tue, 30 Dec 2008 17:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186604 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 17:16:53 -0000 Author: kensmith Date: Tue Dec 30 17:16:52 2008 New Revision: 186604 URL: http://svn.freebsd.org/changeset/base/186604 Log: Clean up this message a little bit. Modified: head/usr.sbin/sysinstall/disks.c Modified: head/usr.sbin/sysinstall/disks.c ============================================================================== --- head/usr.sbin/sysinstall/disks.c Tue Dec 30 16:09:57 2008 (r186603) +++ head/usr.sbin/sysinstall/disks.c Tue Dec 30 17:16:52 2008 (r186604) @@ -119,9 +119,8 @@ check_geometry(Disk *d) dialog_clear_norefresh(); sg = msgYesNo("WARNING: It is safe to use a geometry of %lu/%lu/%lu for %s on\n" "computers with modern BIOS versions. If this disk is to be used\n" - "on rather old machines, however, it is recommended to ensure that\n" - "it does not have more than 65535 cylinders, or more than 255 heads\n" - "or more than " + "on an old machine it is recommended that it does not have more\n" + "than 65535 cylinders, more than 255 heads, or more than\n" #ifdef PC98 "255" #else @@ -129,7 +128,7 @@ check_geometry(Disk *d) #endif " sectors per track.\n" "\n" - "Would you like that to keep using the current geometry?\n", + "Would you like to keep using the current geometry?\n", d->bios_cyl, d->bios_hd, d->bios_sect, d->name); if (sg == 1) { Sanitize_Bios_Geom(d); From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 17:35:23 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5081A106566B; Tue, 30 Dec 2008 17:35:23 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2BB698FC0C; Tue, 30 Dec 2008 17:35:22 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id mBUHZMXc019557; Tue, 30 Dec 2008 09:35:22 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id mBUHZMji019556; Tue, 30 Dec 2008 09:35:22 -0800 (PST) (envelope-from obrien) Date: Tue, 30 Dec 2008 09:35:22 -0800 From: "David O'Brien" To: "Carlos A. M. dos Santos" Message-ID: <20081230173522.GA19473@dragon.NUXI.org> References: <200812300940.mBU9epuS086194@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186598 - head/sys/boot/i386/boot0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 17:35:23 -0000 On Tue, Dec 30, 2008 at 09:40:40AM -0200, Carlos A. M. dos Santos wrote: > On Tue, Dec 30, 2008 at 7:40 AM, Luigi Rizzo wrote: > > Author: luigi > > Date: Tue Dec 30 09:40:50 2008 > > New Revision: 186598 > > URL: http://svn.freebsd.org/changeset/base/186598 > > > ---8<--- > > + Add an entry "F6 PXE" when the code is built with -DPXE (which is > > a default now). Technically, F6 boots through INT18, so the prompt 'PXE' > > is a bit misleading. Unfortunately the name INT18 > > is too long and does not fit in - we could use ROM perhaps. > > The reason I picked 'PXE' is that on many (I believe) new systems > > INT18 calls PXE. > ---8<--- > > I think "PXE" will look a bit cryptic for most users. What about using > "Net", instead? I think PXE is best - its a specfic type of netbooting. Otherwise, one may wonder what type "Net" is. -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 17:36:32 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76A8A1065672; Tue, 30 Dec 2008 17:36:32 +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 6124D8FC1F; Tue, 30 Dec 2008 17:36:32 +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 mBUHaWjV099844; Tue, 30 Dec 2008 17:36:32 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUHaWJZ099843; Tue, 30 Dec 2008 17:36:32 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812301736.mBUHaWJZ099843@svn.freebsd.org> From: Ken Smith Date: Tue, 30 Dec 2008 17:36:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186605 - head/usr.sbin/sade X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 17:36:33 -0000 Author: kensmith Date: Tue Dec 30 17:36:32 2008 New Revision: 186605 URL: http://svn.freebsd.org/changeset/base/186605 Log: Clean up this message a little bit. Modified: head/usr.sbin/sade/disks.c Modified: head/usr.sbin/sade/disks.c ============================================================================== --- head/usr.sbin/sade/disks.c Tue Dec 30 17:16:52 2008 (r186604) +++ head/usr.sbin/sade/disks.c Tue Dec 30 17:36:32 2008 (r186605) @@ -116,9 +116,8 @@ check_geometry(Disk *d) dialog_clear_norefresh(); sg = msgYesNo("WARNING: It is safe to use a geometry of %lu/%lu/%lu for %s on\n" "computers with modern BIOS versions. If this disk is to be used\n" - "on rather old machines, however, it is recommended to ensure that\n" - "it does not have more than 65535 cylinders, or more than 255 heads\n" - "or more than " + "on an old machines it is recommended that it does not have more\n" + "than 65535 cylinders, more than 255 heads, or more than\n" #ifdef PC98 "255" #else @@ -126,7 +125,7 @@ check_geometry(Disk *d) #endif " sectors per track.\n" "\n" - "Would you like that to keep using the current geometry?\n", + "Would you like to keep using the current geometry?\n", d->bios_cyl, d->bios_hd, d->bios_sect, d->name); if (sg == 1) { Sanitize_Bios_Geom(d); From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 17:54:26 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1938910656CE; Tue, 30 Dec 2008 17:54:26 +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 03C668FC13; Tue, 30 Dec 2008 17:54:26 +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 mBUHsPUY000382; Tue, 30 Dec 2008 17:54:25 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUHsPjR000381; Tue, 30 Dec 2008 17:54:25 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <200812301754.mBUHsPjR000381@svn.freebsd.org> From: Peter Holm Date: Tue, 30 Dec 2008 17:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186606 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 17:54:26 -0000 Author: pho Date: Tue Dec 30 17:54:25 2008 New Revision: 186606 URL: http://svn.freebsd.org/changeset/base/186606 Log: Make sure that unused j->ip[46] are cleared Reviewed by: bz Approved by: kib (mentor) Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Tue Dec 30 17:36:32 2008 (r186605) +++ head/sys/kern/kern_jail.c Tue Dec 30 17:54:25 2008 (r186606) @@ -293,7 +293,8 @@ jail_copyin_ips(struct jail *j) } j->ip4 = ip4; - } + } else + j->ip4 = NULL; #endif #ifdef INET6 if (j->ip6s > 0) { @@ -320,7 +321,8 @@ jail_copyin_ips(struct jail *j) } j->ip6 = ip6; - } + } else + j->ip6 = NULL; #endif return (0); From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 18:00:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B00A106567F; Tue, 30 Dec 2008 18:00:15 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by mx1.freebsd.org (Postfix) with ESMTP id E2B358FC13; Tue, 30 Dec 2008 18:00:09 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so2524820yxb.13 for ; Tue, 30 Dec 2008 10:00:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:x-mailer :mime-version:subject:date:cc; bh=C5BFGyUo+EDmGwssuY7DA0xox0L0J7J4++npbuHVxp4=; b=yGjiVlzsS8TQjEj3dS3cmLz2H6+WXWTTQ1AAeZmPXi+T2lFEzl+ySnYST7lLwb04LQ xb0lUhwumay8vEWMwg+vCl8JhokETmqqqeIoWydRg6xgKKqiPacdx/Afd/JfdGmhL8pY 5b5YJ6Y4jLULATnDBneKC4hFVcmhHh12aOKlQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:x-mailer:mime-version:subject:date:cc; b=aUuJ7RFn8pKui8bMBEUz8HAX6CKOaUiVEF4FkhLth92xoA0EGvvo69JMmiINTrsvKP yAsdpjEviV868CLEZQKWCLalpVNiek52EDZd7qa/rzUH3CnobP1y6BBrouyNaMy6FN5P 4Gje8j+KXRH4ZxfS2V8JkAPxfiLc704YSrbHc= Received: by 10.100.163.15 with SMTP id l15mr8462553ane.128.1230660008847; Tue, 30 Dec 2008 10:00:08 -0800 (PST) Received: from ?10.94.57.178? ([32.159.131.102]) by mx.google.com with ESMTPS id c37sm20716808ana.37.2008.12.30.10.00.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 30 Dec 2008 10:00:07 -0800 (PST) References: <200812300940.mBU9epuS086194@svn.freebsd.org> <20081230173522.GA19473@dragon.NUXI.org> Message-Id: From: Garrett Cooper To: "obrien@freebsd.org" In-Reply-To: <20081230173522.GA19473@dragon.NUXI.org> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (5F136) Mime-Version: 1.0 (iPhone Mail 5F136) Date: Tue, 30 Dec 2008 09:59:44 -0800 Cc: "Carlos A. M. dos Santos" , "svn-src-head@freebsd.org" , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" Subject: Re: svn commit: r186598 - head/sys/boot/i386/boot0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 18:00:16 -0000 On Dec 30, 2008, at 9:35, "David O'Brien" wrote: > On Tue, Dec 30, 2008 at 09:40:40AM -0200, Carlos A. M. dos Santos > wrote: >> On Tue, Dec 30, 2008 at 7:40 AM, Luigi Rizzo >> wrote: >>> Author: luigi >>> Date: Tue Dec 30 09:40:50 2008 >>> New Revision: 186598 >>> URL: http://svn.freebsd.org/changeset/base/186598 >>> >> ---8<--- >>> + Add an entry "F6 PXE" when the code is built with -DPXE (which is >>> a default now). Technically, F6 boots through INT18, so the >>> prompt 'PXE' >>> is a bit misleading. Unfortunately the name INT18 >>> is too long and does not fit in - we could use ROM perhaps. >>> The reason I picked 'PXE' is that on many (I believe) new systems >>> INT18 calls PXE. >> ---8<--- >> >> I think "PXE" will look a bit cryptic for most users. What about >> using >> "Net", instead? > > I think PXE is best - its a specfic type of netbooting. Otherwise, > one > may wonder what type "Net" is. > > -- > -- David (obrien@FreeBSD.org) PXE is of course the Intel standard method of BOOTP, so we should probably only use it for x86 compatible hardware (where this of course applies). Obscuring this with net or netboot only serves to confuse folks who've used Apple's method of BOOTP -- Netboot. If documentation or references are needed to simplify PXE, that can always. Be arranged :). Besides it's easy to google. -Garrett From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 18:21:55 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 353D710656E4; Tue, 30 Dec 2008 18:21:55 +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 1F2A58FC17; Tue, 30 Dec 2008 18:21:55 +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 mBUILsUN001620; Tue, 30 Dec 2008 18:21:54 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUILsGC001619; Tue, 30 Dec 2008 18:21:54 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812301821.mBUILsGC001619@svn.freebsd.org> From: Ken Smith Date: Tue, 30 Dec 2008 18:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186607 - head/usr.sbin/sade X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 18:21:56 -0000 Author: kensmith Date: Tue Dec 30 18:21:54 2008 New Revision: 186607 URL: http://svn.freebsd.org/changeset/base/186607 Log: Oops, missed removing an 's' in previous rev. Submitted by: Jens Schweikhardt (schweikh schweikhardt net) Modified: head/usr.sbin/sade/disks.c Modified: head/usr.sbin/sade/disks.c ============================================================================== --- head/usr.sbin/sade/disks.c Tue Dec 30 17:54:25 2008 (r186606) +++ head/usr.sbin/sade/disks.c Tue Dec 30 18:21:54 2008 (r186607) @@ -116,7 +116,7 @@ check_geometry(Disk *d) dialog_clear_norefresh(); sg = msgYesNo("WARNING: It is safe to use a geometry of %lu/%lu/%lu for %s on\n" "computers with modern BIOS versions. If this disk is to be used\n" - "on an old machines it is recommended that it does not have more\n" + "on an old machine it is recommended that it does not have more\n" "than 65535 cylinders, more than 255 heads, or more than\n" #ifdef PC98 "255" From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 19:46:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54AEE106564A; Tue, 30 Dec 2008 19:46:07 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 400958FC17; Tue, 30 Dec 2008 19:46:07 +0000 (UTC) (envelope-from rpaulo@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 mBUJk7Wi003247; Tue, 30 Dec 2008 19:46:07 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUJk7aa003245; Tue, 30 Dec 2008 19:46:07 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200812301946.mBUJk7aa003245@svn.freebsd.org> From: Rui Paulo Date: Tue, 30 Dec 2008 19:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186608 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 19:46:07 -0000 Author: rpaulo Date: Tue Dec 30 19:46:06 2008 New Revision: 186608 URL: http://svn.freebsd.org/changeset/base/186608 Log: Add a kernel config file so that users have less difficulty testing USBng. If it makes sense, it could be done for arm/mips too. Added: head/sys/amd64/conf/USB2 (contents, props changed) head/sys/i386/conf/USB2 (contents, props changed) Added: head/sys/amd64/conf/USB2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/conf/USB2 Tue Dec 30 19:46:06 2008 (r186608) @@ -0,0 +1,110 @@ +# +# USB2 -- Generic kernel configuration file for FreeBSD/amd64 with USBng +# stack. +# +# $FreeBSD$ + +include GENERIC + +ident USB2-GENERIC + +# Remove support for the old USB stack. +nodevice uhci +nodevice ohci +nodevice ehci +nodevice usb +nodevice ugen +nodevice uhid +nodevice ukbd +nodevice ulpt +nodevice umass +nodevice ums +nodevice ural +nodevice rum +nodevice zyd +nodevice urio +nodevice uscanner +# USB Serial devices +nodevice ucom +nodevice u3g +nodevice uark +nodevice ubsa +nodevice uftdi +nodevice uipaq +nodevice uplcom +nodevice uslcom +nodevice uvisor +nodevice uvscom +# USB Ethernet, requires miibus +nodevice aue +nodevice axe +nodevice cdce +nodevice cue +nodevice kue +nodevice rue +nodevice udav + +# +# The following drivers belong to the new USB stack. +# + +# USB core support +device usb2_core + +# USB controller support +device usb2_controller +device usb2_controller_ehci +device usb2_controller_ohci +device usb2_controller_uhci + +# USB mass storage support +device usb2_storage +device usb2_storage_mass + +# USB ethernet support, requires miibus +device usb2_ethernet +device usb2_ethernet_aue +device usb2_ethernet_axe +device usb2_ethernet_cdce +device usb2_ethernet_cue +device usb2_ethernet_kue +device usb2_ethernet_rue +device usb2_ethernet_dav + +# USB wireless LAN support +device usb2_wlan +device usb2_wlan_rum +device usb2_wlan_ral +device usb2_wlan_zyd + +# USB serial device support +device usb2_serial +device usb2_serial_ark +device usb2_serial_bsa +device usb2_serial_bser +device usb2_serial_chcom +device usb2_serial_cycom +device usb2_serial_foma +device usb2_serial_ftdi +device usb2_serial_gensa +device usb2_serial_ipaq +device usb2_serial_lpt +device usb2_serial_mct +device usb2_serial_modem +device usb2_serial_moscom +device usb2_serial_plcom +device usb2_serial_visor +device usb2_serial_vscom + +# USB bluetooth support +device usb2_bluetooth +device usb2_bluetooth_ng + +# USB input device support +device usb2_input +device usb2_input_hid +device usb2_input_kbd +device usb2_input_ms + +# USB sound and MIDI device support +device usb2_sound Added: head/sys/i386/conf/USB2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/i386/conf/USB2 Tue Dec 30 19:46:06 2008 (r186608) @@ -0,0 +1,110 @@ +# +# USB2 -- Generic kernel configuration file for FreeBSD/i386 with USBng +# stack. +# +# $FreeBSD$ + +include GENERIC + +ident USB2-GENERIC + +# Remove support for the old USB stack. +nodevice uhci +nodevice ohci +nodevice ehci +nodevice usb +nodevice ugen +nodevice uhid +nodevice ukbd +nodevice ulpt +nodevice umass +nodevice ums +nodevice ural +nodevice rum +nodevice zyd +nodevice urio +nodevice uscanner +# USB Serial devices +nodevice ucom +nodevice u3g +nodevice uark +nodevice ubsa +nodevice uftdi +nodevice uipaq +nodevice uplcom +nodevice uslcom +nodevice uvisor +nodevice uvscom +# USB Ethernet, requires miibus +nodevice aue +nodevice axe +nodevice cdce +nodevice cue +nodevice kue +nodevice rue +nodevice udav + +# +# The following drivers belong to the new USB stack. +# + +# USB core support +device usb2_core + +# USB controller support +device usb2_controller +device usb2_controller_ehci +device usb2_controller_ohci +device usb2_controller_uhci + +# USB mass storage support +device usb2_storage +device usb2_storage_mass + +# USB ethernet support, requires miibus +device usb2_ethernet +device usb2_ethernet_aue +device usb2_ethernet_axe +device usb2_ethernet_cdce +device usb2_ethernet_cue +device usb2_ethernet_kue +device usb2_ethernet_rue +device usb2_ethernet_dav + +# USB wireless LAN support +device usb2_wlan +device usb2_wlan_rum +device usb2_wlan_ral +device usb2_wlan_zyd + +# USB serial device support +device usb2_serial +device usb2_serial_ark +device usb2_serial_bsa +device usb2_serial_bser +device usb2_serial_chcom +device usb2_serial_cycom +device usb2_serial_foma +device usb2_serial_ftdi +device usb2_serial_gensa +device usb2_serial_ipaq +device usb2_serial_lpt +device usb2_serial_mct +device usb2_serial_modem +device usb2_serial_moscom +device usb2_serial_plcom +device usb2_serial_visor +device usb2_serial_vscom + +# USB bluetooth support +device usb2_bluetooth +device usb2_bluetooth_ng + +# USB input device support +device usb2_input +device usb2_input_hid +device usb2_input_kbd +device usb2_input_ms + +# USB sound and MIDI device support +device usb2_sound From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 19:48:03 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79D2C1065673; Tue, 30 Dec 2008 19:48:03 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 660828FC16; Tue, 30 Dec 2008 19:48:03 +0000 (UTC) (envelope-from alc@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 mBUJm33K003318; Tue, 30 Dec 2008 19:48:03 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUJm3Jd003317; Tue, 30 Dec 2008 19:48:03 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200812301948.mBUJm3Jd003317@svn.freebsd.org> From: Alan Cox Date: Tue, 30 Dec 2008 19:48:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186609 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 19:48:03 -0000 Author: alc Date: Tue Dec 30 19:48:03 2008 New Revision: 186609 URL: http://svn.freebsd.org/changeset/base/186609 Log: Move the implementation of the vm map's fast path on address lookup from vm_map_lookup{,_locked}() to vm_map_lookup_entry(). Having the fast path in vm_map_lookup{,_locked}() limits its benefits to page faults. Moving it to vm_map_lookup_entry() extends its benefits to other operations on the vm map. Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Tue Dec 30 19:46:06 2008 (r186608) +++ head/sys/vm/vm_map.c Tue Dec 30 19:48:03 2008 (r186609) @@ -901,12 +901,24 @@ vm_map_lookup_entry( { vm_map_entry_t cur; - cur = vm_map_entry_splay(address, map->root); + /* + * If the map is empty, then the map entry immediately preceding + * "address" is the map's header. + */ + cur = map->root; if (cur == NULL) *entry = &map->header; - else { - map->root = cur; + else if (address >= cur->start && cur->end > address) { + *entry = cur; + return (TRUE); + } else { + map->root = cur = vm_map_entry_splay(address, cur); + /* + * If "address" is contained within a map entry, the new root + * is that map entry. Otherwise, the new root is a map entry + * immediately before or after "address". + */ if (address >= cur->start) { *entry = cur; if (cur->end > address) @@ -3108,9 +3120,6 @@ vm_map_lookup(vm_map_t *var_map, /* IN/ vm_prot_t fault_type = fault_typea; RetryLookup:; - /* - * Lookup the faulting address. - */ vm_map_lock_read(map); #define RETURN(why) \ @@ -3120,22 +3129,12 @@ RetryLookup:; } /* - * If the map has an interesting hint, try it before calling full - * blown lookup routine. + * Lookup the faulting address. */ - entry = map->root; - *out_entry = entry; - if (entry == NULL || - (vaddr < entry->start) || (vaddr >= entry->end)) { - /* - * Entry was either not a valid hint, or the vaddr was not - * contained in the entry, so do a full lookup. - */ - if (!vm_map_lookup_entry(map, vaddr, out_entry)) - RETURN(KERN_INVALID_ADDRESS); + if (!vm_map_lookup_entry(map, vaddr, out_entry)) + RETURN(KERN_INVALID_ADDRESS); - entry = *out_entry; - } + entry = *out_entry; /* * Handle submaps. @@ -3262,22 +3261,12 @@ vm_map_lookup_locked(vm_map_t *var_map, vm_prot_t fault_type = fault_typea; /* - * If the map has an interesting hint, try it before calling full - * blown lookup routine. + * Lookup the faulting address. */ - entry = map->root; - *out_entry = entry; - if (entry == NULL || - (vaddr < entry->start) || (vaddr >= entry->end)) { - /* - * Entry was either not a valid hint, or the vaddr was not - * contained in the entry, so do a full lookup. - */ - if (!vm_map_lookup_entry(map, vaddr, out_entry)) - return (KERN_INVALID_ADDRESS); + if (!vm_map_lookup_entry(map, vaddr, out_entry)) + return (KERN_INVALID_ADDRESS); - entry = *out_entry; - } + entry = *out_entry; /* * Fail if the entry refers to a submap. From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 20:13:21 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EB2D106564A; Tue, 30 Dec 2008 20:13:21 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3AE808FC1D; Tue, 30 Dec 2008 20:13:21 +0000 (UTC) (envelope-from rpaulo@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 mBUKDLqP003828; Tue, 30 Dec 2008 20:13:21 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUKDLEv003827; Tue, 30 Dec 2008 20:13:21 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200812302013.mBUKDLEv003827@svn.freebsd.org> From: Rui Paulo Date: Tue, 30 Dec 2008 20:13:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186610 - head/sys/amd64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 20:13:21 -0000 Author: rpaulo Date: Tue Dec 30 20:13:20 2008 New Revision: 186610 URL: http://svn.freebsd.org/changeset/base/186610 Log: Disable USB bluetooth (needs netgraph built in) and USB audio (doesn't compile). Modified: head/sys/amd64/conf/USB2 Modified: head/sys/amd64/conf/USB2 ============================================================================== --- head/sys/amd64/conf/USB2 Tue Dec 30 19:48:03 2008 (r186609) +++ head/sys/amd64/conf/USB2 Tue Dec 30 20:13:20 2008 (r186610) @@ -97,8 +97,8 @@ device usb2_serial_visor device usb2_serial_vscom # USB bluetooth support -device usb2_bluetooth -device usb2_bluetooth_ng +#device usb2_bluetooth +#device usb2_bluetooth_ng # USB input device support device usb2_input @@ -107,4 +107,4 @@ device usb2_input_kbd device usb2_input_ms # USB sound and MIDI device support -device usb2_sound +#device usb2_sound From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 20:16:33 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FCC3106566C; Tue, 30 Dec 2008 20:16:33 +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 7B6AE8FC13; Tue, 30 Dec 2008 20:16:33 +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 mBUKGXKR003939; Tue, 30 Dec 2008 20:16:33 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUKGXcD003938; Tue, 30 Dec 2008 20:16:33 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200812302016.mBUKGXcD003938@svn.freebsd.org> From: Christian Brueffer Date: Tue, 30 Dec 2008 20:16:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186611 - head/usr.sbin/cpucontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 20:16:34 -0000 Author: brueffer Date: Tue Dec 30 20:16:33 2008 New Revision: 186611 URL: http://svn.freebsd.org/changeset/base/186611 Log: Mdoc and wording improvements. Modified: head/usr.sbin/cpucontrol/cpucontrol.8 Modified: head/usr.sbin/cpucontrol/cpucontrol.8 ============================================================================== --- head/usr.sbin/cpucontrol/cpucontrol.8 Tue Dec 30 20:13:20 2008 (r186610) +++ head/usr.sbin/cpucontrol/cpucontrol.8 Tue Dec 30 20:16:33 2008 (r186611) @@ -55,21 +55,26 @@ device. .Sh DESCRIPTION The .Nm -utility can be used to read and write an arbitrary machine-specific -CPU registers via +utility can be used to read and write arbitrary machine-specific +CPU registers via the .Xr cpuctl 4 -controlled special device and apply the CPU firmware updates. +special device. +It can also be used to apply CPU firmware updates. .Pp The following options are available: .Bl -tag -width indent .It Fl d Ar datadir -Where to look for microcode images. The option can be specified multiple times. +Where to look for microcode images. +The option can be specified multiple times. .It Fl m Ar msr Ns Op = Ns Ar value -Read/write the specified MSR. Both the MSR and the value should be given as a hex number. +Read/write the specified MSR. +Both the MSR and the value should be given as a hex number. .It Fl i Ar level -Retrieve CPUID info. Level should be given as a hex number. +Retrieve CPUID info. +Level should be given as a hex number. .It Fl u -Apply CPU firmware updates. The +Apply CPU firmware updates. +The .Nm utility will walk through the configured data directories and will apply all firmware patches available for this CPU. @@ -93,14 +98,13 @@ To set the CPU 0 TSC MSR register value .Pp .Dq Li "cpucontrol -m 0x10=0x1 /dev/cpuctl0" .Pp -.Pp The command .Pp .Dq Li "cpucontrol -i 0x1 /dev/cpuctl1" .Pp will retrieve the CPUID level 0x1 from CPU 1. .Pp -To perform firmware updated on CPU 0 from images located at +To perform firmware updates on CPU 0 from images located at .Pa /usr/local/share/cpuctl/ use the following command: .Pp From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 20:25:50 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09C8E106566C; Tue, 30 Dec 2008 20:25:50 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA4988FC12; Tue, 30 Dec 2008 20:25:49 +0000 (UTC) (envelope-from rpaulo@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 mBUKPn3K004147; Tue, 30 Dec 2008 20:25:49 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUKPnGZ004146; Tue, 30 Dec 2008 20:25:49 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200812302025.mBUKPnGZ004146@svn.freebsd.org> From: Rui Paulo Date: Tue, 30 Dec 2008 20:25:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186612 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 20:25:50 -0000 Author: rpaulo Date: Tue Dec 30 20:25:49 2008 New Revision: 186612 URL: http://svn.freebsd.org/changeset/base/186612 Log: Disable USB bluetooth (needs netgraph built in) and USB audio (doesn't compile). Modified: head/sys/i386/conf/USB2 Modified: head/sys/i386/conf/USB2 ============================================================================== --- head/sys/i386/conf/USB2 Tue Dec 30 20:16:33 2008 (r186611) +++ head/sys/i386/conf/USB2 Tue Dec 30 20:25:49 2008 (r186612) @@ -97,8 +97,8 @@ device usb2_serial_visor device usb2_serial_vscom # USB bluetooth support -device usb2_bluetooth -device usb2_bluetooth_ng +#device usb2_bluetooth +#device usb2_bluetooth_ng # USB input device support device usb2_input @@ -107,4 +107,4 @@ device usb2_input_kbd device usb2_input_ms # USB sound and MIDI device support -device usb2_sound +#device usb2_sound From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 20:26:16 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2F26106566C; Tue, 30 Dec 2008 20:26:16 +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 8EDD88FC2A; Tue, 30 Dec 2008 20:26:16 +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 mBUKQG8W004193; Tue, 30 Dec 2008 20:26:16 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUKQGSO004192; Tue, 30 Dec 2008 20:26:16 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200812302026.mBUKQGSO004192@svn.freebsd.org> From: Christian Brueffer Date: Tue, 30 Dec 2008 20:26:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186613 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 20:26:17 -0000 Author: brueffer Date: Tue Dec 30 20:26:16 2008 New Revision: 186613 URL: http://svn.freebsd.org/changeset/base/186613 Log: Mdoc and wording improvements, also point to cpucontrol(8). Modified: head/share/man/man4/cpuctl.4 Modified: head/share/man/man4/cpuctl.4 ============================================================================== --- head/share/man/man4/cpuctl.4 Tue Dec 30 20:25:49 2008 (r186612) +++ head/share/man/man4/cpuctl.4 Tue Dec 30 20:26:16 2008 (r186613) @@ -47,28 +47,31 @@ cpuctl_load="YES" .Sh DESCRIPTION The special file .Pa /dev/cpuctl -presents interace to the system CPU. It provides functionality to retrieve +presents interface to the system CPU. +It provides functionality to retrieve CPUID information, read/write machine specific registers (MSR) and perform -cpu firmware updates. +CPU firmware updates. .Pp -For each cpu present in the system, special file +For each CPU present in the system, the special file .Pa /dev/cpuctl%d -with the appropriate index will be created. For multicore cpus the +with the appropriate index will be created. +For multicore CPUs the special file will be created for each core. .Pp Currently, only i386 and amd64 processors are supported. .Sh IOCTL INTERFACE All of the supported operations are invoked using the -.Fr ioctl 2 -system call. Refer to that manpage for further information about -this interface. Currently, the following ioctls are defined: +.Xr ioctl 2 +system call. +Currently, the following ioctls are defined: .Bl -tag -width CPUCTL_UPDATE .It Dv CPUCTL_RDMSR Fa cpuctl_msr_args_t *args .It Dv CPUCTL_WRMSR Fa cpuctl_msr_args_t *args -Read/write cpu machine specific register. The +Read/write CPU machine specific register. +The .Vt cpuctl_msr_args_t -structure defined in +structure is defined in .In sys/cpuctl.h as: .Pp @@ -79,7 +82,8 @@ typedef struct { } cpuctl_msr_args_t; .Ed .It Dv CPUCTL_CPUID Fa cpuctl_cpuid_args_t *args -Retrieve CPUID information. Arguments are supplied in +Retrieve CPUID information. +Arguments are supplied in the following struct: .Pp .Bd -literal @@ -93,9 +97,10 @@ The .Va level field indicates the CPUID level to retrieve information for, while the .Va data -used to store CPUID data received. +field is used to store the received CPUID data. .It Dv CPUCTL_UPDATE cpuctl_update_args_t *args -Update cpu firmware (microcode). The structure defined in +Update CPU firmware (microcode). +The structure is defined in .In sys/cpuctl.h as: .Pp @@ -117,14 +122,14 @@ For additional information refer to .Sh RETURN VALUES .Bl -tag -width Er .It Bq Er ENXIO -The operation requested is not supported by device (e.g. unsupported -architecture or cpu was disabled) +The operation requested is not supported by the device (e.g. unsupported +architecture or the CPU was disabled). .It Bq Er EINVAL Incorrect request was supplied, or microcode image is not correct. .It Bq Er ENOMEM No physical memory was available to complete the request. .It Bq Er EFAULT -The firmware image address points outside process address space. +The firmware image address points outside the process address space. .El .Sh FILES .Bl -tag -width /dev/cpuctl -compact @@ -132,15 +137,16 @@ The firmware image address points outsid .El .Sh SEE ALSO .Xr hwpmc 4 +.Xr cpucontrol 8 .Sh HISTORY The .Nm driver first appeared in -.Fx 8.0 +.Fx 8.0 . .Sh BUGS Yes, probably, report if any. .Sh AUTHORS The .Nm -module and this manual page was written by +module and this manual page were written by .An Stanislav Sedov Aq stas@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 20:31:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 436101065670; Tue, 30 Dec 2008 20:31:38 +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 164328FC29; Tue, 30 Dec 2008 20:31:38 +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 mBUKVbvO004330; Tue, 30 Dec 2008 20:31:37 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUKVbfN004329; Tue, 30 Dec 2008 20:31:37 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200812302031.mBUKVbfN004329@svn.freebsd.org> From: Christian Brueffer Date: Tue, 30 Dec 2008 20:31:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186614 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 20:31:38 -0000 Author: brueffer Date: Tue Dec 30 20:31:37 2008 New Revision: 186614 URL: http://svn.freebsd.org/changeset/base/186614 Log: Add missing comma. Modified: head/share/man/man4/cpuctl.4 Modified: head/share/man/man4/cpuctl.4 ============================================================================== --- head/share/man/man4/cpuctl.4 Tue Dec 30 20:26:16 2008 (r186613) +++ head/share/man/man4/cpuctl.4 Tue Dec 30 20:31:37 2008 (r186614) @@ -136,7 +136,7 @@ The firmware image address points outsid .It Pa /dev/cpuctl .El .Sh SEE ALSO -.Xr hwpmc 4 +.Xr hwpmc 4 , .Xr cpucontrol 8 .Sh HISTORY The From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 20:39:48 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51581106564A; Tue, 30 Dec 2008 20:39:48 +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 3E1D68FC19; Tue, 30 Dec 2008 20:39:48 +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 mBUKdmIP004513; Tue, 30 Dec 2008 20:39:48 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUKdmHC004512; Tue, 30 Dec 2008 20:39:48 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <200812302039.mBUKdmHC004512@svn.freebsd.org> From: Peter Holm Date: Tue, 30 Dec 2008 20:39:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186615 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 20:39:48 -0000 Author: pho Date: Tue Dec 30 20:39:47 2008 New Revision: 186615 URL: http://svn.freebsd.org/changeset/base/186615 Log: Added missing second part of cleaning j->ip[46] as requested by bz Approved by: kib (mentor) Pointy hat: pho Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Tue Dec 30 20:31:37 2008 (r186614) +++ head/sys/kern/kern_jail.c Tue Dec 30 20:39:47 2008 (r186615) @@ -329,9 +329,11 @@ jail_copyin_ips(struct jail *j) e_free_ip: #ifdef INET6 free(ip6, M_PRISON); + j->ip6 = NULL; #endif #ifdef INET free(ip4, M_PRISON); + j->ip4 = NULL; #endif return (error); } From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 20:51:08 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 652DC106566C; Tue, 30 Dec 2008 20:51:08 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 528588FC29; Tue, 30 Dec 2008 20:51:08 +0000 (UTC) (envelope-from alc@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 mBUKp8rK004797; Tue, 30 Dec 2008 20:51:08 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUKp7XI004796; Tue, 30 Dec 2008 20:51:07 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200812302051.mBUKp7XI004796@svn.freebsd.org> From: Alan Cox Date: Tue, 30 Dec 2008 20:51:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186616 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 20:51:08 -0000 Author: alc Date: Tue Dec 30 20:51:07 2008 New Revision: 186616 URL: http://svn.freebsd.org/changeset/base/186616 Log: Style change to vm_map_lookup(): Eliminate a macro of dubious value. Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Tue Dec 30 20:39:47 2008 (r186615) +++ head/sys/vm/vm_map.c Tue Dec 30 20:51:07 2008 (r186616) @@ -3122,17 +3122,14 @@ vm_map_lookup(vm_map_t *var_map, /* IN/ RetryLookup:; vm_map_lock_read(map); -#define RETURN(why) \ - { \ - vm_map_unlock_read(map); \ - return (why); \ - } /* * Lookup the faulting address. */ - if (!vm_map_lookup_entry(map, vaddr, out_entry)) - RETURN(KERN_INVALID_ADDRESS); + if (!vm_map_lookup_entry(map, vaddr, out_entry)) { + vm_map_unlock_read(map); + return (KERN_INVALID_ADDRESS); + } entry = *out_entry; @@ -3159,13 +3156,15 @@ RetryLookup:; prot = entry->protection; fault_type &= (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE); if ((fault_type & prot) != fault_type) { - RETURN(KERN_PROTECTION_FAILURE); + vm_map_unlock_read(map); + return (KERN_PROTECTION_FAILURE); } if ((entry->eflags & MAP_ENTRY_USER_WIRED) && (entry->eflags & MAP_ENTRY_COW) && (fault_type & VM_PROT_WRITE) && (fault_typea & VM_PROT_OVERRIDE_WRITE) == 0) { - RETURN(KERN_PROTECTION_FAILURE); + vm_map_unlock_read(map); + return (KERN_PROTECTION_FAILURE); } /* @@ -3235,8 +3234,6 @@ RetryLookup:; *out_prot = prot; return (KERN_SUCCESS); - -#undef RETURN } /* From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 21:49:40 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11E751065670; Tue, 30 Dec 2008 21:49:40 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F340F8FC13; Tue, 30 Dec 2008 21:49:39 +0000 (UTC) (envelope-from marcus@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 mBULndJq005839; Tue, 30 Dec 2008 21:49:39 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBULnd6N005838; Tue, 30 Dec 2008 21:49:39 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200812302149.mBULnd6N005838@svn.freebsd.org> From: Joe Marcus Clarke Date: Tue, 30 Dec 2008 21:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186617 - head/sys/fs/pseudofs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 21:49:40 -0000 Author: marcus (doc,ports committer) Date: Tue Dec 30 21:49:39 2008 New Revision: 186617 URL: http://svn.freebsd.org/changeset/base/186617 Log: Add a VOP_VPTOCNP implementation for pseudofs which covers file systems such as procfs and linprocfs. This implementation's locking was enhanced by kib. Reviewed by: kib des Approved by: des kib Tested by: pho Modified: head/sys/fs/pseudofs/pseudofs_vnops.c Modified: head/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs_vnops.c Tue Dec 30 20:51:07 2008 (r186616) +++ head/sys/fs/pseudofs/pseudofs_vnops.c Tue Dec 30 21:49:39 2008 (r186617) @@ -310,6 +310,84 @@ pfs_getextattr(struct vop_getextattr_arg } /* + * Convert a vnode to its component name + */ +static int +pfs_vptocnp(struct vop_vptocnp_args *ap) +{ + struct vnode *vp = ap->a_vp; + struct vnode **dvp = ap->a_vpp; + struct pfs_vdata *pvd = vp->v_data; + struct pfs_node *pd = pvd->pvd_pn; + struct pfs_node *pn; + struct mount *mp; + char *buf = ap->a_buf; + int *buflen = ap->a_buflen; + char pidbuf[PFS_NAMELEN]; + pid_t pid = pvd->pvd_pid; + int len, i, error, locked; + + i = *buflen; + error = 0; + + pfs_lock(pd); + + if (vp->v_type == VDIR && pd->pn_type == pfstype_root) { + *dvp = vp; + vhold(*dvp); + pfs_unlock(pd); + PFS_RETURN (0); + } else if (vp->v_type == VDIR && pd->pn_type == pfstype_procdir) { + len = snprintf(pidbuf, sizeof(pidbuf), "%d", pid); + i -= len; + if (i < 0) { + error = ENOMEM; + goto failed; + } + bcopy(pidbuf, buf + i, len); + } else { + i -= strlen(pd->pn_name); + if (i < 0) { + error = ENOMEM; + goto failed; + } + bcopy(pd->pn_name, buf + i, strlen(pd->pn_name)); + } + + pn = pd->pn_parent; + pfs_unlock(pd); + + mp = vp->v_mount; + error = vfs_busy(mp, 0); + if (error) + return (error); + + /* + * vp is held by caller. + */ + locked = VOP_ISLOCKED(vp); + VOP_UNLOCK(vp, 0); + + error = pfs_vncache_alloc(mp, dvp, pn, pid); + if (error) { + vn_lock(vp, locked | LK_RETRY); + vfs_unbusy(mp); + PFS_RETURN(error); + } + + *buflen = i; + vhold(*dvp); + vput(*dvp); + vn_lock(vp, locked | LK_RETRY); + vfs_unbusy(mp); + + PFS_RETURN (0); +failed: + pfs_unlock(pd); + PFS_RETURN(error); +} + +/* * Look up a file or directory */ static int @@ -890,6 +968,7 @@ struct vop_vector pfs_vnodeops = { .vop_rmdir = VOP_EOPNOTSUPP, .vop_setattr = pfs_setattr, .vop_symlink = VOP_EOPNOTSUPP, + .vop_vptocnp = pfs_vptocnp, .vop_write = pfs_write, /* XXX I've probably forgotten a few that need VOP_EOPNOTSUPP */ }; From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 21:52:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28E8A106564A; Tue, 30 Dec 2008 21:52:19 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1743C8FC0C; Tue, 30 Dec 2008 21:52:19 +0000 (UTC) (envelope-from alc@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 mBULqI4V005919; Tue, 30 Dec 2008 21:52:18 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBULqIUh005918; Tue, 30 Dec 2008 21:52:18 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200812302152.mBULqIUh005918@svn.freebsd.org> From: Alan Cox Date: Tue, 30 Dec 2008 21:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186618 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 21:52:19 -0000 Author: alc Date: Tue Dec 30 21:52:18 2008 New Revision: 186618 URL: http://svn.freebsd.org/changeset/base/186618 Log: Avoid an unnecessary memory dereference in vm_map_entry_splay(). Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Tue Dec 30 21:49:39 2008 (r186617) +++ head/sys/vm/vm_map.c Tue Dec 30 21:52:18 2008 (r186618) @@ -737,9 +737,9 @@ vm_map_entry_splay(vm_offset_t addr, vm_ rlist = root; root = y; } - } else { + } else if (addr >= root->end) { y = root->right; - if (addr < root->end || y == NULL) + if (y == NULL) break; if (addr >= y->end && y->right != NULL) { /* Rotate left and put y on llist. */ @@ -755,7 +755,8 @@ vm_map_entry_splay(vm_offset_t addr, vm_ llist = root; root = y; } - } + } else + break; } /* From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 22:10:06 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC5071065670; Tue, 30 Dec 2008 22:10:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id A28258FC13; Tue, 30 Dec 2008 22:10:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id D0F1C41C7C9; Tue, 30 Dec 2008 23:10:05 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id UnycDox0Wxck; Tue, 30 Dec 2008 23:10:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 609E941C7D6; Tue, 30 Dec 2008 23:10:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id B8A2C4448D5; Tue, 30 Dec 2008 22:08:26 +0000 (UTC) Date: Tue, 30 Dec 2008 22:08:26 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Peter Holm In-Reply-To: <200812302039.mBUKdmHC004512@svn.freebsd.org> Message-ID: <20081230214755.Q28465@maildrop.int.zabbadoz.net> References: <200812302039.mBUKdmHC004512@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186615 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 22:10:07 -0000 On Tue, 30 Dec 2008, Peter Holm wrote: > Author: pho > Date: Tue Dec 30 20:39:47 2008 > New Revision: 186615 > URL: http://svn.freebsd.org/changeset/base/186615 > > Log: > Added missing second part of cleaning j->ip[46] as requested by bz > > Approved by: kib (mentor) > Pointy hat: pho That's not yours; this is mine. Can I grab the extra large one? In short with the words of W.S. 'much ado about nothing'. The NULLifications down there are not necessarily needed; They'll be good in case the calling code changes and doesn't immediately return after we report the copyin error here; so we might consider leaving them in as bandaid. But as long as handling of the IPs is the first thing and we abort the syscall with an error, they are superfluous. After your first commmit there was no way to escape from that function without an error or sane pointers anymore. My fault. Seen too many different versions at various stages of different virtualization and management code lately. I'll check if other upcoming code might need them or back this out myself. Sorry. > Modified: > head/sys/kern/kern_jail.c > > Modified: head/sys/kern/kern_jail.c > ============================================================================== > --- head/sys/kern/kern_jail.c Tue Dec 30 20:31:37 2008 (r186614) > +++ head/sys/kern/kern_jail.c Tue Dec 30 20:39:47 2008 (r186615) > @@ -329,9 +329,11 @@ jail_copyin_ips(struct jail *j) > e_free_ip: > #ifdef INET6 > free(ip6, M_PRISON); > + j->ip6 = NULL; > #endif > #ifdef INET > free(ip4, M_PRISON); > + j->ip4 = NULL; > #endif > return (error); > } > -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-all@FreeBSD.ORG Tue Dec 30 23:49:54 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C155106564A; Tue, 30 Dec 2008 23:49:54 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89AD88FC1C; Tue, 30 Dec 2008 23:49:54 +0000 (UTC) (envelope-from ivoras@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 mBUNnsKE009163; Tue, 30 Dec 2008 23:49:54 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBUNnsKm009162; Tue, 30 Dec 2008 23:49:54 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <200812302349.mBUNnsKm009162@svn.freebsd.org> From: Ivan Voras Date: Tue, 30 Dec 2008 23:49:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186619 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 23:49:55 -0000 Author: ivoras Date: Tue Dec 30 23:49:54 2008 New Revision: 186619 URL: http://svn.freebsd.org/changeset/base/186619 Log: Document the relationship between enum VM_GUEST and the vm_guest_sysctl_names array. Approved by: gnn (original version) Modified: head/sys/kern/subr_param.c Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Tue Dec 30 21:52:18 2008 (r186618) +++ head/sys/kern/subr_param.c Tue Dec 30 23:49:54 2008 (r186619) @@ -73,7 +73,9 @@ __FBSDID("$FreeBSD$"); #define MAXFILES (maxproc * 2) #endif -enum VM_GUEST { VM_GUEST_NO, VM_GUEST_VM, VM_GUEST_XEN }; +/* Values of enum VM_GUEST members are used as indices in + * vm_guest_sysctl_names */ +enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN }; static int sysctl_kern_vm_guest(SYSCTL_HANDLER_ARGS); From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 01:20:07 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96A1E1065674; Wed, 31 Dec 2008 01:20:07 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 51EA48FC08; Wed, 31 Dec 2008 01:20:07 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mBV1Jim3006934; Tue, 30 Dec 2008 18:19:45 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 30 Dec 2008 18:19:55 -0700 (MST) Message-Id: <20081230.181955.-160246850.imp@bsdimp.com> To: obrien@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20081230173522.GA19473@dragon.NUXI.org> References: <200812300940.mBU9epuS086194@svn.freebsd.org> <20081230173522.GA19473@dragon.NUXI.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: unixmania@gmail.com, svn-src-head@FreeBSD.org, luigi@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r186598 - head/sys/boot/i386/boot0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 01:20:08 -0000 In message: <20081230173522.GA19473@dragon.NUXI.org> "David O'Brien" writes: : On Tue, Dec 30, 2008 at 09:40:40AM -0200, Carlos A. M. dos Santos wrote: : > On Tue, Dec 30, 2008 at 7:40 AM, Luigi Rizzo wrote: : > > Author: luigi : > > Date: Tue Dec 30 09:40:50 2008 : > > New Revision: 186598 : > > URL: http://svn.freebsd.org/changeset/base/186598 : > > : > ---8<--- : > > + Add an entry "F6 PXE" when the code is built with -DPXE (which is : > > a default now). Technically, F6 boots through INT18, so the prompt 'PXE' : > > is a bit misleading. Unfortunately the name INT18 : > > is too long and does not fit in - we could use ROM perhaps. : > > The reason I picked 'PXE' is that on many (I believe) new systems : > > INT18 calls PXE. : > ---8<--- : > : > I think "PXE" will look a bit cryptic for most users. What about using : > "Net", instead? : : I think PXE is best - its a specfic type of netbooting. Otherwise, one : may wonder what type "Net" is. Well, I'm not sure there'd be a lot of difference anyway. My laptops all say some variation on 'for network boot, press ' at some point of the boot sequence... Warner From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 01:23:23 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD06D106566C; Wed, 31 Dec 2008 01:23:23 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 48A668FC22; Wed, 31 Dec 2008 01:23:23 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mBV1LdRH006944; Tue, 30 Dec 2008 18:21:39 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 30 Dec 2008 18:21:50 -0700 (MST) Message-Id: <20081230.182150.-1597331197.imp@bsdimp.com> To: rpaulo@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200812301946.mBUJk7aa003245@svn.freebsd.org> References: <200812301946.mBUJk7aa003245@svn.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186608 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 01:23:24 -0000 In message: <200812301946.mBUJk7aa003245@svn.freebsd.org> Rui Paulo writes: : Add a kernel config file so that users have less difficulty testing : USBng. One could almost create a 'USB2_GEN' file in sys/conf that had all this stuff in it, and reduce these files to a simple 'include USB2_GEN'... Warner From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 05:44:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97198106566B; Wed, 31 Dec 2008 05:44:05 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8653A8FC20; Wed, 31 Dec 2008 05:44:05 +0000 (UTC) (envelope-from alc@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 mBV5i5Mm016238; Wed, 31 Dec 2008 05:44:05 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBV5i5hO016236; Wed, 31 Dec 2008 05:44:05 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200812310544.mBV5i5hO016236@svn.freebsd.org> From: Alan Cox Date: Wed, 31 Dec 2008 05:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186633 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 05:44:06 -0000 Author: alc Date: Wed Dec 31 05:44:05 2008 New Revision: 186633 URL: http://svn.freebsd.org/changeset/base/186633 Log: Update or eliminate some stale comments. Modified: head/sys/vm/vm_map.c head/sys/vm/vm_map.h Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Wed Dec 31 05:44:00 2008 (r186632) +++ head/sys/vm/vm_map.c Wed Dec 31 05:44:05 2008 (r186633) @@ -100,7 +100,8 @@ __FBSDID("$FreeBSD$"); * Synchronization is required prior to most operations. * * Maps consist of an ordered doubly-linked list of simple - * entries; a single hint is used to speed up lookups. + * entries; a self-adjusting binary search tree of these + * entries is used to speed up lookups. * * Since portions of maps are specified by start/end addresses, * which may not align with existing map entries, all @@ -1629,7 +1630,7 @@ vm_map_protect(vm_map_t map, vm_offset_t /* * Update physical map if necessary. Worry about copy-on-write - * here -- CHECK THIS XXX + * here. */ if (current->protection != old_prot) { #define MASK(entry) (((entry)->eflags & MAP_ENTRY_COW) ? ~VM_PROT_WRITE : \ @@ -1806,7 +1807,7 @@ vm_map_madvise( * Sets the inheritance of the specified address * range in the target map. Inheritance * affects how the map will be shared with - * child maps at the time of vm_map_fork. + * child maps at the time of vmspace_fork. */ int vm_map_inherit(vm_map_t map, vm_offset_t start, vm_offset_t end, Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Wed Dec 31 05:44:00 2008 (r186632) +++ head/sys/vm/vm_map.h Wed Dec 31 05:44:05 2008 (r186633) @@ -109,7 +109,6 @@ struct vm_map_entry { union vm_map_object object; /* object I point to */ vm_ooffset_t offset; /* offset into object */ vm_eflags_t eflags; /* map entry flags */ - /* Only in task maps: */ vm_prot_t protection; /* protection code */ vm_prot_t max_protection; /* maximum protection */ vm_inherit_t inheritance; /* inheritance */ @@ -168,13 +167,6 @@ vm_map_entry_system_wired_count(vm_map_e * Tarjan's top-down splay algorithm is employed to control * height imbalance in the binary search tree. * - * Note: the lock structure cannot be the first element of vm_map - * because this can result in a running lockup between two or more - * system processes trying to kmem_alloc_wait() due to kmem_alloc_wait() - * and free tsleep/waking up 'map' and the underlying lockmgr also - * sleeping and waking up on 'map'. The lockup occurs when the map fills - * up. The 'exec' map, for example. - * * List of locks * (c) const until freed */ @@ -186,7 +178,7 @@ struct vm_map { vm_size_t size; /* virtual size */ u_int timestamp; /* Version number */ u_char needs_wakeup; - u_char system_map; /* Am I a system map? */ + u_char system_map; /* (c) Am I a system map? */ vm_flags_t flags; /* flags for this vm_map */ vm_map_entry_t root; /* Root of a binary search tree */ pmap_t pmap; /* (c) Physical map */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 05:49:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE1421065851; Wed, 31 Dec 2008 05:49:15 +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 9C4F98FC17; Wed, 31 Dec 2008 05:49:15 +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 mBV5nFW1016362; Wed, 31 Dec 2008 05:49:15 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBV5nFAN016361; Wed, 31 Dec 2008 05:49:15 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200812310549.mBV5nFAN016361@svn.freebsd.org> From: Hiroki Sato Date: Wed, 31 Dec 2008 05:49:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186634 - releng/7.1/release/doc/share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 05:49:16 -0000 Author: hrs Date: Wed Dec 31 05:49:15 2008 New Revision: 186634 URL: http://svn.freebsd.org/changeset/base/186634 Log: Add arch="" attr support. Approved by: re (implicit) Modified: releng/7.1/release/doc/share/sgml/release.dsl Modified: releng/7.1/release/doc/share/sgml/release.dsl ============================================================================== --- releng/7.1/release/doc/share/sgml/release.dsl Wed Dec 31 05:44:05 2008 (r186633) +++ releng/7.1/release/doc/share/sgml/release.dsl Wed Dec 31 05:49:15 2008 (r186634) @@ -56,46 +56,18 @@ ; Deal with conditional inclusion of text via entities. (default - (let* ((arch (attribute-string (normalize "arch"))) - (role (attribute-string (normalize "role"))) + (let* ((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. + ;; If role=historic, and we're not printing historic things, then + ;; don't output this element. ((and (equal? role "historic") - (not %include-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))))) + ;; None of the above + (else (next-match))))) (mode qandatoc (default @@ -150,6 +122,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-all@FreeBSD.ORG Wed Dec 31 05:50:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D65810657C0; Wed, 31 Dec 2008 05:50:37 +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 5B5138FC1E; Wed, 31 Dec 2008 05:50:37 +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 mBV5obCM016428; Wed, 31 Dec 2008 05:50:37 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBV5obiN016426; Wed, 31 Dec 2008 05:50:37 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200812310550.mBV5obiN016426@svn.freebsd.org> From: Hiroki Sato Date: Wed, 31 Dec 2008 05:50:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186635 - in releng/7.1/release/doc: en_US.ISO8859-1/share/sgml share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 05:50:38 -0000 Author: hrs Date: Wed Dec 31 05:50:37 2008 New Revision: 186635 URL: http://svn.freebsd.org/changeset/base/186635 Log: Bump version numbers and update descriptions for 7.1R. Approved by: re (implicit) Modified: releng/7.1/release/doc/en_US.ISO8859-1/share/sgml/release.dsl releng/7.1/release/doc/share/sgml/release.ent Modified: releng/7.1/release/doc/en_US.ISO8859-1/share/sgml/release.dsl ============================================================================== --- releng/7.1/release/doc/en_US.ISO8859-1/share/sgml/release.dsl Wed Dec 31 05:49:15 2008 (r186634) +++ releng/7.1/release/doc/en_US.ISO8859-1/share/sgml/release.dsl Wed Dec 31 05:50:37 2008 (r186635) @@ -10,6 +10,7 @@ + (define %refentry-xref-link% #t) @@ -38,17 +39,6 @@ (make element gi: "p" attributes: (list (list "align" "center")) (make element gi: "small" - (literal "All users of FreeBSD ") - (literal (entity-text "release.branch")) - (literal " should subscribe to the ") - (literal "<") - (create-link (list (list "HREF" "mailto:stable@FreeBSD.org")) - (literal "stable@FreeBSD.org")) - (literal "> mailing list."))) - - (make element gi: "p" - attributes: (list (list "align" "center")) - (make element gi: "small" (literal "For questions about this documentation, e-mail <") (create-link (list (list "HREF" "mailto:doc@FreeBSD.org")) (literal "doc@FreeBSD.org")) Modified: releng/7.1/release/doc/share/sgml/release.ent ============================================================================== --- releng/7.1/release/doc/share/sgml/release.ent Wed Dec 31 05:49:15 2008 (r186634) +++ releng/7.1/release/doc/share/sgml/release.ent Wed Dec 31 05:50:37 2008 (r186635) @@ -6,7 +6,7 @@ - + - - - - + - + - + - + - - + + - - - + + - + From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 05:53:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A982106564A; Wed, 31 Dec 2008 05:53:38 +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 EBA058FC12; Wed, 31 Dec 2008 05:53:37 +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 mBV5rbrB016516; Wed, 31 Dec 2008 05:53:37 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBV5rb32016515; Wed, 31 Dec 2008 05:53:37 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200812310553.mBV5rb32016515@svn.freebsd.org> From: Hiroki Sato Date: Wed, 31 Dec 2008 05:53:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186636 - releng/7.1/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 05:53:38 -0000 Author: hrs Date: Wed Dec 31 05:53:37 2008 New Revision: 186636 URL: http://svn.freebsd.org/changeset/base/186636 Log: Update release notes for 7.1R: SA-08:05.openssh, SA-08:06.bind, SA-08:07.amd64, SA-08:08.nmount, SA-08:09.icmp6, SA-08:10.nd6, SA-08:11.arc4random, SA-08:12.ftpd, SA-08:13.protosw, clock id CLOCK_THREAD_CPUTIME_ID added, cpuset(2) added, DTrace framework and dtrace(1), ddb(4) capture, ex /S command, show conifhk added, fcntl F_DUP2FD, linux(4) sched_setaffinity() and get_setaffinity(), in-kernel NFSLOCKD, textdump, ULE enabled by default, wait4(2) WNOWAIT and WSTOPPED added, CPU binding of interrupts on amd64,i386,sparc64, kern.features.compat_freebsd[456] sysctls, BTX USB drive issue fixed, gptboot boot loader, kbdmux(4) on sparc64, nvram(4) MPSAFE, puc(4) PUC_FASTINTR option removed, psm(4) Synaptics detection changed, agp(4) G33/G45 support, dpms(4) added for suspend/resume support, DRM supports i915 GME devices, hme(4) improved, ixgbe(4) updated to 1.6.2, auto-negotiation issue in some PHYs in miibus(4) fixed, workaround of msk(4) checksum offload issue added, ndis(4) improved, sf(4) improved, stge(4) WOL support, vr(4) improved, wpi(4) improved, arp(8) reject/blackhole keywords added, bpf(4) ioctl BIOCSETFNR added, if_bridge(4) ifmaxaddr parameter added, carp(4) stability fix, dummynet(4) fast mode, enc(4) inner/outer header selection for firewall or bpf(4) via sysctl, gre(4) GRE key support, ipsec(4) PMTU issue fixed, netatm removed, ng_nat(4) redirect support, ng_pptpgre(4) multiple hook support, resolver(3) underscore support, TCP_CONGESTION socket option for TCP socket, rwlock(9) now used in various network stack, aac(4) >2TB array support, ata(4) 80pin cable check sysctl added, ata(4) ServerWorks HT1000 chipset issue fixed, ciss(4) ADAPTER HEARTBEAT FAILED issue fixed, geom_part kernel module support, geom_linux_lvm kernel module support, iir(4) stability fix, mpt(4) mpt_user personality added, rr232x(4) removed in favor of hptrr(4), twa(4) stability fix, fdescfs(5) MPSAFE, gpart(8) BSD and VTOC8 support, gvinum(8) volume parameter support when a plex created, unionfs(7) pathname lookup issue of UNIX domain socket fixed, atacontrol(8) spindown command added, chflags(1) -v, -f, -h options added, cp(1) -a added, cp(1) ACL bug fixed, cron(8) -m flag added, dhclient(8) more options added, dhclient(8) is_default_interface() function added, dhclient(8) default route handling bug fixed, environ(7) unsetting detection improved, fdisk(8) -q flag added, fetch(1) NO_PROXY added, ffsll(3) and flsll(3) added, fortune(6) FORTUNE_PATH added, fortune(6) an issue of -e with multiple files fixed, freebsd-update.conf(5) IDSIgnorePaths added, fwcontrol(8) -f node option added, gcc(1) -mcpu support on sparc64, gpt(8) ZFS support, ifconfig(8) WPS IE support, kgdb(1) add-kld command, kld shared-lib backend support, tid command, kvm_getcptime(3) added, libalias PORT/EPRT of FTP command in lowercase support, man(1) bzip2-compressed manual page support, mdconfig(8) -v added, memrchr(3) added, morse(6) grammar fix, mountd(8) -h added, moused(8) -L added, mv(1) POSIX comformance improved, periodic(8) daily_status_mail_rejects_shorten added, ping6(8) exit status change, ping6(8) -o, -r, -R added, ping6(8) minimum allowed interval changed, rfcomm_pppd(8) -D added, sdpd(8) NAP, GN, PANU profiles added, setkey(8) esp keyword support, telnetd(8) -a off bugfix, top(1) and vmstat(8) -P flag added, traceroute(8) -a for AS number lookup added, uuid_{enc,dec}_{be,le}(3) functions added, watch(8) >10 snp(4) devices support, ypserv(8) -P added, rc.d var dummynet_enable added, a bug in rc.d/ntpd when no configuration has been fixed, rc.d/ppp multiple instances support, rc.d/sysctl /etc/sysctl.conf.local support, rc.firewall setting in rc.conf, am-utils 6.1.5, ISC BIND 9.4.2-P2, bzip2 1.0.5, CVS 1.11.22.1, hostapd 0.5.10 + radius ACL support, libarchive 2.5.5, ncurses 5.6-20080503, NTP 4.2.4p5, resolver library to ISC BIND 9.4.3, timezone database tzdata2008h, wpa_supplicant 0.5.10 + syslog support, and KDE 3.5.10. Approved by: re (implicit) Modified: releng/7.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: releng/7.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- releng/7.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Dec 31 05:50:37 2008 (r186635) +++ releng/7.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Dec 31 05:53:37 2008 (r186636) @@ -4,96 +4,85 @@ %release; - - - - - ]>
- - &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 + 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 @@ -103,251 +92,776 @@ 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. - - - Boot Loader Changes - - - - [&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 - - - - + + What's New - - Disks and Storage - - 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. - - - - - File Systems - - - - - - - Userland Changes - - 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 - - - - - - - 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. - - 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. - - 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. - - - - - Ports/Packages Collection Infrastructure - - - - - - - Release Engineering and Integration - - The supported version of - the GNOME desktop environment - (x11/gnome2) has been - updated from 2.20.1 to 2.22. - - - - - Documentation - - - - - - - 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. - - 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. - - + 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 + + Problems described in the following security advisories has + been fixed. For more information, consult the individual + advisories available from + . + + + + + + + + + Advisory + Date + Topic + + + + + + SA-08:05.openssh + 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 + + + + + + + + Kernel Changes + + The &man.clock.gettime.2; and the related system calls now + support a clock ID CLOCK_THREAD_CPUTIME_ID, + defined in POSIX. + + The &man.cpuset.2; system call has been added. This is an + API for thread to CPU binding and CPU resource grouping and + assignment. + + The DTrace, a comprehensive dynamic tracing framework and + &man.dtrace.1; userland utility have been imported from + OpenSolaris. DTrace provides a powerful infrastructure to + permit administrators, developers, and service personnel to + concisely answer arbitrary questions about the behavior of the + operating system and user programs. + + 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 &man.ddb.4; ex command now supports + an mode which interprets and prints the + value at the requested address as a symbol. For example, + ex /S aio_swake + prints the name of the function currently registered in + via aio_swake hook. + + The &man.ddb.4; show conifhk command has + been added. This lists hooks currently waiting for completion + in run_interrupt_driven_config_hooks(). + + The &man.fcntl.2; system call now supports + F_DUP2FD command. This is equivalent to + &man.dup.2;, and compatible with Sun Solaris and IBM AIX. + + The &os;'s &man.linux.4; ABI support now implements + sched_setaffinity() and + get_setaffinity() using real CPU affinity + setting primitives. + + The client side functionality of &man.rpc.lockd.8; has been + implemented in &os; kernel. This implementation provides the + correct semantics for &man.flock.2; style locks which are used + by the &man.lockf.1; command line tool and the &man.pidfile.3; + library. It also implements recovery from server restarts and + ensures that dirty cache blocks are written to the server before + obtaining locks (allowing multiple clients to use file locking + to safely share data). Also, a new kernel option + options NFSLOCKD has been added and enabled + by default. If the kernel support is enabled, &man.rpc.lockd.8; + automatically detects and uses the functionality. + + The &os; 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. + + The &man.wait4.2; system call now supports + flag to keep the process whose status + is returned in a waitable state and + which is equivalent to . + + The &os; kernel now supports + initial support of binding interrupts to CPUs. + + The &man.sched.ule.4; scheduler is now the default + process scheduler in GENERIC + kernels. + + The sysctl + variables kern.features.compat_freebsd[456] + have been added. These are corresponding to the kernel options + COMPAT_FREEBSD[456]. + + + Boot Loader Changes + + 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. + + 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.kbdmux.4; driver has been added. + The &man.sunkbd.4; now supports &man.atkbd.4; emulation like + &man.ukbd.4;. + + The nvram(4) driver is now + MPSAFE. + + An option of the &man.puc.4; + driver PUC_FASTINTR has been no longer + supported. + + The &man.psm.4; driver now attempts detection of Synaptics + touchpad before IntelliMouse. Some touchpads will pretend to + be IntelliMouse causing the IntelliMouse probe to work and the + Synaptics detection never to be done. + + The &man.uslcom.4; driver, a driver for Silicon + Laboratories CP2101/CP2102-based USB serial adapters, has been + imported from OpenBSD. + + + Multimedia Support + + The &man.agp.4; driver now supports Intel G33 and + G45. + + The dpms(4) driver has + been added to use the VESA BIOS for DPMS during suspend and + resume. + + The DRM kernel driver now + supports i915 GME devices. + + + + 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. + + The &man.hme.4; driver has been improved. + + The &man.ixgbe.4; driver has been updated to version + 1.6.2 from Intel. + + A bug in some of the &man.miibus.4; supported drivers that + IEEE 802.3 auto-negotiation was performed in a wrong order, + has been fixed. Now it chooses the correct technologies + supported by IEEE 802.3 in the order described in Annex + 28B.3. + + A workaround has been added for a bug in TCP/UDP + hardware checksum offload of the &man.msk.4; driver for + short frames. Note that for frames that requires hardware + VLAN tag insertion, the checksum offload workaround does not + work due to changes of checksum offset in mbuf after the + VLAN tag. So disabling hardware checksum offload for the + VLAN interface is needed in such cases. + + The &man.ndis.4; NDIS miniport driver wrapper has been + improved. + + The &man.sf.4; driver has been improved and now supports + checksum offloading. + + The &man.stge.4; driver now supports WOL (Wake on + LAN). + + The &man.vr.4; driver has been improved. + + The &man.wpi.4; driver has + been updated to include a number of stability fixes. + + + + + Network Protocols + + The &man.arp.8; utility now + supports reject + and blackhole keywords. In the entry + marked as reject, traffic to the host will + be discarded and the sender will be notified the host is + unreachable. In the entry marked as blackhole, + traffic is discarded but the sender is not notified. + + The &man.bpf.4; now supports an + ioctl BIOCSETFNR. This is just like + BIOCSETF but it does not drop all the + packets buffered on the descriptor and reset the + statistics. + + The &man.if.bridge.4; now allow to limit the number of + source MACs that can be behind a bridge interface + via ifmaxaddr parameter of + &man.ifconfig.8;. + + A bug in the &man.carp.4; interface configuration which + leads to a system panic has been fixed. + + The &man.dummynet.4; subsystem now supports + fast mode operation which allows certain + packets to bypass the dummynet scheduler. This can achieve + lower latency and lower overhead when the packet flow is under + the pipe bandwidth, and eliminate recursion in the subsystem. + The new sysctl variable + net.inet.ip.dummynet.io_fast has been + added to enable this feature. + + The &man.enc.4; now supports sysctl variables to + control whether the firewalls or &man.bpf.4; will see inner + and outer headers or just inner or outer headers for incoming + and outgoing IPsec packets. + + The &man.gre.4; now supports + ioctls GRESKEY + and GREGKEY which allows set or get GRE + key used for outgoing packets. + + A bug in the &man.ipsec.4; subsystem that PMTU was broken + in those cases when there was a route with a lower MTU than + the MTU of the outgoing interface, has been fixed. + + The netatm subsystem has been removed due to + lacking of multiprocessor support. + + The &man.ng.nat.4; now supports redirect functionality + in libalias. For more details, see the + manual page. + + The &man.ng.pptpgre.4; now supports multiple hooks like + &man.ng.l2tp.4;, to use one pair of pptpgre and ksocket nodes for all + calls between two peers. + + The &man.resolver.3; now allows underscore in domain + names. Although this is a violation of RFC 1034 [STD 13], it is + accepted by certain name servers as well as other popular operating + systems' resolver library. + + A socket option TCP_CONGESTION for TCP + socket has been added. This is for setting and retrieving the + congestion control algorithm. The name used is to allow + compatibility with Linux. + + The &man.rwlock.9; has been used throughout + the inpcbinfo and inpcb + infrastructure, and protocols that depend on that + infrastructure, including UDP, TCP, and IP raw sockets to + reduce the lock contentions. + + + + Disks and Storage + + The &man.aac.4; driver now supports 64-bit array support + for RAIDs larger than 2TB and simultaneous opens of the device + for issuing commands to the controller. + + The &man.ata.4; driver now supports a loader variable + hw.ata.ata_dma_check_80pin. This can be + used to disable the 80pin cable check on broken systems such + as certain laptops and Soekris boards. The default value is + 1. + + A data corruption problem of the &man.ata.4; driver on + ServerWorks HT1000 chipsets has been fixed. + + The &man.ciss.4; driver now supports a loader tunable + hw.ciss.nop_message_heartbeat for + NOP-message polling in ciss_periodic(). + This can be used as a workaround for + ADAPTER HEARTBEAT FAILED issue. + The default value is 0 (disabled). + + The geom_part GEOM class can be built + as a kernel module. + + The geom_linux_lvm GEOM class can be + built as a kernel module. + + The &man.hptrr.4; driver has been updated to version 1.2 + from Highpoint. + + A buffer overflow in the &man.iir.4; driver has been + fixed. This likely fixes a great number of weird problems + that have been reported with this driver. + + The &man.mpt.4; driver now supports mpt_user + personality. + + The &man.rr232x.4; driver has been superseded by + &man.hptrr.4; driver. + + The &man.twa.4; driver has been improved with regard to + stability on machines with a plenty of memory and high CPU + load. + + + + File Systems + + The &man.fdescfs.5; is now MPSAFE. + + The &man.gpart.8; now supports BSD disklabels (option + GEOM_PART_BSD) and + VTOC8 disklabels (option + GEOM_PART_VTOC8). + + The &man.gvinum.8; now accepts volume + parameter when creating a plex. + + A pathname lookup bug of a UNIX domain socket in the + unionfs(7) has been fixed. + + + + + Userland Changes + + The &man.adduser.8; utility now supports + a option to set the mode of a new user's + home directory. + + The &man.atacontrol.8; utility now supports + a spindown command to set or report timeout + after which the device will be spun down. + + The &man.chflags.1; now supports a flag for + verbose output, a flag to ignore errors, + and to allow setting flags on symbolic links + with the same semantics as (for example) &man.chmod.1;. + + The &man.cp.1; now supports a flag, which is + equivalent to flags. + + A bug in the &man.cp.1; utility which prevents POSIX.1e ACL (see + also &man.acl.3;) from copying properly has been fixed. + + The &man.cron.8; utility now supports flag which + overrides the default mail recipient for cron mails unless explicitly + provided by MAILTO= line in crontab + file. + + The &man.dhclient.8; now supports more options described in + &man.dhcp-options.5;. + + The &man.dhclient.8; now + supports is_default_interface() function + which determines if this interface is one with the default + route. + + A bug in the &man.dhclient.8; that prevents removal of the + default route from working has been fixed. + + The &man.environ.7;, environment array of strings now + supports unsetting a variable by setting the first character to + NULL. This is required by third-party software such as + Dovecot + and Postfix. + + The &man.fdisk.8; now supports a flag to + not display any warnings. + + The &man.fetch.1; program and libfetch + library now supports a NO_PROXY environment + variable. This specifies comma- or whitespace-separated list of + host names for which proxies should not be used. If a single + asterisk is specified, the use of proxies is disabled. + + The &man.ffsll.3; and &man.flsll.3; functions have been added. + These functions are the same as &man.ffs.3; and &man.fls.3; except that + they accept long long as the arguments. + + The &man.fortune.6; program now supports + FORTUNE_PATH environment variable to specify + search path of the fortune files. + + A bug in the &man.fortune.6; program that prevents + option with multiple files from working has + been fixed. + + The &man.freebsd-update.conf.5; now supports + IDSIgnorePaths statement. + + The &man.fwcontrol.8; utility now supports option which specifies + node as the root node on the next bus + reset. + + The &man.gcc.1; now + accepts option properly; it was hardcoded + as . + + The &man.gpt.8; now supports ZFS. + + The &man.ifconfig.8; now supports display of WPS IE + (Wireless Provisioning Services Information Element). + + The &man.kgdb.1; now supports + an add-kld kld + command to locate a &man.kld.4; and load its symbols. + + The &man.kgdb.1; now has a shared library backend for kernel + files that treats &man.kld.4; as shared libraries and + auto-loading symbols for &man.kld.4; on startup. + + The &man.kgdb.1; now supports a tid command + and other kernel module related commands even for a remote + target. + + The &man.kvm.getcptime.3; function to obtain the global CPU + time statistics from the kernel has been added. + + The libalias library now supports + PORT and + EPRT + FTP commands in lowercase. + + The &man.man.1; now includes a limited support of + &man.bzip2.1;-compressed manual pages. + + The &man.mdconfig.8; now supports a + (verbose) flag to command. It shows size + and backing store of all &man.md.4; devices at one time. + + The &man.memrchr.3; function has been added. This behaves + like &man.memchr.3; except that it locates the last occurrence + of the specified character in the string. + + The incorrect output grammar of &man.morse.6; program has + been fixed. + + The &man.mountd.8; utility now supports option which + specifies IP addresses to bind to for TCP and UDP requests. + This option may be specified multiple times. If no + option is specified, + INADDR_ANY will be used. Note that when + specifying IP addresses with this option, it will + automatically add 127.0.0.1 and if IPv6 is + enabled, ::1 to the list. + + The &man.moused.8; utility now supports + flag which changes the speed of scrolling and changes + option behavior to only affect the scroll + threshold. + + The &man.mv.1; now support POSIX specification when moving a + directory to an existing directory across devices. + + The &man.periodic.8; now supports + daily_status_mail_rejects_shorten + configuration variable in &man.periodic.conf.5;. This allows + the rejected mail reports to tally the rejects per blacklist + without providing details about individual sender hosts. The + default configuration keeps the reports in their original + form. + + The &man.ping6.8; now uses exit status of *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 05:56:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75312106564A; Wed, 31 Dec 2008 05:56:22 +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 6351B8FC13; Wed, 31 Dec 2008 05:56:22 +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 mBV5uM4j016627; Wed, 31 Dec 2008 05:56:22 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBV5uMx4016625; Wed, 31 Dec 2008 05:56:22 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200812310556.mBV5uMx4016625@svn.freebsd.org> From: Hiroki Sato Date: Wed, 31 Dec 2008 05:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186637 - in releng/7.1/release/doc: en_US.ISO8859-1/errata share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 05:56:23 -0000 Author: hrs Date: Wed Dec 31 05:56:22 2008 New Revision: 186637 URL: http://svn.freebsd.org/changeset/base/186637 Log: Trim 7.1R Errata. Approved by: re (implicit) Modified: releng/7.1/release/doc/en_US.ISO8859-1/errata/article.sgml releng/7.1/release/doc/share/sgml/release.ent Modified: releng/7.1/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- releng/7.1/release/doc/en_US.ISO8859-1/errata/article.sgml Wed Dec 31 05:53:37 2008 (r186636) +++ releng/7.1/release/doc/en_US.ISO8859-1/errata/article.sgml Wed Dec 31 05:56:22 2008 (r186637) @@ -16,7 +16,7 @@ %release; - + ]>
@@ -125,11 +125,9 @@ Security Advisories -No advisories. -]]> -The following security advisories pertain to &os; &release.bugfix;. For more information, consult the individual advisories available from . @@ -163,77 +161,19 @@ -]]> - +--> 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). - -]]> - 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: releng/7.1/release/doc/share/sgml/release.ent ============================================================================== --- releng/7.1/release/doc/share/sgml/release.ent Wed Dec 31 05:53:37 2008 (r186636) +++ releng/7.1/release/doc/share/sgml/release.ent Wed Dec 31 05:56:22 2008 (r186637) @@ -18,6 +18,8 @@ edge. --> + + From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 05:59:55 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 599A7106564A; Wed, 31 Dec 2008 05:59:55 +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 2EADB8FC1E; Wed, 31 Dec 2008 05:59:55 +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 mBV5xtFg016716; Wed, 31 Dec 2008 05:59:55 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBV5xtw3016715; Wed, 31 Dec 2008 05:59:55 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200812310559.mBV5xtw3016715@svn.freebsd.org> From: Hiroki Sato Date: Wed, 31 Dec 2008 05:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186638 - in releng/7.1/release/doc: de_DE.ISO8859-1 fr_FR.ISO8859-1 ja_JP.eucJP ru_RU.KOI8-R X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 05:59:55 -0000 Author: hrs Date: Wed Dec 31 05:59:54 2008 New Revision: 186638 URL: http://svn.freebsd.org/changeset/base/186638 Log: Remove old (unmaintained) translations. Approved by: re (implicit) Deleted: releng/7.1/release/doc/de_DE.ISO8859-1/ releng/7.1/release/doc/fr_FR.ISO8859-1/ releng/7.1/release/doc/ja_JP.eucJP/ releng/7.1/release/doc/ru_RU.KOI8-R/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 06:27:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 454361065679; Wed, 31 Dec 2008 06:27:10 +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 341FC8FC1D; Wed, 31 Dec 2008 06:27:10 +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 mBV6R9VT017247; Wed, 31 Dec 2008 06:27:09 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBV6R9Hk017246; Wed, 31 Dec 2008 06:27:09 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200812310627.mBV6R9Hk017246@svn.freebsd.org> From: Hiroki Sato Date: Wed, 31 Dec 2008 06:27:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186639 - releng/7.1/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 06:27:10 -0000 Author: hrs Date: Wed Dec 31 06:27:09 2008 New Revision: 186639 URL: http://svn.freebsd.org/changeset/base/186639 Log: Fix order in arch="". Approved by: re (implicit) Modified: releng/7.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: releng/7.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- releng/7.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Dec 31 05:59:54 2008 (r186638) +++ releng/7.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Dec 31 06:27:09 2008 (r186639) @@ -293,12 +293,12 @@ Boot Loader Changes - The BTX kernel used by the boot + 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. - A new gptboot boot loader has + 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 @@ -837,7 +837,7 @@ Upgrading from previous releases of &os; - Beginning with &os; 6.2-RELEASE, + 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 From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 07:38:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 428061065687; Wed, 31 Dec 2008 07:38:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 305F18FC13; Wed, 31 Dec 2008 07:38:05 +0000 (UTC) (envelope-from imp@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 mBV7c5B4018569; Wed, 31 Dec 2008 07:38:05 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBV7c5Tg018568; Wed, 31 Dec 2008 07:38:05 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812310738.mBV7c5Tg018568@svn.freebsd.org> From: Warner Losh Date: Wed, 31 Dec 2008 07:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186640 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 07:38:05 -0000 Author: imp Date: Wed Dec 31 07:38:04 2008 New Revision: 186640 URL: http://svn.freebsd.org/changeset/base/186640 Log: First pass at 64-bit elf support Added: head/sys/mips/mips/elf64_machdep.c (contents, props changed) - copied, changed from r186189, head/sys/mips/mips/elf_machdep.c Copied and modified: head/sys/mips/mips/elf64_machdep.c (from r186189, head/sys/mips/mips/elf_machdep.c) ============================================================================== --- head/sys/mips/mips/elf_machdep.c Tue Dec 16 19:15:31 2008 (r186189, copy source) +++ head/sys/mips/mips/elf64_machdep.c Wed Dec 31 07:38:04 2008 (r186640) @@ -25,6 +25,8 @@ * from: src/sys/i386/i386/elf_machdep.c,v 1.20 2004/08/11 02:35:05 marcel */ +#define __ELF_WORD_SIZE 64 + #include __FBSDID("$FreeBSD$"); @@ -47,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include -struct sysentvec elf32_freebsd_sysvec = { +struct sysentvec elf64_freebsd_sysvec = { .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, .sv_mask = 0, @@ -61,7 +63,7 @@ struct sysentvec elf32_freebsd_sysvec = .sv_sigcode = sigcode, .sv_szsigcode = &szsigcode, .sv_prepsyscall = NULL, - .sv_name = "FreeBSD ELF32", + .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, @@ -75,198 +77,41 @@ struct sysentvec elf32_freebsd_sysvec = .sv_setregs = exec_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL, - .sv_flags = SV_ABI_FREEBSD | SV_ILP32 + .sv_flags = SV_ABI_FREEBSD | SV_LP64 }; -static Elf32_Brandinfo freebsd_brand_info = { - .brand = ELFOSABI_FREEBSD, +static Elf64_Brandinfo freebsd_brand_gnutools_info64 = { + .brand = ELFOSABI_NONE, .machine = EM_MIPS, - .compat_3_brand = "FreeBSD", + .compat_3_brand = "Unix System V ABI", .emul_path = NULL, .interp_path = "/libexec/ld-elf.so.1", - .sysvec = &elf32_freebsd_sysvec, - .interp_newpath = NULL, - .flags = 0 + .sysvec = &elf64_freebsd_sysvec, + .interp_path = "/libexec/ld-elf.so.1", + .flags = BI_CAN_EXEC_DYN }; -SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY, - (sysinit_cfunc_t) elf32_insert_brand_entry, - &freebsd_brand_info); +SYSINIT(gnu_mips_elf64, SI_SUB_EXEC, SI_ORDER_ANY, + (sysinit_cfunc_t) elf64_insert_brand_entry, + &freebsd_brand_gnutools_info64); -static Elf32_Brandinfo freebsd_brand_oinfo = { +static Elf64_Brandinfo freebsd_brand_info64 = { .brand = ELFOSABI_FREEBSD, .machine = EM_MIPS, .compat_3_brand = "FreeBSD", .emul_path = NULL, - .interp_path = "/usr/libexec/ld-elf.so.1", - .sysvec = &elf32_freebsd_sysvec, + .interp_path = "/libexec/ld-elf.so.1", + .sysvec = &elf64_freebsd_sysvec, .interp_newpath = NULL, .flags = 0 }; -SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY, - (sysinit_cfunc_t) elf32_insert_brand_entry, - &freebsd_brand_oinfo); - +SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY, + (sysinit_cfunc_t) elf64_insert_brand_entry, + &freebsd_brand_info64); void -elf32_dump_thread(struct thread *td __unused, void *dst __unused, +elf64_dump_thread(struct thread *td __unused, void *dst __unused, size_t *off __unused) { } - -/* Process one elf relocation with addend. */ -static int -elf_reloc_internal(linker_file_t lf, Elf_Addr relocbase, const void *data, - int type, int local, elf_lookup_fn lookup) -{ - Elf_Addr *where = (Elf_Addr *)NULL;; - Elf_Addr addr; - Elf_Addr addend = (Elf_Addr)0; - Elf_Word rtype = (Elf_Word)0, symidx; - const Elf_Rel *rel; - const Elf_Rela *rela; - - switch (type) { - case ELF_RELOC_REL: - rel = (const Elf_Rel *)data; - where = (Elf_Addr *) (relocbase + rel->r_offset); - addend = *where; - rtype = ELF_R_TYPE(rel->r_info); - symidx = ELF_R_SYM(rel->r_info); - break; - case ELF_RELOC_RELA: - rela = (const Elf_Rela *)data; - where = (Elf_Addr *) (relocbase + rela->r_offset); - addend = rela->r_addend; - rtype = ELF_R_TYPE(rela->r_info); - symidx = ELF_R_SYM(rela->r_info); - break; - default: - panic("unknown reloc type %d\n", type); - } - - if (local) { -#if 0 /* TBD */ - if (rtype == R_386_RELATIVE) { /* A + B */ - addr = relocbase + addend; - if (*where != addr) - *where = addr; - } - return (0); -#endif - } - - switch (rtype) { - - case R_MIPS_NONE: /* none */ - break; - - case R_MIPS_16: /* S + sign-extend(A) */ - /* - * There shouldn't be R_MIPS_16 relocs in kernel objects. - */ - printf("kldload: unexpected R_MIPS_16 relocation\n"); - return -1; - break; - - case R_MIPS_32: /* S + A - P */ - addr = lookup(lf, symidx, 1); - if (addr == 0) - return -1; - addr += addend; - if (*where != addr) - *where = addr; - break; - - case R_MIPS_REL32: /* A - EA + S */ - /* - * There shouldn't be R_MIPS_REL32 relocs in kernel objects? - */ - printf("kldload: unexpected R_MIPS_REL32 relocation\n"); - return -1; - break; - - case R_MIPS_26: /* ((A << 2) | (P & 0xf0000000) + S) >> 2 */ - break; - - case R_MIPS_HI16: - /* extern/local: ((AHL + S) - ((short)(AHL + S)) >> 16 */ - /* _gp_disp: ((AHL + GP - P) - (short)(AHL + GP - P)) >> 16 */ - break; - - case R_MIPS_LO16: - /* extern/local: AHL + S */ - /* _gp_disp: AHL + GP - P + 4 */ - break; - - case R_MIPS_GPREL16: - /* extern/local: ((AHL + S) - ((short)(AHL + S)) >> 16 */ - /* _gp_disp: ((AHL + GP - P) - (short)(AHL + GP - P)) >> 16 */ - break; - - case R_MIPS_LITERAL: /* sign-extend(A) + L */ - break; - - case R_MIPS_GOT16: /* external: G */ - /* local: tbd */ - break; - - case R_MIPS_PC16: /* sign-extend(A) + S - P */ - break; - - case R_MIPS_CALL16: /* G */ - break; - - case R_MIPS_GPREL32: /* A + S + GP0 - GP */ - break; - - case R_MIPS_GOTHI16: /* (G - (short)G) >> 16 + A */ - break; - - case R_MIPS_GOTLO16: /* G & 0xffff */ - break; - - case R_MIPS_CALLHI16: /* (G - (short)G) >> 16 + A */ - break; - - case R_MIPS_CALLLO16: /* G & 0xffff */ - break; - - default: - printf("kldload: unexpected relocation type %d\n", - rtype); - return (-1); - } - return(0); -} - -int -elf_reloc(linker_file_t lf, Elf_Addr relocbase, const void *data, int type, - elf_lookup_fn lookup) -{ - - return (elf_reloc_internal(lf, relocbase, data, type, 0, lookup)); -} - -int -elf_reloc_local(linker_file_t lf, Elf_Addr relocbase, const void *data, - int type, elf_lookup_fn lookup) -{ - - return (elf_reloc_internal(lf, relocbase, data, type, 1, lookup)); -} - -int -elf_cpu_load_file(linker_file_t lf __unused) -{ - - return (0); -} - -int -elf_cpu_unload_file(linker_file_t lf __unused) -{ - - return (0); -} From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 07:39:23 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECF671065670; Wed, 31 Dec 2008 07:39:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBE8C8FC16; Wed, 31 Dec 2008 07:39:23 +0000 (UTC) (envelope-from imp@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 mBV7dNJ2018641; Wed, 31 Dec 2008 07:39:23 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBV7dNcq018640; Wed, 31 Dec 2008 07:39:23 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812310739.mBV7dNcq018640@svn.freebsd.org> From: Warner Losh Date: Wed, 31 Dec 2008 07:39:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186641 - head/gnu/lib/libstdc++ X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 07:39:24 -0000 Author: imp Date: Wed Dec 31 07:39:23 2008 New Revision: 186641 URL: http://svn.freebsd.org/changeset/base/186641 Log: There's no need to redundantly redefine atomicity.h. Modified: head/gnu/lib/libstdc++/Makefile Modified: head/gnu/lib/libstdc++/Makefile ============================================================================== --- head/gnu/lib/libstdc++/Makefile Wed Dec 31 07:38:04 2008 (r186640) +++ head/gnu/lib/libstdc++/Makefile Wed Dec 31 07:39:23 2008 (r186641) @@ -75,7 +75,6 @@ MARCHDIR= i486 MARCHDIR= ${MACHINE_ARCH} .endif -ATOMICITY_H= atomicity.h .if exists(${SRCDIR}/config/cpu/${MARCHDIR}/atomicity.h) ATOMICITY_H= ${SRCDIR}/config/cpu/${MARCHDIR}/atomicity.h .else From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 07:41:43 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8532106566B; Wed, 31 Dec 2008 07:41:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B729B8FC08; Wed, 31 Dec 2008 07:41:42 +0000 (UTC) (envelope-from imp@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 mBV7fge1018721; Wed, 31 Dec 2008 07:41:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBV7fgnw018720; Wed, 31 Dec 2008 07:41:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812310741.mBV7fgnw018720@svn.freebsd.org> From: Warner Losh Date: Wed, 31 Dec 2008 07:41:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186642 - head/sys/dev/cardbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 07:41:44 -0000 Author: imp Date: Wed Dec 31 07:41:42 2008 New Revision: 186642 URL: http://svn.freebsd.org/changeset/base/186642 Log: When no driver attaches to a card, don't power down the card. We can now read config registers of cardbus cards that are inserted, but aren't attached to a driver. Also, add a power related comment... Modified: head/sys/dev/cardbus/cardbus.c Modified: head/sys/dev/cardbus/cardbus.c ============================================================================== --- head/sys/dev/cardbus/cardbus.c Wed Dec 31 07:39:23 2008 (r186641) +++ head/sys/dev/cardbus/cardbus.c Wed Dec 31 07:41:42 2008 (r186642) @@ -207,7 +207,7 @@ cardbus_attach_card(device_t cbdev) } if (cardattached > 0) return (0); - POWER_DISABLE_SOCKET(brdev, cbdev); +/* POWER_DISABLE_SOCKET(brdev, cbdev); */ return (ENOENT); } @@ -269,6 +269,7 @@ cardbus_driver_added(device_t cbdev, dri } if (i > 0 && i == numdevs) POWER_ENABLE_SOCKET(device_get_parent(cbdev), cbdev); + /* XXX Should I wait for power to become good? */ for (i = 0; i < numdevs; i++) { dev = devlist[i]; if (device_get_state(dev) != DS_NOTPRESENT) From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 08:07:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EE2A106564A; Wed, 31 Dec 2008 08:07:10 +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 7CD9B8FC13; Wed, 31 Dec 2008 08:07:10 +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 mBV87A8T019268; Wed, 31 Dec 2008 08:07:10 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBV87AWI019267; Wed, 31 Dec 2008 08:07:10 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200812310807.mBV87AWI019267@svn.freebsd.org> From: Hiroki Sato Date: Wed, 31 Dec 2008 08:07:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186643 - releng/7.1/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 08:07:11 -0000 Author: hrs Date: Wed Dec 31 08:07:10 2008 New Revision: 186643 URL: http://svn.freebsd.org/changeset/base/186643 Log: Fix a typo. Approved by: re (implicit) Modified: releng/7.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: releng/7.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- releng/7.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Dec 31 07:41:42 2008 (r186642) +++ releng/7.1/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Dec 31 08:07:10 2008 (r186643) @@ -115,7 +115,7 @@ Security Advisories - Problems described in the following security advisories has + Problems described in the following security advisories have been fixed. For more information, consult the individual advisories available from . From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 08:56:49 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75ABC1065673; Wed, 31 Dec 2008 08:56:49 +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 62F7A8FC14; Wed, 31 Dec 2008 08:56:49 +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 mBV8unNJ020137; Wed, 31 Dec 2008 08:56:49 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBV8unZg020135; Wed, 31 Dec 2008 08:56:49 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200812310856.mBV8unZg020135@svn.freebsd.org> From: Maxim Konovalov Date: Wed, 31 Dec 2008 08:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186644 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 08:56:50 -0000 Author: maxim Date: Wed Dec 31 08:56:49 2008 New Revision: 186644 URL: http://svn.freebsd.org/changeset/base/186644 Log: o With -L flag show unix sockets listen queues stats. It is useful to know number of not accepted connections for monitoring purposes. PR: bin/128871 Submitted by: Anton Yuzhaninov MFC after: 1 month Modified: head/usr.bin/netstat/main.c head/usr.bin/netstat/unix.c Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Wed Dec 31 08:07:10 2008 (r186643) +++ head/usr.bin/netstat/main.c Wed Dec 31 08:56:49 2008 (r186644) @@ -593,7 +593,7 @@ main(int argc, char *argv[]) for (tp = netgraphprotox; tp->pr_name; tp++) printproto(tp, tp->pr_name); #endif /* NETGRAPH */ - if ((af == AF_UNIX || af == AF_UNSPEC) && !Lflag && !sflag) + if ((af == AF_UNIX || af == AF_UNSPEC) && !sflag) unixpr(nl[N_UNP_COUNT].n_value, nl[N_UNP_GENCNT].n_value, nl[N_UNP_DHEAD].n_value, nl[N_UNP_SHEAD].n_value); exit(0); Modified: head/usr.bin/netstat/unix.c ============================================================================== --- head/usr.bin/netstat/unix.c Wed Dec 31 08:07:10 2008 (r186643) +++ head/usr.bin/netstat/unix.c Wed Dec 31 08:56:49 2008 (r186644) @@ -247,6 +247,7 @@ unixdomainpr(struct xunpcb *xunp, struct struct unpcb *unp; struct sockaddr_un *sa; static int first = 1; + char buf1[15]; unp = &xunp->xu_unp; if (unp->unp_addr) @@ -254,7 +255,7 @@ unixdomainpr(struct xunpcb *xunp, struct else sa = (struct sockaddr_un *)0; - if (first) { + if (first && !Lflag) { printf("Active UNIX domain sockets\n"); printf( "%-8.8s %-6.6s %-6.6s %-6.6s %8.8s %8.8s %8.8s %8.8s Addr\n", @@ -262,11 +263,21 @@ unixdomainpr(struct xunpcb *xunp, struct "Inode", "Conn", "Refs", "Nextref"); first = 0; } - printf("%8lx %-6.6s %6u %6u %8lx %8lx %8lx %8lx", - (long)so->so_pcb, socktype[so->so_type], so->so_rcv.sb_cc, - so->so_snd.sb_cc, - (long)unp->unp_vnode, (long)unp->unp_conn, - (long)LIST_FIRST(&unp->unp_refs), (long)LIST_NEXT(unp, unp_reflink)); + + if (Lflag && so->so_qlimit == 0) + return; + + if (Lflag) { + snprintf(buf1, 15, "%d/%d/%d", so->so_qlen, + so->so_incqlen, so->so_qlimit); + printf("unix %-14.14s", buf1); + } else { + printf("%8lx %-6.6s %6u %6u %8lx %8lx %8lx %8lx", + (long)so->so_pcb, socktype[so->so_type], so->so_rcv.sb_cc, + so->so_snd.sb_cc, (long)unp->unp_vnode, (long)unp->unp_conn, + (long)LIST_FIRST(&unp->unp_refs), + (long)LIST_NEXT(unp, unp_reflink)); + } if (sa) printf(" %.*s", (int)(sa->sun_len - offsetof(struct sockaddr_un, sun_path)), From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 10:06:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A36DE106566C; Wed, 31 Dec 2008 10:06:41 +0000 (UTC) (envelope-from rik@inse.ru) Received: from mail.inse.ru (mail.inse.ru [144.206.128.1]) by mx1.freebsd.org (Postfix) with ESMTP id 5A1888FC0C; Wed, 31 Dec 2008 10:06:41 +0000 (UTC) (envelope-from rik@inse.ru) Received: from www.inse.ru (www.inse.ru [144.206.128.1]) by mail.inse.ru (Postfix) with ESMTPSA id F259933C51; Wed, 31 Dec 2008 12:49:36 +0300 (MSK) Message-ID: <495B406F.2040305@localhost.inse.ru> Date: Wed, 31 Dec 2008 12:50:39 +0300 From: Roman Kurakin User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: "M. Warner Losh" References: <200812271522.mBRFMMHY074982@svn.freebsd.org> <20081229.114241.756909212.imp@bsdimp.com> In-Reply-To: <20081229.114241.756909212.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: rik@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186520 - head/sys/dev/puc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 10:06:42 -0000 M. Warner Losh wrote: > In message: <200812271522.mBRFMMHY074982@svn.freebsd.org> > Roman Kurakin writes: > : Author: rik > : Date: Sat Dec 27 15:22:22 2008 > : New Revision: 186520 > : URL: http://svn.freebsd.org/changeset/base/186520 > : > : Log: > : Add support for the Oxford OX16PCI958-based card. > : > : Note, that the patch provided with this card for the Linux states that > : the card uses DEFAULT_RCLK * 2, while in fact it is '* 10'. So probably > : we should also use the subdevice/subvendord here. For now just ignore > : that fact. > > I've had problems with doing that on some Oxford based cards. The > vendor that uses them doesn't set them up, so you can't tell my > cardbus oxford card from the pcie oxford card that someone else sent > me patches for: both with different clock multipliers... > Probably we need to implement AUTODETECT_RCLK. I've had the patch, but it worked only for modules, cause there was no working timers while the cards probe time if the driver was compiled in. I've planned to move detection code to the first open and do some cleanup after the detection, but didn't do that. rik > Warner > From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 11:05:29 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119011065670; Wed, 31 Dec 2008 11:05:29 +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 F252D8FC14; Wed, 31 Dec 2008 11:05:28 +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 mBVB5SRp024100; Wed, 31 Dec 2008 11:05:28 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBVB5Se0024099; Wed, 31 Dec 2008 11:05:28 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200812311105.mBVB5Se0024099@svn.freebsd.org> From: Hiroki Sato Date: Wed, 31 Dec 2008 11:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186646 - releng/7.1/release/doc/share/examples X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 11:05:29 -0000 Author: hrs Date: Wed Dec 31 11:05:28 2008 New Revision: 186646 URL: http://svn.freebsd.org/changeset/base/186646 Log: Fix $RDIR (installation directory) of relnotes. Approved by: re (implicit) Modified: releng/7.1/release/doc/share/examples/Makefile.relnotesng Modified: releng/7.1/release/doc/share/examples/Makefile.relnotesng ============================================================================== --- releng/7.1/release/doc/share/examples/Makefile.relnotesng Wed Dec 31 08:57:54 2008 (r186645) +++ releng/7.1/release/doc/share/examples/Makefile.relnotesng Wed Dec 31 11:05:28 2008 (r186646) @@ -12,7 +12,7 @@ UNITEXTS= hardware readme relnotes errat IMAGEDIR= .imagedir RHOST= freefall.freebsd.org -RDIR= public_html/relnotes/7-STABLE +RDIR= public_html/relnotes/7.1-RELEASE DOCDIR= ./release/doc LANG= en_US.ISO8859-1 From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 11:12:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 965CB1065674; Wed, 31 Dec 2008 11:12:25 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DEF78FC17; Wed, 31 Dec 2008 11:12:25 +0000 (UTC) (envelope-from rwatson@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 mBVBCPdS024270; Wed, 31 Dec 2008 11:12:25 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBVBCOAP024253; Wed, 31 Dec 2008 11:12:24 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812311112.mBVBCOAP024253@svn.freebsd.org> From: Robert Watson Date: Wed, 31 Dec 2008 11:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186647 - in head: contrib/openbsm contrib/openbsm/bin contrib/openbsm/bin/audit contrib/openbsm/bin/auditd contrib/openbsm/bin/auditfilterd contrib/openbsm/bin/auditreduce contrib/open... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 11:12:26 -0000 Author: rwatson Date: Wed Dec 31 11:12:24 2008 New Revision: 186647 URL: http://svn.freebsd.org/changeset/base/186647 Log: Merge OpenBSM alpha 4 from OpenBSM vendor branch to head, both contrib/openbsm (svn merge) and src/sys/{bsm,security/audit} (manual merge). Add libauditd build parts and add to auditd's linkage; force libbsm to build before libauditd. OpenBSM history for imported revisions below for reference. MFC after: 1 month Sponsored by: Apple Inc. Obtained from: TrustedBSD Project OpenBSM 1.1 alpha 4 - With the addition of BSM error number mapping, we also need to map the local error number passed to audit_submit(3) to a BSM error number, rather than have the caller perform that conversion. - Reallocate user audit events to avoid collisions with Solaris; adopt a more formal allocation scheme, and add some events allocated in Solaris that will be of immediate use on other platforms. - Add an event for Calife. - Add au_strerror(3), which allows generating strings for BSM errors directly, rather than requiring applications to map to the local error space, which might not be able to entirely represent the BSM error number space. - Major auditd rewrite for launchd(8) support. Add libauditd library that is shared between launchd and auditd. - Add AUDIT_TRIGGER_INITIALIZE trigger (sent via 'audit -i') for (re)starting auditing under launchd(8) on Mac OS X. - Add 'current' symlink to active audit trail. - Add crash recovery of previous audit trail file when detected on audit startup that it has not been properly terminated. - Add the event AUE_audit_recovery to indicated when an audit trail file has been recovered from not being properly terminated. This event is stored in the new audit trail file and includes the path of recovered audit trail file. - Mac OS X and FreeBSD dependent code in auditd.c is separated into auditd_darwin.c and auditd_fbsd.c files. - Add an event for the posix_spawn(2) and fsgetpath(2) Mac OS X system calls. - For Mac OS X, we use ASL(3) instead of syslog(3) for logging. - Add support for NOTICE level logging. OpenBSM 1.1 alpha 3 - Add two new functions, au_bsm_to_errno() and au_errno_to_bsm(), to map between BSM error numbers (largely the Solaris definitions) and local errno(2) values for 32-bit and 64-bit return tokens. This is required as operating systems don't agree on some of the values of more recent error numbers. - Fix a bug how au_to_exec_args(3) and au_to_exec_env(3) calculates the total size for the token. This buge. - Deprecated Darwin constants, such as TRAILER_PAD_MAGIC, removed. Added: head/contrib/openbsm/bin/auditd/auditd_darwin.c - copied unchanged from r186607, vendor/openbsm/dist/bin/auditd/auditd_darwin.c head/contrib/openbsm/bin/auditd/auditd_fbsd.c - copied unchanged from r186607, vendor/openbsm/dist/bin/auditd/auditd_fbsd.c head/contrib/openbsm/bsm/auditd_lib.h - copied unchanged from r186607, vendor/openbsm/dist/bsm/auditd_lib.h head/contrib/openbsm/libauditd/ - copied from r186607, vendor/openbsm/dist/libauditd/ head/contrib/openbsm/libbsm/au_errno.3 - copied unchanged from r186607, vendor/openbsm/dist/libbsm/au_errno.3 head/contrib/openbsm/libbsm/bsm_errno.c - copied unchanged from r186607, vendor/openbsm/dist/libbsm/bsm_errno.c head/contrib/openbsm/sys/bsm/audit_errno.h - copied unchanged from r186607, vendor/openbsm/dist/sys/bsm/audit_errno.h head/contrib/openbsm/test/reference/E2BIG_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/E2BIG_record head/contrib/openbsm/test/reference/EACCES_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EACCES_record head/contrib/openbsm/test/reference/EBADF_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EBADF_record head/contrib/openbsm/test/reference/EBUSY_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EBUSY_record head/contrib/openbsm/test/reference/ECHILD_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/ECHILD_record head/contrib/openbsm/test/reference/EDEADLK_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EDEADLK_record head/contrib/openbsm/test/reference/EEXIST_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EEXIST_record head/contrib/openbsm/test/reference/EFAULT_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EFAULT_record head/contrib/openbsm/test/reference/EFBIG_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EFBIG_record head/contrib/openbsm/test/reference/EINTR_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EINTR_record head/contrib/openbsm/test/reference/EINVAL_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EINVAL_record head/contrib/openbsm/test/reference/EIO_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EIO_record head/contrib/openbsm/test/reference/EISDIR_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EISDIR_record head/contrib/openbsm/test/reference/EMFILE_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EMFILE_record head/contrib/openbsm/test/reference/EMLINK_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EMLINK_record head/contrib/openbsm/test/reference/ENFILE_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/ENFILE_record head/contrib/openbsm/test/reference/ENODEV_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/ENODEV_record head/contrib/openbsm/test/reference/ENOENT_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/ENOENT_record head/contrib/openbsm/test/reference/ENOEXEC_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/ENOEXEC_record head/contrib/openbsm/test/reference/ENOMEM_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/ENOMEM_record head/contrib/openbsm/test/reference/ENOSPC_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/ENOSPC_record head/contrib/openbsm/test/reference/ENOTBLK_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/ENOTBLK_record head/contrib/openbsm/test/reference/ENOTDIR_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/ENOTDIR_record head/contrib/openbsm/test/reference/ENOTTY_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/ENOTTY_record head/contrib/openbsm/test/reference/ENXIO_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/ENXIO_record head/contrib/openbsm/test/reference/EPERM_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EPERM_record head/contrib/openbsm/test/reference/EPIPE_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EPIPE_record head/contrib/openbsm/test/reference/EROFS_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EROFS_record head/contrib/openbsm/test/reference/ESPIPE_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/ESPIPE_record head/contrib/openbsm/test/reference/ESRCH_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/ESRCH_record head/contrib/openbsm/test/reference/ETXTBSY_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/ETXTBSY_record head/contrib/openbsm/test/reference/EXDEV_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/EXDEV_record head/contrib/openbsm/test/reference/socketex_record - copied unchanged from r186607, vendor/openbsm/dist/test/reference/socketex_record head/contrib/openbsm/test/reference/socketex_token - copied unchanged from r186607, vendor/openbsm/dist/test/reference/socketex_token head/lib/libauditd/ head/lib/libauditd/Makefile (contents, props changed) head/sys/bsm/audit_errno.h (contents, props changed) head/sys/security/audit/audit_bsm_errno.c (contents, props changed) Modified: head/contrib/openbsm/ (props changed) head/contrib/openbsm/Makefile.am head/contrib/openbsm/Makefile.in head/contrib/openbsm/NEWS head/contrib/openbsm/README head/contrib/openbsm/TODO head/contrib/openbsm/VERSION head/contrib/openbsm/bin/Makefile.in head/contrib/openbsm/bin/audit/Makefile.am head/contrib/openbsm/bin/audit/Makefile.in head/contrib/openbsm/bin/audit/audit.8 head/contrib/openbsm/bin/audit/audit.c head/contrib/openbsm/bin/auditd/Makefile.am head/contrib/openbsm/bin/auditd/Makefile.in head/contrib/openbsm/bin/auditd/audit_warn.c head/contrib/openbsm/bin/auditd/auditd.8 head/contrib/openbsm/bin/auditd/auditd.c head/contrib/openbsm/bin/auditd/auditd.h head/contrib/openbsm/bin/auditfilterd/Makefile.in head/contrib/openbsm/bin/auditreduce/Makefile.in head/contrib/openbsm/bin/auditreduce/auditreduce.c head/contrib/openbsm/bin/praudit/Makefile.in head/contrib/openbsm/bsm/Makefile.am head/contrib/openbsm/bsm/Makefile.in head/contrib/openbsm/bsm/audit_uevents.h head/contrib/openbsm/bsm/libbsm.h head/contrib/openbsm/compat/endian.h head/contrib/openbsm/config/config.h.in head/contrib/openbsm/configure head/contrib/openbsm/configure.ac head/contrib/openbsm/etc/audit_event head/contrib/openbsm/libbsm/Makefile.am head/contrib/openbsm/libbsm/Makefile.in head/contrib/openbsm/libbsm/au_token.3 head/contrib/openbsm/libbsm/audit_submit.3 head/contrib/openbsm/libbsm/bsm_audit.c head/contrib/openbsm/libbsm/bsm_class.c head/contrib/openbsm/libbsm/bsm_control.c head/contrib/openbsm/libbsm/bsm_event.c head/contrib/openbsm/libbsm/bsm_io.c head/contrib/openbsm/libbsm/bsm_mask.c head/contrib/openbsm/libbsm/bsm_token.c head/contrib/openbsm/libbsm/bsm_user.c head/contrib/openbsm/libbsm/bsm_wrappers.c head/contrib/openbsm/libbsm/libbsm.3 head/contrib/openbsm/man/Makefile.in head/contrib/openbsm/man/audit.log.5 head/contrib/openbsm/modules/Makefile.in head/contrib/openbsm/modules/auditfilter_noop/Makefile.in head/contrib/openbsm/sys/Makefile.in head/contrib/openbsm/sys/bsm/Makefile.am head/contrib/openbsm/sys/bsm/Makefile.in head/contrib/openbsm/sys/bsm/audit.h head/contrib/openbsm/sys/bsm/audit_internal.h head/contrib/openbsm/sys/bsm/audit_kevents.h head/contrib/openbsm/sys/bsm/audit_record.h head/contrib/openbsm/test/Makefile.in head/contrib/openbsm/test/bsm/Makefile.in head/contrib/openbsm/test/bsm/generate.c head/contrib/openbsm/test/reference/arg32_record head/contrib/openbsm/test/reference/data_record head/contrib/openbsm/test/reference/file_record head/contrib/openbsm/test/reference/header32_token head/contrib/openbsm/test/reference/in_addr_record head/contrib/openbsm/test/reference/ip_record head/contrib/openbsm/test/reference/ipc_record head/contrib/openbsm/test/reference/iport_record head/contrib/openbsm/test/reference/opaque_record head/contrib/openbsm/test/reference/path_record head/contrib/openbsm/test/reference/process32_record head/contrib/openbsm/test/reference/process32ex_record-IPv4 head/contrib/openbsm/test/reference/process32ex_record-IPv6 head/contrib/openbsm/test/reference/process64_record head/contrib/openbsm/test/reference/process64ex_record-IPv4 head/contrib/openbsm/test/reference/process64ex_record-IPv6 head/contrib/openbsm/test/reference/return32_record head/contrib/openbsm/test/reference/return32_token head/contrib/openbsm/test/reference/seq_record head/contrib/openbsm/test/reference/subject32_record head/contrib/openbsm/test/reference/subject32ex_record head/contrib/openbsm/test/reference/text_record head/contrib/openbsm/test/reference/zonename_record head/contrib/openbsm/tools/Makefile.in head/lib/Makefile head/lib/libbsm/Makefile head/share/mk/bsd.libnames.mk head/sys/bsm/audit.h head/sys/bsm/audit_internal.h head/sys/bsm/audit_kevents.h head/sys/bsm/audit_record.h head/sys/security/audit/audit_bsm_token.c head/usr.sbin/auditd/Makefile Modified: head/contrib/openbsm/Makefile.am ============================================================================== --- head/contrib/openbsm/Makefile.am Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/Makefile.am Wed Dec 31 11:12:24 2008 (r186647) @@ -1,15 +1,23 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/Makefile.am#3 $ +# $P4: //depot/projects/trustedbsd/openbsm/Makefile.am#4 $ # SUBDIRS = \ - bsm \ + bsm + +if HAVE_AUDIT_SYSCALLS +SUBDIRS += \ + libauditd +endif + +SUBDIRS += \ libbsm \ bin \ man \ modules \ sys + EXTRA_DIST = \ CHANGELOG \ LICENSE \ Modified: head/contrib/openbsm/Makefile.in ============================================================================== --- head/contrib/openbsm/Makefile.in Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/Makefile.in Wed Dec 31 11:12:24 2008 (r186647) @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/Makefile.in#8 $ +# $P4: //depot/projects/trustedbsd/openbsm/Makefile.in#9 $ # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -35,6 +35,9 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +@HAVE_AUDIT_SYSCALLS_TRUE@am__append_1 = \ +@HAVE_AUDIT_SYSCALLS_TRUE@ libauditd + subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/config/config.h.in \ @@ -63,7 +66,7 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-re distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) +DIST_SUBDIRS = bsm libauditd libbsm bin man modules sys DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -183,14 +186,7 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = \ - bsm \ - libbsm \ - bin \ - man \ - modules \ - sys - +SUBDIRS = bsm $(am__append_1) libbsm bin man modules sys EXTRA_DIST = \ CHANGELOG \ LICENSE \ Modified: head/contrib/openbsm/NEWS ============================================================================== --- head/contrib/openbsm/NEWS Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/NEWS Wed Dec 31 11:12:24 2008 (r186647) @@ -1,5 +1,50 @@ OpenBSM Version History +OpenBSM 1.1 alpha 4 + +- With the addition of BSM error number mapping, we also need to map the + local error number passed to audit_submit(3) to a BSM error number, rather + than have the caller perform that conversion. +- Reallocate user audit events to avoid collisions with Solaris; adopt a more + formal allocation scheme, and add some events allocated in Solaris that + will be of immediate use on other platforms. +- Add an event for Calife. +- Add au_strerror(3), which allows generating strings for BSM errors + directly, rather than requiring applications to map to the local error + space, which might not be able to entirely represent the BSM error number + space. +- Major auditd rewrite for launchd(8) support. Add libauditd library that is + shared between launchd and auditd. +- Add AUDIT_TRIGGER_INITIALIZE trigger (sent via 'audit -i') for (re)starting + auditing under launchd(8) on Mac OS X. +- Add 'current' symlink to active audit trail. +- Add crash recovery of previous audit trail file when detected on audit + startup that it has not been properly terminated. +- Add the event AUE_audit_recovery to indicated when an audit trail file has + been recovered from not being properly terminated. This event is stored + in the new audit trail file and includes the path of recovered audit trail + file. +- Mac OS X and FreeBSD dependent code in auditd.c is separated into + auditd_darwin.c and auditd_fbsd.c files. +- Add an event for the posix_spawn(2) and fsgetpath(2) Mac OS X system calls. +- For Mac OS X, we use ASL(3) instead of syslog(3) for logging. +- Add support for NOTICE level logging. + +OpenBSM 1.1 alpha 3 + +- Add two new functions, au_bsm_to_errno() and au_errno_to_bsm(), to map + between BSM error numbers (largely the Solaris definitions) and local + errno(2) values for 32-bit and 64-bit return tokens. This is required as + operating systems don't agree on some of the values of more recent error + numbers. +- Fix a bug how au_to_exec_args(3) and au_to_exec_env(3) calculates the total + size for the token. This bug resulted in "unknown" tokens being printed + after the exec args/env tokens. +- Support for AUT_SOCKET_EX extended socket tokens, which describe a socket + using a pair of IPv4/IPv6 and port tuples. +- OpenBSM BSM file header version bumped for 1.1 release. +- Deprecated Darwin constants, such as TRAILER_PAD_MAGIC, removed. + OpenBSM 1.1 alpha 2 - Include files in OpenBSM are now broken out into two parts: library builds @@ -348,4 +393,4 @@ OpenBSM 1.0 alpha 1 to support reloading of kernel event table. - Allow comments in /etc/security configuration files. -$P4: //depot/projects/trustedbsd/openbsm/NEWS#9 $ +$P4: //depot/projects/trustedbsd/openbsm/NEWS#21 $ Modified: head/contrib/openbsm/README ============================================================================== --- head/contrib/openbsm/README Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/README Wed Dec 31 11:12:24 2008 (r186647) @@ -1,4 +1,4 @@ -OpenBSM 1.1 alpha 1 +OpenBSM 1.1 alpha 4 Introduction @@ -19,6 +19,7 @@ OpenBSM consists of several directories: bsm/ Library include files for BSM compat/ Compatibility code to build on various OS's etc/ Sample /etc/security configuration files + libauditd Common audit management functions for auditd and launchd libbsm/ Implementation of BSM library interfaces and man pages man/ System call and configuration file man pages modules/ Directory for auditfilterd module source @@ -55,4 +56,4 @@ Information on TrustedBSD may be found o http://www.TrustedBSD.org/ -$P4: //depot/projects/trustedbsd/openbsm/README#32 $ +$P4: //depot/projects/trustedbsd/openbsm/README#34 $ Modified: head/contrib/openbsm/TODO ============================================================================== --- head/contrib/openbsm/TODO Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/TODO Wed Dec 31 11:12:24 2008 (r186647) @@ -20,5 +20,7 @@ OpenBSM TODO - Document audit_warn event arguments. - Allow the path /etc/security to be configured at configure-time so that alternative locations can be used. +- NLS support for au_strerror(3), which provides error strings for BSM errors + not available on the local OS platform. -$P4: //depot/projects/trustedbsd/openbsm/TODO#11 $ +$P4: //depot/projects/trustedbsd/openbsm/TODO#12 $ Modified: head/contrib/openbsm/VERSION ============================================================================== --- head/contrib/openbsm/VERSION Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/VERSION Wed Dec 31 11:12:24 2008 (r186647) @@ -1 +1 @@ -OPENBSM_1_1_ALPHA_2 +OPENBSM_1_1_ALPHA_4 Modified: head/contrib/openbsm/bin/Makefile.in ============================================================================== --- head/contrib/openbsm/bin/Makefile.in Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/bin/Makefile.in Wed Dec 31 11:12:24 2008 (r186647) @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/Makefile.in#8 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/Makefile.in#10 $ # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ Modified: head/contrib/openbsm/bin/audit/Makefile.am ============================================================================== --- head/contrib/openbsm/bin/audit/Makefile.am Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/bin/audit/Makefile.am Wed Dec 31 11:12:24 2008 (r186647) @@ -1,5 +1,5 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/audit/Makefile.am#4 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/audit/Makefile.am#6 $ # if USE_NATIVE_INCLUDES @@ -13,11 +13,11 @@ audit_LDADD = $(top_builddir)/libbsm/lib man8_MANS = audit.8 if USE_MACH_IPC -audit_SOURCES = auditd_control_user.c audit.c -CLEANFILES = auditd_control_user.c auditd_control_user.h +audit_SOURCES = auditd_controlUser.c audit.c +CLEANFILES = auditd_controlUser.c auditd_control.h -auditd_control_user.c: $(top_srcdir)/bin/auditd/auditd_control.defs - $(MIG) -user auditd_control_user.c -header auditd_control_user.h -server /dev/null -sheader /dev/null $(top_srcdir)/bin/auditd/auditd_control.defs +auditd_controlUser.c auditd_control.h: $(top_srcdir)/bin/auditd/auditd_control.defs + $(MIG) -user auditd_controlUser.c -header auditd_control.h -server /dev/null -sheader /dev/null $(top_srcdir)/bin/auditd/auditd_control.defs else audit_SOURCES = audit.c endif Modified: head/contrib/openbsm/bin/audit/Makefile.in ============================================================================== --- head/contrib/openbsm/bin/audit/Makefile.in Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/bin/audit/Makefile.in Wed Dec 31 11:12:24 2008 (r186647) @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/audit/Makefile.in#9 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/audit/Makefile.in#11 $ # VPATH = @srcdir@ @@ -49,9 +49,9 @@ CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(sbin_PROGRAMS) -am__audit_SOURCES_DIST = audit.c auditd_control_user.c +am__audit_SOURCES_DIST = audit.c auditd_controlUser.c @USE_MACH_IPC_FALSE@am_audit_OBJECTS = audit.$(OBJEXT) -@USE_MACH_IPC_TRUE@am_audit_OBJECTS = auditd_control_user.$(OBJEXT) \ +@USE_MACH_IPC_TRUE@am_audit_OBJECTS = auditd_controlUser.$(OBJEXT) \ @USE_MACH_IPC_TRUE@ audit.$(OBJEXT) audit_OBJECTS = $(am_audit_OBJECTS) audit_DEPENDENCIES = $(top_builddir)/libbsm/libbsm.la @@ -188,8 +188,8 @@ top_srcdir = @top_srcdir@ audit_LDADD = $(top_builddir)/libbsm/libbsm.la man8_MANS = audit.8 @USE_MACH_IPC_FALSE@audit_SOURCES = audit.c -@USE_MACH_IPC_TRUE@audit_SOURCES = auditd_control_user.c audit.c -@USE_MACH_IPC_TRUE@CLEANFILES = auditd_control_user.c auditd_control_user.h +@USE_MACH_IPC_TRUE@audit_SOURCES = auditd_controlUser.c audit.c +@USE_MACH_IPC_TRUE@CLEANFILES = auditd_controlUser.c auditd_control.h all: all-am .SUFFIXES: @@ -262,7 +262,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd_control_user.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd_controlUser.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -521,8 +521,8 @@ uninstall-man: uninstall-man8 uninstall-sbinPROGRAMS -@USE_MACH_IPC_TRUE@auditd_control_user.c: $(top_srcdir)/bin/auditd/auditd_control.defs -@USE_MACH_IPC_TRUE@ $(MIG) -user auditd_control_user.c -header auditd_control_user.h -server /dev/null -sheader /dev/null $(top_srcdir)/bin/auditd/auditd_control.defs +@USE_MACH_IPC_TRUE@auditd_controlUser.c auditd_control.h: $(top_srcdir)/bin/auditd/auditd_control.defs +@USE_MACH_IPC_TRUE@ $(MIG) -user auditd_controlUser.c -header auditd_control.h -server /dev/null -sheader /dev/null $(top_srcdir)/bin/auditd/auditd_control.defs # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Modified: head/contrib/openbsm/bin/audit/audit.8 ============================================================================== --- head/contrib/openbsm/bin/audit/audit.8 Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/bin/audit/audit.8 Wed Dec 31 11:12:24 2008 (r186647) @@ -25,9 +25,9 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.8#11 $ +.\" $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.8#13 $ .\" -.Dd October 2, 2006 +.Dd December 11, 2008 .Dt AUDIT 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nd audit management utility .Sh SYNOPSIS .Nm -.Fl n | s | t +.Fl i | n | s | t .Sh DESCRIPTION The .Nm @@ -43,6 +43,13 @@ utility controls the state of the audit One of the following flags is required as an argument to .Nm : .Bl -tag -width indent +.It Fl i +Initializes and starts auditing. +This option is currently for Mac OS X only +and requires +.Xr auditd 8 +to be configured to run under +.Xr launchd 8 . .It Fl n Forces the audit system to close the existing audit log file and rotate to a new log file in a location specified in the audit control file. @@ -59,6 +66,13 @@ and renamed to indicate the time of the The .Xr auditd 8 daemon must already be running. +Optionally, it can be configured to be started +on-demand by +.Xr launchd 8 +(Mac OS X only). +The +.Nm +utility requires audit administrator privileges for successful operation. .Sh FILES .Bl -tag -width ".Pa /etc/security/audit_control" -compact .It Pa /etc/security/audit_control @@ -67,7 +81,8 @@ Audit policy file used to configure the .Sh SEE ALSO .Xr audit 4 , .Xr audit_control 5 , -.Xr auditd 8 +.Xr auditd 8 , +.Xr launchd 8 .Sh HISTORY The OpenBSM implementation was created by McAfee Research, the security division of McAfee Inc., under contract to Apple Computer Inc.\& in 2004. Modified: head/contrib/openbsm/bin/audit/audit.c ============================================================================== --- head/contrib/openbsm/bin/audit/audit.c Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/bin/audit/audit.c Wed Dec 31 11:12:24 2008 (r186647) @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.c#11 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.c#13 $ */ /* * Program to trigger the audit daemon with a message that is either: @@ -47,6 +47,7 @@ #include +#include #include #include #include @@ -64,7 +65,15 @@ static int send_trigger(unsigned int); #include #include -#include "auditd_control_user.h" +#include "auditd_control.h" + +/* + * XXX the following is temporary until this can be added to the kernel + * audit.h header. + */ +#ifndef AUDIT_TRIGGER_INITIALIZE +#define AUDIT_TRIGGER_INITIALIZE 7 +#endif static int send_trigger(unsigned int trigger) @@ -74,7 +83,12 @@ send_trigger(unsigned int trigger) error = host_get_audit_control_port(mach_host_self(), &serverPort); if (error != KERN_SUCCESS) { - mach_error("Cannot get auditd_control Mach port: ", error); + if (geteuid() != 0) { + errno = EPERM; + perror("audit requires root privileges"); + } else + mach_error("Cannot get auditd_control Mach port:", + error); return (-1); } @@ -96,7 +110,10 @@ send_trigger(unsigned int trigger) error = auditon(A_SENDTRIGGER, &trigger, sizeof(trigger)); if (error != 0) { - perror("Error sending trigger"); + if (error == EPERM) + perror("audit requires root privileges"); + else + perror("Error sending trigger"); return (-1); } @@ -108,7 +125,7 @@ static void usage(void) { - (void)fprintf(stderr, "Usage: audit -n | -s | -t \n"); + (void)fprintf(stderr, "Usage: audit -i | -n | -s | -t \n"); exit(-1); } @@ -124,9 +141,13 @@ main(int argc, char **argv) if (argc != 2) usage(); - while ((ch = getopt(argc, argv, "nst")) != -1) { + while ((ch = getopt(argc, argv, "inst")) != -1) { switch(ch) { + case 'i': + trigger = AUDIT_TRIGGER_INITIALIZE; + break; + case 'n': trigger = AUDIT_TRIGGER_ROTATE_USER; break; Modified: head/contrib/openbsm/bin/auditd/Makefile.am ============================================================================== --- head/contrib/openbsm/bin/auditd/Makefile.am Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/bin/auditd/Makefile.am Wed Dec 31 11:12:24 2008 (r186647) @@ -1,5 +1,5 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/Makefile.am#4 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/Makefile.am#5 $ # if USE_NATIVE_INCLUDES @@ -9,18 +9,18 @@ INCLUDES = -I$(top_builddir) -I$(top_src endif sbin_PROGRAMS = auditd -auditd_LDADD = $(top_builddir)/libbsm/libbsm.la +auditd_LDADD = $(top_builddir)/libbsm/libbsm.la $(top_builddir)/libauditd/libauditd.la man8_MANS = auditd.8 if USE_MACH_IPC -auditd_SOURCES = auditd_control_server.c audit_triggers_server.c audit_warn.c auditd.c -CLEANFILES = auditd_control_server.c auditd_control_server.h audit_triggers_server.c audit_triggers_server.h +auditd_SOURCES = auditd_controlServer.c audit_triggersServer.c audit_warn.c auditd.c auditd_darwin.c +CLEANFILES = auditd_control_server.c auditd_controlServer.h audit_triggersServer.c audit_triggersServer.h -auditd_control_server.c: auditd_control.defs - $(MIG) -user /dev/null -header /dev/null -server auditd_control_server.c -sheader auditd_control_server.h $(top_srcdir)/bin/auditd/auditd_control.defs +auditd_controlServer.c auditd_controlServer.h: auditd_control.defs + $(MIG) -user /dev/null -header /dev/null -server auditd_controlServer.c -sheader auditd_controlServer.h $(top_srcdir)/bin/auditd/auditd_control.defs -audit_triggers_server.c: audit_triggers.defs - $(MIG) -user /dev/null -header /dev/null -server audit_triggers_server.c -sheader audit_triggers_server.h $(top_srcdir)/bin/auditd/audit_triggers.defs +audit_triggersServer.c audit_triggersServer.h: audit_triggers.defs + $(MIG) -user /dev/null -header /dev/null -server audit_triggersServer.c -sheader audit_triggersServer.h $(top_srcdir)/bin/auditd/audit_triggers.defs else -auditd_SOURCES = audit_warn.c auditd.c +auditd_SOURCES = audit_warn.c auditd.c auditd_fbsd.c endif Modified: head/contrib/openbsm/bin/auditd/Makefile.in ============================================================================== --- head/contrib/openbsm/bin/auditd/Makefile.in Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/bin/auditd/Makefile.in Wed Dec 31 11:12:24 2008 (r186647) @@ -15,7 +15,7 @@ @SET_MAKE@ # -# $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/Makefile.in#9 $ +# $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/Makefile.in#10 $ # VPATH = @srcdir@ @@ -49,16 +49,17 @@ CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(sbin_PROGRAMS) -am__auditd_SOURCES_DIST = audit_warn.c auditd.c \ - auditd_control_server.c audit_triggers_server.c +am__auditd_SOURCES_DIST = audit_warn.c auditd.c auditd_fbsd.c \ + auditd_controlServer.c audit_triggersServer.c auditd_darwin.c @USE_MACH_IPC_FALSE@am_auditd_OBJECTS = audit_warn.$(OBJEXT) \ -@USE_MACH_IPC_FALSE@ auditd.$(OBJEXT) -@USE_MACH_IPC_TRUE@am_auditd_OBJECTS = \ -@USE_MACH_IPC_TRUE@ auditd_control_server.$(OBJEXT) \ -@USE_MACH_IPC_TRUE@ audit_triggers_server.$(OBJEXT) \ -@USE_MACH_IPC_TRUE@ audit_warn.$(OBJEXT) auditd.$(OBJEXT) +@USE_MACH_IPC_FALSE@ auditd.$(OBJEXT) auditd_fbsd.$(OBJEXT) +@USE_MACH_IPC_TRUE@am_auditd_OBJECTS = auditd_controlServer.$(OBJEXT) \ +@USE_MACH_IPC_TRUE@ audit_triggersServer.$(OBJEXT) \ +@USE_MACH_IPC_TRUE@ audit_warn.$(OBJEXT) auditd.$(OBJEXT) \ +@USE_MACH_IPC_TRUE@ auditd_darwin.$(OBJEXT) auditd_OBJECTS = $(am_auditd_OBJECTS) -auditd_DEPENDENCIES = $(top_builddir)/libbsm/libbsm.la +auditd_DEPENDENCIES = $(top_builddir)/libbsm/libbsm.la \ + $(top_builddir)/libauditd/libauditd.la DEFAULT_INCLUDES = -I. -I$(top_builddir)/config@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles @@ -189,11 +190,11 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @USE_NATIVE_INCLUDES_FALSE@INCLUDES = -I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/sys @USE_NATIVE_INCLUDES_TRUE@INCLUDES = -I$(top_builddir) -I$(top_srcdir) -auditd_LDADD = $(top_builddir)/libbsm/libbsm.la +auditd_LDADD = $(top_builddir)/libbsm/libbsm.la $(top_builddir)/libauditd/libauditd.la man8_MANS = auditd.8 -@USE_MACH_IPC_FALSE@auditd_SOURCES = audit_warn.c auditd.c -@USE_MACH_IPC_TRUE@auditd_SOURCES = auditd_control_server.c audit_triggers_server.c audit_warn.c auditd.c -@USE_MACH_IPC_TRUE@CLEANFILES = auditd_control_server.c auditd_control_server.h audit_triggers_server.c audit_triggers_server.h +@USE_MACH_IPC_FALSE@auditd_SOURCES = audit_warn.c auditd.c auditd_fbsd.c +@USE_MACH_IPC_TRUE@auditd_SOURCES = auditd_controlServer.c audit_triggersServer.c audit_warn.c auditd.c auditd_darwin.c +@USE_MACH_IPC_TRUE@CLEANFILES = auditd_control_server.c auditd_controlServer.h audit_triggersServer.c audit_triggersServer.h all: all-am .SUFFIXES: @@ -265,10 +266,12 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit_triggers_server.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit_triggersServer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audit_warn.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd_control_server.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd_controlServer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd_darwin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auditd_fbsd.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -527,11 +530,11 @@ uninstall-man: uninstall-man8 uninstall-sbinPROGRAMS -@USE_MACH_IPC_TRUE@auditd_control_server.c: auditd_control.defs -@USE_MACH_IPC_TRUE@ $(MIG) -user /dev/null -header /dev/null -server auditd_control_server.c -sheader auditd_control_server.h $(top_srcdir)/bin/auditd/auditd_control.defs +@USE_MACH_IPC_TRUE@auditd_controlServer.c auditd_controlServer.h: auditd_control.defs +@USE_MACH_IPC_TRUE@ $(MIG) -user /dev/null -header /dev/null -server auditd_controlServer.c -sheader auditd_controlServer.h $(top_srcdir)/bin/auditd/auditd_control.defs -@USE_MACH_IPC_TRUE@audit_triggers_server.c: audit_triggers.defs -@USE_MACH_IPC_TRUE@ $(MIG) -user /dev/null -header /dev/null -server audit_triggers_server.c -sheader audit_triggers_server.h $(top_srcdir)/bin/auditd/audit_triggers.defs +@USE_MACH_IPC_TRUE@audit_triggersServer.c audit_triggersServer.h: audit_triggers.defs +@USE_MACH_IPC_TRUE@ $(MIG) -user /dev/null -header /dev/null -server audit_triggersServer.c -sheader audit_triggersServer.h $(top_srcdir)/bin/auditd/audit_triggers.defs # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Modified: head/contrib/openbsm/bin/auditd/audit_warn.c ============================================================================== --- head/contrib/openbsm/bin/auditd/audit_warn.c Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/bin/auditd/audit_warn.c Wed Dec 31 11:12:24 2008 (r186647) @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/audit_warn.c#9 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/audit_warn.c#10 $ */ #include @@ -71,20 +71,15 @@ auditwarnlog(char *args[]) } /* - * Indicates that the hard limit for all filesystems has been exceeded count - * times. + * Indicates that the hard limit for all filesystems has been exceeded. */ int -audit_warn_allhard(int count) +audit_warn_allhard(void) { - char intstr[12]; - char *args[3]; - - snprintf(intstr, 12, "%d", count); + char *args[2]; args[0] = HARDLIM_ALL_WARN; - args[1] = intstr; - args[2] = NULL; + args[1] = NULL; return (auditwarnlog(args)); } Modified: head/contrib/openbsm/bin/auditd/auditd.8 ============================================================================== --- head/contrib/openbsm/bin/auditd/auditd.8 Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/bin/auditd/auditd.8 Wed Dec 31 11:12:24 2008 (r186647) @@ -25,9 +25,9 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.8#14 $ +.\" $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.8#16 $ .\" -.Dd October 2, 2006 +.Dd December 11, 2008 .Dt AUDITD 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nd audit log management daemon .Sh SYNOPSIS .Nm -.Op Fl d +.Op Fl d | l .Sh DESCRIPTION The .Nm @@ -50,7 +50,16 @@ The options are as follows: .Bl -tag -width indent .It Fl d Starts the daemon in debug mode \[em] it will not daemonize. +.It Fl l +This option is for when +.Nm +is configured to start on-demand using +.Xr launchd 8 . .El +.Pp +Optionally, the audit review group "audit" may be created. +Non-privileged +users that are members of this group may read the audit trail log files. .Sh NOTE To assure uninterrupted audit support, the .Nm @@ -63,20 +72,33 @@ the .Pa audit_control file. .Pp -.\" Sending a -.\" .Dv SIGHUP -.\" to a running -.\" .Nm -.\" daemon will force it to exit. -Sending a -.Dv SIGTERM -to a running +If +.Nm +is started on-demand by +.Xr launchd 8 +then auditing should only be started and stopped with +.Xr audit 8 . +.Pp +On Mac OS X, .Nm -daemon will force it to exit. +uses the +.Xr asl 3 +API for writing system log messages. +Therefore, only the audit administrator +and members of the audit review group will be able to read the +system log entries. .Sh FILES -.Bl -tag -width ".Pa /var/audit" -compact +.Bl -tag -width ".Pa /etc/security" -compact .It Pa /var/audit Default directory for storing audit log files. +.Pp +.It Pa /etc/security +The directory containing the auditing configuration files +.Xr audit_class 5 , +.Xr audit_control 5 , +.Xr audit_event 5 , +and +.Xr audit_warn 5 . .El .Sh COMPATIBILITY The historical @@ -92,9 +114,14 @@ and and are no longer available as arguments to .Nm . .Sh SEE ALSO +.Xr asl 3 , .Xr audit 4 , +.Xr audit_class 5 , .Xr audit_control 5 , -.Xr audit 8 +.Xr audit_event 5 , +.Xr audit_warn 5 , +.Xr audit 8 , +.Xr launchd 8 .Sh HISTORY The OpenBSM implementation was created by McAfee Research, the security division of McAfee Inc., under contract to Apple Computer Inc.\& in 2004. Modified: head/contrib/openbsm/bin/auditd/auditd.c ============================================================================== --- head/contrib/openbsm/bin/auditd/auditd.c Wed Dec 31 11:05:28 2008 (r186646) +++ head/contrib/openbsm/bin/auditd/auditd.c Wed Dec 31 11:12:24 2008 (r186647) @@ -26,30 +26,29 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#39 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#40 $ */ -#include +#include #include #include -#include -#include #ifdef HAVE_FULL_QUEUE_H #include #else /* !HAVE_FULL_QUEUE_H */ #include #endif /* !HAVE_FULL_QUEUE_H */ +#include +#include #include #include #include #include +#include #include -#include - #include #include #include @@ -60,115 +59,88 @@ #include #include #include -#include -#include #include "auditd.h" -#ifdef USE_MACH_IPC -#include -#include -#include -#include -#include -#include - -#include "auditd_control_server.h" -#include "audit_triggers_server.h" -#endif /* USE_MACH_IPC */ #ifndef HAVE_STRLCPY #include #endif -#define NA_EVENT_STR_SIZE 25 -#define POL_STR_SIZE 128 -static int ret, minval; -static char *lastfile = NULL; -static int allhardcount = 0; -static int sigchlds, sigchlds_handled; -static int sighups, sighups_handled; -#ifndef USE_MACH_IPC -static int sigterms, sigterms_handled; -static int triggerfd = 0; - -#else /* USE_MACH_IPC */ - -static mach_port_t control_port = MACH_PORT_NULL; -static mach_port_t signal_port = MACH_PORT_NULL; -static mach_port_t port_set = MACH_PORT_NULL; - -#ifndef __BSM_INTERNAL_NOTIFY_KEY -#define __BSM_INTERNAL_NOTIFY_KEY "com.apple.audit.change" -#endif /* __BSM_INTERNAL_NOTIFY_KEY */ -#endif /* USE_MACH_IPC */ - -static TAILQ_HEAD(, dir_ent) dir_q; - -static int config_audit_controls(void); - /* - * Error starting auditd + * XXX the following is temporary until this can be added to the kernel + * audit.h header. */ -static void -fail_exit(void) -{ - - audit_warn_nostart(); - exit(1); -} +#ifndef AUDIT_TRIGGER_INITIALIZE +#define AUDIT_TRIGGER_INITIALIZE 7 +#endif /* - * Free our local list of directory names. + * LaunchD flag (Mac OS X and, maybe, FreeBSD only.) See launchd(8) and + * http://wiki.freebsd.org/launchd for more information. + * + * In order for auditd to work "on demand" with launchd(8) it can't: + * call daemon(3) + * call fork and having the parent process exit + * change uids or gids. + * set up the current working directory or chroot. + * set the session id + * change stdio to /dev/null. + * call setrusage(2) + * call setpriority(2) + * Ignore SIGTERM. + * auditd (in 'launchd mode') is launched on demand so it must catch + * SIGTERM to exit cleanly. + */ +static int launchd_flag = 0; + +/* + * The GID of the audit review group (if used). The audit trail files and + * system logs (Mac OS X only) can only be reviewed by members of this group + * or the audit administrator (aka. "root"). */ -static void -free_dir_q(void) -{ - struct dir_ent *dirent; +static gid_t audit_review_gid = -1; - while ((dirent = TAILQ_FIRST(&dir_q))) { - TAILQ_REMOVE(&dir_q, dirent, dirs); - free(dirent->dirname); - free(dirent); - } -} +/* + * The path and file name of the last audit trail file. + */ +static char *lastfile = NULL; /* - * Generate the timestamp string. + * Error starting auditd. Run warn script and exit. */ -static int -getTSstr(char *buf, int len) +static void +fail_exit(void) { - struct timeval ts; - struct timezone tzp; - time_t tt; - if (gettimeofday(&ts, &tzp) != 0) - return (-1); - tt = (time_t)ts.tv_sec; - if (!strftime(buf, len, "%Y%m%d%H%M%S", gmtime(&tt))) - return (-1); - return (0); + audit_warn_nostart(); + exit(1); } /* - * Concat the directory name to the given file name. - * XXX We should affix the hostname also + * Follow the 'current' symlink to get the active trail file name. */ static char * -affixdir(char *name, struct dir_ent *dirent) +get_curfile(void) { - char *fn = NULL; + char *cf; + int len; - syslog(LOG_DEBUG, "dir = %s", dirent->dirname); - /* - * Sanity check on file name. - */ - if (strlen(name) != (FILENAME_LEN - 1)) { - syslog(LOG_ERR, "Invalid file name: %s", name); + cf = malloc(MAXPATHLEN); + if (cf == NULL) { + auditd_log_err("malloc failed: %m"); + return (NULL); + } + + len = readlink(AUDIT_CURRENT_LINK, cf, MAXPATHLEN - 1); + if (len < 0) { + free(cf); return (NULL); } - asprintf(&fn, "%s/%s", dirent->dirname, name); - return (fn); + + /* readlink() doesn't terminate string. */ + cf[len] = '\0'; + + return (cf); } /* @@ -181,6 +153,10 @@ close_lastfile(char *TS) char *oldname; size_t len; + /* If lastfile is NULL try to get it from the 'current' link. */ + if (lastfile == NULL) + lastfile = get_curfile(); + if (lastfile != NULL) { len = strlen(lastfile) + 1; oldname = (char *)malloc(len); @@ -192,16 +168,21 @@ close_lastfile(char *TS) if ((ptr = strstr(lastfile, NOT_TERMINATED)) != NULL) { strlcpy(ptr, TS, TIMESTAMP_LEN); if (rename(oldname, lastfile) != 0) - syslog(LOG_ERR, + auditd_log_err( "Could not rename %s to %s: %m", oldname, lastfile); else { - syslog(LOG_INFO, "renamed %s to %s", + /* + * Remove the 'current' symlink since the link + * is now invalid. + */ + (void) unlink(AUDIT_CURRENT_LINK); + auditd_log_notice( "renamed %s to %s", oldname, lastfile); audit_warn_closefile(lastfile); } } else - syslog(LOG_ERR, "Could not rename %s to %s", oldname, + auditd_log_err( "Could not rename %s to %s", oldname, lastfile); free(lastfile); free(oldname); @@ -211,168 +192,81 @@ close_lastfile(char *TS) } /* - * Create the new audit file with appropriate permissions and ownership. Try - * to clean up if something goes wrong. - */ -static int -#ifdef AUDIT_REVIEW_GROUP -open_trail(const char *fname, uid_t uid, gid_t gid) -#else -open_trail(const char *fname) -#endif -{ - int error, fd; - - fd = open(fname, O_RDONLY | O_CREAT, S_IRUSR | S_IRGRP); - if (fd < 0) - return (-1); -#ifdef AUDIT_REVIEW_GROUP - if (fchown(fd, uid, gid) < 0) { - error = errno; - close(fd); - (void)unlink(fname); - errno = error; - return (-1); - } -#endif - return (fd); -} - -/* * Create the new file name, swap with existing audit file. */ static int swap_audit_file(void) { - char timestr[FILENAME_LEN]; - char *fn; + int err; + char *newfile; char TS[TIMESTAMP_LEN]; - struct dir_ent *dirent; -#ifdef AUDIT_REVIEW_GROUP - struct group *grp; - gid_t gid; - uid_t uid; -#endif - int error, fd; + time_t tt; - if (getTSstr(TS, TIMESTAMP_LEN) != 0) + if (getTSstr(tt, TS, TIMESTAMP_LEN) != 0) return (-1); + err = auditd_swap_trail(TS, &newfile, audit_review_gid, + audit_warn_getacdir); + if (err != ADE_NOERR) { + auditd_log_err( "%s: %m", auditd_strerror(err)); + if (err != ADE_ACTL) + return (-1); + } - snprintf(timestr, FILENAME_LEN, "%s.%s", TS, NOT_TERMINATED); - -#ifdef AUDIT_REVIEW_GROUP /* - * XXXRW: Currently, this code falls back to the daemon gid, which is - * likely the wheel group. Is there a better way to deal with this? + * Only close the last file if were in an auditing state before + * calling swap_audit_file(). We may need to recover from a crash. */ - grp = getgrnam(AUDIT_REVIEW_GROUP); - if (grp == NULL) { - syslog(LOG_INFO, - "Audit review group '%s' not available, using daemon gid", - AUDIT_REVIEW_GROUP); - gid = -1; - } else - gid = grp->gr_gid; - uid = getuid(); -#endif + if (auditd_get_state() == AUD_STATE_ENABLED) + close_lastfile(TS); - /* Try until we succeed. */ - while ((dirent = TAILQ_FIRST(&dir_q))) { - if ((fn = affixdir(timestr, dirent)) == NULL) { - syslog(LOG_INFO, "Failed to swap log at time %s", - timestr); - return (-1); - } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 11:19:46 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67D8A1065672; Wed, 31 Dec 2008 11:19:46 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 53EC18FC13; Wed, 31 Dec 2008 11:19:46 +0000 (UTC) (envelope-from rwatson@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 mBVBJkjW024425; Wed, 31 Dec 2008 11:19:46 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBVBJkV8024424; Wed, 31 Dec 2008 11:19:46 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812311119.mBVBJkV8024424@svn.freebsd.org> From: Robert Watson Date: Wed, 31 Dec 2008 11:19:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186648 - head/contrib/openbsm/config X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 11:19:47 -0000 Author: rwatson Date: Wed Dec 31 11:19:46 2008 New Revision: 186648 URL: http://svn.freebsd.org/changeset/base/186648 Log: Update config.h for OpenBSM 1.1 alpha 4. Modified: head/contrib/openbsm/config/config.h Modified: head/contrib/openbsm/config/config.h ============================================================================== --- head/contrib/openbsm/config/config.h Wed Dec 31 11:12:24 2008 (r186647) +++ head/contrib/openbsm/config/config.h Wed Dec 31 11:19:46 2008 (r186648) @@ -8,6 +8,9 @@ /* Define if audit system calls present */ #define HAVE_AUDIT_SYSCALLS +/* Define if be32enc is present */ +#define HAVE_BE32ENC + /* Define to 1 if you have the `bzero' function. */ #define HAVE_BZERO 1 @@ -69,6 +72,9 @@ /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 +/* Define to 1 if you have the `pthread_mutex_lock' function. */ +#define HAVE_PTHREAD_MUTEX_LOCK 1 + /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ /* #undef HAVE_STAT_EMPTY_STRING_BUG */ @@ -159,13 +165,13 @@ #define PACKAGE_NAME "OpenBSM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "OpenBSM 1.1alpha2" +#define PACKAGE_STRING "OpenBSM 1.1alpha4" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "openbsm" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1alpha2" +#define PACKAGE_VERSION "1.1alpha4" /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void @@ -186,7 +192,7 @@ #define USE_NATIVE_INCLUDES /* Version number of package */ -#define VERSION "1.1alpha2" +#define VERSION "1.1alpha4" /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 11:56:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6395B106566C; Wed, 31 Dec 2008 11:56:35 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 503238FC08; Wed, 31 Dec 2008 11:56:35 +0000 (UTC) (envelope-from rwatson@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 mBVBuZEw025208; Wed, 31 Dec 2008 11:56:35 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBVBuZ1T025207; Wed, 31 Dec 2008 11:56:35 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812311156.mBVBuZ1T025207@svn.freebsd.org> From: Robert Watson Date: Wed, 31 Dec 2008 11:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186649 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 11:56:35 -0000 Author: rwatson Date: Wed Dec 31 11:56:35 2008 New Revision: 186649 URL: http://svn.freebsd.org/changeset/base/186649 Log: Call au_errno_to_bsm() on the errno value passed into au_to_return32() to convert local FreeBSD error numbers into BSM error numbers. Obtained from: TrustedBSD Project Modified: head/sys/security/audit/audit_bsm.c Modified: head/sys/security/audit/audit_bsm.c ============================================================================== --- head/sys/security/audit/audit_bsm.c Wed Dec 31 11:19:46 2008 (r186648) +++ head/sys/security/audit/audit_bsm.c Wed Dec 31 11:56:35 2008 (r186649) @@ -1462,7 +1462,7 @@ kaudit_to_bsm(struct kaudit_record *kar, } kau_write(rec, subj_tok); - tok = au_to_return32((char)ar->ar_errno, ar->ar_retval); + tok = au_to_return32(au_errno_to_bsm(ar->ar_errno), ar->ar_retval); kau_write(rec, tok); /* Every record gets a return token */ kau_close(rec, &ar->ar_endtime, ar->ar_event); From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 13:06:33 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB0AF106564A; Wed, 31 Dec 2008 13:06:33 +0000 (UTC) (envelope-from simon@benji.nitro.dk) Received: from mx.nitro.dk (zarniwoop.nitro.dk [83.92.207.38]) by mx1.freebsd.org (Postfix) with ESMTP id 75AE58FC1A; Wed, 31 Dec 2008 13:06:33 +0000 (UTC) (envelope-from simon@benji.nitro.dk) Received: from benji.nitro.dk (unknown [192.168.3.39]) by mx.nitro.dk (Postfix) with ESMTP id 993611E8C07; Wed, 31 Dec 2008 13:06:32 +0000 (UTC) Received: by benji.nitro.dk (Postfix, from userid 2000) id 61707FD12; Wed, 31 Dec 2008 14:06:32 +0100 (CET) Date: Wed, 31 Dec 2008 14:06:32 +0100 From: "Simon L. Nielsen" To: Hiroki Sato Message-ID: <20081231130631.GC964@zaphod.nitro.dk> References: <200812310549.mBV5nFAN016361@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812310549.mBV5nFAN016361@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-releng@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186634 - releng/7.1/release/doc/share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 13:06:34 -0000 On 2008.12.31 05:49:15 +0000, Hiroki Sato wrote: > Author: hrs > Date: Wed Dec 31 05:49:15 2008 > New Revision: 186634 > URL: http://svn.freebsd.org/changeset/base/186634 > > Log: > Add arch="" attr support. What does this do? AFAIR at least for the hardware notes in the past arch=amd64 e.g. only showed up on amd64? Is this an MFC of what's in head? BTW. thanks for working on the release docs - I know it can be a bit boring... :-). -- Simon L. Nielsen From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 13:56:32 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28335106568B; Wed, 31 Dec 2008 13:56:32 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 149118FC16; Wed, 31 Dec 2008 13:56:32 +0000 (UTC) (envelope-from rwatson@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 mBVDuVGR027396; Wed, 31 Dec 2008 13:56:31 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBVDuVHE027394; Wed, 31 Dec 2008 13:56:31 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812311356.mBVDuVHE027394@svn.freebsd.org> From: Robert Watson Date: Wed, 31 Dec 2008 13:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186650 - in head/sys: conf security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 13:56:32 -0000 Author: rwatson Date: Wed Dec 31 13:56:31 2008 New Revision: 186650 URL: http://svn.freebsd.org/changeset/base/186650 Log: Commit two files missed in previous commit: hook up audit_bsm_errno.c and adapt for kernel build environment. Obtained from: TrustedBSD Project Sponsored by: Apple, Inc. Modified: head/sys/conf/files head/sys/security/audit/audit_bsm_errno.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Dec 31 11:56:35 2008 (r186649) +++ head/sys/conf/files Wed Dec 31 13:56:31 2008 (r186650) @@ -2534,6 +2534,7 @@ rpc/rpcsec_gss/svc_rpcsec_gss.c optional security/audit/audit.c optional audit security/audit/audit_arg.c optional audit security/audit/audit_bsm.c optional audit +security/audit/audit_bsm_errno.c optional audit security/audit/audit_bsm_klib.c optional audit security/audit/audit_bsm_token.c optional audit security/audit/audit_pipe.c optional audit Modified: head/sys/security/audit/audit_bsm_errno.c ============================================================================== --- head/sys/security/audit/audit_bsm_errno.c Wed Dec 31 11:56:35 2008 (r186649) +++ head/sys/security/audit/audit_bsm_errno.c Wed Dec 31 13:56:31 2008 (r186650) @@ -32,10 +32,12 @@ #include __FBSDID("$FreeBSD$"); -#include +#include + +#include #include -#include +#include #include From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 13:57:27 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71D091065687; Wed, 31 Dec 2008 13:57:27 +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 4B98F8FC17; Wed, 31 Dec 2008 13:57:27 +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 ESMTP id EA27F46B03; Wed, 31 Dec 2008 08:57:26 -0500 (EST) Date: Wed, 31 Dec 2008 13:57:26 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <200812311356.mBVDuVHE027394@svn.freebsd.org> Message-ID: References: <200812311356.mBVDuVHE027394@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: Subject: Re: svn commit: r186650 - in head/sys: conf security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 13:57:28 -0000 On Wed, 31 Dec 2008, Robert Watson wrote: > Author: rwatson > Date: Wed Dec 31 13:56:31 2008 > New Revision: 186650 > URL: http://svn.freebsd.org/changeset/base/186650 > > Log: > Commit two files missed in previous commit: hook up audit_bsm_errno.c > and adapt for kernel build environment. > > Obtained from: TrustedBSD Project > Sponsored by: Apple, Inc. Spotted by: ganbold Sorry about that -- we'll see if tinderbox fires or not. Robert N M Watson Computer Laboratory University of Cambridge > > Modified: > head/sys/conf/files > head/sys/security/audit/audit_bsm_errno.c > > Modified: head/sys/conf/files > ============================================================================== > --- head/sys/conf/files Wed Dec 31 11:56:35 2008 (r186649) > +++ head/sys/conf/files Wed Dec 31 13:56:31 2008 (r186650) > @@ -2534,6 +2534,7 @@ rpc/rpcsec_gss/svc_rpcsec_gss.c optional > security/audit/audit.c optional audit > security/audit/audit_arg.c optional audit > security/audit/audit_bsm.c optional audit > +security/audit/audit_bsm_errno.c optional audit > security/audit/audit_bsm_klib.c optional audit > security/audit/audit_bsm_token.c optional audit > security/audit/audit_pipe.c optional audit > > Modified: head/sys/security/audit/audit_bsm_errno.c > ============================================================================== > --- head/sys/security/audit/audit_bsm_errno.c Wed Dec 31 11:56:35 2008 (r186649) > +++ head/sys/security/audit/audit_bsm_errno.c Wed Dec 31 13:56:31 2008 (r186650) > @@ -32,10 +32,12 @@ > #include > __FBSDID("$FreeBSD$"); > > -#include > +#include > + > +#include > > #include > -#include > +#include > > #include > > From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 14:17:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D0AD106564A; Wed, 31 Dec 2008 14:17:01 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id C9F918FC17; Wed, 31 Dec 2008 14:16:58 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (pD9E2FE1A.dip.t-dialin.net [217.226.254.26]) by redbull.bpaserver.net (Postfix) with ESMTP id 0C1142E0BA; Wed, 31 Dec 2008 15:00:39 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 8C90A18C1C4; Wed, 31 Dec 2008 15:00:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1230732034; bh=qCmwI11Zv01kQZzHNzmFuWymbT3DBFz9x 8RvxZv6+hM=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Hoo72+yRlP9p5BnwwI9LQ+tSw4Cc72K9+kMx13wGOyWVrxZhww2u48morz5jWTO4s qnQdS51HmcZo3sLOf/Ik+pFbteZRHa8u5YgHf6NkxnytbQFtHJULtpNekHzrXmcmHdM SPU8GWe99AlgoW9ofdOCwrMqzFHr4Tnc4mKrzaLAe+E118cCRpqBtzN1gHXtbpX7sOl Gin+TNmSrgaiwsjZLBAlrYxI8e3oEr5b8+ie9ei/3MkJjCd1Pe4alSuOQFgNwj1F4M4 MDVRefBNsAHfEscN2nAt/hAdfp2xK9w1JnqUvCsP72gakv5E2vS9+c2RS5GScOi1LT4 byF5CiW+g== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id mBVE0XbF026734; Wed, 31 Dec 2008 15:00:33 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Wed, 31 Dec 2008 15:00:33 +0100 Message-ID: <20081231150033.15001evgwyizs6jo@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Wed, 31 Dec 2008 15:00:33 +0100 From: Alexander Leidinger To: Roman Divacky References: <200812121158.mBCBwRPT096820@svn.freebsd.org> <20081226234619.GT18389@elvis.mu.org> <1230336804.25666.11.camel@bauer.cse.buffalo.edu> <20081227011017.GW18389@elvis.mu.org> <7d6fde3d0812261746g66d19d2clf646333cf9da5559@mail.gmail.com> <20081227092736.GA25457@freebsd.org> In-Reply-To: <20081227092736.GA25457@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.3) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 0C1142E0BA.A6763 X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-13.927, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, MIME_QP_LONG_LINE 1.40, RDNS_DYNAMIC 0.10, SMILEY -0.50, TW_SV 0.08) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , svn-src-head@freebsd.org, Garrett Cooper , Ken Smith , Ken Smith Subject: Re: svn commit: r185982 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 14:17:01 -0000 Quoting Roman Divacky (from Sat, 27 Dec 2008 =20 10:27:36 +0100): > On Fri, Dec 26, 2008 at 05:46:12PM -0800, Garrett Cooper wrote: >> On Fri, Dec 26, 2008 at 5:10 PM, Alfred Perlstein =20 >> wrote: >> > * Ken Smith [081226 16:13] wrote: >> >> On Fri, 2008-12-26 at 15:46 -0800, Alfred Perlstein wrote: >> >> > Does this mean that the user has to find the "Linux" package in the >> >> > "add packages" area now? If so, that seems a bit complicated to >> >> > get started. There's a LOT of packages. Pardon if I'm =20 >> missing something >> >> > obvious here. >> >> >> >> Yes, sort of. I would say: not really. All linux ports are supposed to depend upon =20 the right infrastructure ports. So just installing an end-user linux =20 port (a.g. acroread) should pull in all the necessary stuff. I don't =20 see a huge need to special case "the linux package" (=3D linux_base-fc4 =20 ATM, at least form my point of view as one of the two persons taking =20 care about the linuxulator infrastructure in the ports collection). >> >> I've asked portmgr@ to help with setting things up so we've got a coup= le >> >> of new meta packages that help users set up a usable workstation >> >> relatively painlessly. They've said we can work together with the Gno= me >> >> and KDE folks to try and get that set up. I'm not sure at this point = if >> >> Linux emulation will be part of that or not, we haven't gotten quite >> >> that far yet. And we'll do something to make those meta-packages >> >> relatively easy to find. For example without something along those >> >> lines a user may just select the "gnome2" metapackage thinking they'll >> >> get a usable workstation but at least as of the last time I did >> >> something like that you don't quite wind up with a usable workstation >> >> (xorg-server is missing for example :-/). >> >> >> >> That said this has sort of been threatened for quite a while now, and >> >> having sysinstall not care about any packages before it hits what is >> >> currently its "Do you want to browse all the packages" section is need= ed >> >> if we're talking about not including pre-built packages with the relea= se >> >> itself and that sort of thing. We're just setting it up so all packag= es >> >> get treated as packages instead of some being intertwined in earlier >> >> phases of sysinstall. >> > >> > OK, that makes sense. Please track it though, it would be bad to wind = up >> > "hiding" Linux compat from users under a huge package selection. I think it would be better if people would go into more detail if they =20 talk about kldloading the linux module, or if they talk about =20 installing the linuxulator-userland-infrastructure (linux_base-XXX, =20 linux-x11-libs, ...). >> Yes, but it'd be nicer for linux compatibility to point to actual >> working linux emulators instead of long-defunct packages (the Redhat >> emulation package -- bleh). >> I'm all for improving the linux compat layer packaging -- thanks Ken! You should come over to emulation@, there's a major part of the linux =20 infrastructure ports work explained in the archives. Unfortunately I =20 haven't seen any message from Ken there regarding the issues he sees =20 with linux stuff. > we've switched to 2.6 emulation on default in -current so we are able to > use newer fedora distro. the problem here is that there is no release > freebsd with default 2.6 emulation, hence the default port stays at fc4 > > that's going to change To add a little bit on this: An update to add more recent fedora bits is waiting for the ports =20 slush to be over. When those bits have hit the tree, we can have a =20 look how to pick a more recent fedora release for systems where the =20 2.6.16 emulation is enabled or on by default. Nothing is set in stone =20 there as there's nothing in the ports tree to experiment with. BTW: Roman implicitly told above, that FC4 is the last Fedora release =20 which is able to work with our linux 2.4 emulation which we have in =20 all our releases. 8.0 will be the first release with 2.6.16 emulation =20 by default. AFAIK the *at() functions are not MFCed (and probably some =20 other important stuff), so apart from the POLA reason to not change =20 the default on a -stable branch, we also have a technical reason to =20 not enable 2.6.16 on 7-stable. Bye, Alexander. --=20 Gilbert's Discovery: =09Any attempt to use the new super glues results in the two pieces =09sticking to your thumb and index finger rather than to each other. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 14:18:09 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B839106566B; Wed, 31 Dec 2008 14:18:09 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by mx1.freebsd.org (Postfix) with ESMTP id 571258FC12; Wed, 31 Dec 2008 14:18:08 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ewy14 with SMTP id 14so6870607ewy.19 for ; Wed, 31 Dec 2008 06:18:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=1NaZpAhR4f/Yc7f7rIlRV4M3Uv8anMcXVaK5XA6Drr4=; b=aM1NcDQ5X7whGUp7QyMR/RTY+rxkdvjlFiQ7AkLkvUBAXMZwpqlWlw52pt1jnPj7hy K4NpaygQ3KqgpDsbq/ow+c1YjD1U8q0VqjnK0lczshz1zwHAUn6LtomoDsuzlWJXx8go d7Ff7xuOvRkpikLb1T+0fXuSUxg7c51ERgW4A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=kGwKLcoPZsZ0d68sCaBy3b8h867y9vNOLPGpw3QZXOjabpk4JTLoqB/7+ihwdqvlpG PiaV5CKeqGo6m6dKCbKFRjcj8RyI68t/ZMe4JoD/eMCgqk+we91LA6PfHaTWm6D/ZnOd 8T9yltD2DK+X9oXbWi5g4GAkJOWD4EczliQCE= Received: by 10.210.57.5 with SMTP id f5mr3396240eba.199.1230733086686; Wed, 31 Dec 2008 06:18:06 -0800 (PST) Received: from epsilon.lan (bl6-155-103.dsl.telepac.pt [82.155.155.103]) by mx.google.com with ESMTPS id j8sm23613304gvb.12.2008.12.31.06.18.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 31 Dec 2008 06:18:05 -0800 (PST) Sender: Rui Paulo Message-Id: <006D5446-445F-4ABA-92EA-2DBC6D8484FB@FreeBSD.org> From: Rui Paulo To: M. Warner Losh In-Reply-To: <20081230.182150.-1597331197.imp@bsdimp.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Wed, 31 Dec 2008 14:18:03 +0000 References: <200812301946.mBUJk7aa003245@svn.freebsd.org> <20081230.182150.-1597331197.imp@bsdimp.com> X-Mailer: Apple Mail (2.930.3) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186608 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 14:18:09 -0000 On 31 Dec 2008, at 01:21, M. Warner Losh wrote: > In message: <200812301946.mBUJk7aa003245@svn.freebsd.org> > Rui Paulo writes: > : Add a kernel config file so that users have less difficulty > testing > : USBng. > > One could almost create a 'USB2_GEN' file in sys/conf that had all > this > stuff in it, and reduce these files to a simple 'include USB2_GEN'... Sure, but I'm hoping this is only temporary. I see there's a big rush on enabling USB2 without much testing from the users. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 14:25:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B7DE1065674; Wed, 31 Dec 2008 14:25:15 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17F0E8FC1B; Wed, 31 Dec 2008 14:25:15 +0000 (UTC) (envelope-from luigi@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 mBVEPEcC027950; Wed, 31 Dec 2008 14:25:14 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBVEPElm027948; Wed, 31 Dec 2008 14:25:14 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200812311425.mBVEPElm027948@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 31 Dec 2008 14:25:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186651 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 14:25:15 -0000 Author: luigi Date: Wed Dec 31 14:25:14 2008 New Revision: 186651 URL: http://svn.freebsd.org/changeset/base/186651 Log: add some USB scanner IDs for recent Epson multifunction devices. Add support to uscanner.c for known-working devices (the same should be done for uscanner2.c). Waiting for 7.1 to be released before the merge. MFC after: 3 weeks Modified: head/sys/dev/usb/usbdevs head/sys/dev/usb/uscanner.c Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Dec 31 13:56:31 2008 (r186650) +++ head/sys/dev/usb/usbdevs Wed Dec 31 14:25:14 2008 (r186651) @@ -1239,12 +1239,18 @@ product EPSON STYLUS_895 0x0602 Stylus P product EPSON CX5400 0x0808 CX5400 scanner product EPSON 3500 0x080e CX-3500/3600/3650 MFP product EPSON RX425 0x080f Stylus Photo RX425 scanner -product EPSON 4800 0x0819 CX4800 MP scanner -product EPSON 4200 0x0820 CX4200 MP scanner -product EPSON 5000 0x082b DX-50x0 MFP scanner -product EPSON 6000 0x082e DX-60x0 MFP scanner -product EPSON DX7400 0x0838 DX7400/CX7300 scanner -product EPSON DX8400 0x0839 DX8400 scanner +product EPSON DX3800 0x0818 CX3700/CX3800/DX38x0 MFP scanner +product EPSON 4800 0x0819 CX4700/CX4800/DX48x0 MFP scanner +product EPSON 4200 0x0820 CX4100/CX4200/DX4200 MFP scanner +product EPSON 5000 0x082b CX4900/CX5000/DX50x0 MFP scanner +product EPSON 6000 0x082e CX5900/CX6000/DX60x0 MFP scanner +product EPSON DX4000 0x082f DX4000 MFP scanner +product EPSON DX7400 0x0838 CX7300/CX7400/DX7400 MFP scanner +product EPSON DX8400 0x0839 CX8300/CX8400/DX8400 MFP scanner +product EPSON SX100 0x0841 SX100/NX100 MFP scanner +product EPSON NX300 0x0848 NX300 MFP scanner +product EPSON SX200 0x0849 SX200/SX205 MFP scanner +product EPSON SX400 0x084a SX400/NX400/TX400 MFP scanner /* e-TEK Labs products */ product ETEK 1COM 0x8007 Serial Modified: head/sys/dev/usb/uscanner.c ============================================================================== --- head/sys/dev/usb/uscanner.c Wed Dec 31 13:56:31 2008 (r186650) +++ head/sys/dev/usb/uscanner.c Wed Dec 31 14:25:14 2008 (r186651) @@ -90,6 +90,15 @@ struct uscan_info { /* Table of scanners that may work with this driver. */ static const struct uscan_info uscanner_devs[] = { + + /* + * These first two entries are duplicates of known-working units, + * so one can patch them to test support for newer devices + * without rebuilding the module. + */ + {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_6000 }, 0 }, /* duplicate */ + {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_6000 }, 0 }, /* duplicate */ + /* Acer Peripherals */ {{ USB_VENDOR_ACERP, USB_PRODUCT_ACERP_ACERSCAN_320U }, 0 }, {{ USB_VENDOR_ACERP, USB_PRODUCT_ACERP_ACERSCAN_4300U }, 0 }, @@ -217,6 +226,12 @@ static const struct uscan_info uscanner_ {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_CX5400 }, 0 }, {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_DX7400 }, 0 }, {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_DX8400 }, 0 }, + {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_CX5400 }, 0 }, + {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_DX3800 }, 0 }, + {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_DX4000 }, 0 }, + {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_NX300 }, 0 }, + {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_SX200 }, 0 }, + {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_SX400 }, 0 }, /* UMAX */ {{ USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA1220U }, 0 }, From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 15:39:46 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A70CF106566B; Wed, 31 Dec 2008 15:39:46 +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 92B928FC14; Wed, 31 Dec 2008 15:39:46 +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 mBVFdkM7029325; Wed, 31 Dec 2008 15:39:46 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBVFdk8h029323; Wed, 31 Dec 2008 15:39:46 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200812311539.mBVFdk8h029323@svn.freebsd.org> From: Hiroki Sato Date: Wed, 31 Dec 2008 15:39:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186652 - in releng/7.1/release/doc/zh_CN.GB2312: errata hardware relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 15:39:47 -0000 Author: hrs Date: Wed Dec 31 15:39:46 2008 New Revision: 186652 URL: http://svn.freebsd.org/changeset/base/186652 Log: Merge the following changes from the English version: r181796 -> r186637 errata/article.sgml r185258 -> r186206 hardware/article.sgml r185258 -> r186643 relnotes/article.sgml Submitted by: delphij Approved by: re (implicit) Modified: releng/7.1/release/doc/zh_CN.GB2312/errata/article.sgml releng/7.1/release/doc/zh_CN.GB2312/hardware/article.sgml releng/7.1/release/doc/zh_CN.GB2312/relnotes/article.sgml Modified: releng/7.1/release/doc/zh_CN.GB2312/errata/article.sgml ============================================================================== --- releng/7.1/release/doc/zh_CN.GB2312/errata/article.sgml Wed Dec 31 14:25:14 2008 (r186651) +++ releng/7.1/release/doc/zh_CN.GB2312/errata/article.sgml Wed Dec 31 15:39:46 2008 (r186652) @@ -10,7 +10,7 @@ The FreeBSD Simplified Chinese Project - Original Revision: 181796 + Original Revision: 186637 --> %release; - + ]>
@@ -127,6 +127,8 @@ ]]> 暂无安全公告。 + ]]> @@ -172,38 +175,7 @@ ]]> [20080229] &man.tcpdump.1; 不能正确地显示 802.11 帧的 - TX/RX 速率。 此问题已经在 - HEAD 和 RELENG_7 分支中修复。 - - [20080229] 在 Linux 模拟系统中发现了一个可能导致某些使用 - &man.mmap.2; 的 Linux 程序发生访问越界 (segmentation fault) - 的 bug。 此问题已经在 - HEAD 和 RELENG_7 分支中修复。 - - [20080229] 使用 &man.re.4; 网卡驱动时, - 有用户观察到了包数据损坏和不稳定等现象。 一些用户报告使用这一驱动的较新版本 - (在 HEAD 上) 能够解决他们的问题, 或至少有所改善。 - - [20080229, 20080817 更新] 有用户反映, &os; 对发出 TCP 选项方式所进行的变动, - 会导致连接出现问题。 这一问题的修正目前已汇入 - HEAD 和 RELENG_7 以及 RELENG_7_0 分支。 更多详情请参阅勘误通知 - FreeBSD-EN-08:02.tcp - - [20080307] &os; 中的 SCTP 实现目前依赖于将 INET6 - 支持联编进内核中。 我们计划在未来的版本中将这一需求去掉。 - - [20080307] 从 &os; - 6.X 到 &os; &release.bugfix; 的升级, - 会在 installkernel 这一步时, - 产生一些来自 &man.kldxref.8; 的警告信息。 这些警告是无害的, - 可以安全地忽略它们。installkernel step. These warnings are - harmless and can be ignored. - - [20080307] IPsec 功能所需要的 &man.crypto.4; 驱动程序在 - &os;/&arch.powerpc; 平台上存在严重问题 - (编译配置中使用 device crypto 会导致内核不可用)。 - + 暂无未解决的问题。 ]]> @@ -216,14 +188,7 @@ ]]> [20080229] &os; &release.bugfix; 发行说明文档 - (发行版本说明、 硬件兼容说明等) 中提到使用 &os; 7-STABLE - 的用户应订阅 freebsd-current 邮件列表, - 这些文字不应出现。 - - [20080229] 在发行版说明中的 KDE 版本号是不正确的, - 正确的版本号是 3.5.8。 - + 无新闻。 ]]> Modified: releng/7.1/release/doc/zh_CN.GB2312/hardware/article.sgml ============================================================================== --- releng/7.1/release/doc/zh_CN.GB2312/hardware/article.sgml Wed Dec 31 14:25:14 2008 (r186651) +++ releng/7.1/release/doc/zh_CN.GB2312/hardware/article.sgml Wed Dec 31 15:39:46 2008 (r186652) @@ -88,19 +88,36 @@ - &intel; 64-位 &xeon; (Nocona)。 - 这类处理器采用 90nm 制程工艺制造, 配合 &intel; E7520/E7525/E7320 芯片组, - 能够运行于 2.80 到 3.60 GHz (FSB 800MHz)。 + 除了 Sossaman 之外的所有多核 &intel; &xeon; 处理器均包含 EM64T 支持。 - 支持 &intel; EM64T 的 &intel; &pentium; 4 处理器 (Prescott)。 - 这类处理器采用 90nm 制程工艺制造, 采用 FC-LGA775 封装, 配合 &intel; - 925X Express 芯片组, 能够运行于 3.20F/3.40F/3.60F GHz。 - 对应的 S-Spec 编号包括 SL7L9、 SL7L8、 SL7LA、 SL7NZ、 SL7PZ, - 以及 SL7PX。 需要注意的是, 编号为 5xx 的处理器并不支持 - EM64T。 + 单核 &intel; &xeon; + 处理器 NoconaIrwindale、 + PotomacCranford 包含了 + EM64T 支持。 + + + 所有 &intel; Core 2 (不是 Core Duo) 和更新的处理器 + + + + 所有 &intel; &pentium; D 处理器 + + + + 采用 Cedar Mill 核心的 &intel; &pentium; 4 + 和 Celeron D 包含了 EM64T 支持。 + + + + 部分采用 Prescott 核心的 &intel; &pentium; 4 + 和 Celeron D 包含了 EM64T 支持。 请参阅 Intel + Processor Spec Finder 以获得关于 Intel 处理器对于 + EM64T 支持的确切官方资料。 + + &intel; EM64T 是 IA-32 (x86) 的一种扩展版本, @@ -108,7 +125,7 @@ 一些来自 &intel; 的早期文档将 &intel; EM64T 称作 64-位 扩展技术IA-32e - 目前为止测试过的最大内存配置为 8GB。 此硬件平台上的 SMP + 目前为止测试过的最大内存配置为 32GB。 此硬件平台上的 SMP 支持已经完备, 并且相当稳定了。 在许多方面, 特别是在驱动程序支持上, &os;/&arch.amd64; 与 &os;/&arch.i386; @@ -392,7 +409,7 @@ - - - - - - - - + ]>
- - &os; &release.current; 发行说明 + + &os; &release.current; 发行说明 - 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; - - - - 这份 &os; &release.current; 的发行说明, 概括了 &os; 基本系统在 - &release.branch; 开发线上所做的改动。 - 本文档列举了自前一发行版本以来所有适用的安全公告, 以及对于 - &os; 内核以及系统附带的应用程序所做的重要修改。 - 对在升级时需要注意的一些问题, 也进行了简略的介绍。 - - - - - 简介 - - 这篇文档包括了 &os; - &release.current; 的发行说明。 它描述了最近刚刚加入、 - 修改或删除了的 &os; 特性的说明。 同时, - 它也将给出如何从先前的 &os; 版本完成升级的说明。 + + 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; + + + + 这份 &os; &release.current; 的发行说明, 概括了 &os; 基本系统在 + &release.branch; 开发线上所做的改动。 + 本文档列举了自前一发行版本以来所有适用的安全公告, 以及对于 + &os; 内核以及系统附带的应用程序所做的重要修改。 + 对在升级时需要注意的一些问题, 也进行了简略的介绍。 + + + + + 简介 + + 这篇文档包括了 &os; + &release.current; 的发行说明。 它描述了最近刚刚加入、 + 修改或删除了的 &os; 特性的说明。 同时, + 它也将给出如何从先前的 &os; 版本完成升级的说明。 这篇文档所介绍的 &release.type; 软件包, - 介绍了 &release.branch; 开发分支自 &release.branch; - 创建以来的进展。 关于这一分支上预编译的、 二进制版本的 - &release.type; 软件包, 可以在 - 找到。 - + 这篇文档所介绍的 &release.type; 软件包, + 介绍了 &release.branch; 开发分支自 &release.branch; + 创建以来的进展。 关于这一分支上预编译的、 二进制版本的 + &release.type; 软件包, 可以在 + 找到。 ]]> 这份说明所说的 &release.type; 版本, - 是在 &release.branch; 开发分支上 &release.prev; 到未来的 &release.next; - 上的一点。 这一开发分支上预编译的二进制形式的 &release.type; - 安装包, 可以在 找到。 - + 这份说明所说的 &release.type; 版本, + 是在 &release.branch; 开发分支上 &release.prev; 到未来的 &release.next; + 上的一点。 这一开发分支上预编译的二进制形式的 &release.type; + 安装包, 可以在 找到。 ]]> 这是一份 &os; &release.current; 的 - &release.type; 发布包。 您可以从 或其他镜像那里得到它的副本。 - 关于这个 (或其他) &release.type; 发布包的更多信息,可以在 - &os; 手册 - 中的 如何获得 - &os;附录 中找到。 - + 这是一份 &os; &release.current; 的 + &release.type; 发布包。 您可以从 + 或其他镜像那里得到它的副本。 + 关于这个 (或其他) &release.type; 发布包的更多信息,可以在 + &os; 手册 + 中的 如何获得 &os; 附录 + 中找到。 ]]> 我们鼓励所有的用户在开始安装 &os; @@ -100,226 +88,640 @@ 新发现的 问题和相关信息。 通常,这包括已知的 bug,安全公告,以及对于文档的修订内容。 最新的 &os; &release.current; 勘误信息可以从 &os; 网站获得。 + - - - - 最新变动 + + 最新变动 - 这一节描述了 - &os; 自 &release.prev; 以来最明显的新功能和变化。 - - - 发行说明中的绝大多数条目是在说明自从 - &release.prev; - 以来的安全公告、新的驱动程序或硬件支持、新的命令或是选项、 - 重要的错误修补,以及基本系统中来自第三方的软件升级。 - 重要的 ports 和 packages 变动,或关于交付工程的变动也会在这份文档中体现。 - 显而易见地,发行说明不可能涵盖 &os; 版本之间的每一个微小变动; - 这篇文档主要关注的,仍然是安全公告,用户可以察觉的修改, - 以及重要的架构改良。 - - - 安全公告 - - - - - - 对内核的改动 - - 为内核调试器 &man.ddb.4; 新增了输出捕捉机制。 - 来自 &man.ddb.4; 的输入和输出内容会自动捕捉到一个内存缓冲区, - 以便在随后通过 &man.sysctl.8; 或 textdump 来读取和分析。 - 新增的 capture 命令可以控制这个功能。 - - 为 &man.ddb.4; 调试器新增了简单的脚本机制支持, - 使其能够支持一组经过命名的包含一系列 &man.ddb.4; 命令的脚本。 - 这些脚本可以在 &man.ddb.4; 中, 或通过新增的 &man.ddb.8; - 来进行配置。 更多详情请参见联机手册 &man.ddb.4;。 - - 内核新增了 textdump 格式的主存内容转存能力。 - 与传统主存内容转存方式不同, textdump - 通过一系列机械化的生成/提取调试输出来提供高一级的信息。 - 这个机制即使在内核没有包含调试符号, 或源代码与内核不完全同步的情况下, - 仍然能够提供简明但内容丰富的调试信息。 关于这一机制的进一步详情请参见联机手册 - &man.textdump.4;。 + 这一节描述了 &os; + 自从 &release.prev; 以来最明显的新功能和变化。 - [&arch.amd64;, &arch.i386;] ULE - 调度器成为了 GENERIC 内核的默认进程调度器。 + 发行说明中的绝大多数条目是在说明自从 + &release.prev; + 以来的安全公告、新的驱动程序或硬件支持、新的命令或是选项、 + 重要的错误修补,以及基本系统中来自第三方的软件升级。 + 重要的 ports 和 packages 变动,或关于交付工程的变动也会在这份文档中体现。 + 显而易见地,发行说明不可能涵盖 &os; 版本之间的每一个微小变动; + 这篇文档主要关注的,仍然是安全公告,用户可以察觉的修改, + 以及重要的架构改良。 + + + 安全公告 + + 下列安全公告所描述的问题均已在这一版本中进行了修正。 + 如欲了解进一步的信息, 请参阅位于 + 的安全公告全文。 + + + + + + + + + 公告 + 日期 + 主题 + + + + + SA-08:05.openssh + 2008 年 4 月 17 日 + OpenSSH X11-转发特权提升问题 + + + SA-08:06.bind + 2008 年 7 月 13 日 + DNS 缓存投毒问题 + + + SA-08:07.amd64 + 2008 年 9 月 3 日 + amd64 swapgs 本地特权提升问题 + + + SA-08:08.nmount + 2008 年 9 月 3 日 + &man.nmount.2; 本地任意代码执行问题 + + + SA-08:09.icmp6 + 2008 年 9 月 3 日 + IPv6 连接导致的远程内核崩溃问题 + + + SA-08:10.nd6 + 2008 年 10 月 1 日 + IPv6 邻居发现协议 (NDP) 路由漏洞 + + + SA-08:11.arc4random + 2008 年 11 月 24 日 + &man.arc4random.9; 可预测序列漏洞 + + + SA-08:12.ftpd + 2008 年 12 月 23 日 + &man.ftpd.8; 跨站请求伪造问题 + + + SA-08:13.protosw + 2008 年 12 月 23 日 + netgraph / bluetooth 特权提升问题 + + + + + + + + 对内核的改动 + + 为 &man.clock.gettime.2; 和相关系统调用新增了符合 POSIX + 的时钟 ID CLOCK_THREAD_CPUTIME_ID + + 新增了 &man.cpuset.2; 系统调用。 这是用于将线程与 CPU 及 + CPU 资源组进行绑定和分配的 API。 + + 从 OpenSolaris 引入了 DTrace, 一套完整的动态跟踪框架以及 + &man.dtrace.1; 用户态工具。 DTrace 为管理员、 + 开发人员以及支持工程师提供了用于回答操作系统和用户程序各类问题的强大的基础设施。 + 为内核调试器 &man.ddb.4; 新增了输出捕捉机制。 + 来自 &man.ddb.4; 的输入和输出内容会自动捕捉到一个内存缓冲区, + 以便在随后通过 &man.sysctl.8; 或 textdump 来读取和分析。 + 新增的 capture 命令可以控制这个功能。 + + 为 &man.ddb.4; 调试器新增了简单的脚本机制支持, + 使其能够支持一组经过命名的包含一系列 &man.ddb.4; 命令的脚本。 + 这些脚本可以在 &man.ddb.4; 中, 或通过新增的 &man.ddb.8; + 来进行配置。 更多详情请参见联机手册 &man.ddb.4;。 + + &man.ddb.4; 的 ex 命令新增了 + 模式, 用于将指定的符号解析成地址并打印其值。 例如 + ex /S aio_swake + 可以显示出当前通过 aio_swake 挂钩注册的地址。 + + 为 &man.ddb.4; 新增了 show conifhk 命令。 + 它能够列出在 run_interrupt_driven_config_hooks() 中等待的挂钩。 + + &man.fcntl.2; 系统调用新增了 + F_DUP2FD 命令的支持。 它与 + &man.dup.2; 作用相同, 并与 Sun Solaris 和 IBM AIX 兼容。 + + &os; 的 &man.linux.4; ABI 支持使用真正的 CPU 绑定配置原语实现了 + sched_setaffinity() 和 + get_setaffinity() + + &man.rpc.lockd.8; 客户端的功能在 &os; 内核中重新进行了实现。 + 这个实现提供了正确的 &man.flock.2; 风格的锁语义, + 后者在命令行工具 &man.lockf.1; 和库函数 &man.pidfile.3; + 中有所使用。 它同时还提供了服务器重启时的恢复能力, + 并能够确保修改过的数据块在获得锁之前写入服务器 + (这使得多个不同的客户端能够安全地利用文件上锁来共享数据)。 + 此外, 新增了内核选项 + options NFSLOCKD 并默认启用。 + 如果启用了内核支持, 则 &man.rpc.lockd.8; + 会自动检测并使用这一功能。 + + 内核新增了 textdump 格式的主存内容转存能力。 + 与传统主存内容转存方式不同, textdump + 通过一系列机械化的生成/提取调试输出来提供高一级的信息。 + 这个机制即使在内核没有包含调试符号, 或源代码与内核不完全同步的情况下, + 仍然能够提供简明但内容丰富的调试信息。 关于这一机制的进一步详情请参见联机手册 + &man.textdump.4;。 + + &man.wait4.2; 系统调用新增了 + 标志以保持进程的可等待状态, + 以及与 等价的 + 标志。 + + &os; 内核支持将中断与 CPU 绑定了。 + + ULE + 调度器成为了 GENERIC 内核的默认进程调度器。 + + 新增了与内核选项 + COMPAT_FREEBSD[456] 对应的 sysctl + 变量 kern.features.compat_freebsd[456] - 引导加载器变动 - - + 引导加载器的变化 - [&arch.amd64;、 &arch.i386;] 对引导加载器使用的 BTX 内核进行了修改, + 对引导加载器使用的 BTX 内核进行了修改, 使其在实模式下调用 BIOS 例程。 这一变动使得从 USB 设备引导 &os; 成为了可能。 - [&arch.amd64;、 &arch.i386;] 新增了用于支持从 GPT + 新增了用于支持从 GPT 标签引导系统的 gptboot 引导加载器。 为 &man.gpt.8; 工具新增了 boot 命令, 其作用是通过写入引导加载器, 并根据需要创建新的引导分区来让 GPT 磁盘能够引导系统。 - 硬件支持 - 新增了用于支持 Omnikey CardMan 4040 - PCMCIA 智能卡阅读器的 &man.cmx.4; 驱动。 + 新增了用于支持 Omnikey CardMan 4040 + PCMCIA 智能卡阅读器的 &man.cmx.4; 驱动。 - 从 OpenBSD 引入了用于支持基于 Silicon - Laboratories CP2101/CP2102 USB 串口适配器的 &man.uslcom.4; 驱动。 + 新增了 &man.kbdmux.4; 驱动程序。 + &man.sunkbd.4; 能够支持模拟 &man.atkbd.4; 的 + &man.ukbd.4; 了。 - - 多媒体支持 + nvram(4) 驱动是 + MPSAFE 的了。 - - + 不再支持用于 &man.puc.4; + 驱动程序的 PUC_FASTINTR 选项。 - - 网络接口支持 + &man.psm.4; 驱动程序会首先尝试检测触摸板之后再检测 IntelliMouse。 + 一些触摸板会伪装成 IntelliMouse, 导致探测 IntelliMouse 正常, + 而检测触摸板则无法正常工作。 - 新增了用于支持 - Atheros AR8121/AR8113/AR8114 千兆/百兆以太网控制器的 &man.ale.4; 驱动程序。 - 在这一版本中的 GENERIC - 内核中默认并不包含此驱动。 + 从 OpenBSD 引入了用于支持基于 Silicon + Laboratories CP2101/CP2102 USB 串口适配器的 &man.uslcom.4; 驱动。 - 将 &man.em.4; 驱动程序分拆成了两个共享部分代码的驱动程序。 - &man.em.4; 驱动程序将继续支持高至 82575 的网卡以及新的针对客户机/桌面的网卡。 - 新增的 &man.igb.4; 驱动程序则用于支持新的服务器网卡。 + + 多媒体支持 - [&arch.amd64;、 &arch.i386;] 对 &man.wpi.4; 驱动程序进行了更新, - 修正了一系列可靠性问题。 + &man.agp.4; 驱动程序新增了 Intel G33 和 + G45 的支持。 - - + 新增了使用 VESA BIOS 的 DPMS 功能来完成挂起和恢复的 + dpms(4) 驱动程序。 - - 网络协议 + 内核驱动程序 DRM 新增了 i915 GME 设备的支持。 + - + + 网络接口支持 - + 新增了用于支持 + Atheros AR8121/AR8113/AR8114 千兆/百兆以太网控制器的 &man.ale.4; 驱动程序。 + 在这一版本中的 GENERIC + 内核中默认并不包含此驱动。 - - 磁盘和存储 + 将 &man.em.4; 驱动程序分拆成了两个共享部分代码的驱动程序。 + &man.em.4; 驱动程序将继续支持高至 82575 的网卡以及新的针对客户机/桌面的网卡。 + 新增的 &man.igb.4; 驱动程序则用于支持新的服务器网卡。 - &man.aac.4; 驱动程序支持尺寸超过 - 2TB 的卷了。 + 对 &man.hme.4; 驱动程序进行了改进。 - &man.hptrr.4; 更新到了来自 Highpoint 的 1.2 - 版。 + &man.ixgbe.4; 驱动程序更新到了来自 Intel 的 + 1.6.2 版本。 - + 某些采用 &man.miibus.4; 支持的驱动程序的 + IEEE 802.3 自动协商顺序不正确的问题得到了修正。 + 现在它会按照 Annex + 288.3 描述的顺序正确地进行 IEEE 802.3 支持技术协商了。 - - File Systems + 为 &man.msk.4; 驱动程序添加了针对短帧 TCP/UDP 硬件校验和计算 bug + 的 workaround。 注意对于需要硬件进行 + VLAN tag 插入的帧而言, 这个 workaround 没有做用, 因为在 mbuf 中插入 + VLAN tag 会导致校验和变化。 因此如果需要 + VLAN 就必须禁用硬件校验和辅助计算。 - - - + 对 &man.ndis.4; NDIS miniport 驱动封装程序进行了改进。 - - 用户态环境变动 + 对 &man.sf.4; 驱动程序进行了改进, 它支持校验和辅助计算了。 - &man.adduser.8; 工具新增了用于指定新用户主目录的 - 参数。 + &man.stge.4; 驱动程序支持 WOL (通过 + LAN 唤醒) 了。 - &man.chflags.1; 新增了用于指定详细输出的 选项, - 以及类似于 (例如) &man.chmod.1; 对应的忽略错误语义的 选项。 + 对 &man.vr.4; 驱动程序进行了改进。 - &man.realpath.1; 新增了用于禁止给出警告信息的 - 选项; 此外, 它能够接受多个路径作为命令行参数了。 + 对 &man.wpi.4; 驱动程序进行了更新, + 修正了一系列可靠性问题。 + + - &man.cron.8; 新增了用于协助管理大量主机环境中 cron 邮件的 - 参数。 + + 网络协议 - &man.ypserv.8; 新增了用于指定监听端口的 参数。 + &man.arp.8; 工具新增了 reject + 和 blackhole 关键字。 + 对于标记为 reject 的项目, + 发到主机的流量将被丢弃, 而发送者则会得到主机无法到达的回应。 + 对于标记为 blackhole 的项目, + 则只是简单地丢弃这些流量。 - - <filename>/etc/rc.d</filename> 脚本 + &man.bpf.4; 新增了 + ioctl BIOCSETFNR。 这个功能和 + BIOCSETF 类似, 但不丢弃描述符缓冲的所有包并重置统计数据。 - - - + &man.if.bridge.4; 支持使用 + &man.ifconfig.8; 的 ifmaxaddr 参数来限制网桥接口后面的源 + MAC 数量了。 + + 修正了可能在 &man.carp.4; 接口配置时导致内核崩溃的 bug。 + + &man.dummynet.4; 子系统新增了 + fast 运行模式, 使得特定的包能够绕过 dummynet 调度器。 + 这能够降低延迟以及在包经过管道带宽限制时的开销, 并消除子系统内部的递归。 + 新增的 sysctl 变量 + net.inet.ip.dummynet.io_fast 可以用来启用这一功能。 + + &man.enc.4; 新增了用于决定防火墙或 &man.bpf.4; 能够看到进入或流出 IPsec + 包的内部以及外部报头的一系列 sysctl 变量。 + + &man.gre.4; 新增了 + ioctl GRESKEY + 和 GREGKEY, 用于设置和读取发出包时的 GRE + 秘钥。 + + 修正了 &man.ipsec.4; 子系统中的一个导致在路由 MTU 比接口路由 MTU 低时 PMTU 失效的 bug。 + + 由于缺少多处理器支持, 删去了 netatm 子系统。 + + &man.ng.nat.4; 能够通过 libalias 支持包的重定向了。 + 如欲了解进一步细节请参见联机手册。 + + &man.ng.pptpgre.4; 新增了类似 + &man.ng.l2tp.4; 的多重挂钩, 使用一对 pptpgre 和 ksocket 节点来完成两个断点的全部调用。 + + &man.resolver.3; 允许在域名中出现下划线了。 + 尽管这违反 RFC 1034 [STD 13], 但一些域名服务器和其他流行的操作系统的解析库都允许这种域名。 + + 新增了用于 TCP socket 的 socket 选项 TCP_CONGESTION。 + 它能够设置和读取拥塞控制算法。 选择这个名字的目的是与 Linux 兼容。 + + inpcbinfoinpcb + 基础设施以及依赖这一基础设施的协议, 包括 UDP、 TCP + 和 IP raw socket 中使用了 &man.rwlock.9; 来减少锁的冲撞。 + + + + 磁盘和存储 + + &man.aac.4; 驱动程序支持尺寸超过 + 2TB 的卷了。 + + 为 &man.ata.4; 驱动程序新增了引导加载器变量 + hw.ata.ata_dma_check_80pin。 它可以用来在一些笔记本和 Soekris + 的有问题的主板上禁止 80针 电缆检查。 默认配置是 + 1 + + 修正了在 ServerWorks HT1000 芯片组上 &man.ata.4; 驱动程序导致的数据损坏问题。 + + &man.ciss.4; 驱动程序新增了引导加载器变量 + hw.ciss.nop_message_heartbeat + 用于在 ciss_periodic() 中以 + NOP-消息轮询。 这可以作为 + ADAPTER HEARTBEAT FAILED 问题的 workaround。 + 默认配置为 0 (禁用)。 + + geom_part GEOM 类 可以作为内核模块联编了。 + + geom_linux_lvm GEOM 类 可以作为内核模块联编了。 + + &man.hptrr.4; 更新到了来自 Highpoint 的 1.2 + 版。 + + 修正了 &man.iir.4; 驱动程序中的一处缓冲区溢出。 + 这修正了大量关于这一驱动的怪异问题。 + + &man.mpt.4; 驱动程序支持 mpt_user + 个体了。 + + &man.rr232x.4; 被 + &man.hptrr.4; 驱动程序取代。 + + &man.twa.4; 驱动程序针对大量内存和高 CPU 负载的机器进行了可靠性改进。 + + + + 文件系统 + + &man.fdescfs.5; 是 MPSAFE 的了。 + + &man.gpart.8; 新增了 BSD 标签 (option + GEOM_PART_BSD) 和 + VTOC8 标签 (option + GEOM_PART_VTOC8) 的支持。 + + &man.gvinum.8; 新增了用于创建 plex 的 volume + 参数。 + + 修正了 unionfs(7) 中 UNIX domain socket 路径名的一个查找 bug。 + + + + + 用户环境变动 + + &man.adduser.8; 工具新增了用于指定新用户主目录的 + 选项。 + + &man.atacontrol.8; 工具新增了用于设置将设备置于减速状态超时时间的 + spindown 命令。 + + &man.chflags.1; 新增了用于指定详细输出的 选项, + 以及类似于 (例如) &man.chmod.1; 对应的忽略错误语义的 选项。 + + &man.cp.1; 新增了等价于 选项。 + + 修正了导致 &man.cp.1; 工具无法复制 POSIX.1e ACL (参见 + &man.acl.3;) 的 bug。 + + &man.cron.8; 支持使用 选项来指定默认的邮件收件人了。 + 这一配置可以通过 crontab 文件中的 MAILTO= + 配置来覆盖。 - - 基本系统中的第三方软件 + &man.dhclient.8; 新增了对于 + &man.dhcp-options.5; 中更多选项的支持。 - AMD 从 6.0.10 - 升级到了 6.1.5。 + &man.dhclient.8; 新增了用于判断当前接口是否提供默认路由的 + is_default_interface() 函数。 - awk 从 2007 年 5 月 1 日版升级到了 - 2007 年 10 月 23 日版。 + 修正了导致 &man.dhclient.8; 无法删除默认路由的 bug。 - bzip2 从 1.0.4 - 升级到了 1.0.5。 + 环境变量数组 &man.environ.7; 支持将变量的第一个字符设置为 + NUL 来删除变量了。 这一功能是一些第三方软件如 + Dovecot + 和 Postfix 所需要的。 - OpenPAM 从 - Figwort 版升级到了 Hydrangea 版。 + &man.fdisk.8; 新增了禁止显示警告的 选项。 - OpenSSH 从 - 4.5p1 版升级到了 5.1p1 版。 + &man.fetch.1; 程序和 libfetch + 函数库新增了对于 NO_PROXY 环境变量的支持。 + 这个环境变量可以用来指定逗号或空格分开的主机名列表, + 令这些主机不使用代理。 如果使用星号, 则表示禁止使用代理。 - sendmail 从 - 8.14.2 版升级到了 8.14.3 版。 + 新增了 &man.ffsll.3; 和 &man.flsll.3; 函数。 + 除了在 long long 类型上操作之外它们和 &man.ffs.3; 及 &man.fls.3; 功能相同。 - 时区数据库从 - tzdata2007h 版升级到了 - tzdata2008b 版。 + &man.fortune.6; 程序新增了对于使用 + FORTUNE_PATH 环境变量指定搜索 fortune 文件的支持。 - + 修正了导致 &man.fortune.6; 程序的 + 选项无法配合多个文件工作的 bug。 - - Ports/Packages 套件基础结构 + &man.freebsd-update.conf.5; 新增了 + IDSIgnorePaths 语句。 - + &man.fwcontrol.8; 工具新增了用于在下次总线复位时将 + node 指定为根节点的 选项。 - + &man.gcc.1; 能够正确处理 选项了。 + 之前它是硬编码的 - - 发布工程与系统集成 + &man.gpt.8; 支持 ZFS 了。 - 支持的 - GNOME 桌面环境 - (x11/gnome2) 从 - 2.20.1 升级到了 2.22。 + &man.ifconfig.8; 新增了显示 WPS IE + (Wireless Provisioning Services Information Element) 的支持。 - + &man.kgdb.1; 新增了用于定位 &man.kld.4; 及其符号的 + add-kld kld 命令。 - - 文档 + &man.kgdb.1; 新增了动态连接库后端, 将 &man.kld.4; 视为动态连接库, + 并在启动时自动为 &man.kld.4; 加载符号。 - - - + &man.kgdb.1; 新增了 tid 命令以及其他与内核模块相关的命令, + 并可以远程工作。 - - 从先前版本的 &os; 升级 + 新增了用于获得全局 CPU 时间统计的 &man.kvm.getcptime.3; 函数。 - [&arch.i386;、 &arch.amd64;] 从 &os; 6.2-RELEASE 开始, - 系统已经能够通过使用 &man.freebsd-update.8; 来实现 RELEASE 版本之间 - (以及不同安全分支的快照版本) 的二进制升级。 二进制升级过程将更新未经修改的 userland - 工具, 以及随官方 &os; 发行版发布的、 未作修改的 GENERIC 或 - SMP 内核。 使用 &man.freebsd-update.8; 工具的主机, - 需要有可用的 Internet 连接。 + libalias 函数库支持小写的 FTP 命令 + PORT 和 + EPRT 了。 - 旧式的二进制升级, 则是通过随 CDROM 发行介质提供的 &man.sysinstall.8; 的 - Upgrade 选项来完成的。 这种二进制升级方式, - 对于 非-&arch.i386;、 非-&arch.amd64; 的, - 以及没有接入 Internet 的系统而言会比较有用。 + &man.man.1; 新增了对于 + &man.bzip2.1; 压缩的联机手册的有限支持。 - 此外, 也可以使用源代码从较早版本升级的方式 (通过从源代码重新编译 &os; - 的基本系统), 其操作方法请参见 - /usr/src/UPDATING + &man.mdconfig.8; 新增了 + (详细) 选项, 用于配合 命令使用。 + 它可以显示所有 &man.md.4; 设备的尺寸和后端存储。 - - 很显然,升级 &os; 时,应该首先备份 - 全部 数据和配置文件。 - - + 新增了 &man.memrchr.3; 函数。 它和 &man.memchr.3; 的不同之处在于它是从后匹配字符。 + + 修正了 &man.morse.6; 程序输出中的语法错误。 + + &man.mountd.8; 工具新增了用于指定绑定 TCP 和 UDP 请求的 IP 地址的 选项。 这个选项可以指定多次。 如果没有指定 + 选项则表示使用 + INADDR_ANY 。 如果通过这个选项指定 IP 地址, + 它会自动将 127.0.0.1 加入列表; + 如果启用了 IPv6, 则 ::1 也会自动加入列表。 + + &man.moused.8; 工具新增了用于改变滚轮速度的 + 选项以及只影响滚轮阈值的 + 选项。 + + &man.mv.1; 在将目录移动到跨设备的另一个已经存在的目录时遵循 POSIX 规范。 + + &man.periodic.8; 新增了 &man.periodic.conf.5; 配置变量 + daily_status_mail_rejects_shorten。 + 它表示按照黑名单来给出拒收列表而不给出具体的发送人主机。 + 默认的配置则保持原先的输出格式不变。 + + &man.ping6.8; 采用与 &man.ping.8; 相同的返回码 + 02 了。 + + &man.ping6.8; 新增了使其在收到一个回应包之后正常退出的 选项。 + + &man.ping6.8; 新增了和 + &man.ping.8; 的 等价的 + 选项。 + + 将 &man.ping6.8; 允许的最小间隔从 0.01 减少到了 0.000001。 + + &man.realpath.1; 新增了用于禁止给出警告信息的 + 选项; 此外, 它能够接受多个路径作为命令行参数了。 + + &man.rfcomm.pppd.8; 新增了 + 选项用于在 LAN (LAN Access Using PPP) 服务之外注册 + DUN (Dial-Up Networking) 服务。 + + &man.sdpd.8; 新增了 NAP, + GNPANU + 配置文件。 + + &man.setkey.8; 支持将 + esp 作为 spdadd 命令的协议名了。 + + 修正了 &man.telnetd.8; 在指定了 时仍然试图进行身份验证的 bug。 + + &man.top.1; 和 &man.vmstat.8; 新增了显示每个 CPU 统计的 + 选项。 + + &man.traceroute.8; 新增了用于显示每跳 IP 对应的 AS 编号的 + 选项。 它会从 选项指定的 + WHOIS 服务器进行查询。 如果没有指定 选项, + 则默认使用 whois.radb.net + + 新增了用于编码和解码 UUID 二进制形式的 &man.uuid.enc.le.3;、 &man.uuid.dec.le.3;、 + &man.uuid.enc.be.3; 和 &man.uuid.dec.be.3; 函数。 + + &man.watch.8; 支持同时超过 10 个 + &man.snp.4; 设备了。 + + &man.ypserv.8; 新增了用于指定监听端口的 参数。 + + + <filename>/etc/rc.d</filename> 脚本 + + &man.rc.conf.5; 新增了当 + firewall_enableYES 时自动加载 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 15:57:25 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00D5E1065674; Wed, 31 Dec 2008 15:57:24 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (unknown [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id 772F78FC1C; Wed, 31 Dec 2008 15:57:24 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from delta.allbsd.org (p2191-ipbf1403funabasi.chiba.ocn.ne.jp [118.7.161.191]) (authenticated bits=128) by mail.allbsd.org (8.14.2/8.14.2) with ESMTP id mBVFvCat059301; Thu, 1 Jan 2009 00:57:23 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (alph.allbsd.org [192.168.0.10]) (authenticated bits=0) by delta.allbsd.org (8.13.4/8.13.4) with ESMTP id mBVFv4vt048668; Thu, 1 Jan 2009 00:57:05 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Thu, 01 Jan 2009 00:56:51 +0900 (JST) Message-Id: <20090101.005651.208488655.hrs@allbsd.org> To: simon@FreeBSD.org From: Hiroki Sato In-Reply-To: <20081231130631.GC964@zaphod.nitro.dk> References: <200812310549.mBV5nFAN016361@svn.freebsd.org> <20081231130631.GC964@zaphod.nitro.dk> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.2 on Emacs 22.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Thu_Jan__1_00_56_51_2009_554)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (mail.allbsd.org [133.31.130.32]); Thu, 01 Jan 2009 00:57:23 -877500 (JST) Cc: svn-src-releng@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186634 - releng/7.1/release/doc/share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 15:57:26 -0000 ----Security_Multipart(Thu_Jan__1_00_56_51_2009_554)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit "Simon L. Nielsen" wrote in <20081231130631.GC964@zaphod.nitro.dk>: si> On 2008.12.31 05:49:15 +0000, Hiroki Sato wrote: si> > Author: hrs si> > Date: Wed Dec 31 05:49:15 2008 si> > New Revision: 186634 si> > URL: http://svn.freebsd.org/changeset/base/186634 si> > si> > Log: si> > Add arch="" attr support. si> si> What does this do? AFAIR at least for the hardware notes in the past si> arch=amd64 e.g. only showed up on amd64? si> si> Is this an MFC of what's in head? Yes, it was a sort of MFC (actually role="merged" handling will not be used). In the past when the relnotes (and hardware notes) was separated into files for each platforms the arch="" is used for the separation, but after we have one relnotes file for all platforms, arch="" is used for generation a tag like "[i386,amd64]" in the head of paragraph. The change was for the functionality change. The current hardware notes for 7.x and HEAD have no arch="" attr because they have sections for each platforms and there is no need to add a tag like "[i386]". -- | Hiroki SATO ----Security_Multipart(Thu_Jan__1_00_56_51_2009_554)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAklblkMACgkQTyzT2CeTzy0PVwCdGQtw5q1c30nsjAKoYeHPtcN0 AfQAoMU7VwD3nRSbtL4fFSAIELcXcjLf =7ZZg -----END PGP SIGNATURE----- ----Security_Multipart(Thu_Jan__1_00_56_51_2009_554)---- From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 17:17:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24E89106564A; Wed, 31 Dec 2008 17:17:37 +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 131E08FC1C; Wed, 31 Dec 2008 17:17:37 +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 mBVHHa87031115; Wed, 31 Dec 2008 17:17:36 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBVHHaVE031114; Wed, 31 Dec 2008 17:17:36 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812311717.mBVHHaVE031114@svn.freebsd.org> From: Ken Smith Date: Wed, 31 Dec 2008 17:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186653 - releng/7.1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 17:17:37 -0000 Author: kensmith Date: Wed Dec 31 17:17:36 2008 New Revision: 186653 URL: http://svn.freebsd.org/changeset/base/186653 Log: Predict when we'll be ready to do the 7.1-RELEASE announcement. Approved by: re (implicit) Modified: releng/7.1/UPDATING Modified: releng/7.1/UPDATING ============================================================================== --- releng/7.1/UPDATING Wed Dec 31 15:39:46 2008 (r186652) +++ releng/7.1/UPDATING Wed Dec 31 17:17:36 2008 (r186653) @@ -8,6 +8,9 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20090106: + FreeBSD 7.1-RELEASE + 20081223: FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw Prevent cross-site forgery attacks on ftpd(8) due to splitting long commands into multiple requests. [08:12] From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 17:19:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 854C0106564A; Wed, 31 Dec 2008 17:19:19 +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 7371C8FC18; Wed, 31 Dec 2008 17:19:19 +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 mBVHJJYN031180; Wed, 31 Dec 2008 17:19:19 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBVHJJbj031179; Wed, 31 Dec 2008 17:19:19 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812311719.mBVHJJbj031179@svn.freebsd.org> From: Ken Smith Date: Wed, 31 Dec 2008 17:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186654 - releng/7.1/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 17:19:20 -0000 Author: kensmith Date: Wed Dec 31 17:19:19 2008 New Revision: 186654 URL: http://svn.freebsd.org/changeset/base/186654 Log: Ready to do one final test build and then start the release build process. Approved by: re (implicit) Modified: releng/7.1/sys/conf/newvers.sh Modified: releng/7.1/sys/conf/newvers.sh ============================================================================== --- releng/7.1/sys/conf/newvers.sh Wed Dec 31 17:17:36 2008 (r186653) +++ releng/7.1/sys/conf/newvers.sh Wed Dec 31 17:19:19 2008 (r186654) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="7.1" -BRANCH="RC2" +BRANCH="RELEASE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 20:47:48 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0011106564A; Wed, 31 Dec 2008 20:47:48 +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 ADF658FC13; Wed, 31 Dec 2008 20:47:48 +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 mBVKlmv7035075; Wed, 31 Dec 2008 20:47:48 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBVKlmE0035074; Wed, 31 Dec 2008 20:47:48 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812312047.mBVKlmE0035074@svn.freebsd.org> From: Ken Smith Date: Wed, 31 Dec 2008 20:47:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186657 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 20:47:49 -0000 Author: kensmith Date: Wed Dec 31 20:47:48 2008 New Revision: 186657 URL: http://svn.freebsd.org/changeset/base/186657 Log: Explicitly tell the users what a "down side" to using the boot manager is, consistently call it the boot manager, and switch the order the options are presented so no boot manager is first in the list (and hence more or less the default). This area will probably be rototilled more before 8.0 comes out. Modified: head/usr.sbin/sysinstall/menus.c Modified: head/usr.sbin/sysinstall/menus.c ============================================================================== --- head/usr.sbin/sysinstall/menus.c Wed Dec 31 17:43:28 2008 (r186656) +++ head/usr.sbin/sysinstall/menus.c Wed Dec 31 20:47:48 2008 (r186657) @@ -1074,21 +1074,24 @@ DMenu MenuIPLType = { DMenu MenuMBRType = { DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS, "overwrite me", /* will be disk specific label */ - "FreeBSD comes with a boot selector that allows you to easily\n" + "FreeBSD comes with a boot manager that allows you to easily\n" "select between FreeBSD and any other operating systems on your machine\n" "at boot time. If you have more than one drive and want to boot\n" - "from the second one, the boot selector will also make it possible\n" + "from the second one, the boot manager will also make it possible\n" "to do so (limitations in the PC BIOS usually prevent this otherwise).\n" - "If you do not want a boot selector, or wish to replace an existing\n" - "one, select \"standard\". If you would prefer your Master Boot\n" - "Record to remain untouched then select \"None\".\n\n" + "If you will only have FreeBSD on the machine the boot manager is\n" + "not needed and it slows down the boot while offering you the choice\n" + "of which operating system to boot. If you do not want a boot\n" + "manager, or wish to replace an existing one, select \"standard\".\n" + "If you would prefer your Master Boot Record remain untouched then\n" + "select \"None\".\n\n" " NOTE: PC-DOS users will almost certainly require \"None\"!", "Press F1 to read about drive setup", "drives", - { { "BootMgr", "Install the FreeBSD Boot Manager", - dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr }, - { "Standard", "Install a standard MBR (no boot manager)", + { { "Standard", "Install a standard MBR (no boot manager)", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 1 }, + { "BootMgr", "Install the FreeBSD Boot Manager", + dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 0 }, { "None", "Leave the Master Boot Record untouched", dmenuRadioCheck, dmenuSetValue, NULL, &BootMgr, '(', '*', ')', 2 }, { NULL } }, From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 21:21:47 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 228F3106566C; Wed, 31 Dec 2008 21:21:47 +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 10F358FC14; Wed, 31 Dec 2008 21:21:47 +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 mBVLLkQ5035690; Wed, 31 Dec 2008 21:21:46 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBVLLkqa035687; Wed, 31 Dec 2008 21:21:46 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812312121.mBVLLkqa035687@svn.freebsd.org> From: Sam Leffler Date: Wed, 31 Dec 2008 21:21:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186658 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 21:21:47 -0000 Author: sam Date: Wed Dec 31 21:21:46 2008 New Revision: 186658 URL: http://svn.freebsd.org/changeset/base/186658 Log: follow prevailing style Modified: head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_wds.c Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Wed Dec 31 20:47:48 2008 (r186657) +++ head/sys/net80211/ieee80211_hostap.c Wed Dec 31 21:21:46 2008 (r186658) @@ -355,7 +355,7 @@ hostap_deliver_data(struct ieee80211vap if (mcopy != NULL) { int len, err; len = mcopy->m_pkthdr.len; - err = (ifp->if_transmit)(ifp, mcopy); + err = ifp->if_transmit(ifp, mcopy); if (err) { /* NB: IFQ_HANDOFF reclaims mcopy */ } else { Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Wed Dec 31 20:47:48 2008 (r186657) +++ head/sys/net80211/ieee80211_output.c Wed Dec 31 21:21:46 2008 (r186658) @@ -266,7 +266,7 @@ ieee80211_start(struct ifnet *ifp) m->m_pkthdr.rcvif = (void *)ni; /* XXX defer if_start calls? */ - error = (parent->if_transmit)(parent, m); + error = parent->if_transmit(parent, m); if (error != 0) { /* NB: IFQ_HANDOFF reclaims mbuf */ ieee80211_free_node(ni); Modified: head/sys/net80211/ieee80211_wds.c ============================================================================== --- head/sys/net80211/ieee80211_wds.c Wed Dec 31 20:47:48 2008 (r186657) +++ head/sys/net80211/ieee80211_wds.c Wed Dec 31 21:21:46 2008 (r186658) @@ -278,7 +278,7 @@ ieee80211_dwds_mcast(struct ieee80211vap mcopy->m_flags |= M_MCAST | M_WDS; mcopy->m_pkthdr.rcvif = (void *) ni; - err = (parent->if_transmit)(parent, mcopy); + err = parent->if_transmit(parent, mcopy); if (err) { /* NB: IFQ_HANDOFF reclaims mbuf */ ifp->if_oerrors++; From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 21:29:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45C66106566B; Wed, 31 Dec 2008 21:29:10 +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 34A228FC08; Wed, 31 Dec 2008 21:29:10 +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 mBVLTAxr035854; Wed, 31 Dec 2008 21:29:10 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBVLTAKk035853; Wed, 31 Dec 2008 21:29:10 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812312129.mBVLTAKk035853@svn.freebsd.org> From: Sam Leffler Date: Wed, 31 Dec 2008 21:29:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186659 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 21:29:10 -0000 Author: sam Date: Wed Dec 31 21:29:09 2008 New Revision: 186659 URL: http://svn.freebsd.org/changeset/base/186659 Log: mark discovered neighbors QoS capable if they advertise wme Modified: head/sys/net80211/ieee80211_node.c Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Wed Dec 31 21:21:46 2008 (r186658) +++ head/sys/net80211/ieee80211_node.c Wed Dec 31 21:29:09 2008 (r186659) @@ -1334,6 +1334,10 @@ ieee80211_init_neighbor(struct ieee80211 if (ieee80211_ies_init(&ni->ni_ies, sp->ies, sp->ies_len)) { ieee80211_ies_expand(&ni->ni_ies); + if (ni->ni_ies.wme_ie != NULL) + ni->ni_flags |= IEEE80211_NODE_QOS; + else + ni->ni_flags &= ~IEEE80211_NODE_QOS; if (ni->ni_ies.ath_ie != NULL) ieee80211_parse_ath(ni, ni->ni_ies.ath_ie); } From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 22:57:14 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1DEB1065673; Wed, 31 Dec 2008 22:57:14 +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 A2E408FC08; Wed, 31 Dec 2008 22:57:14 +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 mBVMvEVQ037452; Wed, 31 Dec 2008 22:57:14 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBVMvEHt037451; Wed, 31 Dec 2008 22:57:14 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812312257.mBVMvEHt037451@svn.freebsd.org> From: Ken Smith Date: Wed, 31 Dec 2008 22:57:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-release@freebsd.org X-SVN-Group: release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186660 - release/7.1.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 22:57:16 -0000 Author: kensmith Date: Wed Dec 31 22:57:14 2008 New Revision: 186660 URL: http://svn.freebsd.org/changeset/base/186660 Log: Copy releng/7.1 to release/7.1.0 for the 7.1-RELEASE. Approved by: re (implicit) Added: release/7.1.0/ - copied from r186659, releng/7.1/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 31 23:22:45 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60A72106566C; Wed, 31 Dec 2008 23:22:45 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E3978FC0C; Wed, 31 Dec 2008 23:22:45 +0000 (UTC) (envelope-from rwatson@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 mBVNMjtn037971; Wed, 31 Dec 2008 23:22:45 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBVNMjYe037970; Wed, 31 Dec 2008 23:22:45 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812312322.mBVNMjYe037970@svn.freebsd.org> From: Robert Watson Date: Wed, 31 Dec 2008 23:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186662 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Dec 2008 23:22:45 -0000 Author: rwatson Date: Wed Dec 31 23:22:45 2008 New Revision: 186662 URL: http://svn.freebsd.org/changeset/base/186662 Log: Fix white space botch: use carriage returns rather than tabs. Modified: head/sys/security/audit/audit_pipe.c Modified: head/sys/security/audit/audit_pipe.c ============================================================================== --- head/sys/security/audit/audit_pipe.c Wed Dec 31 23:21:07 2008 (r186661) +++ head/sys/security/audit/audit_pipe.c Wed Dec 31 23:22:45 2008 (r186662) @@ -169,7 +169,8 @@ struct audit_pipe { /* * Current pending record list. Protected by a combination of ap_mtx * and ap_sx. Note particularly that *both* locks are required to - * remove a record from the head of the queue, as an in-progress read * may sleep while copying and therefore cannot hold ap_mtx. + * remove a record from the head of the queue, as an in-progress read + * may sleep while copying and therefore cannot hold ap_mtx. */ TAILQ_HEAD(, audit_pipe_entry) ap_queue;