From owner-svn-src-head@FreeBSD.ORG Sun Dec 28 02:34:06 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Dec 28 02:39:44 2008 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52C811065676 for ; Sun, 28 Dec 2008 02:39:44 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outL.internet-mail-service.net (outl.internet-mail-service.net [216.240.47.235]) by mx1.freebsd.org (Postfix) with ESMTP id 33B708FC08 for ; Sun, 28 Dec 2008 02:39:43 +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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Dec 28 04:51:01 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Dec 28 05:35:30 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Dec 28 06:12:41 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Dec 28 07:53:03 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Dec 28 11:04:24 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Dec 28 13:50:59 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Dec 28 14:32:28 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Dec 28 19:32:09 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18A411065674 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 C1EC38FC08 for ; Sun, 28 Dec 2008 19:32:08 +0000 (UTC) (envelope-from stas@SpringDaemons.com) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 145308FC51 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: 4957d16c967001015285497 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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:4957d16c967001015285497! From owner-svn-src-head@FreeBSD.ORG Sun Dec 28 21:00:40 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Sun Dec 28 21:18:01 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@FreeBSD.ORG Mon Dec 29 06:31:04 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 08:05:49 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 10:26:02 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 12:07:18 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 12:12:23 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 12:41:33 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 12:45:11 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 12:58:46 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 13:25:58 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 14:59:22 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 18:42:53 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 18:58:23 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 18:59:50 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 19:00:28 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 19:24:01 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Mon Dec 29 20:50:38 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@FreeBSD.ORG Tue Dec 30 00:57:40 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 01:33:16 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 04:46:25 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 04:48:59 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 08:57:05 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 453BC1065674 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 764BD8FC1C 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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 09:40:51 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 11:12:33 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 11:40:45 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 12:51:15 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 12:51:57 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 16:00:37 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 16:09:57 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 17:16:53 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 17:35:23 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 17:36:32 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 17:54:26 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 18:00:15 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 18:21:55 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 19:46:07 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 19:48:03 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 20:13:21 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 20:16:33 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 20:25:50 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 20:26:16 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 20:31:38 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 20:39:48 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 20:51:08 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 21:49:40 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 21:52:19 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 22:10:06 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Tue Dec 30 23:49:54 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@FreeBSD.ORG Wed Dec 31 01:20:07 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 01:23:23 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 05:44:05 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 07:38:05 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 07:39:23 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 07:41:43 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 08:56:49 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 10:06:41 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 11:12:25 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 11:19:46 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 11:56:35 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 13:56:32 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 13:57:27 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 14:17:01 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 14:18:09 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 14:25:15 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 20:47:48 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 21:21:47 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 21:29:10 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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-head@FreeBSD.ORG Wed Dec 31 23:22:45 2008 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: 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;