From owner-p4-projects@FreeBSD.ORG Sun Oct 5 15:32:37 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 36B1E16A4C0; Sun, 5 Oct 2003 15:32:37 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 116C916A4B3 for ; Sun, 5 Oct 2003 15:32:37 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E54AE43FE5 for ; Sun, 5 Oct 2003 15:32:35 -0700 (PDT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h95MWZXJ051642 for ; Sun, 5 Oct 2003 15:32:35 -0700 (PDT) (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h95MWZFK051639 for perforce@freebsd.org; Sun, 5 Oct 2003 15:32:35 -0700 (PDT) (envelope-from imp@freebsd.org) Date: Sun, 5 Oct 2003 15:32:35 -0700 (PDT) Message-Id: <200310052232.h95MWZFK051639@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Subject: PERFORCE change 39221 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Oct 2003 22:32:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=39221 Change 39221 by imp@imp_koguchi on 2003/10/05 15:32:18 strawman document on compatibility policy Affected files ... .. //depot/doc/strawman/compatibility.txt#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Mon Oct 6 06:51:41 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 743AA16A4C0; Mon, 6 Oct 2003 06:51:41 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4BC4116A4B3 for ; Mon, 6 Oct 2003 06:51:41 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B6EF143FD7 for ; Mon, 6 Oct 2003 06:51:40 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h96DpeXJ031280 for ; Mon, 6 Oct 2003 06:51:40 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h96Dpdhx031277 for perforce@freebsd.org; Mon, 6 Oct 2003 06:51:39 -0700 (PDT) (envelope-from cvance@nailabs.com) Date: Mon, 6 Oct 2003 06:51:39 -0700 (PDT) Message-Id: <200310061351.h96Dpdhx031277@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@nailabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 39256 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2003 13:51:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=39256 Change 39256 by cvance@cvance_release on 2003/10/06 06:50:51 Add myself to the users Affected files ... .. //depot/projects/trustedbsd/sebsd_policy/policy/users#2 edit Differences ... ==== //depot/projects/trustedbsd/sebsd_policy/policy/users#2 (text+ko) ==== @@ -44,3 +44,5 @@ user jadmin roles { staff_r sysadm_r }; user jdoe roles { user_r }; + +user cvance roles { user_r sysadm_r }; From owner-p4-projects@FreeBSD.ORG Mon Oct 6 08:14:05 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5E64E16A4C1; Mon, 6 Oct 2003 08:14:05 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1176816A4B3 for ; Mon, 6 Oct 2003 08:14:05 -0700 (PDT) Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id B992C43FDD for ; Mon, 6 Oct 2003 08:14:02 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 1907 invoked from network); 6 Oct 2003 15:14:01 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 6 Oct 2003 15:14:01 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id h96FDwce001705; Mon, 6 Oct 2003 11:13:58 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200310032259.h93Mxdn5018279@repoman.freebsd.org> Date: Mon, 06 Oct 2003 11:14:05 -0400 (EDT) From: John Baldwin To: Warner Losh X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: Perforce Change Reviews Subject: RE: PERFORCE change 39117 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2003 15:14:05 -0000 On 03-Oct-2003 Warner Losh wrote: > http://perforce.freebsd.org/chv.cgi?CH=39117 > > Change 39117 by imp@imp_koguchi on 2003/10/03 15:59:36 > > Add comments to jhb's latest additions. > > Affected files ... > > .. //depot/projects/power/notes#6 edit > > Differences ... > > ==== //depot/projects/power/notes#6 (text+ko) ==== > > @@ -22,10 +22,19 @@ > our power shadow tree in the acpi_SetPowerState() function. > - define a bus method for powering up/down devices > - bus_set_powerstate(parent, child, state) where state is on or off > + # actually on/off is insufficient for a power management daemon that > + # wants to actively manage the D level of a device. We should make > + # this more flexible so that it can be mapped into states that are > + # neither on or off. What I'm worried about is making it too PCI or ACPI specific. I just want to make sure we have a workable abstraction. > @@ -34,12 +43,22 @@ > - Convert device_power() to use this method to look up the child device > if the name contains a colon instead of treating the name as a pure > name of the child device > + # We have almost what we need now in the location_str stuff. However, > + # that's more of a 'long string' rather than the short string that's > + # wanted for this. > - Perhaps rename device_power() to device_command() to allow for other > commands like eject, etc. > + # methods should be unique. Command interfaces to userland should dispatch > + # the right method. Otherwise we've reinvented ioctl :-) I was talking about the syscall here, not the method. I think the method should be 'device_[set/get]_powerstate() perhaps. > - convert to a model of suspending the device via device_suspend()/resume() > rather than detach()/attach() > - This may require fixes to drivers so that they continue to function > appropriately when their hardware has been suspended > + # NO. This cannot be implemented reliably. pccard bridges do not tell > + # us that a device has been removed while the system was asleep. That's > + # why we detach/reattach on suspend/resume for devices on pccard/cardbus > + # bridges. usb bridges can tell about this, and they properly use the > + # suspend/resume functions. > > The second stage will be to make the powering off of devices more automated. > This is still in early design stage. It may involve a powerd, it may All the world is not a pccard bridge. :) The example I am thinking of is that maybe I want to turn off my soundcard but still have the logical device hang around and allow, e.g., kde to open it and attach to it when logging in, and then turn my soundcard back on when I want to play some MP3s w/o having to restart KDE for it to open the soundcard. What we would want to do in that case probably is have a way to ask the device if it is ok to just suspend/resume it for a power down and have the default method be to use detach/attach() unless the device says it is ok to use suspend/resume. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ From owner-p4-projects@FreeBSD.ORG Mon Oct 6 11:06:56 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3610816A4C0; Mon, 6 Oct 2003 11:06:56 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AF7716A4B3; Mon, 6 Oct 2003 11:06:56 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 228F543FA3; Mon, 6 Oct 2003 11:06:55 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9p1/8.12.9) with ESMTP id h96I6sAD081649; Mon, 6 Oct 2003 12:06:54 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 06 Oct 2003 12:06:52 -0600 (MDT) Message-Id: <20031006.120652.105171364.imp@bsdimp.com> To: jhb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: References: <200310032259.h93Mxdn5018279@repoman.freebsd.org> X-Mailer: Mew version 2.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: perforce@FreeBSD.org Subject: Re: PERFORCE change 39117 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2003 18:06:56 -0000 In message: John Baldwin writes: : All the world is not a pccard bridge. :) The example I am thinking of : is that maybe I want to turn off my soundcard but still have the logical : device hang around and allow, e.g., kde to open it and attach to it when : logging in, and then turn my soundcard back on when I want to play some : MP3s w/o having to restart KDE for it to open the soundcard. What we : would want to do in that case probably is have a way to ask the device : if it is ok to just suspend/resume it for a power down and have the : default method be to use detach/attach() unless the device says it is ok : to use suspend/resume. I see what you are saying here. That makes sense. We can already do that for devices that actually support suspend/resume, but the glue going down needs to be written. One problem is that I'd seen the 'open' as the way to mark something busy and 'close' as not-busy. with sound cards, however, this isn't the case since playing/not playing is independent of that. Warner From owner-p4-projects@FreeBSD.ORG Mon Oct 6 11:13:42 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 68EA016A4C0; Mon, 6 Oct 2003 11:13:42 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41C7816A4B3; Mon, 6 Oct 2003 11:13:42 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B36843FAF; Mon, 6 Oct 2003 11:13:39 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.9p1/8.12.9) with ESMTP id h96IDcAD081763; Mon, 6 Oct 2003 12:13:38 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 06 Oct 2003 12:13:39 -0600 (MDT) Message-Id: <20031006.121339.127180127.imp@bsdimp.com> To: jhb@freebsd.org From: "M. Warner Losh" In-Reply-To: References: <200310032259.h93Mxdn5018279@repoman.freebsd.org> X-Mailer: Mew version 2.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: perforce@freebsd.org Subject: Re: PERFORCE change 39117 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2003 18:13:42 -0000 In message: John Baldwin writes: : : On 03-Oct-2003 Warner Losh wrote: : > http://perforce.freebsd.org/chv.cgi?CH=39117 : > : > Change 39117 by imp@imp_koguchi on 2003/10/03 15:59:36 : > : > Add comments to jhb's latest additions. : > : > Affected files ... : > : > .. //depot/projects/power/notes#6 edit : > : > Differences ... : > : > ==== //depot/projects/power/notes#6 (text+ko) ==== : > : > @@ -22,10 +22,19 @@ : > our power shadow tree in the acpi_SetPowerState() function. : > - define a bus method for powering up/down devices : > - bus_set_powerstate(parent, child, state) where state is on or off : > + # actually on/off is insufficient for a power management daemon that : > + # wants to actively manage the D level of a device. We should make : > + # this more flexible so that it can be mapped into states that are : > + # neither on or off. : : What I'm worried about is making it too PCI or ACPI specific. I just : want to make sure we have a workable abstraction. I was thinking maybe a percentage that could be mapped to multiple levels as the device sees fit. D1 and D2 states are ill defined at best for most interfaces (although specific parts may be different). D3 is well defined for most interfaces. I too am torn about making it too 'this generation of power goo' specific. I'd also like to distinguish between D3hot and D3cold somehow. The cardbus bridge can be put into D3hot when there are no cards in use and then power it to D0 when the insertion event happens... My one worry is that we can't quiet the interrupt w/o writing to config space. At fast/mpsafe land, maybe this is too expensive an interrupt. Good thing it would be a very rare event. I'm less sure about other drivers (sound cards can do similar things, I've been told, when they are at d3 state: when play comes along it should put it into d0). This does get back to how we want the end system to look. Is there a daemon that turns off idle devices? etc Warner From owner-p4-projects@FreeBSD.ORG Mon Oct 6 11:14:06 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 02F9A16A4C0; Mon, 6 Oct 2003 11:14:06 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9B6E16A4B3 for ; Mon, 6 Oct 2003 11:14:05 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D522743FAF for ; Mon, 6 Oct 2003 11:14:04 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h96IE4XJ051824 for ; Mon, 6 Oct 2003 11:14:04 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h96IE406051821 for perforce@freebsd.org; Mon, 6 Oct 2003 11:14:04 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Mon, 6 Oct 2003 11:14:04 -0700 (PDT) Message-Id: <200310061814.h96IE406051821@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39265 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2003 18:14:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=39265 Change 39265 by sam@sam_ebb on 2003/10/06 11:13:46 support for the 7955+7956 Affected files ... .. //depot/projects/netperf/sys/dev/hifn/hifn7751.c#7 edit .. //depot/projects/netperf/sys/dev/hifn/hifn7751reg.h#3 edit .. //depot/projects/netperf/sys/dev/hifn/hifn7751var.h#2 edit Differences ... ==== //depot/projects/netperf/sys/dev/hifn/hifn7751.c#7 (text+ko) ==== @@ -6,6 +6,7 @@ * Copyright (c) 1999 Theo de Raadt * Copyright (c) 2000-2001 Network Security Technologies, Inc. * http://www.netsec.net + * Copyright (c) 2003 Hifn Inc. * * This driver is based on a previous driver by Invertex, for which they * requested: Please send any comments, feedback, bug-fixes, or feature @@ -43,7 +44,7 @@ __FBSDID("$FreeBSD: src/sys/dev/hifn/hifn7751.c,v 1.22 2003/09/02 17:30:36 jhb Exp $"); /* - * Driver for the Hifn 7751 encryption processor. + * Driver for various Hifn encryption processors. */ #include "opt_hifn.h" @@ -195,6 +196,8 @@ if (pci_get_vendor(dev) == PCI_VENDOR_HIFN && (pci_get_device(dev) == PCI_PRODUCT_HIFN_7751 || pci_get_device(dev) == PCI_PRODUCT_HIFN_7951 || + pci_get_device(dev) == PCI_PRODUCT_HIFN_7955 || + pci_get_device(dev) == PCI_PRODUCT_HIFN_7956 || pci_get_device(dev) == PCI_PRODUCT_HIFN_7811)) return (0); if (pci_get_vendor(dev) == PCI_VENDOR_NETSEC && @@ -221,6 +224,8 @@ case PCI_PRODUCT_HIFN_7751: return "Hifn 7751"; case PCI_PRODUCT_HIFN_7811: return "Hifn 7811"; case PCI_PRODUCT_HIFN_7951: return "Hifn 7951"; + case PCI_PRODUCT_HIFN_7955: return "Hifn 7955"; + case PCI_PRODUCT_HIFN_7956: return "Hifn 7956"; } return "Hifn unknown-part"; case PCI_VENDOR_INVERTEX: @@ -265,11 +270,13 @@ /* XXX handle power management */ /* - * The 7951 has a random number generator and + * The 7951 and 795x have a random number generator and * public key support; note this. */ if (pci_get_vendor(dev) == PCI_VENDOR_HIFN && - pci_get_device(dev) == PCI_PRODUCT_HIFN_7951) + (pci_get_device(dev) == PCI_PRODUCT_HIFN_7951 || + pci_get_device(dev) == PCI_PRODUCT_HIFN_7955 || + pci_get_device(dev) == PCI_PRODUCT_HIFN_7956)) sc->sc_flags = HIFN_HAS_RNG | HIFN_HAS_PUBLIC; /* * The 7811 has a random number generator and @@ -280,6 +287,14 @@ sc->sc_flags |= HIFN_IS_7811 | HIFN_HAS_RNG; /* + * The 795x parts support AES. + */ + if (pci_get_vendor(dev) == PCI_VENDOR_HIFN && + (pci_get_device(dev) == PCI_PRODUCT_HIFN_7955 || + pci_get_device(dev) == PCI_PRODUCT_HIFN_7956)) + sc->sc_flags |= HIFN_IS_7956 | HIFN_HAS_AES; + + /* * Configure support for memory-mapped access to * registers and for DMA operations. */ @@ -395,7 +410,10 @@ hifn_init_dma(sc); hifn_init_pci_registers(sc); - if (hifn_ramtype(sc)) + /* XXX can't dynamically determine ram type for 795x; force dram */ + if (sc->sc_flags & HIFN_IS_7956) + sc->sc_drammodel = 1; + else if (hifn_ramtype(sc)) goto fail_mem; if (sc->sc_drammodel == 0) @@ -467,6 +485,10 @@ hifn_newsession, hifn_freesession, hifn_process, sc); crypto_register(sc->sc_cid, CRYPTO_ARC4, 0, 0, hifn_newsession, hifn_freesession, hifn_process, sc); + if (sc->sc_flags & HIFN_HAS_AES) + crypto_register(sc->sc_cid, CRYPTO_AES_CBC, 0, 0, + hifn_newsession, hifn_freesession, + hifn_process, sc); /*FALLTHROUGH*/ case HIFN_PUSTAT_ENA_1: crypto_register(sc->sc_cid, CRYPTO_MD5, 0, 0, @@ -875,6 +897,16 @@ { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }, { + PCI_VENDOR_HIFN, + PCI_PRODUCT_HIFN_7955, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00 } + }, { + PCI_VENDOR_HIFN, + PCI_PRODUCT_HIFN_7956, + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00 } + }, { PCI_VENDOR_NETSEC, PCI_PRODUCT_NETSEC_7751, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1055,10 +1087,18 @@ sc->sc_dmaier &= ~HIFN_DMAIER_C_WAIT; WRITE_REG_1(sc, HIFN_1_DMA_IER, sc->sc_dmaier); - WRITE_REG_0(sc, HIFN_0_PUCNFG, HIFN_PUCNFG_COMPSING | - HIFN_PUCNFG_DRFR_128 | HIFN_PUCNFG_TCALLPHASES | - HIFN_PUCNFG_TCDRVTOTEM | HIFN_PUCNFG_BUS32 | - (sc->sc_drammodel ? HIFN_PUCNFG_DRAM : HIFN_PUCNFG_SRAM)); + + if (sc->sc_flags & HIFN_IS_7956) { + WRITE_REG_0(sc, HIFN_0_PUCNFG, HIFN_PUCNFG_COMPSING | + HIFN_PUCNFG_TCALLPHASES | + HIFN_PUCNFG_TCDRVTOTEM | HIFN_PUCNFG_BUS32); + WRITE_REG_1(sc, HIFN_1_PLL, HIFN_PLL_7956); + } else { + WRITE_REG_0(sc, HIFN_0_PUCNFG, HIFN_PUCNFG_COMPSING | + HIFN_PUCNFG_DRFR_128 | HIFN_PUCNFG_TCALLPHASES | + HIFN_PUCNFG_TCDRVTOTEM | HIFN_PUCNFG_BUS32 | + (sc->sc_drammodel ? HIFN_PUCNFG_DRAM : HIFN_PUCNFG_SRAM)); + } WRITE_REG_0(sc, HIFN_0_PUISR, HIFN_PUISR_DSTOVER); WRITE_REG_1(sc, HIFN_1_DMA_CNFG, HIFN_DMACNFG_MSTRESET | @@ -1087,8 +1127,14 @@ ctxsize = 128; else ctxsize = 512; - sc->sc_maxses = 1 + - ((sc->sc_ramsize - 32768) / ctxsize); + /* + * 7955/7956 has internal context memory of 32K + */ + if (sc->sc_flags & HIFN_IS_7956) + sc->sc_maxses = 32768 / ctxsize; + else + sc->sc_maxses = 1 + + ((sc->sc_ramsize - 32768) / ctxsize); } else sc->sc_maxses = sc->sc_ramsize / 16384; @@ -1175,9 +1221,16 @@ { u_int32_t cnfg; - cnfg = READ_REG_0(sc, HIFN_0_PUCNFG) & - HIFN_PUCNFG_DRAMMASK; - sc->sc_ramsize = 1 << ((cnfg >> 13) + 18); + if (sc->sc_flags & HIFN_IS_7956) { + /* + * 7955/7956 have a fixed internal ram of only 32K. + */ + sc->sc_ramsize = 32768; + } else { + cnfg = READ_REG_0(sc, HIFN_0_PUCNFG) & + HIFN_PUCNFG_DRAMMASK; + sc->sc_ramsize = 1 << ((cnfg >> 13) + 18); + } return (0); } @@ -1393,7 +1446,7 @@ hifn_base_command_t *base_cmd; hifn_mac_command_t *mac_cmd; hifn_crypt_command_t *cry_cmd; - int using_mac, using_crypt, len; + int using_mac, using_crypt, len, ivlen; u_int32_t dlen, slen; buf_pos = buf; @@ -1453,7 +1506,7 @@ break; case HIFN_CRYPT_CMD_ALG_DES: bcopy(cmd->ck, buf_pos, HIFN_DES_KEY_LENGTH); - buf_pos += cmd->cklen; + buf_pos += HIFN_DES_KEY_LENGTH; break; case HIFN_CRYPT_CMD_ALG_RC4: len = 256; @@ -1468,12 +1521,28 @@ bzero(buf_pos, 4); buf_pos += 4; break; + case HIFN_CRYPT_CMD_ALG_AES: + /* + * AES keys are variable 128, 192 and + * 256 bits (16, 24 and 32 bytes). + */ + bcopy(cmd->ck, buf_pos, cmd->cklen); + buf_pos += cmd->cklen; + break; } } if (using_crypt && cmd->cry_masks & HIFN_CRYPT_CMD_NEW_IV) { - bcopy(cmd->iv, buf_pos, HIFN_IV_LENGTH); - buf_pos += HIFN_IV_LENGTH; + switch (cmd->cry_masks & HIFN_CRYPT_CMD_ALG_MASK) { + case HIFN_CRYPT_CMD_ALG_AES: + ivlen = HIFN_AES_IV_LENGTH; + break; + default: + ivlen = HIFN_IV_LENGTH; + break; + } + bcopy(cmd->iv, buf_pos, ivlen); + buf_pos += ivlen; } if ((cmd->base_masks & (HIFN_BASE_CMD_MAC|HIFN_BASE_CMD_CRYPT)) == 0) { @@ -2161,8 +2230,11 @@ break; case CRYPTO_DES_CBC: case CRYPTO_3DES_CBC: + case CRYPTO_AES_CBC: /* XXX this may read fewer, does it matter? */ - read_random(sc->sc_sessions[i].hs_iv, HIFN_IV_LENGTH); + read_random(sc->sc_sessions[i].hs_iv, + c->cri_alg == CRYPTO_AES_CBC ? + HIFN_AES_IV_LENGTH : HIFN_IV_LENGTH); /*FALLTHROUGH*/ case CRYPTO_ARC4: if (cry) @@ -2211,7 +2283,7 @@ { struct hifn_softc *sc = arg; struct hifn_command *cmd = NULL; - int session, err; + int session, err, ivlen; struct cryptodesc *crd1, *crd2, *maccrd, *enccrd; if (crp == NULL || crp->crp_callback == NULL) { @@ -2259,6 +2331,7 @@ enccrd = NULL; } else if (crd1->crd_alg == CRYPTO_DES_CBC || crd1->crd_alg == CRYPTO_3DES_CBC || + crd1->crd_alg == CRYPTO_AES_CBC || crd1->crd_alg == CRYPTO_ARC4) { if ((crd1->crd_flags & CRD_F_ENCRYPT) == 0) cmd->base_masks |= HIFN_BASE_CMD_DECODE; @@ -2275,6 +2348,7 @@ crd1->crd_alg == CRYPTO_SHA1) && (crd2->crd_alg == CRYPTO_DES_CBC || crd2->crd_alg == CRYPTO_3DES_CBC || + crd2->crd_alg == CRYPTO_AES_CBC || crd2->crd_alg == CRYPTO_ARC4) && ((crd2->crd_flags & CRD_F_ENCRYPT) == 0)) { cmd->base_masks = HIFN_BASE_CMD_DECODE; @@ -2282,7 +2356,8 @@ enccrd = crd2; } else if ((crd1->crd_alg == CRYPTO_DES_CBC || crd1->crd_alg == CRYPTO_ARC4 || - crd1->crd_alg == CRYPTO_3DES_CBC) && + crd1->crd_alg == CRYPTO_3DES_CBC || + crd1->crd_alg == CRYPTO_AES_CBC) && (crd2->crd_alg == CRYPTO_MD5_HMAC || crd2->crd_alg == CRYPTO_SHA1_HMAC || crd2->crd_alg == CRYPTO_MD5 || @@ -2320,48 +2395,72 @@ HIFN_CRYPT_CMD_MODE_CBC | HIFN_CRYPT_CMD_NEW_IV; break; + case CRYPTO_AES_CBC: + cmd->cry_masks |= HIFN_CRYPT_CMD_ALG_AES | + HIFN_CRYPT_CMD_MODE_CBC | + HIFN_CRYPT_CMD_NEW_IV; + break; default: err = EINVAL; goto errout; } if (enccrd->crd_alg != CRYPTO_ARC4) { + ivlen = ((enccrd->crd_alg == CRYPTO_AES_CBC) ? + HIFN_AES_IV_LENGTH : HIFN_IV_LENGTH); if (enccrd->crd_flags & CRD_F_ENCRYPT) { if (enccrd->crd_flags & CRD_F_IV_EXPLICIT) - bcopy(enccrd->crd_iv, cmd->iv, - HIFN_IV_LENGTH); + bcopy(enccrd->crd_iv, cmd->iv, ivlen); else bcopy(sc->sc_sessions[session].hs_iv, - cmd->iv, HIFN_IV_LENGTH); + cmd->iv, ivlen); if ((enccrd->crd_flags & CRD_F_IV_PRESENT) == 0) { if (crp->crp_flags & CRYPTO_F_IMBUF) m_copyback(cmd->src_m, enccrd->crd_inject, - HIFN_IV_LENGTH, cmd->iv); + ivlen, cmd->iv); else if (crp->crp_flags & CRYPTO_F_IOV) cuio_copyback(cmd->src_io, enccrd->crd_inject, - HIFN_IV_LENGTH, cmd->iv); + ivlen, cmd->iv); } } else { if (enccrd->crd_flags & CRD_F_IV_EXPLICIT) - bcopy(enccrd->crd_iv, cmd->iv, - HIFN_IV_LENGTH); + bcopy(enccrd->crd_iv, cmd->iv, ivlen); else if (crp->crp_flags & CRYPTO_F_IMBUF) m_copydata(cmd->src_m, - enccrd->crd_inject, - HIFN_IV_LENGTH, cmd->iv); + enccrd->crd_inject, ivlen, cmd->iv); else if (crp->crp_flags & CRYPTO_F_IOV) cuio_copydata(cmd->src_io, - enccrd->crd_inject, - HIFN_IV_LENGTH, cmd->iv); + enccrd->crd_inject, ivlen, cmd->iv); } } cmd->ck = enccrd->crd_key; cmd->cklen = enccrd->crd_klen >> 3; + /* + * Need to specify the size for the AES key in the masks. + */ + if ((cmd->cry_masks & HIFN_CRYPT_CMD_ALG_MASK) == + HIFN_CRYPT_CMD_ALG_AES) { + switch (cmd->cklen) { + case 16: + cmd->cry_masks |= HIFN_CRYPT_CMD_KSZ_128; + break; + case 24: + cmd->cry_masks |= HIFN_CRYPT_CMD_KSZ_192; + break; + case 32: + cmd->cry_masks |= HIFN_CRYPT_CMD_KSZ_256; + break; + default: + err = EINVAL; + goto errout; + } + } + if (sc->sc_sessions[session].hs_state == HS_STATE_USED) cmd->cry_masks |= HIFN_CRYPT_CMD_NEW_KEY; } @@ -2527,7 +2626,7 @@ struct cryptop *crp = cmd->crp; struct cryptodesc *crd; struct mbuf *m; - int totlen, i, u; + int totlen, i, u, ivlen; if (cmd->src_map == cmd->dst_map) { bus_dmamap_sync(sc->sc_dmat, cmd->src_map, @@ -2587,17 +2686,18 @@ HIFN_BASE_CMD_CRYPT) { for (crd = crp->crp_desc; crd; crd = crd->crd_next) { if (crd->crd_alg != CRYPTO_DES_CBC && - crd->crd_alg != CRYPTO_3DES_CBC) + crd->crd_alg != CRYPTO_3DES_CBC && + crd->crd_alg != CRYPTO_AES_CBC) continue; + ivlen = ((crd->crd_alg == CRYPTO_AES_CBC) ? + HIFN_AES_IV_LENGTH : HIFN_IV_LENGTH); if (crp->crp_flags & CRYPTO_F_IMBUF) m_copydata((struct mbuf *)crp->crp_buf, - crd->crd_skip + crd->crd_len - HIFN_IV_LENGTH, - HIFN_IV_LENGTH, + crd->crd_skip + crd->crd_len - ivlen, ivlen, cmd->softc->sc_sessions[cmd->session_num].hs_iv); else if (crp->crp_flags & CRYPTO_F_IOV) { cuio_copydata((struct uio *)crp->crp_buf, - crd->crd_skip + crd->crd_len - HIFN_IV_LENGTH, - HIFN_IV_LENGTH, + crd->crd_skip + crd->crd_len - ivlen, ivlen, cmd->softc->sc_sessions[cmd->session_num].hs_iv); } break; ==== //depot/projects/netperf/sys/dev/hifn/hifn7751reg.h#3 (text+ko) ==== @@ -63,6 +63,8 @@ #define PCI_PRODUCT_HIFN_6500 0x0006 /* 6500 */ #define PCI_PRODUCT_HIFN_7811 0x0007 /* 7811 */ #define PCI_PRODUCT_HIFN_7951 0x0012 /* 7951 */ +#define PCI_PRODUCT_HIFN_7955 0x0020 /* 7954/7955 */ +#define PCI_PRODUCT_HIFN_7956 0x01d0 /* 7956 */ #define PCI_VENDOR_INVERTEX 0x14e1 /* Invertex */ #define PCI_PRODUCT_INVERTEX_AEON 0x0005 /* AEON */ @@ -210,6 +212,7 @@ #define HIFN_1_DMA_CSR 0x40 /* DMA Status and Control */ #define HIFN_1_DMA_IER 0x44 /* DMA Interrupt Enable */ #define HIFN_1_DMA_CNFG 0x48 /* DMA Configuration */ +#define HIFN_1_PLL 0x4c /* 795x: PLL config */ #define HIFN_1_7811_RNGENA 0x60 /* 7811: rng enable */ #define HIFN_1_7811_RNGCFG 0x64 /* 7811: rng config */ #define HIFN_1_7811_RNGDAT 0x68 /* 7811: rng data */ @@ -369,6 +372,11 @@ #define HIFN_UNLOCK_SECRET1 0xf4 #define HIFN_UNLOCK_SECRET2 0xfc +/* + * PLL config register + */ +#define HIFN_PLL_7956 0x00001d18 /* 7956 PLL config value */ + /********************************************************************* * Structs for board commands * @@ -408,7 +416,8 @@ #define HIFN_CRYPT_CMD_ALG_DES 0x0000 /* DES */ #define HIFN_CRYPT_CMD_ALG_3DES 0x0001 /* 3DES */ #define HIFN_CRYPT_CMD_ALG_RC4 0x0002 /* RC4 */ -#define HIFN_CRYPT_CMD_MODE_MASK 0x0018 /* DES mode: */ +#define HIFN_CRYPT_CMD_ALG_AES 0x0003 /* AES */ +#define HIFN_CRYPT_CMD_MODE_MASK 0x0018 /* Encrypt mode: */ #define HIFN_CRYPT_CMD_MODE_ECB 0x0000 /* ECB */ #define HIFN_CRYPT_CMD_MODE_CBC 0x0008 /* CBC */ #define HIFN_CRYPT_CMD_MODE_CFB 0x0010 /* CFB */ @@ -420,6 +429,11 @@ #define HIFN_CRYPT_CMD_SRCLEN_M 0xc000 #define HIFN_CRYPT_CMD_SRCLEN_S 14 +#define HIFN_CRYPT_CMD_KSZ_MASK 0x0600 /* AES key size: */ +#define HIFN_CRYPT_CMD_KSZ_128 0x0000 /* 128 bit */ +#define HIFN_CRYPT_CMD_KSZ_192 0x0200 /* 192 bit */ +#define HIFN_CRYPT_CMD_KSZ_256 0x0400 /* 256 bit */ + /* * Structure to help build up the command data structure. */ ==== //depot/projects/netperf/sys/dev/hifn/hifn7751var.h#2 (text+ko) ==== @@ -67,6 +67,8 @@ #define HIFN_3DES_KEY_LENGTH 24 #define HIFN_MAX_CRYPT_KEY_LENGTH HIFN_3DES_KEY_LENGTH #define HIFN_IV_LENGTH 8 +#define HIFN_AES_IV_LENGTH 16 +#define HIFN_MAX_IV_LENGTH HIFN_AES_IV_LENGTH /* * Length values for authentication @@ -111,7 +113,7 @@ struct hifn_session { int hs_state; int hs_prev_op; /* XXX collapse into hs_flags? */ - u_int8_t hs_iv[HIFN_IV_LENGTH]; + u_int8_t hs_iv[HIFN_MAX_IV_LENGTH]; }; #define HIFN_RING_SYNC(sc, r, i, f) \ @@ -166,7 +168,9 @@ int sc_flags; #define HIFN_HAS_RNG 0x1 /* includes random number generator */ #define HIFN_HAS_PUBLIC 0x2 /* includes public key support */ -#define HIFN_IS_7811 0x4 /* Hifn 7811 part */ +#define HIFN_HAS_AES 0x4 /* includes AES support */ +#define HIFN_IS_7811 0x8 /* Hifn 7811 part */ +#define HIFN_IS_7956 0x10 /* Hifn 7956/7955 don't have SDRAM */ struct callout sc_rngto; /* for polling RNG */ struct callout sc_tickto; /* for managing DMA */ int sc_rngfirst; @@ -266,7 +270,7 @@ struct hifn_command { u_int16_t session_num; u_int16_t base_masks, cry_masks, mac_masks; - u_int8_t iv[HIFN_IV_LENGTH], *ck, mac[HIFN_MAC_KEY_LENGTH]; + u_int8_t iv[HIFN_MAX_IV_LENGTH], *ck, mac[HIFN_MAC_KEY_LENGTH]; int cklen; int sloplen, slopidx; From owner-p4-projects@FreeBSD.ORG Mon Oct 6 12:48:06 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A18F116A4BF; Mon, 6 Oct 2003 12:48:05 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7957516A4C0 for ; Mon, 6 Oct 2003 12:48:05 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9303E43FDF for ; Mon, 6 Oct 2003 12:48:02 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h96Jm2XJ063063 for ; Mon, 6 Oct 2003 12:48:02 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h96Jm1aB063060 for perforce@freebsd.org; Mon, 6 Oct 2003 12:48:01 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Mon, 6 Oct 2003 12:48:01 -0700 (PDT) Message-Id: <200310061948.h96Jm1aB063060@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39270 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2003 19:48:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=39270 Change 39270 by sam@sam_ebb on 2003/10/06 12:47:41 IFC @ 39269 Affected files ... .. //depot/projects/netperf/sys/alpha/include/pmap.h#2 integrate .. //depot/projects/netperf/sys/amd64/amd64/pmap.c#12 integrate .. //depot/projects/netperf/sys/amd64/include/pmap.h#3 integrate .. //depot/projects/netperf/sys/cam/scsi/scsi_cd.c#7 integrate .. //depot/projects/netperf/sys/coda/coda_subr.c#4 integrate .. //depot/projects/netperf/sys/conf/majors#5 integrate .. //depot/projects/netperf/sys/dev/ath/if_ath.c#14 integrate .. //depot/projects/netperf/sys/dev/cardbus/cardbus.c#3 integrate .. //depot/projects/netperf/sys/dev/cardbus/cardbus_cis.c#4 integrate .. //depot/projects/netperf/sys/dev/firewire/firewire.c#5 integrate .. //depot/projects/netperf/sys/dev/firewire/sbp.c#7 integrate .. //depot/projects/netperf/sys/dev/pccard/card_if.m#2 integrate .. //depot/projects/netperf/sys/dev/pccard/pccard_cis_quirks.c#3 integrate .. //depot/projects/netperf/sys/dev/pccard/pccardvar.h#4 integrate .. //depot/projects/netperf/sys/dev/usb/if_aue.c#4 integrate .. //depot/projects/netperf/sys/dev/usb/if_auereg.h#2 integrate .. //depot/projects/netperf/sys/dev/usb/if_cue.c#3 integrate .. //depot/projects/netperf/sys/dev/usb/if_cuereg.h#2 integrate .. //depot/projects/netperf/sys/dev/usb/if_kue.c#3 integrate .. //depot/projects/netperf/sys/dev/usb/if_kuereg.h#2 integrate .. //depot/projects/netperf/sys/dev/usb/if_rue.c#3 integrate .. //depot/projects/netperf/sys/dev/usb/if_ruereg.h#2 integrate .. //depot/projects/netperf/sys/dev/usb/ubsa.c#3 integrate .. //depot/projects/netperf/sys/dev/usb/ufm.c#4 integrate .. //depot/projects/netperf/sys/dev/usb/uhid.c#5 integrate .. //depot/projects/netperf/sys/dev/usb/ukbd.c#3 integrate .. //depot/projects/netperf/sys/dev/usb/ums.c#5 integrate .. //depot/projects/netperf/sys/dev/usb/usb.c#4 integrate .. //depot/projects/netperf/sys/dev/usb/usb_mem.c#3 integrate .. //depot/projects/netperf/sys/dev/usb/usb_port.h#2 integrate .. //depot/projects/netperf/sys/dev/usb/usbdevs#5 integrate .. //depot/projects/netperf/sys/dev/usb/usbdevs.h#5 integrate .. //depot/projects/netperf/sys/dev/usb/usbdevs_data.h#5 integrate .. //depot/projects/netperf/sys/fs/hpfs/hpfs_vnops.c#2 integrate .. //depot/projects/netperf/sys/fs/msdosfs/msdosfs_denode.c#2 integrate .. //depot/projects/netperf/sys/fs/msdosfs/msdosfs_vfsops.c#6 integrate .. //depot/projects/netperf/sys/fs/ntfs/ntfs_vnops.c#3 integrate .. //depot/projects/netperf/sys/fs/nwfs/nwfs_io.c#5 integrate .. //depot/projects/netperf/sys/fs/nwfs/nwfs_node.c#2 integrate .. //depot/projects/netperf/sys/fs/pseudofs/pseudofs_vncache.c#2 integrate .. //depot/projects/netperf/sys/fs/smbfs/smbfs_io.c#5 integrate .. //depot/projects/netperf/sys/fs/smbfs/smbfs_node.c#2 integrate .. //depot/projects/netperf/sys/fs/udf/udf_vnops.c#2 integrate .. //depot/projects/netperf/sys/geom/geom.h#3 integrate .. //depot/projects/netperf/sys/geom/geom_io.c#5 integrate .. //depot/projects/netperf/sys/geom/geom_subr.c#3 integrate .. //depot/projects/netperf/sys/gnu/ext2fs/ext2_inode.c#2 integrate .. //depot/projects/netperf/sys/gnu/ext2fs/ext2_vfsops.c#5 integrate .. //depot/projects/netperf/sys/i386/i386/locore.s#5 integrate .. //depot/projects/netperf/sys/i386/i386/machdep.c#5 integrate .. //depot/projects/netperf/sys/i386/i386/pmap.c#15 integrate .. //depot/projects/netperf/sys/i386/include/pmap.h#4 integrate .. //depot/projects/netperf/sys/ia64/include/pmap.h#2 integrate .. //depot/projects/netperf/sys/isofs/cd9660/cd9660_node.c#2 integrate .. //depot/projects/netperf/sys/kern/kern_exec.c#5 integrate .. //depot/projects/netperf/sys/kern/kern_proc.c#4 integrate .. //depot/projects/netperf/sys/kern/kern_synch.c#6 integrate .. //depot/projects/netperf/sys/kern/kern_sysctl.c#2 integrate .. //depot/projects/netperf/sys/kern/vfs_bio.c#7 integrate .. //depot/projects/netperf/sys/kern/vfs_cache.c#2 integrate .. //depot/projects/netperf/sys/kern/vfs_subr.c#5 integrate .. //depot/projects/netperf/sys/net/route.c#12 integrate .. //depot/projects/netperf/sys/netinet6/ah_output.c#2 integrate .. //depot/projects/netperf/sys/netinet6/frag6.c#3 integrate .. //depot/projects/netperf/sys/netinet6/icmp6.c#4 integrate .. //depot/projects/netperf/sys/netinet6/in6.c#5 integrate .. //depot/projects/netperf/sys/netinet6/in6_gif.c#2 integrate .. //depot/projects/netperf/sys/netinet6/in6_ifattach.c#6 integrate .. //depot/projects/netperf/sys/netinet6/in6_pcb.c#7 integrate .. //depot/projects/netperf/sys/netinet6/in6_prefix.c#2 integrate .. //depot/projects/netperf/sys/netinet6/in6_proto.c#3 integrate .. //depot/projects/netperf/sys/netinet6/in6_src.c#4 integrate .. //depot/projects/netperf/sys/netinet6/ip6_fw.c#4 integrate .. //depot/projects/netperf/sys/netinet6/ip6_input.c#6 integrate .. //depot/projects/netperf/sys/netinet6/ip6_mroute.c#2 integrate .. //depot/projects/netperf/sys/netinet6/ip6_output.c#9 integrate .. //depot/projects/netperf/sys/netinet6/ipsec.c#3 integrate .. //depot/projects/netperf/sys/netinet6/nd6.c#7 integrate .. //depot/projects/netperf/sys/netinet6/nd6_rtr.c#5 integrate .. //depot/projects/netperf/sys/netinet6/raw_ip6.c#2 integrate .. //depot/projects/netperf/sys/netinet6/route6.c#2 integrate .. //depot/projects/netperf/sys/netinet6/scope6.c#2 integrate .. //depot/projects/netperf/sys/netinet6/udp6_output.c#2 integrate .. //depot/projects/netperf/sys/netinet6/udp6_usrreq.c#2 integrate .. //depot/projects/netperf/sys/nfsclient/nfs_node.c#3 integrate .. //depot/projects/netperf/sys/nfsclient/nfs_subs.c#3 integrate .. //depot/projects/netperf/sys/nfsclient/nfs_vfsops.c#4 integrate .. //depot/projects/netperf/sys/pc98/i386/machdep.c#4 integrate .. //depot/projects/netperf/sys/pc98/pc98/clock.c#6 integrate .. //depot/projects/netperf/sys/pc98/pc98/sio.c#5 integrate .. //depot/projects/netperf/sys/pci/if_dc.c#7 integrate .. //depot/projects/netperf/sys/pci/if_dcreg.h#2 integrate .. //depot/projects/netperf/sys/powerpc/include/pmap.h#2 integrate .. //depot/projects/netperf/sys/sparc64/include/pmap.h#2 integrate .. //depot/projects/netperf/sys/sys/proc.h#5 integrate .. //depot/projects/netperf/sys/sys/sysctl.h#3 integrate .. //depot/projects/netperf/sys/ufs/ffs/ffs_inode.c#2 integrate .. //depot/projects/netperf/sys/ufs/ffs/ffs_snapshot.c#3 integrate .. //depot/projects/netperf/sys/ufs/ffs/ffs_softdep.c#5 integrate .. //depot/projects/netperf/sys/ufs/ffs/ffs_vfsops.c#5 integrate .. //depot/projects/netperf/sys/ufs/ffs/ffs_vnops.c#4 integrate .. //depot/projects/netperf/sys/ufs/ufs/ufs_inode.c#3 integrate .. //depot/projects/netperf/sys/vm/device_pager.c#4 integrate .. //depot/projects/netperf/sys/vm/pmap.h#4 integrate .. //depot/projects/netperf/sys/vm/vm_extern.h#3 integrate .. //depot/projects/netperf/sys/vm/vm_fault.c#5 integrate .. //depot/projects/netperf/sys/vm/vm_glue.c#5 integrate .. //depot/projects/netperf/sys/vm/vm_kern.c#7 integrate .. //depot/projects/netperf/sys/vm/vm_map.c#8 integrate .. //depot/projects/netperf/sys/vm/vm_map.h#6 integrate .. //depot/projects/netperf/sys/vm/vm_mmap.c#6 integrate .. //depot/projects/netperf/sys/vm/vm_page.c#7 integrate Differences ... ==== //depot/projects/netperf/sys/alpha/include/pmap.h#2 (text+ko) ==== @@ -43,7 +43,7 @@ * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 * from: i386 pmap.h,v 1.54 1997/11/20 19:30:35 bde Exp - * $FreeBSD: src/sys/alpha/include/pmap.h,v 1.23 2003/04/10 18:42:06 jhb Exp $ + * $FreeBSD: src/sys/alpha/include/pmap.h,v 1.24 2003/10/06 01:47:11 bms Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -183,7 +183,6 @@ }; #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) -#define pmap_resident_count(pmap) (pmap)->pm_stats.resident_count #define PM_FLAG_LOCKED 0x1 #define PM_FLAG_WANTED 0x2 ==== //depot/projects/netperf/sys/amd64/amd64/pmap.c#12 (text+ko) ==== @@ -73,7 +73,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.441 2003/10/03 22:46:52 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.442 2003/10/05 00:12:16 alc Exp $"); /* * Manages physical address maps. @@ -1022,7 +1022,6 @@ VM_WAIT; vm_page_lock_queues(); vm_page_flag_clear(pml4pg, PG_BUSY); - pml4pg->valid = VM_PAGE_BITS_ALL; vm_page_unlock_queues(); pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(pml4pg)); @@ -1196,7 +1195,6 @@ } vm_page_lock_queues(); - m->valid = VM_PAGE_BITS_ALL; vm_page_flag_clear(m, PG_ZERO); vm_page_wakeup(m); vm_page_unlock_queues(); ==== //depot/projects/netperf/sys/amd64/include/pmap.h#3 (text+ko) ==== @@ -42,7 +42,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.106 2003/09/27 20:53:01 alc Exp $ + * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.107 2003/10/06 01:47:11 bms Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -226,7 +226,6 @@ }; #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) -#define pmap_resident_count(pmap) (pmap)->pm_stats.resident_count typedef struct pmap *pmap_t; ==== //depot/projects/netperf/sys/cam/scsi/scsi_cd.c#7 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.84 2003/09/30 07:52:15 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.85 2003/10/06 10:39:13 phk Exp $"); #include "opt_cd.h" @@ -496,6 +496,7 @@ free(softc->changer, M_DEVBUF); num_changers--; } + disk_destroy(&softc->disk); free(softc, M_DEVBUF); splx(s); } @@ -2852,6 +2853,20 @@ ccb = cdgetccb(periph, /* priority */ 1); + scsi_test_unit_ready(&ccb->csio, 0, cddone, + MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, 1000); + ccb->ccb_h.ccb_bp = NULL; + + error = cam_periph_runccb(ccb, NULL, + /*cam_flags*/0, + /*sense_flags*/SF_RETRY_UA, + softc->disk.d_devstat); + + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + xpt_release_ccb(ccb); + return (ENXIO); + } + rcap_buf = malloc(sizeof(struct scsi_read_capacity_data), M_TEMP, M_WAITOK); ==== //depot/projects/netperf/sys/coda/coda_subr.c#4 (text+ko) ==== @@ -52,14 +52,13 @@ */ #include -__FBSDID("$FreeBSD: src/sys/coda/coda_subr.c,v 1.25 2003/10/04 13:16:54 jeff Exp $"); - -#include +__FBSDID("$FreeBSD: src/sys/coda/coda_subr.c,v 1.27 2003/10/05 07:44:45 bde Exp $"); #include #include #include #include +#include #include #include @@ -318,6 +317,11 @@ nvp = TAILQ_NEXT(vp, v_nmntvnodes); if (vp->v_mount != mp) continue; + VI_LOCK(vp); + if (vp->v_iflag & VI_XLOCK) { + VI_UNLOCK(vp); + continue; + } cp = VTOC(vp); count++; if (!(cp->c_flags & C_UNMOUNTING)) { @@ -325,6 +329,7 @@ printf("vp %p, cp %p missed\n", vp, cp); cp->c_flags |= C_UNMOUNTING; } + VI_UNLOCK(vp); } mtx_unlock(&mntvnode_mtx); } ==== //depot/projects/netperf/sys/conf/majors#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/majors,v 1.179 2003/09/29 14:15:57 scottl Exp $ +# $FreeBSD: src/sys/conf/majors,v 1.180 2003/10/06 09:13:08 phk Exp $ # # This list is semi-obsoleted by DEVFS, but for now it still contains # the current allocation of device major numbers. @@ -28,7 +28,6 @@ 11 *spigot Video capture? 12 *sc syscons/pcvt virtual consoles 14 *sa SCSI "sequential access devices" -15 *cd SCSI "CDROM type" 16 *lpt PC parallel printer port 17 *ch SCSI changer 18 *nmdm nullmodem back-to-back tty ports ==== //depot/projects/netperf/sys/dev/ath/if_ath.c#14 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.18 2003/09/15 22:34:46 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.19 2003/10/06 00:45:25 sam Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -995,7 +995,7 @@ */ rs = &ni->ni_rates; pktlen = sizeof (struct ieee80211_frame) - + 8 + 2 + 2 + 2+ni->ni_esslen + 2+rs->rs_nrates + 6; + + 8 + 2 + 2 + 2+ni->ni_esslen + 2+rs->rs_nrates + 3 + 6; if (rs->rs_nrates > IEEE80211_RATE_SIZE) pktlen += 2; if (pktlen <= MHLEN) @@ -1052,6 +1052,9 @@ memcpy(frm, ni->ni_essid, ni->ni_esslen); frm += ni->ni_esslen; frm = ieee80211_add_rates(frm, rs); + *frm++ = IEEE80211_ELEMID_DSPARMS; + *frm++ = 1; + *frm++ = ieee80211_chan2ieee(ic, ni->ni_chan); if (ic->ic_opmode == IEEE80211_M_IBSS) { *frm++ = IEEE80211_ELEMID_IBSSPARMS; *frm++ = 2; ==== //depot/projects/netperf/sys/dev/cardbus/cardbus.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/cardbus/cardbus.c,v 1.40 2003/08/24 17:46:02 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cardbus/cardbus.c,v 1.41 2003/10/06 15:56:29 imp Exp $"); #include #include @@ -377,8 +377,6 @@ /* Card Interface */ DEVMETHOD(card_attach_card, cardbus_attach_card), DEVMETHOD(card_detach_card, cardbus_detach_card), - DEVMETHOD(card_cis_read, cardbus_cis_read), - DEVMETHOD(card_cis_free, cardbus_cis_free), /* Cardbus/PCI interface */ DEVMETHOD(pci_read_config, pci_read_config_method), ==== //depot/projects/netperf/sys/dev/cardbus/cardbus_cis.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/cardbus/cardbus_cis.c,v 1.40 2003/09/02 17:30:35 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cardbus/cardbus_cis.c,v 1.41 2003/10/06 15:56:29 imp Exp $"); /* * CIS Handling for the Cardbus Bus @@ -75,9 +75,6 @@ static int decode_tuple_generic(device_t cbdev, device_t child, int id, int len, uint8_t *tupledata, uint32_t start, uint32_t *off, struct tuple_callbacks *info); -static int decode_tuple_nothing(device_t cbdev, device_t child, int id, - int len, uint8_t *tupledata, uint32_t start, uint32_t *off, - struct tuple_callbacks *info); static int decode_tuple_copy(device_t cbdev, device_t child, int id, int len, uint8_t *tupledata, uint32_t start, uint32_t *off, struct tuple_callbacks *info); @@ -157,9 +154,6 @@ { 0 } }; -static struct cis_tupleinfo *cisread_buf; -static int ncisread_buf; - /* * Handler functions for various CIS tuples */ @@ -188,38 +182,6 @@ } static int -decode_tuple_nothing(device_t cbdev, device_t child, int id, - int len, uint8_t *tupledata, uint32_t start, uint32_t *off, - struct tuple_callbacks *info) -{ - return (0); -} - -static int -decode_tuple_copy(device_t cbdev, device_t child, int id, - int len, uint8_t *tupledata, uint32_t start, uint32_t *off, - struct tuple_callbacks *info) -{ - struct cis_tupleinfo *tmpbuf; - - tmpbuf = malloc(sizeof(struct cis_tupleinfo) * (ncisread_buf+1), - M_DEVBUF, M_WAITOK); - if (ncisread_buf > 0) { - memcpy(tmpbuf, cisread_buf, - sizeof(struct cis_tupleinfo) * ncisread_buf); - free(cisread_buf, M_DEVBUF); - } - cisread_buf = tmpbuf; - - cisread_buf[ncisread_buf].id = id; - cisread_buf[ncisread_buf].len = len; - cisread_buf[ncisread_buf].data = malloc(len, M_DEVBUF, M_WAITOK); - memcpy(cisread_buf[ncisread_buf].data, tupledata, len); - ncisread_buf++; - return (0); -} - -static int decode_tuple_linktarget(device_t cbdev, device_t child, int id, int len, uint8_t *tupledata, uint32_t start, uint32_t *off, struct tuple_callbacks *info) @@ -1056,77 +1018,6 @@ } int -cardbus_cis_read(device_t cbdev, device_t child, uint8_t id, - struct cis_tupleinfo **buff, int *nret) -{ - struct tuple_callbacks cisread_callbacks[] = { - MAKETUPLE(NULL, nothing), - /* first entry will be overwritten */ - MAKETUPLE(NULL, nothing), - MAKETUPLE(DEVICE, nothing), - MAKETUPLE(LONG_LINK_CB, unhandled), - MAKETUPLE(INDIRECT, unhandled), - MAKETUPLE(CONFIG_CB, nothing), - MAKETUPLE(CFTABLE_ENTRY_CB, nothing), - MAKETUPLE(LONGLINK_MFC, unhandled), - MAKETUPLE(BAR, nothing), - MAKETUPLE(PWR_MGMNT, nothing), - MAKETUPLE(EXTDEVICE, nothing), - MAKETUPLE(CHECKSUM, nothing), - MAKETUPLE(LONGLINK_A, unhandled), - MAKETUPLE(LONGLINK_C, unhandled), - MAKETUPLE(LINKTARGET, nothing), - MAKETUPLE(NO_LINK, nothing), - MAKETUPLE(VERS_1, nothing), - MAKETUPLE(ALTSTR, nothing), - MAKETUPLE(DEVICE_A, nothing), - MAKETUPLE(JEDEC_C, nothing), - MAKETUPLE(JEDEC_A, nothing), - MAKETUPLE(CONFIG, nothing), - MAKETUPLE(CFTABLE_ENTRY, nothing), - MAKETUPLE(DEVICE_OC, nothing), - MAKETUPLE(DEVICE_OA, nothing), - MAKETUPLE(DEVICE_GEO, nothing), - MAKETUPLE(DEVICE_GEO_A, nothing), - MAKETUPLE(MANFID, nothing), - MAKETUPLE(FUNCID, nothing), - MAKETUPLE(FUNCE, nothing), - MAKETUPLE(SWIL, nothing), - MAKETUPLE(VERS_2, nothing), - MAKETUPLE(FORMAT, nothing), - MAKETUPLE(GEOMETRY, nothing), - MAKETUPLE(BYTEORDER, nothing), - MAKETUPLE(DATE, nothing), - MAKETUPLE(BATTERY, nothing), - MAKETUPLE(ORG, nothing), - MAKETUPLE(END, end), - MAKETUPLE(GENERIC, nothing), - }; - int ret; - - cisread_callbacks[0].id = id; - cisread_callbacks[0].name = "COPY"; - cisread_callbacks[0].func = decode_tuple_copy; - ncisread_buf = 0; - cisread_buf = NULL; - ret = cardbus_parse_cis(cbdev, child, cisread_callbacks); - - *buff = cisread_buf; - *nret = ncisread_buf; - return (ret); -} - -void -cardbus_cis_free(device_t cbdev, struct cis_tupleinfo *buff, int *nret) -{ - int i; - for (i = 0; i < *nret; i++) - free(buff[i].data, M_DEVBUF); - if (*nret > 0) - free(buff, M_DEVBUF); -} - -int cardbus_do_cis(device_t cbdev, device_t child) { int ret; ==== //depot/projects/netperf/sys/dev/firewire/firewire.c#5 (text+ko) ==== @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.61 2003/10/02 04:06:55 simokawa Exp $ + * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.62 2003/10/06 07:17:43 simokawa Exp $ * */ @@ -64,18 +64,19 @@ struct crom_chunk hw; }; -int firewire_debug=0, try_bmr=1; +int firewire_debug=0, try_bmr=1, hold_count=3; SYSCTL_INT(_debug, OID_AUTO, firewire_debug, CTLFLAG_RW, &firewire_debug, 0, "FireWire driver debug flag"); SYSCTL_NODE(_hw, OID_AUTO, firewire, CTLFLAG_RD, 0, "FireWire Subsystem"); SYSCTL_INT(_hw_firewire, OID_AUTO, try_bmr, CTLFLAG_RW, &try_bmr, 0, "Try to be a bus manager"); +SYSCTL_INT(_hw_firewire, OID_AUTO, hold_count, CTLFLAG_RW, &hold_count, 0, + "Number of count of bus resets for removing lost device information"); MALLOC_DEFINE(M_FW, "firewire", "FireWire"); MALLOC_DEFINE(M_FWXFER, "fw_xfer", "XFER/FireWire"); #define FW_MAXASYRTY 4 -#define FW_MAXDEVRCNT 4 devclass_t firewire_devclass; @@ -1227,28 +1228,19 @@ fw_bus_probe(struct firewire_comm *fc) { int s; - struct fw_device *fwdev, *next; + struct fw_device *fwdev; s = splfw(); fc->status = FWBUSEXPLORE; fc->retry_count = 0; -/* - * Invalidate all devices, just after bus reset. Devices - * to be removed has not been seen longer time. - */ - for (fwdev = STAILQ_FIRST(&fc->devices); fwdev != NULL; fwdev = next) { - next = STAILQ_NEXT(fwdev, link); + /* Invalidate all devices, just after bus reset. */ + STAILQ_FOREACH(fwdev, &fc->devices, link) if (fwdev->status != FWDEVINVAL) { fwdev->status = FWDEVINVAL; fwdev->rcnt = 0; - } else if(fwdev->rcnt < FW_MAXDEVRCNT) { - fwdev->rcnt ++; - } else { - STAILQ_REMOVE(&fc->devices, fwdev, fw_device, link); - free(fwdev, M_FW); } - } + fc->ongonode = 0; fc->ongoaddr = CSRROMOFF; fc->ongodev = NULL; @@ -1592,16 +1584,30 @@ static void fw_attach_dev(struct firewire_comm *fc) { - struct fw_device *fwdev; + struct fw_device *fwdev, *next; struct fw_xfer *xfer; int i, err; device_t *devlistp; int devcnt; struct firewire_dev_comm *fdc; - STAILQ_FOREACH(fwdev, &fc->devices, link) - if (fwdev->status == FWDEVINIT) + for (fwdev = STAILQ_FIRST(&fc->devices); fwdev != NULL; fwdev = next) { + next = STAILQ_NEXT(fwdev, link); + if (fwdev->status == FWDEVINIT) { fwdev->status = FWDEVATTACHED; + } else if (fwdev->status == FWDEVINVAL) { + fwdev->rcnt ++; + if (fwdev->rcnt > hold_count) { + /* + * Remove devices which have not been seen + * for a while. + */ + STAILQ_REMOVE(&fc->devices, fwdev, fw_device, + link); + free(fwdev, M_FW); + } + } + } err = device_get_children(fc->bdev, &devlistp, &devcnt); if( err != 0 ) ==== //depot/projects/netperf/sys/dev/firewire/sbp.c#7 (text+ko) ==== @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.62 2003/10/02 04:06:56 simokawa Exp $ + * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.64 2003/10/06 05:40:47 simokawa Exp $ * */ @@ -157,7 +157,9 @@ timeout:4; u_int8_t type; u_int16_t lun_id; - int freeze; + u_int16_t freeze; +#define ORB_LINK_DEAD 1 + u_int16_t flags; struct cam_path *path; struct sbp_target *target; struct fwdma_alloc dma; @@ -194,8 +196,6 @@ struct sbp_target targets[SBP_NUM_TARGETS]; struct fw_bind fwb; bus_dma_tag_t dmat; -#define SBP_RESOURCE_SHORTAGE 0x10 - unsigned char flags; }; static void sbp_post_explore __P((void *)); static void sbp_recv __P((struct fw_xfer *)); @@ -811,6 +811,10 @@ sbp_show_sdev_info(sdev, 2); printf("sbp_cmd_callback\n"); END_DEBUG + if (xfer->resp != 0) { + /* XXX */ + printf("%s: xfer->resp != 0\n", __FUNCTION__); + } sbp_xfer_free(xfer); return; } @@ -1536,6 +1540,7 @@ switch(ocb->flags) { case OCB_ACT_MGM: orb_fun = ntohl(ocb->orb[4]) & ORB_FUN_MSK; + reset_agent = 0; switch(orb_fun) { case ORB_FUN_LGI: fwdma_sync(&sdev->dma, BUS_DMASYNC_POSTREAD); @@ -1953,7 +1958,8 @@ struct sbp_target *target = sdev->target; sbp_show_sdev_info(sdev, 2); - printf("management ORB timeout\n"); + printf("request timeout(mgm orb:0x%08x) ... ", + (u_int32_t)ocb->bus_addr); target->mgm_ocb_cur = NULL; sbp_free_ocb(sdev, ocb); #if 0 @@ -1972,7 +1978,8 @@ struct sbp_dev *sdev = ocb->sdev; sbp_show_sdev_info(sdev, 2); - printf("request timeout ... "); + printf("request timeout(cmd orb:0x%08x) ... ", + (u_int32_t)ocb->bus_addr); sdev->timeout ++; switch(sdev->timeout) { @@ -2366,16 +2373,26 @@ BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE); prev = sbp_enqueue_ocb(ocb->sdev, ocb); fwdma_sync(&ocb->sdev->dma, BUS_DMASYNC_PREWRITE); - if (prev == NULL) + if (prev == NULL || (ocb->sdev->flags & ORB_LINK_DEAD) != 0) { + ocb->sdev->flags &= ~ORB_LINK_DEAD; sbp_orb_pointer(ocb->sdev, ocb); + } } static void sbp_poll(struct cam_sim *sim) { - /* should call fwohci_intr? */ + struct sbp_softc *sbp; + struct firewire_comm *fc; + + sbp = (struct sbp_softc *)sim->softc; + fc = sbp->fd.fc; + + fc->poll(fc, 0, -1); + return; } + static struct sbp_ocb * sbp_dequeue_ocb(struct sbp_dev *sdev, struct sbp_status *sbp_status) { @@ -2413,8 +2430,18 @@ bus_dmamap_unload(sdev->target->sbp->dmat, ocb->dmamap); } - if (next != NULL && sbp_status->src == 1) - sbp_orb_pointer(sdev, next); + if (sbp_status->src == SRC_NO_NEXT) { + if (next != NULL) + sbp_orb_pointer(sdev, next); + else if (order > 0) { + /* + * Unordered execution + * We need to send pointer for + * next ORB + */ + sdev->flags |= ORB_LINK_DEAD; + } + } break; } else order ++; @@ -2451,13 +2478,14 @@ ocb->ccb->ccb_h.timeout_ch = timeout(sbp_timeout, (caddr_t)ocb, (ocb->ccb->ccb_h.timeout * hz) / 1000); - if (prev != NULL ) { + if (prev != NULL) { SBP_DEBUG(1) #if __FreeBSD_version >= 500000 - printf("linking chain 0x%jx -> 0x%jx\n", - (uintmax_t)prev->bus_addr, (uintmax_t)ocb->bus_addr); + printf("linking chain 0x%jx -> 0x%jx\n", + (uintmax_t)prev->bus_addr, (uintmax_t)ocb->bus_addr); #else - printf("linking chain 0x%x -> 0x%x\n", prev->bus_addr, ocb->bus_addr); + printf("linking chain 0x%x -> 0x%x\n", + prev->bus_addr, ocb->bus_addr); #endif END_DEBUG prev->orb[1] = htonl(ocb->bus_addr); ==== //depot/projects/netperf/sys/dev/pccard/card_if.m#2 (text+ko) ==== @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/sys/dev/pccard/card_if.m,v 1.21 2002/11/02 23:00:28 imp Exp $ +# $FreeBSD: src/sys/dev/pccard/card_if.m,v 1.22 2003/10/06 07:10:40 imp Exp $ # #include @@ -200,52 +200,3 @@ METHOD int compat_match { device_t dev; } - -# -# Method for devices to ask its CIS-enabled parent bus for CIS info. -# Device driver requests all tuples if type 'id', the routine places -# 'nret' number of tuples in 'buff'. Returns 0 if all tuples processed, -# or an error code if processing was aborted. -# Users of this method will be responsible for freeing the memory allocated -# by calling the cis_free method. -# - -HEADER { - struct cis_tupleinfo { - u_int8_t id; - int len; - char *data; - }; -}; - -CODE { - static int - null_cis_read(device_t dev, device_t child, u_int8_t id, - struct cis_tupleinfo **buff, int *nret) - { - *nret = 0; - *buff = NULL; - return ENXIO; - } - - static void - null_cis_free(device_t dev, struct cis_tupleinfo *buff, int *nret) - { - return; - } -}; - -METHOD int cis_read { - device_t dev; - device_t child; - u_int8_t id; - struct cis_tupleinfo **buff; - int *nret; -} DEFAULT null_cis_read; - -METHOD int cis_free { - device_t dev; - struct cis_tupleinfo *buff; - int nret; -} DEFAULT null_cis_free; - ==== //depot/projects/netperf/sys/dev/pccard/pccard_cis_quirks.c#3 (text+ko) ==== @@ -1,7 +1,7 @@ /* $NetBSD: pcmcia_cis_quirks.c,v 1.6 2000/04/12 21:07:55 scw Exp $ */ #include -__FBSDID("$FreeBSD: src/sys/dev/pccard/pccard_cis_quirks.c,v 1.8 2003/08/24 17:54:15 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/pccard/pccard_cis_quirks.c,v 1.9 2003/10/06 07:17:20 imp Exp $"); #define PCCARDDEBUG @@ -208,6 +208,23 @@ static int n_pccard_cis_quirks = sizeof(pccard_cis_quirks)/sizeof(pccard_cis_quirks[0]); +static int +pccard_cis_quirk_match(struct pccard_softc *sc, struct pccard_cis_quirk *q) +{ + if ((sc->card.manufacturer == q->manufacturer) && + (sc->card.product == q->product) && + (((sc->card.manufacturer != PCMCIA_VENDOR_INVALID) && + (sc->card.product != PCMCIA_PRODUCT_INVALID)) || + ((sc->card.manufacturer == PCMCIA_VENDOR_INVALID) && + (sc->card.product == PCMCIA_PRODUCT_INVALID) && + sc->card.cis1_info[0] && + (strcmp(sc->card.cis1_info[0], q->cis1_info[0]) == 0) && + sc->card.cis1_info[1] && + (strcmp(sc->card.cis1_info[1], q->cis1_info[1]) == 0)))) + return (1); + return (0); +} + void pccard_check_cis_quirks(device_t dev) { struct pccard_softc *sc = PCCARD_SOFTC(dev); @@ -215,69 +232,56 @@ int i, j; struct pccard_function *pf, *pf_next, *pf_last; struct pccard_config_entry *cfe, *cfe_next; + struct pccard_cis_quirk *q; pf = NULL; pf_last = NULL; for (i=0; icard.manufacturer == pccard_cis_quirks[i].manufacturer) && - (sc->card.product == pccard_cis_quirks[i].product) && - (((sc->card.manufacturer != PCMCIA_VENDOR_INVALID) && - (sc->card.product != PCMCIA_PRODUCT_INVALID)) || - ((sc->card.manufacturer == PCMCIA_VENDOR_INVALID) && - (sc->card.product == PCMCIA_PRODUCT_INVALID) && - sc->card.cis1_info[0] && - (strcmp(sc->card.cis1_info[0], - pccard_cis_quirks[i].cis1_info[0]) == 0) && - sc->card.cis1_info[1] && - (strcmp(sc->card.cis1_info[1], - pccard_cis_quirks[i].cis1_info[1]) == 0)))) { - if (!wiped) { - if (bootverbose) { - device_printf(dev, "using CIS quirks for "); - for (j = 0; j < 4; j++) { - if (sc->card.cis1_info[j] == NULL) - break; - if (j) - printf(", "); - printf("%s", sc->card.cis1_info[j]); - } - printf("\n"); + q = &pccard_cis_quirks[i]; + if (!pccard_cis_quirk_match(sc, q)) + continue; + if (!wiped) { + if (bootverbose) { + device_printf(dev, "using CIS quirks for "); + for (j = 0; j < 4; j++) { + if (sc->card.cis1_info[j] == NULL) + break; + if (j) + printf(", "); + printf("%s", sc->card.cis1_info[j]); } + printf("\n"); + } - for (pf = STAILQ_FIRST(&sc->card.pf_head); pf != NULL; - pf = pf_next) { - for (cfe = STAILQ_FIRST(&pf->cfe_head); cfe != NULL; - cfe = cfe_next) { - cfe_next = STAILQ_NEXT(cfe, cfe_list); - free(cfe, M_DEVBUF); - } - pf_next = STAILQ_NEXT(pf, pf_list); - free(pf, M_DEVBUF); + for (pf = STAILQ_FIRST(&sc->card.pf_head); pf != NULL; + pf = pf_next) { + for (cfe = STAILQ_FIRST(&pf->cfe_head); cfe != NULL; + cfe = cfe_next) { + cfe_next = STAILQ_NEXT(cfe, cfe_list); + free(cfe, M_DEVBUF); } - - STAILQ_INIT(&sc->card.pf_head); - wiped = 1; + pf_next = STAILQ_NEXT(pf, pf_list); + free(pf, M_DEVBUF); } - if (pf_last == pccard_cis_quirks[i].pf) { - cfe = malloc(sizeof(*cfe), M_DEVBUF, M_NOWAIT); - *cfe = *pccard_cis_quirks[i].cfe; + STAILQ_INIT(&sc->card.pf_head); + wiped = 1; + } - STAILQ_INSERT_TAIL(&pf->cfe_head, cfe, cfe_list); - } else { - pf = malloc(sizeof(*pf), M_DEVBUF, M_NOWAIT); - *pf = *pccard_cis_quirks[i].pf; - STAILQ_INIT(&pf->cfe_head); - - cfe = malloc(sizeof(*cfe), M_DEVBUF, M_NOWAIT); - *cfe = *pccard_cis_quirks[i].cfe; - - STAILQ_INSERT_TAIL(&pf->cfe_head, cfe, cfe_list); - STAILQ_INSERT_TAIL(&sc->card.pf_head, pf, pf_list); - - pf_last = pccard_cis_quirks[i].pf; - } + if (pf_last == q->pf) { + cfe = malloc(sizeof(*cfe), M_DEVBUF, M_NOWAIT); + *cfe = *q->cfe; + STAILQ_INSERT_TAIL(&pf->cfe_head, cfe, cfe_list); + } else { + pf = malloc(sizeof(*pf), M_DEVBUF, M_NOWAIT); + *pf = *q->pf; + STAILQ_INIT(&pf->cfe_head); + cfe = malloc(sizeof(*cfe), M_DEVBUF, M_NOWAIT); + *cfe = *q->cfe; + STAILQ_INSERT_TAIL(&pf->cfe_head, cfe, cfe_list); + STAILQ_INSERT_TAIL(&sc->card.pf_head, pf, pf_list); + pf_last = q->pf; } } } ==== //depot/projects/netperf/sys/dev/pccard/pccardvar.h#4 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: pcmciavar.h,v 1.12 2000/02/08 12:51:31 enami Exp $ */ -/* $FreeBSD: src/sys/dev/pccard/pccardvar.h,v 1.43 2003/09/20 17:46:39 imp Exp $ */ +/* $FreeBSD: src/sys/dev/pccard/pccardvar.h,v 1.44 2003/10/06 07:17:20 imp Exp $ */ /* * Copyright (c) 1997 Marc Horowitz. All rights reserved. @@ -203,9 +203,6 @@ int sc_enabled_count; /* num functions enabled */ }; -void -pccardbus_if_setup(struct pccard_softc*); - struct pccard_cis_quirk { int32_t manufacturer; int32_t product; @@ -286,7 +283,8 @@ #define PCCARD_SPACE_MEMORY 1 #define PCCARD_SPACE_IO 2 -#define pccard_mfc(sc) (STAILQ_FIRST(&(sc)->card.pf_head) && \ +#define pccard_mfc(sc) \ + (STAILQ_FIRST(&(sc)->card.pf_head) && \ STAILQ_NEXT(STAILQ_FIRST(&(sc)->card.pf_head),pf_list)) #define pccard_io_alloc(pf, start, size, align, pciop) \ ==== //depot/projects/netperf/sys/dev/usb/if_aue.c#4 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/if_aue.c,v 1.72 2003/09/18 15:41:06 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/if_aue.c,v 1.73 2003/10/04 21:41:01 joe Exp $"); /* * ADMtek AN986 Pegasus and AN8511 Pegasus II USB to ethernet driver. @@ -63,7 +63,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/if_aue.c,v 1.72 2003/09/18 15:41:06 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/if_aue.c,v 1.73 2003/10/04 21:41:01 joe Exp $"); #include #include @@ -83,6 +83,9 @@ #include #include +#if __FreeBSD_version < 500000 +#include +#endif #include #include @@ -558,7 +561,12 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Oct 6 13:37:04 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5607916A4C0; Mon, 6 Oct 2003 13:37:04 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 18B7D16A4B3 for ; Mon, 6 Oct 2003 13:37:04 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2075C43FFB for ; Mon, 6 Oct 2003 13:37:03 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h96Kb2XJ065827 for ; Mon, 6 Oct 2003 13:37:02 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h96Kb2dW065824 for perforce@freebsd.org; Mon, 6 Oct 2003 13:37:02 -0700 (PDT) (envelope-from areisse@nailabs.com) Date: Mon, 6 Oct 2003 13:37:02 -0700 (PDT) Message-Id: <200310062037.h96Kb2dW065824@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 39272 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2003 20:37:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=39272 Change 39272 by areisse@areisse_an on 2003/10/06 13:36:29 Add sebsd policy to default bootloader configuration. Affected files ... .. //depot/projects/trustedbsd/sebsd/sys/boot/forth/loader.conf#5 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/sys/boot/forth/loader.conf#5 (text+ko) ==== @@ -329,7 +329,11 @@ mac_none_load="NO" # Null MAC policy mac_partition_load="NO" # Partition MAC policy mac_seeotheruids_load="NO" # UID visbility MAC policy + sebsd_load="NO" # Security-Enhanced BSD module +sebsdpolicy_load="NO" +sebsdpolicy_type="sebsd_policy" +sebsdpolicy_name="/etc/security/sebsd/policy.16" ############################################################## ### Module loading syntax example ########################## From owner-p4-projects@FreeBSD.ORG Mon Oct 6 13:58:33 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C077816A4C1; Mon, 6 Oct 2003 13:58:32 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96A5A16A4B3 for ; Mon, 6 Oct 2003 13:58:32 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFA3E43FA3 for ; Mon, 6 Oct 2003 13:58:29 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h96KwTXJ066767 for ; Mon, 6 Oct 2003 13:58:29 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h96KwTi0066764 for perforce@freebsd.org; Mon, 6 Oct 2003 13:58:29 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Mon, 6 Oct 2003 13:58:29 -0700 (PDT) Message-Id: <200310062058.h96KwTi0066764@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39273 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2003 20:58:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=39273 Change 39273 by sam@sam_ebb on 2003/10/06 13:58:23 add simple locking Affected files ... .. //depot/projects/netperf/sys/dev/bge/if_bge.c#10 edit .. //depot/projects/netperf/sys/dev/bge/if_bgereg.h#5 edit Differences ... ==== //depot/projects/netperf/sys/dev/bge/if_bge.c#10 (text+ko) ==== @@ -184,6 +184,7 @@ static void bge_txeof (struct bge_softc *); static void bge_rxeof (struct bge_softc *); +static void bge_tick_locked (struct bge_softc *); static void bge_tick (void *); static void bge_stats_update (struct bge_softc *); static void bge_stats_update_regs @@ -192,8 +193,10 @@ u_int32_t *); static void bge_intr (void *); +static void bge_start_locked (struct ifnet *); static void bge_start (struct ifnet *); static int bge_ioctl (struct ifnet *, u_long, caddr_t); +static void bge_init_locked (struct bge_softc *); static void bge_init (void *); static void bge_stop (struct bge_softc *); static void bge_watchdog (struct ifnet *); @@ -1154,6 +1157,8 @@ u_int32_t hashes[4] = { 0, 0, 0, 0 }; int h, i; + BGE_LOCK_ASSERT(sc); + ifp = &sc->arpcom.ac_if; if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { @@ -2225,15 +2230,12 @@ bge_attach(dev) device_t dev; { - int s; struct ifnet *ifp; struct bge_softc *sc; u_int32_t hwcfg = 0; u_int32_t mac_addr = 0; int unit, error = 0, rid; - s = splimp(); - sc = device_get_softc(dev); unit = device_get_unit(dev); sc->bge_dev = dev; @@ -2270,16 +2272,9 @@ goto fail; } - error = bus_setup_intr(dev, sc->bge_irq, INTR_TYPE_NET, - bge_intr, sc, &sc->bge_intrhand); + sc->bge_unit = unit; - if (error) { - bge_release_resources(sc); - printf("bge%d: couldn't set up irq\n", unit); - goto fail; - } - - sc->bge_unit = unit; + BGE_LOCK_INIT(sc, device_get_nameunit(dev)); /* Try to reset the chip. */ bge_reset(sc); @@ -2449,11 +2444,20 @@ * Call MI attach routine. */ ether_ifattach(ifp, sc->arpcom.ac_enaddr); - callout_handle_init(&sc->bge_stat_ch); + callout_init(&sc->bge_stat_ch, CALLOUT_MPSAFE); + + /* + * Hookup IRQ last. + */ + error = bus_setup_intr(dev, sc->bge_irq, INTR_TYPE_NET | INTR_MPSAFE, + bge_intr, sc, &sc->bge_intrhand); + + if (error) { + bge_release_resources(sc); + printf("bge%d: couldn't set up irq\n", unit); + } fail: - splx(s); - return(error); } @@ -2463,16 +2467,16 @@ { struct bge_softc *sc; struct ifnet *ifp; - int s; - - s = splimp(); sc = device_get_softc(dev); ifp = &sc->arpcom.ac_if; - ether_ifdetach(ifp); + BGE_LOCK(sc); bge_stop(sc); bge_reset(sc); + BGE_UNLOCK(sc); + + ether_ifdetach(ifp); if (sc->bge_tbi) { ifmedia_removeall(&sc->bge_ifmedia); @@ -2485,8 +2489,6 @@ if (sc->bge_asicrev != BGE_ASICREV_BCM5705) bge_free_jumbo_mem(sc); - splx(s); - return(0); } @@ -2516,6 +2518,9 @@ bge_dma_free(sc); + if (mtx_initialized(&sc->bge_mtx)) /* XXX */ + BGE_LOCK_DESTROY(sc); + return; } @@ -2620,6 +2625,8 @@ struct ifnet *ifp; int stdcnt = 0, jumbocnt = 0; + BGE_LOCK_ASSERT(sc); + ifp = &sc->arpcom.ac_if; bus_dmamap_sync(sc->bge_cdata.bge_rx_return_ring_tag, @@ -2732,7 +2739,9 @@ if (have_tag) VLAN_INPUT_TAG(ifp, m, vlan_tag, continue); + BGE_UNLOCK(sc); (*ifp->if_input)(ifp, m); + BGE_LOCK(sc); } bus_dmamap_sync(sc->bge_cdata.bge_rx_return_ring_tag, @@ -2762,6 +2771,8 @@ struct bge_tx_bd *cur_tx = NULL; struct ifnet *ifp; + BGE_LOCK_ASSERT(sc); + ifp = &sc->arpcom.ac_if; /* @@ -2805,6 +2816,8 @@ sc = xsc; ifp = &sc->arpcom.ac_if; + BGE_LOCK(sc); + bus_dmamap_sync(sc->bge_cdata.bge_status_tag, sc->bge_cdata.bge_status_map, BUS_DMASYNC_POSTWRITE); @@ -2837,8 +2850,8 @@ status = CSR_READ_4(sc, BGE_MAC_STS); if (status & BGE_MACSTAT_MI_INTERRUPT) { sc->bge_link = 0; - untimeout(bge_tick, sc, sc->bge_stat_ch); - bge_tick(sc); + callout_stop(&sc->bge_stat_ch); + bge_tick_locked(sc); /* Clear the interrupt */ CSR_WRITE_4(sc, BGE_MAC_EVT_ENB, BGE_EVTENB_MI_INTERRUPT); @@ -2864,8 +2877,8 @@ if (!(status & (BGE_MACSTAT_PORT_DECODE_ERROR| BGE_MACSTAT_MI_COMPLETE))) { sc->bge_link = 0; - untimeout(bge_tick, sc, sc->bge_stat_ch); - bge_tick(sc); + callout_stop(&sc->bge_stat_ch); + bge_tick_locked(sc); } /* Clear the interrupt */ CSR_WRITE_4(sc, BGE_MAC_STS, BGE_MACSTAT_SYNC_CHANGED| @@ -2894,35 +2907,32 @@ CSR_WRITE_4(sc, BGE_MBX_IRQ0_LO, 0); if (ifp->if_flags & IFF_RUNNING && ifp->if_snd.ifq_head != NULL) - bge_start(ifp); + bge_start_locked(ifp); + + BGE_UNLOCK(sc); return; } static void -bge_tick(xsc) - void *xsc; +bge_tick_locked(sc) + struct bge_softc *sc; { - struct bge_softc *sc; struct mii_data *mii = NULL; struct ifmedia *ifm = NULL; struct ifnet *ifp; - int s; - sc = xsc; ifp = &sc->arpcom.ac_if; - s = splimp(); + BGE_LOCK_ASSERT(sc); if (sc->bge_asicrev == BGE_ASICREV_BCM5705) bge_stats_update_regs(sc); else bge_stats_update(sc); - sc->bge_stat_ch = timeout(bge_tick, sc, hz); - if (sc->bge_link) { - splx(s); + callout_reset(&sc->bge_stat_ch, hz, bge_tick, sc); + if (sc->bge_link) return; - } if (sc->bge_tbi) { ifm = &sc->bge_ifmedia; @@ -2932,9 +2942,8 @@ CSR_WRITE_4(sc, BGE_MAC_STS, 0xFFFFFFFF); printf("bge%d: gigabit link up\n", sc->bge_unit); if (ifp->if_snd.ifq_head != NULL) - bge_start(ifp); + bge_start_locked(ifp); } - splx(s); return; } @@ -2949,12 +2958,23 @@ printf("bge%d: gigabit link up\n", sc->bge_unit); if (ifp->if_snd.ifq_head != NULL) - bge_start(ifp); + bge_start_locked(ifp); } - splx(s); + return; +} + +static void +bge_tick(xsc) + void *xsc; +{ + struct bge_softc *sc; + + sc = xsc; - return; + BGE_LOCK(sc); + bge_tick_locked(sc); + BGE_UNLOCK(sc); } static void @@ -3093,7 +3113,7 @@ * to the mbuf data regions directly in the transmit descriptors. */ static void -bge_start(ifp) +bge_start_locked(ifp) struct ifnet *ifp; { struct bge_softc *sc; @@ -3162,23 +3182,35 @@ return; } +/* + * Main transmit routine. To avoid having to do mbuf copies, we put pointers + * to the mbuf data regions directly in the transmit descriptors. + */ static void -bge_init(xsc) - void *xsc; +bge_start(ifp) + struct ifnet *ifp; +{ + struct bge_softc *sc; + + sc = ifp->if_softc; + BGE_LOCK(sc); + bge_start_locked(ifp); + BGE_UNLOCK(sc); +} + +static void +bge_init_locked(sc) + struct bge_softc *sc; { - struct bge_softc *sc = xsc; struct ifnet *ifp; u_int16_t *m; - int s; - s = splimp(); + BGE_LOCK_ASSERT(sc); ifp = &sc->arpcom.ac_if; - if (ifp->if_flags & IFF_RUNNING) { - splx(s); + if (ifp->if_flags & IFF_RUNNING) return; - } /* Cancel pending I/O and flush buffers. */ bge_stop(sc); @@ -3191,7 +3223,6 @@ */ if (bge_blockinit(sc)) { printf("bge%d: initialization failure\n", sc->bge_unit); - splx(s); return; } @@ -3266,9 +3297,20 @@ ifp->if_flags |= IFF_RUNNING; ifp->if_flags &= ~IFF_OACTIVE; - splx(s); + callout_reset(&sc->bge_stat_ch, hz, bge_tick, sc); + + return; +} + +static void +bge_init(xsc) + void *xsc; +{ + struct bge_softc *sc = xsc; - sc->bge_stat_ch = timeout(bge_tick, sc, hz); + BGE_LOCK(sc); + bge_init_locked(sc); + BGE_UNLOCK(sc); return; } @@ -3365,11 +3407,9 @@ { struct bge_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; - int s, mask, error = 0; + int mask, error = 0; struct mii_data *mii; - s = splimp(); - switch(command) { case SIOCSIFMTU: /* Disallow jumbo frames on 5705. */ @@ -3383,6 +3423,7 @@ } break; case SIOCSIFFLAGS: + BGE_LOCK(sc); if (ifp->if_flags & IFF_UP) { /* * If only the state of the PROMISC flag changed, @@ -3403,19 +3444,22 @@ BGE_CLRBIT(sc, BGE_RX_MODE, BGE_RXMODE_RX_PROMISC); } else - bge_init(sc); + bge_init_locked(sc); } else { if (ifp->if_flags & IFF_RUNNING) { bge_stop(sc); } } sc->bge_if_flags = ifp->if_flags; + BGE_UNLOCK(sc); error = 0; break; case SIOCADDMULTI: case SIOCDELMULTI: if (ifp->if_flags & IFF_RUNNING) { + BGE_LOCK(sc); bge_setmulti(sc); + BGE_UNLOCK(sc); error = 0; } break; @@ -3445,8 +3489,6 @@ break; } - (void)splx(s); - return(error); } @@ -3481,12 +3523,14 @@ struct mii_data *mii = NULL; int mtmp, itmp; + BGE_LOCK_ASSERT(sc); + ifp = &sc->arpcom.ac_if; if (!sc->bge_tbi) mii = device_get_softc(sc->bge_miibus); - untimeout(bge_tick, sc, sc->bge_stat_ch); + callout_stop(&sc->bge_stat_ch); /* * Disable all of the receiver blocks @@ -3583,8 +3627,10 @@ sc = device_get_softc(dev); + BGE_LOCK(sc); bge_stop(sc); bge_reset(sc); + BGE_UNLOCK(sc); return; } ==== //depot/projects/netperf/sys/dev/bge/if_bgereg.h#5 (text+ko) ==== @@ -2258,6 +2258,7 @@ struct bge_softc { struct arpcom arpcom; /* interface info */ device_t bge_dev; + struct mtx bge_mtx; device_t bge_miibus; bus_space_handle_t bge_bhandle; vm_offset_t bge_vhandle; @@ -2293,7 +2294,14 @@ int bge_if_flags; int bge_txcnt; int bge_link; - struct callout_handle bge_stat_ch; + struct callout bge_stat_ch; char *bge_vpd_prodname; char *bge_vpd_readonly; }; + +#define BGE_LOCK_INIT(_sc, _name) \ + mtx_init(&(_sc)->bge_mtx, _name, MTX_NETWORK_LOCK, MTX_DEF) +#define BGE_LOCK(_sc) mtx_lock(&(_sc)->bge_mtx) +#define BGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->bge_mtx, MA_OWNED) +#define BGE_UNLOCK(_sc) mtx_unlock(&(_sc)->bge_mtx) +#define BGE_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->bge_mtx) From owner-p4-projects@FreeBSD.ORG Mon Oct 6 15:17:06 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 13C8916A4C0; Mon, 6 Oct 2003 15:17:06 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E03B116A4B3 for ; Mon, 6 Oct 2003 15:17:05 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6854F43F3F for ; Mon, 6 Oct 2003 15:17:05 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h96MH5XJ071608 for ; Mon, 6 Oct 2003 15:17:05 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h96MH4JY071605 for perforce@freebsd.org; Mon, 6 Oct 2003 15:17:04 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Mon, 6 Oct 2003 15:17:04 -0700 (PDT) Message-Id: <200310062217.h96MH4JY071605@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39275 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2003 22:17:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=39275 Change 39275 by sam@sam_ebb on 2003/10/06 15:16:29 can't assert Giant is not owned--with net.isr.enable set to 1 there are paths that bring us in to ip_input with Giant held (e.g. through the loopback interface) Affected files ... .. //depot/projects/netperf/sys/netinet/ip_divert.c#5 edit .. //depot/projects/netperf/sys/netinet/ip_input.c#9 edit .. //depot/projects/netperf/sys/netinet/ip_mroute.c#12 edit Differences ... ==== //depot/projects/netperf/sys/netinet/ip_divert.c#5 (text+ko) ==== @@ -158,8 +158,6 @@ u_int16_t nport; struct sockaddr_in divsrc; - mtx_assert(&Giant, MA_NOTOWNED); - /* Sanity check */ KASSERT(port != 0, ("%s: port=0", __func__)); ==== //depot/projects/netperf/sys/netinet/ip_input.c#9 (text+ko) ==== @@ -367,8 +367,6 @@ int s, error; #endif /* FAST_IPSEC */ - mtx_assert(&Giant, MA_NOTOWNED); - args.eh = NULL; args.oif = NULL; args.rule = NULL; ==== //depot/projects/netperf/sys/netinet/ip_mroute.c#12 (text+ko) ==== @@ -1312,8 +1312,6 @@ int error; vifi_t vifi; - mtx_assert(&Giant, MA_NOTOWNED); - if (mrtdebug & DEBUG_FORWARD) log(LOG_DEBUG, "ip_mforward: src %lx, dst %lx, ifp %p\n", (u_long)ntohl(ip->ip_src.s_addr), (u_long)ntohl(ip->ip_dst.s_addr), From owner-p4-projects@FreeBSD.ORG Mon Oct 6 17:13:30 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DA7C716A4C1; Mon, 6 Oct 2003 17:13:29 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFEE816A4BF for ; Mon, 6 Oct 2003 17:13:29 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F93443FBD for ; Mon, 6 Oct 2003 17:13:27 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h970DRXJ083433 for ; Mon, 6 Oct 2003 17:13:27 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h970DQ2u083430 for perforce@freebsd.org; Mon, 6 Oct 2003 17:13:26 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Date: Mon, 6 Oct 2003 17:13:26 -0700 (PDT) Message-Id: <200310070013.h970DQ2u083430@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to Hrishikesh_Dandekar@NAI.com using -f From: Hrishikesh Dandekar To: Perforce Change Reviews Subject: PERFORCE change 39277 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2003 00:13:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=39277 Change 39277 by hdandeka@hdandeka_yash on 2003/10/06 17:12:31 Add the message queue label as an additional parameter to the mac_create_ipc_msgmsg hook. This label is used along with the label of the requesting thread by the SEBSD module to calculate the label of the new ipc message object. All the other MAC policies disregard this label. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#411 edit .. //depot/projects/trustedbsd/mac/sys/kern/sysv_msg.c#13 edit .. //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#222 edit .. //depot/projects/trustedbsd/mac/sys/security/mac_lomac/mac_lomac.c#69 edit .. //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#180 edit .. //depot/projects/trustedbsd/mac/sys/security/mac_stub/mac_stub.c#8 edit .. //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#114 edit .. //depot/projects/trustedbsd/mac/sys/sys/mac.h#247 edit .. //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#199 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/kern_mac.c#411 (text+ko) ==== @@ -2372,10 +2372,12 @@ } void -mac_create_ipc_msgmsg(struct ucred *cred, struct msg *msgptr) +mac_create_ipc_msgmsg(struct ucred *cred, struct msqid_kernel *msqkptr, + struct msg *msgptr) { - MAC_PERFORM(create_ipc_msgmsg, cred, msgptr, &msgptr->label); + MAC_PERFORM(create_ipc_msgmsg, cred, msqkptr, &msqkptr->label, + msgptr, &msgptr->label); } void ==== //depot/projects/trustedbsd/mac/sys/kern/sysv_msg.c#13 (text+ko) ==== @@ -890,7 +890,7 @@ msghdr->msg_spot = -1; msghdr->msg_ts = msgsz; #ifdef MAC - mac_create_ipc_msgmsg(td->td_ucred,msghdr); + mac_create_ipc_msgmsg(td->td_ucred, msqkptr, msghdr); /* * XXX: Should the mac_check_ipc_msgmsq check follow here immediately ? * Or, should it be checked just before the msg is enqueued in the msgq ==== //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#222 (text+ko) ==== @@ -1172,11 +1172,12 @@ */ static void -mac_biba_create_ipc_msgmsg(struct ucred *cred, struct msg *msgptr, - struct label *msglabel) +mac_biba_create_ipc_msgmsg(struct ucred *cred, struct msqid_kernel *msqkptr, + struct label *msqlabel, struct msg *msgptr, struct label *msglabel) { struct mac_biba *source, *dest; + /* Ignore the msgq label */ source = SLOT(&cred->cr_label); dest = SLOT(msglabel); ==== //depot/projects/trustedbsd/mac/sys/security/mac_lomac/mac_lomac.c#69 (text+ko) ==== @@ -1244,11 +1244,12 @@ * Labeling event operations: System V IPC objects. */ static void -mac_lomac_create_ipc_msgmsg(struct ucred *cred, struct msg *msgptr, - struct label *msglabel) +mac_lomac_create_ipc_msgmsg(struct ucred *cred, struct msqid_kernel *msqkptr, + struct label *msqlabel, struct msg *msgptr, struct label *msglabel) { struct mac_lomac *source, *dest; + /* Ignore the msgq label */ source = SLOT(&cred->cr_label); dest = SLOT(msglabel); ==== //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#180 (text+ko) ==== @@ -1140,11 +1140,12 @@ */ static void -mac_mls_create_ipc_msgmsg(struct ucred *cred, struct msg *msgptr, - struct label *msglabel) +mac_mls_create_ipc_msgmsg(struct ucred *cred, struct msqid_kernel *msqkptr, + struct label *msqlabel, struct msg *msgptr, struct label *msglabel) { struct mac_mls *source, *dest; + /* Ignore the msgq label */ source = SLOT(&cred->cr_label); dest = SLOT(msglabel); ==== //depot/projects/trustedbsd/mac/sys/security/mac_stub/mac_stub.c#8 (text+ko) ==== @@ -344,8 +344,8 @@ } static void -stub_create_ipc_msgmsg(struct ucred *cred, struct msg *msgptr, - struct label *msglabel) +stub_create_ipc_msgmsg(struct ucred *cred, struct msqid_kernel *msqkptr, + struct label *msqlabel, struct msg *msgptr, struct label *msglabel) { } ==== //depot/projects/trustedbsd/mac/sys/security/mac_test/mac_test.c#114 (text+ko) ==== @@ -988,11 +988,12 @@ } static void -mac_test_create_ipc_msgmsg(struct ucred *cred, struct msg *msgptr, - struct label *msglabel) +mac_test_create_ipc_msgmsg(struct ucred *cred, struct msqid_kernel *msqkptr, + struct label *msqlabel, struct msg *msgptr, struct label *msglabel) { ASSERT_SYSVIPCMSG_LABEL(msglabel); + ASSERT_SYSVIPCMSQ_LABEL(msqlabel); } static void ==== //depot/projects/trustedbsd/mac/sys/sys/mac.h#247 (text+ko) ==== @@ -214,7 +214,8 @@ /* * Labeling event operations: System V IPC primitives */ -void mac_create_ipc_msgmsg(struct ucred *cred, struct msg *msgptr); +void mac_create_ipc_msgmsg(struct ucred *cred, struct msqid_kernel *msqkptr, + struct msg *msgptr); void mac_create_ipc_msgqueue(struct ucred *cred, struct msqid_kernel *msqkptr); void mac_create_ipc_sema(struct ucred *cred, ==== //depot/projects/trustedbsd/mac/sys/sys/mac_policy.h#199 (text+ko) ==== @@ -217,7 +217,10 @@ /* * Labeling event operations: System V IPC primitives */ - void (*mpo_create_ipc_msgmsg)(struct ucred *cred, struct msg *msgptr, + void (*mpo_create_ipc_msgmsg)(struct ucred *cred, + struct msqid_kernel *msqkptr, + struct label *msqlabel, + struct msg *msgptr, struct label *msglabel); void (*mpo_create_ipc_msgqueue)(struct ucred *cred, struct msqid_kernel *msqkptr, struct label *msqlabel); From owner-p4-projects@FreeBSD.ORG Mon Oct 6 17:26:31 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 25E3716A4C1; Mon, 6 Oct 2003 17:26:31 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE05216A4B3 for ; Mon, 6 Oct 2003 17:26:30 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4578343FDF for ; Mon, 6 Oct 2003 17:26:24 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h970QOXJ084022 for ; Mon, 6 Oct 2003 17:26:24 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h970QNtJ084014 for perforce@freebsd.org; Mon, 6 Oct 2003 17:26:23 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Mon, 6 Oct 2003 17:26:23 -0700 (PDT) Message-Id: <200310070026.h970QNtJ084014@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 39278 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2003 00:26:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=39278 Change 39278 by marcel@marcel_nfs on 2003/10/06 17:25:40 New branch: vm (IFC @39276) This branch is for various VM related projects. I plan to use it for the revamp of phys_avail and the removal of vm_page_array. Both with the intend to improve the sparse physical memory on ia64 and generally remove the inherent i386isms. Affected files ... .. //depot/projects/vm/Makefile#1 branch .. //depot/projects/vm/alpha/Makefile#1 branch .. //depot/projects/vm/alpha/alpha/alpha-gdbstub.c#1 branch .. //depot/projects/vm/alpha/alpha/api_up1000.c#1 branch .. //depot/projects/vm/alpha/alpha/atomic.s#1 branch .. //depot/projects/vm/alpha/alpha/autoconf.c#1 branch .. //depot/projects/vm/alpha/alpha/busdma_machdep.c#1 branch .. //depot/projects/vm/alpha/alpha/busspace.c#1 branch .. //depot/projects/vm/alpha/alpha/clock.c#1 branch .. //depot/projects/vm/alpha/alpha/clock_if.m#1 branch .. //depot/projects/vm/alpha/alpha/cpuconf.c#1 branch .. //depot/projects/vm/alpha/alpha/critical.c#1 branch .. //depot/projects/vm/alpha/alpha/db_disasm.c#1 branch .. //depot/projects/vm/alpha/alpha/db_instruction.h#1 branch .. //depot/projects/vm/alpha/alpha/db_interface.c#1 branch .. //depot/projects/vm/alpha/alpha/db_trace.c#1 branch .. //depot/projects/vm/alpha/alpha/dec_1000a.c#1 branch .. //depot/projects/vm/alpha/alpha/dec_2100_a50.c#1 branch .. //depot/projects/vm/alpha/alpha/dec_2100_a500.c#1 branch .. //depot/projects/vm/alpha/alpha/dec_3000_300.c#1 branch .. //depot/projects/vm/alpha/alpha/dec_3000_500.c#1 branch .. //depot/projects/vm/alpha/alpha/dec_axppci_33.c#1 branch .. //depot/projects/vm/alpha/alpha/dec_eb164.c#1 branch .. //depot/projects/vm/alpha/alpha/dec_eb64plus.c#1 branch .. //depot/projects/vm/alpha/alpha/dec_kn20aa.c#1 branch .. //depot/projects/vm/alpha/alpha/dec_kn300.c#1 branch .. //depot/projects/vm/alpha/alpha/dec_kn8ae.c#1 branch .. //depot/projects/vm/alpha/alpha/dec_st550.c#1 branch .. //depot/projects/vm/alpha/alpha/dec_st6600.c#1 branch .. //depot/projects/vm/alpha/alpha/divrem.m4#1 branch .. //depot/projects/vm/alpha/alpha/dump_machdep.c#1 branch .. //depot/projects/vm/alpha/alpha/elf_machdep.c#1 branch .. //depot/projects/vm/alpha/alpha/exception.s#1 branch .. //depot/projects/vm/alpha/alpha/fp_emulate.c#1 branch .. //depot/projects/vm/alpha/alpha/genassym.c#1 branch .. //depot/projects/vm/alpha/alpha/ieee_float.c#1 branch .. //depot/projects/vm/alpha/alpha/ieee_float.h#1 branch .. //depot/projects/vm/alpha/alpha/in_cksum.c#1 branch .. //depot/projects/vm/alpha/alpha/interrupt.c#1 branch .. //depot/projects/vm/alpha/alpha/locore.s#1 branch .. //depot/projects/vm/alpha/alpha/machdep.c#1 branch .. //depot/projects/vm/alpha/alpha/mem.c#1 branch .. //depot/projects/vm/alpha/alpha/mp_machdep.c#1 branch .. //depot/projects/vm/alpha/alpha/pal.s#1 branch .. //depot/projects/vm/alpha/alpha/pmap.c#1 branch .. //depot/projects/vm/alpha/alpha/prom.c#1 branch .. //depot/projects/vm/alpha/alpha/prom_disp.s#1 branch .. //depot/projects/vm/alpha/alpha/promcons.c#1 branch .. //depot/projects/vm/alpha/alpha/sgmap.c#1 branch .. //depot/projects/vm/alpha/alpha/support.s#1 branch .. //depot/projects/vm/alpha/alpha/swtch.s#1 branch .. //depot/projects/vm/alpha/alpha/sys_machdep.c#1 branch .. //depot/projects/vm/alpha/alpha/timerreg.h#1 branch .. //depot/projects/vm/alpha/alpha/trap.c#1 branch .. //depot/projects/vm/alpha/alpha/vm_machdep.c#1 branch .. //depot/projects/vm/alpha/compile/.cvsignore#1 branch .. //depot/projects/vm/alpha/conf/GENERIC#1 branch .. //depot/projects/vm/alpha/conf/GENERIC.hints#1 branch .. //depot/projects/vm/alpha/conf/Makefile#1 branch .. //depot/projects/vm/alpha/conf/NOTES#1 branch .. //depot/projects/vm/alpha/conf/gethints.awk#1 branch .. //depot/projects/vm/alpha/include/_inttypes.h#1 branch .. //depot/projects/vm/alpha/include/_limits.h#1 branch .. //depot/projects/vm/alpha/include/_stdint.h#1 branch .. //depot/projects/vm/alpha/include/_types.h#1 branch .. //depot/projects/vm/alpha/include/alpha_cpu.h#1 branch .. //depot/projects/vm/alpha/include/asm.h#1 branch .. //depot/projects/vm/alpha/include/atomic.h#1 branch .. //depot/projects/vm/alpha/include/bootinfo.h#1 branch .. //depot/projects/vm/alpha/include/bus.h#1 branch .. //depot/projects/vm/alpha/include/bus_memio.h#1 branch .. //depot/projects/vm/alpha/include/bus_pio.h#1 branch .. //depot/projects/vm/alpha/include/bwx.h#1 branch .. //depot/projects/vm/alpha/include/chipset.h#1 branch .. //depot/projects/vm/alpha/include/clock.h#1 branch .. //depot/projects/vm/alpha/include/clockvar.h#1 branch .. //depot/projects/vm/alpha/include/cpu.h#1 branch .. //depot/projects/vm/alpha/include/cpuconf.h#1 branch .. //depot/projects/vm/alpha/include/cpufunc.h#1 branch .. //depot/projects/vm/alpha/include/critical.h#1 branch .. //depot/projects/vm/alpha/include/db_machdep.h#1 branch .. //depot/projects/vm/alpha/include/elf.h#1 branch .. //depot/projects/vm/alpha/include/endian.h#1 branch .. //depot/projects/vm/alpha/include/exec.h#1 branch .. //depot/projects/vm/alpha/include/float.h#1 branch .. //depot/projects/vm/alpha/include/floatingpoint.h#1 branch .. //depot/projects/vm/alpha/include/fpu.h#1 branch .. //depot/projects/vm/alpha/include/frame.h#1 branch .. //depot/projects/vm/alpha/include/ieee.h#1 branch .. //depot/projects/vm/alpha/include/ieeefp.h#1 branch .. //depot/projects/vm/alpha/include/in_cksum.h#1 branch .. //depot/projects/vm/alpha/include/inst.h#1 branch .. //depot/projects/vm/alpha/include/intr.h#1 branch .. //depot/projects/vm/alpha/include/intrcnt.h#1 branch .. //depot/projects/vm/alpha/include/ioctl_bt848.h#1 branch .. //depot/projects/vm/alpha/include/ioctl_meteor.h#1 branch .. //depot/projects/vm/alpha/include/kse.h#1 branch .. //depot/projects/vm/alpha/include/limits.h#1 branch .. //depot/projects/vm/alpha/include/md_var.h#1 branch .. //depot/projects/vm/alpha/include/mutex.h#1 branch .. //depot/projects/vm/alpha/include/pal.h#1 branch .. //depot/projects/vm/alpha/include/param.h#1 branch .. //depot/projects/vm/alpha/include/pc/bios.h#1 branch .. //depot/projects/vm/alpha/include/pc/display.h#1 branch .. //depot/projects/vm/alpha/include/pc/msdos.h#1 branch .. //depot/projects/vm/alpha/include/pc/vesa.h#1 branch .. //depot/projects/vm/alpha/include/pcb.h#1 branch .. //depot/projects/vm/alpha/include/pcpu.h#1 branch .. //depot/projects/vm/alpha/include/pmap.h#1 branch .. //depot/projects/vm/alpha/include/proc.h#1 branch .. //depot/projects/vm/alpha/include/profile.h#1 branch .. //depot/projects/vm/alpha/include/prom.h#1 branch .. //depot/projects/vm/alpha/include/pte.h#1 branch .. //depot/projects/vm/alpha/include/ptrace.h#1 branch .. //depot/projects/vm/alpha/include/reg.h#1 branch .. //depot/projects/vm/alpha/include/reloc.h#1 branch .. //depot/projects/vm/alpha/include/resource.h#1 branch .. //depot/projects/vm/alpha/include/rpb.h#1 branch .. //depot/projects/vm/alpha/include/runq.h#1 branch .. //depot/projects/vm/alpha/include/setjmp.h#1 branch .. //depot/projects/vm/alpha/include/sgmap.h#1 branch .. //depot/projects/vm/alpha/include/sigframe.h#1 branch .. //depot/projects/vm/alpha/include/signal.h#1 branch .. //depot/projects/vm/alpha/include/smp.h#1 branch .. //depot/projects/vm/alpha/include/stdarg.h#1 branch .. //depot/projects/vm/alpha/include/swiz.h#1 branch .. //depot/projects/vm/alpha/include/sysarch.h#1 branch .. //depot/projects/vm/alpha/include/ucontext.h#1 branch .. //depot/projects/vm/alpha/include/varargs.h#1 branch .. //depot/projects/vm/alpha/include/vmparam.h#1 branch .. //depot/projects/vm/alpha/isa/isa.c#1 branch .. //depot/projects/vm/alpha/isa/isa_dma.c#1 branch .. //depot/projects/vm/alpha/isa/isavar.h#1 branch .. //depot/projects/vm/alpha/isa/mcclock_isa.c#1 branch .. //depot/projects/vm/alpha/linux/Makefile#1 branch .. //depot/projects/vm/alpha/linux/linux.h#1 branch .. //depot/projects/vm/alpha/linux/linux_dummy.c#1 branch .. //depot/projects/vm/alpha/linux/linux_genassym.c#1 branch .. //depot/projects/vm/alpha/linux/linux_ipc64.h#1 branch .. //depot/projects/vm/alpha/linux/linux_locore.s#1 branch .. //depot/projects/vm/alpha/linux/linux_machdep.c#1 branch .. //depot/projects/vm/alpha/linux/linux_proto.h#1 branch .. //depot/projects/vm/alpha/linux/linux_syscall.h#1 branch .. //depot/projects/vm/alpha/linux/linux_sysent.c#1 branch .. //depot/projects/vm/alpha/linux/linux_sysvec.c#1 branch .. //depot/projects/vm/alpha/linux/syscalls.conf#1 branch .. //depot/projects/vm/alpha/linux/syscalls.master#1 branch .. //depot/projects/vm/alpha/mcbus/mcbus.c#1 branch .. //depot/projects/vm/alpha/mcbus/mcbusreg.h#1 branch .. //depot/projects/vm/alpha/mcbus/mcbusvar.h#1 branch .. //depot/projects/vm/alpha/mcbus/mcmem.c#1 branch .. //depot/projects/vm/alpha/mcbus/mcpcia.c#1 branch .. //depot/projects/vm/alpha/mcbus/mcpciareg.h#1 branch .. //depot/projects/vm/alpha/mcbus/mcpciavar.h#1 branch .. //depot/projects/vm/alpha/osf1/Makefile#1 branch .. //depot/projects/vm/alpha/osf1/README.mach-traps#1 branch .. //depot/projects/vm/alpha/osf1/exec_ecoff.h#1 branch .. //depot/projects/vm/alpha/osf1/imgact_osf1.c#1 branch .. //depot/projects/vm/alpha/osf1/osf1.h#1 branch .. //depot/projects/vm/alpha/osf1/osf1_ioctl.c#1 branch .. //depot/projects/vm/alpha/osf1/osf1_misc.c#1 branch .. //depot/projects/vm/alpha/osf1/osf1_mount.c#1 branch .. //depot/projects/vm/alpha/osf1/osf1_proto.h#1 branch .. //depot/projects/vm/alpha/osf1/osf1_signal.c#1 branch .. //depot/projects/vm/alpha/osf1/osf1_signal.h#1 branch .. //depot/projects/vm/alpha/osf1/osf1_syscall.h#1 branch .. //depot/projects/vm/alpha/osf1/osf1_sysent.c#1 branch .. //depot/projects/vm/alpha/osf1/osf1_sysvec.c#1 branch .. //depot/projects/vm/alpha/osf1/osf1_util.h#1 branch .. //depot/projects/vm/alpha/osf1/syscalls.conf#1 branch .. //depot/projects/vm/alpha/osf1/syscalls.master#1 branch .. //depot/projects/vm/alpha/pci/alphapci_if.m#1 branch .. //depot/projects/vm/alpha/pci/apecs.c#1 branch .. //depot/projects/vm/alpha/pci/apecs_pci.c#1 branch .. //depot/projects/vm/alpha/pci/apecsreg.h#1 branch .. //depot/projects/vm/alpha/pci/apecsvar.h#1 branch .. //depot/projects/vm/alpha/pci/bwx.c#1 branch .. //depot/projects/vm/alpha/pci/cia.c#1 branch .. //depot/projects/vm/alpha/pci/cia_pci.c#1 branch .. //depot/projects/vm/alpha/pci/ciareg.h#1 branch .. //depot/projects/vm/alpha/pci/ciavar.h#1 branch .. //depot/projects/vm/alpha/pci/irongate.c#1 branch .. //depot/projects/vm/alpha/pci/irongate_pci.c#1 branch .. //depot/projects/vm/alpha/pci/irongatereg.h#1 branch .. //depot/projects/vm/alpha/pci/irongatevar.h#1 branch .. //depot/projects/vm/alpha/pci/lca.c#1 branch .. //depot/projects/vm/alpha/pci/lca_pci.c#1 branch .. //depot/projects/vm/alpha/pci/lcareg.h#1 branch .. //depot/projects/vm/alpha/pci/lcavar.h#1 branch .. //depot/projects/vm/alpha/pci/pci_eb164_intr.s#1 branch .. //depot/projects/vm/alpha/pci/pci_eb64plus_intr.s#1 branch .. //depot/projects/vm/alpha/pci/pcibus.c#1 branch .. //depot/projects/vm/alpha/pci/pcibus.h#1 branch .. //depot/projects/vm/alpha/pci/swiz.c#1 branch .. //depot/projects/vm/alpha/pci/t2.c#1 branch .. //depot/projects/vm/alpha/pci/t2_pci.c#1 branch .. //depot/projects/vm/alpha/pci/t2reg.h#1 branch .. //depot/projects/vm/alpha/pci/t2var.h#1 branch .. //depot/projects/vm/alpha/pci/tsunami.c#1 branch .. //depot/projects/vm/alpha/pci/tsunami_pci.c#1 branch .. //depot/projects/vm/alpha/pci/tsunamireg.h#1 branch .. //depot/projects/vm/alpha/pci/tsunamivar.h#1 branch .. //depot/projects/vm/alpha/tlsb/dwlpx.c#1 branch .. //depot/projects/vm/alpha/tlsb/dwlpxreg.h#1 branch .. //depot/projects/vm/alpha/tlsb/dwlpxvar.h#1 branch .. //depot/projects/vm/alpha/tlsb/gbus.c#1 branch .. //depot/projects/vm/alpha/tlsb/gbusreg.h#1 branch .. //depot/projects/vm/alpha/tlsb/gbusvar.h#1 branch .. //depot/projects/vm/alpha/tlsb/kftxx.c#1 branch .. //depot/projects/vm/alpha/tlsb/kftxxreg.h#1 branch .. //depot/projects/vm/alpha/tlsb/kftxxvar.h#1 branch .. //depot/projects/vm/alpha/tlsb/mcclock_tlsb.c#1 branch .. //depot/projects/vm/alpha/tlsb/tlsb.c#1 branch .. //depot/projects/vm/alpha/tlsb/tlsbcpu.c#1 branch .. //depot/projects/vm/alpha/tlsb/tlsbmem.c#1 branch .. //depot/projects/vm/alpha/tlsb/tlsbreg.h#1 branch .. //depot/projects/vm/alpha/tlsb/tlsbvar.h#1 branch .. //depot/projects/vm/alpha/tlsb/zs_tlsb.c#1 branch .. //depot/projects/vm/alpha/tlsb/zsreg.h#1 branch .. //depot/projects/vm/alpha/tlsb/zsvar.h#1 branch .. //depot/projects/vm/amd64/Makefile#1 branch .. //depot/projects/vm/amd64/acpica/OsdEnvironment.c#1 branch .. //depot/projects/vm/amd64/acpica/acpi_machdep.c#1 branch .. //depot/projects/vm/amd64/acpica/acpi_wakeup.c#1 branch .. //depot/projects/vm/amd64/amd64/amd64-gdbstub.c#1 branch .. //depot/projects/vm/amd64/amd64/amd64_mem.c#1 branch .. //depot/projects/vm/amd64/amd64/atomic.c#1 branch .. //depot/projects/vm/amd64/amd64/autoconf.c#1 branch .. //depot/projects/vm/amd64/amd64/busdma_machdep.c#1 branch .. //depot/projects/vm/amd64/amd64/cpu_switch.S#1 branch .. //depot/projects/vm/amd64/amd64/critical.c#1 branch .. //depot/projects/vm/amd64/amd64/db_disasm.c#1 branch .. //depot/projects/vm/amd64/amd64/db_interface.c#1 branch .. //depot/projects/vm/amd64/amd64/db_trace.c#1 branch .. //depot/projects/vm/amd64/amd64/dump_machdep.c#1 branch .. //depot/projects/vm/amd64/amd64/elf_machdep.c#1 branch .. //depot/projects/vm/amd64/amd64/exception.S#1 branch .. //depot/projects/vm/amd64/amd64/genassym.c#1 branch .. //depot/projects/vm/amd64/amd64/identcpu.c#1 branch .. //depot/projects/vm/amd64/amd64/in_cksum.c#1 branch .. //depot/projects/vm/amd64/amd64/initcpu.c#1 branch .. //depot/projects/vm/amd64/amd64/legacy.c#1 branch .. //depot/projects/vm/amd64/amd64/locore.S#1 branch .. //depot/projects/vm/amd64/amd64/machdep.c#1 branch .. //depot/projects/vm/amd64/amd64/mem.c#1 branch .. //depot/projects/vm/amd64/amd64/nexus.c#1 branch .. //depot/projects/vm/amd64/amd64/pmap.c#1 branch .. //depot/projects/vm/amd64/amd64/sigtramp.S#1 branch .. //depot/projects/vm/amd64/amd64/support.S#1 branch .. //depot/projects/vm/amd64/amd64/sys_machdep.c#1 branch .. //depot/projects/vm/amd64/amd64/trap.c#1 branch .. //depot/projects/vm/amd64/amd64/tsc.c#1 branch .. //depot/projects/vm/amd64/amd64/vm_machdep.c#1 branch .. //depot/projects/vm/amd64/compile/.cvsignore#1 branch .. //depot/projects/vm/amd64/conf/GENERIC#1 branch .. //depot/projects/vm/amd64/conf/GENERIC.hints#1 branch .. //depot/projects/vm/amd64/conf/Makefile#1 branch .. //depot/projects/vm/amd64/conf/gethints.awk#1 branch .. //depot/projects/vm/amd64/ia32/ia32_exception.S#1 branch .. //depot/projects/vm/amd64/ia32/ia32_signal.c#1 branch .. //depot/projects/vm/amd64/ia32/ia32_syscall.c#1 branch .. //depot/projects/vm/amd64/include/_inttypes.h#1 branch .. //depot/projects/vm/amd64/include/_limits.h#1 branch .. //depot/projects/vm/amd64/include/_stdint.h#1 branch .. //depot/projects/vm/amd64/include/_types.h#1 branch .. //depot/projects/vm/amd64/include/acpica_machdep.h#1 branch .. //depot/projects/vm/amd64/include/asm.h#1 branch .. //depot/projects/vm/amd64/include/asmacros.h#1 branch .. //depot/projects/vm/amd64/include/atomic.h#1 branch .. //depot/projects/vm/amd64/include/bus.h#1 branch .. //depot/projects/vm/amd64/include/bus_amd64.h#1 branch .. //depot/projects/vm/amd64/include/bus_dma.h#1 branch .. //depot/projects/vm/amd64/include/bus_memio.h#1 branch .. //depot/projects/vm/amd64/include/bus_pio.h#1 branch .. //depot/projects/vm/amd64/include/clock.h#1 branch .. //depot/projects/vm/amd64/include/cpu.h#1 branch .. //depot/projects/vm/amd64/include/cpufunc.h#1 branch .. //depot/projects/vm/amd64/include/cputypes.h#1 branch .. //depot/projects/vm/amd64/include/critical.h#1 branch .. //depot/projects/vm/amd64/include/db_machdep.h#1 branch .. //depot/projects/vm/amd64/include/elf.h#1 branch .. //depot/projects/vm/amd64/include/endian.h#1 branch .. //depot/projects/vm/amd64/include/exec.h#1 branch .. //depot/projects/vm/amd64/include/float.h#1 branch .. //depot/projects/vm/amd64/include/floatingpoint.h#1 branch .. //depot/projects/vm/amd64/include/frame.h#1 branch .. //depot/projects/vm/amd64/include/ieeefp.h#1 branch .. //depot/projects/vm/amd64/include/in_cksum.h#1 branch .. //depot/projects/vm/amd64/include/kse.h#1 branch .. //depot/projects/vm/amd64/include/legacyvar.h#1 branch .. //depot/projects/vm/amd64/include/limits.h#1 branch .. //depot/projects/vm/amd64/include/md_var.h#1 branch .. //depot/projects/vm/amd64/include/metadata.h#1 branch .. //depot/projects/vm/amd64/include/mutex.h#1 branch .. //depot/projects/vm/amd64/include/npx.h#1 branch .. //depot/projects/vm/amd64/include/param.h#1 branch .. //depot/projects/vm/amd64/include/pc/display.h#1 branch .. //depot/projects/vm/amd64/include/pcb.h#1 branch .. //depot/projects/vm/amd64/include/pcb_ext.h#1 branch .. //depot/projects/vm/amd64/include/pci_cfgreg.h#1 branch .. //depot/projects/vm/amd64/include/pcpu.h#1 branch .. //depot/projects/vm/amd64/include/pmap.h#1 branch .. //depot/projects/vm/amd64/include/proc.h#1 branch .. //depot/projects/vm/amd64/include/profile.h#1 branch .. //depot/projects/vm/amd64/include/psl.h#1 branch .. //depot/projects/vm/amd64/include/ptrace.h#1 branch .. //depot/projects/vm/amd64/include/reg.h#1 branch .. //depot/projects/vm/amd64/include/reloc.h#1 branch .. //depot/projects/vm/amd64/include/resource.h#1 branch .. //depot/projects/vm/amd64/include/runq.h#1 branch .. //depot/projects/vm/amd64/include/segments.h#1 branch .. //depot/projects/vm/amd64/include/setjmp.h#1 branch .. //depot/projects/vm/amd64/include/sigframe.h#1 branch .. //depot/projects/vm/amd64/include/signal.h#1 branch .. //depot/projects/vm/amd64/include/smp.h#1 branch .. //depot/projects/vm/amd64/include/specialreg.h#1 branch .. //depot/projects/vm/amd64/include/stdarg.h#1 branch .. //depot/projects/vm/amd64/include/sysarch.h#1 branch .. //depot/projects/vm/amd64/include/trap.h#1 branch .. //depot/projects/vm/amd64/include/tss.h#1 branch .. //depot/projects/vm/amd64/include/ucontext.h#1 branch .. //depot/projects/vm/amd64/include/varargs.h#1 branch .. //depot/projects/vm/amd64/include/vmparam.h#1 branch .. //depot/projects/vm/amd64/isa/clock.c#1 branch .. //depot/projects/vm/amd64/isa/icu.h#1 branch .. //depot/projects/vm/amd64/isa/icu_ipl.S#1 branch .. //depot/projects/vm/amd64/isa/icu_vector.S#1 branch .. //depot/projects/vm/amd64/isa/intr_machdep.c#1 branch .. //depot/projects/vm/amd64/isa/intr_machdep.h#1 branch .. //depot/projects/vm/amd64/isa/isa.c#1 branch .. //depot/projects/vm/amd64/isa/isa.h#1 branch .. //depot/projects/vm/amd64/isa/isa_dma.c#1 branch .. //depot/projects/vm/amd64/isa/isa_dma.h#1 branch .. //depot/projects/vm/amd64/isa/ithread.c#1 branch .. //depot/projects/vm/amd64/isa/npx.c#1 branch .. //depot/projects/vm/amd64/isa/timerreg.h#1 branch .. //depot/projects/vm/amd64/isa/vector.S#1 branch .. //depot/projects/vm/amd64/pci/pci_bus.c#1 branch .. //depot/projects/vm/amd64/pci/pci_cfgreg.c#1 branch .. //depot/projects/vm/arm/compile/.cvsignore#1 branch .. //depot/projects/vm/arm/include/_limits.h#1 branch .. //depot/projects/vm/arm/include/_stdint.h#1 branch .. //depot/projects/vm/arm/include/_types.h#1 branch .. //depot/projects/vm/arm/include/elf.h#1 branch .. //depot/projects/vm/arm/include/endian.h#1 branch .. //depot/projects/vm/arm/include/exec.h#1 branch .. //depot/projects/vm/arm/include/limits.h#1 branch .. //depot/projects/vm/arm/include/param.h#1 branch .. //depot/projects/vm/arm/include/signal.h#1 branch .. //depot/projects/vm/arm/include/ucontext.h#1 branch .. //depot/projects/vm/boot/Makefile#1 branch .. //depot/projects/vm/boot/README#1 branch .. //depot/projects/vm/boot/alpha/Makefile#1 branch .. //depot/projects/vm/boot/alpha/Makefile.inc#1 branch .. //depot/projects/vm/boot/alpha/boot1/Makefile#1 branch .. //depot/projects/vm/boot/alpha/boot1/boot1.c#1 branch .. //depot/projects/vm/boot/alpha/cdboot/Makefile#1 branch .. //depot/projects/vm/boot/alpha/cdboot/version#1 branch .. //depot/projects/vm/boot/alpha/common/Makefile.common#1 branch .. //depot/projects/vm/boot/alpha/common/conf.c#1 branch .. //depot/projects/vm/boot/alpha/common/help.alpha#1 branch .. //depot/projects/vm/boot/alpha/common/main.c#1 branch .. //depot/projects/vm/boot/alpha/libalpha/Makefile#1 branch .. //depot/projects/vm/boot/alpha/libalpha/OSFpal.c#1 branch .. //depot/projects/vm/boot/alpha/libalpha/alpha_copy.c#1 branch .. //depot/projects/vm/boot/alpha/libalpha/alpha_module.c#1 branch .. //depot/projects/vm/boot/alpha/libalpha/bbinfo.h#1 branch .. //depot/projects/vm/boot/alpha/libalpha/bootinfo.c#1 branch .. //depot/projects/vm/boot/alpha/libalpha/common.h#1 branch .. //depot/projects/vm/boot/alpha/libalpha/delay.c#1 branch .. //depot/projects/vm/boot/alpha/libalpha/devicename.c#1 branch .. //depot/projects/vm/boot/alpha/libalpha/elf_freebsd.c#1 branch .. //depot/projects/vm/boot/alpha/libalpha/getsecs.c#1 branch .. //depot/projects/vm/boot/alpha/libalpha/libalpha.h#1 branch .. //depot/projects/vm/boot/alpha/libalpha/pal.S#1 branch .. //depot/projects/vm/boot/alpha/libalpha/prom.c#1 branch .. //depot/projects/vm/boot/alpha/libalpha/prom_disp.S#1 branch .. //depot/projects/vm/boot/alpha/libalpha/prom_swpal.S#1 branch .. //depot/projects/vm/boot/alpha/libalpha/reboot.c#1 branch .. //depot/projects/vm/boot/alpha/libalpha/srmdisk.c#1 branch .. //depot/projects/vm/boot/alpha/libalpha/srmnet.c#1 branch .. //depot/projects/vm/boot/alpha/libalpha/start.S#1 branch .. //depot/projects/vm/boot/alpha/libalpha/time.c#1 branch .. //depot/projects/vm/boot/alpha/loader/Makefile#1 branch .. //depot/projects/vm/boot/alpha/loader/version#1 branch .. //depot/projects/vm/boot/alpha/netboot/Makefile#1 branch .. //depot/projects/vm/boot/alpha/netboot/version#1 branch .. //depot/projects/vm/boot/arc/Makefile#1 branch .. //depot/projects/vm/boot/arc/Makefile.inc#1 branch .. //depot/projects/vm/boot/arc/include/arcfuncs.h#1 branch .. //depot/projects/vm/boot/arc/include/arctypes.h#1 branch .. //depot/projects/vm/boot/arc/include/libarc.h#1 branch .. //depot/projects/vm/boot/arc/lib/Makefile#1 branch .. //depot/projects/vm/boot/arc/lib/abort.c#1 branch .. //depot/projects/vm/boot/arc/lib/arcconsole.c#1 branch .. //depot/projects/vm/boot/arc/lib/arcdisk.c#1 branch .. //depot/projects/vm/boot/arc/lib/arch/alpha/copy.c#1 branch .. //depot/projects/vm/boot/arc/lib/arch/alpha/rpb.c#1 branch .. //depot/projects/vm/boot/arc/lib/arch/alpha/setjmp.S#1 branch .. //depot/projects/vm/boot/arc/lib/arch/alpha/start.S#1 branch .. //depot/projects/vm/boot/arc/lib/bootinfo.c#1 branch .. //depot/projects/vm/boot/arc/lib/delay.c#1 branch .. //depot/projects/vm/boot/arc/lib/devicename.c#1 branch .. //depot/projects/vm/boot/arc/lib/elf_freebsd.c#1 branch .. //depot/projects/vm/boot/arc/lib/module.c#1 branch .. //depot/projects/vm/boot/arc/lib/prom.c#1 branch .. //depot/projects/vm/boot/arc/lib/setjmperr.c#1 branch .. //depot/projects/vm/boot/arc/lib/time.c#1 branch .. //depot/projects/vm/boot/arc/loader/Makefile#1 branch .. //depot/projects/vm/boot/arc/loader/conf.c#1 branch .. //depot/projects/vm/boot/arc/loader/help.alpha#1 branch .. //depot/projects/vm/boot/arc/loader/main.c#1 branch .. //depot/projects/vm/boot/arc/loader/version#1 branch .. //depot/projects/vm/boot/common/Makefile.inc#1 branch .. //depot/projects/vm/boot/common/bcache.c#1 branch .. //depot/projects/vm/boot/common/boot.c#1 branch .. //depot/projects/vm/boot/common/bootstrap.h#1 branch .. //depot/projects/vm/boot/common/commands.c#1 branch .. //depot/projects/vm/boot/common/console.c#1 branch .. //depot/projects/vm/boot/common/dev_net.c#1 branch .. //depot/projects/vm/boot/common/dev_net.h#1 branch .. //depot/projects/vm/boot/common/devopen.c#1 branch .. //depot/projects/vm/boot/common/help.common#1 branch .. //depot/projects/vm/boot/common/interp.c#1 branch .. //depot/projects/vm/boot/common/interp_backslash.c#1 branch .. //depot/projects/vm/boot/common/interp_forth.c#1 branch .. //depot/projects/vm/boot/common/interp_parse.c#1 branch .. //depot/projects/vm/boot/common/isapnp.c#1 branch .. //depot/projects/vm/boot/common/isapnp.h#1 branch .. //depot/projects/vm/boot/common/load.c#1 branch .. //depot/projects/vm/boot/common/load_elf.c#1 branch .. //depot/projects/vm/boot/common/load_elf32.c#1 branch .. //depot/projects/vm/boot/common/load_elf64.c#1 branch .. //depot/projects/vm/boot/common/loader.8#1 branch .. //depot/projects/vm/boot/common/ls.c#1 branch .. //depot/projects/vm/boot/common/merge_help.awk#1 branch .. //depot/projects/vm/boot/common/misc.c#1 branch .. //depot/projects/vm/boot/common/module.c#1 branch .. //depot/projects/vm/boot/common/newvers.sh#1 branch .. //depot/projects/vm/boot/common/panic.c#1 branch .. //depot/projects/vm/boot/common/pnp.c#1 branch .. //depot/projects/vm/boot/common/pnpdata#1 branch .. //depot/projects/vm/boot/common/ufsread.c#1 branch .. //depot/projects/vm/boot/efi/Makefile#1 branch .. //depot/projects/vm/boot/efi/Makefile.inc#1 branch .. //depot/projects/vm/boot/efi/include/README#1 branch .. //depot/projects/vm/boot/efi/include/efi.h#1 branch .. //depot/projects/vm/boot/efi/include/efi_nii.h#1 branch .. //depot/projects/vm/boot/efi/include/efiapi.h#1 branch .. //depot/projects/vm/boot/efi/include/eficon.h#1 branch .. //depot/projects/vm/boot/efi/include/efidebug.h#1 branch .. //depot/projects/vm/boot/efi/include/efidef.h#1 branch .. //depot/projects/vm/boot/efi/include/efidevp.h#1 branch .. //depot/projects/vm/boot/efi/include/efierr.h#1 branch .. //depot/projects/vm/boot/efi/include/efifpswa.h#1 branch .. //depot/projects/vm/boot/efi/include/efifs.h#1 branch .. //depot/projects/vm/boot/efi/include/efilib.h#1 branch .. //depot/projects/vm/boot/efi/include/efinet.h#1 branch .. //depot/projects/vm/boot/efi/include/efipart.h#1 branch .. //depot/projects/vm/boot/efi/include/efiprot.h#1 branch .. //depot/projects/vm/boot/efi/include/efipxebc.h#1 branch .. //depot/projects/vm/boot/efi/include/efiser.h#1 branch .. //depot/projects/vm/boot/efi/include/efistdarg.h#1 branch .. //depot/projects/vm/boot/efi/include/i386/efibind.h#1 branch .. //depot/projects/vm/boot/efi/include/i386/pe.h#1 branch .. //depot/projects/vm/boot/efi/include/ia64/efibind.h#1 branch .. //depot/projects/vm/boot/efi/include/ia64/pe.h#1 branch .. //depot/projects/vm/boot/efi/libefi/Makefile#1 branch .. //depot/projects/vm/boot/efi/libefi/arch/ia64/ldscript.ia64#1 branch .. //depot/projects/vm/boot/efi/libefi/arch/ia64/start.S#1 branch .. //depot/projects/vm/boot/efi/libefi/bootinfo.c#1 branch .. //depot/projects/vm/boot/efi/libefi/copy.c#1 branch .. //depot/projects/vm/boot/efi/libefi/delay.c#1 branch .. //depot/projects/vm/boot/efi/libefi/devicename.c#1 branch .. //depot/projects/vm/boot/efi/libefi/efi_console.c#1 branch .. //depot/projects/vm/boot/efi/libefi/efiboot.h#1 branch .. //depot/projects/vm/boot/efi/libefi/efifpswa.c#1 branch .. //depot/projects/vm/boot/efi/libefi/efifs.c#1 branch .. //depot/projects/vm/boot/efi/libefi/efinet.c#1 branch .. //depot/projects/vm/boot/efi/libefi/elf_freebsd.c#1 branch .. //depot/projects/vm/boot/efi/libefi/libefi.c#1 branch .. //depot/projects/vm/boot/efi/libefi/module.c#1 branch .. //depot/projects/vm/boot/efi/libefi/time.c#1 branch .. //depot/projects/vm/boot/efi/loader/Makefile#1 branch .. //depot/projects/vm/boot/efi/loader/conf.c#1 branch .. //depot/projects/vm/boot/efi/loader/main.c#1 branch .. //depot/projects/vm/boot/efi/loader/version#1 branch .. //depot/projects/vm/boot/ficl/Makefile#1 branch .. //depot/projects/vm/boot/ficl/alpha/sysdep.c#1 branch .. //depot/projects/vm/boot/ficl/alpha/sysdep.h#1 branch .. //depot/projects/vm/boot/ficl/dict.c#1 branch .. //depot/projects/vm/boot/ficl/ficl.c#1 branch .. //depot/projects/vm/boot/ficl/ficl.h#1 branch .. //depot/projects/vm/boot/ficl/fileaccess.c#1 branch .. //depot/projects/vm/boot/ficl/float.c#1 branch .. //depot/projects/vm/boot/ficl/i386/sysdep.c#1 branch .. //depot/projects/vm/boot/ficl/i386/sysdep.h#1 branch .. //depot/projects/vm/boot/ficl/ia64/sysdep.c#1 branch .. //depot/projects/vm/boot/ficl/ia64/sysdep.h#1 branch .. //depot/projects/vm/boot/ficl/loader.c#1 branch .. //depot/projects/vm/boot/ficl/math64.c#1 branch .. //depot/projects/vm/boot/ficl/math64.h#1 branch .. //depot/projects/vm/boot/ficl/prefix.c#1 branch .. //depot/projects/vm/boot/ficl/search.c#1 branch .. //depot/projects/vm/boot/ficl/softwords/classes.fr#1 branch .. //depot/projects/vm/boot/ficl/softwords/ficlclass.fr#1 branch .. //depot/projects/vm/boot/ficl/softwords/ficllocal.fr#1 branch .. //depot/projects/vm/boot/ficl/softwords/fileaccess.fr#1 branch .. //depot/projects/vm/boot/ficl/softwords/forml.fr#1 branch .. //depot/projects/vm/boot/ficl/softwords/freebsd.fr#1 branch .. //depot/projects/vm/boot/ficl/softwords/ifbrack.fr#1 branch .. //depot/projects/vm/boot/ficl/softwords/jhlocal.fr#1 branch .. //depot/projects/vm/boot/ficl/softwords/marker.fr#1 branch .. //depot/projects/vm/boot/ficl/softwords/oo.fr#1 branch .. //depot/projects/vm/boot/ficl/softwords/prefix.fr#1 branch .. //depot/projects/vm/boot/ficl/softwords/softcore.awk#1 branch .. //depot/projects/vm/boot/ficl/softwords/softcore.fr#1 branch .. //depot/projects/vm/boot/ficl/softwords/string.fr#1 branch .. //depot/projects/vm/boot/ficl/sparc64/sysdep.c#1 branch .. //depot/projects/vm/boot/ficl/sparc64/sysdep.h#1 branch .. //depot/projects/vm/boot/ficl/stack.c#1 branch .. //depot/projects/vm/boot/ficl/testmain.c#1 branch .. //depot/projects/vm/boot/ficl/tools.c#1 branch .. //depot/projects/vm/boot/ficl/unix.c#1 branch .. //depot/projects/vm/boot/ficl/vm.c#1 branch .. //depot/projects/vm/boot/ficl/words.c#1 branch .. //depot/projects/vm/boot/forth/beastie.4th#1 branch .. //depot/projects/vm/boot/forth/frames.4th#1 branch .. //depot/projects/vm/boot/forth/loader.4th#1 branch .. //depot/projects/vm/boot/forth/loader.4th.8#1 branch .. //depot/projects/vm/boot/forth/loader.conf#1 branch .. //depot/projects/vm/boot/forth/loader.conf.5#1 branch .. //depot/projects/vm/boot/forth/loader.rc#1 branch .. //depot/projects/vm/boot/forth/pnp.4th#1 branch .. //depot/projects/vm/boot/forth/screen.4th#1 branch .. //depot/projects/vm/boot/forth/support.4th#1 branch .. //depot/projects/vm/boot/i386/Makefile#1 branch .. //depot/projects/vm/boot/i386/Makefile.inc#1 branch .. //depot/projects/vm/boot/i386/boot0/Makefile#1 branch .. //depot/projects/vm/boot/i386/boot0/boot0.s#1 branch .. //depot/projects/vm/boot/i386/boot2/Makefile#1 branch .. //depot/projects/vm/boot/i386/boot2/boot1.s#1 branch .. //depot/projects/vm/boot/i386/boot2/boot2.c#1 branch .. //depot/projects/vm/boot/i386/boot2/lib.h#1 branch .. //depot/projects/vm/boot/i386/boot2/sio.s#1 branch .. //depot/projects/vm/boot/i386/btx/Makefile#1 branch .. //depot/projects/vm/boot/i386/btx/Makefile.inc#1 branch .. //depot/projects/vm/boot/i386/btx/btx/Makefile#1 branch .. //depot/projects/vm/boot/i386/btx/btx/btx.s#1 branch .. //depot/projects/vm/boot/i386/btx/btxldr/Makefile#1 branch .. //depot/projects/vm/boot/i386/btx/btxldr/btxldr.s#1 branch .. //depot/projects/vm/boot/i386/btx/lib/Makefile#1 branch .. //depot/projects/vm/boot/i386/btx/lib/btxcsu.s#1 branch .. //depot/projects/vm/boot/i386/btx/lib/btxsys.s#1 branch .. //depot/projects/vm/boot/i386/btx/lib/btxv86.h#1 branch .. //depot/projects/vm/boot/i386/btx/lib/btxv86.s#1 branch .. //depot/projects/vm/boot/i386/cdboot/Makefile#1 branch .. //depot/projects/vm/boot/i386/cdboot/cdboot.s#1 branch .. //depot/projects/vm/boot/i386/kgzldr/Makefile#1 branch .. //depot/projects/vm/boot/i386/kgzldr/boot.c#1 branch .. //depot/projects/vm/boot/i386/kgzldr/crt.s#1 branch .. //depot/projects/vm/boot/i386/kgzldr/kgzldr.h#1 branch .. //depot/projects/vm/boot/i386/kgzldr/lib.c#1 branch .. //depot/projects/vm/boot/i386/kgzldr/sio.s#1 branch .. //depot/projects/vm/boot/i386/kgzldr/start.s#1 branch .. //depot/projects/vm/boot/i386/libi386/Makefile#1 branch .. //depot/projects/vm/boot/i386/libi386/amd64_tramp.S#1 branch .. //depot/projects/vm/boot/i386/libi386/biosacpi.c#1 branch .. //depot/projects/vm/boot/i386/libi386/bioscd.c#1 branch .. //depot/projects/vm/boot/i386/libi386/biosdisk.c#1 branch .. //depot/projects/vm/boot/i386/libi386/biosmem.c#1 branch .. //depot/projects/vm/boot/i386/libi386/biospci.c#1 branch .. //depot/projects/vm/boot/i386/libi386/biospnp.c#1 branch .. //depot/projects/vm/boot/i386/libi386/biossmap.c#1 branch .. //depot/projects/vm/boot/i386/libi386/bootinfo.c#1 branch .. //depot/projects/vm/boot/i386/libi386/bootinfo32.c#1 branch .. //depot/projects/vm/boot/i386/libi386/bootinfo64.c#1 branch .. //depot/projects/vm/boot/i386/libi386/comconsole.c#1 branch .. //depot/projects/vm/boot/i386/libi386/devicename.c#1 branch .. //depot/projects/vm/boot/i386/libi386/elf32_freebsd.c#1 branch .. //depot/projects/vm/boot/i386/libi386/elf64_freebsd.c#1 branch .. //depot/projects/vm/boot/i386/libi386/gatea20.c#1 branch .. //depot/projects/vm/boot/i386/libi386/i386_copy.c#1 branch .. //depot/projects/vm/boot/i386/libi386/i386_module.c#1 branch .. //depot/projects/vm/boot/i386/libi386/libi386.h#1 branch .. //depot/projects/vm/boot/i386/libi386/nullconsole.c#1 branch .. //depot/projects/vm/boot/i386/libi386/pread.c#1 branch .. //depot/projects/vm/boot/i386/libi386/pxe.c#1 branch .. //depot/projects/vm/boot/i386/libi386/pxe.h#1 branch .. //depot/projects/vm/boot/i386/libi386/pxetramp.s#1 branch .. //depot/projects/vm/boot/i386/libi386/time.c#1 branch .. //depot/projects/vm/boot/i386/libi386/vidconsole.c#1 branch .. //depot/projects/vm/boot/i386/loader/Makefile#1 branch .. //depot/projects/vm/boot/i386/loader/conf.c#1 branch .. //depot/projects/vm/boot/i386/loader/help.i386#1 branch .. //depot/projects/vm/boot/i386/loader/loader.rc#1 branch .. //depot/projects/vm/boot/i386/loader/main.c#1 branch .. //depot/projects/vm/boot/i386/loader/version#1 branch .. //depot/projects/vm/boot/i386/mbr/Makefile#1 branch .. //depot/projects/vm/boot/i386/mbr/mbr.s#1 branch .. //depot/projects/vm/boot/i386/pxeldr/Makefile#1 branch .. //depot/projects/vm/boot/i386/pxeldr/pxeboot.8#1 branch .. //depot/projects/vm/boot/i386/pxeldr/pxeldr.s#1 branch .. //depot/projects/vm/boot/ia64/Makefile#1 branch .. //depot/projects/vm/boot/ia64/Makefile.inc#1 branch .. //depot/projects/vm/boot/ia64/libski/Makefile#1 branch .. //depot/projects/vm/boot/ia64/libski/acpi_stub.c#1 branch .. //depot/projects/vm/boot/ia64/libski/bootinfo.c#1 branch .. //depot/projects/vm/boot/ia64/libski/copy.c#1 branch .. //depot/projects/vm/boot/ia64/libski/delay.c#1 branch .. //depot/projects/vm/boot/ia64/libski/devicename.c#1 branch .. //depot/projects/vm/boot/ia64/libski/efi_stub.c#1 branch .. //depot/projects/vm/boot/ia64/libski/elf_freebsd.c#1 branch .. //depot/projects/vm/boot/ia64/libski/exit.c#1 branch .. //depot/projects/vm/boot/ia64/libski/libski.h#1 branch .. //depot/projects/vm/boot/ia64/libski/module.c#1 branch .. //depot/projects/vm/boot/ia64/libski/pal_stub.S#1 branch .. //depot/projects/vm/boot/ia64/libski/sal_stub.c#1 branch .. //depot/projects/vm/boot/ia64/libski/skiconsole.c#1 branch .. //depot/projects/vm/boot/ia64/libski/skifs.c#1 branch .. //depot/projects/vm/boot/ia64/libski/ssc.c#1 branch .. //depot/projects/vm/boot/ia64/libski/time.c#1 branch .. //depot/projects/vm/boot/ia64/skiload/Makefile#1 branch .. //depot/projects/vm/boot/ia64/skiload/conf.c#1 branch .. //depot/projects/vm/boot/ia64/skiload/ldscript.ia64#1 branch .. //depot/projects/vm/boot/ia64/skiload/main.c#1 branch .. //depot/projects/vm/boot/ia64/skiload/skiload.cmd#1 branch .. //depot/projects/vm/boot/ia64/skiload/start.S#1 branch .. //depot/projects/vm/boot/ia64/skiload/version#1 branch .. //depot/projects/vm/boot/ofw/Makefile#1 branch .. //depot/projects/vm/boot/ofw/common/Makefile.inc#1 branch .. //depot/projects/vm/boot/ofw/common/main.c#1 branch .. //depot/projects/vm/boot/ofw/libofw/Makefile#1 branch .. //depot/projects/vm/boot/ofw/libofw/devicename.c#1 branch .. //depot/projects/vm/boot/ofw/libofw/elf_freebsd.c#1 branch .. //depot/projects/vm/boot/ofw/libofw/libofw.h#1 branch .. //depot/projects/vm/boot/ofw/libofw/ofw_console.c#1 branch .. //depot/projects/vm/boot/ofw/libofw/ofw_copy.c#1 branch .. //depot/projects/vm/boot/ofw/libofw/ofw_disk.c#1 branch .. //depot/projects/vm/boot/ofw/libofw/ofw_memory.c#1 branch .. //depot/projects/vm/boot/ofw/libofw/ofw_module.c#1 branch .. //depot/projects/vm/boot/ofw/libofw/ofw_net.c#1 branch .. //depot/projects/vm/boot/ofw/libofw/ofw_reboot.c#1 branch .. //depot/projects/vm/boot/ofw/libofw/ofw_time.c#1 branch .. //depot/projects/vm/boot/ofw/libofw/openfirm.c#1 branch .. //depot/projects/vm/boot/ofw/libofw/openfirm.h#1 branch .. //depot/projects/vm/boot/pc98/Makefile#1 branch .. //depot/projects/vm/boot/pc98/Makefile.inc#1 branch .. //depot/projects/vm/boot/pc98/boot0.5/Makefile#1 branch .. //depot/projects/vm/boot/pc98/boot0.5/boot.s#1 branch .. //depot/projects/vm/boot/pc98/boot0.5/boot0.5.s#1 branch .. //depot/projects/vm/boot/pc98/boot0.5/disk.s#1 branch .. //depot/projects/vm/boot/pc98/boot0.5/selector.s#1 branch .. //depot/projects/vm/boot/pc98/boot0.5/start.s#1 branch .. //depot/projects/vm/boot/pc98/boot0.5/support.s#1 branch .. //depot/projects/vm/boot/pc98/boot0.5/syscons.s#1 branch .. //depot/projects/vm/boot/pc98/boot0/Makefile#1 branch .. //depot/projects/vm/boot/pc98/boot0/boot0.s#1 branch .. //depot/projects/vm/boot/pc98/boot2/Makefile#1 branch .. //depot/projects/vm/boot/pc98/boot2/README.serial.98#1 branch .. //depot/projects/vm/boot/pc98/boot2/asm.S#1 branch .. //depot/projects/vm/boot/pc98/boot2/asm.h#1 branch .. //depot/projects/vm/boot/pc98/boot2/bios.S#1 branch .. //depot/projects/vm/boot/pc98/boot2/boot.c#1 branch .. //depot/projects/vm/boot/pc98/boot2/boot.h#1 branch .. //depot/projects/vm/boot/pc98/boot2/boot2.S#1 branch .. //depot/projects/vm/boot/pc98/boot2/dinode.h#1 branch .. //depot/projects/vm/boot/pc98/boot2/disk.c#1 branch .. //depot/projects/vm/boot/pc98/boot2/fs.h#1 branch .. //depot/projects/vm/boot/pc98/boot2/inode.h#1 branch .. //depot/projects/vm/boot/pc98/boot2/io.c#1 branch .. //depot/projects/vm/boot/pc98/boot2/probe_keyboard.c#1 branch .. //depot/projects/vm/boot/pc98/boot2/quota.h#1 branch .. //depot/projects/vm/boot/pc98/boot2/serial.S#1 branch .. //depot/projects/vm/boot/pc98/boot2/serial_16550.S#1 branch .. //depot/projects/vm/boot/pc98/boot2/serial_8251.S#1 branch .. //depot/projects/vm/boot/pc98/boot2/start.S#1 branch .. //depot/projects/vm/boot/pc98/boot2/sys.c#1 branch .. //depot/projects/vm/boot/pc98/boot2/table.c#1 branch .. //depot/projects/vm/boot/pc98/btx/Makefile#1 branch .. //depot/projects/vm/boot/pc98/btx/btx/Makefile#1 branch .. //depot/projects/vm/boot/pc98/btx/btx/btx.s#1 branch .. //depot/projects/vm/boot/pc98/btx/btxldr/Makefile#1 branch .. //depot/projects/vm/boot/pc98/btx/btxldr/btxldr.s#1 branch .. //depot/projects/vm/boot/pc98/btx/lib/Makefile#1 branch .. //depot/projects/vm/boot/pc98/btx/lib/btxcsu.s#1 branch .. //depot/projects/vm/boot/pc98/btx/lib/btxsys.s#1 branch .. //depot/projects/vm/boot/pc98/btx/lib/btxv86.h#1 branch .. //depot/projects/vm/boot/pc98/btx/lib/btxv86.s#1 branch .. //depot/projects/vm/boot/pc98/kgzldr/Makefile#1 branch .. //depot/projects/vm/boot/pc98/kgzldr/crt.s#1 branch .. //depot/projects/vm/boot/pc98/libpc98/Makefile#1 branch .. //depot/projects/vm/boot/pc98/libpc98/biosdisk.c#1 branch .. //depot/projects/vm/boot/pc98/libpc98/biosmem.c#1 branch .. //depot/projects/vm/boot/pc98/libpc98/comconsole.c#1 branch .. //depot/projects/vm/boot/pc98/libpc98/gatea20.c#1 branch .. //depot/projects/vm/boot/pc98/libpc98/i386_module.c#1 branch .. //depot/projects/vm/boot/pc98/libpc98/time.c#1 branch .. //depot/projects/vm/boot/pc98/libpc98/vidconsole.c#1 branch .. //depot/projects/vm/boot/pc98/loader/Makefile#1 branch .. //depot/projects/vm/boot/pc98/loader/conf.c#1 branch .. //depot/projects/vm/boot/pc98/loader/help.pc98#1 branch .. //depot/projects/vm/boot/pc98/loader/main.c#1 branch .. //depot/projects/vm/boot/powerpc/Makefile#1 branch .. //depot/projects/vm/boot/powerpc/loader/Makefile#1 branch .. //depot/projects/vm/boot/powerpc/loader/conf.c#1 branch .. //depot/projects/vm/boot/powerpc/loader/help.ofw#1 branch .. //depot/projects/vm/boot/powerpc/loader/metadata.c#1 branch .. //depot/projects/vm/boot/powerpc/loader/start.c#1 branch .. //depot/projects/vm/boot/powerpc/loader/version#1 branch .. //depot/projects/vm/boot/sparc64/Makefile#1 branch .. //depot/projects/vm/boot/sparc64/boot1/Makefile#1 branch .. //depot/projects/vm/boot/sparc64/boot1/_start.S#1 branch .. //depot/projects/vm/boot/sparc64/boot1/boot1.c#1 branch .. //depot/projects/vm/boot/sparc64/loader/Makefile#1 branch .. //depot/projects/vm/boot/sparc64/loader/help.sparc64#1 branch .. //depot/projects/vm/boot/sparc64/loader/locore.S#1 branch .. //depot/projects/vm/boot/sparc64/loader/main.c#1 branch .. //depot/projects/vm/boot/sparc64/loader/metadata.c#1 branch .. //depot/projects/vm/boot/sparc64/loader/version#1 branch .. //depot/projects/vm/cam/cam.c#1 branch .. //depot/projects/vm/cam/cam.h#1 branch .. //depot/projects/vm/cam/cam_ccb.h#1 branch .. //depot/projects/vm/cam/cam_debug.h#1 branch .. //depot/projects/vm/cam/cam_periph.c#1 branch .. //depot/projects/vm/cam/cam_periph.h#1 branch .. //depot/projects/vm/cam/cam_queue.c#1 branch .. //depot/projects/vm/cam/cam_queue.h#1 branch .. //depot/projects/vm/cam/cam_sim.c#1 branch .. //depot/projects/vm/cam/cam_sim.h#1 branch .. //depot/projects/vm/cam/cam_xpt.c#1 branch .. //depot/projects/vm/cam/cam_xpt.h#1 branch .. //depot/projects/vm/cam/cam_xpt_periph.h#1 branch .. //depot/projects/vm/cam/cam_xpt_sim.h#1 branch .. //depot/projects/vm/cam/scsi/scsi_all.c#1 branch .. //depot/projects/vm/cam/scsi/scsi_all.h#1 branch .. //depot/projects/vm/cam/scsi/scsi_cd.c#1 branch .. //depot/projects/vm/cam/scsi/scsi_cd.h#1 branch .. //depot/projects/vm/cam/scsi/scsi_ch.c#1 branch .. //depot/projects/vm/cam/scsi/scsi_ch.h#1 branch .. //depot/projects/vm/cam/scsi/scsi_da.c#1 branch .. //depot/projects/vm/cam/scsi/scsi_da.h#1 branch .. //depot/projects/vm/cam/scsi/scsi_dvcfg.h#1 branch .. //depot/projects/vm/cam/scsi/scsi_iu.h#1 branch .. //depot/projects/vm/cam/scsi/scsi_low.c#1 branch .. //depot/projects/vm/cam/scsi/scsi_low.h#1 branch .. //depot/projects/vm/cam/scsi/scsi_low_pisa.c#1 branch .. //depot/projects/vm/cam/scsi/scsi_low_pisa.h#1 branch .. //depot/projects/vm/cam/scsi/scsi_message.h#1 branch .. //depot/projects/vm/cam/scsi/scsi_pass.c#1 branch .. //depot/projects/vm/cam/scsi/scsi_pass.h#1 branch .. //depot/projects/vm/cam/scsi/scsi_pt.c#1 branch .. //depot/projects/vm/cam/scsi/scsi_pt.h#1 branch .. //depot/projects/vm/cam/scsi/scsi_sa.c#1 branch .. //depot/projects/vm/cam/scsi/scsi_sa.h#1 branch .. //depot/projects/vm/cam/scsi/scsi_ses.c#1 branch .. //depot/projects/vm/cam/scsi/scsi_ses.h#1 branch .. //depot/projects/vm/cam/scsi/scsi_targ_bh.c#1 branch .. //depot/projects/vm/cam/scsi/scsi_target.c#1 branch .. //depot/projects/vm/cam/scsi/scsi_targetio.h#1 branch .. //depot/projects/vm/coda/00READ#1 branch .. //depot/projects/vm/coda/README#1 branch .. //depot/projects/vm/coda/TODO#1 branch .. //depot/projects/vm/coda/cnode.h#1 branch .. //depot/projects/vm/coda/coda.h#1 branch .. //depot/projects/vm/coda/coda_fbsd.c#1 branch .. //depot/projects/vm/coda/coda_io.h#1 branch .. //depot/projects/vm/coda/coda_kernel.h#1 branch .. //depot/projects/vm/coda/coda_namecache.c#1 branch .. //depot/projects/vm/coda/coda_namecache.h#1 branch .. //depot/projects/vm/coda/coda_opstats.h#1 branch .. //depot/projects/vm/coda/coda_pioctl.h#1 branch .. //depot/projects/vm/coda/coda_psdev.c#1 branch .. //depot/projects/vm/coda/coda_psdev.h#1 branch .. //depot/projects/vm/coda/coda_subr.c#1 branch .. //depot/projects/vm/coda/coda_subr.h#1 branch .. //depot/projects/vm/coda/coda_venus.c#1 branch .. //depot/projects/vm/coda/coda_venus.h#1 branch .. //depot/projects/vm/coda/coda_vfsops.c#1 branch .. //depot/projects/vm/coda/coda_vfsops.h#1 branch .. //depot/projects/vm/coda/coda_vnops.c#1 branch .. //depot/projects/vm/coda/coda_vnops.h#1 branch .. //depot/projects/vm/compat/freebsd32/Makefile#1 branch .. //depot/projects/vm/compat/freebsd32/freebsd32.h#1 branch .. //depot/projects/vm/compat/freebsd32/freebsd32_misc.c#1 branch .. //depot/projects/vm/compat/freebsd32/freebsd32_proto.h#1 branch .. //depot/projects/vm/compat/freebsd32/freebsd32_syscall.h#1 branch .. //depot/projects/vm/compat/freebsd32/freebsd32_syscalls.c#1 branch .. //depot/projects/vm/compat/freebsd32/freebsd32_sysent.c#1 branch .. //depot/projects/vm/compat/freebsd32/freebsd32_util.h#1 branch .. //depot/projects/vm/compat/freebsd32/syscalls.conf#1 branch .. //depot/projects/vm/compat/freebsd32/syscalls.master#1 branch .. //depot/projects/vm/compat/ia32/ia32_genassym.c#1 branch .. //depot/projects/vm/compat/ia32/ia32_signal.h#1 branch .. //depot/projects/vm/compat/ia32/ia32_sigtramp.S#1 branch .. //depot/projects/vm/compat/ia32/ia32_sysvec.c#1 branch .. //depot/projects/vm/compat/ia32/ia32_util.h#1 branch .. //depot/projects/vm/compat/linprocfs/linprocfs.c#1 branch .. //depot/projects/vm/compat/linux/linux_file.c#1 branch .. //depot/projects/vm/compat/linux/linux_getcwd.c#1 branch .. //depot/projects/vm/compat/linux/linux_ioctl.c#1 branch .. //depot/projects/vm/compat/linux/linux_ioctl.h#1 branch .. //depot/projects/vm/compat/linux/linux_ipc.c#1 branch .. //depot/projects/vm/compat/linux/linux_ipc.h#1 branch .. //depot/projects/vm/compat/linux/linux_mib.c#1 branch .. //depot/projects/vm/compat/linux/linux_mib.h#1 branch .. //depot/projects/vm/compat/linux/linux_misc.c#1 branch .. //depot/projects/vm/compat/linux/linux_signal.c#1 branch .. //depot/projects/vm/compat/linux/linux_signal.h#1 branch .. //depot/projects/vm/compat/linux/linux_socket.c#1 branch .. //depot/projects/vm/compat/linux/linux_socket.h#1 branch .. //depot/projects/vm/compat/linux/linux_stats.c#1 branch .. //depot/projects/vm/compat/linux/linux_sysctl.c#1 branch .. //depot/projects/vm/compat/linux/linux_uid16.c#1 branch .. //depot/projects/vm/compat/linux/linux_util.c#1 branch .. //depot/projects/vm/compat/linux/linux_util.h#1 branch .. //depot/projects/vm/compat/pecoff/imgact_pecoff.c#1 branch .. //depot/projects/vm/compat/pecoff/imgact_pecoff.h#1 branch .. //depot/projects/vm/compat/svr4/Makefile#1 branch .. //depot/projects/vm/compat/svr4/imgact_svr4.c#1 branch .. //depot/projects/vm/compat/svr4/svr4.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_acl.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_dirent.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_errno.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_exec.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_fcntl.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_fcntl.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_filio.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_filio.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_fuser.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_hrt.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_ioctl.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_ioctl.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_ipc.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_ipc.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_misc.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_mman.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_proto.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_resource.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_resource.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_siginfo.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_signal.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_signal.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_socket.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_socket.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_sockio.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_sockio.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_sockmod.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_stat.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_stat.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_statvfs.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_stream.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_stropts.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_syscall.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_syscallnames.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_sysconfig.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_sysent.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_systeminfo.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_sysvec.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_termios.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_termios.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_time.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_timod.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_ttold.c#1 branch .. //depot/projects/vm/compat/svr4/svr4_ttold.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_types.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_ucontext.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_ulimit.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_ustat.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_util.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_utsname.h#1 branch .. //depot/projects/vm/compat/svr4/svr4_wait.h#1 branch .. //depot/projects/vm/compat/svr4/syscalls.conf#1 branch .. //depot/projects/vm/compat/svr4/syscalls.master#1 branch .. //depot/projects/vm/conf/Makefile.alpha#1 branch .. //depot/projects/vm/conf/Makefile.amd64#1 branch .. //depot/projects/vm/conf/Makefile.i386#1 branch .. //depot/projects/vm/conf/Makefile.ia64#1 branch .. //depot/projects/vm/conf/Makefile.pc98#1 branch .. //depot/projects/vm/conf/Makefile.powerpc#1 branch .. //depot/projects/vm/conf/Makefile.sparc64#1 branch .. //depot/projects/vm/conf/NOTES#1 branch .. //depot/projects/vm/conf/defines#1 branch .. //depot/projects/vm/conf/files#1 branch .. //depot/projects/vm/conf/files.alpha#1 branch .. //depot/projects/vm/conf/files.amd64#1 branch .. //depot/projects/vm/conf/files.i386#1 branch .. //depot/projects/vm/conf/files.ia64#1 branch .. //depot/projects/vm/conf/files.pc98#1 branch .. //depot/projects/vm/conf/files.powerpc#1 branch .. //depot/projects/vm/conf/files.sparc64#1 branch .. //depot/projects/vm/conf/kern.mk#1 branch .. //depot/projects/vm/conf/kern.post.mk#1 branch .. //depot/projects/vm/conf/kern.pre.mk#1 branch .. //depot/projects/vm/conf/kmod.mk#1 branch .. //depot/projects/vm/conf/kmod_syms.awk#1 branch .. //depot/projects/vm/conf/ldscript.alpha#1 branch .. //depot/projects/vm/conf/ldscript.amd64#1 branch .. //depot/projects/vm/conf/ldscript.i386#1 branch .. //depot/projects/vm/conf/ldscript.ia64#1 branch .. //depot/projects/vm/conf/ldscript.powerpc#1 branch .. //depot/projects/vm/conf/ldscript.sparc64#1 branch .. //depot/projects/vm/conf/majors#1 branch .. //depot/projects/vm/conf/majors.awk#1 branch .. //depot/projects/vm/conf/makeLINT.mk#1 branch .. //depot/projects/vm/conf/makeLINT.sed#1 branch .. //depot/projects/vm/conf/newvers.sh#1 branch .. //depot/projects/vm/conf/options#1 branch .. //depot/projects/vm/conf/options.alpha#1 branch .. //depot/projects/vm/conf/options.amd64#1 branch .. //depot/projects/vm/conf/options.i386#1 branch .. //depot/projects/vm/conf/options.ia64#1 branch .. //depot/projects/vm/conf/options.pc98#1 branch .. //depot/projects/vm/conf/options.powerpc#1 branch .. //depot/projects/vm/conf/options.sparc64#1 branch .. //depot/projects/vm/conf/systags.sh#1 branch .. //depot/projects/vm/contrib/dev/acpica/CHANGES.txt#1 branch .. //depot/projects/vm/contrib/dev/acpica/acapps.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acconfig.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acdebug.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acdisasm.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acdispat.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acefi.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acenv.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acevents.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acexcep.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acfreebsd.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acgcc.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acglobal.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/achware.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acinterp.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/aclocal.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acmacros.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acnamesp.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acobject.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acoutput.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acparser.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acpi.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acpica_prep.sh#1 branch .. //depot/projects/vm/contrib/dev/acpica/acpiosxf.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acpixf.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acresrc.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acstruct.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/actables.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/actbl.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/actbl1.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/actbl2.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/actypes.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/acutils.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/amlcode.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/amlresrc.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/common/adisasm.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/common/getopt.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslanalyze.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslcodegen.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslcompile.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslcompiler.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslcompiler.l#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslcompiler.y#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslerror.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslfiles.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslfold.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslglobal.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/asllength.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/asllisting.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslload.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/asllookup.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslmain.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslmap.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslopcodes.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/asloperands.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslopt.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslresource.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslrestype1.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslrestype2.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslstubs.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/asltransform.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/asltree.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/asltypes.h#1 branch .. //depot/projects/vm/contrib/dev/acpica/compiler/aslutils.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/dbcmds.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/dbdisply.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/dbexec.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/dbfileio.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/dbhistry.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/dbinput.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/dbstats.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/dbutils.c#1 branch .. //depot/projects/vm/contrib/dev/acpica/dbxface.c#1 branch >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Oct 6 19:47:22 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3110816A4C1; Mon, 6 Oct 2003 19:47:22 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B56B16A4B3 for ; Mon, 6 Oct 2003 19:47:22 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 276DD43FAF for ; Mon, 6 Oct 2003 19:47:20 -0700 (PDT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h972lJXJ091254 for ; Mon, 6 Oct 2003 19:47:19 -0700 (PDT) (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h972lJQW091251 for perforce@freebsd.org; Mon, 6 Oct 2003 19:47:19 -0700 (PDT) (envelope-from imp@freebsd.org) Date: Mon, 6 Oct 2003 19:47:19 -0700 (PDT) Message-Id: <200310070247.h972lJQW091251@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Subject: PERFORCE change 39284 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2003 02:47:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=39284 Change 39284 by imp@imp_koguchi on 2003/10/06 19:46:55 update a little Affected files ... .. //depot/projects/power/notes#7 edit Differences ... ==== //depot/projects/power/notes#7 (text+ko) ==== @@ -51,14 +51,9 @@ # methods should be unique. Command interfaces to userland should dispatch # the right method. Otherwise we've reinvented ioctl :-) - convert to a model of suspending the device via device_suspend()/resume() - rather than detach()/attach() + rather than detach()/attach() for turning devices on/off. - This may require fixes to drivers so that they continue to function appropriately when their hardware has been suspended - # NO. This cannot be implemented reliably. pccard bridges do not tell - # us that a device has been removed while the system was asleep. That's - # why we detach/reattach on suspend/resume for devices on pccard/cardbus - # bridges. usb bridges can tell about this, and they properly use the - # suspend/resume functions. The second stage will be to make the powering off of devices more automated. This is still in early design stage. It may involve a powerd, it may From owner-p4-projects@FreeBSD.ORG Tue Oct 7 12:04:09 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1DFCC16A4C0; Tue, 7 Oct 2003 12:04:09 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D036C16A4B3 for ; Tue, 7 Oct 2003 12:04:08 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 53EA843FE3 for ; Tue, 7 Oct 2003 12:04:07 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h97J47XJ069441 for ; Tue, 7 Oct 2003 12:04:07 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h97J461F069438 for perforce@freebsd.org; Tue, 7 Oct 2003 12:04:06 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Tue, 7 Oct 2003 12:04:06 -0700 (PDT) Message-Id: <200310071904.h97J461F069438@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39325 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2003 19:04:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=39325 Change 39325 by sam@sam_ebb on 2003/10/07 12:03:33 Add notion of persistent tags and strip all non-persistent tags when mbufs are "turned around" through the loopback interface or in ICMP. Affected files ... .. //depot/projects/netperf/sys/kern/uipc_mbuf2.c#2 edit .. //depot/projects/netperf/sys/net/if_loop.c#6 edit .. //depot/projects/netperf/sys/netinet/ip_icmp.c#5 edit .. //depot/projects/netperf/sys/sys/mbuf.h#3 edit Differences ... ==== //depot/projects/netperf/sys/kern/uipc_mbuf2.c#2 (text+ko) ==== @@ -381,6 +381,23 @@ m_tag_delete(m, p); } +/* + * Strip off all tags that would normally vanish when + * passing through a network interface. Only persistent + * tags will exist after this; these are expected to remain + * so long as the mbuf chain exists, regardless of the + * path the mbufs take. + */ +void +m_tag_delete_nonpersistent(struct mbuf *m) +{ + struct m_tag *p, *q; + + SLIST_FOREACH_SAFE(p, &m->m_pkthdr.tags, m_tag_link, q) + if ((p->m_tag_id & MTAG_PERSISTENT) == 0) + m_tag_delete(m, p); +} + /* Find a tag, starting from a given position. */ struct m_tag * m_tag_locate(struct mbuf *m, u_int32_t cookie, int type, struct m_tag *t) ==== //depot/projects/netperf/sys/net/if_loop.c#6 (text+ko) ==== @@ -266,6 +266,7 @@ int isr; M_ASSERTPKTHDR(m); + m_tag_delete_nonpersistent(m); m->m_pkthdr.rcvif = ifp; /* BPF write needs to be handled specially */ ==== //depot/projects/netperf/sys/netinet/ip_icmp.c#5 (text+ko) ==== @@ -728,6 +728,7 @@ bcopy((caddr_t)ip + optlen, (caddr_t)(ip + 1), (unsigned)(m->m_len - sizeof(struct ip))); } + m_tag_delete_nonpersistent(m); m->m_flags &= ~(M_BCAST|M_MCAST); icmp_send(m, opts, ro); done: ==== //depot/projects/netperf/sys/sys/mbuf.h#3 (text+ko) ==== @@ -498,6 +498,21 @@ * struct m_tag *mtag = &p->tag; */ +/* + * Persistent tags stay with an mbuf until the mbuf is reclaimed. + * Otherwise tags are expected to ``vanish'' when they pass through + * a network interface. For most interfaces this happens normally + * as the tags are reclaimed when the mbuf is free'd. However in + * some special cases reclaiming must be done manually. An example + * is packets that pass through the loopback interface. Also, one + * must be careful to do this when ``turning around'' packets (e.g. + * icmp_reflect). + * + * To mark a tag persistent bit-or this flag in when defining the + * tag id. The tag will then be treated as described above. + */ +#define MTAG_PERSISTENT 0x800 + #define PACKET_TAG_NONE 0 /* Nadda */ /* Packet tag for use with PACKET_ABI_COMPAT */ @@ -535,7 +550,7 @@ #define PACKET_TAG_IPFW 16 /* ipfw classification */ #define PACKET_TAG_DIVERT 17 /* divert info */ #define PACKET_TAG_IPFORWARD 18 /* ipforward info */ -#define PACKET_TAG_MACLABEL 19 /* MAC label */ +#define PACKET_TAG_MACLABEL (19 | MTAG_PERSISTENT) /* MAC label */ /* Packet tag routines */ struct m_tag *m_tag_alloc(u_int32_t, int, int, int); @@ -550,6 +565,7 @@ void m_tag_init(struct mbuf *); struct m_tag *m_tag_first(struct mbuf *); struct m_tag *m_tag_next(struct mbuf *, struct m_tag *); +void m_tag_delete_nonpersistent(struct mbuf *); /* these are for openbsd compatibility */ #define MTAG_ABI_COMPAT 0 /* compatibility ABI */ From owner-p4-projects@FreeBSD.ORG Tue Oct 7 12:15:23 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5E9A316A4C0; Tue, 7 Oct 2003 12:15:23 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 33B9116A4B3 for ; Tue, 7 Oct 2003 12:15:23 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBDE443FDD for ; Tue, 7 Oct 2003 12:15:21 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h97JFLXJ070009 for ; Tue, 7 Oct 2003 12:15:21 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h97JFLc2070006 for perforce@freebsd.org; Tue, 7 Oct 2003 12:15:21 -0700 (PDT) (envelope-from areisse@nailabs.com) Date: Tue, 7 Oct 2003 12:15:21 -0700 (PDT) Message-Id: <200310071915.h97JFLc2070006@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 39326 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2003 19:15:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=39326 Change 39326 by areisse@areisse_tislabs on 2003/10/07 12:15:06 Initial support for mountpoint labelling. New MAC checks: mount,umount,remount. New MAC syscall mac_get_fs() returns mount label. sebsd checks mount and associate permissions. temporary lmount() syscall allows specifing the mount label. mount updated to use lmount() for ufs. Affected files ... .. //depot/projects/trustedbsd/sebsd/sbin/mount/extern.h#2 edit .. //depot/projects/trustedbsd/sebsd/sbin/mount/mount.c#4 edit .. //depot/projects/trustedbsd/sebsd/sbin/mount/mount_ufs.c#2 edit .. //depot/projects/trustedbsd/sebsd/sys/compat/linux/linux_file.c#6 edit .. //depot/projects/trustedbsd/sebsd/sys/kern/kern_mac.c#12 edit .. //depot/projects/trustedbsd/sebsd/sys/kern/syscalls.master#5 edit .. //depot/projects/trustedbsd/sebsd/sys/kern/vfs_mount.c#5 edit .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/sebsd.c#22 edit .. //depot/projects/trustedbsd/sebsd/sys/sys/mac.h#9 edit .. //depot/projects/trustedbsd/sebsd/sys/sys/mac_policy.h#9 edit .. //depot/projects/trustedbsd/sebsd/sys/sys/mount.h#5 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/macros/global_macros.te#6 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/macros/user_macros.te#3 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/types/file.te#3 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/sbin/mount/extern.h#2 (text+ko) ==== @@ -31,4 +31,4 @@ const char **makevfslist(char *); /* mount_ufs.c */ -int mount_ufs(int, char *const *); +int mount_ufs(int, char *const *, const char *); ==== //depot/projects/trustedbsd/sebsd/sbin/mount/mount.c#4 (text+ko) ==== @@ -80,7 +80,7 @@ void mangle(char *, int *, const char **); char *update_options(char *, char *, int); int mountfs(const char *, const char *, const char *, - int, const char *, const char *); + int, const char *, const char *, const char *); void remopt(char *, const char *); void prmount(struct statfs *); void putfsent(const struct statfs *); @@ -136,12 +136,13 @@ pid_t pid; int all, ch, i, init_flags, mntsize, rval, have_fstab; char *cp, *ep, *options; + char *ltext = NULL; all = init_flags = 0; options = NULL; vfslist = NULL; vfstype = "ufs"; - while ((ch = getopt(argc, argv, "adF:fo:prwt:uv")) != -1) + while ((ch = getopt(argc, argv, "adF:fo:prwt:uvl:")) != -1) switch (ch) { case 'a': all = 1; @@ -181,6 +182,9 @@ case 'w': options = catopt(options, "noro"); break; + case 'l': + ltext = strdup (optarg); + break; case '?': default: usage(); @@ -211,7 +215,7 @@ continue; if (mountfs(fs->fs_vfstype, fs->fs_spec, fs->fs_file, init_flags, options, - fs->fs_mntops)) + fs->fs_mntops, NULL)) rval = 1; } } else if (fstab_style) { @@ -268,7 +272,7 @@ mntbuf->f_flags); } rval = mountfs(mntbuf->f_fstypename, mntfromname, - mntbuf->f_mntonname, init_flags, options, 0); + mntbuf->f_mntonname, init_flags, options, 0, NULL); break; } rmslashes(*argv, *argv); @@ -280,7 +284,7 @@ errx(1, "%s has unknown file system type", *argv); rval = mountfs(fs->fs_vfstype, fs->fs_spec, fs->fs_file, - init_flags, options, fs->fs_mntops); + init_flags, options, fs->fs_mntops, ltext); break; case 2: /* @@ -309,7 +313,7 @@ vfstype = "nfs"; } rval = mountfs(vfstype, - argv[0], argv[1], init_flags, options, NULL); + argv[0], argv[1], init_flags, options, NULL, ltext); break; default: usage(); @@ -389,8 +393,8 @@ } int -mountfs(vfstype, spec, name, flags, options, mntopts) - const char *vfstype, *spec, *name, *options, *mntopts; +mountfs(vfstype, spec, name, flags, options, mntopts, ltext) + const char *vfstype, *spec, *name, *options, *mntopts, *ltext; int flags; { const char *argv[100], **edir; @@ -462,7 +466,7 @@ return (1); case 0: /* Child. */ if (strcmp(vfstype, "ufs") == 0) - exit(mount_ufs(argc, (char * const *) argv)); + exit(mount_ufs(argc, (char * const *) argv, ltext)); /* Go find an executable. */ (void)snprintf(execname, sizeof(execname), "mount_%s", vfstype); ==== //depot/projects/trustedbsd/sebsd/sbin/mount/mount_ufs.c#2 (text+ko) ==== @@ -55,6 +55,7 @@ #include #include +#include #include "extern.h" #include "mntopts.h" @@ -72,13 +73,15 @@ }; int -mount_ufs(argc, argv) +mount_ufs(argc, argv, ltext) int argc; char * const argv[]; + const char *ltext; { struct ufs_args args; int ch, mntflags; char *fs_name; + int rc; mntflags = 0; optind = optreset = 1; /* Reset for parse of new argv. */ @@ -107,7 +110,20 @@ else args.export.ex_flags = 0; - if (mount("ufs", fs_name, mntflags, &args) < 0) { + if (ltext) { + mac_t mac; + rc = mac_from_text (&mac, ltext); + if (rc) { + warn("%s", ltext); + return 1; + } + + rc = syscall(396, "ufs", fs_name, mntflags, &args, mac); + } + else + rc = mount("ufs", fs_name, mntflags, &args); + + if (rc < 0) { switch (errno) { case EMFILE: warnx("%s on %s: mount table full", ==== //depot/projects/trustedbsd/sebsd/sys/compat/linux/linux_file.c#6 (text+ko) ==== @@ -801,7 +801,7 @@ fsflags |= MNT_UPDATE; } - return (vfs_mount(td, fstype, mntonname, fsflags, fsdata)); + return (vfs_mount(td, fstype, mntonname, fsflags, fsdata, NULL)); } int ==== //depot/projects/trustedbsd/sebsd/sys/kern/kern_mac.c#12 (text+ko) ==== @@ -1108,6 +1108,14 @@ } void +mac_init_mount_label(struct label *label) +{ + + mac_init_label(label); + MAC_PERFORM(init_mount_label, label); +} + +void mac_init_vnode(struct vnode *vp) { @@ -1318,6 +1326,14 @@ } void +mac_destroy_mount_label(struct label *label) +{ + + MAC_PERFORM(destroy_mount_label, label); + mac_destroy_label(label); +} + +void mac_copy_mbuf_tag(struct m_tag *src, struct m_tag *dest) { struct label *src_label, *dest_label; @@ -1346,6 +1362,12 @@ MAC_PERFORM(copy_vnode_label, src, dest); } +void +mac_copy_mount_label(struct label *src, struct label *dest) +{ + MAC_PERFORM(copy_mount_label, src, dest); +} + static int mac_check_structmac_consistent(struct mac *mac) { @@ -1424,6 +1446,17 @@ } static int +mac_externalize_mount_label(struct label *label, char *elements, + char *outbuf, size_t outbuflen, int flags) +{ + int error; + + MAC_EXTERNALIZE(mount_label, label, elements, outbuf, outbuflen); + + return (error); +} + +static int mac_internalize_cred_label(struct label *label, char *string) { int error; @@ -1473,6 +1506,16 @@ return (error); } +static int +mac_internalize_mount_label(struct label *label, char *string) +{ + int error; + + MAC_INTERNALIZE(mount_label, label, string); + + return (error); +} + /* * Initialize MAC label for the first kernel process, from which other * kernel processes and threads are spawned. @@ -2801,11 +2844,11 @@ } void -mac_create_mount(struct ucred *cred, struct mount *mp) +mac_create_mount(struct ucred *cred, struct mount *mp, struct label *mount_arg_label) { MAC_PERFORM(create_mount, cred, mp, &mp->mnt_mntlabel, - &mp->mnt_fslabel); + &mp->mnt_fslabel, mount_arg_label); } void @@ -3207,6 +3250,45 @@ } int +mac_check_mount(struct ucred *cred, struct vnode *vp, const char *vfc_name, struct label *mntlabel) +{ + int error; + + if (!mac_enforce_fs) + return (0); + + MAC_CHECK(check_mount, cred, vp, &vp->v_label, vfc_name, mntlabel); + + return (error); +} + +int +mac_check_umount(struct ucred *cred, struct mount *mp) +{ + int error; + + if (!mac_enforce_fs) + return (0); + + MAC_CHECK(check_umount, cred, mp, &mp->mnt_mntlabel); + + return (error); +} + +int +mac_check_remount(struct ucred *cred, struct mount *mp, struct label *mount_arg_label) +{ + int error; + + if (!mac_enforce_fs) + return (0); + + MAC_CHECK(check_remount, cred, mp, &mp->mnt_mntlabel, mount_arg_label); + + return (error); +} + +int mac_check_mount_stat(struct ucred *cred, struct mount *mount) { int error; @@ -4360,6 +4442,61 @@ return (error); } +int +__mac_get_fs(struct thread *td, struct __mac_get_fs_args *uap) +{ + char *elements, *buffer; + struct nameidata nd; + struct label intlabel; + struct mac mac; + int error; + struct mount *mp; + + error = copyin(uap->mac_p, &mac, sizeof(mac)); + if (error) + return (error); + + error = mac_check_structmac_consistent(&mac); + if (error) + return (error); + + elements = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK); + error = copyinstr(mac.m_string, elements, mac.m_buflen, NULL); + if (error) { + free(elements, M_MACTEMP); + return (error); + } + + buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK | M_ZERO); + mtx_lock(&Giant); /* VFS */ + NDINIT(&nd, LOOKUP, LOCKLEAF | FOLLOW, UIO_USERSPACE, uap->path_p, + td); + error = namei(&nd); + if (error) + goto out; + + mp = nd.ni_vp->v_mount; + + mac_init_mount_label(&intlabel); + mac_copy_mount_label(&mp->mnt_mntlabel, &intlabel); + error = mac_externalize_mount_label(&intlabel, elements, buffer, + mac.m_buflen, M_WAITOK); + + NDFREE(&nd, 0); + mac_destroy_mount_label(&intlabel); + + if (error == 0) + error = copyout(buffer, mac.m_string, strlen(buffer)+1); + +out: + mtx_unlock(&Giant); /* VFS */ + + free(buffer, M_MACTEMP); + free(elements, M_MACTEMP); + + return (error); +} + /* * MPSAFE */ @@ -4599,6 +4736,63 @@ return (error); } +int +lmount(td, uap) + struct thread *td; + struct lmount_args /* { + char *type; + char *path; + int flags; + caddr_t data; + } */ *uap; +{ + char *fstype; + char *fspath; + char *buffer; + int error; + struct mac mac; + struct label intlabel; + + error = copyin(uap->mac_p, &mac, sizeof(mac)); + if (error) + return (error); + + error = mac_check_structmac_consistent(&mac); + if (error) + return (error); + + buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK); + error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL); + if (error) { + free(buffer, M_MACTEMP); + return (error); + } + + mac_init_mount_label(&intlabel); + error = mac_internalize_mount_label(&intlabel, buffer); + free(buffer, M_MACTEMP); + if (error) { + mac_destroy_mount_label(&intlabel); + return (error); + } + + fstype = malloc(MFSNAMELEN, M_TEMP, M_WAITOK); + fspath = malloc(MNAMELEN, M_TEMP, M_WAITOK); + + /* + * vfs_mount() actually takes a kernel string for `type' and + * `path' now, so extract them. + */ + error = copyinstr(uap->type, fstype, MFSNAMELEN, NULL); + if (error == 0) + error = copyinstr(uap->path, fspath, MNAMELEN, NULL); + if (error == 0) + error = vfs_mount(td, fstype, fspath, uap->flags, uap->data, &intlabel); + free(fstype, M_TEMP); + free(fspath, M_TEMP); + return (error); +} + SYSINIT(mac, SI_SUB_MAC, SI_ORDER_FIRST, mac_init, NULL); SYSINIT(mac_late, SI_SUB_MAC_LATE, SI_ORDER_FIRST, mac_late_init, NULL); @@ -4674,4 +4868,12 @@ return (ENOSYS); } +int +lmount(td, uap) + struct thread *td; + struct lmount_args *uap; +{ + return EINVAL; +} + #endif /* !MAC */ ==== //depot/projects/trustedbsd/sebsd/sys/kern/syscalls.master#5 (text+ko) ==== @@ -574,8 +574,9 @@ struct sf_hdtr *hdtr, off_t *sbytes, int flags); } 394 MSTD BSD { int mac_syscall(const char *policy, int call, \ void *arg); } -395 UNIMPL NOHIDE nosys -396 UNIMPL NOHIDE nosys +395 MSTD BSD { int __mac_get_fs(const char *path_p, struct mac *mac_p); } +396 STD BSD { int lmount(char *type, char *path, int flags, \ + caddr_t data, struct mac *mac_p); } 397 UNIMPL NOHIDE nosys 398 UNIMPL NOHIDE nosys 399 UNIMPL NOHIDE nosys ==== //depot/projects/trustedbsd/sebsd/sys/kern/vfs_mount.c#5 (text+ko) ==== @@ -682,7 +682,7 @@ mp->mnt_iosize_max = DFLTPHYS; #ifdef MAC mac_init_mount(mp); - mac_create_mount(td->td_ucred, mp); + mac_create_mount(td->td_ucred, mp, NULL); #endif VOP_UNLOCK(vp, 0, td); mp->mnt_optnew = optlist; /* XXXMAC: should this be above? */ @@ -848,7 +848,7 @@ if (error == 0) error = copyinstr(uap->path, fspath, MNAMELEN, NULL); if (error == 0) - error = vfs_mount(td, fstype, fspath, uap->flags, uap->data); + error = vfs_mount(td, fstype, fspath, uap->flags, uap->data, NULL); free(fstype, M_TEMP); free(fspath, M_TEMP); return (error); @@ -863,12 +863,13 @@ * into userspace. */ int -vfs_mount(td, fstype, fspath, fsflags, fsdata) +vfs_mount(td, fstype, fspath, fsflags, fsdata, mntlabel) struct thread *td; const char *fstype; char *fspath; int fsflags; void *fsdata; + struct label *mntlabel; { linker_file_t lf; struct vnode *vp; @@ -940,6 +941,13 @@ return (error); } } +#ifdef MAC + error = mac_check_remount (td->td_ucred, mp, mntlabel); + if (error) { + vput(vp); + return (error); + } +#endif if (vfs_busy(mp, LK_NOWAIT, 0, td)) { vput(vp); return (EBUSY); @@ -1017,6 +1025,13 @@ return (ENODEV); } } +#ifdef MAC + error = mac_check_mount (td->td_ucred, vp, vfsp->vfc_name, mntlabel); + if (error) { + vput(vp); + return (error); + } +#endif VI_LOCK(vp); if ((vp->v_iflag & VI_MOUNT) != 0 || vp->v_mountedhere != NULL) { @@ -1049,7 +1064,7 @@ mp->mnt_iosize_max = DFLTPHYS; #ifdef MAC mac_init_mount(mp); - mac_create_mount(td->td_ucred, mp); + mac_create_mount(td->td_ucred, mp, mntlabel); #endif VOP_UNLOCK(vp, 0, td); update: @@ -1272,6 +1287,12 @@ return (error); } +#ifdef MAC + error = mac_check_umount (td->td_ucred, mp); + if (error) + return (error); +#endif + /* * Don't allow unmounting the root filesystem. */ @@ -1426,7 +1447,7 @@ strlcpy(mp->mnt_stat.f_mntfromname, devname, MNAMELEN); #ifdef MAC mac_init_mount(mp); - mac_create_mount(td->td_ucred, mp); + mac_create_mount(td->td_ucred, mp, NULL); #endif *mpp = mp; return (0); ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/sebsd.c#22 (text+ko) ==== @@ -696,9 +696,9 @@ static void sebsd_create_mount(struct ucred *cred, struct mount *mp, - struct label *mntlabel, struct label *fslabel) + struct label *mntlabel, struct label *fslabel, struct label *mount_arg_label) { - struct mount_security_struct *sbsec; + struct mount_security_struct *sbsec, *mntsec; struct mount_fs_security_struct *sbfssec; int behavior, rc; @@ -763,6 +763,11 @@ behavior = SECURITY_FS_USE_NONE; break; } + + if (mount_arg_label) { + mntsec = SLOT(mount_arg_label); + sbsec->sid = mntsec->sid; + } } /* @@ -859,6 +864,45 @@ } static int +sebsd_check_mount (struct ucred *cred, struct vnode *vp, struct label *vl, + const char *vfc_name, struct label *mntlabel) +{ + int rc; + security_id_t sid; + int behavior; + struct vnode_security_struct *vsec; + struct task_security_struct *task; + struct mount_security_struct *sbsec; + + vsec = SLOT(vl); + task = SLOT(&cred->cr_label); + + rc = vnode_has_perm (cred, vp, FILE__MOUNTON, NULL); + if (rc) + return rc; + + if (mntlabel) { + sbsec = SLOT(mntlabel); + sid = sbsec->sid; + + rc = avc_has_perm_ref_audit (task->sid, sid, SECCLASS_FILE, + COMMON_FILE__RELABELTO, NULL, NULL); + if (rc) + return rc; + } + else { + rc = security_fs_use (vfc_name, &behavior, &sid); + if (rc) + return rc; + } + + rc = avc_has_perm_ref_audit (task->sid, sid, SECCLASS_FILESYSTEM, + FILESYSTEM__MOUNT, NULL, NULL); + + return rc; +} + +static int sebsd_check_mount_stat(struct ucred *cred, struct mount *mp, struct label *mntlabel) { @@ -867,6 +911,28 @@ } static int +sebsd_check_remount(struct ucred *cred, struct mount *mp, struct label *mntlabel, + struct label *mount_arg_label) +{ + + /* cannot change labels on filesystems */ + if (mount_arg_label) { + struct mount_security_struct *mla = SLOT(mntlabel); + struct mount_security_struct *mlb = SLOT(mount_arg_label); + if (mla->sid != mlb->sid) + return EINVAL; + } + return (mount_has_perm(cred, mp, FILESYSTEM__REMOUNT, NULL)); +} + +static int +sebsd_check_umount(struct ucred *cred, struct mount *mp, struct label *mntlabel) +{ + + return (mount_has_perm(cred, mp, FILESYSTEM__UNMOUNT, NULL)); +} + +static int sebsd_check_pipe_ioctl(struct ucred *cred, struct pipe *pipe, struct label *pipelabel, unsigned long cmd, void /* caddr_t */ *data) { @@ -1098,6 +1164,17 @@ claimed)); } +static int +sebsd_internalize_mount_label(struct label *label, char *element_name, + char *element_data, int *claimed) +{ + struct mount_security_struct *vsec; + + vsec = SLOT(label); + return (sebsd_internalize_sid(&vsec->sid, element_name, element_data, + claimed)); +} + static void sebsd_relabel_pipe(struct ucred *cred, struct pipe *pipe, struct label *pipelabel, struct label *newlabel) @@ -1201,6 +1278,7 @@ { struct task_security_struct *task; struct vnode_security_struct *dir; + struct mount_security_struct *sbsec; security_class_t tclass; security_id_t newsid; struct avc_audit_data ad; @@ -1228,16 +1306,14 @@ if (rc) return rc; -#ifdef notdef - /* - * TBD: - * No support yet. - */ - if (dir->i_sb) { - sbsec = dir->i_sb->s_security; - rc = avc_has_perm_audit(newsid, sbsec->sid, SECCLASS_FILESYSTEM, - FILESYSTEM__ASSOCIATE, &ad); -#endif + if (dvp->v_mount) { + /* XXX: mpo_check_vnode_create should probably pass the mntlabel */ + sbsec = SLOT (&dvp->v_mount->mnt_mntlabel); + rc = avc_has_perm_audit(newsid, sbsec->sid, SECCLASS_FILESYSTEM, + FILESYSTEM__ASSOCIATE, &ad); + if (rc) + return rc; + } return 0; } @@ -1449,6 +1525,7 @@ struct label *oldlabel, struct label *newlabel) { struct task_security_struct *task; + struct mount_security_struct *sbsec; struct vnode_security_struct *old, *new; struct avc_audit_data ad; int rc; @@ -1475,11 +1552,15 @@ if (rc) return (rc); - /* - * TBD: - * SELinux also checks the superblock for class SECCLASS_FILESYSTEM - * and permission FILESYSTEM__ASSOCIATE - */ + + if (vp->v_mount) { + /* XXX: mpo_check_vnode_relabel should probably pass the mntlabel */ + sbsec = SLOT (&vp->v_mount->mnt_mntlabel); + rc = avc_has_perm_audit (new->sid, sbsec->sid, SECCLASS_FILESYSTEM, + FILESYSTEM__ASSOCIATE, &ad); + if (rc) + return rc; + } return 0; } @@ -1767,6 +1848,16 @@ } static int +sebsd_externalize_mount_label(struct label *label, char *element_name, + struct sbuf *sb, int *claimed) +{ + struct mount_security_struct *vsec; + + vsec = SLOT(label); + return (sebsd_externalize_sid(vsec->sid, element_name, sb, claimed)); +} + +static int sebsd_externalize_network_label(struct label *label, char *element_name, struct sbuf *sb, int *claimed) { @@ -1784,6 +1875,14 @@ *(struct vnode_security_struct *)SLOT(src); } +static void +sebsd_copy_mount_label(struct label *src, struct label *dest) +{ + + *(struct mount_security_struct *)SLOT(dest) = + *(struct mount_security_struct *)SLOT(src); +} + static int sebsd_check_file_create(struct ucred *cred) { @@ -1913,6 +2012,7 @@ /* Copy labels */ .mpo_copy_pipe_label = sebsd_copy_vnode_label, .mpo_copy_vnode_label = sebsd_copy_vnode_label, + .mpo_copy_mount_label = sebsd_copy_mount_label, /* In/Out */ .mpo_externalize_cred_label = sebsd_externalize_cred_label, @@ -1921,11 +2021,13 @@ .mpo_externalize_socket_label = sebsd_externalize_network_label, .mpo_externalize_socket_peer_label = sebsd_externalize_network_label, .mpo_externalize_vnode_label = sebsd_externalize_vnode_label, + .mpo_externalize_mount_label = sebsd_externalize_mount_label, .mpo_internalize_cred_label = sebsd_internalize_cred_label, .mpo_internalize_ifnet_label = sebsd_internalize_network_label, .mpo_internalize_pipe_label = sebsd_internalize_vnode_label, .mpo_internalize_socket_label = sebsd_internalize_network_label, .mpo_internalize_vnode_label = sebsd_internalize_vnode_label, + .mpo_internalize_mount_label = sebsd_internalize_mount_label, #ifdef notdef void (*mpo_create_mbuf_from_socket)(struct socket *so, @@ -1981,6 +2083,9 @@ .mpo_check_file_change_flags = sebsd_check_file_change_flags, .mpo_check_file_change_ofileflags = sebsd_check_file_change_ofileflags, .mpo_check_file_change_offset = sebsd_check_file_change_offset, + .mpo_check_mount = sebsd_check_mount, + .mpo_check_umount = sebsd_check_umount, + .mpo_check_remount = sebsd_check_remount, .mpo_check_mount_stat = sebsd_check_mount_stat, .mpo_check_pipe_ioctl = sebsd_check_pipe_ioctl, ==== //depot/projects/trustedbsd/sebsd/sys/sys/mac.h#9 (text+ko) ==== @@ -157,8 +157,10 @@ void mac_init_proc(struct proc *); void mac_init_vnode(struct vnode *); void mac_init_vnode_label(struct label *); +void mac_init_mount_label(struct label *); void mac_copy_mbuf_tag(struct m_tag *, struct m_tag *); void mac_copy_vnode_label(struct label *, struct label *label); +void mac_copy_mount_label(struct label *, struct label *label); void mac_destroy_bpfdesc(struct bpf_d *); void mac_destroy_cred(struct ucred *); void mac_destroy_devfsdirent(struct devfs_dirent *); @@ -177,6 +179,7 @@ void mac_destroy_mount(struct mount *); void mac_destroy_vnode(struct vnode *); void mac_destroy_vnode_label(struct label *); +void mac_destroy_mount_label(struct label *); /* * Labeling event operations: file system objects, and things that @@ -196,7 +199,7 @@ void mac_create_file(struct ucred *cred, struct file *fp); int mac_create_vnode_extattr(struct ucred *cred, struct mount *mp, struct vnode *dvp, struct vnode *vp, struct componentname *cnp); -void mac_create_mount(struct ucred *cred, struct mount *mp); +void mac_create_mount(struct ucred *cred, struct mount *mp, struct label *mount_arg_label); void mac_create_root_mount(struct ucred *cred, struct mount *mp); void mac_relabel_vnode(struct ucred *cred, struct vnode *vp, struct label *newlabel); @@ -338,6 +341,11 @@ int mac_check_kld_load(struct ucred *cred, struct vnode *vp); int mac_check_kld_stat(struct ucred *cred); int mac_check_kld_unload(struct ucred *cred); +int mac_check_mount(struct ucred *cred, struct vnode *dir, const char *vfc_name, + struct label *mount_arg_label); +int mac_check_remount(struct ucred *cred, struct mount *mp, + struct label *mount_arg_label); +int mac_check_umount(struct ucred *cred, struct mount *mp); int mac_check_mount_stat(struct ucred *cred, struct mount *mp); int mac_check_pipe_ioctl(struct ucred *cred, struct pipe *pipe, unsigned long cmd, void *data); ==== //depot/projects/trustedbsd/sebsd/sys/sys/mac_policy.h#9 (text+ko) ==== @@ -130,6 +130,8 @@ struct label *dest); void (*mpo_copy_vnode_label)(struct label *src, struct label *dest); + void (*mpo_copy_mount_label)(struct label *src, + struct label *dest); int (*mpo_externalize_cred_label)(struct label *label, char *element_name, struct sbuf *sb, int *claimed); int (*mpo_externalize_ifnet_label)(struct label *label, @@ -142,6 +144,8 @@ char *element_name, struct sbuf *sb, int *claimed); int (*mpo_externalize_vnode_label)(struct label *label, char *element_name, struct sbuf *sb, int *claimed); + int (*mpo_externalize_mount_label)(struct label *label, + char *element_name, struct sbuf *sb, int *claimed); int (*mpo_internalize_cred_label)(struct label *label, char *element_name, char *element_data, int *claimed); int (*mpo_internalize_ifnet_label)(struct label *label, @@ -152,6 +156,8 @@ char *element_name, char *element_data, int *claimed); int (*mpo_internalize_vnode_label)(struct label *label, char *element_name, char *element_data, int *claimed); + int (*mpo_internalize_mount_label)(struct label *label, + char *element_name, char *element_data, int *claimed); /* * Labeling event operations: file system objects, and things that @@ -186,7 +192,7 @@ struct vnode *vp, struct label *vlabel, struct componentname *cnp); void (*mpo_create_mount)(struct ucred *cred, struct mount *mp, - struct label *mntlabel, struct label *fslabel); + struct label *mntlabel, struct label *fslabel, struct label *mount_arg_label); void (*mpo_create_root_mount)(struct ucred *cred, struct mount *mp, struct label *mountlabel, struct label *fslabel); void (*mpo_relabel_vnode)(struct ucred *cred, struct vnode *vp, @@ -335,7 +341,7 @@ struct label *ifnetlabel); int (*mpo_check_cap) (struct ucred *ucred, cap_value_t capv); int (*mpo_check_cred_relabel)(struct ucred *cred, - struct label *newlabel); + struct label *newlabel); int (*mpo_check_cred_visible)(struct ucred *u1, struct ucred *u2); int (*mpo_check_file_create)(struct ucred *cred); int (*mpo_check_file_dup)(struct ucred *cred, struct file *fp, @@ -403,6 +409,11 @@ struct label *vlabel); int (*mpo_check_kld_stat)(struct ucred *cred); int (*mpo_check_kld_unload)(struct ucred *cred); + int (*mpo_check_mount)(struct ucred *cred, struct vnode *dir, + struct label *dirlabel, const char *vfc_name, struct label *mount_arg_label); + int (*mpo_check_remount)(struct ucred *cred, struct mount *mp, struct label *ml, + struct label *mount_arg_label); + int (*mpo_check_umount)(struct ucred *cred, struct mount *mp, struct label *ml); int (*mpo_check_mount_stat)(struct ucred *cred, struct mount *mp, struct label *mntlabel); int (*mpo_check_pipe_ioctl)(struct ucred *cred, struct pipe *pipe, ==== //depot/projects/trustedbsd/sebsd/sys/sys/mount.h#5 (text+ko) ==== @@ -368,6 +368,7 @@ */ struct mount_args; struct nameidata; +struct label; typedef int vfs_mount_t(struct mount *mp, char *path, caddr_t data, struct nameidata *ndp, struct thread *td); @@ -460,7 +461,7 @@ int vfs_getopt(struct vfsoptlist *, const char *, void **, int *); int vfs_copyopt(struct vfsoptlist *, const char *, void *, int); int vfs_mount(struct thread *td, const char *type, char *path, - int flags, void *data); + int flags, void *data, struct label *mntlabel); int vfs_setpublicfs /* set publicly exported fs */ (struct mount *, struct netexport *, struct export_args *); int vfs_lock(struct mount *); /* lock a vfs */ ==== //depot/projects/trustedbsd/sebsd_policy/policy/macros/global_macros.te#6 (text+ko) ==== @@ -640,7 +640,10 @@ type $1_devpts_t, file_type, sysadmfile, ptyfile $2; # Allow the pty to be associated with the file system. -allow $1_devpts_t devpts_t:filesystem associate; +#allow $1_devpts_t devpts_t:filesystem associate; + +# FreeBSD doesn't use /dev/pts. +allow $1_devpts_t device_t:filesystem associate; # Label pty files with a derived type. type_transition $1_t devpts_t:chr_file $1_devpts_t; ==== //depot/projects/trustedbsd/sebsd_policy/policy/macros/user_macros.te#3 (text+ko) ==== @@ -45,6 +45,8 @@ # Access ttys. allow $1_t privfd:fd use; allow $1_t $1_tty_device_t:chr_file { poll setattr rw_file_perms }; +allow $1_tty_device_t device_t:filesystem associate; + # Use the type when relabeling terminal devices. type_change $1_t tty_device_t:chr_file $1_tty_device_t; ifdef(`dpkg.te', ` ==== //depot/projects/trustedbsd/sebsd_policy/policy/types/file.te#3 (text+ko) ==== @@ -255,6 +255,7 @@ # Allow the pty to be associated with the file system. allow devpts_t devpts_t:filesystem associate; +allow tty_device_t device_t:filesystem associate; type tmpfs_t, file_type, sysadmfile, fs_type, root_dir_type; allow { tmpfs_t tmp_t } tmpfs_t:filesystem associate; From owner-p4-projects@FreeBSD.ORG Tue Oct 7 13:18:42 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5A2C916A4C1; Tue, 7 Oct 2003 13:18:42 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 16D0116A4BF for ; Tue, 7 Oct 2003 13:18:42 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C250143F85 for ; Tue, 7 Oct 2003 13:18:40 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h97KIeXJ079334 for ; Tue, 7 Oct 2003 13:18:40 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h97KIev7079331 for perforce@freebsd.org; Tue, 7 Oct 2003 13:18:40 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Tue, 7 Oct 2003 13:18:40 -0700 (PDT) Message-Id: <200310072018.h97KIev7079331@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39330 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2003 20:18:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=39330 Change 39330 by sam@sam_ebb on 2003/10/07 13:18:06 pfil hooks can modify packet contents so check if the destination address has been changed when PFIL_HOOKS is enabled and, if it has, arrange for the proper action by ip*_forward. Submitted by: Pyun YongHyeon Affected files ... .. //depot/projects/netperf/sys/netinet/ip_input.c#10 edit .. //depot/projects/netperf/sys/netinet6/ip6_input.c#7 edit Differences ... ==== //depot/projects/netperf/sys/netinet/ip_input.c#10 (text+ko) ==== @@ -360,6 +360,10 @@ u_int32_t divert_info = 0; /* packet divert/tee info */ struct ip_fw_args args; struct route cro; /* copy of cached route */ + int srcrt = 0; /* forward by ``src routing'' */ +#ifdef PFIL_HOOKS + struct in_addr odst; /* original dst address */ +#endif #ifdef FAST_IPSEC struct m_tag *mtag; struct tdb_ident *tdbi; @@ -516,13 +520,19 @@ #ifdef PFIL_HOOKS /* * Run through list of hooks for input packets. + * + * NB: Beware of the destination address changing (e.g. + * by NAT rewriting). When this happens, tell + * ip_forward to do the right thing. */ + odst = ip->ip_dst; if (pfil_run_hooks(&inet_pfil_hook, &m, m->m_pkthdr.rcvif, PFIL_IN) != 0) return; if (m == NULL) /* consumed by filter */ return; ip = mtod(m, struct ip *); + srcrt = (odst.s_addr != ip->ip_dst.s_addr); #endif /* PFIL_HOOKS */ if (fw_enable && IPFW_LOADED) { @@ -759,7 +769,7 @@ } #endif /* FAST_IPSEC */ RTCACHE_GET(&cro); - ip_forward(m, &cro, 0, args.next_hop); + ip_forward(m, &cro, srcrt, args.next_hop); } return; ==== //depot/projects/netperf/sys/netinet6/ip6_input.c#7 (text+ko) ==== @@ -247,6 +247,10 @@ u_int32_t rtalert = ~0; int nxt, ours = 0; struct ifnet *deliverifp = NULL; +#ifdef PFIL_HOOKS + struct in6_addr odst; +#endif + int srcrt = 0; mtx_assert(&Giant, MA_NOTOWNED); mtx_lock(&Giant); @@ -346,7 +350,12 @@ #ifdef PFIL_HOOKS /* * Run through list of hooks for input packets. + * + * NB: Beware of the destination address changing + * (e.g. by NAT rewriting). When this happens, + * tell ip6_forward to do the right thing. */ + odst = ip6->ip6_dst; if (pfil_run_hooks(&inet6_pfil_hook, &m, m->m_pkthdr.rcvif, PFIL_IN)) { mtx_unlock(&Giant); return; @@ -356,6 +365,7 @@ return; } ip6 = mtod(m, struct ip6_hdr *); + srcrt = !IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst); #endif /* PFIL_HOOKS */ ip6stat.ip6s_nxthist[ip6->ip6_nxt]++; @@ -764,7 +774,7 @@ return; } } else if (!ours) { - ip6_forward(m, 0); + ip6_forward(m, srcrt); mtx_unlock(&Giant); return; } From owner-p4-projects@FreeBSD.ORG Tue Oct 7 13:52:25 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1C7F216A4C0; Tue, 7 Oct 2003 13:52:25 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0A1B16A4B3 for ; Tue, 7 Oct 2003 13:52:24 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9491B43FE0 for ; Tue, 7 Oct 2003 13:52:23 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h97KqNXJ080916 for ; Tue, 7 Oct 2003 13:52:23 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h97KqMoB080913 for perforce@freebsd.org; Tue, 7 Oct 2003 13:52:22 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Tue, 7 Oct 2003 13:52:22 -0700 (PDT) Message-Id: <200310072052.h97KqMoB080913@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39333 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2003 20:52:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=39333 Change 39333 by sam@sam_ebb on 2003/10/07 13:51:54 must lock route when the caller provided a route but not interface; otherwise the subsequent unlock blows up Affected files ... .. //depot/projects/netperf/sys/netinet6/ip6_output.c#10 edit Differences ... ==== //depot/projects/netperf/sys/netinet6/ip6_output.c#10 (text+ko) ==== @@ -609,6 +609,7 @@ /* XXX in6_ifstat_inc(ifp, ifs6_out_discard); */ goto bad; } + /* XXX rt not locked */ ia = ifatoia6(ro->ro_rt->rt_ifa); ifp = ro->ro_rt->rt_ifp; ro->ro_rt->rt_use++; @@ -694,10 +695,11 @@ * ``net'' ff00::/8). */ if (ifp == NULL) { - if (ro->ro_rt == 0) { + if (ro->ro_rt == 0) ro->ro_rt = rtalloc1((struct sockaddr *) &ro->ro_dst, 0, 0UL); - } + else + RT_LOCK(ro->ro_rt); if (ro->ro_rt == 0) { ip6stat.ip6s_noroute++; error = EHOSTUNREACH; From owner-p4-projects@FreeBSD.ORG Tue Oct 7 19:44:34 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7FF6A16A4C0; Tue, 7 Oct 2003 19:44:34 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A22C16A4B3 for ; Tue, 7 Oct 2003 19:44:34 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFC3C43FD7 for ; Tue, 7 Oct 2003 19:44:33 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h982iXXJ006739 for ; Tue, 7 Oct 2003 19:44:33 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h982iXuv006736 for perforce@freebsd.org; Tue, 7 Oct 2003 19:44:33 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Date: Tue, 7 Oct 2003 19:44:33 -0700 (PDT) Message-Id: <200310080244.h982iXuv006736@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to Hrishikesh_Dandekar@NAI.com using -f From: Hrishikesh Dandekar To: Perforce Change Reviews Subject: PERFORCE change 39341 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2003 02:44:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=39341 Change 39341 by hdandeka@hdandeka_yash on 2003/10/07 19:44:16 mac_prepare prototype fix. Affected files ... .. //depot/projects/trustedbsd/sebsd/lib/libc/posix1e/mac.c#4 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/lib/libc/posix1e/mac.c#4 (text+ko) ==== @@ -331,7 +331,7 @@ } int -mac_prepare(struct mac **mac, char *elements) +mac_prepare(struct mac **mac, const char *elements) { if (strlen(elements) >= MAC_MAX_LABEL_BUF_LEN) From owner-p4-projects@FreeBSD.ORG Wed Oct 8 10:35:39 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CCBD316A4C0; Wed, 8 Oct 2003 10:35:38 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4A1416A4B3 for ; Wed, 8 Oct 2003 10:35:38 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1664C43FB1 for ; Wed, 8 Oct 2003 10:35:38 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h98HZbXJ079029 for ; Wed, 8 Oct 2003 10:35:37 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h98HZbiS079026 for perforce@freebsd.org; Wed, 8 Oct 2003 10:35:37 -0700 (PDT) (envelope-from areisse@nailabs.com) Date: Wed, 8 Oct 2003 10:35:37 -0700 (PDT) Message-Id: <200310081735.h98HZbiS079026@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 39357 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2003 17:35:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=39357 Change 39357 by areisse@areisse_tislabs on 2003/10/08 10:35:05 small policy tweaks. runtime.fc: Fix files that get created with bad labels because of booting without sebsd. Affected files ... .. //depot/projects/trustedbsd/sebsd_policy/policy/Makefile#5 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/cleanvar.te#3 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/unused/apache.te#3 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/apache.fc#3 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/save-entropy.fc#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/runtime.fc#1 add .. //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/types.fc#4 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/types/file.te#4 edit Differences ... ==== //depot/projects/trustedbsd/sebsd_policy/policy/Makefile#5 (text+ko) ==== @@ -45,7 +45,7 @@ UNUSED_TE_FILES := $(wildcard domains/program/unused/*.te) FC = file_contexts/file_contexts -FCFILES=file_contexts/types.fc $(patsubst domains/program/%.te,file_contexts/program/%.fc, $(wildcard domains/program/*.te)) +FCFILES=file_contexts/types.fc file_contexts/runtime.fc $(patsubst domains/program/%.te,file_contexts/program/%.fc, $(wildcard domains/program/*.te)) APPDIR=$(DESTDIR)/etc/security APPFILES = $(addprefix $(APPDIR)/,default_contexts default_type initrc_context) ==== //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/cleanvar.te#3 (text+ko) ==== @@ -19,5 +19,6 @@ allow cleanvar_t { var_t etc_t bin_t sbin_t root_t } :dir r_dir_perms; allow cleanvar_t self:capability dac_override; +allow cleanvar_t fs_t:filesystem { getattr }; can_exec(cleanvar_t, bin_t) general_domain_access(cleanvar_t) #!!! ==== //depot/projects/trustedbsd/sebsd_policy/policy/domains/program/unused/apache.te#3 (text+ko) ==== @@ -410,6 +410,7 @@ #################################################### allow httpd_t httpd_log_files_t:dir rw_dir_perms; allow httpd_t httpd_log_files_t:file create_file_perms; +file_type_auto_trans(httpd_t, var_log_t, httpd_log_files_t) ############################################ # Allow scripts to append to http logs ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/apache.fc#3 (text+ko) ==== @@ -9,7 +9,7 @@ #/usr/sbin/suexec system_u:object_r:httpd_suexec_exec_t #/usr/lib/cgi-bin/(nph-)?cgiwrap(d)? system_u:object_r:httpd_suexec_exec_t #/usr/lib/apache(2)?/suexec(2)? system_u:object_r:httpd_suexec_exec_t -/var/log/httpd(/.*)? system_u:object_r:httpd_log_files_t +/var/log/httpd-.* system_u:object_r:httpd_log_files_t #/var/log/apache(2)?(/.*)? system_u:object_r:httpd_log_files_t #/var/log/cgiwrap\.log.* system_u:object_r:httpd_log_files_t #/var/cache/ssl.*\.sem system_u:object_r:httpd_cache_t ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/program/save-entropy.fc#2 (text+ko) ==== @@ -1,2 +1,2 @@ /usr/libexec/save-entropy system_u:object_r:save_entropy_exec_t -/var/db/entropy system_u:object_r:var_db_entropy_t +/var/db/entropy(/.*)? system_u:object_r:var_db_entropy_t ==== //depot/projects/trustedbsd/sebsd_policy/policy/file_contexts/types.fc#4 (text+ko) ==== @@ -83,9 +83,6 @@ /home system_u:object_r:home_root_t /home/[^/]+ -d system_u:object_r:user_home_dir_t /home/[^/]+/.+ system_u:object_r:user_home_t -/usr/home system_u:object_r:home_root_t -/usr/home/[^/]+ -d system_u:object_r:user_home_dir_t -/usr/home/[^/]+/.+ system_u:object_r:user_home_t # # Other staff home directories, replace "jadmin" with appropriate name @@ -206,6 +203,10 @@ /usr/man(/.*)? system_u:object_r:man_t /usr/share/man(/.*)? system_u:object_r:man_t +/usr/home system_u:object_r:home_root_t +/usr/home/[^/]+ -d system_u:object_r:user_home_dir_t +/usr/home/[^/]+/.+ system_u:object_r:user_home_t + # # /usr/bin # ==== //depot/projects/trustedbsd/sebsd_policy/policy/types/file.te#4 (text+ko) ==== @@ -256,6 +256,7 @@ # Allow the pty to be associated with the file system. allow devpts_t devpts_t:filesystem associate; allow tty_device_t device_t:filesystem associate; +allow device_t device_t:filesystem associate; type tmpfs_t, file_type, sysadmfile, fs_type, root_dir_type; allow { tmpfs_t tmp_t } tmpfs_t:filesystem associate; From owner-p4-projects@FreeBSD.ORG Wed Oct 8 11:20:36 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AEA4716A4C0; Wed, 8 Oct 2003 11:20:35 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8744C16A4B3 for ; Wed, 8 Oct 2003 11:20:35 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C79343FBF for ; Wed, 8 Oct 2003 11:20:34 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h98IKYXJ082025 for ; Wed, 8 Oct 2003 11:20:34 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h98IKXYG082022 for perforce@freebsd.org; Wed, 8 Oct 2003 11:20:33 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Wed, 8 Oct 2003 11:20:33 -0700 (PDT) Message-Id: <200310081820.h98IKXYG082022@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39360 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2003 18:20:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=39360 Change 39360 by sam@sam_ebb on 2003/10/08 11:19:52 IFC Affected files ... .. //depot/projects/netperf/sys/cam/scsi/scsi_cd.c#8 integrate .. //depot/projects/netperf/sys/cam/scsi/scsi_da.c#11 integrate .. //depot/projects/netperf/sys/dev/an/if_an_pccard.c#3 integrate .. //depot/projects/netperf/sys/dev/ata/ata-all.c#6 integrate .. //depot/projects/netperf/sys/dev/ata/ata-card.c#4 integrate .. //depot/projects/netperf/sys/dev/ata/ata-dma.c#7 integrate .. //depot/projects/netperf/sys/dev/ata/ata-lowlevel.c#6 integrate .. //depot/projects/netperf/sys/dev/ata/ata-queue.c#4 integrate .. //depot/projects/netperf/sys/dev/cardbus/cardbus_cis.c#5 integrate .. //depot/projects/netperf/sys/dev/cardbus/cardbus_cis.h#2 integrate .. //depot/projects/netperf/sys/dev/exca/exca.c#5 integrate .. //depot/projects/netperf/sys/dev/kbd/atkbd.c#3 integrate .. //depot/projects/netperf/sys/dev/pccard/card_if.m#3 integrate .. //depot/projects/netperf/sys/dev/pccard/pccard.c#6 integrate .. //depot/projects/netperf/sys/dev/pccard/pccard_cis.c#4 integrate .. //depot/projects/netperf/sys/dev/pccard/pccard_cis.h#1 branch .. //depot/projects/netperf/sys/dev/pccard/pccard_cis_quirks.c#4 integrate .. //depot/projects/netperf/sys/dev/pccard/pccarddevs#7 integrate .. //depot/projects/netperf/sys/dev/pccard/pccarddevs.h#7 integrate .. //depot/projects/netperf/sys/dev/pccard/pccardreg.h#2 integrate .. //depot/projects/netperf/sys/dev/sio/sio_pccard.c#4 integrate .. //depot/projects/netperf/sys/dev/uart/uart_bus_pccard.c#4 integrate .. //depot/projects/netperf/sys/geom/bde/g_bde.h#2 integrate .. //depot/projects/netperf/sys/geom/bde/g_bde_lock.c#2 integrate .. //depot/projects/netperf/sys/net/net_osdep.c#2 integrate .. //depot/projects/netperf/sys/net/route.c#13 integrate .. //depot/projects/netperf/sys/netinet/icmp6.h#3 integrate .. //depot/projects/netperf/sys/netinet/in_gif.c#2 integrate .. //depot/projects/netperf/sys/netinet/in_gif.h#2 integrate .. //depot/projects/netperf/sys/netinet6/ah_core.c#2 integrate .. //depot/projects/netperf/sys/netinet6/ah_output.c#3 integrate .. //depot/projects/netperf/sys/netinet6/dest6.c#2 integrate .. //depot/projects/netperf/sys/netinet6/esp_core.c#2 integrate .. //depot/projects/netperf/sys/netinet6/esp_input.c#2 integrate .. //depot/projects/netperf/sys/netinet6/esp_output.c#2 integrate .. //depot/projects/netperf/sys/netinet6/frag6.c#4 integrate .. //depot/projects/netperf/sys/netinet6/icmp6.c#5 integrate .. //depot/projects/netperf/sys/netinet6/in6.c#6 integrate .. //depot/projects/netperf/sys/netinet6/in6.h#2 integrate .. //depot/projects/netperf/sys/netinet6/ip6_output.c#11 integrate .. //depot/projects/netperf/sys/netkey/key_var.h#2 integrate .. //depot/projects/netperf/sys/vm/vm_fault.c#6 integrate .. //depot/projects/netperf/sys/vm/vm_page.c#8 integrate .. //depot/projects/netperf/sys/vm/vm_page.h#4 integrate Differences ... ==== //depot/projects/netperf/sys/cam/scsi/scsi_cd.c#8 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.85 2003/10/06 10:39:13 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.86 2003/10/07 14:46:59 thomas Exp $"); #include "opt_cd.h" @@ -92,17 +92,18 @@ } cd_quirks; typedef enum { - CD_FLAG_INVALID = 0x001, - CD_FLAG_NEW_DISC = 0x002, - CD_FLAG_DISC_LOCKED = 0x004, - CD_FLAG_DISC_REMOVABLE = 0x008, - CD_FLAG_TAGGED_QUEUING = 0x010, - CD_FLAG_CHANGER = 0x040, - CD_FLAG_ACTIVE = 0x080, - CD_FLAG_SCHED_ON_COMP = 0x100, - CD_FLAG_RETRY_UA = 0x200, - CD_FLAG_VALID_MEDIA = 0x400, - CD_FLAG_VALID_TOC = 0x800 + CD_FLAG_INVALID = 0x0001, + CD_FLAG_NEW_DISC = 0x0002, + CD_FLAG_DISC_LOCKED = 0x0004, + CD_FLAG_DISC_REMOVABLE = 0x0008, + CD_FLAG_TAGGED_QUEUING = 0x0010, + CD_FLAG_CHANGER = 0x0040, + CD_FLAG_ACTIVE = 0x0080, + CD_FLAG_SCHED_ON_COMP = 0x0100, + CD_FLAG_RETRY_UA = 0x0200, + CD_FLAG_VALID_MEDIA = 0x0400, + CD_FLAG_VALID_TOC = 0x0800, + CD_FLAG_SCTX_INIT = 0x1000 } cd_flags; typedef enum { @@ -421,7 +422,8 @@ xpt_print_path(periph->path); printf("removing device entry\n"); - if (sysctl_ctx_free(&softc->sysctl_ctx) != 0) { + if ((softc->flags & CD_FLAG_SCTX_INIT) != 0 + && sysctl_ctx_free(&softc->sysctl_ctx) != 0) { xpt_print_path(periph->path); printf("can't remove sysctl context\n"); } @@ -581,6 +583,7 @@ mtx_lock(&Giant); sysctl_ctx_init(&softc->sysctl_ctx); + softc->flags |= CD_FLAG_SCTX_INIT; softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_kern_cam_cd), OID_AUTO, tmpstr2, CTLFLAG_RD, 0, tmpstr); ==== //depot/projects/netperf/sys/cam/scsi/scsi_da.c#11 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.159 2003/09/04 01:01:20 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.160 2003/10/08 07:12:30 thomas Exp $"); #ifdef _KERNEL #include "opt_da.h" @@ -89,7 +89,8 @@ DA_FLAG_NEED_OTAG = 0x020, DA_FLAG_WENT_IDLE = 0x040, DA_FLAG_RETRY_UA = 0x080, - DA_FLAG_OPEN = 0x100 + DA_FLAG_OPEN = 0x100, + DA_FLAG_SCTX_INIT = 0x200 } da_flags; typedef enum { @@ -838,7 +839,8 @@ /* * If we can't free the sysctl tree, oh well... */ - if (sysctl_ctx_free(&softc->sysctl_ctx) != 0) { + if ((softc->flags & DA_FLAG_SCTX_INIT) != 0 + && sysctl_ctx_free(&softc->sysctl_ctx) != 0) { xpt_print_path(periph->path); printf("can't remove sysctl context\n"); } @@ -925,6 +927,7 @@ mtx_lock(&Giant); sysctl_ctx_init(&softc->sysctl_ctx); + softc->flags |= DA_FLAG_SCTX_INIT; softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx, SYSCTL_STATIC_CHILDREN(_kern_cam_da), OID_AUTO, tmpstr2, CTLFLAG_RD, 0, tmpstr); ==== //depot/projects/netperf/sys/dev/an/if_an_pccard.c#3 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pccard.c,v 1.21 2003/08/24 17:48:04 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/an/if_an_pccard.c,v 1.22 2003/10/08 01:20:00 imp Exp $"); #include "opt_inet.h" @@ -112,6 +112,7 @@ PCMCIA_CARD(AIRONET, PC4800, 0), PCMCIA_CARD(AIRONET, PC4500, 0), PCMCIA_CARD(AIRONET, 350, 0), + PCMCIA_CARD(XIRCOM, CWE1130, 0), { NULL } }; ==== //depot/projects/netperf/sys/dev/ata/ata-all.c#6 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.190 2003/09/27 12:00:58 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.191 2003/10/07 13:44:15 sos Exp $"); #include "opt_ata.h" #include @@ -221,8 +221,9 @@ int ata_reinit(struct ata_channel *ch) { + struct ata_request *request = ch->running; int devices, misdev, newdev; - + if (!ch->r_irq) return ENXIO; @@ -237,11 +238,29 @@ /* detach what left the channel during reset */ if ((misdev = devices & ~ch->devices)) { if ((misdev & (ATA_ATA_MASTER | ATA_ATAPI_MASTER)) && - ch->device[MASTER].detach) + ch->device[MASTER].detach) { + if (request && (request->device == &ch->device[MASTER])) { + request->result = ENXIO; + request->flags |= ATA_R_DONE; + if (request->callback) + (request->callback)(request); + else + wakeup(request); + } ch->device[MASTER].detach(&ch->device[MASTER]); + } if ((misdev & (ATA_ATA_SLAVE | ATA_ATAPI_SLAVE)) && - ch->device[SLAVE].detach) + ch->device[SLAVE].detach) { + if (request && (request->device == &ch->device[SLAVE])) { + request->result = ENXIO; + request->flags |= ATA_R_DONE; + if (request->callback) + (request->callback)(request); + else + wakeup(request); + } ch->device[SLAVE].detach(&ch->device[SLAVE]); + } } /* identify whats present on this channel now */ ==== //depot/projects/netperf/sys/dev/ata/ata-card.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-card.c,v 1.18 2003/08/25 09:01:49 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-card.c,v 1.19 2003/10/07 04:26:14 imp Exp $"); #include #include @@ -42,9 +42,10 @@ #include #include #include +#include +#include #include #include -#include static const struct pccard_product ata_pccard_products[] = { PCMCIA_CARD(FREECOM, PCCARDIDE, 0), ==== //depot/projects/netperf/sys/dev/ata/ata-dma.c#7 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-dma.c,v 1.120 2003/08/25 11:13:04 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-dma.c,v 1.121 2003/10/07 13:48:55 sos Exp $"); #include #include @@ -93,19 +93,20 @@ { struct ata_dc_cb_args ccba; - if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, NULL, NULL, MAXCTLDMASZ, - ATA_DMA_ENTRIES, BUS_SPACE_MAXSIZE_32BIT, 0, - NULL, NULL, &ch->dma->dmatag)) + if (bus_dma_tag_create(NULL, 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, + NULL, NULL, MAXCTLDMASZ, + ATA_DMA_ENTRIES, BUS_SPACE_MAXSIZE_32BIT, + BUS_DMA_ALLOCNOW, NULL, NULL, &ch->dma->dmatag)) goto error; - if (bus_dma_tag_create(ch->dma->dmatag, 1, PAGE_SIZE, + if (bus_dma_tag_create(ch->dma->dmatag, PAGE_SIZE, PAGE_SIZE, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, - NULL, NULL, MAXTABSZ, 1, MAXTABSZ, BUS_DMA_ALLOCNOW, - NULL, NULL, &ch->dma->cdmatag)) + NULL, NULL, MAXTABSZ, 1, MAXTABSZ, + BUS_DMA_ALLOCNOW, NULL, NULL, &ch->dma->cdmatag)) goto error; - if (bus_dma_tag_create(ch->dma->dmatag, ch->dma->alignment, 0, + if (bus_dma_tag_create(ch->dma->dmatag, ch->dma->alignment, 64*1024, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MAXPHYS, ATA_DMA_ENTRIES, MAXSEGSZ, BUS_DMA_ALLOCNOW, NULL, NULL, &ch->dma->ddmatag)) ==== //depot/projects/netperf/sys/dev/ata/ata-lowlevel.c#6 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.17 2003/10/01 09:58:19 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.18 2003/10/07 13:45:56 sos Exp $"); #include "opt_ata.h" #include @@ -91,7 +91,7 @@ request->u.ata.feature)) { ata_prtdev(request->device, "error issueing PIO command\n"); request->result = EIO; - return ATA_OP_FINISHED; + break; } /* if write command output the data */ @@ -100,7 +100,7 @@ (ATA_S_READY | ATA_S_DSC | ATA_S_DRQ)) < 0) { ata_prtdev(request->device,"timeout waiting for write DRQ"); request->result = EIO; - return ATA_OP_FINISHED; + break; } ata_pio_write(request, request->transfersize); } @@ -116,7 +116,7 @@ request->bytecount)) { ata_prtdev(request->device, "setting up DMA failed\n"); request->result = EIO; - return ATA_OP_FINISHED; + break; } /* issue command */ @@ -125,7 +125,7 @@ request->u.ata.feature)) { ata_prtdev(request->device, "error issuing DMA command\n"); request->result = EIO; - return ATA_OP_FINISHED; + break; } /* start DMA engine */ @@ -133,8 +133,9 @@ request->data, request->bytecount, request->flags & ATA_R_READ)) { + ata_prtdev(request->device, "error starting DMA\n"); request->result = EIO; - return ATA_OP_FINISHED; + break; } /* return and wait for interrupt */ return ATA_OP_CONTINUES; @@ -148,7 +149,7 @@ DELAY(10); if (!(ATA_IDX_INB(request->device->channel, ATA_ALTSTAT)&ATA_S_DSC)) request->result = EBUSY; - return ATA_OP_FINISHED; + break; } /* start ATAPI operation */ @@ -156,7 +157,7 @@ request->transfersize << 8, 0, 0)) { ata_prtdev(request->device, "error issuing ATA PACKET command\n"); request->result = EIO; - return ATA_OP_FINISHED; + break; } /* command interrupt device ? just return and wait for interrupt */ @@ -179,7 +180,7 @@ ata_prtdev(request->device, "timeout waiting for ATAPI ready\n"); request->result = EIO; - return ATA_OP_FINISHED; + break; } } @@ -203,7 +204,7 @@ DELAY(10); if (!(ATA_IDX_INB(request->device->channel, ATA_ALTSTAT)&ATA_S_DSC)) request->result = EBUSY; - return ATA_OP_FINISHED; + break; } /* check sanity and setup DMA engine */ @@ -212,14 +213,14 @@ request->bytecount)) { ata_prtdev(request->device, "setting up DMA failed\n"); request->result = EIO; - return ATA_OP_FINISHED; + break; } /* start ATAPI operation */ if (ata_command(request->device, ATA_PACKET_CMD, 0, 0, ATA_F_DMA)) { ata_prtdev(request->device, "error issuing ATAPI packet command\n"); request->result = EIO; - return ATA_OP_FINISHED; + break; } /* wait for ready to write ATAPI command block */ @@ -235,10 +236,9 @@ DELAY(20); } if (timeout <= 0) { - ata_prtdev(request->device, - "timeout waiting for ATAPI ready\n"); + ata_prtdev(request->device,"timeout waiting for ATAPI ready\n"); request->result = EIO; - return ATA_OP_FINISHED; + break; } } @@ -257,12 +257,16 @@ request->bytecount, request->flags & ATA_R_READ)) { request->result = EIO; - return ATA_OP_FINISHED; + break; } /* return and wait for interrupt */ return ATA_OP_CONTINUES; } + + /* request finish here */ + request->device->channel->running = NULL; + return ATA_OP_FINISHED; } static void ==== //depot/projects/netperf/sys/dev/ata/ata-queue.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.6 2003/09/19 12:46:12 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.7 2003/10/07 13:47:40 sos Exp $"); #include "opt_ata.h" #include @@ -316,7 +316,7 @@ { /* clear timeout etc */ request->timeout_handle.callout = NULL; - +#if 0 /* call interrupt to try finish up the command */ request->device->channel->hw.interrupt(request->device->channel); @@ -327,6 +327,7 @@ ata_cmd2str(request)); return; } +#endif /* if this was a DMA request stop the engine to be on the safe side */ if (request->flags & ATA_R_DMA) { @@ -334,22 +335,37 @@ request->device->channel->dma->stop(request->device->channel); } + /* report that we timed out */ + if (request->retries > 0 && !(request->flags & ATA_R_QUIET)) + ata_prtdev(request->device, + "TIMEOUT - %s retrying (%d retr%s left)\n", + ata_cmd2str(request), request->retries, + request->retries == 1 ? "y" : "ies"); + /* try to adjust HW's attitude towards work */ ata_reinit(request->device->channel); + /* if device disappeared nothing more to do here */ + if (!request->device->softc) { + if (!(request->flags & ATA_R_QUIET)) + ata_prtdev(request->device, + "FAILURE - %s device lockup/removed\n", + ata_cmd2str(request)); + return; + } + /* if retries still permit, reinject this request */ if (request->retries-- > 0) { - if (!(request->flags & ATA_R_QUIET)) - ata_prtdev(request->device, - "TIMEOUT - %s retrying (%d retr%s left)\n", - ata_cmd2str(request), request->retries, - request->retries == 1 ? "y" : "ies"); request->flags |= (ATA_R_AT_HEAD | ATA_R_REQUEUE); request->flags &= ~ATA_R_SKIPSTART; ata_queue_request(request); } /* otherwise just schedule finish with error */ else { + if (!(request->flags & ATA_R_QUIET)) + ata_prtdev(request->device, + "FAILURE - %s timed out\n", + ata_cmd2str(request)); request->status = ATA_S_ERROR; TASK_INIT(&request->task, 0, ata_completed, request); taskqueue_enqueue(taskqueue_swi, &request->task); ==== //depot/projects/netperf/sys/dev/cardbus/cardbus_cis.c#5 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/cardbus/cardbus_cis.c,v 1.41 2003/10/06 15:56:29 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/cardbus/cardbus_cis.c,v 1.44 2003/10/07 03:40:17 imp Exp $"); /* * CIS Handling for the Cardbus Bus @@ -49,12 +49,13 @@ #include #include +#include +#include + #include #include #include -#include - extern int cardbus_cis_debug; #define DPRINTF(a) if (cardbus_cis_debug) printf a @@ -75,9 +76,6 @@ static int decode_tuple_generic(device_t cbdev, device_t child, int id, int len, uint8_t *tupledata, uint32_t start, uint32_t *off, struct tuple_callbacks *info); -static int decode_tuple_copy(device_t cbdev, device_t child, int id, - int len, uint8_t *tupledata, uint32_t start, uint32_t *off, - struct tuple_callbacks *info); static int decode_tuple_linktarget(device_t cbdev, device_t child, int id, int len, uint8_t *tupledata, uint32_t start, uint32_t *off, struct tuple_callbacks *info); @@ -142,18 +140,6 @@ "Security" }; -struct cardbus_quirk { - uint32_t devid; /* Vendor/device of the card */ - int type; -#define CARDBUS_QUIRK_MAP_REG 1 /* PCI map register in weird place */ - int arg1; - int arg2; -}; - -struct cardbus_quirk cardbus_quirks[] = { - { 0 } -}; - /* * Handler functions for various CIS tuples */ @@ -679,12 +665,6 @@ return (callbacks[i].func(cbdev, child, tupleid, len, tupledata, start, off, &callbacks[i])); } - - if (tupleid < CISTPL_CUSTOMSTART) { - device_printf(cbdev, "Undefined tuple encountered, " - "CIS parsing terminated\n"); - return (EINVAL); - } return (callbacks[i].func(cbdev, child, tupleid, len, tupledata, start, off, NULL)); } @@ -996,25 +976,15 @@ cardbus_pickup_maps(device_t cbdev, device_t child) { struct cardbus_devinfo *dinfo = device_get_ivars(child); - struct cardbus_quirk *q; int reg; /* * Try to pick up any resources that was not specified in CIS. - * Some devices (eg, 3c656) does not list all resources required by - * the driver in its CIS. - * XXX: should we do this or use quirks? + * Maybe this isn't any longer necessary now that we have fixed + * CIS parsing and we should filter things here? XXX */ - for (reg = 0; reg < dinfo->pci.cfg.nummaps; reg++) { + for (reg = 0; reg < dinfo->pci.cfg.nummaps; reg++) cardbus_add_map(cbdev, child, PCIR_BAR(reg)); - } - - for (q = &cardbus_quirks[0]; q->devid; q++) { - if (q->devid == ((dinfo->pci.cfg.device << 16) | dinfo->pci.cfg.vendor) - && q->type == CARDBUS_QUIRK_MAP_REG) { - cardbus_add_map(cbdev, child, q->arg1); - } - } } int @@ -1022,43 +992,17 @@ { int ret; struct tuple_callbacks init_callbacks[] = { - MAKETUPLE(NULL, generic), - MAKETUPLE(DEVICE, generic), - MAKETUPLE(LONG_LINK_CB, unhandled), + MAKETUPLE(LONGLINK_CB, unhandled), MAKETUPLE(INDIRECT, unhandled), - MAKETUPLE(CONFIG_CB, generic), - MAKETUPLE(CFTABLE_ENTRY_CB, generic), MAKETUPLE(LONGLINK_MFC, unhandled), MAKETUPLE(BAR, bar), - MAKETUPLE(PWR_MGMNT, generic), - MAKETUPLE(EXTDEVICE, generic), - MAKETUPLE(CHECKSUM, generic), MAKETUPLE(LONGLINK_A, unhandled), MAKETUPLE(LONGLINK_C, unhandled), MAKETUPLE(LINKTARGET, linktarget), - MAKETUPLE(NO_LINK, generic), MAKETUPLE(VERS_1, vers_1), - MAKETUPLE(ALTSTR, generic), - MAKETUPLE(DEVICE_A, generic), - MAKETUPLE(JEDEC_C, generic), - MAKETUPLE(JEDEC_A, generic), - MAKETUPLE(CONFIG, generic), - MAKETUPLE(CFTABLE_ENTRY, generic), - MAKETUPLE(DEVICE_OC, generic), - MAKETUPLE(DEVICE_OA, generic), - MAKETUPLE(DEVICE_GEO, generic), - MAKETUPLE(DEVICE_GEO_A, generic), MAKETUPLE(MANFID, manfid), MAKETUPLE(FUNCID, funcid), MAKETUPLE(FUNCE, funce), - MAKETUPLE(SWIL, generic), - MAKETUPLE(VERS_2, generic), - MAKETUPLE(FORMAT, generic), - MAKETUPLE(GEOMETRY, generic), - MAKETUPLE(BYTEORDER, generic), - MAKETUPLE(DATE, generic), - MAKETUPLE(BATTERY, generic), - MAKETUPLE(ORG, generic), MAKETUPLE(END, end), MAKETUPLE(GENERIC, generic), }; ==== //depot/projects/netperf/sys/dev/cardbus/cardbus_cis.h#2 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/cardbus/cardbus_cis.h,v 1.8 2003/01/27 05:47:01 imp Exp $ + * $FreeBSD: src/sys/dev/cardbus/cardbus_cis.h,v 1.10 2003/10/07 03:33:54 imp Exp $ */ /* @@ -35,56 +35,9 @@ struct cis_tupleinfo; int cardbus_do_cis(device_t, device_t); -int cardbus_cis_read(device_t, device_t, uint8_t, struct cis_tupleinfo**, - int*); -void cardbus_cis_free(device_t, struct cis_tupleinfo*, int*); #define MAXTUPLESIZE 0x400 -/* CIS TUPLES */ - -#define CISTPL_NULL 0x00 -#define CISTPL_DEVICE 0x01 -#define CISTPL_LONG_LINK_CB 0x02 -#define CISTPL_INDIRECT 0x03 -#define CISTPL_CONFIG_CB 0x04 -#define CISTPL_CFTABLE_ENTRY_CB 0x05 -#define CISTPL_LONGLINK_MFC 0x06 -#define CISTPL_BAR 0x07 -#define CISTPL_PWR_MGMNT 0x08 -#define CISTPL_EXTDEVICE 0x09 -#define CISTPL_CHECKSUM 0x10 -#define CISTPL_LONGLINK_A 0x11 -#define CISTPL_LONGLINK_C 0x12 -#define CISTPL_LINKTARGET 0x13 -#define CISTPL_NO_LINK 0x14 -#define CISTPL_VERS_1 0x15 -#define CISTPL_ALTSTR 0x16 -#define CISTPL_DEVICE_A 0x17 -#define CISTPL_JEDEC_C 0x18 -#define CISTPL_JEDEC_A 0x19 -#define CISTPL_CONFIG 0x1A -#define CISTPL_CFTABLE_ENTRY 0x1B -#define CISTPL_DEVICE_OC 0x1C -#define CISTPL_DEVICE_OA 0x1D -#define CISTPL_DEVICE_GEO 0x1E -#define CISTPL_DEVICE_GEO_A 0x1F -#define CISTPL_MANFID 0x20 -#define CISTPL_FUNCID 0x21 -#define CISTPL_FUNCE 0x22 -#define CISTPL_SWIL 0x23 -#define CISTPL_VERS_2 0x40 -#define CISTPL_FORMAT 0x41 -#define CISTPL_GEOMETRY 0x42 -#define CISTPL_BYTEORDER 0x43 -#define CISTPL_DATE 0x44 -#define CISTPL_BATTERY 0x45 -#define CISTPL_ORG 0x46 -#define CISTPL_CUSTOMSTART 0x80 -#define CISTPL_END 0xFF - -#define CISTPL_GENERIC -1 /* catchall */ - /* BAR */ #define TPL_BAR_REG_ASI_MASK 0x07 #define TPL_BAR_REG_AS 0x10 ==== //depot/projects/netperf/sys/dev/exca/exca.c#5 (text+ko) ==== @@ -53,7 +53,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/exca/exca.c,v 1.14 2003/09/24 22:13:25 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/exca/exca.c,v 1.15 2003/10/07 04:29:04 imp Exp $"); #include #include @@ -576,7 +576,6 @@ void exca_reset(struct exca_softc *sc, device_t child) { - int cardtype; int win; /* enable socket i/o */ @@ -595,11 +594,8 @@ /* disable all address windows */ exca_putb(sc, EXCA_ADDRWIN_ENABLE, 0); - CARD_GET_TYPE(child, &cardtype); - exca_setb(sc, EXCA_INTR, (cardtype == PCCARD_IFTYPE_IO) ? - EXCA_INTR_CARDTYPE_IO : EXCA_INTR_CARDTYPE_MEM); - DEVPRINTF(sc->dev, "card type is %s\n", - (cardtype == PCCARD_IFTYPE_IO) ? "io" : "mem"); + exca_setb(sc, EXCA_INTR, EXCA_INTR_CARDTYPE_IO); + DEVPRINTF(sc->dev, "card type is io\n"); /* reinstall all the memory and io mappings */ for (win = 0; win < EXCA_MEM_WINS; ++win) ==== //depot/projects/netperf/sys/dev/kbd/atkbd.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/kbd/atkbd.c,v 1.41 2003/08/24 17:49:15 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/kbd/atkbd.c,v 1.42 2003/10/07 09:21:59 fjoe Exp $"); #include "opt_kbd.h" #include "opt_atkbd.h" @@ -679,6 +679,15 @@ case 0x5d: /* menu key */ keycode = 0x6b; break; + case 0x5e: /* power key */ + keycode = 0x6d; + break; + case 0x5f: /* sleep key */ + keycode = 0x6e; + break; + case 0x63: /* wake key */ + keycode = 0x6f; + break; default: /* ignore everything else */ goto next_code; } ==== //depot/projects/netperf/sys/dev/pccard/card_if.m#3 (text+ko) ==== @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/sys/dev/pccard/card_if.m,v 1.22 2003/10/06 07:10:40 imp Exp $ +# $FreeBSD: src/sys/dev/pccard/card_if.m,v 1.23 2003/10/07 03:33:53 imp Exp $ # #include @@ -93,14 +93,6 @@ } # -# Returns the type of card this is. Maybe we don't need this. -# -METHOD int get_type { - device_t dev; - int *type; -} - -# # Returns the function number for this device. # METHOD int get_function { ==== //depot/projects/netperf/sys/dev/pccard/pccard.c#6 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/pccard/pccard.c,v 1.84 2003/09/05 03:08:08 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/pccard/pccard.c,v 1.85 2003/10/07 03:33:53 imp Exp $"); #include #include @@ -86,7 +86,6 @@ static void pccard_ccr_write(struct pccard_function *pf, int ccr, int val); static int pccard_attach_card(device_t dev); static int pccard_detach_card(device_t dev); -static int pccard_card_gettype(device_t dev, int *type); static void pccard_function_init(struct pccard_function *pf); static void pccard_function_free(struct pccard_function *pf); static int pccard_function_enable(struct pccard_function *pf); @@ -379,27 +378,6 @@ return (NULL); } -static int -pccard_card_gettype(device_t dev, int *type) -{ - struct pccard_softc *sc = PCCARD_SOFTC(dev); - struct pccard_function *pf; - - /* - * set the iftype to memory if this card has no functions (not yet - * probed), or only one function, and that is not initialized yet or - * that is memory. - */ - pf = STAILQ_FIRST(&sc->card.pf_head); - if (pf == NULL || - (STAILQ_NEXT(pf, pf_list) == NULL && - (pf->cfe == NULL || pf->cfe->iftype == PCCARD_IFTYPE_MEMORY))) - *type = PCCARD_IFTYPE_MEMORY; - else - *type = PCCARD_IFTYPE_IO; - return (0); -} - /* * Initialize a PCCARD function. May be called as long as the function is * disabled. @@ -1303,7 +1281,6 @@ /* Card Interface */ DEVMETHOD(card_set_res_flags, pccard_set_res_flags), DEVMETHOD(card_set_memory_offset, pccard_set_memory_offset), - DEVMETHOD(card_get_type, pccard_card_gettype), DEVMETHOD(card_attach_card, pccard_attach_card), DEVMETHOD(card_detach_card, pccard_detach_card), DEVMETHOD(card_compat_do_probe, pccard_compat_do_probe), ==== //depot/projects/netperf/sys/dev/pccard/pccard_cis.c#4 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: pcmcia_cis.c,v 1.17 2000/02/10 09:01:52 chopps Exp $ */ -/* $FreeBSD: src/sys/dev/pccard/pccard_cis.c,v 1.26 2003/08/20 05:44:55 imp Exp $ */ +/* $FreeBSD: src/sys/dev/pccard/pccard_cis.c,v 1.27 2003/10/07 03:33:53 imp Exp $ */ /* * Copyright (c) 1997 Marc Horowitz. All rights reserved. @@ -45,6 +45,7 @@ #include #include +#include #include "card_if.h" @@ -163,7 +164,7 @@ if (tuple.mult * tuple.ptr >= PCCARD_CIS_SIZE - 1 - 32 /* ad hoc value */ ) { printf("CIS is too long -- truncating\n"); - tuple.code = PCCARD_CISTPL_END; + tuple.code = CISTPL_END; } else { /* get the tuple code */ tuple.code = pccard_cis_read_1(&tuple, tuple.ptr); @@ -171,7 +172,7 @@ /* two special-case tuples */ - if (tuple.code == PCCARD_CISTPL_NULL) { + if (tuple.code == CISTPL_NULL) { #ifdef PCCARDCISDEBUG if (cis_none_cnt > 0) DPRINTF(("CISTPL_NONE\n 00\n")); @@ -181,7 +182,7 @@ #endif tuple.ptr++; continue; - } else if (tuple.code == PCCARD_CISTPL_END) { + } else if (tuple.code == CISTPL_END) { DPRINTF(("CISTPL_END\n ff\n")); /* Call the function for the END tuple, since the CIS semantics depend on it */ @@ -196,8 +197,8 @@ tuple.length = pccard_cis_read_1(&tuple, tuple.ptr + 1); switch (tuple.code) { - case PCCARD_CISTPL_LONGLINK_A: - case PCCARD_CISTPL_LONGLINK_C: + case CISTPL_LONGLINK_A: + case CISTPL_LONGLINK_C: if (tuple.length < 4) { DPRINTF(("CISTPL_LONGLINK_%s too " "short %d\n", @@ -207,17 +208,17 @@ } longlink_present = 1; longlink_common = (tuple.code == - PCCARD_CISTPL_LONGLINK_C) ? 1 : 0; + CISTPL_LONGLINK_C) ? 1 : 0; longlink_addr = pccard_tuple_read_4(&tuple, 0); DPRINTF(("CISTPL_LONGLINK_%s %lx\n", longlink_common ? "C" : "A", longlink_addr)); break; - case PCCARD_CISTPL_NO_LINK: + case CISTPL_NO_LINK: longlink_present = 0; DPRINTF(("CISTPL_NO_LINK\n")); break; - case PCCARD_CISTPL_CHECKSUM: + case CISTPL_CHECKSUM: if (tuple.length < 5) { DPRINTF(("CISTPL_CHECKSUM too " "short %d\n", tuple.length)); @@ -273,7 +274,7 @@ } } break; - case PCCARD_CISTPL_LONGLINK_MFC: + case CISTPL_LONGLINK_MFC: if (tuple.length < 1) { DPRINTF(("CISTPL_LONGLINK_MFC too " "short %d\n", tuple.length)); @@ -410,7 +411,7 @@ /* make sure that the link is valid */ tuple.code = pccard_cis_read_1(&tuple, tuple.ptr); - if (tuple.code != PCCARD_CISTPL_LINKTARGET) { + if (tuple.code != CISTPL_LINKTARGET) { DPRINTF(("CISTPL_LINKTARGET expected, " "code %02x observed\n", tuple.code)); continue; @@ -620,7 +621,7 @@ struct cis_state *state = arg; switch (tuple->code) { - case PCCARD_CISTPL_END: + case CISTPL_END: /* if we've seen a LONGLINK_MFC, and this is the first * END after it, reset the function list. * @@ -647,7 +648,7 @@ state->pf = NULL; } break; - case PCCARD_CISTPL_LONGLINK_MFC: + case CISTPL_LONGLINK_MFC: /* * this tuple's structure was dealt with in scan_cis. here, * record the fact that the MFC tuple was seen, so that @@ -657,8 +658,8 @@ state->gotmfc = 1; break; #ifdef PCCARDCISDEBUG - case PCCARD_CISTPL_DEVICE: - case PCCARD_CISTPL_DEVICE_A: + case CISTPL_DEVICE: + case CISTPL_DEVICE_A: { u_int reg, dtype, dspeed; @@ -667,7 +668,7 @@ dspeed = reg & PCCARD_DSPEED_MASK; DPRINTF(("CISTPL_DEVICE%s type=", - (tuple->code == PCCARD_CISTPL_DEVICE) ? "" : "_A")); + (tuple->code == CISTPL_DEVICE) ? "" : "_A")); switch (dtype) { case PCCARD_DTYPE_NULL: DPRINTF(("null")); @@ -731,7 +732,7 @@ DPRINTF(("\n")); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Oct 8 11:23:40 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B6AAD16A4C0; Wed, 8 Oct 2003 11:23:39 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B22A16A4BF for ; Wed, 8 Oct 2003 11:23:39 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9619743FF7 for ; Wed, 8 Oct 2003 11:23:38 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h98INcXJ082079 for ; Wed, 8 Oct 2003 11:23:38 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h98INc8c082076 for perforce@freebsd.org; Wed, 8 Oct 2003 11:23:38 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Wed, 8 Oct 2003 11:23:38 -0700 (PDT) Message-Id: <200310081823.h98INc8c082076@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39361 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2003 18:23:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=39361 Change 39361 by sam@sam_ebb on 2003/10/08 11:23:19 correct 7956 PCI device id Affected files ... .. //depot/projects/netperf/sys/dev/hifn/hifn7751reg.h#4 edit Differences ... ==== //depot/projects/netperf/sys/dev/hifn/hifn7751reg.h#4 (text+ko) ==== @@ -64,7 +64,7 @@ #define PCI_PRODUCT_HIFN_7811 0x0007 /* 7811 */ #define PCI_PRODUCT_HIFN_7951 0x0012 /* 7951 */ #define PCI_PRODUCT_HIFN_7955 0x0020 /* 7954/7955 */ -#define PCI_PRODUCT_HIFN_7956 0x01d0 /* 7956 */ +#define PCI_PRODUCT_HIFN_7956 0x001d /* 7956 */ #define PCI_VENDOR_INVERTEX 0x14e1 /* Invertex */ #define PCI_PRODUCT_INVERTEX_AEON 0x0005 /* AEON */ @@ -212,7 +212,7 @@ #define HIFN_1_DMA_CSR 0x40 /* DMA Status and Control */ #define HIFN_1_DMA_IER 0x44 /* DMA Interrupt Enable */ #define HIFN_1_DMA_CNFG 0x48 /* DMA Configuration */ -#define HIFN_1_PLL 0x4c /* 795x: PLL config */ +#define HIFN_1_PLL 0x4c /* 7955/7956: PLL config */ #define HIFN_1_7811_RNGENA 0x60 /* 7811: rng enable */ #define HIFN_1_7811_RNGCFG 0x64 /* 7811: rng config */ #define HIFN_1_7811_RNGDAT 0x68 /* 7811: rng data */ From owner-p4-projects@FreeBSD.ORG Wed Oct 8 15:12:52 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 21A3316A4C0; Wed, 8 Oct 2003 15:12:52 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EEB9E16A4B3 for ; Wed, 8 Oct 2003 15:12:51 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DE0B43FB1 for ; Wed, 8 Oct 2003 15:12:51 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h98MCpXJ001167 for ; Wed, 8 Oct 2003 15:12:51 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h98MCoaY001164 for perforce@freebsd.org; Wed, 8 Oct 2003 15:12:50 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Date: Wed, 8 Oct 2003 15:12:50 -0700 (PDT) Message-Id: <200310082212.h98MCoaY001164@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to Hrishikesh_Dandekar@NAI.com using -f From: Hrishikesh Dandekar To: Perforce Change Reviews Subject: PERFORCE change 39376 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2003 22:12:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=39376 Change 39376 by hdandeka@hdandeka_yash on 2003/10/08 15:11:55 Fix the call to security_load_policy. It now accepts the buffer and the len instead of the fp. Affected files ... .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/checkpolicy.c#4 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/checkpolicy.c#4 (text+ko) ==== @@ -36,6 +36,7 @@ #include #include #include +#include #include #include "linux-compat.h" #else /* __FreeBSD__ */ @@ -319,6 +320,9 @@ unsigned int binary = 0, debug = 0; int ret, ch, nel; FILE *fp, *outfp = NULL; + void *filedata; + struct stat fsb; + size_t filelen; while ((ch = getopt(argc, argv, "o:dbV")) != EOF) { switch (ch) { @@ -620,7 +624,25 @@ printf("%s: unable to open %s\n", argv[0], ans); break; } - ret = security_load_policy(fp); + if(stat(ans, &fsb) == -1) { + printf("%s: unable to get size of %s\n", argv[0], ans); + break; + } + filelen = (size_t) fsb.st_size; + if ( ((off_t) filelen) != fsb.st_size ) { + printf("%s: large file, size truncated\n", argv[0]); + break; + } + filedata = malloc(filelen); + if (!filedata) { + fprintf(stderr, "out of memory\n"); + exit(1); + } + if(fread(filedata, filelen, 1, fp) != filelen) { + printf("%s: unable to get read from %s\n", argv[0], ans); + break; + } + ret = security_load_policy(filedata, filelen); switch (ret) { case 0: printf("\nsuccess\n"); From owner-p4-projects@FreeBSD.ORG Wed Oct 8 15:42:31 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 92B7216A4C0; Wed, 8 Oct 2003 15:42:31 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5694316A4B3 for ; Wed, 8 Oct 2003 15:42:31 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4375043F85 for ; Wed, 8 Oct 2003 15:42:30 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h98MgUXJ002386 for ; Wed, 8 Oct 2003 15:42:30 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h98MgTnA002383 for perforce@freebsd.org; Wed, 8 Oct 2003 15:42:29 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Wed, 8 Oct 2003 15:42:29 -0700 (PDT) Message-Id: <200310082242.h98MgTnA002383@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39381 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2003 22:42:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=39381 Change 39381 by sam@sam_ebb on 2003/10/08 15:42:19 correct locking issues in nd6_lookup; this stuff is still very far from right (won't get to it until locking all ipv6) Affected files ... .. //depot/projects/netperf/sys/netinet6/nd6.c#8 edit Differences ... ==== //depot/projects/netperf/sys/netinet6/nd6.c#8 (text+ko) ==== @@ -822,7 +822,6 @@ RTFREE_LOCKED(rt); rt = 0; } - RT_UNLOCK(rt); } if (!rt) { if (create && ifp) { @@ -859,6 +858,7 @@ ip6_sprintf(addr6), e); if (rt == NULL) return (NULL); + RT_LOCK(rt); if (rt->rt_llinfo) { struct llinfo_nd6 *ln = (struct llinfo_nd6 *)rt->rt_llinfo; @@ -867,6 +867,7 @@ } else return (NULL); } + RT_LOCK_ASSERT(rt); rt->rt_refcnt--; /* * Validation for the entry. @@ -888,8 +889,10 @@ ip6_sprintf(addr6), ifp ? if_name(ifp) : "unspec"); /* xxx more logs... kazu */ } + RT_UNLOCK(rt); return (NULL); } + RT_UNLOCK(rt); /* XXX not ready to return rt locked */ return (rt); } From owner-p4-projects@FreeBSD.ORG Wed Oct 8 16:05:00 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2EAF316A4C0; Wed, 8 Oct 2003 16:05:00 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06AA916A4B3 for ; Wed, 8 Oct 2003 16:05:00 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E4FC43F75 for ; Wed, 8 Oct 2003 16:04:58 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h98N4vXJ004115 for ; Wed, 8 Oct 2003 16:04:57 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h98N4vZi004112 for perforce@freebsd.org; Wed, 8 Oct 2003 16:04:57 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Wed, 8 Oct 2003 16:04:57 -0700 (PDT) Message-Id: <200310082304.h98N4vZi004112@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39382 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2003 23:05:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=39382 Change 39382 by sam@sam_ebb on 2003/10/08 16:04:44 IFC @ 39381 Affected files ... .. //depot/projects/netperf/sys/compat/linprocfs/linprocfs.c#8 integrate .. //depot/projects/netperf/sys/dev/hifn/hifn7751.c#8 integrate .. //depot/projects/netperf/sys/dev/hifn/hifn7751reg.h#5 integrate .. //depot/projects/netperf/sys/dev/hifn/hifn7751var.h#3 integrate .. //depot/projects/netperf/sys/ia64/ia64/pmap.c#8 integrate .. //depot/projects/netperf/sys/netinet6/in6_cksum.c#2 integrate .. //depot/projects/netperf/sys/netinet6/in6_gif.c#3 integrate .. //depot/projects/netperf/sys/netinet6/in6_gif.h#2 integrate .. //depot/projects/netperf/sys/netinet6/in6_ifattach.c#7 integrate .. //depot/projects/netperf/sys/netinet6/in6_pcb.c#8 integrate .. //depot/projects/netperf/sys/netinet6/in6_proto.c#4 integrate .. //depot/projects/netperf/sys/netinet6/in6_rmx.c#7 integrate .. //depot/projects/netperf/sys/netinet6/in6_src.c#5 integrate .. //depot/projects/netperf/sys/netinet6/in6_var.h#2 integrate .. //depot/projects/netperf/sys/netinet6/ip6_forward.c#6 integrate .. //depot/projects/netperf/sys/netinet6/ip6_fw.c#5 integrate .. //depot/projects/netperf/sys/netinet6/ip6_fw.h#2 integrate .. //depot/projects/netperf/sys/netinet6/ip6_input.c#8 integrate .. //depot/projects/netperf/sys/netinet6/ip6_mroute.c#3 integrate .. //depot/projects/netperf/sys/netinet6/ip6_output.c#12 integrate .. //depot/projects/netperf/sys/netinet6/ip6_var.h#5 integrate .. //depot/projects/netperf/sys/netinet6/ip6protosw.h#4 integrate .. //depot/projects/netperf/sys/netinet6/ipcomp_core.c#2 integrate .. //depot/projects/netperf/sys/netinet6/ipcomp_input.c#2 integrate .. //depot/projects/netperf/sys/netinet6/ipsec.c#4 integrate .. //depot/projects/netperf/sys/netinet6/ipsec.h#2 integrate Differences ... ==== //depot/projects/netperf/sys/compat/linprocfs/linprocfs.c#8 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.75 2003/09/30 13:35:19 des Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.76 2003/10/08 18:05:59 gallatin Exp $"); #include #include @@ -413,7 +413,7 @@ static int linprocfs_dostat(PFS_FILL_ARGS) { - unsigned int olen, plen; + size_t olen, plen; int name[2]; int i, ncpu; ==== //depot/projects/netperf/sys/dev/hifn/hifn7751.c#8 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/hifn/hifn7751.c,v 1.22 2003/09/02 17:30:36 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/hifn/hifn7751.c,v 1.23 2003/10/08 20:25:47 sam Exp $"); /* * Driver for various Hifn encryption processors. ==== //depot/projects/netperf/sys/dev/hifn/hifn7751reg.h#5 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/hifn/hifn7751reg.h,v 1.2 2003/09/02 17:30:36 jhb Exp $ */ +/* $FreeBSD: src/sys/dev/hifn/hifn7751reg.h,v 1.3 2003/10/08 20:25:47 sam Exp $ */ /* $OpenBSD: hifn7751reg.h,v 1.35 2002/04/08 17:49:42 jason Exp $ */ /* ==== //depot/projects/netperf/sys/dev/hifn/hifn7751var.h#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/hifn/hifn7751var.h,v 1.3 2003/06/04 17:57:52 sam Exp $ */ +/* $FreeBSD: src/sys/dev/hifn/hifn7751var.h,v 1.4 2003/10/08 20:25:47 sam Exp $ */ /* $OpenBSD: hifn7751var.h,v 1.42 2002/04/08 17:49:42 jason Exp $ */ /* ==== //depot/projects/netperf/sys/ia64/ia64/pmap.c#8 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ia64/ia64/pmap.c,v 1.124 2003/10/03 22:46:53 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/ia64/ia64/pmap.c,v 1.125 2003/10/08 19:55:45 marcel Exp $"); #include #include @@ -54,6 +54,7 @@ #include #include #include +#include #include #include ==== //depot/projects/netperf/sys/netinet6/in6_cksum.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet6/in6_cksum.c,v 1.7 2003/04/29 08:43:55 suz Exp $ */ +/* $FreeBSD: src/sys/netinet6/in6_cksum.c,v 1.8 2003/10/08 18:26:08 ume Exp $ */ /* $KAME: in6_cksum.c,v 1.10 2000/12/03 00:53:59 itojun Exp $ */ /* @@ -100,9 +100,6 @@ int sum = 0; int mlen = 0; int byte_swapped = 0; -#if 0 - int srcifid = 0, dstifid = 0; -#endif struct ip6_hdr *ip6; union { u_int16_t phs[4]; @@ -133,16 +130,6 @@ * First create IP6 pseudo header and calculate a summary. */ ip6 = mtod(m, struct ip6_hdr *); -#if 0 - if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_src)) { - srcifid = ip6->ip6_src.s6_addr16[1]; - ip6->ip6_src.s6_addr16[1] = 0; - } - if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst)) { - dstifid = ip6->ip6_dst.s6_addr16[1]; - ip6->ip6_dst.s6_addr16[1] = 0; - } -#endif w = (u_int16_t *)&ip6->ip6_src; uph.ph.ph_len = htonl(len); uph.ph.ph_nxt = nxt; @@ -163,12 +150,6 @@ sum += uph.phs[0]; sum += uph.phs[1]; sum += uph.phs[2]; sum += uph.phs[3]; -#if 0 - if (srcifid) - ip6->ip6_src.s6_addr16[1] = srcifid; - if (dstifid) - ip6->ip6_dst.s6_addr16[1] = dstifid; -#endif /* * Secondly calculate a summary of the first mbuf excluding offset. */ ==== //depot/projects/netperf/sys/netinet6/in6_gif.c#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet6/in6_gif.c,v 1.13 2003/10/06 14:02:08 ume Exp $ */ +/* $FreeBSD: src/sys/netinet6/in6_gif.c,v 1.14 2003/10/08 18:26:08 ume Exp $ */ /* $KAME: in6_gif.c,v 1.49 2001/05/14 14:02:17 itojun Exp $ */ /* @@ -75,7 +75,7 @@ extern struct domain inet6domain; struct ip6protosw in6_gif_protosw = -{ SOCK_RAW, &inet6domain, 0/*IPPROTO_IPV[46]*/, PR_ATOMIC|PR_ADDR, +{ SOCK_RAW, &inet6domain, 0/* IPPROTO_IPV[46] */, PR_ATOMIC|PR_ADDR, in6_gif_input, rip6_output, 0, rip6_ctloutput, 0, 0, 0, 0, 0, @@ -143,7 +143,7 @@ m_freem(m); return EAFNOSUPPORT; } - + /* prepend new IP header */ M_PREPEND(m, sizeof(struct ip6_hdr), M_DONTWAIT); if (m && m->m_len < sizeof(struct ip6_hdr)) @@ -208,7 +208,7 @@ - sizeof(struct ip6_hdr); #endif } - + #ifdef IPV6_MINMTU /* * force fragmentation to minimum MTU, to avoid path MTU discovery. @@ -221,7 +221,8 @@ #endif } -int in6_gif_input(mp, offp, proto) +int +in6_gif_input(mp, offp, proto) struct mbuf **mp; int *offp, proto; { @@ -288,7 +289,7 @@ m_freem(m); return IPPROTO_DONE; } - + gif_input(m, af, gifp); return IPPROTO_DONE; } ==== //depot/projects/netperf/sys/netinet6/in6_gif.h#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet6/in6_gif.h,v 1.5 2002/10/17 17:47:55 ume Exp $ */ +/* $FreeBSD: src/sys/netinet6/in6_gif.h,v 1.6 2003/10/08 18:26:08 ume Exp $ */ /* $KAME: in6_gif.h,v 1.5 2000/04/14 08:36:03 itojun Exp $ */ /* @@ -42,4 +42,4 @@ int in6_gif_attach __P((struct gif_softc *)); int in6_gif_detach __P((struct gif_softc *)); -#endif /*_NETINET6_IN6_GIF_H_*/ +#endif /* _NETINET6_IN6_GIF_H_ */ ==== //depot/projects/netperf/sys/netinet6/in6_ifattach.c#7 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet6/in6_ifattach.c,v 1.15 2003/10/06 14:02:08 ume Exp $ */ +/* $FreeBSD: src/sys/netinet6/in6_ifattach.c,v 1.16 2003/10/08 18:26:08 ume Exp $ */ /* $KAME: in6_ifattach.c,v 1.118 2001/05/24 07:44:00 itojun Exp $ */ /* @@ -156,9 +156,8 @@ val32 = random() ^ tv.tv_usec; bcopy(&val32, seed + sizeof(val32) * i, sizeof(val32)); } - } else { + } else bcopy(seed0, seed, 8); - } /* copy the right-most 64-bits of the given address */ /* XXX assumption on the size of IFID */ @@ -205,7 +204,7 @@ * RFC 3041 3.2.1. (4) * Take the rightmost 64-bits of the MD5 digest and save them in * stable storage as the history value to be used in the next - * iteration of the algorithm. + * iteration of the algorithm. */ bcopy(&digest[8], seed0, 8); @@ -240,8 +239,7 @@ for (ifa = ifp->if_addrlist.tqh_first; ifa; - ifa = ifa->ifa_list.tqe_next) - { + ifa = ifa->ifa_list.tqe_next) { if (ifa->ifa_addr->sa_family != AF_LINK) continue; sdl = (struct sockaddr_dl *)ifa->ifa_addr; @@ -383,8 +381,7 @@ /* next, try to get it from some other hardware interface */ IFNET_RLOCK(); - for (ifp = ifnet.tqh_first; ifp; ifp = ifp->if_list.tqe_next) - { + for (ifp = ifnet.tqh_first; ifp; ifp = ifp->if_list.tqe_next) { if (ifp == ifp0) continue; if (get_hw_ifid(ifp, in6) != 0) @@ -416,13 +413,10 @@ return -1; success: - nd6log((LOG_INFO, "%s: ifid: " - "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n", - if_name(ifp0), - in6->s6_addr[8], in6->s6_addr[9], - in6->s6_addr[10], in6->s6_addr[11], - in6->s6_addr[12], in6->s6_addr[13], - in6->s6_addr[14], in6->s6_addr[15])); + nd6log((LOG_INFO, "%s: ifid: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n", + if_name(ifp0), in6->s6_addr[8], in6->s6_addr[9], in6->s6_addr[10], + in6->s6_addr[11], in6->s6_addr[12], in6->s6_addr[13], + in6->s6_addr[14], in6->s6_addr[15])); return 0; } @@ -463,7 +457,7 @@ if (get_ifid(ifp, altifp, &ifra.ifra_addr.sin6_addr) != 0) { nd6log((LOG_ERR, "%s: no ifid available\n", if_name(ifp))); - return -1; + return (-1); } } #ifdef SCOPEDROUTING @@ -500,7 +494,7 @@ * XXX: When the interface does not support IPv6, this call * would fail in the SIOCSIFADDR ioctl. I believe the * notification is rather confusing in this case, so just - * supress it. (jinmei@kame.net 20010130) + * suppress it. (jinmei@kame.net 20010130) */ if (error != EAFNOSUPPORT) log(LOG_NOTICE, "in6_ifattach_linklocal: failed to " @@ -528,7 +522,7 @@ } /* - * Make the link-local prefix (fe80::/64%link) as on-link. + * Make the link-local prefix (fe80::%link/64) as on-link. * Since we'd like to manage prefixes separately from addresses, * we make an ND6 prefix structure for the link-local prefix, * and add it to the prefix list as a never-expire prefix. @@ -543,7 +537,7 @@ /* apply the mask for safety. (nd6_prelist_add will apply it again) */ for (i = 0; i < 4; i++) { pr0.ndpr_prefix.sin6_addr.s6_addr32[i] &= - in6mask64.s6_addr32[i]; + in6mask64.s6_addr32[i]; } /* * Initialize parameters. The link-local prefix must always be @@ -751,7 +745,7 @@ /* some of the interfaces are inherently not IPv6 capable */ switch (ifp->if_type) { -#ifdef IFT_BRIDGE /*OpenBSD 2.8*/ +#ifdef IFT_BRIDGE /* OpenBSD 2.8, NetBSD 1.6 */ case IFT_BRIDGE: return; #endif @@ -842,7 +836,7 @@ } /* - * assign a link-local address, if there's none. + * assign a link-local address, if there's none. */ if (ip6_auto_linklocal) { ia = in6ifa_ifpforlinklocal(ifp, 0); @@ -856,7 +850,7 @@ } #ifdef IFT_STF /* XXX */ -statinit: +statinit: #endif /* update dynamically. */ @@ -902,8 +896,7 @@ nd6_purge(ifp); /* nuke any of IPv6 addresses we have */ - for (ifa = ifp->if_addrlist.tqh_first; ifa; ifa = next) - { + for (ifa = ifp->if_addrlist.tqh_first; ifa; ifa = next) { next = ifa->ifa_list.tqe_next; if (ifa->ifa_addr->sa_family != AF_INET6) continue; @@ -911,11 +904,9 @@ } /* undo everything done by in6_ifattach(), just in case */ - for (ifa = ifp->if_addrlist.tqh_first; ifa; ifa = next) - { + for (ifa = ifp->if_addrlist.tqh_first; ifa; ifa = next) { next = ifa->ifa_list.tqe_next; - if (ifa->ifa_addr->sa_family != AF_INET6 || !IN6_IS_ADDR_LINKLOCAL(&satosin6(&ifa->ifa_addr)->sin6_addr)) { continue; @@ -924,15 +915,14 @@ ia = (struct in6_ifaddr *)ifa; /* remove from the routing table */ - if ((ia->ia_flags & IFA_ROUTE) - && (rt = rtalloc1((struct sockaddr *)&ia->ia_addr, 0, 0UL))) { + if ((ia->ia_flags & IFA_ROUTE) && + (rt = rtalloc1((struct sockaddr *)&ia->ia_addr, 0, 0UL))) { rtflags = rt->rt_flags; rtfree(rt); - rtrequest(RTM_DELETE, - (struct sockaddr *)&ia->ia_addr, - (struct sockaddr *)&ia->ia_addr, - (struct sockaddr *)&ia->ia_prefixmask, - rtflags, (struct rtentry **)0); + rtrequest(RTM_DELETE, (struct sockaddr *)&ia->ia_addr, + (struct sockaddr *)&ia->ia_addr, + (struct sockaddr *)&ia->ia_prefixmask, + rtflags, (struct rtentry **)0); } /* remove from the linked list */ @@ -949,9 +939,9 @@ if (ia->ia_next) ia->ia_next = oia->ia_next; else { - nd6log((LOG_ERR, - "%s: didn't unlink in6ifaddr from " - "list\n", if_name(ifp))); + nd6log((LOG_ERR, + "%s: didn't unlink in6ifaddr from list\n", + if_name(ifp))); } } @@ -959,10 +949,12 @@ } /* leave from all multicast groups joined */ + if (udbinfo.listhead != NULL) in6_pcbpurgeif0(LIST_FIRST(udbinfo.listhead), ifp); if (ripcbinfo.listhead != NULL) in6_pcbpurgeif0(LIST_FIRST(ripcbinfo.listhead), ifp); + for (in6m = LIST_FIRST(&in6_multihead); in6m; in6m = in6m_next) { in6m_next = LIST_NEXT(in6m, in6m_entry); if (in6m->in6m_ifp != ifp) @@ -992,7 +984,7 @@ if (rt->rt_ifp == ifp) { RT_UNLOCK(rt); rtrequest(RTM_DELETE, (struct sockaddr *)rt_key(rt), - rt->rt_gateway, rt_mask(rt), rt->rt_flags, 0); + rt->rt_gateway, rt_mask(rt), rt->rt_flags, 0); RTFREE(rt); } else rtfree(rt); @@ -1020,7 +1012,7 @@ /* generate_tmp_ifid will update seedn and buf */ (void)generate_tmp_ifid(ndi->randomseed0, ndi->randomseed1, - ndi->randomid); + ndi->randomid); } bcopy(ndi->randomid, retbuf, 8); } @@ -1035,9 +1027,8 @@ int s = splnet(); callout_reset(&in6_tmpaddrtimer_ch, - (ip6_temp_preferred_lifetime - ip6_desync_factor - - ip6_temp_regen_advance) * hz, - in6_tmpaddrtimer, NULL); + (ip6_temp_preferred_lifetime - ip6_desync_factor - + ip6_temp_regen_advance) * hz, in6_tmpaddrtimer, NULL); bzero(nullbuf, sizeof(nullbuf)); for (i = 1; i < if_index + 1; i++) { @@ -1048,8 +1039,7 @@ * Create a new one. */ (void)generate_tmp_ifid(ndi->randomseed0, - ndi->randomseed1, - ndi->randomid); + ndi->randomseed1, ndi->randomid); } } ==== //depot/projects/netperf/sys/netinet6/in6_pcb.c#8 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet6/in6_pcb.c,v 1.41 2003/10/06 14:02:08 ume Exp $ */ +/* $FreeBSD: src/sys/netinet6/in6_pcb.c,v 1.42 2003/10/08 18:26:08 ume Exp $ */ /* $KAME: in6_pcb.c,v 1.31 2001/05/21 05:45:10 jinmei Exp $ */ /* @@ -179,7 +179,7 @@ * XXX: bind to an anycast address might accidentally * cause sending a packet with anycast source address. * We should allow to bind to a deprecated address, since - * the application dare to use it. + * the application dares to use it. */ if (ia && ((struct in6_ifaddr *)ia)->ia6_flags & @@ -413,212 +413,6 @@ return (0); } -#if 0 -/* - * Return an IPv6 address, which is the most appropriate for given - * destination and user specified options. - * If necessary, this function lookups the routing table and return - * an entry to the caller for later use. - */ -struct in6_addr * -in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp) - struct sockaddr_in6 *dstsock; - struct ip6_pktopts *opts; - struct ip6_moptions *mopts; - struct route_in6 *ro; - struct in6_addr *laddr; - int *errorp; -{ - struct in6_addr *dst; - struct in6_ifaddr *ia6 = 0; - struct in6_pktinfo *pi = NULL; - - dst = &dstsock->sin6_addr; - *errorp = 0; - - /* - * If the source address is explicitly specified by the caller, - * use it. - */ - if (opts && (pi = opts->ip6po_pktinfo) && - !IN6_IS_ADDR_UNSPECIFIED(&pi->ipi6_addr)) - return (&pi->ipi6_addr); - - /* - * If the source address is not specified but the socket(if any) - * is already bound, use the bound address. - */ - if (laddr && !IN6_IS_ADDR_UNSPECIFIED(laddr)) - return (laddr); - - /* - * If the caller doesn't specify the source address but - * the outgoing interface, use an address associated with - * the interface. - */ - if (pi && pi->ipi6_ifindex) { - /* XXX boundary check is assumed to be already done. */ - ia6 = in6_ifawithscope(ifnet_byindex(pi->ipi6_ifindex), dst); - if (ia6 == 0) { - *errorp = EADDRNOTAVAIL; - return (0); - } - return (&satosin6(&ia6->ia_addr)->sin6_addr); - } - - /* - * If the destination address is a link-local unicast address or - * a multicast address, and if the outgoing interface is specified - * by the sin6_scope_id filed, use an address associated with the - * interface. - * XXX: We're now trying to define more specific semantics of - * sin6_scope_id field, so this part will be rewritten in - * the near future. - */ - if ((IN6_IS_ADDR_LINKLOCAL(dst) || IN6_IS_ADDR_MULTICAST(dst)) && - dstsock->sin6_scope_id) { - /* - * I'm not sure if boundary check for scope_id is done - * somewhere... - */ - if (dstsock->sin6_scope_id < 0 || - if_index < dstsock->sin6_scope_id) { - *errorp = ENXIO; /* XXX: better error? */ - return (0); - } - ia6 = in6_ifawithscope(ifnet_byindex(dstsock->sin6_scope_id), - dst); - if (ia6 == 0) { - *errorp = EADDRNOTAVAIL; - return (0); - } - return (&satosin6(&ia6->ia_addr)->sin6_addr); - } - - /* - * If the destination address is a multicast address and - * the outgoing interface for the address is specified - * by the caller, use an address associated with the interface. - * There is a sanity check here; if the destination has node-local - * scope, the outgoing interfacde should be a loopback address. - * Even if the outgoing interface is not specified, we also - * choose a loopback interface as the outgoing interface. - */ - if (IN6_IS_ADDR_MULTICAST(dst)) { - struct ifnet *ifp = mopts ? mopts->im6o_multicast_ifp : NULL; - - if (ifp == NULL && IN6_IS_ADDR_MC_NODELOCAL(dst)) { - ifp = &loif[0]; - } - - if (ifp) { - ia6 = in6_ifawithscope(ifp, dst); - if (ia6 == 0) { - *errorp = EADDRNOTAVAIL; - return (0); - } - return (&ia6->ia_addr.sin6_addr); - } - } - - /* - * If the next hop address for the packet is specified - * by caller, use an address associated with the route - * to the next hop. - */ - { - struct sockaddr_in6 *sin6_next; - struct rtentry *rt; - - if (opts && opts->ip6po_nexthop) { - sin6_next = satosin6(opts->ip6po_nexthop); - rt = nd6_lookup(&sin6_next->sin6_addr, 1, NULL); - if (rt) { - ia6 = in6_ifawithscope(rt->rt_ifp, dst); - if (ia6 == 0) - ia6 = ifatoia6(rt->rt_ifa); - } - if (ia6 == 0) { - *errorp = EADDRNOTAVAIL; - return (0); - } - return (&satosin6(&ia6->ia_addr)->sin6_addr); - } - } - - /* - * If route is known or can be allocated now, - * our src addr is taken from the i/f, else punt. - */ - if (ro) { - if (ro->ro_rt && - !IN6_ARE_ADDR_EQUAL(&satosin6(&ro->ro_dst)->sin6_addr, dst)) { - RTFREE(ro->ro_rt); - ro->ro_rt = (struct rtentry *)0; - } - if (ro->ro_rt == (struct rtentry *)0 || - ro->ro_rt->rt_ifp == (struct ifnet *)0) { - struct sockaddr_in6 *dst6; - - /* No route yet, so try to acquire one */ - bzero(&ro->ro_dst, sizeof(struct sockaddr_in6)); - dst6 = (struct sockaddr_in6 *)&ro->ro_dst; - dst6->sin6_family = AF_INET6; - dst6->sin6_len = sizeof(struct sockaddr_in6); - dst6->sin6_addr = *dst; - if (IN6_IS_ADDR_MULTICAST(dst)) { - ro->ro_rt = rtalloc1(&((struct route *)ro) - ->ro_dst, 0, 0UL); - RT_UNLOCK(ro->ro_rt); - } else { - rtalloc((struct route *)ro); - } - } - - /* - * in_pcbconnect() checks out IFF_LOOPBACK to skip using - * the address. But we don't know why it does so. - * It is necessary to ensure the scope even for lo0 - * so doesn't check out IFF_LOOPBACK. - */ - - if (ro->ro_rt) { - ia6 = in6_ifawithscope(ro->ro_rt->rt_ifa->ifa_ifp, dst); - if (ia6 == 0) /* xxx scope error ?*/ - ia6 = ifatoia6(ro->ro_rt->rt_ifa); - } - if (ia6 == 0) { - *errorp = EHOSTUNREACH; /* no route */ - return (0); - } - return (&satosin6(&ia6->ia_addr)->sin6_addr); - } - - *errorp = EADDRNOTAVAIL; - return (0); -} - -/* - * Default hop limit selection. The precedence is as follows: - * 1. Hoplimit valued specified via ioctl. - * 2. (If the outgoing interface is detected) the current - * hop limit of the interface specified by router advertisement. - * 3. The system default hoplimit. -*/ -int -in6_selecthlim(in6p, ifp) - struct in6pcb *in6p; - struct ifnet *ifp; -{ - if (in6p && in6p->in6p_hops >= 0) - return (in6p->in6p_hops); - else if (ifp) - return (nd_ifinfo[ifp->if_index].chlim); - else - return (ip6_defhlim); -} -#endif - void in6_pcbdisconnect(inp) struct inpcb *inp; @@ -645,6 +439,7 @@ #endif /* IPSEC */ inp->inp_gencnt = ++ipi->ipi_gencnt; in_pcbremlists(inp); + if (so) { so->so_pcb = NULL; sotryfree(so); @@ -778,9 +573,10 @@ error = in_setsockaddr(so, nam, &tcbinfo); if (error == 0) in6_sin_2_v4mapsin6_in_sock(nam); - } else - /* scope issues will be handled in in6_setsockaddr(). */ - error = in6_setsockaddr(so, nam); + } else { + /* scope issues will be handled in in6_setsockaddr(). */ + error = in6_setsockaddr(so, nam); + } return error; } ==== //depot/projects/netperf/sys/netinet6/in6_proto.c#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet6/in6_proto.c,v 1.23 2003/10/06 14:02:08 ume Exp $ */ +/* $FreeBSD: src/sys/netinet6/in6_proto.c,v 1.24 2003/10/08 18:26:08 ume Exp $ */ /* $KAME: in6_proto.c,v 1.91 2001/05/27 13:28:35 itojun Exp $ */ /* @@ -187,26 +187,26 @@ }, { SOCK_RAW, &inet6domain, IPPROTO_DSTOPTS,PR_ATOMIC|PR_ADDR, dest6_input, 0, 0, 0, - 0, + 0, 0, 0, 0, 0, &nousrreqs }, { SOCK_RAW, &inet6domain, IPPROTO_ROUTING,PR_ATOMIC|PR_ADDR, route6_input, 0, 0, 0, - 0, + 0, 0, 0, 0, 0, &nousrreqs }, { SOCK_RAW, &inet6domain, IPPROTO_FRAGMENT,PR_ATOMIC|PR_ADDR, frag6_input, 0, 0, 0, - 0, + 0, 0, 0, 0, 0, &nousrreqs }, #ifdef IPSEC { SOCK_RAW, &inet6domain, IPPROTO_AH, PR_ATOMIC|PR_ADDR, ah6_input, 0, 0, 0, - 0, + 0, 0, 0, 0, 0, &nousrreqs, }, @@ -222,7 +222,7 @@ #endif { SOCK_RAW, &inet6domain, IPPROTO_IPCOMP, PR_ATOMIC|PR_ADDR, ipcomp6_input, 0, 0, 0, - 0, + 0, 0, 0, 0, 0, &nousrreqs, }, @@ -299,7 +299,7 @@ int ip6_gif_hlim = 0; int ip6_use_deprecated = 1; /* allow deprecated addr (RFC2462 5.5.4) */ int ip6_rr_prune = 5; /* router renumbering prefix - * walk list every 5 sec. */ + * walk list every 5 sec. */ int ip6_v6only = 1; #ifndef RANDOM_IP_ID ==== //depot/projects/netperf/sys/netinet6/in6_rmx.c#7 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet6/in6_rmx.c,v 1.7 2003/10/04 03:44:49 sam Exp $ */ +/* $FreeBSD: src/sys/netinet6/in6_rmx.c,v 1.8 2003/10/08 18:26:08 ume Exp $ */ /* $KAME: in6_rmx.c,v 1.11 2001/07/26 06:53:16 jinmei Exp $ */ /* @@ -234,17 +234,17 @@ /* one hour is ``really old'' */ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_RTEXPIRE, rtexpire, CTLFLAG_RW, &rtq_reallyold , 0, ""); - + static int rtq_minreallyold = 10; /* never automatically crank down to less */ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_RTMINEXPIRE, rtminexpire, CTLFLAG_RW, &rtq_minreallyold , 0, ""); - + static int rtq_toomany = 128; /* 128 cached routes is ``too many'' */ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_RTMAXCACHE, rtmaxcache, CTLFLAG_RW, &rtq_toomany , 0, ""); - + /* * On last reference drop, mark the route as belong to us so that it can be ==== //depot/projects/netperf/sys/netinet6/in6_src.c#5 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet6/in6_src.c,v 1.12 2003/10/06 14:02:08 ume Exp $ */ +/* $FreeBSD: src/sys/netinet6/in6_src.c,v 1.13 2003/10/08 18:26:08 ume Exp $ */ /* $KAME: in6_src.c,v 1.37 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -274,26 +274,7 @@ if (ia6 == 0) /* xxx scope error ?*/ ia6 = ifatoia6(ro->ro_rt->rt_ifa); } -#if 0 - /* - * xxx The followings are necessary? (kazu) - * I don't think so. - * It's for SO_DONTROUTE option in IPv4.(jinmei) - */ if (ia6 == 0) { - struct sockaddr_in6 sin6 = {sizeof(sin6), AF_INET6, 0}; - - sin6->sin6_addr = *dst; - - ia6 = ifatoia6(ifa_ifwithdstaddr(sin6tosa(&sin6))); - if (ia6 == 0) - ia6 = ifatoia6(ifa_ifwithnet(sin6tosa(&sin6))); - if (ia6 == 0) - return (0); - return (&satosin6(&ia6->ia_addr)->sin6_addr); - } -#endif /* 0 */ - if (ia6 == 0) { *errorp = EHOSTUNREACH; /* no route */ return (0); } @@ -422,14 +403,14 @@ } /* - * generate kernel-internal form (scopeid embedded into s6_addr16[1]). + * Generate kernel-internal form (scopeid embedded into s6_addr16[1]). * If the address scope of is link-local, embed the interface index in the * address. The routine determines our precedence * between advanced API scope/interface specification and basic API * specification. * - * this function should be nuked in the future, when we get rid of - * embedded scopeid thing. + * This function should be nuked in the future, when we get rid of embedded + * scopeid thing. * * XXX actually, it is over-specification to return ifp against sin6_scope_id. * there can be multiple interfaces that belong to a particular scope zone @@ -489,7 +470,7 @@ if (scopeid < 0 || if_index < scopeid) return ENXIO; /* XXX EINVAL? */ ifp = ifnet_byindex(scopeid); - /*XXX assignment to 16bit from 32bit variable */ + /* XXX assignment to 16bit from 32bit variable */ in6->s6_addr16[1] = htons(scopeid & 0xffff); } @@ -547,7 +528,7 @@ } /* - * just clear the embedded scope identifer. + * just clear the embedded scope identifier. * XXX: currently used for bsdi4 only as a supplement function. */ void ==== //depot/projects/netperf/sys/netinet6/in6_var.h#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet6/in6_var.h,v 1.12 2003/03/04 23:19:53 jlemon Exp $ */ +/* $FreeBSD: src/sys/netinet6/in6_var.h,v 1.13 2003/10/08 18:26:08 ume Exp $ */ /* $KAME: in6_var.h,v 1.56 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -105,9 +105,8 @@ struct in6_addrlifetime ia6_lifetime; struct ifprefix *ia6_ifpr; /* back pointer to ifprefix */ - struct nd_prefix *ia6_ndpr; /* back pointer to the ND prefix - * (for autoconfigured addresses only) - */ + /* back pointer to the ND prefix (for autoconfigured addresses only) */ + struct nd_prefix *ia6_ndpr; }; /* @@ -458,14 +457,14 @@ && in6_ifstat && in6_ifstat[(ifp)->if_index]) { \ in6_ifstat[(ifp)->if_index]->tag++; \ } \ -} while (0) +} while (/*CONSTCOND*/ 0) extern struct in6_addr zeroin6_addr; extern u_char inet6ctlerrmap[]; extern unsigned long in6_maxmtu; #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_IPMADDR); -#endif +#endif /* MALLOC_DECLARE */ /* * Macro for finding the internet address structure (in6_ifaddr) corresponding @@ -484,7 +483,7 @@ break; \ } \ (ia) = (struct in6_ifaddr *)ifa; \ -} while (0) +} while (/*CONSTCOND*/ 0) #endif /* _KERNEL */ @@ -564,15 +563,15 @@ } while(0) struct in6_multi *in6_addmulti __P((struct in6_addr *, struct ifnet *, - int *)); + int *)); void in6_delmulti __P((struct in6_multi *)); extern int in6_ifindex2scopeid __P((int)); extern int in6_mask2len __P((struct in6_addr *, u_char *)); extern void in6_len2mask __P((struct in6_addr *, int)); -int in6_control __P((struct socket *, - u_long, caddr_t, struct ifnet *, struct thread *)); +int in6_control __P((struct socket *, u_long, caddr_t, struct ifnet *, + struct thread *)); int in6_update_ifa __P((struct ifnet *, struct in6_aliasreq *, - struct in6_ifaddr *)); + struct in6_ifaddr *)); void in6_purgeaddr __P((struct ifaddr *)); int in6if_do_dad __P((struct ifnet *)); void in6_purgeif __P((struct ifnet *)); @@ -581,18 +580,16 @@ void in6_restoremkludge __P((struct in6_ifaddr *, struct ifnet *)); void in6_purgemkludge __P((struct ifnet *)); struct in6_ifaddr *in6ifa_ifpforlinklocal __P((struct ifnet *, int)); -struct in6_ifaddr *in6ifa_ifpwithaddr __P((struct ifnet *, - struct in6_addr *)); +struct in6_ifaddr *in6ifa_ifpwithaddr __P((struct ifnet *, struct in6_addr *)); char *ip6_sprintf __P((const struct in6_addr *)); int in6_addr2scopeid __P((struct ifnet *, struct in6_addr *)); int in6_matchlen __P((struct in6_addr *, struct in6_addr *)); -int in6_are_prefix_equal __P((struct in6_addr *p1, struct in6_addr *p2, - int len)); -void in6_prefixlen2mask __P((struct in6_addr *maskp, int len)); -int in6_prefix_ioctl __P((struct socket *so, u_long cmd, caddr_t data, - struct ifnet *ifp)); -int in6_prefix_add_ifid __P((int iilen, struct in6_ifaddr *ia)); -void in6_prefix_remove_ifid __P((int iilen, struct in6_ifaddr *ia)); +int in6_are_prefix_equal __P((struct in6_addr *, struct in6_addr *, int)); +void in6_prefixlen2mask __P((struct in6_addr *, int)); +int in6_prefix_ioctl __P((struct socket *, u_long, caddr_t, + struct ifnet *)); +int in6_prefix_add_ifid __P((int, struct in6_ifaddr *)); +void in6_prefix_remove_ifid __P((int, struct in6_ifaddr *)); void in6_purgeprefix __P((struct ifnet *)); int in6_is_addr_deprecated __P((struct sockaddr_in6 *)); ==== //depot/projects/netperf/sys/netinet6/ip6_forward.c#6 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/netinet6/ip6_forward.c,v 1.18 2003/09/30 04:46:08 sam Exp $ */ +/* $FreeBSD: src/sys/netinet6/ip6_forward.c,v 1.19 2003/10/08 18:26:08 ume Exp $ */ /* $KAME: ip6_forward.c,v 1.69 2001/05/17 03:48:30 itojun Exp $ */ /* @@ -139,7 +139,7 @@ * Do not forward packets to multicast destination (should be handled * by ip6_mforward(). * Do not forward packets with unspecified source. It was discussed - * in July 2000, on ipngwg mailing list. + * in July 2000, on the ipngwg mailing list. */ if ((m->m_flags & (M_BCAST|M_MCAST)) != 0 || IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) || @@ -181,8 +181,8 @@ #ifdef IPSEC /* get a security policy for this packet */ - sp = ipsec6_getpolicybyaddr(m, IPSEC_DIR_OUTBOUND, IP_FORWARDING, - &error); + sp = ipsec6_getpolicybyaddr(m, IPSEC_DIR_OUTBOUND, + IP_FORWARDING, &error); if (sp == NULL) { ipsec6stat.out_inval++; ip6stat.ip6s_cantforward++; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Oct 9 11:13:44 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A18B816A4C1; Thu, 9 Oct 2003 11:13:44 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C6F116A4BF for ; Thu, 9 Oct 2003 11:13:44 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 050FE43FE1 for ; Thu, 9 Oct 2003 11:13:44 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h99IDhXJ095012 for ; Thu, 9 Oct 2003 11:13:43 -0700 (PDT) (envelope-from areisse@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h99IDhPN095008 for perforce@freebsd.org; Thu, 9 Oct 2003 11:13:43 -0700 (PDT) (envelope-from areisse@nailabs.com) Date: Thu, 9 Oct 2003 11:13:43 -0700 (PDT) Message-Id: <200310091813.h99IDhPN095008@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to areisse@nailabs.com using -f From: Andrew Reisse To: Perforce Change Reviews Subject: PERFORCE change 39413 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2003 18:13:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=39413 Change 39413 by areisse@areisse_tislabs on 2003/10/09 11:13:08 fix for compiling sidtab for use in checkpolicy Affected files ... .. //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/sidtab.c#8 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/sys/security/sebsd/ss/sidtab.c#8 (text+ko) ==== @@ -18,7 +18,10 @@ (sid & SIDTAB_HASH_MASK) #ifdef _KERNEL -#define INIT_SIDTAB_LOCK(s) mtx_init (&s->lock, "SEBSD sidtab lock", NULL, MTX_DEF) +#define INIT_SIDTAB_LOCK(s) \ + memset (&s->lock, 0, sizeof (struct mtx)); \ + mtx_init (&s->lock, "SEBSD sidtab lock", NULL, MTX_DEF) + #define SIDTAB_LOCK(s) mtx_lock(&s->lock) #define SIDTAB_UNLOCK(s) mtx_unlock(&s->lock) @@ -42,7 +45,6 @@ s->nel = 0; s->next_sid = 1; s->shutdown = 0; - memset (&s->lock, 0, sizeof (struct mtx)); INIT_SIDTAB_LOCK(s); return 0; } From owner-p4-projects@FreeBSD.ORG Thu Oct 9 12:10:56 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 89D6716A4C0; Thu, 9 Oct 2003 12:10:56 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C06F16A4B3 for ; Thu, 9 Oct 2003 12:10:56 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B859443FA3 for ; Thu, 9 Oct 2003 12:10:55 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h99JAtXJ098192 for ; Thu, 9 Oct 2003 12:10:55 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h99JAtN5098189 for perforce@freebsd.org; Thu, 9 Oct 2003 12:10:55 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Thu, 9 Oct 2003 12:10:55 -0700 (PDT) Message-Id: <200310091910.h99JAtN5098189@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39417 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2003 19:10:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=39417 Change 39417 by sam@sam_ebb on 2003/10/09 12:10:43 correct locking Affected files ... .. //depot/projects/netperf/sys/dev/em/if_em.c#6 edit Differences ... ==== //depot/projects/netperf/sys/dev/em/if_em.c#6 (text+ko) ==== @@ -933,7 +933,7 @@ if (ether_poll_register(em_poll, ifp)) { em_disable_intr(adapter); - em_poll(ifp, 0, 1); + em_poll_locked(ifp, 0, 1); EM_UNLOCK(adapter); return; } From owner-p4-projects@FreeBSD.ORG Thu Oct 9 17:58:11 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1D10916A4C1; Thu, 9 Oct 2003 17:58:11 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E96DD16A4B3 for ; Thu, 9 Oct 2003 17:58:10 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D1CD743FA3 for ; Thu, 9 Oct 2003 17:58:09 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9A0w9XJ029367 for ; Thu, 9 Oct 2003 17:58:09 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9A0w9sU029364 for perforce@freebsd.org; Thu, 9 Oct 2003 17:58:09 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Date: Thu, 9 Oct 2003 17:58:09 -0700 (PDT) Message-Id: <200310100058.h9A0w9sU029364@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to Hrishikesh_Dandekar@NAI.com using -f From: Hrishikesh Dandekar To: Perforce Change Reviews Subject: PERFORCE change 39432 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2003 00:58:11 -0000 http://perforce.freebsd.org/chv.cgi?CH=39432 Change 39432 by hdandeka@hdandeka_yash on 2003/10/09 17:57:53 mmap the policy file before calling security_load_policy. Affected files ... .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/checkpolicy.c#5 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/checkpolicy.c#5 (text+ko) ==== @@ -34,9 +34,11 @@ #include #include #include +#include #include #include #include +#include #include #include "linux-compat.h" #else /* __FreeBSD__ */ @@ -320,6 +322,7 @@ unsigned int binary = 0, debug = 0; int ret, ch, nel; FILE *fp, *outfp = NULL; + int fd; void *filedata; struct stat fsb; size_t filelen; @@ -619,29 +622,28 @@ pathlen = strlen(ans); ans[pathlen - 1] = 0; printf("%s: loading policy configuration from %s\n", argv[0], ans); - fp = fopen(ans, "r"); - if (!fp) { + fd = open(ans, O_RDONLY); + if (fd < 0) { printf("%s: unable to open %s\n", argv[0], ans); break; } - if(stat(ans, &fsb) == -1) { + if(fstat(fd, &fsb) < 0) { printf("%s: unable to get size of %s\n", argv[0], ans); break; } filelen = (size_t) fsb.st_size; if ( ((off_t) filelen) != fsb.st_size ) { - printf("%s: large file, size truncated\n", argv[0]); - break; + printf("%s: large file, size truncated\n", argv[0]); + close(fd); + break; } - filedata = malloc(filelen); - if (!filedata) { - fprintf(stderr, "out of memory\n"); - exit(1); - } - if(fread(filedata, filelen, 1, fp) != filelen) { - printf("%s: unable to get read from %s\n", argv[0], ans); + + filedata = mmap(NULL, filelen, PROT_READ, MAP_SHARED, fd,0); + if (filedata == MAP_FAILED) { + printf("Can't map %s\n", ans); + close(fd); break; - } + } ret = security_load_policy(filedata, filelen); switch (ret) { case 0: @@ -656,7 +658,8 @@ default: printf("return code 0x%x\n", ret); } - fclose(fp); + /* XXX: call munmap(filedata, filelen) or not ? */ + close(fd); break; case '8': printf("fs kdevname? "); From owner-p4-projects@FreeBSD.ORG Thu Oct 9 18:17:36 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1DE6116A4C0; Thu, 9 Oct 2003 18:17:36 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED94116A4B3 for ; Thu, 9 Oct 2003 18:17:35 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4EFE243FBD for ; Thu, 9 Oct 2003 18:17:35 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9A1HZXJ031277 for ; Thu, 9 Oct 2003 18:17:35 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9A1HYut031274 for perforce@freebsd.org; Thu, 9 Oct 2003 18:17:34 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Date: Thu, 9 Oct 2003 18:17:34 -0700 (PDT) Message-Id: <200310100117.h9A1HYut031274@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to Hrishikesh_Dandekar@NAI.com using -f From: Hrishikesh Dandekar To: Perforce Change Reviews Subject: PERFORCE change 39435 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2003 01:17:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=39435 Change 39435 by hdandeka@hdandeka_yash on 2003/10/09 18:17:19 replace policydb_read with a call to sebsd_load_policy. Affected files ... .. //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/checkpolicy.c#6 edit Differences ... ==== //depot/projects/trustedbsd/sebsd/contrib/sebsd/checkpolicy/checkpolicy.c#6 (text+ko) ==== @@ -324,7 +324,7 @@ FILE *fp, *outfp = NULL; int fd; void *filedata; - struct stat fsb; + struct stat sb; size_t filelen; while ((ch = getopt(argc, argv, "o:dbV")) != EOF) { @@ -359,18 +359,53 @@ printf("%s: loading policy configuration from %s\n", argv[0], file); - yyin = fopen(file, "r"); - if (!yyin) { - fprintf(stderr, "%s: unable to open %s\n", argv[0], - file); - exit(1); - } if (binary) { - if (policydb_read(&policydb, yyin)) { - fprintf(stderr, "%s: error(s) encountered while parsing configuration\n", argv[0]); + fd = open(file, O_RDONLY); + if (fd < 0) { + printf("%s: unable to open %s\n", argv[0], ans); + exit(1); + } + if(fstat(fd, &sb) < 0) { + printf("%s: unable to get size of %s\n", argv[0], ans); + exit(1); + } + filelen = (size_t) sb.st_size; + if ( ((off_t) filelen) != sb.st_size ) { + printf("%s: large file, size truncated\n", argv[0]); + close(fd); + exit(1); + } + + filedata = mmap(NULL, filelen, PROT_READ, MAP_SHARED, fd,0); + if (filedata == MAP_FAILED) { + printf("Can't map %s\n", ans); + close(fd); + exit(1); + } + ret = security_load_policy(filedata, filelen); + switch (ret) { + case 0: + printf("\nsuccess\n"); + break; + case -EINVAL: + printf("\ninvalid policy\n"); + break; + case -ENOMEM: + printf("\nout of memory\n"); + break; + default: + printf("return code 0x%x\n", ret); + } + /* XXX: call munmap(filedata, filelen) or not ? */ + close(fd); + } else { + yyin = fopen(file, "r"); + if (!yyin) { + fprintf(stderr, "%s: unable to open %s\n", argv[0], + file); exit(1); } - } else { + if (policydb_init(&policydb)) exit(1); @@ -627,12 +662,12 @@ printf("%s: unable to open %s\n", argv[0], ans); break; } - if(fstat(fd, &fsb) < 0) { + if(fstat(fd, &sb) < 0) { printf("%s: unable to get size of %s\n", argv[0], ans); break; } - filelen = (size_t) fsb.st_size; - if ( ((off_t) filelen) != fsb.st_size ) { + filelen = (size_t) sb.st_size; + if ( ((off_t) filelen) != sb.st_size ) { printf("%s: large file, size truncated\n", argv[0]); close(fd); break; From owner-p4-projects@FreeBSD.ORG Fri Oct 10 16:27:36 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1D2E316A4C2; Fri, 10 Oct 2003 16:27:36 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EAA5616A4BF for ; Fri, 10 Oct 2003 16:27:35 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E3E243FDD for ; Fri, 10 Oct 2003 16:27:35 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9ANRYXJ034573 for ; Fri, 10 Oct 2003 16:27:34 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9ANRYO1034570 for perforce@freebsd.org; Fri, 10 Oct 2003 16:27:34 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Fri, 10 Oct 2003 16:27:34 -0700 (PDT) Message-Id: <200310102327.h9ANRYO1034570@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39477 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2003 23:27:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=39477 Change 39477 by sam@sam_ebb on 2003/10/10 16:27:19 revert locking changes Affected files ... .. //depot/projects/netperf/sys/kern/kern_poll.c#3 edit Differences ... ==== //depot/projects/netperf/sys/kern/kern_poll.c#3 (text+ko) ==== @@ -182,13 +182,11 @@ }; static struct pollrec pr[POLL_LIST_LEN]; -static struct mtx poll_mtx; static void init_device_poll(void) { - mtx_init(&poll_mtx, "device polling", NULL, MTX_DEF); netisr_register(NETISR_POLL, (netisr_t *)netisr_poll, NULL); netisr_register(NETISR_POLLMORE, (netisr_t *)netisr_pollmore, NULL); } @@ -225,7 +223,6 @@ else prev_t = t; - mtx_lock(&poll_mtx); if (pending_polls > 100) { /* * Too much, assume it has stalled (not always true @@ -245,7 +242,6 @@ } if (pending_polls++ > 0) lost_polls++; - mtx_unlock(&poll_mtx); } /* @@ -256,16 +252,15 @@ { int i; - mtx_assert(&Giant, MA_NOTOWNED); + mtx_lock(&Giant); - mtx_lock(&poll_mtx); if (count > poll_each_burst) count = poll_each_burst; for (i = 0 ; i < poll_handlers ; i++) if (pr[i].handler && (IFF_UP|IFF_RUNNING) == (pr[i].ifp->if_flags & (IFF_UP|IFF_RUNNING)) ) pr[i].handler(pr[i].ifp, 0, count); /* quick check */ - mtx_unlock(&poll_mtx); + mtx_unlock(&Giant); } /* @@ -293,14 +288,10 @@ int kern_load; /* XXX run at splhigh() or equivalent */ - mtx_assert(&Giant, MA_NOTOWNED); - - mtx_lock(&poll_mtx); phase = 5; if (residual_burst > 0) { schednetisrbits(1 << NETISR_POLL | 1 << NETISR_POLLMORE); /* will run immediately on return, followed by netisrs */ - mtx_unlock(&poll_mtx); return; } /* here we can account time spent in netisr's in this tick */ @@ -331,12 +322,12 @@ schednetisrbits(1 << NETISR_POLL | 1 << NETISR_POLLMORE); phase = 6; } - mtx_unlock(&poll_mtx); } /* * netisr_poll is scheduled by schednetisr when appropriate, typically once - * per tick. + * per tick. It is called at splnet() so first thing to do is to upgrade to + * splimp(), and call all registered handlers. */ static void netisr_poll(void) @@ -344,10 +335,8 @@ static int reg_frac_count; int i, cycles; enum poll_cmd arg = POLL_ONLY; + mtx_lock(&Giant); - mtx_assert(&Giant, MA_NOTOWNED); - - mtx_lock(&poll_mtx); phase = 3; if (residual_burst == 0) { /* first call in this tick */ microuptime(&poll_start_t); @@ -405,7 +394,7 @@ } /* on -stable, schednetisr(NETISR_POLLMORE); */ phase = 4; - mtx_lock(&poll_mtx); + mtx_unlock(&Giant); } /* @@ -419,6 +408,8 @@ int ether_poll_register(poll_handler_t *h, struct ifnet *ifp) { + int s; + if (polling == 0) /* polling disabled, cannot register */ return 0; if (h == NULL || ifp == NULL) /* bad arguments */ @@ -428,7 +419,7 @@ if (ifp->if_flags & IFF_POLLING) /* already polling */ return 0; - mtx_lock(&poll_mtx); + s = splhigh(); if (poll_handlers >= POLL_LIST_LEN) { /* * List full, cannot register more entries. @@ -437,8 +428,8 @@ * this at runtime is expensive, and won't solve the problem * anyways, so just report a few times and then give up. */ - static int verbose = 10; - mtx_unlock(&poll_mtx); + static int verbose = 10 ; + splx(s); if (verbose >0) { printf("poll handlers list full, " "maybe a broken driver ?\n"); @@ -451,7 +442,7 @@ pr[poll_handlers].ifp = ifp; poll_handlers++; ifp->if_flags |= IFF_POLLING; - mtx_unlock(&poll_mtx); + splx(s); if (idlepoll_sleeping) wakeup(&idlepoll_sleeping); return 1; /* polling enabled in next call */ @@ -468,9 +459,9 @@ { int i; - mtx_lock(&poll_mtx); + mtx_lock(&Giant); if ( !ifp || !(ifp->if_flags & IFF_POLLING) ) { - mtx_unlock(&poll_mtx); + mtx_unlock(&Giant); return 0; } for (i = 0 ; i < poll_handlers ; i++) @@ -478,8 +469,8 @@ break; ifp->if_flags &= ~IFF_POLLING; /* found or not... */ if (i == poll_handlers) { - mtx_unlock(&poll_mtx); - printf("%s: ifp not found!!!\n", __func__); + mtx_unlock(&Giant); + printf("ether_poll_deregister: ifp not found!!!\n"); return 0; } poll_handlers--; @@ -487,7 +478,7 @@ pr[i].handler = pr[poll_handlers].handler; pr[i].ifp = pr[poll_handlers].ifp; } - mtx_unlock(&poll_mtx); + mtx_unlock(&Giant); return 1; } @@ -508,7 +499,10 @@ for (;;) { if (poll_in_idle_loop && poll_handlers > 0) { idlepoll_sleeping = 0; + mtx_lock(&Giant); ether_poll(poll_each_burst); + mtx_unlock(&Giant); + mtx_assert(&Giant, MA_NOTOWNED); mtx_lock_spin(&sched_lock); td->td_proc->p_stats->p_ru.ru_nvcsw++; mi_switch(); From owner-p4-projects@FreeBSD.ORG Fri Oct 10 16:28:38 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6155C16A4C0; Fri, 10 Oct 2003 16:28:38 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20D4216A4BF for ; Fri, 10 Oct 2003 16:28:38 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDDE743FA3 for ; Fri, 10 Oct 2003 16:28:36 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9ANSaXJ034695 for ; Fri, 10 Oct 2003 16:28:36 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9ANSaU5034692 for perforce@freebsd.org; Fri, 10 Oct 2003 16:28:36 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Fri, 10 Oct 2003 16:28:36 -0700 (PDT) Message-Id: <200310102328.h9ANSaU5034692@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39478 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2003 23:28:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=39478 Change 39478 by sam@sam_ebb on 2003/10/10 16:27:50 change default for kern.polling.in_idle to 1 Affected files ... .. //depot/projects/netperf/sys/kern/kern_poll.c#4 edit Differences ... ==== //depot/projects/netperf/sys/kern/kern_poll.c#4 (text+ko) ==== @@ -118,7 +118,7 @@ SYSCTL_UINT(_kern_polling, OID_AUTO, burst_max, CTLFLAG_RW, &poll_burst_max, 0, "Max Polling burst size"); -static u_int32_t poll_in_idle_loop=0; /* do we poll in idle loop ? */ +static u_int32_t poll_in_idle_loop=1; /* do we poll in idle loop ? */ SYSCTL_UINT(_kern_polling, OID_AUTO, idle_poll, CTLFLAG_RW, &poll_in_idle_loop, 0, "Enable device polling in idle loop"); From owner-p4-projects@FreeBSD.ORG Fri Oct 10 16:33:46 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C2F0516A4C0; Fri, 10 Oct 2003 16:33:45 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A75616A4B3 for ; Fri, 10 Oct 2003 16:33:45 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2224143F75 for ; Fri, 10 Oct 2003 16:33:44 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9ANXiXJ034895 for ; Fri, 10 Oct 2003 16:33:44 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9ANXhii034892 for perforce@freebsd.org; Fri, 10 Oct 2003 16:33:43 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Fri, 10 Oct 2003 16:33:43 -0700 (PDT) Message-Id: <200310102333.h9ANXhii034892@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39479 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2003 23:33:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=39479 Change 39479 by sam@sam_ebb on 2003/10/10 16:32:52 IFC @ 39478 Affected files ... .. //depot/projects/netperf/sys/alpha/alpha/trap.c#3 integrate .. //depot/projects/netperf/sys/amd64/amd64/trap.c#4 integrate .. //depot/projects/netperf/sys/contrib/ia64/libuwx/src/Makefile#2 integrate .. //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx.h#2 integrate .. //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_context.c#2 integrate .. //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_env.h#2 integrate .. //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_scoreboard.c#2 integrate .. //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_self.c#2 integrate .. //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_step.c#2 integrate .. //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_step.h#1 branch .. //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_trace.c#2 integrate .. //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_trace.h#2 integrate .. //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_ttrace.c#2 integrate .. //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_uinfo.c#2 integrate .. //depot/projects/netperf/sys/crypto/cast128/cast128.c#2 integrate .. //depot/projects/netperf/sys/crypto/cast128/cast128.h#2 integrate .. //depot/projects/netperf/sys/crypto/cast128/cast128_subkey.h#2 delete .. //depot/projects/netperf/sys/crypto/cast128/cast128sb.h#1 branch .. //depot/projects/netperf/sys/dev/amr/amr.c#4 integrate .. //depot/projects/netperf/sys/dev/amr/amr_disk.c#3 integrate .. //depot/projects/netperf/sys/dev/amr/amrvar.h#2 integrate .. //depot/projects/netperf/sys/dev/ata/ata-all.c#7 integrate .. //depot/projects/netperf/sys/dev/ata/ata-lowlevel.c#7 integrate .. //depot/projects/netperf/sys/dev/em/if_em.c#7 edit .. //depot/projects/netperf/sys/dev/em/if_em.h#7 edit .. //depot/projects/netperf/sys/dev/usb/usbdevs#6 integrate .. //depot/projects/netperf/sys/dev/usb/usbdevs.h#6 integrate .. //depot/projects/netperf/sys/dev/usb/usbdevs_data.h#6 integrate .. //depot/projects/netperf/sys/i386/i386/machdep.c#6 integrate .. //depot/projects/netperf/sys/i386/i386/trap.c#4 integrate .. //depot/projects/netperf/sys/ia64/ia64/trap.c#6 integrate .. //depot/projects/netperf/sys/ia64/ia64/unwind.c#2 integrate .. //depot/projects/netperf/sys/kern/sys_process.c#5 integrate .. //depot/projects/netperf/sys/kern/vfs_bio.c#8 integrate .. //depot/projects/netperf/sys/netinet6/esp_core.c#3 integrate .. //depot/projects/netperf/sys/netinet6/icmp6.c#6 integrate .. //depot/projects/netperf/sys/netinet6/in6.c#7 integrate .. //depot/projects/netperf/sys/netinet6/in6_gif.c#4 integrate .. //depot/projects/netperf/sys/netinet6/in6_ifattach.c#8 integrate .. //depot/projects/netperf/sys/netinet6/ip6_forward.c#7 integrate .. //depot/projects/netperf/sys/netinet6/ip6_input.c#9 integrate .. //depot/projects/netperf/sys/netinet6/ip6_output.c#13 integrate .. //depot/projects/netperf/sys/netinet6/ipcomp_input.c#3 integrate .. //depot/projects/netperf/sys/netinet6/mld6.c#2 integrate .. //depot/projects/netperf/sys/netinet6/mld6_var.h#2 integrate .. //depot/projects/netperf/sys/netinet6/nd6.c#9 integrate .. //depot/projects/netperf/sys/netinet6/nd6.h#3 integrate .. //depot/projects/netperf/sys/netinet6/nd6_nbr.c#3 integrate .. //depot/projects/netperf/sys/netinet6/nd6_rtr.c#6 integrate .. //depot/projects/netperf/sys/netinet6/raw_ip6.c#3 integrate .. //depot/projects/netperf/sys/netinet6/scope6.c#3 integrate .. //depot/projects/netperf/sys/netinet6/scope6_var.h#2 integrate .. //depot/projects/netperf/sys/netinet6/udp6_usrreq.c#3 integrate .. //depot/projects/netperf/sys/pci/if_ti.c#4 integrate .. //depot/projects/netperf/sys/sparc64/sparc64/trap.c#3 integrate .. //depot/projects/netperf/sys/sys/ptrace.h#3 integrate Differences ... ==== //depot/projects/netperf/sys/alpha/alpha/trap.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.116 2003/08/22 07:20:25 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.117 2003/10/09 10:17:15 robert Exp $"); /* #include "opt_fix_unaligned_vax_fp.h" */ #include "opt_ddb.h" @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -729,6 +730,8 @@ STOPEVENT(p, S_SCE, (callp->sy_narg & SYF_ARGMASK)); + PTRACESTOP_SC(p, td, S_PT_SCE); + error = (*callp->sy_call)(td, args + hidden); } @@ -775,6 +778,8 @@ */ STOPEVENT(p, S_SCX, code); + PTRACESTOP_SC(p, td, S_PT_SCX); + #ifdef DIAGNOSTIC cred_free_thread(td); #endif ==== //depot/projects/netperf/sys/amd64/amd64/trap.c#4 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.264 2003/09/22 22:52:46 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.265 2003/10/09 10:17:16 robert Exp $"); /* * AMD64 Trap and System call handling @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -740,6 +741,8 @@ STOPEVENT(p, S_SCE, narg); + PTRACESTOP_SC(p, td, S_PT_SCE); + error = (*callp->sy_call)(td, argp); } @@ -808,6 +811,8 @@ */ STOPEVENT(p, S_SCX, code); + PTRACESTOP_SC(p, td, S_PT_SCX); + #ifdef DIAGNOSTIC cred_free_thread(td); #endif ==== //depot/projects/netperf/sys/contrib/ia64/libuwx/src/Makefile#2 (text+ko) ==== @@ -8,11 +8,11 @@ AR = ar RANLIB = : +OTHERCFLAGS = # OTHERCFLAGS = -DUWX_TRACE_ENABLE # Enables trace output # OTHERCFLAGS = +DD64 # Builds 64-bit library -OTHERCFLAGS = -CFLAGS = +W944 -O $(OTHERCFLAGS) +CFLAGS = -O $(OTHERCFLAGS) OBJS = uwx_bstream.o uwx_context.o uwx_env.o uwx_scoreboard.o \ uwx_step.o uwx_str.o uwx_swap.o uwx_trace.o uwx_uinfo.o \ @@ -36,7 +36,7 @@ uwx_bstream.o: uwx.h uwx_env.h uwx_bstream.h -uwx_context.o: uwx.h uwx_env.h uwx_scoreboard.h uwx_trace.h +uwx_context.o: uwx.h uwx_env.h uwx_scoreboard.h uwx_step.h uwx_trace.h uwx_env.o: uwx.h uwx_env.h uwx_scoreboard.h uwx_str.h uwx_trace.h ==== //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx.h#2 (text+ko) ==== @@ -208,18 +208,26 @@ #define UWX_REG_CFM 3 /* cfm (no spill info) */ #define UWX_REG_RP 4 /* rp (pseudo-register) */ #define UWX_REG_PSP 5 /* psp (pseudo-register) */ -#define UWX_REG_PFS 6 /* ar.pfs */ +#define UWX_REG_PFS 6 /* pfs (pseudo-register) */ #define UWX_REG_PREDS 7 /* p0 - p63 */ #define UWX_REG_PRIUNAT 8 /* primary unat (pseudo-register) */ -#define UWX_REG_BSPSTORE 9 /* ar.bspstore */ -#define UWX_REG_RNAT 10 /* ar.rnat */ -#define UWX_REG_UNAT 11 /* ar.unat */ -#define UWX_REG_FPSR 12 /* ar.fpsr */ -#define UWX_REG_LC 13 /* ar.lc */ +#define UWX_REG_AR_PFS 9 /* ar.pfs */ +#define UWX_REG_AR_BSPSTORE 10 /* ar.bspstore */ +#define UWX_REG_AR_RNAT 11 /* ar.rnat */ +#define UWX_REG_AR_UNAT 12 /* ar.unat */ +#define UWX_REG_AR_FPSR 13 /* ar.fpsr */ +#define UWX_REG_AR_LC 14 /* ar.lc */ #define UWX_REG_GR(gr) (0x100 | (gr)) #define UWX_REG_FR(fr) (0x200 | (fr)) #define UWX_REG_BR(br) (0x300 | (br)) +/* for backwards compatibility with previous releases... */ +#define UWX_REG_BSPSTORE UWX_REG_AR_BSPSTORE +#define UWX_REG_RNAT UWX_REG_AR_RNAT +#define UWX_REG_UNAT UWX_REG_AR_UNAT +#define UWX_REG_FPSR UWX_REG_AR_FPSR +#define UWX_REG_LC UWX_REG_AR_LC + /* Values corresponding to UWX_KEY_SPILL keys indicate the disposition */ /* of the spilled register -- either in the memory stack or in another */ /* register. The PSP register may also have a disposition of "SPPLUS", */ ==== //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_context.c#2 (text+ko) ==== @@ -23,6 +23,7 @@ #include "uwx_env.h" #include "uwx_context.h" #include "uwx_scoreboard.h" +#include "uwx_step.h" #include "uwx_trace.h" int uwx_init_context( @@ -46,6 +47,7 @@ for (i = 0; i < NPRESERVEDGR; i++) env->context.gr[i] = 0; env->context.valid_regs = VALID_BASIC4; + env->context.valid_frs = 0; env->rstate = 0; (void)uwx_init_history(env); return UWX_OK; @@ -64,8 +66,17 @@ status = UWX_OK; + if (regid == UWX_REG_GR(12)) + regid = UWX_REG_SP; if (regid < NSPECIALREG && (env->context.valid_regs & (1 << regid))) *valp = env->context.special[regid]; + else if (regid == UWX_REG_PSP || regid == UWX_REG_RP || + regid == UWX_REG_PFS) { + status = uwx_restore_markers(env); + if (status != UWX_OK) + return status; + *valp = env->context.special[regid]; + } else if (regid >= UWX_REG_GR(4) && regid <= UWX_REG_GR(7) && (env->context.valid_regs & (1 << (regid - UWX_REG_GR(4) + VALID_GR_SHIFT))) ) @@ -94,13 +105,13 @@ (env->context.valid_regs & (1 << (regid - UWX_REG_BR(1) + VALID_BR_SHIFT))) ) *valp = env->context.br[regid - UWX_REG_BR(1)]; - else if (regid >= UWX_REG_FR(2) && regid <= UWX_REG_BR(5) && - (env->context.valid_frs & (1 << (regid - UWX_REG_FR(2)))) ) { + else if (regid >= UWX_REG_FR(2) && regid <= UWX_REG_FR(5) && + (env->context.valid_frs & (1 << (regid - UWX_REG_FR(2)))) ) { valp[0] = env->context.fr[regid - UWX_REG_FR(2)].part0; valp[1] = env->context.fr[regid - UWX_REG_FR(2)].part1; } - else if (regid >= UWX_REG_FR(16) && regid <= UWX_REG_BR(31) && - (env->context.valid_frs & (1 << (regid - UWX_REG_FR(2)))) ) { + else if (regid >= UWX_REG_FR(16) && regid <= UWX_REG_FR(31) && + (env->context.valid_frs & (1 << (regid - UWX_REG_FR(16) + 4))) ) { valp[0] = env->context.fr[regid - UWX_REG_FR(16) + 4].part0; valp[1] = env->context.fr[regid - UWX_REG_FR(16) + 4].part1; } @@ -114,7 +125,7 @@ if (n != DWORDSZ) status = UWX_ERR_COPYIN_REG; } - else if (regid >= UWX_REG_FR(2) && regid <= UWX_REG_BR(127)) { + else if (regid >= UWX_REG_FR(2) && regid <= UWX_REG_FR(127)) { if (env->copyin == 0) return UWX_ERR_NOCALLBACKS; n = (*env->copyin)(UWX_COPYIN_REG, (char *)valp, @@ -170,7 +181,7 @@ natcollp = bsp | 0x01f8; if (natcollp >= bsp) n = (*env->copyin)(UWX_COPYIN_REG, (char *)&natcoll, - (uint64_t)UWX_REG_RNAT, DWORDSZ, env->cb_token); + (uint64_t)UWX_REG_AR_RNAT, DWORDSZ, env->cb_token); else n = (*env->copyin)(UWX_COPYIN_RSTACK, (char *)&natcoll, bsp, DWORDSZ, env->cb_token); @@ -197,6 +208,8 @@ status = UWX_OK; + if (regid == UWX_REG_GR(12)) + regid = UWX_REG_SP; if (regid < NSPECIALREG) *dispp = env->history.special[regid]; else if (regid >= UWX_REG_GR(4) && regid <= UWX_REG_GR(7)) @@ -233,6 +246,8 @@ if (env == 0) return UWX_ERR_NOENV; + if (regid == UWX_REG_GR(12)) + regid = UWX_REG_SP; if (regid < NSPECIALREG) { env->context.special[regid] = val; env->context.valid_regs |= 1 << regid; ==== //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_env.h#2 (text+ko) ==== @@ -39,7 +39,7 @@ #define NSCOREBOARDS 8 /* Initial allocation of scoreboards */ -#define NSPECIALREG 14 +#define NSPECIALREG 16 /* Must be even, so FRs are aligned */ #define NPRESERVEDGR 4 #define NPRESERVEDBR 5 #define NPRESERVEDFR 20 @@ -61,7 +61,8 @@ #define VALID_GR_SHIFT NSPECIALREG #define VALID_BR_SHIFT (NSPECIALREG + NPRESERVEDGR) -#define VALID_BASIC4 0x0f /* IP, SP, BSP, PFS */ +#define VALID_BASIC4 0x0f /* IP, SP, BSP, CFM */ +#define VALID_MARKERS 0x70 /* RP, PSP, PFS */ struct uwx_history { uint64_t special[NSPECIALREG]; ==== //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_scoreboard.c#2 (text+ko) ==== @@ -63,8 +63,8 @@ sb->rstate[i] = UWX_DISP_NONE; sb->rstate[SBREG_RP] = UWX_DISP_REG(UWX_REG_BR(0)); sb->rstate[SBREG_PSP] = UWX_DISP_SPPLUS(0); - sb->rstate[SBREG_PFS] = UWX_DISP_REG(UWX_REG_PFS); - sb->rstate[SBREG_PRIUNAT] = UWX_DISP_REG(UWX_REG_UNAT); + sb->rstate[SBREG_PFS] = UWX_DISP_REG(UWX_REG_AR_PFS); + sb->rstate[SBREG_PRIUNAT] = UWX_DISP_REG(UWX_REG_AR_UNAT); sb->label = 0; return sb; } ==== //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_self.c#2 (text+ko) ==== @@ -91,18 +91,33 @@ uint64_t cfm; unsigned int nat; uint64_t ec; + int adj; info->ucontext = ucontext; status = __uc_get_reason(ucontext, &reason); status = __uc_get_ip(ucontext, &ip); status = __uc_get_grs(ucontext, 12, 1, &sp, &nat); + status = __uc_get_cfm(ucontext, &cfm); +#ifdef NEW_UC_GET_AR + status = __uc_get_ar_bsp(ucontext, &bsp); + status = __uc_get_ar_bspstore(ucontext, &info->bspstore); + status = __uc_get_ar_ec(ucontext, &ec); +#else status = __uc_get_ar(ucontext, 17, &bsp); status = __uc_get_ar(ucontext, 18, &info->bspstore); status = __uc_get_ar(ucontext, 66, &ec); - status = __uc_get_cfm(ucontext, &cfm); +#endif + /* The returned bsp needs to be adjusted. */ + /* For interrupt frames, where bsp was advanced by a cover */ + /* instruction, subtract sof (size of frame). For non-interrupt */ + /* frames, where bsp was advanced by br.call, subtract sol */ + /* (size of locals). */ + if (reason != 0) + adj = (unsigned int)cfm & 0x7f; /* interrupt frame */ + else + adj = ((unsigned int)cfm >> 7) & 0x7f; /* non-interrupt frame */ + bsp = uwx_add_to_bsp(bsp, -adj); cfm |= ec << 52; - if (reason != 0) - bsp = uwx_add_to_bsp(bsp, -((unsigned int)cfm & 0x7f)); uwx_init_context(env, ip, sp, bsp, cfm); return UWX_OK; } @@ -171,22 +186,22 @@ regid = (int)rem; if (rem < UWX_REG_GR(0)) { switch (regid) { - case UWX_REG_PFS: - status = __uc_get_ar(info->ucontext, 64, dp); - break; case UWX_REG_PREDS: status = __uc_get_prs(info->ucontext, dp); break; - case UWX_REG_RNAT: + case UWX_REG_AR_PFS: + status = __uc_get_ar(info->ucontext, 64, dp); + break; + case UWX_REG_AR_RNAT: status = __uc_get_ar(info->ucontext, 19, dp); break; - case UWX_REG_UNAT: + case UWX_REG_AR_UNAT: status = __uc_get_ar(info->ucontext, 36, dp); break; - case UWX_REG_FPSR: + case UWX_REG_AR_FPSR: status = __uc_get_ar(info->ucontext, 40, dp); break; - case UWX_REG_LC: + case UWX_REG_AR_LC: status = __uc_get_ar(info->ucontext, 65, dp); break; default: ==== //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_step.c#2 (text+ko) ==== @@ -26,6 +26,7 @@ #include "uwx_uinfo.h" #include "uwx_scoreboard.h" #include "uwx_str.h" +#include "uwx_step.h" #include "uwx_trace.h" /* @@ -44,6 +45,8 @@ int uwx_decode_uvec(struct uwx_env *env, uint64_t *uvec, uint64_t **rstate); int uwx_restore_reg(struct uwx_env *env, uint64_t rstate, uint64_t *valp, uint64_t *histp); +int uwx_restore_freg(struct uwx_env *env, uint64_t rstate, + uint64_t *valp, uint64_t *histp); int uwx_restore_nat(struct uwx_env *env, uint64_t rstate, int unat); @@ -59,12 +62,8 @@ struct uwx_utable_entry uentry; uint64_t uvecout[4]; - if (env == 0) - return UWX_ERR_NOENV; if (env->copyin == 0 || env->lookupip == 0) return UWX_ERR_NOCALLBACKS; - if ((env->context.valid_regs & VALID_BASIC4) != VALID_BASIC4) - return UWX_ERR_NOCONTEXT; env->function_offset = -1LL; env->function_name = 0; @@ -131,7 +130,63 @@ } +/* uwx_restore_markers: Restores the stack markers -- PSP, RP, PFS */ + +int uwx_restore_markers(struct uwx_env *env) +{ + int status; + uint64_t val; + uint64_t hist; + + if ((env->context.valid_regs & VALID_BASIC4) != VALID_BASIC4) + return UWX_ERR_NOCONTEXT; + + /* If we haven't already obtained the frame info for the */ + /* current frame, get it now. */ + + if (env->rstate == 0) { + status = uwx_get_frame_info(env); + if (status != UWX_OK) + return status; + } + + TRACE_S_STEP(env->rstate) + + if (env->rstate[SBREG_PSP] != UWX_DISP_NONE) { + status = uwx_restore_reg(env, env->rstate[SBREG_PSP], &val, &hist); + if (status != UWX_OK) + return status; + env->context.special[UWX_REG_PSP] = val; + env->history.special[UWX_REG_PSP] = hist; + env->context.valid_regs |= 1 << UWX_REG_PSP; + TRACE_S_RESTORE_REG("PSP", env->rstate[SBREG_PSP], val) + } + + if (env->rstate[SBREG_RP] != UWX_DISP_NONE) { + status = uwx_restore_reg(env, env->rstate[SBREG_RP], &val, &hist); + if (status != UWX_OK) + return status; + env->context.special[UWX_REG_RP] = val; + env->history.special[UWX_REG_RP] = hist; + env->context.valid_regs |= 1 << UWX_REG_RP; + TRACE_S_RESTORE_REG("RP", env->rstate[SBREG_RP], val) + } + + if (env->rstate[SBREG_PFS] != UWX_DISP_NONE) { + status = uwx_restore_reg(env, env->rstate[SBREG_PFS], &val, &hist); + if (status != UWX_OK) + return status; + env->context.special[UWX_REG_PFS] = val; + env->history.special[UWX_REG_PFS] = hist; + env->context.valid_regs |= 1 << UWX_REG_PFS; + TRACE_S_RESTORE_REG("PFS", env->rstate[SBREG_PFS], val) + } + + return UWX_OK; +} + /* uwx_get_sym_info: Gets symbolic info from current frame */ + int uwx_get_sym_info( struct uwx_env *env, char **modp, @@ -147,10 +202,6 @@ if (env == 0) return UWX_ERR_NOENV; - if (env->copyin == 0 || env->lookupip == 0) - return UWX_ERR_NOCALLBACKS; - if ((env->context.valid_regs & VALID_BASIC4) != VALID_BASIC4) - return UWX_ERR_NOCONTEXT; /* If we haven't already obtained the frame info for the */ /* current frame, get it now. */ @@ -221,48 +272,15 @@ if (env == 0) return UWX_ERR_NOENV; - if (env->copyin == 0 || env->lookupip == 0) - return UWX_ERR_NOCALLBACKS; - if ((env->context.valid_regs & VALID_BASIC4) != VALID_BASIC4) - return UWX_ERR_NOCONTEXT; - - /* If we haven't already obtained the frame info for the */ - /* current frame, get it now. */ - - if (env->rstate == 0) { - status = uwx_get_frame_info(env); - if (status != UWX_OK) - return status; - } - - TRACE_S_STEP(env->rstate) /* Complete the current context by restoring the current values */ /* of psp, rp, and pfs. */ - if (env->rstate[SBREG_PSP] != UWX_DISP_NONE) { - status = uwx_restore_reg(env, env->rstate[SBREG_PSP], &val, &hist); + if (env->rstate == 0 || + (env->context.valid_regs & VALID_MARKERS) != VALID_MARKERS) { + status = uwx_restore_markers(env); if (status != UWX_OK) return status; - env->context.special[UWX_REG_PSP] = val; - env->history.special[UWX_REG_PSP] = hist; - TRACE_S_RESTORE_REG("PSP", env->rstate[SBREG_PSP], val) - } - if (env->rstate[SBREG_RP] != UWX_DISP_NONE) { - status = uwx_restore_reg(env, env->rstate[SBREG_RP], &val, &hist); - if (status != UWX_OK) - return status; - env->context.special[UWX_REG_RP] = val; - env->history.special[UWX_REG_RP] = hist; - TRACE_S_RESTORE_REG("RP", env->rstate[SBREG_RP], val) - } - if (env->rstate[SBREG_PFS] != UWX_DISP_NONE) { - status = uwx_restore_reg(env, env->rstate[SBREG_PFS], &val, &hist); - if (status != UWX_OK) - return status; - env->context.special[UWX_REG_PFS] = val; - env->history.special[UWX_REG_PFS] = hist; - TRACE_S_RESTORE_REG("PFS", env->rstate[SBREG_PFS], val) } /* Check for bottom of stack (rp == 0). */ @@ -336,7 +354,7 @@ if (env->nsbreg == NSBREG) { for (i = 0; i < NSB_FR; i++) { if (env->rstate[SBREG_FR + i] != UWX_DISP_NONE) { - status = uwx_restore_reg(env, + status = uwx_restore_freg(env, env->rstate[SBREG_FR + i], fval, &hist); if (status != UWX_OK) return status; @@ -364,36 +382,36 @@ status = uwx_restore_reg(env, env->rstate[SBREG_RNAT], &val, &hist); if (status != UWX_OK) return status; - env->context.special[UWX_REG_RNAT] = val; - env->history.special[UWX_REG_RNAT] = hist; - env->context.valid_regs |= 1 << UWX_REG_RNAT; + env->context.special[UWX_REG_AR_RNAT] = val; + env->history.special[UWX_REG_AR_RNAT] = hist; + env->context.valid_regs |= 1 << UWX_REG_AR_RNAT; TRACE_S_RESTORE_REG("RNAT", env->rstate[SBREG_RNAT], val) } if (env->rstate[SBREG_UNAT] != UWX_DISP_NONE) { status = uwx_restore_reg(env, env->rstate[SBREG_UNAT], &val, &hist); if (status != UWX_OK) return status; - env->context.special[UWX_REG_UNAT] = val; - env->history.special[UWX_REG_UNAT] = hist; - env->context.valid_regs |= 1 << UWX_REG_UNAT; + env->context.special[UWX_REG_AR_UNAT] = val; + env->history.special[UWX_REG_AR_UNAT] = hist; + env->context.valid_regs |= 1 << UWX_REG_AR_UNAT; TRACE_S_RESTORE_REG("UNAT", env->rstate[SBREG_UNAT], val) } if (env->rstate[SBREG_FPSR] != UWX_DISP_NONE) { status = uwx_restore_reg(env, env->rstate[SBREG_FPSR], &val, &hist); if (status != UWX_OK) return status; - env->context.special[UWX_REG_FPSR] = val; - env->history.special[UWX_REG_FPSR] = hist; - env->context.valid_regs |= 1 << UWX_REG_FPSR; + env->context.special[UWX_REG_AR_FPSR] = val; + env->history.special[UWX_REG_AR_FPSR] = hist; + env->context.valid_regs |= 1 << UWX_REG_AR_FPSR; TRACE_S_RESTORE_REG("FPSR", env->rstate[SBREG_FPSR], val) } if (env->rstate[SBREG_LC] != UWX_DISP_NONE) { status = uwx_restore_reg(env, env->rstate[SBREG_LC], &val, &hist); if (status != UWX_OK) return status; - env->context.special[UWX_REG_LC] = val; - env->history.special[UWX_REG_LC] = hist; - env->context.valid_regs |= 1 << UWX_REG_LC; + env->context.special[UWX_REG_AR_LC] = val; + env->history.special[UWX_REG_AR_LC] = hist; + env->context.valid_regs |= 1 << UWX_REG_AR_LC; TRACE_S_RESTORE_REG("LC", env->rstate[SBREG_LC], val) } @@ -426,6 +444,7 @@ /* The frame info for the new frame isn't yet available. */ env->rstate = 0; + env->context.valid_regs &= ~VALID_MARKERS; return UWX_OK; } @@ -497,6 +516,50 @@ return status; } +#define COPYIN_MSTACK_16(dest, src) \ + (env->remote? \ + (*env->copyin)(UWX_COPYIN_MSTACK, (dest), (src), \ + 2*DWORDSZ, env->cb_token) : \ + (*(uint64_t *)(dest) = *(uint64_t *)(src), \ + *(uint64_t *)((dest)+8) = *(uint64_t *)((src)+8), \ + 2*DWORDSZ) ) + +int uwx_restore_freg(struct uwx_env *env, uint64_t rstate, + uint64_t *valp, uint64_t *histp) +{ + int status; + uint64_t p; + int n; + int regid; + + status = UWX_OK; + + switch (UWX_GET_DISP_CODE(rstate)) { + case UWX_DISP_SPREL(0): + p = env->context.special[UWX_REG_SP] + + UWX_GET_DISP_OFFSET(rstate); + n = COPYIN_MSTACK_16((char *)valp, p); + if (n != 2*DWORDSZ) + status = UWX_ERR_COPYIN_MSTK; + *histp = UWX_DISP_MSTK(p); + break; + case UWX_DISP_PSPREL(0): + p = env->context.special[UWX_REG_PSP] + 16 - + UWX_GET_DISP_OFFSET(rstate); + n = COPYIN_MSTACK_16((char *)valp, p); + if (n != 2*DWORDSZ) + status = UWX_ERR_COPYIN_MSTK; + *histp = UWX_DISP_MSTK(p); + break; + case UWX_DISP_REG(0): + regid = UWX_GET_DISP_REGID(rstate); + status = uwx_get_reg(env, regid, valp); + (void) uwx_get_spill_loc(env, regid, histp); + break; + } + return status; +} + /* uwx_restore_nat: Returns the saved NaT bit for a preserved GR */ int uwx_restore_nat(struct uwx_env *env, uint64_t rstate, int unat) ==== //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_trace.c#2 (text+ko) ==== @@ -98,9 +98,9 @@ break; case UWX_DISP_REG(0): reg = UWX_GET_DISP_REGID(rstate); - if (reg == UWX_REG_PFS) + if (reg == UWX_REG_AR_PFS) printf(" [AR.PFS]\n"); - else if (reg == UWX_REG_UNAT) + else if (reg == UWX_REG_AR_UNAT) printf(" [AR.UNAT]\n"); else if (reg >= UWX_REG_GR(0) && reg < UWX_REG_GR(128)) printf(" [GR%d]\n", reg - UWX_REG_GR(0)); ==== //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_trace.h#2 (text+ko) ==== @@ -29,55 +29,8 @@ #define UWX_TRACE_COPYIN 64 /* UWX_TRACE=C: copyin callback */ #define UWX_TRACE_LOOKUPIP 128 /* UWX_TRACE=L: lookupip callback */ -#ifndef UWX_TRACE_ENABLE - -#define TRACE_INIT -#define TRACE_B_REUSE(id) -#define TRACE_B_ALLOC(id) -#define TRACE_B_POP(id) -#define TRACE_B_LABEL(label) -#define TRACE_B_LABEL_COPY(id) -#define TRACE_B_LABEL_REVERSE(back, new) -#define TRACE_B_COPY(label, id) -#define TRACE_B_COPY_FREE(id) -#define TRACE_B_COPY_FOUND(id) -#define TRACE_B_COPY_COPY(id) -#define TRACE_B_COPY_REVERSE(back, new) -#define TRACE_B_FREE(id) -#define TRACE_I_DECODE_RHDR_1(name, b0) -#define TRACE_I_DECODE_RHDR_1L(name, b0, val) -#define TRACE_I_DECODE_RHDR_2L(name, b0, b1, val) -#define TRACE_I_DECODE_PROLOGUE_1(name, b0) -#define TRACE_I_DECODE_PROLOGUE_1L(name, b0, val) -#define TRACE_I_DECODE_PROLOGUE_1LL(name, b0, val1, val2) -#define TRACE_I_DECODE_PROLOGUE_2(name, b0, b1) -#define TRACE_I_DECODE_PROLOGUE_2L(name, b0, b1, parm1) -#define TRACE_I_DECODE_PROLOGUE_3(name, b0, b1, b2) -#define TRACE_I_DECODE_PROLOGUE_4(name, b0, b1, b2, b3) -#define TRACE_I_DECODE_PROLOGUE_SPILL_BASE(spill_base) -#define TRACE_I_DECODE_PROLOGUE_MASKS(gr_mem_mask, gr_gr_mask) -#define TRACE_I_DECODE_PROLOGUE_NSPILL(ngr) -#define TRACE_I_DECODE_BODY_1(name, b0) -#define TRACE_I_DECODE_BODY_1L(name, b0, parm1) -#define TRACE_I_DECODE_BODY_1LL(name, b0, parm1, parm2) -#define TRACE_R_UIB(uentry, ulen) -#define TRACE_R_DUMP_SB(scoreboard, rhdr, cur_slot, ip_slot) -#define TRACE_S_STEP(rstate) -#define TRACE_S_RESTORE_REG(regname, rstate, val) -#define TRACE_S_RESTORE_GR(regid, rstate, val) -#define TRACE_S_RESTORE_BR(regid, rstate, val) -#define TRACE_S_RESTORE_FR(regid, rstate, val) -#define TRACE_T_SEARCH32(ip) -#define TRACE_T_BINSEARCH32(lb, ub, mid, code_start, code_end) -#define TRACE_C_GET_REG(regid, bsp) -#define TRACE_C_ROTATE_GR(regid, sor, rrb_gr, newregid) -#define TRACE_SELF_COPYIN4(rem, len, wp) -#define TRACE_SELF_COPYIN8(rem, len, dp) -#define TRACE_SELF_LOOKUP(ip) -#define TRACE_SELF_LOOKUP_DESC(text_base, unwind_base) +#ifdef UWX_TRACE_ENABLE -#else /* !UWX_TRACE_ENABLE */ - extern void uwx_trace_init(struct uwx_env *env); extern void uwx_dump_rstate(int regid, uint64_t rstate); @@ -235,7 +188,7 @@ #define TRACE_S_STEP(rstate) \ if (env->trace & UWX_TRACE_STEP) { \ - printf("uwx_step:\n"); \ + printf("uwx_restore_markers:\n"); \ uwx_dump_rstate(SBREG_RP, (rstate)[SBREG_RP]); \ uwx_dump_rstate(SBREG_PSP, (rstate)[SBREG_PSP]); \ uwx_dump_rstate(SBREG_PFS, (rstate)[SBREG_PFS]); \ @@ -344,5 +297,52 @@ (unsigned int) ((text_base)+(unwind_base)[2])); \ } -#endif /* !UWX_TRACE_ENABLE */ +#else /* !UWX_TRACE_ENABLE */ + +#define TRACE_INIT +#define TRACE_B_REUSE(id) +#define TRACE_B_ALLOC(id) +#define TRACE_B_POP(id) +#define TRACE_B_LABEL(label) +#define TRACE_B_LABEL_COPY(id) +#define TRACE_B_LABEL_REVERSE(back, new) +#define TRACE_B_COPY(label, id) +#define TRACE_B_COPY_FREE(id) +#define TRACE_B_COPY_FOUND(id) +#define TRACE_B_COPY_COPY(id) +#define TRACE_B_COPY_REVERSE(back, new) +#define TRACE_B_FREE(id) +#define TRACE_I_DECODE_RHDR_1(name, b0) +#define TRACE_I_DECODE_RHDR_1L(name, b0, val) +#define TRACE_I_DECODE_RHDR_2L(name, b0, b1, val) +#define TRACE_I_DECODE_PROLOGUE_1(name, b0) +#define TRACE_I_DECODE_PROLOGUE_1L(name, b0, val) +#define TRACE_I_DECODE_PROLOGUE_1LL(name, b0, val1, val2) +#define TRACE_I_DECODE_PROLOGUE_2(name, b0, b1) +#define TRACE_I_DECODE_PROLOGUE_2L(name, b0, b1, parm1) +#define TRACE_I_DECODE_PROLOGUE_3(name, b0, b1, b2) +#define TRACE_I_DECODE_PROLOGUE_4(name, b0, b1, b2, b3) +#define TRACE_I_DECODE_PROLOGUE_SPILL_BASE(spill_base) +#define TRACE_I_DECODE_PROLOGUE_MASKS(gr_mem_mask, gr_gr_mask) +#define TRACE_I_DECODE_PROLOGUE_NSPILL(ngr) +#define TRACE_I_DECODE_BODY_1(name, b0) +#define TRACE_I_DECODE_BODY_1L(name, b0, parm1) +#define TRACE_I_DECODE_BODY_1LL(name, b0, parm1, parm2) +#define TRACE_R_UIB(uentry, ulen) +#define TRACE_R_DUMP_SB(scoreboard, rhdr, cur_slot, ip_slot) +#define TRACE_S_STEP(rstate) +#define TRACE_S_RESTORE_REG(regname, rstate, val) +#define TRACE_S_RESTORE_GR(regid, rstate, val) +#define TRACE_S_RESTORE_BR(regid, rstate, val) +#define TRACE_S_RESTORE_FR(regid, rstate, val) +#define TRACE_T_SEARCH32(ip) +#define TRACE_T_BINSEARCH32(lb, ub, mid, code_start, code_end) +#define TRACE_C_GET_REG(regid, bsp) +#define TRACE_C_ROTATE_GR(regid, sor, rrb_gr, newregid) +#define TRACE_SELF_COPYIN4(rem, len, wp) +#define TRACE_SELF_COPYIN8(rem, len, dp) +#define TRACE_SELF_LOOKUP(ip) +#define TRACE_SELF_LOOKUP_DESC(text_base, unwind_base) + +#endif /* UWX_TRACE_ENABLE */ ==== //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_ttrace.c#2 (text+ko) ==== @@ -249,22 +249,22 @@ if (info->have_ucontext) { if (regid < UWX_REG_GR(0)) { switch (regid) { - case UWX_REG_PFS: - status = __uc_get_ar(&info->ucontext, 64, dp); - break; case UWX_REG_PREDS: status = __uc_get_prs(&info->ucontext, dp); break; - case UWX_REG_RNAT: + case UWX_REG_AR_PFS: + status = __uc_get_ar(&info->ucontext, 64, dp); + break; + case UWX_REG_AR_RNAT: status = __uc_get_ar(&info->ucontext, 19, dp); break; - case UWX_REG_UNAT: + case UWX_REG_AR_UNAT: status = __uc_get_ar(&info->ucontext, 36, dp); break; - case UWX_REG_FPSR: + case UWX_REG_AR_FPSR: status = __uc_get_ar(&info->ucontext, 40, dp); break; - case UWX_REG_LC: + case UWX_REG_AR_LC: status = __uc_get_ar(&info->ucontext, 65, dp); break; default: @@ -283,22 +283,22 @@ else { if (regid < UWX_REG_GR(0)) { switch (regid) { - case UWX_REG_PFS: - ttreg = __ar_pfs; - break; case UWX_REG_PREDS: ttreg = __pr; break; - case UWX_REG_RNAT: + case UWX_REG_AR_PFS: + ttreg = __ar_pfs; + break; + case UWX_REG_AR_RNAT: ttreg = __ar_rnat; break; - case UWX_REG_UNAT: + case UWX_REG_AR_UNAT: ttreg = __ar_unat; break; - case UWX_REG_FPSR: + case UWX_REG_AR_FPSR: ttreg = __ar_fpsr; break; - case UWX_REG_LC: + case UWX_REG_AR_LC: ttreg = __ar_lc; break; default: ==== //depot/projects/netperf/sys/contrib/ia64/libuwx/src/uwx_uinfo.c#2 (text+ko) ==== @@ -232,7 +232,8 @@ if ((b0 & 0x20) == 0) { TRACE_I_DECODE_RHDR_1("(R1) prologue", b0) rhdr->is_prologue = 1; - } else { + } + else { TRACE_I_DECODE_RHDR_1("(R1) body", b0) } rhdr->rlen = b0 & 0x1f; @@ -263,7 +264,8 @@ if ((b0 & 0x03) == 0) { TRACE_I_DECODE_RHDR_1L("(R3) prologue", b0, val) rhdr->is_prologue = 1; - } else { + } + else { TRACE_I_DECODE_RHDR_1L("(R3) body", b0, val) } rhdr->rlen = (unsigned int) val; @@ -863,7 +865,7 @@ if (fr_mem_mask & 1) { newrstate[SBREG_FR + i] = UWX_DISP_PSPREL(fr_base); tspill[SBREG_FR + i] = 0; - fr_base -= 8; + fr_base -= 16; nfr--; } fr_mem_mask = fr_mem_mask >> 1; ==== //depot/projects/netperf/sys/crypto/cast128/cast128.c#2 (text+ko) ==== @@ -1,890 +1,247 @@ -/* $KAME: cast128.c,v 1.5 2001/11/27 09:47:32 sakane Exp $ */ +/* $NetBSD: cast128.c,v 1.7 2003/08/26 20:03:57 thorpej Exp $ */ +/* $OpenBSD: cast.c,v 1.2 2000/06/06 06:49:47 deraadt Exp $ */ /* - * heavily modified by Tomomi Suzuki - */ - -/* - * The CAST-128 Encryption Algorithm (RFC 2144) - * - * original implementation - * 1997/08/21 - */ -/* - * Copyright (C) 1997 Hideo "Sir MANMOS" Morishita - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY Hideo "Sir MaNMOS" Morishita ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL Hideo "Sir MaNMOS" Morishita BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * CAST-128 in C + * Written by Steve Reid + * 100% Public Domain - no warranty + * Released 1997.10.11 */ #include -__FBSDID("$FreeBSD: src/sys/crypto/cast128/cast128.c,v 1.6 2003/06/10 21:39:41 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/crypto/cast128/cast128.c,v 1.7 2003/10/10 15:06:16 ume Exp $"); -#include -#include +#include #include -#include +#include +/* Macros to access 8-bit bytes out of a 32-bit word */ +#define U_INT8_Ta(x) ( (u_int8_t) (x>>24) ) +#define U_INT8_Tb(x) ( (u_int8_t) ((x>>16)&255) ) +#define U_INT8_Tc(x) ( (u_int8_t) ((x>>8)&255) ) +#define U_INT8_Td(x) ( (u_int8_t) ((x)&255) ) -static u_int32_t S1[]; -static u_int32_t S2[]; -static u_int32_t S3[]; -static u_int32_t S4[]; -static u_int32_t S5[]; -static u_int32_t S6[]; -static u_int32_t S7[]; -static u_int32_t S8[]; +/* Circular left shift */ +#define ROL(x, n) ( ((x)<<(n)) | ((x)>>(32-(n))) ) +/* CAST-128 uses three different round functions */ +#define F1(l, r, i) \ + t = ROL(key->xkey[i] + r, key->xkey[i+16]); \ + l ^= ((cast_sbox1[U_INT8_Ta(t)] ^ cast_sbox2[U_INT8_Tb(t)]) - \ + cast_sbox3[U_INT8_Tc(t)]) + cast_sbox4[U_INT8_Td(t)]; +#define F2(l, r, i) \ + t = ROL(key->xkey[i] ^ r, key->xkey[i+16]); \ + l ^= ((cast_sbox1[U_INT8_Ta(t)] - cast_sbox2[U_INT8_Tb(t)]) + \ + cast_sbox3[U_INT8_Tc(t)]) ^ cast_sbox4[U_INT8_Td(t)]; +#define F3(l, r, i) \ + t = ROL(key->xkey[i] - r, key->xkey[i+16]); \ + l ^= ((cast_sbox1[U_INT8_Ta(t)] + cast_sbox2[U_INT8_Tb(t)]) ^ \ + cast_sbox3[U_INT8_Tc(t)]) - cast_sbox4[U_INT8_Td(t)]; -/* >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Oct 10 16:50:18 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 078A716A4C1; Fri, 10 Oct 2003 16:50:18 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D288616A4BF for ; Fri, 10 Oct 2003 16:50:17 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FFDC43F93 for ; Fri, 10 Oct 2003 16:50:14 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9ANoEXJ041158 for ; Fri, 10 Oct 2003 16:50:14 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9ANo5ri041154 for perforce@freebsd.org; Fri, 10 Oct 2003 16:50:05 -0700 (PDT) (envelope-from peter@freebsd.org) Date: Fri, 10 Oct 2003 16:50:05 -0700 (PDT) Message-Id: <200310102350.h9ANo5ri041154@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 39482 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2003 23:50:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=39482 Change 39482 by peter@peter_daintree on 2003/10/10 16:49:53 IFC @39481 Affected files ... .. //depot/projects/hammer/Makefile#13 integrate .. //depot/projects/hammer/Makefile.inc1#29 integrate .. //depot/projects/hammer/UPDATING#19 integrate .. //depot/projects/hammer/bin/date/date.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/ChangeLog#5 integrate .. //depot/projects/hammer/crypto/heimdal/ChangeLog.2002#1 branch .. //depot/projects/hammer/crypto/heimdal/FREEBSD-Xlist#1 branch .. //depot/projects/hammer/crypto/heimdal/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/NEWS#4 integrate .. //depot/projects/hammer/crypto/heimdal/aclocal.m4#5 integrate .. //depot/projects/hammer/crypto/heimdal/admin/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/admin/change.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/admin/copy.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/admin/get.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/admin/ktutil.8#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/afsutil/ChangeLog#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/afsutil/Makefile.am#2 integrate .. //depot/projects/hammer/crypto/heimdal/appl/afsutil/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/afsutil/afslog.1#1 branch .. //depot/projects/hammer/crypto/heimdal/appl/afsutil/afslog.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/ChangeLog#5 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/common/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/ftp/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/ftp/ftp.1#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/ftp/ftp.c#5 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/ftp/gssapi.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/ftp/main.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/ftpd/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/ftpd/ftpd.8#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/ftpd/ftpd.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/ftpd/ftpd_locl.h#2 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/ftpd/gss_userok.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/ftpd/ls.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/ftp/ftpd/pathnames.h#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/kf/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/kf/kf.1#2 integrate .. //depot/projects/hammer/crypto/heimdal/appl/kf/kfd.8#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/kf/kfd.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/login/ChangeLog#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/login/Makefile.am#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/login/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/login/login.1#1 branch .. //depot/projects/hammer/crypto/heimdal/appl/login/login.access.5#1 branch .. //depot/projects/hammer/crypto/heimdal/appl/login/login.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/push/ChangeLog#2 integrate .. //depot/projects/hammer/crypto/heimdal/appl/push/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/push/pfrom.1#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/push/push.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/appl/rcp/ChangeLog#2 integrate .. //depot/projects/hammer/crypto/heimdal/appl/rcp/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/rcp/rcp.1#1 branch .. //depot/projects/hammer/crypto/heimdal/appl/rcp/rcp.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/appl/rsh/ChangeLog#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/rsh/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/rsh/rsh.1#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/rsh/rsh.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/rsh/rsh_locl.h#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/rsh/rshd.8#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/rsh/rshd.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/su/ChangeLog#3 integrate .. //depot/projects/hammer/crypto/heimdal/appl/su/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/su/su.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/telnet/ChangeLog#5 integrate .. //depot/projects/hammer/crypto/heimdal/appl/telnet/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/telnet/libtelnet/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/telnet/libtelnet/kerberos5.c#5 integrate .. //depot/projects/hammer/crypto/heimdal/appl/telnet/telnet/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/telnet/telnetd/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/appl/test/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/cf/ChangeLog#4 integrate .. //depot/projects/hammer/crypto/heimdal/cf/Makefile.am.common#3 integrate .. //depot/projects/hammer/crypto/heimdal/cf/check-compile-et.m4#2 integrate .. //depot/projects/hammer/crypto/heimdal/cf/check-var.m4#2 integrate .. //depot/projects/hammer/crypto/heimdal/cf/crypto.m4#4 integrate .. //depot/projects/hammer/crypto/heimdal/cf/make-proto.pl#3 integrate .. //depot/projects/hammer/crypto/heimdal/cf/roken-frag.m4#4 integrate .. //depot/projects/hammer/crypto/heimdal/cf/sunos.m4#3 integrate .. //depot/projects/hammer/crypto/heimdal/configure#5 integrate .. //depot/projects/hammer/crypto/heimdal/configure.in#5 integrate .. //depot/projects/hammer/crypto/heimdal/doc/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/doc/ack.texi#3 integrate .. //depot/projects/hammer/crypto/heimdal/doc/intro.texi#2 integrate .. //depot/projects/hammer/crypto/heimdal/doc/misc.texi#2 integrate .. //depot/projects/hammer/crypto/heimdal/doc/programming.texi#2 integrate .. //depot/projects/hammer/crypto/heimdal/doc/setup.texi#2 integrate .. //depot/projects/hammer/crypto/heimdal/include/Makefile.in#5 integrate .. //depot/projects/hammer/crypto/heimdal/include/kadm5/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/include/make_crypto.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/kadmin/ChangeLog#5 integrate .. //depot/projects/hammer/crypto/heimdal/kadmin/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/kadmin/ank.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/kadmin/init.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/kadmin/kadm_conn.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/kadmin/kadmin.8#3 integrate .. //depot/projects/hammer/crypto/heimdal/kadmin/kadmin.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/kadmin/kadmind.8#4 integrate .. //depot/projects/hammer/crypto/heimdal/kadmin/kadmind.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/kadmin/mod.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/kadmin/server.c#5 integrate .. //depot/projects/hammer/crypto/heimdal/kadmin/util.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/kadmin/version4.c#6 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/524.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/Makefile.am#2 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/config.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/connect.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/hprop.8#3 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/hpropd.8#3 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/hpropd.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/kaserver.c#5 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/kdc.8#3 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/kdc_locl.h#3 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/kerberos4.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/kerberos5.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/string2key.8#3 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/string2key.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/kdc/v4_dump.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/kpasswd/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/kpasswd/kpasswd.1#3 integrate .. //depot/projects/hammer/crypto/heimdal/kpasswd/kpasswdd.8#3 integrate .. //depot/projects/hammer/crypto/heimdal/kpasswd/kpasswdd.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/kuser/Makefile.am#2 integrate .. //depot/projects/hammer/crypto/heimdal/kuser/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/kuser/kdestroy.1#2 integrate .. //depot/projects/hammer/crypto/heimdal/kuser/kdestroy.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/kuser/kgetcred.1#3 integrate .. //depot/projects/hammer/crypto/heimdal/kuser/kinit.1#5 integrate .. //depot/projects/hammer/crypto/heimdal/kuser/kinit.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/kuser/klist.1#3 integrate .. //depot/projects/hammer/crypto/heimdal/kuser/klist.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/45/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/asn1/Makefile.am#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/asn1/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/asn1/check-common.c#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/asn1/check-common.h#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/asn1/check-der.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/asn1/check-gen.c#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/asn1/der_copy.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/asn1/der_put.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/asn1/gen.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/asn1/k5.asn1#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/auth/ChangeLog#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/auth/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/auth/afskauthlib/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/auth/pam/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/auth/sia/Makefile.am#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/auth/sia/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/com_err/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/8003.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/ChangeLog#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/Makefile.am#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/accept_sec_context.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/acquire_cred.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/add_cred.c#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/add_oid_set_member.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/compare_name.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/compat.c#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/context_time.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/copy_ccache.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/create_emtpy_oid_set.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/delete_sec_context.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/display_name.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/display_status.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/duplicate_name.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/export_name.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/export_sec_context.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/get_mic.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/gss_acquire_cred.3#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/gssapi.3#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/gssapi.h#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/gssapi_locl.h#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/import_name.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/import_sec_context.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/indicate_mechs.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/init_sec_context.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/inquire_context.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/inquire_cred.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/inquire_cred_by_mech.c#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/inquire_mechs_for_name.c#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/inquire_names_for_mech.c#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/process_context_token.c#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/release_buffer.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/release_cred.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/release_name.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/release_oid_set.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/test_acquire_cred.c#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/test_oid_set_member.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/unwrap.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/verify_mic.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/gssapi/wrap.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/hdb/Makefile.am#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/hdb/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/hdb/common.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/hdb/mkey.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kadm5/ChangeLog#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kadm5/Makefile.am#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kadm5/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kadm5/dump_log.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kadm5/init_c.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kadm5/ipropd_master.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kadm5/ipropd_slave.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kadm5/log.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kadm5/send_recv.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kafs/ChangeLog#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kafs/Makefile.am#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kafs/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kafs/afskrb.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kafs/afskrb5.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kafs/afssys.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kafs/afssysdefs.h#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kafs/common.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kafs/dlfcn.h#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kafs/kafs.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kafs/kafs.h#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/kafs/kafs_locl.h#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/Makefile.am#5 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/Makefile.in#5 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/addr_families.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/aes-test.c#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/krb5/aname_to_localname.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/cache.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/changepw.c#6 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/context.c#5 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/convert_creds.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/crypto.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/data.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/get_addrs.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/get_in_tkt.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/init_creds_pw.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/kerberos.8#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/keytab.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/keytab_any.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/keytab_file.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/keytab_keyfile.c#5 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5-private.h#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5-protos.h#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5-v4compat.h#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5.3#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5.conf.5#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5.h#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_425_conv_principal.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_address.3#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_aname_to_localname.3#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_appdefault.3#5 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_auth_context.3#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_build_principal.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_ccache.3#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_config.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_context.3#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_create_checksum.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_crypto_init.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_data.3#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_encrypt.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_free_addresses.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_free_principal.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_get_all_client_addrs.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_get_krbhst.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_init_context.3#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_keytab.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_krbhst_init.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_kuserok.3#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_openlog.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_parse_name.3#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_principal_get_realm.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_set_default_realm.3#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_sname_to_principal.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_timeofday.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_unparse_name.3#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_verify_user.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krb5_warn.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/krbhst.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/kuserok.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/mk_rep.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/name-45-test.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/principal.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/prompter_posix.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/store_emem.c#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/test_alname.c#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/krb5/test_cc.c#1 branch .. //depot/projects/hammer/crypto/heimdal/lib/krb5/transited.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/verify_krb5_conf.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/krb5/warn.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/ChangeLog#5 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/Makefile.am#5 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/Makefile.in#5 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/getarg.3#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/getcap.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/parse_bytes.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/parse_time.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/parse_units.h#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/resolve.c#5 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/roken.awk#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/snprintf.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/socket.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/strcasecmp.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/strlwr.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/strncasecmp.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/roken/strupr.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/sl/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/vers/ChangeLog#3 integrate .. //depot/projects/hammer/crypto/heimdal/lib/vers/Makefile.in#4 integrate .. //depot/projects/hammer/crypto/heimdal/lib/vers/make-print-version.c#2 integrate .. //depot/projects/hammer/crypto/heimdal/lib/vers/print_version.c#3 integrate .. //depot/projects/hammer/crypto/heimdal/tools/Makefile.in#5 integrate .. //depot/projects/hammer/crypto/heimdal/tools/build.sh#1 branch .. //depot/projects/hammer/crypto/heimdal/tools/krb5-config.1#2 integrate .. //depot/projects/hammer/crypto/openssl/CHANGES#3 integrate .. //depot/projects/hammer/crypto/openssl/Configure#3 integrate .. //depot/projects/hammer/crypto/openssl/FAQ#3 integrate .. //depot/projects/hammer/crypto/openssl/FREEBSD-Xlist#2 integrate .. //depot/projects/hammer/crypto/openssl/LICENSE#2 integrate .. //depot/projects/hammer/crypto/openssl/Makefile.org#3 integrate .. //depot/projects/hammer/crypto/openssl/Makefile.ssl#3 integrate .. //depot/projects/hammer/crypto/openssl/NEWS#3 integrate .. //depot/projects/hammer/crypto/openssl/PROBLEMS#3 integrate .. //depot/projects/hammer/crypto/openssl/README#3 integrate .. //depot/projects/hammer/crypto/openssl/apps/CA.pl#3 integrate .. //depot/projects/hammer/crypto/openssl/apps/Makefile.ssl#3 integrate .. //depot/projects/hammer/crypto/openssl/apps/apps.c#3 integrate .. //depot/projects/hammer/crypto/openssl/apps/ca.c#3 integrate .. //depot/projects/hammer/crypto/openssl/apps/crl.c#3 integrate .. //depot/projects/hammer/crypto/openssl/apps/der_chop#2 integrate .. //depot/projects/hammer/crypto/openssl/apps/engine.c#2 integrate .. //depot/projects/hammer/crypto/openssl/apps/ocsp.c#2 integrate .. //depot/projects/hammer/crypto/openssl/apps/openssl.c#3 integrate .. //depot/projects/hammer/crypto/openssl/apps/pkcs8.c#3 integrate .. //depot/projects/hammer/crypto/openssl/apps/s_apps.h#3 integrate .. //depot/projects/hammer/crypto/openssl/apps/s_client.c#3 integrate .. //depot/projects/hammer/crypto/openssl/apps/s_server.c#3 integrate .. //depot/projects/hammer/crypto/openssl/apps/smime.c#3 integrate .. //depot/projects/hammer/crypto/openssl/apps/x509.c#3 integrate .. //depot/projects/hammer/crypto/openssl/bugs/SSLv3#2 integrate .. //depot/projects/hammer/crypto/openssl/config#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/aes/aes.h#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/aes/aes_cbc.c#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/aes/aes_ctr.c#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/asn1/a_mbstr.c#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/asn1/a_strex.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/asn1/a_strnid.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/asn1/asn1.h#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/asn1/asn1_lib.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/asn1/tasn_dec.c#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/bio/b_print.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/bio/bf_buff.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/bio/bss_bio.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/bio/bss_file.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/bn/Makefile.ssl#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/bn/bn.h#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/bn/bn_mul.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/bn/bntest.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/bn/exptest.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/des/cfb_enc.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/des/destest.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/dh/Makefile.ssl#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/dh/dh_key.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/dh/dhtest.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/dsa/Makefile.ssl#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/dsa/dsa_ossl.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/dsa/dsa_sign.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/dsa/dsa_vrf.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/dsa/dsatest.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/dso/dso_dlfcn.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/ec/ec_mult.c#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/engine/eng_fat.c#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/engine/engine.h#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/engine/hw_ubsec.c#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/err/err.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/err/err.h#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/evp/Makefile.ssl#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/evp/bio_b64.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/evp/bio_enc.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/evp/c_all.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/evp/digest.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/evp/evp_acnf.c#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/md2/md2test.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/md5/Makefile.ssl#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/md5/asm/md5-586.pl#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/md5/asm/md5-sparcv9.S#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/o_time.c#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/ocsp/ocsp_ht.c#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/opensslconf.h#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/opensslv.h#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/perlasm/x86ms.pl#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/perlasm/x86nasm.pl#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/perlasm/x86unix.pl#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/pkcs12/p12_npas.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/pkcs7/pk7_doit.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/pkcs7/pk7_mime.c#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/pkcs7/pk7_smime.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/pkcs7/pkcs7.h#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/rand/rand_win.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/rsa/Makefile.ssl#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/rsa/rsa.h#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/rsa/rsa_eay.c#4 integrate .. //depot/projects/hammer/crypto/openssl/crypto/rsa/rsa_lib.c#4 integrate .. //depot/projects/hammer/crypto/openssl/crypto/rsa/rsa_sign.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/rsa/rsa_test.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/threads/mttest.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/threads/solaris.sh#2 delete .. //depot/projects/hammer/crypto/openssl/crypto/x509/by_file.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/x509/x509_trs.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/x509/x509_vfy.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/x509/x509type.c#2 integrate .. //depot/projects/hammer/crypto/openssl/crypto/x509v3/v3_conf.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/x509v3/v3_cpols.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/x509v3/v3_lib.c#3 integrate .. //depot/projects/hammer/crypto/openssl/crypto/x509v3/v3_prn.c#3 integrate .. //depot/projects/hammer/crypto/openssl/demos/engines/zencod/hw_zencod.h#2 integrate .. //depot/projects/hammer/crypto/openssl/doc/HOWTO/certificates.txt#2 integrate .. //depot/projects/hammer/crypto/openssl/doc/HOWTO/keys.txt#1 branch .. //depot/projects/hammer/crypto/openssl/doc/apps/ca.pod#3 integrate .. //depot/projects/hammer/crypto/openssl/doc/apps/ocsp.pod#2 integrate .. //depot/projects/hammer/crypto/openssl/doc/apps/s_client.pod#3 integrate .. //depot/projects/hammer/crypto/openssl/doc/apps/s_server.pod#3 integrate .. //depot/projects/hammer/crypto/openssl/doc/crypto/BIO_f_base64.pod#2 integrate .. //depot/projects/hammer/crypto/openssl/doc/crypto/BIO_f_cipher.pod#2 integrate .. //depot/projects/hammer/crypto/openssl/doc/openssl-shared.txt#1 branch .. //depot/projects/hammer/crypto/openssl/doc/ssl/SSL_CTX_free.pod#2 integrate .. //depot/projects/hammer/crypto/openssl/doc/ssl/SSL_CTX_sess_set_get_cb.pod#2 integrate .. //depot/projects/hammer/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod#3 integrate .. //depot/projects/hammer/crypto/openssl/doc/ssl/SSL_CTX_set_verify.pod#3 integrate .. //depot/projects/hammer/crypto/openssl/doc/ssl/SSL_CTX_use_certificate.pod#2 integrate .. //depot/projects/hammer/crypto/openssl/doc/ssl/SSL_accept.pod#2 integrate .. //depot/projects/hammer/crypto/openssl/doc/ssl/SSL_connect.pod#2 integrate .. //depot/projects/hammer/crypto/openssl/e_os.h#3 integrate .. //depot/projects/hammer/crypto/openssl/openssl.spec#3 integrate .. //depot/projects/hammer/crypto/openssl/ssl/kssl.c#2 integrate .. //depot/projects/hammer/crypto/openssl/ssl/kssl.h#2 integrate .. //depot/projects/hammer/crypto/openssl/ssl/s3_clnt.c#3 integrate .. //depot/projects/hammer/crypto/openssl/ssl/s3_srvr.c#4 integrate .. //depot/projects/hammer/crypto/openssl/ssl/ssl_ciph.c#3 integrate .. //depot/projects/hammer/crypto/openssl/ssl/ssl_lib.c#3 integrate .. //depot/projects/hammer/crypto/openssl/ssl/ssl_rsa.c#3 integrate .. //depot/projects/hammer/crypto/openssl/ssl/ssl_sess.c#3 integrate .. //depot/projects/hammer/crypto/openssl/ssl/ssltest.c#3 integrate .. //depot/projects/hammer/crypto/openssl/test/Makefile.ssl#3 integrate .. //depot/projects/hammer/crypto/openssl/test/evptests.txt#1 branch .. //depot/projects/hammer/crypto/openssl/tools/c_rehash#3 integrate .. //depot/projects/hammer/crypto/openssl/util/extract-names.pl#2 integrate .. //depot/projects/hammer/crypto/openssl/util/libeay.num#3 integrate .. //depot/projects/hammer/crypto/openssl/util/mk1mf.pl#3 integrate .. //depot/projects/hammer/crypto/openssl/util/mkdef.pl#3 integrate .. //depot/projects/hammer/crypto/openssl/util/mkerr.pl#3 integrate .. //depot/projects/hammer/crypto/openssl/util/pl/Mingw32.pl#3 integrate .. //depot/projects/hammer/crypto/openssl/util/pl/Mingw32f.pl#2 delete .. //depot/projects/hammer/crypto/openssl/util/point.sh#3 integrate .. //depot/projects/hammer/etc/Makefile#18 integrate .. //depot/projects/hammer/etc/defaults/pccard.conf#12 integrate .. //depot/projects/hammer/etc/defaults/rc.conf#16 integrate .. //depot/projects/hammer/etc/mtree/BSD.include.dist#8 integrate .. //depot/projects/hammer/etc/rc.d/diskless#6 integrate .. //depot/projects/hammer/etc/rc.d/ipfilter#11 integrate .. //depot/projects/hammer/etc/services#7 integrate .. //depot/projects/hammer/games/fortune/datfiles/fortunes#12 integrate .. //depot/projects/hammer/games/fortune/datfiles/fortunes.sp.ok#2 integrate .. //depot/projects/hammer/games/fortune/datfiles/fortunes2#7 integrate .. //depot/projects/hammer/gnu/usr.bin/groff/tmac/mdoc.local#11 integrate .. //depot/projects/hammer/kerberos5/include/Makefile#2 integrate .. //depot/projects/hammer/kerberos5/include/config.h#6 integrate .. //depot/projects/hammer/kerberos5/include/krb5-private.h#3 integrate .. //depot/projects/hammer/kerberos5/include/version.h#6 integrate .. //depot/projects/hammer/kerberos5/lib/Makefile#4 integrate .. //depot/projects/hammer/kerberos5/lib/Makefile.inc#4 integrate .. //depot/projects/hammer/kerberos5/lib/libgssapi/Makefile#3 integrate .. //depot/projects/hammer/kerberos5/lib/libhdb/Makefile#8 integrate .. //depot/projects/hammer/kerberos5/lib/libkadm5clnt/Makefile#3 integrate .. //depot/projects/hammer/kerberos5/lib/libkafs5/Makefile#3 branch .. //depot/projects/hammer/kerberos5/lib/libkrb5/Makefile#4 integrate .. //depot/projects/hammer/kerberos5/libexec/kdc/Makefile#6 integrate .. //depot/projects/hammer/kerberos5/usr.bin/Makefile#4 integrate .. //depot/projects/hammer/kerberos5/usr.bin/kdestroy/Makefile#4 integrate .. //depot/projects/hammer/kerberos5/usr.bin/kinit/Makefile#4 integrate .. //depot/projects/hammer/kerberos5/usr.bin/klist/Makefile#4 integrate .. //depot/projects/hammer/kerberos5/usr.bin/krb5-config/Makefile#7 integrate .. //depot/projects/hammer/kerberos5/usr.bin/ksu/Makefile#4 integrate .. //depot/projects/hammer/kerberos5/usr.bin/verify_krb5_conf/Makefile#1 branch .. //depot/projects/hammer/lib/libkiconv/kiconv.3#2 integrate .. //depot/projects/hammer/lib/libmd/mdX.3#3 integrate .. //depot/projects/hammer/lib/libmd/ripemd.3#3 integrate .. //depot/projects/hammer/lib/libmd/sha.3#2 integrate .. //depot/projects/hammer/lib/libpthread/arch/alpha/alpha/context.S#2 integrate .. //depot/projects/hammer/lib/libpthread/arch/sparc64/Makefile.inc#1 branch .. //depot/projects/hammer/lib/libpthread/arch/sparc64/include/atomic_ops.h#1 branch .. //depot/projects/hammer/lib/libpthread/arch/sparc64/include/pthread_md.h#1 branch .. //depot/projects/hammer/lib/libpthread/arch/sparc64/sparc64/assym.s#1 branch .. //depot/projects/hammer/lib/libpthread/arch/sparc64/sparc64/pthread_md.c#1 branch .. //depot/projects/hammer/lib/libpthread/arch/sparc64/sparc64/thr_getcontext.S#1 branch .. //depot/projects/hammer/lib/libpthread/man/pthread_attr_get_np.3#3 integrate .. //depot/projects/hammer/lib/libpthread/man/pthread_mutex_init.3#2 integrate .. //depot/projects/hammer/lib/libpthread/sys/lock.c#6 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_cancel.c#13 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_kern.c#23 integrate .. //depot/projects/hammer/lib/libpthread/thread/thr_private.h#17 integrate .. //depot/projects/hammer/lib/libufs/block.c#6 integrate .. //depot/projects/hammer/lib/libufs/bread.3#2 integrate .. //depot/projects/hammer/lib/libufs/cgread.3#2 integrate .. //depot/projects/hammer/lib/libufs/getino.3#2 integrate .. //depot/projects/hammer/lib/libufs/libufs.3#2 integrate .. //depot/projects/hammer/lib/libufs/sbread.3#2 integrate .. //depot/projects/hammer/lib/libufs/ufs_disk_close.3#2 integrate .. //depot/projects/hammer/libexec/makekey/makekey.8#2 integrate .. //depot/projects/hammer/release/Makefile#37 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/errata/article.sgml#9 integrate .. //depot/projects/hammer/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#40 integrate .. //depot/projects/hammer/release/doc/ja_JP.eucJP/early-adopter/article.sgml#4 integrate .. //depot/projects/hammer/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.sgml#2 integrate .. //depot/projects/hammer/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.sgml#5 integrate .. //depot/projects/hammer/release/scripts/print-cdrom-packages.sh#11 integrate .. //depot/projects/hammer/sbin/bsdlabel/bsdlabel.c#12 integrate .. //depot/projects/hammer/sbin/fsck_ffs/main.c#5 integrate .. //depot/projects/hammer/sbin/gbde/gbde.c#7 integrate .. //depot/projects/hammer/sbin/gbde/image.uu#1 branch .. //depot/projects/hammer/sbin/gbde/test.sh#2 integrate .. //depot/projects/hammer/sbin/ifconfig/ifconfig.8#10 integrate .. //depot/projects/hammer/sbin/ifconfig/ifconfig.c#10 integrate .. //depot/projects/hammer/sbin/ipfw/ipfw2.c#15 integrate .. //depot/projects/hammer/sbin/savecore/savecore.c#4 integrate .. //depot/projects/hammer/share/colldef/Makefile#8 integrate .. //depot/projects/hammer/share/colldef/sl_SI.ISO8859-2.src#1 branch .. //depot/projects/hammer/share/examples/drivers/make_device_driver.sh#2 integrate .. //depot/projects/hammer/share/examples/netgraph/ngctl#2 integrate .. //depot/projects/hammer/share/examples/netgraph/udp.tunnel#2 integrate .. //depot/projects/hammer/share/man/man4/hifn.4#3 integrate .. //depot/projects/hammer/share/man/man4/man4.i386/ep.4#3 integrate .. //depot/projects/hammer/share/man/man4/umass.4#9 integrate .. //depot/projects/hammer/share/man/man4/xl.4#4 integrate .. //depot/projects/hammer/share/man/man7/release.7#14 integrate .. //depot/projects/hammer/share/man/man9/Makefile#19 integrate .. //depot/projects/hammer/share/man/man9/pmap.9#2 integrate .. //depot/projects/hammer/share/man/man9/pmap_is_prefaultable.9#1 branch .. //depot/projects/hammer/share/man/man9/pmap_prefault.9#2 delete .. //depot/projects/hammer/share/man/man9/pmap_resident_count.9#1 branch .. //depot/projects/hammer/share/man/man9/timeout.9#2 integrate .. //depot/projects/hammer/share/man/man9/vm_fault_prefault.9#1 branch .. //depot/projects/hammer/share/man/man9/vm_page_alloc.9#2 integrate .. //depot/projects/hammer/share/mk/bsd.libnames.mk#16 integrate .. //depot/projects/hammer/share/mk/sys.mk#9 integrate .. //depot/projects/hammer/sys/alpha/alpha/pmap.c#18 integrate .. //depot/projects/hammer/sys/alpha/alpha/trap.c#11 integrate .. //depot/projects/hammer/sys/alpha/include/pmap.h#5 integrate .. //depot/projects/hammer/sys/amd64/amd64/pmap.c#38 integrate .. //depot/projects/hammer/sys/amd64/amd64/support.S#12 integrate .. //depot/projects/hammer/sys/amd64/amd64/trap.c#29 integrate .. //depot/projects/hammer/sys/amd64/include/pmap.h#21 integrate .. //depot/projects/hammer/sys/amd64/include/ucontext.h#11 integrate .. //depot/projects/hammer/sys/cam/scsi/scsi_cd.c#14 integrate .. //depot/projects/hammer/sys/cam/scsi/scsi_da.c#18 integrate .. //depot/projects/hammer/sys/cam/scsi/scsi_target.c#6 integrate .. //depot/projects/hammer/sys/coda/coda_subr.c#5 integrate .. //depot/projects/hammer/sys/compat/linprocfs/linprocfs.c#15 integrate .. //depot/projects/hammer/sys/conf/files#29 integrate .. //depot/projects/hammer/sys/conf/kmod.mk#9 integrate .. //depot/projects/hammer/sys/conf/ldscript.i386#4 integrate .. //depot/projects/hammer/sys/conf/majors#14 integrate .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/Makefile#3 integrate .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx.h#2 integrate .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_context.c#2 integrate .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_env.h#2 integrate .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_scoreboard.c#2 integrate .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_self.c#2 integrate .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_step.c#2 integrate .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_step.h#1 branch .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_trace.c#3 integrate .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_trace.h#3 integrate .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_ttrace.c#2 integrate .. //depot/projects/hammer/sys/contrib/ia64/libuwx/src/uwx_uinfo.c#3 integrate .. //depot/projects/hammer/sys/crypto/cast128/cast128.c#3 integrate .. //depot/projects/hammer/sys/crypto/cast128/cast128.h#2 integrate .. //depot/projects/hammer/sys/crypto/cast128/cast128_subkey.h#2 delete .. //depot/projects/hammer/sys/crypto/cast128/cast128sb.h#1 branch .. //depot/projects/hammer/sys/dev/acpica/Osd/OsdSchedule.c#7 integrate .. //depot/projects/hammer/sys/dev/amr/amr.c#8 integrate .. //depot/projects/hammer/sys/dev/amr/amr_disk.c#8 integrate .. //depot/projects/hammer/sys/dev/amr/amrvar.h#7 integrate .. //depot/projects/hammer/sys/dev/an/if_an_pccard.c#7 integrate .. //depot/projects/hammer/sys/dev/ata/ata-all.c#14 integrate .. //depot/projects/hammer/sys/dev/ata/ata-card.c#11 integrate .. //depot/projects/hammer/sys/dev/ata/ata-dma.c#9 integrate .. //depot/projects/hammer/sys/dev/ata/ata-lowlevel.c#3 integrate .. //depot/projects/hammer/sys/dev/ata/ata-queue.c#3 integrate .. //depot/projects/hammer/sys/dev/ath/if_ath.c#7 integrate .. //depot/projects/hammer/sys/dev/cardbus/cardbus.c#10 integrate .. //depot/projects/hammer/sys/dev/cardbus/cardbus_cis.c#10 integrate .. //depot/projects/hammer/sys/dev/cardbus/cardbus_cis.h#3 integrate .. //depot/projects/hammer/sys/dev/em/if_em.c#16 integrate .. //depot/projects/hammer/sys/dev/em/if_em.h#15 integrate .. //depot/projects/hammer/sys/dev/exca/exca.c#8 integrate .. //depot/projects/hammer/sys/dev/firewire/firewire.c#18 integrate .. //depot/projects/hammer/sys/dev/firewire/firewire.h#5 integrate .. //depot/projects/hammer/sys/dev/firewire/firewirereg.h#10 integrate .. //depot/projects/hammer/sys/dev/firewire/fwcrom.c#6 integrate .. //depot/projects/hammer/sys/dev/firewire/fwdev.c#6 integrate .. //depot/projects/hammer/sys/dev/firewire/fwmem.c#9 integrate .. //depot/projects/hammer/sys/dev/firewire/fwmem.h#5 integrate .. //depot/projects/hammer/sys/dev/firewire/fwohci.c#15 integrate .. //depot/projects/hammer/sys/dev/firewire/fwohcireg.h#7 integrate .. //depot/projects/hammer/sys/dev/firewire/if_fwe.c#9 integrate .. //depot/projects/hammer/sys/dev/firewire/sbp.c#20 integrate .. //depot/projects/hammer/sys/dev/firewire/sbp.h#1 branch .. //depot/projects/hammer/sys/dev/hifn/hifn7751.c#7 integrate .. //depot/projects/hammer/sys/dev/hifn/hifn7751reg.h#3 integrate .. //depot/projects/hammer/sys/dev/hifn/hifn7751var.h#4 integrate .. //depot/projects/hammer/sys/dev/kbd/atkbd.c#8 integrate .. //depot/projects/hammer/sys/dev/pccard/card_if.m#4 integrate .. //depot/projects/hammer/sys/dev/pccard/pccard.c#13 integrate .. //depot/projects/hammer/sys/dev/pccard/pccard_cis.c#6 integrate .. //depot/projects/hammer/sys/dev/pccard/pccard_cis.h#1 branch .. //depot/projects/hammer/sys/dev/pccard/pccard_cis_quirks.c#3 integrate .. //depot/projects/hammer/sys/dev/pccard/pccarddevs#16 integrate .. //depot/projects/hammer/sys/dev/pccard/pccarddevs.h#16 integrate .. //depot/projects/hammer/sys/dev/pccard/pccardreg.h#2 integrate .. //depot/projects/hammer/sys/dev/pccard/pccardvar.h#8 integrate .. //depot/projects/hammer/sys/dev/sio/sio_pccard.c#4 integrate .. //depot/projects/hammer/sys/dev/uart/uart_bus_pccard.c#4 integrate .. //depot/projects/hammer/sys/dev/usb/if_aue.c#10 integrate .. //depot/projects/hammer/sys/dev/usb/if_auereg.h#3 integrate .. //depot/projects/hammer/sys/dev/usb/if_cue.c#10 integrate .. //depot/projects/hammer/sys/dev/usb/if_cuereg.h#3 integrate .. //depot/projects/hammer/sys/dev/usb/if_kue.c#9 integrate .. //depot/projects/hammer/sys/dev/usb/if_kuereg.h#3 integrate .. //depot/projects/hammer/sys/dev/usb/if_rue.c#4 integrate .. //depot/projects/hammer/sys/dev/usb/if_ruereg.h#2 integrate .. //depot/projects/hammer/sys/dev/usb/ubsa.c#6 integrate .. //depot/projects/hammer/sys/dev/usb/ufm.c#6 integrate .. //depot/projects/hammer/sys/dev/usb/ugen.c#10 integrate .. //depot/projects/hammer/sys/dev/usb/uhid.c#9 integrate .. //depot/projects/hammer/sys/dev/usb/ukbd.c#6 integrate .. //depot/projects/hammer/sys/dev/usb/ums.c#6 integrate .. //depot/projects/hammer/sys/dev/usb/usb.c#7 integrate .. //depot/projects/hammer/sys/dev/usb/usb_mem.c#6 integrate .. //depot/projects/hammer/sys/dev/usb/usb_port.h#6 integrate .. //depot/projects/hammer/sys/dev/usb/usbdevs#20 integrate .. //depot/projects/hammer/sys/dev/usb/usbdevs.h#19 integrate .. //depot/projects/hammer/sys/dev/usb/usbdevs_data.h#19 integrate .. //depot/projects/hammer/sys/dev/usb/uscanner.c#9 integrate .. //depot/projects/hammer/sys/fs/hpfs/hpfs_vnops.c#8 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_denode.c#9 integrate .. //depot/projects/hammer/sys/fs/msdosfs/msdosfs_vfsops.c#12 integrate .. //depot/projects/hammer/sys/fs/ntfs/ntfs_vnops.c#7 integrate .. //depot/projects/hammer/sys/fs/nwfs/nwfs_io.c#6 integrate .. //depot/projects/hammer/sys/fs/nwfs/nwfs_node.c#6 integrate .. //depot/projects/hammer/sys/fs/procfs/procfs_dbregs.c#3 integrate .. //depot/projects/hammer/sys/fs/procfs/procfs_fpregs.c#3 integrate .. //depot/projects/hammer/sys/fs/procfs/procfs_regs.c#3 integrate .. //depot/projects/hammer/sys/fs/pseudofs/pseudofs_vncache.c#6 integrate .. //depot/projects/hammer/sys/fs/pseudofs/pseudofs_vnops.c#8 integrate .. //depot/projects/hammer/sys/fs/smbfs/smbfs_io.c#8 integrate .. //depot/projects/hammer/sys/fs/smbfs/smbfs_node.c#7 integrate .. //depot/projects/hammer/sys/fs/specfs/spec_vnops.c#13 integrate .. //depot/projects/hammer/sys/fs/udf/udf_vnops.c#10 integrate .. //depot/projects/hammer/sys/geom/bde/g_bde.h#4 integrate .. //depot/projects/hammer/sys/geom/bde/g_bde_lock.c#5 integrate .. //depot/projects/hammer/sys/geom/geom.h#21 integrate .. //depot/projects/hammer/sys/geom/geom_io.c#16 integrate .. //depot/projects/hammer/sys/geom/geom_subr.c#18 integrate .. //depot/projects/hammer/sys/gnu/ext2fs/ext2_inode.c#5 integrate .. //depot/projects/hammer/sys/gnu/ext2fs/ext2_vfsops.c#8 integrate .. //depot/projects/hammer/sys/i386/i386/bios.c#9 integrate .. //depot/projects/hammer/sys/i386/i386/genassym.c#10 integrate .. //depot/projects/hammer/sys/i386/i386/locore.s#8 integrate .. //depot/projects/hammer/sys/i386/i386/machdep.c#21 integrate .. //depot/projects/hammer/sys/i386/i386/mp_machdep.c#14 integrate .. //depot/projects/hammer/sys/i386/i386/mpboot.s#3 integrate .. //depot/projects/hammer/sys/i386/i386/pmap.c#20 integrate .. //depot/projects/hammer/sys/i386/i386/support.s#6 integrate .. //depot/projects/hammer/sys/i386/i386/trap.c#19 integrate .. //depot/projects/hammer/sys/i386/include/md_var.h#8 integrate .. //depot/projects/hammer/sys/i386/include/pmap.h#8 integrate .. //depot/projects/hammer/sys/i386/include/vmparam.h#6 integrate .. //depot/projects/hammer/sys/ia64/ia64/machdep.c#25 integrate .. //depot/projects/hammer/sys/ia64/ia64/pmap.c#20 integrate .. //depot/projects/hammer/sys/ia64/ia64/syscall.S#4 integrate .. //depot/projects/hammer/sys/ia64/ia64/trap.c#18 integrate .. //depot/projects/hammer/sys/ia64/ia64/unwind.c#7 integrate .. //depot/projects/hammer/sys/ia64/ia64/vm_machdep.c#13 integrate .. //depot/projects/hammer/sys/ia64/include/pmap.h#7 integrate .. //depot/projects/hammer/sys/isofs/cd9660/cd9660_node.c#5 integrate .. //depot/projects/hammer/sys/kern/init_main.c#18 integrate .. //depot/projects/hammer/sys/kern/kern_descrip.c#16 integrate .. //depot/projects/hammer/sys/kern/kern_exec.c#14 integrate .. //depot/projects/hammer/sys/kern/kern_proc.c#22 integrate .. //depot/projects/hammer/sys/kern/kern_subr.c#7 integrate .. //depot/projects/hammer/sys/kern/kern_synch.c#24 integrate .. //depot/projects/hammer/sys/kern/kern_sysctl.c#9 integrate .. //depot/projects/hammer/sys/kern/sched_ule.c#12 integrate .. //depot/projects/hammer/sys/kern/sys_process.c#10 integrate .. //depot/projects/hammer/sys/kern/vfs_bio.c#19 integrate .. //depot/projects/hammer/sys/kern/vfs_cache.c#6 integrate .. //depot/projects/hammer/sys/kern/vfs_subr.c#24 integrate .. //depot/projects/hammer/sys/kern/vfs_vnops.c#11 integrate .. //depot/projects/hammer/sys/modules/firewire/sbp/Makefile#3 integrate .. //depot/projects/hammer/sys/net/bpf.c#11 integrate .. //depot/projects/hammer/sys/net/if.c#10 integrate .. //depot/projects/hammer/sys/net/if.h#6 integrate .. //depot/projects/hammer/sys/net/if_disc.c#5 integrate .. //depot/projects/hammer/sys/net/if_faith.c#5 integrate .. //depot/projects/hammer/sys/net/if_loop.c#9 integrate .. //depot/projects/hammer/sys/net/if_stf.c#7 integrate .. //depot/projects/hammer/sys/net/net_osdep.c#2 integrate .. //depot/projects/hammer/sys/net/netisr.c#3 integrate .. //depot/projects/hammer/sys/net/route.c#5 integrate .. //depot/projects/hammer/sys/net/route.h#4 integrate .. //depot/projects/hammer/sys/net/rtsock.c#5 integrate .. //depot/projects/hammer/sys/netinet/icmp6.h#4 integrate .. //depot/projects/hammer/sys/netinet/if_atm.c#3 integrate .. //depot/projects/hammer/sys/netinet/if_ether.c#4 integrate .. //depot/projects/hammer/sys/netinet/in_gif.c#4 integrate .. //depot/projects/hammer/sys/netinet/in_gif.h#3 integrate .. //depot/projects/hammer/sys/netinet/in_pcb.c#9 integrate .. //depot/projects/hammer/sys/netinet/in_proto.c#7 integrate .. //depot/projects/hammer/sys/netinet/in_rmx.c#3 integrate .. //depot/projects/hammer/sys/netinet/ip_dummynet.h#6 integrate .. //depot/projects/hammer/sys/netinet/ip_flow.c#3 integrate .. //depot/projects/hammer/sys/netinet/ip_icmp.c#7 integrate .. //depot/projects/hammer/sys/netinet/ip_output.c#17 integrate .. //depot/projects/hammer/sys/netinet6/ah_core.c#3 integrate .. //depot/projects/hammer/sys/netinet6/ah_output.c#4 integrate .. //depot/projects/hammer/sys/netinet6/dest6.c#2 integrate .. //depot/projects/hammer/sys/netinet6/esp_core.c#3 integrate .. //depot/projects/hammer/sys/netinet6/esp_input.c#4 integrate .. //depot/projects/hammer/sys/netinet6/esp_output.c#4 integrate .. //depot/projects/hammer/sys/netinet6/frag6.c#3 integrate .. //depot/projects/hammer/sys/netinet6/icmp6.c#7 integrate .. //depot/projects/hammer/sys/netinet6/in6.c#3 integrate .. //depot/projects/hammer/sys/netinet6/in6.h#4 integrate .. //depot/projects/hammer/sys/netinet6/in6_cksum.c#5 integrate .. //depot/projects/hammer/sys/netinet6/in6_gif.c#4 integrate .. //depot/projects/hammer/sys/netinet6/in6_gif.h#3 integrate .. //depot/projects/hammer/sys/netinet6/in6_ifattach.c#4 integrate .. //depot/projects/hammer/sys/netinet6/in6_pcb.c#7 integrate .. //depot/projects/hammer/sys/netinet6/in6_prefix.c#2 integrate .. //depot/projects/hammer/sys/netinet6/in6_proto.c#3 integrate .. //depot/projects/hammer/sys/netinet6/in6_rmx.c#3 integrate .. //depot/projects/hammer/sys/netinet6/in6_src.c#2 integrate .. //depot/projects/hammer/sys/netinet6/in6_var.h#4 integrate .. //depot/projects/hammer/sys/netinet6/ip6_forward.c#5 integrate .. //depot/projects/hammer/sys/netinet6/ip6_fw.c#5 integrate .. //depot/projects/hammer/sys/netinet6/ip6_fw.h#2 integrate .. //depot/projects/hammer/sys/netinet6/ip6_id.c#1 branch .. //depot/projects/hammer/sys/netinet6/ip6_input.c#5 integrate .. //depot/projects/hammer/sys/netinet6/ip6_mroute.c#5 integrate .. //depot/projects/hammer/sys/netinet6/ip6_output.c#8 integrate .. //depot/projects/hammer/sys/netinet6/ip6_var.h#5 integrate .. //depot/projects/hammer/sys/netinet6/ip6protosw.h#3 integrate .. //depot/projects/hammer/sys/netinet6/ipcomp_core.c#3 integrate .. //depot/projects/hammer/sys/netinet6/ipcomp_input.c#2 integrate .. //depot/projects/hammer/sys/netinet6/ipsec.c#5 integrate .. //depot/projects/hammer/sys/netinet6/ipsec.h#4 integrate .. //depot/projects/hammer/sys/netinet6/mld6.c#4 integrate .. //depot/projects/hammer/sys/netinet6/mld6_var.h#2 integrate .. //depot/projects/hammer/sys/netinet6/nd6.c#6 integrate .. //depot/projects/hammer/sys/netinet6/nd6.h#3 integrate .. //depot/projects/hammer/sys/netinet6/nd6_nbr.c#5 integrate .. //depot/projects/hammer/sys/netinet6/nd6_rtr.c#5 integrate .. //depot/projects/hammer/sys/netinet6/raw_ip6.c#4 integrate .. //depot/projects/hammer/sys/netinet6/route6.c#3 integrate .. //depot/projects/hammer/sys/netinet6/scope6.c#3 integrate .. //depot/projects/hammer/sys/netinet6/scope6_var.h#2 integrate .. //depot/projects/hammer/sys/netinet6/udp6_output.c#4 integrate .. //depot/projects/hammer/sys/netinet6/udp6_usrreq.c#5 integrate .. //depot/projects/hammer/sys/netkey/key_var.h#2 integrate .. //depot/projects/hammer/sys/nfsclient/bootp_subr.c#7 integrate .. //depot/projects/hammer/sys/nfsclient/krpc_subr.c#3 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_bio.c#9 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_node.c#8 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_socket.c#8 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_subs.c#6 integrate .. //depot/projects/hammer/sys/nfsclient/nfs_vfsops.c#14 integrate .. //depot/projects/hammer/sys/nfsserver/nfs_syscalls.c#8 integrate .. //depot/projects/hammer/sys/pc98/i386/machdep.c#18 integrate .. //depot/projects/hammer/sys/pc98/pc98/clock.c#9 integrate .. //depot/projects/hammer/sys/pc98/pc98/sio.c#12 integrate .. //depot/projects/hammer/sys/pci/agp_i810.c#10 integrate .. //depot/projects/hammer/sys/pci/if_dc.c#20 integrate .. //depot/projects/hammer/sys/pci/if_dcreg.h#11 integrate .. //depot/projects/hammer/sys/pci/if_ti.c#13 integrate .. //depot/projects/hammer/sys/powerpc/include/pmap.h#3 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/pmap.c#14 integrate .. //depot/projects/hammer/sys/sparc64/include/endian.h#4 integrate .. //depot/projects/hammer/sys/sparc64/include/param.h#6 integrate .. //depot/projects/hammer/sys/sparc64/include/pmap.h#11 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/pmap.c#20 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/trap.c#12 integrate .. //depot/projects/hammer/sys/sys/cdefs.h#11 integrate .. //depot/projects/hammer/sys/sys/mac.h#12 integrate .. //depot/projects/hammer/sys/sys/proc.h#32 integrate .. //depot/projects/hammer/sys/sys/ptrace.h#3 integrate .. //depot/projects/hammer/sys/sys/sysctl.h#10 integrate .. //depot/projects/hammer/sys/sys/systm.h#11 integrate .. //depot/projects/hammer/sys/sys/uio.h#4 integrate .. //depot/projects/hammer/sys/sys/vnode.h#16 integrate .. //depot/projects/hammer/sys/ufs/ffs/ffs_inode.c#5 integrate .. //depot/projects/hammer/sys/ufs/ffs/ffs_snapshot.c#13 integrate .. //depot/projects/hammer/sys/ufs/ffs/ffs_softdep.c#9 integrate .. //depot/projects/hammer/sys/ufs/ffs/ffs_vfsops.c#13 integrate .. //depot/projects/hammer/sys/ufs/ffs/ffs_vnops.c#16 integrate .. //depot/projects/hammer/sys/ufs/ufs/ufs_ihash.c#4 integrate .. //depot/projects/hammer/sys/ufs/ufs/ufs_inode.c#8 integrate .. //depot/projects/hammer/sys/ufs/ufs/ufs_quota.c#7 integrate .. //depot/projects/hammer/sys/vm/device_pager.c#6 integrate .. //depot/projects/hammer/sys/vm/pmap.h#14 integrate .. //depot/projects/hammer/sys/vm/vm_extern.h#6 integrate .. //depot/projects/hammer/sys/vm/vm_fault.c#12 integrate .. //depot/projects/hammer/sys/vm/vm_glue.c#19 integrate .. //depot/projects/hammer/sys/vm/vm_kern.c#9 integrate .. //depot/projects/hammer/sys/vm/vm_map.c#21 integrate .. //depot/projects/hammer/sys/vm/vm_map.h#8 integrate .. //depot/projects/hammer/sys/vm/vm_mmap.c#11 integrate .. //depot/projects/hammer/sys/vm/vm_object.c#28 integrate .. //depot/projects/hammer/sys/vm/vm_page.c#16 integrate .. //depot/projects/hammer/sys/vm/vm_page.h#10 integrate .. //depot/projects/hammer/tools/regression/usr.bin/make/Makefile#5 integrate .. //depot/projects/hammer/tools/tools/tinderbox/etc/Makefile#2 integrate .. //depot/projects/hammer/tools/tools/tinderbox/etc/releng_4.rc#2 integrate .. //depot/projects/hammer/tools/tools/tinderbox/etc/releng_5.rc#1 branch .. //depot/projects/hammer/tools/tools/tinderbox/tbmaster.1#5 integrate .. //depot/projects/hammer/tools/tools/tinderbox/tbmaster.pl#14 integrate .. //depot/projects/hammer/tools/tools/tinderbox/tinderbox.1#4 integrate .. //depot/projects/hammer/tools/tools/tinderbox/tinderbox.pl#6 integrate .. //depot/projects/hammer/tools/tools/tinderbox/www/index.cgi#5 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/calendar.australia#3 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/calendar.christian#2 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/calendar.history#7 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/calendar.holiday#6 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/calendar.lotr#2 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/calendar.music#2 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.feiertag#3 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte#3 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.literatur#2 integrate .. //depot/projects/hammer/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.musik#2 integrate .. //depot/projects/hammer/usr.bin/enigma/Makefile#2 integrate .. //depot/projects/hammer/usr.bin/enigma/enigma.c#3 integrate .. //depot/projects/hammer/usr.bin/make/compat.c#6 integrate .. //depot/projects/hammer/usr.bin/make/dir.c#6 integrate .. //depot/projects/hammer/usr.bin/make/main.c#11 integrate .. //depot/projects/hammer/usr.bin/make/make.1#7 integrate .. //depot/projects/hammer/usr.bin/make/var.c#9 integrate .. //depot/projects/hammer/usr.bin/netstat/route.c#4 integrate .. //depot/projects/hammer/usr.bin/stat/stat.c#5 integrate .. //depot/projects/hammer/usr.bin/tftp/main.c#3 integrate .. //depot/projects/hammer/usr.bin/tftp/tftp.1#4 integrate .. //depot/projects/hammer/usr.bin/time/time.c#3 integrate .. //depot/projects/hammer/usr.sbin/arp/arp.4#3 integrate .. //depot/projects/hammer/usr.sbin/newsyslog/ptimes.c#2 integrate .. //depot/projects/hammer/usr.sbin/pccard/pccardd/file.c#3 integrate .. //depot/projects/hammer/usr.sbin/route6d/route6d.c#4 integrate .. //depot/projects/hammer/usr.sbin/timed/timed/timed.8#2 integrate .. //depot/projects/hammer/usr.sbin/wicontrol/wicontrol.8#9 integrate Differences ... ==== //depot/projects/hammer/Makefile#13 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile,v 1.289 2003/08/30 13:33:41 ru Exp $ +# $FreeBSD: src/Makefile,v 1.290 2003/10/04 18:53:38 ru Exp $ # # The user-driven targets are: # @@ -16,8 +16,6 @@ # reinstallkernel.debug # kernel - buildkernel + installkernel. # update - Convenient way to update your source tree (cvs). -# most - Build user commands, no libraries or include files. -# installmost - Install user commands, no libraries or include files. # # This makefile is simple by design. The FreeBSD make automatically reads # the /usr/share/mk/sys.mk unless the -m argument is specified on the @@ -63,9 +61,9 @@ TGTS= all all-man buildkernel buildworld checkdpadd clean \ cleandepend cleandir depend distribute distributeworld everything \ hierarchy install installcheck installkernel installkernel.debug\ - reinstallkernel reinstallkernel.debug installmost installworld \ + reinstallkernel reinstallkernel.debug installworld \ libraries lint maninstall \ - most obj objlink regress rerelease tags update \ + obj objlink regress rerelease tags update \ _legacy _bootstrap-tools _cleanobj _obj \ _build-tools _cross-tools _includes _libraries _depend ==== //depot/projects/hammer/Makefile.inc1#29 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.392 2003/09/16 12:53:18 ru Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.393 2003/10/04 18:53:38 ru Exp $ # # Make command line options: # -DNO_KERBEROS Do not build Heimdal (Kerberos 5) @@ -27,8 +27,6 @@ # buildworld - rebuild *everything*, including glue to help do upgrades # installworld- install everything built by "buildworld" # update - convenient way to update your source tree (eg: sup/cvs) -# most - build user commands, no libraries or include files -# installmost - install user commands, no libraries or include files # # Standard targets (not defined here) are documented in the makefiles in # /usr/share/mk. These include: @@ -596,33 +594,6 @@ .endif # -# most -# -# Build most of the user binaries on the existing system libs and includes. -# -most: - @echo "--------------------------------------------------------------" - @echo ">>> Building programs only" - @echo "--------------------------------------------------------------" -.for _dir in bin sbin libexec usr.bin usr.sbin gnu/usr.bin gnu/usr.sbin - cd ${.CURDIR}/${_dir}; ${MAKE} DIRPRFX=${_dir}/ all -.endfor - -# -# installmost -# -# Install the binaries built by the 'most' target. This does not include -# libraries or include files. -# -installmost: - @echo "--------------------------------------------------------------" - @echo ">>> Installing programs only" - @echo "--------------------------------------------------------------" -.for _dir in bin sbin libexec usr.bin usr.sbin gnu/usr.bin gnu/usr.sbin - cd ${.CURDIR}/${_dir}; ${MAKE} DIRPRFX=${_dir}/ install -.endfor - -# # ------------------------------------------------------------------------ # # From here onwards are utility targets used by the 'make world' and ==== //depot/projects/hammer/UPDATING#19 (text+ko) ==== @@ -1199,8 +1199,8 @@ If you are updating from a prior version of FreeBSD (even one just a few days old), you should follow this procedure. With a /usr/obj tree with a fresh buildworld, - make buildkernel KERNCONF=YOUR_KERNEL_HERE - make installkernel KERNCONF=YOUR_KERNEL_HERE + make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=YOUR_KERNEL_HERE + make -DALWAYS_CHECK_MAKE installkernel KERNCONF=YOUR_KERNEL_HERE To just build a kernel when you know that it won't mess you up -------------------------------------------------------------- @@ -1384,4 +1384,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.270 2003/09/28 16:25:35 phk Exp $ +$FreeBSD: src/UPDATING,v 1.271 2003/10/03 18:29:06 ru Exp $ ==== //depot/projects/hammer/bin/date/date.c#4 (text+ko) ==== @@ -44,7 +44,7 @@ #endif #include -__FBSDID("$FreeBSD: src/bin/date/date.c,v 1.43 2003/02/05 12:56:40 charnier Exp $"); +__FBSDID("$FreeBSD: src/bin/date/date.c,v 1.44 2003/10/04 07:16:40 dds Exp $"); #include #include @@ -175,6 +175,8 @@ vary_destroy(v); (void)strftime(buf, sizeof(buf), format, <); (void)printf("%s\n", buf); + if (fflush(stdout)) + err(1, "stdout"); exit(retval); } ==== //depot/projects/hammer/crypto/heimdal/ChangeLog#5 (text+ko) ==== @@ -1,671 +1,554 @@ -2002-10-21 Johan Danielsson +2003-05-08 Johan Danielsson - * lib/krb5/store_emem.c: pull up 1.13; limit how much we allocate + * Release 0.6 - * lib/krb5/principal.c: pull up 1.82; don't allow trailing - backslashes in components +2003-05-08 Love Hörnquist Åstrand - * lib/krb5/keytab_keyfile.c: pull up 1.15; more strcspn >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Oct 10 17:06:36 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F0EB216A4C0; Fri, 10 Oct 2003 17:06:35 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CA11616A4B3 for ; Fri, 10 Oct 2003 17:06:35 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95F0F43FA3 for ; Fri, 10 Oct 2003 17:06:34 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9B06YXJ042836 for ; Fri, 10 Oct 2003 17:06:34 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9B06YeQ042833 for perforce@freebsd.org; Fri, 10 Oct 2003 17:06:34 -0700 (PDT) (envelope-from peter@freebsd.org) Date: Fri, 10 Oct 2003 17:06:34 -0700 (PDT) Message-Id: <200310110006.h9B06YeQ042833@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 39483 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2003 00:06:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=39483 Change 39483 by peter@peter_daintree on 2003/10/10 17:06:04 p4 integ -I smp_hammer branch (ie: suck in jhb's current changes) (wow! conflict city!) Affected files ... .. //depot/projects/hammer/sys/amd64/acpica/madt.c#3 integrate .. //depot/projects/hammer/sys/amd64/amd64/apic_vector.s#7 integrate .. //depot/projects/hammer/sys/amd64/amd64/intr_machdep.c#3 integrate .. //depot/projects/hammer/sys/amd64/amd64/io_apic.c#8 integrate .. //depot/projects/hammer/sys/amd64/amd64/local_apic.c#11 integrate .. //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#15 integrate .. //depot/projects/hammer/sys/amd64/amd64/mpboot.s#8 integrate .. //depot/projects/hammer/sys/amd64/include/apicvar.h#6 integrate .. //depot/projects/hammer/sys/amd64/include/intr_machdep.h#4 integrate .. //depot/projects/hammer/sys/amd64/isa/atpic.c#6 integrate .. //depot/projects/hammer/sys/amd64/isa/atpic_vector.s#5 integrate .. //depot/projects/hammer/sys/jhb_notes#5 integrate Differences ... ==== //depot/projects/hammer/sys/amd64/acpica/madt.c#3 (text+ko) ==== @@ -62,8 +62,8 @@ struct lapic_info { int la_present:1; int la_enabled:1; - int la_acpi_id:8; -} lapics[NLAPICS]; + int la_apic_id:8; +} lapics[NLAPICS + 1]; static APIC_TABLE *madt; static vm_paddr_t madt_physaddr; @@ -338,9 +338,6 @@ madt_setup_io(void) { int i; -#if 0 - u_char byte; -#endif /* First, we run through adding I/O APIC's. */ madt_walk_table(madt_parse_apics, NULL); @@ -355,15 +352,6 @@ /* Finally, we throw the switch to enable the I/O APIC's. */ acpi_SetDefaultIntrModel(ACPI_INTR_APIC); -#if 0 - /* XXX: how are we supposed to do this now? does _PIC do this for us? */ - if (mpfps->mpfb2 & MPFB2_IMCR_PRESENT) { - outb(0x22, 0x70); /* select IMCR */ - byte = inb(0x23); /* current contents */ - byte |= 0x01; /* mask external INTR */ - outb(0x23, byte); /* disconnect 8259s/NMI */ - } -#endif return (0); } @@ -408,19 +396,24 @@ * its own. */ proc = (PROCESSOR_APIC *)entry; - la = &lapics[proc->LocalApicId]; +#if 0 + if (bootverbose) +#endif + printf("MADT: Found CPU APIC ID %d ACPI ID %d: %s\n", + proc->LocalApicId, proc->ProcessorApicId, + proc->ProcessorEnabled ? "enabled" : "disabled"); + if (proc->ProcessorApicId > NLAPICS) + panic("%s: CPU ID %d too high", __func__, + proc->ProcessorApicId); + la = &lapics[proc->ProcessorApicId]; KASSERT(la->la_present == 0, - ("Duplicate local APIC ID %d", proc->LocalApicId)); + ("Duplicate local ACPI ID %d", proc->ProcessorApicId)); la->la_present = 1; - la->la_acpi_id = proc->ProcessorApicId; + la->la_apic_id = proc->LocalApicId; if (proc->ProcessorEnabled) { la->la_enabled = 1; lapic_create(proc->LocalApicId, 0); } - /* XXXTEST */ - printf("MADT: Found CPU APIC ID %d ACPI ID %d: %s\n", - proc->LocalApicId, proc->ProcessorApicId, - proc->ProcessorEnabled ? "enabled" : "disabled"); break; } } @@ -438,6 +431,12 @@ switch (entry->Type) { case APIC_IO: apic = (IO_APIC *)entry; +#if 0 + if (bootverbose) +#endif + printf("MADT: Found IO APIC ID %d, Vector %d at %p\n", + apic->IoApicId, apic->Vector, + (void *)apic->IoApicAddress); if (apic->IoApicId >= NIOAPICS) panic("%s: I/O APIC ID %d too high", __func__, apic->IoApicId); @@ -448,9 +447,6 @@ (uintptr_t)apic->IoApicAddress, apic->IoApicId, apic->Vector); ioapics[apic->IoApicId].io_vector = apic->Vector; - /* XXXTEST */ - printf("MADT: Found IO APIC ID %d, Vector %d at %p\n", - apic->IoApicId, apic->Vector, (void *)(uintptr_t)apic->IoApicAddress); break; default: break; @@ -498,18 +494,14 @@ static int madt_find_cpu(u_int acpi_id, u_int *apic_id) { - int i; - for (i = 0; i < NLAPICS; i++) - if (lapics[i].la_present && lapics[i].la_acpi_id == acpi_id) { - if (apic_id != NULL) - *apic_id = i; - if (lapics[i].la_enabled) - return (0); - else - return (ENXIO); - } - return (ENOENT); + if (!lapics[acpi_id].la_present) + return (ENOENT); + *apic_id = lapics[acpi_id].la_apic_id; + if (lapics[acpi_id].la_enabled) + return (0); + else + return (ENXIO); } /* @@ -602,9 +594,12 @@ if (nmi->ProcessorApicId == 0xff) apic_id = APIC_ID_ALL; - else if (madt_find_cpu(nmi->ProcessorApicId, &apic_id) == ENOENT) { - printf("MADT: Ignoring local NMI routed to ACPI CPU %u\n", - nmi->ProcessorApicId); + else if (madt_find_cpu(nmi->ProcessorApicId, &apic_id) != 0) { +#if 0 + if (bootverbose) +#endif + printf("MADT: Ignoring local NMI routed to ACPI CPU %u\n", + nmi->ProcessorApicId); return; } if (nmi->LINTPin == 0) ==== //depot/projects/hammer/sys/amd64/amd64/apic_vector.s#7 (text+ko) ==== @@ -127,7 +127,7 @@ incl TD_INTR_NESTING_LEVEL(%rbx) ; \ bsrl %eax, %eax ; /* index of highset set bit in ISR */ \ jz 2f ; \ - addl $(32 * (index - 1)),%eax ; \ + addl $(32 * index),%eax ; \ 1: ; \ FAKE_MCOUNT(13*4(%esp)) ; /* XXX avoid double count */ \ movq %rax, %rdi ; /* pass the IRQ */ \ @@ -153,13 +153,13 @@ iretq -MCOUNT_LABEL(bintr) +MCOUNT_LABEL(bintr2) ISR_VEC(1,apic_isr1) ISR_VEC(2,apic_isr2) ISR_VEC(3,apic_isr3) ISR_VEC(4,apic_isr4) ISR_VEC(5,apic_isr5) -MCOUNT_LABEL(eintr) +MCOUNT_LABEL(eintr2) #ifdef SMP /* ==== //depot/projects/hammer/sys/amd64/amd64/intr_machdep.c#3 (text+ko) ==== @@ -294,91 +294,3 @@ db_dump_ithread((*isrc)->is_ithread, verbose); } #endif - -/* XXX: this does not belong here */ - -#include "opt_mca.h" - -#include -#include - -#ifdef PC98 -#define NMI_PARITY 0x04 -#define NMI_EPARITY 0x02 -#else -#define NMI_PARITY (1 << 7) -#define NMI_IOCHAN (1 << 6) -#define ENMI_WATCHDOG (1 << 7) -#define ENMI_BUSTIMER (1 << 6) -#define ENMI_IOSTATUS (1 << 5) -#endif - -/* - * Handle a NMI, possibly a machine check. - * return true to panic system, false to ignore. - */ -int -isa_nmi(cd) - int cd; -{ - int retval = 0; -#ifdef PC98 - int port = inb(0x33); - - log(LOG_CRIT, "NMI PC98 port = %x\n", port); - if (epson_machine_id == 0x20) - epson_outb(0xc16, epson_inb(0xc16) | 0x1); - if (port & NMI_PARITY) { - log(LOG_CRIT, "BASE RAM parity error, likely hardware failure."); - retval = 1; - } else if (port & NMI_EPARITY) { - log(LOG_CRIT, "EXTENDED RAM parity error, likely hardware failure."); - retval = 1; - } else { - log(LOG_CRIT, "\nNMI Resume ??\n"); - } -#else /* IBM-PC */ - int isa_port = inb(0x61); - int eisa_port = inb(0x461); - - log(LOG_CRIT, "NMI ISA %x, EISA %x\n", isa_port, eisa_port); -#ifdef DEV_MCA - if (MCA_system && mca_bus_nmi()) - return(0); -#endif - - if (isa_port & NMI_PARITY) { - log(LOG_CRIT, "RAM parity error, likely hardware failure."); - retval = 1; - } - - if (isa_port & NMI_IOCHAN) { - log(LOG_CRIT, "I/O channel check, likely hardware failure."); - retval = 1; - } - - /* - * On a real EISA machine, this will never happen. However it can - * happen on ISA machines which implement XT style floating point - * error handling (very rare). Save them from a meaningless panic. - */ - if (eisa_port == 0xff) - return(retval); - - if (eisa_port & ENMI_WATCHDOG) { - log(LOG_CRIT, "EISA watchdog timer expired, likely hardware failure."); - retval = 1; - } - - if (eisa_port & ENMI_BUSTIMER) { - log(LOG_CRIT, "EISA bus timeout, likely hardware failure."); - retval = 1; - } - - if (eisa_port & ENMI_IOSTATUS) { - log(LOG_CRIT, "EISA I/O port status error."); - retval = 1; - } -#endif - return(retval); -} ==== //depot/projects/hammer/sys/amd64/amd64/io_apic.c#8 (text+ko) ==== @@ -30,6 +30,7 @@ */ #include "opt_isa.h" +#include "opt_no_mixed_mode.h" #include #include @@ -48,7 +49,7 @@ #include #include -#ifdef DEV_ISA +#if defined(DEV_ISA) && !defined(NO_MIXED_MODE) #define MIXED_MODE #endif @@ -175,7 +176,7 @@ uint32_t flags; mtx_lock_spin(&icu_lock); - if (!intpin->io_masked) { + if (!intpin->io_masked && !intpin->io_edgetrigger) { flags = ioapic_read(io->io_addr, IOAPIC_REDTBL_LO(intpin->io_intpin)); flags |= IOART_INTMSET; @@ -251,11 +252,6 @@ { struct ioapic_intsrc *intpin = (struct ioapic_intsrc *)isrc; - if (intpin->io_vector == IDT_TO_IRQ(IDT_SYSCALL)) { - printf("WARNING: IRQ %d is not routed!\n", - IDT_TO_IRQ(IDT_SYSCALL)); - return; - } KASSERT(intpin->io_dest != DEST_EXTINT, ("ExtINT pin trying to use ioapic enable_intr method")); if (intpin->io_dest == DEST_NONE) { @@ -392,7 +388,7 @@ * logical cluster destination until it is enabled. */ intpin->io_masked = 1; - intpin->io_dest = -1; + intpin->io_dest = DEST_NONE; if (bootverbose) { printf("ioapic%u: intpin %d -> ", io->io_id, i); if (intpin->io_vector == VECTOR_EXTINT) @@ -611,7 +607,7 @@ break; default: flags |= IOART_DELLOPRI | - IRQ_TO_IDT(pin->io_vector); + apic_irq_to_idt(pin->io_vector); } mtx_lock_spin(&icu_lock); ioapic_write(apic, IOAPIC_REDTBL_LO(i), flags); @@ -654,7 +650,8 @@ STAILQ_FOREACH(io, &ioapic_list, io_next) for (i = 0; i < io->io_numintr; i++) if (io->io_pins[i].io_dest != DEST_NONE && - io->io_pins[i].io_dest != DEST_EXTINT) + io->io_pins[i].io_dest != DEST_EXTINT && + io->io_pins[i].io_vector != VECTOR_EXTINT /* XXXTEST */) ioapic_program_destination(&io->io_pins[i]); } SYSINIT(ioapic_destinations, SI_SUB_SMP, SI_ORDER_SECOND, @@ -684,10 +681,12 @@ if (extint->io_vector != VECTOR_EXTINT) panic("Can't find ExtINT pin to route through!"); if (extint->io_dest == DEST_NONE) { +#if 0 + /* XXXTEST? */ ioapic_assign_cluster(extint); +#endif ioapic_enable_source(&extint->io_intsrc); } - } #endif /* MIXED_MODE */ ==== //depot/projects/hammer/sys/amd64/amd64/local_apic.c#11 (text+ko) ==== @@ -75,6 +75,7 @@ struct lapic { struct lvt la_lvts[LVT_MAX + 1]; + int la_id:8; int la_cluster:4; int la_cluster_id:2; int la_present:1; @@ -85,7 +86,7 @@ /* Global defaults for local APIC LVT entries. */ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 1, 1, APIC_LVT_DM_EXTINT, 0 }, /* LINT0: masked ExtINT */ - { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ + { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, 0 }, /* Timer: needs a vector */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, 0 }, /* Error: needs a vector */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, 0 }, /* PMC */ @@ -130,10 +131,11 @@ case APIC_LVT_DM_SMI: case APIC_LVT_DM_INIT: case APIC_LVT_DM_EXTINT: - KASSERT(lvt->lvt_edgetrigger == 1, - ("LVT with mode %#x must be edge triggered", - lvt->lvt_mode)); - /* FALLTHROUGH */ + if (!lvt->lvt_edgetrigger) { + printf("lapic%u: Forcing LINT%u to edge trigger\n", + la->la_id, pin); + value |= APIC_LVT_TM; + } /* Use a vector of 0. */ break; case APIC_LVT_DM_FIXED: @@ -197,6 +199,7 @@ * intra-cluster ID of 0. */ lapics[apic_id].la_present = 1; + lapics[apic_id].la_id = apic_id; for (i = 0; i < LVT_MAX; i++) { lapics[apic_id].la_lvts[i] = lvts[i]; lapics[apic_id].la_lvts[i].lvt_active = 0; @@ -222,14 +225,14 @@ } void -lapic_enable_intr(u_int vector) +lapic_enable_intr(u_int irq) { + u_int vector; - /* Convert to IDT vector. */ - vector = IRQ_TO_IDT(vector); + vector = apic_irq_to_idt(irq); KASSERT(vector != IDT_SYSCALL, ("Attempt to overwrite syscall entry")); KASSERT(ioint_handlers[vector / 32] != NULL, - ("No ISR handler for IRQ %d", IDT_TO_IRQ(vector))); + ("No ISR handler for IRQ %u", irq)); setidt(vector, ioint_handlers[vector / 32], SDT_SYSIGT, SEL_KPL, 0); } @@ -283,19 +286,12 @@ void lapic_disable(void) { - struct lapic *la; - u_int32_t value; - register_t eflags; + uint32_t value; - la = &lapics[lapic_id()]; - KASSERT(la->la_present, ("missing APIC structure")); - eflags = intr_disable(); - - /* Disable local APIC to be safe during boot */ + /* Software disable the local APIC. */ value = lapic->svr; value &= ~APIC_SVR_SWEN; lapic->svr = value; - intr_restore(eflags); } int @@ -341,88 +337,114 @@ } int -lapic_set_lvt_mask(u_int apic_id, u_int lvt, u_char masked) +lapic_set_lvt_mask(u_int apic_id, u_int pin, u_char masked) { - if (lvt > LVT_MAX) + if (pin > LVT_MAX) return (EINVAL); if (apic_id == APIC_ID_ALL) - lvts[lvt].lvt_masked = masked; + lvts[pin].lvt_masked = masked; else { KASSERT(lapics[apic_id].la_present, ("%s: missing APIC %u", __func__, apic_id)); - lapics[apic_id].la_lvts[lvt].lvt_masked = masked; - lapics[apic_id].la_lvts[lvt].lvt_active = 1; + lapics[apic_id].la_lvts[pin].lvt_masked = masked; + lapics[apic_id].la_lvts[pin].lvt_active = 1; } + /* XXXTEST */ + printf("lapic%u: LINT%u %s\n", apic_id, pin, + masked ? "masked" : "unmasked"); return (0); } int -lapic_set_lvt_mode(u_int apic_id, u_int lvt, u_int32_t mode) +lapic_set_lvt_mode(u_int apic_id, u_int pin, u_int32_t mode) { - struct lvt *lv; + struct lvt *lvt; - if (lvt > LVT_MAX) + if (pin > LVT_MAX) return (EINVAL); if (apic_id == APIC_ID_ALL) - lv = &lvts[lvt]; + lvt = &lvts[pin]; else { KASSERT(lapics[apic_id].la_present, ("%s: missing APIC %u", __func__, apic_id)); - lv = &lapics[apic_id].la_lvts[lvt]; - lv->lvt_active = 1; + lvt = &lapics[apic_id].la_lvts[pin]; + lvt->lvt_active = 1; } - lv->lvt_mode = mode; + lvt->lvt_mode = mode; switch (mode) { case APIC_LVT_DM_NMI: case APIC_LVT_DM_SMI: case APIC_LVT_DM_INIT: case APIC_LVT_DM_EXTINT: - lv->lvt_edgetrigger = 1; - lv->lvt_activehi = 1; + lvt->lvt_edgetrigger = 1; + lvt->lvt_activehi = 1; if (mode == APIC_LVT_DM_EXTINT) - lv->lvt_masked = 1; + lvt->lvt_masked = 1; else - lv->lvt_masked = 0; + lvt->lvt_masked = 0; break; default: panic("Unsupported delivery mode: 0x%x\n", mode); - } + } + /* XXXTEST */ + printf("lapic%u: Routing ", apic_id); + switch (mode) { + case APIC_LVT_DM_NMI: + printf("NMI"); + break; + case APIC_LVT_DM_SMI: + printf("SMI"); + break; + case APIC_LVT_DM_INIT: + printf("INIT"); + break; + case APIC_LVT_DM_EXTINT: + printf("ExtINT"); + break; + } + printf(" -> LINT%u\n", pin); return (0); } int -lapic_set_lvt_polarity(u_int apic_id, u_int lvt, u_char activehi) +lapic_set_lvt_polarity(u_int apic_id, u_int pin, u_char activehi) { - if (lvt > LVT_MAX) + if (pin > LVT_MAX) return (EINVAL); if (apic_id == APIC_ID_ALL) - lvts[lvt].lvt_activehi = activehi; + lvts[pin].lvt_activehi = activehi; else { KASSERT(lapics[apic_id].la_present, ("%s: missing APIC %u", __func__, apic_id)); - lapics[apic_id].la_lvts[lvt].lvt_active = 1; - lapics[apic_id].la_lvts[lvt].lvt_activehi = activehi; + lapics[apic_id].la_lvts[pin].lvt_active = 1; + lapics[apic_id].la_lvts[pin].lvt_activehi = activehi; } + /* XXXTEST */ + printf("lapic%u: LINT%u polarity: active-%s\n", apic_id, pin, + activehi ? "hi" : "lo"); return (0); } int -lapic_set_lvt_triggermode(u_int apic_id, u_int lvt, u_char edgetrigger) +lapic_set_lvt_triggermode(u_int apic_id, u_int pin, u_char edgetrigger) { - if (lvt > LVT_MAX) + if (pin > LVT_MAX) return (EINVAL); if (apic_id == APIC_ID_ALL) - lvts[lvt].lvt_edgetrigger = edgetrigger; + lvts[pin].lvt_edgetrigger = edgetrigger; else { KASSERT(lapics[apic_id].la_present, ("%s: missing APIC %u", __func__, apic_id)); - lapics[apic_id].la_lvts[lvt].lvt_edgetrigger = edgetrigger; - lapics[apic_id].la_lvts[lvt].lvt_active = 1; + lapics[apic_id].la_lvts[pin].lvt_edgetrigger = edgetrigger; + lapics[apic_id].la_lvts[pin].lvt_active = 1; } + /* XXXTEST */ + printf("lapic%u: LINT%u trigger: %s\n", apic_id, pin, + edgetrigger ? "edge" : "level"); return (0); } @@ -434,12 +456,37 @@ if (vec == -1) panic("Couldn't get vector from ISR!"); - isrc = intr_lookup_source(vec); + isrc = intr_lookup_source(apic_idt_to_irq(vec)); isrc->is_pic->pic_disable_source(isrc); lapic->eoi = 0; intr_execute_handlers(isrc, &frame); } +/* Translate between IDT vectors and IRQ vectors. */ +u_int +apic_irq_to_idt(u_int irq) +{ + u_int vector; + + KASSERT(irq < NUM_IO_INTS, ("Invalid IRQ %u", irq)); + vector = irq + IDT_IO_INTS; + if (vector >= IDT_SYSCALL) + vector++; + return (vector); +} + +u_int +apic_idt_to_irq(u_int vector) +{ + + KASSERT(vector >= IDT_IO_INTS && vector != IDT_SYSCALL && + vector <= IDT_IO_INTS + NUM_IO_INTS, + ("Vector %u does not map to an IRQ line", vector)); + if (vector > IDT_SYSCALL) + vector--; + return (vector - IDT_IO_INTS); +} + /* * APIC probing support code. This includes code to manage enumerators. */ ==== //depot/projects/hammer/sys/amd64/amd64/mp_machdep.c#15 (text+ko) ==== @@ -76,29 +76,9 @@ #define BIOS_RESET (0x0f) #define BIOS_WARM (0x0a) -/* - * Values to send to the POST hardware. - */ -#define MP_BOOTADDRESS_POST 0x10 -#define MP_PROBE_POST 0x11 -#define MPTABLE_PASS1_POST 0x12 - -#define MP_START_POST 0x13 -#define MP_ENABLE_POST 0x14 -#define MPTABLE_PASS2_POST 0x15 - -#define START_ALL_APS_POST 0x16 -#define INSTALL_AP_TRAMP_POST 0x17 -#define START_AP_POST 0x18 - -#define MP_ANNOUNCE_POST 0x19 - /* lock region used by kernel profiling */ int mcount_lock; -/** XXX FIXME: where does this really belong, isa.h/isa.c perhaps? */ -int current_postcode; - int mp_naps; /* # of Applications processors */ int boot_cpu_id = -1; /* designated BSP */ extern int nkpt; @@ -160,7 +140,6 @@ static int start_all_aps(u_int boot_addr); static void install_ap_tramp(u_int boot_addr); static int start_ap(int apic_id, u_int boot_addr); -void ap_init(void); static void release_aps(void *dummy); static int hlt_cpus_mask; @@ -233,6 +212,16 @@ } /* At least one CPU was found. */ + if (mp_ncpus == 1) { + /* + * One CPU was found, so this must be a UP system with + * an I/O APIC. + */ + mp_maxid = 0; + return (0); + } + + /* At least two CPUs were found. */ KASSERT(mp_maxid >= mp_ncpus - 1, ("%s: counters out of sync: max %d, count %d", __func__, mp_maxid, mp_ncpus)); @@ -311,21 +300,21 @@ printf(" cpu%d (AP): APIC ID: %2d\n", i++, x); } } - - /* XXX: List I/O APICs? They are done differently now. */ } /* - * AP cpu's call this to sync up protected mode. + * AP CPU's call this to initialize themselves. */ void init_secondary(void) { int gsel_tss; - int myid = bootAP; + int myid; u_int64_t cr0; struct pcpu *pc; + /* bootAP is set in start_ap() to our ID. */ + myid = bootAP; lgdt(&r_gdt); /* does magic intra-segment return */ pc = &__pcpu[myid]; @@ -354,7 +343,74 @@ mp_naps++; - ap_init(); /* kick things off, this does not return */ + /* spin until all the AP's are ready */ + while (!aps_ready) + ia32_pause(); + + /* set up CPU registers and state */ + cpu_setregs(); + + /* set up FPU state on the AP */ + npxinit(__INITIAL_NPXCW__); + + /* set up SSE registers */ + enable_sse(); + + /* A quick check from sanity claus */ + if (PCPU_GET(apic_id) != lapic_id()) { + printf("SMP: cpuid = %d\n", PCPU_GET(cpuid)); + printf("SMP: actual apic_id = %d\n", lapic_id()); + printf("SMP: correct apic_id = %d\n", PCPU_GET(apic_id)); + panic("cpuid mismatch! boom!!"); + } + + /* Init local apic for irq's */ + lapic_setup(); + + /* Set memory range attributes for this CPU to match the BSP */ + mem_range_AP_init(); + + mtx_lock_spin(&ap_boot_mtx); + + smp_cpus++; + + CTR1(KTR_SMP, "SMP: AP CPU #%d Launched", PCPU_GET(cpuid)); + printf("SMP: AP CPU #%d Launched!\n", PCPU_GET(cpuid)); + + /* Determine if we are a logical CPU. */ + if (logical_cpus > 1 && PCPU_GET(apic_id) % logical_cpus != 0) + logical_cpus_mask |= PCPU_GET(cpumask); + + /* Build our map of 'other' CPUs. */ + PCPU_SET(other_cpus, all_cpus & ~PCPU_GET(cpumask)); + +#if 0 + if (bootverbose) +#endif + lapic_dump("AP"); + + if (smp_cpus == mp_ncpus) { + /* enable IPI's, tlb shootdown, freezes etc */ + atomic_store_rel_int(&smp_started, 1); + smp_active = 1; /* historic */ + } + + mtx_unlock_spin(&ap_boot_mtx); + + /* wait until all the AP's are up */ + while (smp_started == 0) + ia32_pause(); + + /* ok, now grab sched_lock and enter the scheduler */ + mtx_lock_spin(&sched_lock); + + binuptime(PCPU_PTR(switchtime)); + PCPU_SET(switchticks, ticks); + + cpu_throw(NULL, choosethread()); /* doesn't return */ + + panic("scheduler returned us to %s", __func__); + /* NOTREACHED */ } /******************************************************************* @@ -781,83 +837,6 @@ /* - * This is called once the rest of the system is up and running and we're - * ready to let the AP's out of the pen. - */ -void -ap_init(void) -{ - - /* spin until all the AP's are ready */ - while (!aps_ready) - ia32_pause(); - - /* set up CPU registers and state */ - cpu_setregs(); - - /* set up FPU state on the AP */ - npxinit(__INITIAL_NPXCW__); - - /* set up SSE registers */ - enable_sse(); - - /* A quick check from sanity claus */ - if (PCPU_GET(apic_id) != lapic_id()) { - printf("SMP: cpuid = %d\n", PCPU_GET(cpuid)); - printf("SMP: actual apic_id = %d\n", lapic_id()); - printf("SMP: correct apic_id = %d\n", PCPU_GET(apic_id)); - panic("cpuid mismatch! boom!!"); - } - - /* Init local apic for irq's */ - lapic_setup(); - - /* Set memory range attributes for this CPU to match the BSP */ - mem_range_AP_init(); - - mtx_lock_spin(&ap_boot_mtx); - - smp_cpus++; - - CTR1(KTR_SMP, "SMP: AP CPU #%d Launched", PCPU_GET(cpuid)); - printf("SMP: AP CPU #%d Launched!\n", PCPU_GET(cpuid)); - - /* Determine if we are a logical CPU. */ - if (logical_cpus > 1 && PCPU_GET(apic_id) % logical_cpus != 0) - logical_cpus_mask |= PCPU_GET(cpumask); - - /* Build our map of 'other' CPUs. */ - PCPU_SET(other_cpus, all_cpus & ~PCPU_GET(cpumask)); - -#if 0 - if (bootverbose) -#endif - lapic_dump("AP"); - - if (smp_cpus == mp_ncpus) { - /* enable IPI's, tlb shootdown, freezes etc */ - atomic_store_rel_int(&smp_started, 1); - smp_active = 1; /* historic */ - } - - mtx_unlock_spin(&ap_boot_mtx); - - /* wait until all the AP's are up */ - while (smp_started == 0) - ia32_pause(); - - /* ok, now grab sched_lock and enter the scheduler */ - mtx_lock_spin(&sched_lock); - - binuptime(PCPU_PTR(switchtime)); - PCPU_SET(switchticks, ticks); - - cpu_throw(NULL, choosethread()); /* doesn't return */ - - panic("scheduler returned us to %s", __func__); -} - -/* * For statclock, we send an IPI to all CPU's to have them call this * function. */ @@ -966,6 +945,10 @@ lapic_ipi_vectored(ipi, APIC_IPI_DEST_SELF); } +/* + * This is called once the rest of the system is up and running and we're + * ready to let the AP's out of the pen. + */ static void release_aps(void *dummy __unused) { @@ -978,7 +961,6 @@ ia32_pause(); mtx_unlock_spin(&sched_lock); } - SYSINIT(start_aps, SI_SUB_SMP, SI_ORDER_FIRST, release_aps, NULL); static int ==== //depot/projects/hammer/sys/amd64/amd64/mpboot.s#8 (text+ko) ==== ==== //depot/projects/hammer/sys/amd64/include/apicvar.h#6 (text+ko) ==== @@ -131,19 +131,22 @@ IDTVEC(apic_isr1), IDTVEC(apic_isr2), IDTVEC(apic_isr3), IDTVEC(apic_isr4), IDTVEC(apic_isr5), IDTVEC(spuriousint); +u_int apic_irq_to_idt(u_int irq); +u_int apic_idt_to_irq(u_int vector); void apic_register_enumerator(struct apic_enumerator *enumerator); void *ioapic_create(uintptr_t addr, int32_t id, int intbase); int ioapic_disable_pin(void *cookie, u_int pin); int ioapic_get_vector(void *cookie, u_int pin); int ioapic_next_logical_cluster(void); +void ioapic_register(void *cookie); +int ioapic_remap_vector(void *cookie, u_int pin, int vector); int ioapic_set_extint(void *cookie, u_int pin); int ioapic_set_nmi(void *cookie, u_int pin); int ioapic_set_polarity(void *cookie, u_int pin, char activehi); int ioapic_set_triggermode(void *cookie, u_int pin, char edgetrigger); int ioapic_set_smi(void *cookie, u_int pin); -int ioapic_remap_vector(void *cookie, u_int pin, int vector); -void ioapic_register(void *cookie); void lapic_create(u_int apic_id, int boot_cpu); +void lapic_disable(void); void lapic_dump(const char *str); void lapic_enable_intr(u_int vector); int lapic_id(void); ==== //depot/projects/hammer/sys/amd64/include/intr_machdep.h#4 (text+ko) ==== @@ -31,8 +31,8 @@ #ifdef _KERNEL -/* With I/O APIC's we can have up to 160 interrupts. */ -#define NUM_IO_INTS 160 +/* With I/O APIC's we can have up to 159 interrupts. */ +#define NUM_IO_INTS 159 #define INTRCNT_COUNT (1 + NUM_IO_INTS * 2) #ifndef LOCORE @@ -77,9 +77,6 @@ extern struct mtx icu_lock; -/* XXX: Does this belong in icu.h? */ -void atpic_startup(void); - int intr_add_handler(const char *name, int vector, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); void intr_execute_handlers(struct intsrc *isrc, struct intrframe *iframe); @@ -89,8 +86,6 @@ void intr_resume(void); void intr_suspend(void); -int isa_nmi(int cd); - #endif /* !LOCORE */ #endif /* _KERNEL */ #endif /* !__MACHINE_INTR_MACHDEP_H__ */ ==== //depot/projects/hammer/sys/amd64/isa/atpic.c#6 (text+ko) ==== @@ -65,16 +65,6 @@ unsigned int imen; /* XXX */ inthand_t - IDTVEC(atpic_fastintr0), IDTVEC(atpic_fastintr1), - IDTVEC(atpic_fastintr2), IDTVEC(atpic_fastintr3), - IDTVEC(atpic_fastintr4), IDTVEC(atpic_fastintr5), - IDTVEC(atpic_fastintr6), IDTVEC(atpic_fastintr7), - IDTVEC(atpic_fastintr8), IDTVEC(atpic_fastintr9), - IDTVEC(atpic_fastintr10), IDTVEC(atpic_fastintr11), - IDTVEC(atpic_fastintr12), IDTVEC(atpic_fastintr13), - IDTVEC(atpic_fastintr14), IDTVEC(atpic_fastintr15); - -inthand_t IDTVEC(atpic_intr0), IDTVEC(atpic_intr1), IDTVEC(atpic_intr2), IDTVEC(atpic_intr3), IDTVEC(atpic_intr4), IDTVEC(atpic_intr5), IDTVEC(atpic_intr6), IDTVEC(atpic_intr7), IDTVEC(atpic_intr8), @@ -87,35 +77,26 @@ #define ATPIC(io, base, eoi, imenptr) \ { { atpic_enable_source, atpic_disable_source, (eoi), \ atpic_enable_intr, atpic_vector, atpic_source_pending, NULL, \ - atpic_resume }, (io), (base), IRQ_TO_IDT(base), (imenptr) } + atpic_resume }, (io), (base), IDT_IO_INTS + (base), (imenptr) } #define INTSRC(irq) \ - { { (struct pic *)(&atpics[(irq) / 8]) }, (irq) % 8, \ - IDTVEC(atpic_fastintr ## irq ), IDTVEC(atpic_intr ## irq ) } + { { &atpics[(irq) / 8].at_pic }, (irq) % 8, \ + IDTVEC(atpic_intr ## irq ) } struct atpic { struct pic at_pic; int at_ioaddr; int at_irqbase; - uint16_t at_intbase; + uint8_t at_intbase; uint8_t *at_imen; }; struct atpic_intsrc { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Oct 10 18:07:50 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5B57316A4C0; Fri, 10 Oct 2003 18:07:50 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35FF516A4B3 for ; Fri, 10 Oct 2003 18:07:50 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EA0943FE1 for ; Fri, 10 Oct 2003 18:07:49 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9B17nXJ045931 for ; Fri, 10 Oct 2003 18:07:49 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9B17nNb045928 for perforce@freebsd.org; Fri, 10 Oct 2003 18:07:49 -0700 (PDT) (envelope-from Hrishikesh_Dandekar@NAI.com) Date: Fri, 10 Oct 2003 18:07:49 -0700 (PDT) Message-Id: <200310110107.h9B17nNb045928@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to Hrishikesh_Dandekar@NAI.com using -f From: Hrishikesh Dandekar To: Perforce Change Reviews Subject: PERFORCE change 39485 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2003 01:07:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=39485 Change 39485 by hdandeka@hdandeka_yash on 2003/10/10 18:07:27 Make System V IPC and Posix.1b sem related changes. Affected files ... .. //depot/projects/trustedbsd/sebsd_policy/policy/flask/access_vectors#3 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/flask/security_classes#2 edit .. //depot/projects/trustedbsd/sebsd_policy/policy/macros/global_macros.te#7 edit Differences ... ==== //depot/projects/trustedbsd/sebsd_policy/policy/flask/access_vectors#3 (text+ko) ==== @@ -261,15 +261,21 @@ { send receive + destroy } class shm inherits ipc + +class posix_sem { - lock + associate + disassociate + destroy + write + read } - # # Define the access vector interpretation for the security server. # ==== //depot/projects/trustedbsd/sebsd_policy/policy/flask/security_classes#2 (text+ko) ==== @@ -40,6 +40,9 @@ class shm class ipc +#Posix.1b-related classes +class posix_sem + # # userspace object manager classes # ==== //depot/projects/trustedbsd/sebsd_policy/policy/macros/global_macros.te#7 (text+ko) ==== @@ -163,8 +163,11 @@ define(`rw_msgq_perms', `{ associate getattr read write enqueue unix_read unix_write }') define(`create_msgq_perms', `{ associate getattr setattr create destroy read write enqueue unix_read unix_write }') define(`r_shm_perms', `{ associate getattr read unix_read }') -define(`rw_shm_perms', `{ associate getattr read write lock unix_read unix_write }') -define(`create_shm_perms', `{ associate getattr setattr create destroy read write lock unix_read unix_write }') +define(`rw_shm_perms', `{ associate getattr read write unix_read unix_write }') +define(`create_shm_perms', `{ associate getattr setattr create destroy read write unix_read unix_write }') +define(`r_posix_sem_perms', `{ associate disassociate read }') +define(`rw_posix_sem_perms', `{ associate disassociate write read }') +define(`create_posix_sem_perms', `{ associate disassociate destroy write read }') ################################# # @@ -719,9 +722,10 @@ # Access System V IPC objects created by processes in the same domain. allow $1 self:sem create_sem_perms; -allow $1 self:msg { send receive }; +allow $1 self:msg { send receive destroy }; allow $1 self:msgq create_msgq_perms; allow $1 self:shm create_shm_perms; +allow $1 self:posix_sem create_posix_sem_perms; ') # From owner-p4-projects@FreeBSD.ORG Fri Oct 10 19:04:00 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3D87F16A4C0; Fri, 10 Oct 2003 19:04:00 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3DFB16A4B3 for ; Fri, 10 Oct 2003 19:03:59 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 679FE43FDD for ; Fri, 10 Oct 2003 19:03:58 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9B23wXJ049173 for ; Fri, 10 Oct 2003 19:03:58 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9B23v9r049170 for perforce@freebsd.org; Fri, 10 Oct 2003 19:03:57 -0700 (PDT) (envelope-from cvance@nailabs.com) Date: Fri, 10 Oct 2003 19:03:57 -0700 (PDT) Message-Id: <200310110203.h9B23v9r049170@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@nailabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 39487 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2003 02:04:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=39487 Change 39487 by cvance@cvance_osx_laptop on 2003/10/10 19:03:16 Copy from sebsd branch, initial import Affected files ... .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/av_inherit.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/av_perm_to_string.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/av_permissions.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/avc.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/avc.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/avc_ss.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/class_to_string.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/common_perm_to_string.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/initial_sid_to_string.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/flask.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/flask/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/flask/README#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/flask/access_vectors#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/flask/initial_sids#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/flask/mkaccess_vector.sh#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/flask/mkflask.sh#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/flask/security_classes#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/flask_types.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/linux-compat.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/sebsd.c#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/sebsd.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/sebsd_labels.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/sebsd_syscall.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/sebsd_syscalls.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/sebsd_sysctl.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/avtab.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/avtab.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/constraint.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/context.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/ebitmap.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/ebitmap.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/fileutils.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/fileutils.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/global.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/hashtab.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/hashtab.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/init.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/mls.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/mls.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/mls_types.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/policydb.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/policydb.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/queue.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/queue.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/security.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/services.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/services.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/services_private.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/sidtab.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/sidtab.h#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/symtab.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/symtab.h#1 add Differences ... ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/Makefile#2 (text+ko) ==== @@ -7,22 +7,29 @@ include $(MakeInc_cmd) include $(MakeInc_def) -INSTINC_SUBDIRS = +EXPORT_ONLY_FILES = \ + sebsd.h \ + flask.h \ + flask_types.h \ + linux-compat.h + +INSTINC_SUBDIRS = avc ss INSTINC_SUBDIRS_PPC = ${INSTINC_SUBDIRS} INSTINC_SUBDIRS_I386 = ${INSTINC_SUBDIRS} -EXPINC_SUBDIRS = +EXPINC_SUBDIRS = avc ss EXPINC_SUBDIRS_PPC = ${EXPINC_SUBDIRS} EXPINC_SUBDIRS_I386 = ${EXPINC_SUBDIRS} INSTALL_MI_LIST = -INSTALL_MI_DIR = +INSTALL_MI_DIR = sebsd -EXPORT_MI_LIST = +EXPORT_MI_LIST = ${EXPORT_ONLY_FILES} -EXPORT_MI_DIR = +EXPORT_MI_DIR = sebsd +INCFLAGS_MAKEFILE= -I.. include $(MakeInc_rule) include $(MakeInc_dir) ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/sebsd.c#2 (text+ko) ==== @@ -1,1 +1,2151 @@ -char *sebsd_id = "SEBSD Module"; +/*- + * Copyright (c) 2002, 2003 Networks Associates Technology, Inc. + * All rights reserved. + * + * This software was developed for the FreeBSD Project by NAI Labs, the + * Security Research Division of Network Associates, Inc. under + * DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA + * CHATS research program. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The names of the authors may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include + +#include +#include + +int sebsd_verbose = 0; + +static int slot; +#define SLOT(l) ((void *)LABEL_TO_SLOT((l), slot).l_ptr) + +MALLOC_DEFINE(M_SEBSD, "sebsd", "Security Enhanced BSD"); + +extern int ss_initialized; +static __inline int ss_precondition(void) +{ + return ss_initialized; +} + +static void +sebsd_init(struct mac_policy_conf *mpc) +{ + printf("sebsd:: init\n"); + avc_init(); + if (security_init()) { + panic("SEBSD: couldn't read policy file"); + } +} + +static void +sebsd_destroy(struct mac_policy_conf *mpc) +{ + + printf("sebsd:: destroy\n"); +} + +/* + * Check whether a task is allowed to use a capability. + */ +static int +cred_has_capability(struct ucred *cred, cap_value_t cap) +{ + struct task_security_struct *task; + struct avc_audit_data ad; + + task = SLOT(&cred->cr_label); + + AVC_AUDIT_DATA_INIT(&ad, CAP); + ad.u.cap = cap; + + return avc_has_perm_audit(task->sid, task->sid, + SECCLASS_CAPABILITY, cap, &ad); +} + +static int +cred_has_perm(struct ucred *cred, struct proc *proc, access_vector_t perm) +{ + struct task_security_struct *task, *target; + + task = SLOT(&cred->cr_label); + target = SLOT(&proc->p_ucred->cr_label); + + return (avc_has_perm_ref(task->sid, target->sid, SECCLASS_PROCESS, + perm, &target->avcr)); +} + +static int +mount_has_perm(struct ucred *cred, struct mount *mp, access_vector_t perm, + struct avc_audit_data *ad) +{ + struct mount_security_struct *sbsec; + struct task_security_struct *task; + + task = SLOT(&cred->cr_label); + sbsec = SLOT(&mp->mnt_mntlabel); + + return (avc_has_perm_audit(task->sid, sbsec->sid, SECCLASS_FILESYSTEM, + perm, ad)); +} + +static int +cred_has_system(struct ucred *cred, access_vector_t perm) +{ + struct task_security_struct *task; + + task = SLOT(&cred->cr_label); + + return (avc_has_perm(task->sid, SECINITSID_KERNEL, + SECCLASS_SYSTEM, perm, NULL, NULL)); +} + +static int +cred_has_security(struct ucred *cred, access_vector_t perm) +{ + struct task_security_struct *task; + + task = SLOT(&cred->cr_label); + + return (avc_has_perm(task->sid, SECINITSID_SECURITY, + SECCLASS_SECURITY, perm, NULL, NULL)); +} + +int +thread_has_system(struct thread *td, access_vector_t perm) +{ + + return (cred_has_system(td->td_proc->p_ucred, perm)); +} + +int +thread_has_security(struct thread *td, access_vector_t perm) +{ + + return (cred_has_security(td->td_proc->p_ucred, perm)); +} + +static __inline security_class_t +vnode_type_to_security_class(enum vtype vt) +{ + switch (vt) { + case VREG: + return SECCLASS_FILE; + case VDIR: + return SECCLASS_DIR; + case VBLK: + return SECCLASS_BLK_FILE; + case VCHR: + return SECCLASS_CHR_FILE; + case VLNK: + return SECCLASS_LNK_FILE; + case VSOCK: + return SECCLASS_SOCK_FILE; + case VFIFO: + return SECCLASS_FIFO_FILE; + case VNON: + case VBAD: + return SECCLASS_FILE; + } + + return SECCLASS_FILE; +} + +static __inline security_class_t +dirent_type_to_security_class(__uint8_t type) +{ + switch (type) { + case DT_REG: + return SECCLASS_FILE; + case DT_DIR: + return SECCLASS_DIR; + case DT_BLK: + return SECCLASS_BLK_FILE; + case DT_CHR: + return SECCLASS_CHR_FILE; + case DT_LNK: + return SECCLASS_LNK_FILE; + case DT_SOCK: + return SECCLASS_SOCK_FILE; + case DT_FIFO: + return SECCLASS_FIFO_FILE; + case DT_UNKNOWN: + case DT_WHT: + return SECCLASS_FILE; + } + + return SECCLASS_FILE; +} + +static __inline access_vector_t +file_mask_to_av(enum vtype vt, int mask) +{ + access_vector_t av = 0; + + if (vt != VDIR) { + if (mask & VEXEC) + av |= FILE__EXECUTE; + if (mask & VREAD) + av |= FILE__READ; + + if (mask & VAPPEND) + av |= FILE__APPEND; + else if (mask & VWRITE) + av |= FILE__WRITE; + + } else { + if (mask & VEXEC) + av |= DIR__SEARCH; + if (mask & VWRITE) + av |= DIR__WRITE; + if (mask & VREAD) + av |= DIR__READ; + } + + return av; +} + +static int +vnode_has_perm(struct ucred *cred, struct vnode *vp, access_vector_t perm, + struct avc_entry_ref *aeref) +{ + struct task_security_struct *task; + struct vnode_security_struct *file; + struct avc_audit_data ad; + + task = SLOT(&cred->cr_label); + file = SLOT(&vp->v_label); + + AVC_AUDIT_DATA_INIT(&ad, FS); + ad.u.fs.vp = vp; + + if (file->sclass == 0) { + struct vattr va; + VOP_GETATTR(vp, &va, curthread->td_ucred, curthread); + printf("vnode_has_perm:: ERROR, sid=%d, sclass=0, v_type=%d," + " inode=%ld, fsid=%d\n", + file->sid, vp->v_type, va.va_fileid, va.va_fsid); + file->sclass = vnode_type_to_security_class(vp->v_type); + if (file->sclass == 0) { + printf("vnode_has_perm:: Giving up\n"); + return 1; /* TBD: debugging */ + } + } + return avc_has_perm_ref_audit(task->sid, file->sid, file->sclass, + perm, aeref ? aeref : &file->avcr, &ad); +} + +static int +pipe_has_perm(struct ucred *cred, struct pipe *pipe, access_vector_t perm) +{ + struct task_security_struct *task; + struct vnode_security_struct *file; + + task = SLOT(&cred->cr_label); + file = SLOT(pipe->pipe_label); + + /* + * TBD: No audit information yet + */ + + return(avc_has_perm_ref(task->sid, file->sid, file->sclass, + perm, &file->avcr)); +} + +static void +sebsd_init_cred_label(struct label *label) +{ + struct task_security_struct *new_tsec; + + new_tsec = malloc(sizeof(*new_tsec), M_SEBSD, M_ZERO | M_WAITOK); + new_tsec->osid = new_tsec->sid = SECINITSID_UNLABELED; + SLOT(label) = new_tsec; +} + +static void +sebsd_init_file_label(struct label *label) +{ + struct file_security_struct *new_fsec; + + new_fsec = malloc(sizeof(*new_fsec), M_SEBSD, M_ZERO | M_WAITOK); + new_fsec->sid = new_fsec->sid = SECINITSID_UNLABELED; + SLOT(label) = new_fsec; +} + +static void +sebsd_init_mount_label(struct label *label) +{ + struct mount_security_struct *sbsec; + + sbsec = malloc(sizeof(*sbsec), M_SEBSD, M_ZERO | M_WAITOK); + sbsec->sid = SECINITSID_UNLABELED; + SLOT(label) = sbsec; +} + +static void +sebsd_init_mount_fs_label(struct label *label) +{ + struct mount_fs_security_struct *sbsec; + + sbsec = malloc(sizeof(*sbsec), M_SEBSD, M_ZERO | M_WAITOK); + sbsec->sid = SECINITSID_UNLABELED; + SLOT(label) = sbsec; +} + +static void +sebsd_init_network_label(struct label *label) +{ + struct network_security_struct *new; + + new = malloc(sizeof(*new), M_SEBSD, M_ZERO | M_WAITOK); + new->sid = new->task_sid = SECINITSID_UNLABELED; + SLOT(label) = new; +} + +static int +sebsd_init_network_label_waitcheck(struct label *label, int flag) +{ + struct network_security_struct *new; + + new = malloc(sizeof(*new), M_SEBSD, M_ZERO | flag); + if (new == NULL) { + SLOT(label) = NULL; + return (ENOMEM); + } + + new->sid = new->task_sid = SECINITSID_UNLABELED; + SLOT(label) = new; + + return (0); +} + +static void +sebsd_init_vnode_label(struct label *label) +{ + struct vnode_security_struct *vsec; + + vsec = malloc(sizeof(*vsec), M_SEBSD, M_ZERO | M_WAITOK); + vsec->sid = SECINITSID_UNLABELED; + vsec->task_sid = SECINITSID_UNLABELED; + SLOT(label) = vsec; +} + +static void +sebsd_destroy_label(struct label *label) +{ + + free(SLOT(label), M_SEBSD); + SLOT(label) = NULL; +} + +static void +sebsd_relabel_cred(struct ucred *cred, struct label *newlabel) +{ + + printf("sebsd_relabel_cred:: This does nothing\n"); +} + +static void +sebsd_associate_vnode_devfs(struct mount *mp, struct label *fslabel, + struct devfs_dirent *de, struct label *delabel, struct vnode *vp, + struct label *vlabel) +{ + struct vnode_security_struct *vsec, *dsec; + + dsec = SLOT(delabel); + vsec = SLOT(vlabel); + + vsec->sid = dsec->sid; + vsec->task_sid = dsec->task_sid; + vsec->sclass = dsec->sclass; + + /* + * This is a no-op for now, but when devfs_dirents do contain + * labels, they should be copied to the vp here as per how + * sebsd_update_vnode_from_extattr() functions. They will be + * kept synchronized from here on automatically with the vnode + * relabel calls. + */ +} + +static int +sebsd_associate_vnode_extattr(struct mount *mp, struct label *fslabel, + struct vnode *vp, struct label *vlabel) +{ + struct vnode_security_struct *vsec; + /* TBD: Need to limit size of contexts used in extattr labels */ + char context[128]; + u_int32_t context_len; + int error; + + vsec = SLOT(vlabel); + + context_len = sizeof(context); /* TBD: bad fixed length */ + error = vn_extattr_get(vp, IO_NODELOCKED, + SEBSD_MAC_EXTATTR_NAMESPACE, + SEBSD_MAC_EXTATTR_NAME, + &context_len, context, curthread); + if (error == ENOATTR || error == EOPNOTSUPP) { + vsec->sid = SECINITSID_UNLABELED; /* Use the default label */ + + /* + struct vattr va; + + (void)VOP_GETATTR(vp, &va, curthread->td_ucred, curthread); + printf("sebsd_update_vnode_from_extattr: no label for " + "inode=%ld, fsid=%d\n", va.va_fileid, va.va_fsid); + */ + goto dosclass; + } + if (error) { + printf("sebsd_update_vnode_from_extattr: ERROR %d returned " + " by vn_extattr_get()\n", error); + return (error); /* Fail closed */ + } + if (sebsd_verbose > 1) { + struct vattr va; + + VOP_GETATTR(vp, &va, curthread->td_ucred, curthread); + printf("sebsd_vnode_from_extattr: len=%d: context=%.*s " + "inode=%ld, fsid=%d\n", context_len, context_len, + context, va.va_fileid, va.va_fsid); + } + + error = security_context_to_sid(context, context_len, &vsec->sid); + if (error) { + printf("sebsd_update_vnode_from_extattr: ERROR mapping " + "context to sid: %.*s\n", context_len, context); + return (0); /* TBD bad, bad, bad */ + } + +dosclass: + /* TBD: */ + vsec->sclass = vnode_type_to_security_class(vp->v_type); + if (vsec->sclass == 0) { + printf("sebsd_update_vnode_from_extattr:: sclass is 0\n"); + } + + return (0); +} + +static void +sebsd_associate_vnode_singlelabel(struct mount *mp, struct label *fslabel, + struct vnode *vp, struct label *vlabel) +{ + struct mount_fs_security_struct *sbsec; + struct vnode_security_struct *vsec; + + sbsec = SLOT(fslabel); + vsec = SLOT(vlabel); + vsec->sid = sbsec->sid; + vsec->sclass = vnode_type_to_security_class(vp->v_type); +} + +static void +sebsd_create_cred(struct ucred *cred_parent, struct ucred *cred_child) +{ + int rc; + struct task_security_struct *parent, *task; + + rc = ss_precondition(); + if (rc <= 0) + return; + + parent = SLOT(&cred_parent->cr_label); + task = SLOT(&cred_child->cr_label); + + /* Default to using the attributes from the parent process */ + task->osid = parent->osid; + task->sid = parent->sid; + + return; +} + +static void +sebsd_create_file(struct ucred *cred, struct file *fp, struct label *label) +{ + struct task_security_struct *tsec; + struct file_security_struct *fsec; + + tsec = SLOT(&cred->cr_label); + fsec = SLOT(label); + + fsec->sid = tsec->sid; +} + +static void +sebsd_create_devfs_device(struct ucred *cr, struct mount *mp, dev_t dev, + struct devfs_dirent *devfs_dirent, struct label *label, + const char *fullpath) +{ + char *path; + int rc; + security_id_t newsid; + struct mount_security_struct *sbsec; + struct vnode_security_struct *dirent; + + dirent = SLOT(label); + sbsec = SLOT(&mp->mnt_mntlabel); + + /* Default to the filesystem SID. */ + dirent->sid = sbsec->sid; + dirent->task_sid = SECINITSID_KERNEL; + dirent->sclass = + dirent_type_to_security_class(devfs_dirent->de_dirent->d_type); + + /* Obtain a SID based on the fstype, path, and class. */ + path = malloc(strlen(fullpath) + 2, M_SEBSD, M_ZERO | M_WAITOK); + path[0] = '/'; + strcpy(&path[1], fullpath); + rc = security_genfs_sid(mp->mnt_vfc->vfc_name, path, dirent->sclass, + &newsid); + + if (rc == 0) + dirent->sid = newsid; + + /* If there was a creating process (currently only for /dev/pty*), + try a type_transition rule. */ + if (cr != NULL) { + struct task_security_struct *task = SLOT(&cr->cr_label); + + /* XXX: uses the type specified by genfs instead of the parent directory + like it should! */ + int error = security_transition_sid(task->sid, dirent->sid, dirent->sclass, + &newsid); + if (error == 0) + dirent->sid = newsid; + } + + /* TBD: debugging */ + if (sebsd_verbose > 1) { + printf("sebsd_create_devfs_device(%s): sbsid=%d, " + "mountpoint=%s, rc=%d, sclass=%d, computedsid=%d, " + "dirent=%d\n", path, sbsec->sid, mp->mnt_stat.f_mntonname, + rc, dirent->sclass, newsid, dirent->sid); + } + free(path, M_SEBSD); +} + +static void +sebsd_create_devfs_directory(struct mount *mp, char *dirname, + int dirnamelen, struct devfs_dirent *devfs_dirent, struct label *label, + const char *fullpath) +{ + char *path; + int rc; + security_id_t newsid; + struct mount_security_struct *sbsec; + struct vnode_security_struct *dirent; + + dirent = SLOT(label); + sbsec = SLOT(&mp->mnt_mntlabel); + + /* Default to the filesystem SID. */ + dirent->sid = sbsec->sid; + dirent->task_sid = SECINITSID_KERNEL; + dirent->sclass = SECCLASS_DIR; + + /* Obtain a SID based on the fstype, path, and class. */ + path = malloc(strlen(fullpath) + 2, M_SEBSD, M_ZERO | M_WAITOK); + path[0] = '/'; + strcpy(&path[1], fullpath); + rc = security_genfs_sid(mp->mnt_vfc->vfc_name, path, dirent->sclass, + &newsid); + if (rc == 0) + dirent->sid = newsid; + + /* TBD: debugging */ + if (sebsd_verbose > 1) { + printf("%s(%s): sbsid=%d, mountpoint=%s, " + "rc=%d, sclass=%d, computedsid=%d, dirent=%d\n", + __func__, path, sbsec->sid, mp->mnt_stat.f_mntonname, rc, + dirent->sclass, newsid, dirent->sid); + } + free(path, M_SEBSD); +} + +static void +sebsd_create_devfs_symlink(struct ucred *cred, struct mount *mp, + struct devfs_dirent *dd, struct label *ddlabel, struct devfs_dirent *de, + struct label *delabel, const char *fullpath) +{ + + char *path; + int rc; + security_id_t newsid; + struct vnode_security_struct *lnksec; + struct vnode_security_struct *dirsec; + struct mount_security_struct *sbsec; + + /* TBD: Should probably be checking MAY_LINK/MAY_CREATE perms here */ + + dirsec = SLOT(ddlabel); + lnksec = SLOT(delabel); + sbsec = SLOT(&mp->mnt_mntlabel); + + /* Default to the filesystem SID. */ + lnksec->sid = dirsec->sid; + lnksec->task_sid = SECINITSID_KERNEL; + lnksec->sclass = SECCLASS_LNK_FILE; + + /* Obtain a SID based on the fstype, path, and class. */ + path = malloc(strlen(fullpath) + 2, M_SEBSD, M_ZERO | M_WAITOK); + path[0] = '/'; + strcpy(&path[1], fullpath); + rc = security_genfs_sid(mp->mnt_vfc->vfc_name, path, lnksec->sclass, + &newsid); + if (rc == 0) + lnksec->sid = newsid; + + if (sebsd_verbose > 1) { + printf("%s(%s): sbsid=%d, mountpoint=%s, rc=%d, sclass=%d, " + "computedsid=%d, dirent=%d\n", __func__, path, + sbsec->sid, mp->mnt_stat.f_mntonname, rc, + lnksec->sclass, newsid, lnksec->sid); + } + free(path, M_SEBSD); +} + +/* + * Use the allocating task SID to label pipes. On Linux, pipes reside + * in a pseudo filesystem. + */ +static void +sebsd_create_pipe(struct ucred *cred, struct pipe *pipe, + struct label *pipelabel) +{ + struct task_security_struct *tsec; + struct vnode_security_struct *vsec; + + tsec = SLOT(&cred->cr_label); + vsec = SLOT(pipelabel); + + vsec->sid = vsec->task_sid = tsec->sid; + vsec->sclass = SECCLASS_FIFO_FILE; +} + +static void +sebsd_create_proc0(struct ucred *cred) +{ + struct task_security_struct *task; + + task = SLOT(&cred->cr_label); + task->osid = task->sid = SECINITSID_KERNEL; + printf("sebsd_create_proc0:: using SECINITSID_KERNEL = %d\n", + SECINITSID_KERNEL); +} + +static void +sebsd_create_proc1(struct ucred *cred) +{ + struct task_security_struct *task; + + task = SLOT(&cred->cr_label); + task->osid = SECINITSID_KERNEL; + task->sid = SECINITSID_INIT; + printf("sebsd_create_proc1:: using SICINITSID_INIT = %d\n", + SECINITSID_INIT); +} + +static void +sebsd_create_mount(struct ucred *cred, struct mount *mp, + struct label *mntlabel, struct label *fslabel, struct label *mount_arg_label) +{ + struct mount_security_struct *sbsec, *mntsec; + struct mount_fs_security_struct *sbfssec; + int behavior, rc; + + sbsec = SLOT(mntlabel); + sbfssec = SLOT(fslabel); + /* TBD TBD TBD */ + /* + * Make the label for the filesystem the same as the singlelabel + * which the filesystem will use if not a "multilabel" type. + */ + rc = security_fs_use(mp->mnt_vfc->vfc_name, &behavior, &sbsec->sid); + if (rc) { + printf("sebsd_create_mount: security_fs_use(%s) returned %d\n", + mp->mnt_vfc->vfc_name, rc); + behavior = SECURITY_FS_USE_NONE; + } else { + sbfssec->sid = sbsec->sid; + /* TBD: debugging only */ + printf("sebsd_create_mount: security_fs_use(%s) behavior %d, sid %d\n", + mp->mnt_vfc->vfc_name, behavior, sbsec->sid); + } + + switch (behavior) { + case SECURITY_FS_USE_XATTR: + /* PSIDs only work for persistent file systems with + unique and persistent inode numbers. */ + sbsec->uses_psids = 1; + + /* + * TBD: need to correctly label mountpoint with persistent + * label at this point (currently vnode is unavailable) + */ + + break; + case SECURITY_FS_USE_TRANS: + /* Transition SIDs are used for pseudo filesystems like + devpts and tmpfs where you want the SID to be derived + from the SID of the creating process and the SID of + the filesystem. */ + sbsec->uses_trans = 1; + break; + case SECURITY_FS_USE_TASK: + /* Task SIDs are used for pseudo filesystems like pipefs + and sockfs where you want the objects to be labeled + with the SID of the creating process. */ + sbsec->uses_task = 1; + break; + case SECURITY_FS_USE_GENFS: + /* genfs_contexts handles everything else, like devfs, + usbdevfs, driverfs, and portions of proc. */ + sbsec->uses_genfs = 1; + break; + case SECURITY_FS_USE_NONE: + /* No labeling support configured for this filesystem type. + Don't appear to require labeling for binfmt_misc, bdev, + or rootfs. */ + break; + default: + printf("%s: security_fs_use(%s) returned unrecognized " + "behavior %d\n", __FUNCTION__, mp->mnt_vfc->vfc_name, + behavior); + behavior = SECURITY_FS_USE_NONE; + break; + } + + if (mount_arg_label) { + mntsec = SLOT(mount_arg_label); + sbsec->sid = mntsec->sid; + } +} + +/* + * Initialize the SEBSD security server after the root partition has + * been mounted; policy is located on root partition. + */ +static void +sebsd_create_root_mount(struct ucred *cred, struct mount *mp, + struct label *mntlabel, struct label *fslabel) +{ + struct vnode *vp, *nvp; + + /* + * Go through all open vnodes and reload their labels. + */ + mtx_lock(&mntvnode_mtx); + vp = TAILQ_FIRST(&mp->mnt_nvnodelist); + do { + nvp = TAILQ_NEXT(vp, v_nmntvnodes); + VI_LOCK(vp); + mtx_unlock(&mntvnode_mtx); + vn_lock(vp, LK_INTERLOCK | LK_EXCLUSIVE | LK_RETRY, curthread); + (void)sebsd_associate_vnode_extattr(mp, fslabel, vp, + &vp->v_label); + VOP_UNLOCK(vp, 0, curthread); + mtx_lock(&mntvnode_mtx); + vp = nvp; + } while (vp != NULL); + mtx_unlock(&mntvnode_mtx); +} + +static int +sebsd_create_vnode_extattr(struct ucred *cred, struct mount *mp, + struct label *fslabel, struct vnode *parent, struct label *parentlabel, + struct vnode *child, struct label *childlabel, struct componentname *cnp) +{ + struct vnode_security_struct *dir, *vsec; + struct task_security_struct *task; + security_context_t context; + u_int32_t context_len; + security_id_t newsid; + int error; + int tclass; + + task = SLOT(&cred->cr_label); + dir = SLOT(parentlabel); + vsec = SLOT(childlabel); + tclass = vnode_type_to_security_class (child->v_type); + + error = security_transition_sid(task->sid, dir->sid, tclass, + &newsid); + if (error) + return (error); + + vsec->sid = newsid; + vsec->task_sid = task->sid; + vsec->sclass = tclass; + + /* store label in vnode */ + error = security_sid_to_context(vsec->sid, &context, + &context_len); + if (error) + return (error); + + error = vn_extattr_set(child, IO_NODELOCKED, + SEBSD_MAC_EXTATTR_NAMESPACE, + SEBSD_MAC_EXTATTR_NAME, + context_len, context, curthread); + + security_free_context(context); + return (error); +} + +static int +sebsd_check_cap (struct ucred *cred, cap_value_t capv) +{ + return cred_has_capability (cred, capv); +} + +/* + * SEBSD does not support the relabeling of processes without + * transitioning. + */ +static int +sebsd_check_cred_relabel(struct ucred *cred, struct label *newlabel) +{ + struct task_security_struct *nsec, *tsec; + + nsec = SLOT(newlabel); + tsec = SLOT(&cred->cr_label); + if (nsec != NULL && nsec->sid != tsec->sid) + return EPERM; + return 0; +} + +static int +sebsd_check_mount (struct ucred *cred, struct vnode *vp, struct label *vl, + const char *vfc_name, struct label *mntlabel) +{ + int rc; + security_id_t sid; + int behavior; + struct vnode_security_struct *vsec; + struct task_security_struct *task; + struct mount_security_struct *sbsec; + + vsec = SLOT(vl); + task = SLOT(&cred->cr_label); + + rc = vnode_has_perm (cred, vp, FILE__MOUNTON, NULL); + if (rc) + return rc; + + if (mntlabel) { + sbsec = SLOT(mntlabel); + sid = sbsec->sid; + + rc = avc_has_perm_ref_audit (task->sid, sid, SECCLASS_FILE, + COMMON_FILE__RELABELTO, NULL, NULL); + if (rc) + return rc; + } + else { + rc = security_fs_use (vfc_name, &behavior, &sid); + if (rc) + return rc; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Oct 10 19:08:05 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3A6BE16A4C0; Fri, 10 Oct 2003 19:08:05 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13F4216A4B3 for ; Fri, 10 Oct 2003 19:08:05 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBB6C43FE0 for ; Fri, 10 Oct 2003 19:08:03 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9B283XJ049321 for ; Fri, 10 Oct 2003 19:08:03 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9B283hC049318 for perforce@freebsd.org; Fri, 10 Oct 2003 19:08:03 -0700 (PDT) (envelope-from cvance@nailabs.com) Date: Fri, 10 Oct 2003 19:08:03 -0700 (PDT) Message-Id: <200310110208.h9B283hC049318@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@nailabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 39488 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2003 02:08:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=39488 Change 39488 by cvance@cvance_osx_laptop on 2003/10/10 19:07:26 Convince SEBSD "module" to build on Darwin. Please note: (build != run) Affected files ... .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/avc.c#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/avc.h#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/flask_types.h#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/linux-compat.h#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/sebsd.c#3 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/sebsd_syscall.c#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/sebsd_sysctl.c#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/context.h#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/ebitmap.h#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/global.h#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/init.c#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/queue.c#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/sidtab.c#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/sidtab.h#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/symtab.h#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/avc.c#2 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/avc.h#2 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/flask_types.h#2 (text+ko) ==== @@ -15,7 +15,7 @@ */ -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__APPLE__) #include #include #else /* __FreeBSD__ */ ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/linux-compat.h#2 (text+ko) ==== @@ -44,16 +44,19 @@ */ #include + +#ifdef __APPLE__ +#include +#else /* Probably FreeBSD */ #include +#endif typedef u_int64_t u64; typedef u_int32_t u32; typedef u_int16_t u16; typedef u_int8_t u8; - -#ifndef _KERNEL - +#if !defined(_KERNEL) && !defined(KERNEL) #if BYTE_ORDER == LITTLE_ENDIAN #define cpu_to_le32(x) ((__uint32_t)(x)) #define cpu_to_le64(x) ((__uint64_t)(x)) @@ -68,7 +71,7 @@ /* sebsd uses same ss source files for userspace */ -#define kmalloc(size,flags) malloc(size) +#define kmalloc(size,flags) malloc(size,as) #define kfree(v) free(v) #define __get_free_page(flags) malloc (4096) /* XXX need page size */ #define GFP_ATOMIC 1 @@ -76,8 +79,19 @@ #else /* _KERNEL */ +#ifdef __APPLE__ +#include +#if BYTE_ORDER == LITTLE_ENDIAN +#define le32_to_cpu(x) ((__uint32_t)(x)) +#define le64_to_cpu(x) ((__uint64_t)(x)) +#else /* BYTE_ORDER != LITTLE_ENDIAN */ +#define le32_to_cpu(x) NXSwapLittleLongToHost(x) +#define le64_to_cpu(x) NXSwapLittleLongLongToHost(x) +#endif +#else #define le32_to_cpu(a) le32toh(a) #define le64_to_cpu(a) le64toh(a) +#endif #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) @@ -91,16 +105,36 @@ /* kmalloc */ +#include + +#ifdef __APPLE__ +#define malloc(size,type,flags) _MALLOC(size,type,flags) +#define free(addr,type) FREE(addr,type) +#define M_SEBSD M_MACTEMP +#else +#ifndef _M_SEBSD_DEF +MALLOC_DECLARE(M_SEBSD); +#define _M_SEBSD_DEF +#endif +#endif /* __APPLE__ */ + #define kmalloc(size,flags) malloc(size, M_SEBSD, flags) #define kfree(v) free(v, M_SEBSD) -#define __get_free_page(flags) malloc (4096, M_SEBSD, flags) /* XXX need page size */ +/* XXX need page size */ +#define __get_free_page(flags) malloc(4096, M_SEBSD, flags) #define GFP_ATOMIC M_NOWAIT #define GFP_KERNEL M_NOWAIT -#include -#ifndef _M_SEBSD_DEF -MALLOC_DECLARE(M_SEBSD); -#define _M_SEBSD_DEF +#ifdef __APPLE__ +/* TBD: Skip this for now: */ +#define mtx_init(a,b,c,d) + +/* TBD: no boot-time tunable support yet */ +#define TUNABLE_INT_FETCH(str,var) + +/* TBD: scary, but skip locking for now */ +#define mtx_lock(m) +#define mtx_unlock(m) #endif /* spinlock */ ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/sebsd.c#3 (text+ko) ==== @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -47,16 +46,26 @@ #include #include #include -#include #include -#include #include -#include -#include +#ifdef __APPLE__ +/* + * The code is conditional upon the following list of defines. For now, + * Darwin does not provide support for them: + * CAPABILITIES + * HAS_THREADS + * HAS_PIPES + * HAS_EXTATTRS + * HAS_DEVFS_DIRENT + * HAS_VAPPEND + * HAS_IMAGE_PARAMS + * HAS_STRINGS + * HAS_ACLS + */ +#include +#endif -#include - #include #include @@ -64,10 +73,14 @@ int sebsd_verbose = 0; -static int slot; +static int slot = 1; /* TBD, dynamic */ #define SLOT(l) ((void *)LABEL_TO_SLOT((l), slot).l_ptr) +#ifdef __APPLE__ +#define M_SEBSD M_MACTEMP +#else MALLOC_DEFINE(M_SEBSD, "sebsd", "Security Enhanced BSD"); +#endif extern int ss_initialized; static __inline int ss_precondition(void) @@ -79,10 +92,12 @@ sebsd_init(struct mac_policy_conf *mpc) { printf("sebsd:: init\n"); +#if 0 avc_init(); if (security_init()) { panic("SEBSD: couldn't read policy file"); } +#endif } static void @@ -92,6 +107,7 @@ printf("sebsd:: destroy\n"); } +#ifdef CAPABILITIES /* * Check whether a task is allowed to use a capability. */ @@ -109,6 +125,7 @@ return avc_has_perm_audit(task->sid, task->sid, SECCLASS_CAPABILITY, cap, &ad); } +#endif static int cred_has_perm(struct ucred *cred, struct proc *proc, access_vector_t perm) @@ -158,6 +175,7 @@ SECCLASS_SECURITY, perm, NULL, NULL)); } +#ifdef HAS_THREADS int thread_has_system(struct thread *td, access_vector_t perm) { @@ -171,6 +189,7 @@ return (cred_has_security(td->td_proc->p_ucred, perm)); } +#endif static __inline security_class_t vnode_type_to_security_class(enum vtype vt) @@ -192,12 +211,17 @@ return SECCLASS_FIFO_FILE; case VNON: case VBAD: +#ifdef __APPLE__ + case VSTR: + case VCPLX: +#endif return SECCLASS_FILE; } return SECCLASS_FILE; } +#ifdef HAS_DEVFS_DIRENT static __inline security_class_t dirent_type_to_security_class(__uint8_t type) { @@ -223,6 +247,7 @@ return SECCLASS_FILE; } +#endif static __inline access_vector_t file_mask_to_av(enum vtype vt, int mask) @@ -235,10 +260,13 @@ if (mask & VREAD) av |= FILE__READ; +#ifdef HAS_VAPPEND if (mask & VAPPEND) av |= FILE__APPEND; - else if (mask & VWRITE) - av |= FILE__WRITE; + else +#endif + if (mask & VWRITE) + av |= FILE__WRITE; } else { if (mask & VEXEC) @@ -266,6 +294,7 @@ AVC_AUDIT_DATA_INIT(&ad, FS); ad.u.fs.vp = vp; +#if 0 if (file->sclass == 0) { struct vattr va; VOP_GETATTR(vp, &va, curthread->td_ucred, curthread); @@ -278,10 +307,12 @@ return 1; /* TBD: debugging */ } } +#endif return avc_has_perm_ref_audit(task->sid, file->sid, file->sclass, perm, aeref ? aeref : &file->avcr, &ad); } +#ifdef HAS_PIPES static int pipe_has_perm(struct ucred *cred, struct pipe *pipe, access_vector_t perm) { @@ -298,6 +329,7 @@ return(avc_has_perm_ref(task->sid, file->sid, file->sclass, perm, &file->avcr)); } +#endif static void sebsd_init_cred_label(struct label *label) @@ -392,6 +424,7 @@ printf("sebsd_relabel_cred:: This does nothing\n"); } +#ifdef HAS_DEVFS_DIRENT static void sebsd_associate_vnode_devfs(struct mount *mp, struct label *fslabel, struct devfs_dirent *de, struct label *delabel, struct vnode *vp, @@ -414,7 +447,9 @@ * relabel calls. */ } +#endif +#ifdef HAS_EXTATTRS static int sebsd_associate_vnode_extattr(struct mount *mp, struct label *fslabel, struct vnode *vp, struct label *vlabel) @@ -474,6 +509,7 @@ return (0); } +#endif static void sebsd_associate_vnode_singlelabel(struct mount *mp, struct label *fslabel, @@ -520,6 +556,7 @@ fsec->sid = tsec->sid; } +#ifdef HAS_DEVFS_DIRENT static void sebsd_create_devfs_device(struct ucred *cr, struct mount *mp, dev_t dev, struct devfs_dirent *devfs_dirent, struct label *label, @@ -652,7 +689,9 @@ } free(path, M_SEBSD); } +#endif /* HAS_DEVFS_DIRENT */ +#ifdef HAS_PIPES /* * Use the allocating task SID to label pipes. On Linux, pipes reside * in a pseudo filesystem. @@ -670,6 +709,7 @@ vsec->sid = vsec->task_sid = tsec->sid; vsec->sclass = SECCLASS_FIFO_FILE; } +#endif static void sebsd_create_proc0(struct ucred *cred) @@ -778,6 +818,7 @@ sebsd_create_root_mount(struct ucred *cred, struct mount *mp, struct label *mntlabel, struct label *fslabel) { +#if 0 struct vnode *vp, *nvp; /* @@ -797,8 +838,10 @@ vp = nvp; } while (vp != NULL); mtx_unlock(&mntvnode_mtx); +#endif } +#ifdef HAS_EXTATTRS static int sebsd_create_vnode_extattr(struct ucred *cred, struct mount *mp, struct label *fslabel, struct vnode *parent, struct label *parentlabel, @@ -840,12 +883,16 @@ security_free_context(context); return (error); } +#endif +#ifdef CAPABILITIES static int sebsd_check_cap (struct ucred *cred, cap_value_t capv) { + return cred_has_capability (cred, capv); } +#endif /* * SEBSD does not support the relabeling of processes without @@ -932,6 +979,7 @@ return (mount_has_perm(cred, mp, FILESYSTEM__UNMOUNT, NULL)); } +#ifdef HAS_PIPES static int sebsd_check_pipe_ioctl(struct ucred *cred, struct pipe *pipe, struct label *pipelabel, unsigned long cmd, void /* caddr_t */ *data) @@ -1004,6 +1052,7 @@ return (pipe_has_perm(cred, pipe, FIFO_FILE__WRITE)); } +#endif /* HAS_PIPES */ static int sebsd_check_proc_debug(struct ucred *cred, struct proc *proc) @@ -1042,6 +1091,7 @@ return (cred_has_perm(cred, proc, perm)); } +#ifdef HAS_IMAGE_PARAMS static void sebsd_execve_transition(struct ucred *old, struct ucred *new, struct vnode *vp, struct label *vnodelabel, struct label *interpvnodelabel, @@ -1111,7 +1161,9 @@ return (newsid != task->sid); } +#endif +#ifdef HAS_STRING static int sebsd_internalize_sid(security_id_t *sidp, char *element_name, char *element_data, int *claimed) @@ -1174,7 +1226,9 @@ return (sebsd_internalize_sid(&vsec->sid, element_name, element_data, claimed)); } +#endif /* HAS_STRINGS */ +#ifdef HAS_PIPES static void sebsd_relabel_pipe(struct ucred *cred, struct pipe *pipe, struct label *pipelabel, struct label *newlabel) @@ -1195,6 +1249,7 @@ dest->sid = source->sid; } +#endif static void sebsd_relabel_vnode(struct ucred *cred, struct vnode *vp, @@ -1217,6 +1272,7 @@ dest->sid = source->sid; } +#ifdef HAS_EXTATTRS static int sebsd_setlabel_vnode_extattr(struct ucred *cred, struct vnode *vp, struct label *vlabel, struct label *intlabel) @@ -1240,6 +1296,7 @@ security_free_context(context); return (error); } +#endif static int sebsd_check_vnode_access(struct ucred *cred, struct vnode *vp, @@ -1353,6 +1410,7 @@ return (rc); } +#ifdef HAS_ACLS static int sebsd_check_vnode_deleteacl(struct ucred *cred, struct vnode *vp, struct label *label, acl_type_t type) @@ -1360,7 +1418,9 @@ return (vnode_has_perm(cred, vp, FILE__SETATTR, NULL)); } +#endif +#ifdef HAS_IMAGE_PARAMS static int sebsd_check_vnode_exec(struct ucred *cred, struct vnode *vp, struct label *label, struct image_params *imgp, struct label *execlabel) @@ -1422,7 +1482,9 @@ return (0); } +#endif +#ifdef HAS_ACLS static int sebsd_check_vnode_getacl(struct ucred *cred, struct vnode *vp, struct label *label, acl_type_t type) @@ -1430,7 +1492,9 @@ return (vnode_has_perm(cred, vp, FILE__GETATTR, NULL)); } +#endif +#ifdef HAS_EXTATTRS static int sebsd_check_vnode_getextattr(struct ucred *cred, struct vnode *vp, struct label *label, int attrnamespace, const char *name, struct uio *uio) @@ -1438,6 +1502,7 @@ return (vnode_has_perm(cred, vp, FILE__GETATTR, NULL)); } +#endif static int sebsd_check_vnode_link(struct ucred *cred, struct vnode *dvp, @@ -1673,6 +1738,7 @@ return 0; } +#ifdef HAS_ACLS static int sebsd_check_vnode_setacl(struct ucred *cred, struct vnode *vp, struct label *label, acl_type_t type, struct acl *acl) @@ -1680,7 +1746,9 @@ return vnode_has_perm(cred, vp, FILE__SETATTR, NULL); } +#endif +#ifdef HAS_EXTATTRS static int sebsd_check_vnode_setextattr(struct ucred *cred, struct vnode *vp, struct label *label, int attrnamespace, const char *name, struct uio *uio) @@ -1688,6 +1756,7 @@ return vnode_has_perm(cred, vp, FILE__SETATTR, NULL); } +#endif static int sebsd_check_vnode_setflags(struct ucred *cred, struct vnode *vp, @@ -1804,6 +1873,7 @@ return (0); } +#ifdef HAS_STRINGS static int sebsd_externalize_sid(security_id_t sid, char *element_name, struct sbuf *sb, int *claimed) @@ -1866,6 +1936,7 @@ nsec = SLOT(label); return (sebsd_externalize_sid(nsec->sid, element_name, sb, claimed)); } +#endif /* HAS_STRINGS */ static void sebsd_copy_vnode_label(struct label *src, struct label *dest) @@ -1977,18 +2048,25 @@ } static struct mac_policy_ops sebsd_ops = { + .mpo_init = sebsd_init +}; + +static struct mac_policy_ops sebsd_ops_o = { /* Init Labels */ - .mpo_init = sebsd_init, .mpo_init_bpfdesc_label = sebsd_init_network_label, .mpo_init_cred_label = sebsd_init_cred_label, +#if 0 .mpo_init_devfsdirent_label = sebsd_init_vnode_label, .mpo_init_file_label = sebsd_init_file_label, +#endif .mpo_init_ifnet_label = sebsd_init_network_label, .mpo_init_ipq_label = sebsd_init_network_label_waitcheck, .mpo_init_mbuf_label = sebsd_init_network_label_waitcheck, .mpo_init_mount_label = sebsd_init_mount_label, .mpo_init_mount_fs_label = sebsd_init_mount_fs_label, +#ifdef HAS_PIPES .mpo_init_pipe_label = sebsd_init_vnode_label, +#endif .mpo_init_socket_label = sebsd_init_network_label_waitcheck, .mpo_init_socket_peer_label = sebsd_init_network_label_waitcheck, .mpo_init_vnode_label = sebsd_init_vnode_label, @@ -1997,37 +2075,53 @@ .mpo_destroy = sebsd_destroy, .mpo_destroy_bpfdesc_label = sebsd_destroy_label, .mpo_destroy_cred_label = sebsd_destroy_label, +#ifdef HAS_DEVFS_DIRENT .mpo_destroy_devfsdirent_label = sebsd_destroy_label, +#endif .mpo_destroy_ifnet_label = sebsd_destroy_label, .mpo_destroy_ipq_label = sebsd_destroy_label, .mpo_destroy_mbuf_label = sebsd_destroy_label, +#if 0 .mpo_destroy_file_label = sebsd_destroy_label, +#endif .mpo_destroy_mount_label = sebsd_destroy_label, .mpo_destroy_mount_fs_label = sebsd_destroy_label, +#ifdef HAS_PIPES .mpo_destroy_pipe_label = sebsd_destroy_label, +#endif .mpo_destroy_socket_label = sebsd_destroy_label, .mpo_destroy_socket_peer_label = sebsd_destroy_label, .mpo_destroy_vnode_label = sebsd_destroy_label, /* Copy labels */ +#ifdef HAS_PIPES .mpo_copy_pipe_label = sebsd_copy_vnode_label, +#endif .mpo_copy_vnode_label = sebsd_copy_vnode_label, +#if 0 .mpo_copy_mount_label = sebsd_copy_mount_label, +#endif +#if 0 /* In/Out */ .mpo_externalize_cred_label = sebsd_externalize_cred_label, .mpo_externalize_ifnet_label = sebsd_externalize_network_label, +#ifdef HAS_PIPES .mpo_externalize_pipe_label = sebsd_externalize_vnode_label, +#endif .mpo_externalize_socket_label = sebsd_externalize_network_label, .mpo_externalize_socket_peer_label = sebsd_externalize_network_label, .mpo_externalize_vnode_label = sebsd_externalize_vnode_label, .mpo_externalize_mount_label = sebsd_externalize_mount_label, .mpo_internalize_cred_label = sebsd_internalize_cred_label, .mpo_internalize_ifnet_label = sebsd_internalize_network_label, +#ifdef HAS_PIPES .mpo_internalize_pipe_label = sebsd_internalize_vnode_label, +#endif .mpo_internalize_socket_label = sebsd_internalize_network_label, .mpo_internalize_vnode_label = sebsd_internalize_vnode_label, .mpo_internalize_mount_label = sebsd_internalize_mount_label, +#endif #ifdef notdef void (*mpo_create_mbuf_from_socket)(struct socket *so, @@ -2050,33 +2144,51 @@ /* Create Labels */ .mpo_create_cred = sebsd_create_cred, + +#ifdef HAS_DEVFS_DIRENT .mpo_create_devfs_device = sebsd_create_devfs_device, .mpo_create_devfs_directory = sebsd_create_devfs_directory, .mpo_create_devfs_symlink = sebsd_create_devfs_symlink, +#endif +#if 0 .mpo_create_file = sebsd_create_file, +#endif /* .mpo_create_mbuf_from_socket = sebsd_create_mbuf_from_socket, */ .mpo_create_mount = sebsd_create_mount, +#ifdef HAS_PIPES .mpo_create_pipe = sebsd_create_pipe, +#endif .mpo_create_proc0 = sebsd_create_proc0, .mpo_create_proc1 = sebsd_create_proc1, .mpo_create_root_mount = sebsd_create_root_mount, /* .mpo_create_socket = sebsd_create_socket, */ /* .mpo_create_socket_from_socket = sebsd_create_socket_from_socket, */ +#ifdef HAS_EXTATTRS .mpo_create_vnode_extattr = sebsd_create_vnode_extattr, +#endif +#ifdef HAS_DEVFS_DIRENT .mpo_associate_vnode_devfs = sebsd_associate_vnode_devfs, +#endif .mpo_associate_vnode_singlelabel = sebsd_associate_vnode_singlelabel, +#ifdef HAS_EXTATTRS .mpo_associate_vnode_extattr = sebsd_associate_vnode_extattr, +#endif /* Check Labels */ +#ifdef CAPABILITIES .mpo_check_cap = sebsd_check_cap, +#endif .mpo_check_cred_relabel = sebsd_check_cred_relabel, +#if 0 .mpo_check_file_create = sebsd_check_file_create, + /* .mpo_check_file_dup .mpo_check_file_inherit .mpo_check_file_ioctl .mpo_check_file_receive */ + .mpo_check_file_get_flags = sebsd_check_file_get_flags, .mpo_check_file_get_ofileflags = sebsd_check_file_get_ofileflags, .mpo_check_file_get_offset = sebsd_check_file_get_offset, @@ -2087,13 +2199,16 @@ .mpo_check_umount = sebsd_check_umount, .mpo_check_remount = sebsd_check_remount, .mpo_check_mount_stat = sebsd_check_mount_stat, +#endif +#ifdef HAS_PIPES .mpo_check_pipe_ioctl = sebsd_check_pipe_ioctl, .mpo_check_pipe_poll = sebsd_check_pipe_poll, .mpo_check_pipe_read = sebsd_check_pipe_read, .mpo_check_pipe_relabel = sebsd_check_pipe_relabel, .mpo_check_pipe_stat = sebsd_check_pipe_stat, .mpo_check_pipe_write = sebsd_check_pipe_write, +#endif .mpo_check_proc_debug = sebsd_check_proc_debug, .mpo_check_proc_sched = sebsd_check_proc_sched, @@ -2107,10 +2222,18 @@ .mpo_check_vnode_chroot = sebsd_check_vnode_chroot, .mpo_check_vnode_create = sebsd_check_vnode_create, .mpo_check_vnode_delete = sebsd_check_vnode_delete, +#ifdef HAS_ACLS .mpo_check_vnode_deleteacl = sebsd_check_vnode_deleteacl, +#endif +#ifdef HAS_IMAGE_PARAMS .mpo_check_vnode_exec = sebsd_check_vnode_exec, +#endif +#ifdef HAS_ACLS .mpo_check_vnode_getacl = sebsd_check_vnode_getacl, +#endif +#ifdef EXTATTR .mpo_check_vnode_getextattr = sebsd_check_vnode_getextattr, +#endif .mpo_check_vnode_link = sebsd_check_vnode_link, .mpo_check_vnode_lookup = sebsd_check_vnode_lookup, .mpo_check_vnode_mmap = sebsd_check_vnode_mmap, @@ -2124,8 +2247,12 @@ .mpo_check_vnode_rename_from = sebsd_check_vnode_rename_from, .mpo_check_vnode_rename_to = sebsd_check_vnode_rename_to, .mpo_check_vnode_revoke = sebsd_check_vnode_revoke, +#ifdef HAS_ACLS .mpo_check_vnode_setacl = sebsd_check_vnode_setacl, +#endif +#ifdef HAS_EXTATTRS .mpo_check_vnode_setextattr = sebsd_check_vnode_setextattr, +#endif .mpo_check_vnode_setflags = sebsd_check_vnode_setflags, .mpo_check_vnode_setmode = sebsd_check_vnode_setmode, .mpo_check_vnode_setowner = sebsd_check_vnode_setowner, @@ -2134,18 +2261,37 @@ .mpo_check_vnode_write = sebsd_check_vnode_write, /* Misc */ +#ifdef HAS_IMAGE_PARAMS .mpo_execve_transition = sebsd_execve_transition, .mpo_execve_will_transition = sebsd_execve_will_transition, +#endif .mpo_relabel_cred = sebsd_relabel_cred, +#ifdef HAS_PIPES .mpo_relabel_pipe = sebsd_relabel_pipe, +#endif /* .mpo_relabel_socket = sebsd_relabel_socket, */ .mpo_relabel_vnode = sebsd_relabel_vnode, +#ifdef HAS_EXTATTRS .mpo_setlabel_vnode_extattr = sebsd_setlabel_vnode_extattr, +#endif /*.mpo_set_socket_peer_from_mbuf = sebsd_set_socket_peer_from_mbuf,*/ /*.mpo_set_socket_peer_from_socket = sebsd_set_socket_peer_from_socket,*/ +#if 0 .mpo_syscall = sebsd_syscall, +#endif }; +#if 0 MAC_POLICY_SET(&sebsd_ops, sebsd, "NSA/NAI Labs Security Enhanced BSD", MPC_LOADTIME_FLAG_NOTLATE, &slot); +#endif + +struct mac_policy_conf sebsd_mac_policy_conf = { + "sebsd", /* policy name */ + "NSA/NAI Labs Security Enhanced BSD", /* full name */ + &sebsd_ops, /* policy operations */ + 0, /* loadtime flags*/ + 1, /* security field */ + 0 /* runtime flags */ +}; ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/sebsd_syscall.c#2 (text+ko) ==== @@ -34,6 +34,7 @@ * $FreeBSD$ */ +#if 0 #include #include #include @@ -91,3 +92,4 @@ return err; } +#endif /* 0 */ ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/sebsd_sysctl.c#2 (text+ko) ==== @@ -34,6 +34,7 @@ * $FreeBSD$ */ +#if 0 #include #include #include @@ -320,3 +321,4 @@ "SEBSD access vector decision query"); SYSCTL_PROC(_security_mac_sebsd, OID_AUTO, enforcing, CTLTYPE_INT | CTLFLAG_RW, NULL, 0, sysctl_sebsd_enforcing, "I", "SEBSD avc enforcement"); +#endif /* 0 */ ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/context.h#2 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/ebitmap.h#2 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/global.h#2 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/init.c#2 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/queue.c#2 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/sidtab.c#2 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/sidtab.h#2 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/symtab.h#2 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Fri Oct 10 19:13:12 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BF16416A4C1; Fri, 10 Oct 2003 19:13:11 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A0A516A4B3 for ; Fri, 10 Oct 2003 19:13:11 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D686443FCB for ; Fri, 10 Oct 2003 19:13:10 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9B2DAXJ049906 for ; Fri, 10 Oct 2003 19:13:10 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9B2DAlu049903 for perforce@freebsd.org; Fri, 10 Oct 2003 19:13:10 -0700 (PDT) (envelope-from cvance@nailabs.com) Date: Fri, 10 Oct 2003 19:13:10 -0700 (PDT) Message-Id: <200310110213.h9B2DAlu049903@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@nailabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 39489 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2003 02:13:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=39489 Change 39489 by cvance@cvance_osx_laptop on 2003/10/10 19:12:45 Add Makefiles for sebsd subdirectories Update Makefiles for SEBSD Affected files ... .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/conf/Makefile.template#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/conf/files#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/avc/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/sebsd/ss/Makefile#1 add Differences ... ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/Makefile#2 (text+ko) ==== ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/conf/Makefile.template#2 (text+ko) ==== @@ -11,9 +11,9 @@ export IDENT # -# XXX: INCFLAGS to include libsa prototypes +# INCFLAGS to include security prototypes # -INCFLAGS_MAKEFILE= -I$(SOURCE)libsa +INCFLAGS_MAKEFILE= -I$(SOURCE) -I$(SOURCE)/.. export MakeInc_cmd=${SRCROOT}/makedefs/MakeInc.cmd export MakeInc_def=${SRCROOT}/makedefs/MakeInc.def ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/conf/files#2 (text+ko) ==== @@ -4,5 +4,18 @@ # security -security/mac_test/test.c standard -security/sebsd/sebsd.c standard +security/mac_test/mac_test.c standard +security/sebsd/sebsd.c standard +security/sebsd/sebsd_syscall.c standard +security/sebsd/sebsd_sysctl.c standard +security/sebsd/avc/avc.c standard +security/sebsd/ss/avtab.c standard +security/sebsd/ss/ebitmap.c standard +security/sebsd/ss/hashtab.c standard +security/sebsd/ss/init.c standard +security/sebsd/ss/policydb.c standard +security/sebsd/ss/queue.c standard +security/sebsd/ss/services.c standard +security/sebsd/ss/sidtab.c standard +security/sebsd/ss/symtab.c standard +security/sebsd/ss/fileutils.c standard From owner-p4-projects@FreeBSD.ORG Fri Oct 10 19:14:13 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8F1CE16A4C0; Fri, 10 Oct 2003 19:14:13 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 697C216A4B3 for ; Fri, 10 Oct 2003 19:14:13 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D558A43FBD for ; Fri, 10 Oct 2003 19:14:12 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9B2ECXJ050043 for ; Fri, 10 Oct 2003 19:14:12 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9B2EC2Z050040 for perforce@freebsd.org; Fri, 10 Oct 2003 19:14:12 -0700 (PDT) (envelope-from cvance@nailabs.com) Date: Fri, 10 Oct 2003 19:14:12 -0700 (PDT) Message-Id: <200310110214.h9B2EC2Z050040@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@nailabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 39490 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2003 02:14:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=39490 Change 39490 by cvance@cvance_osx_laptop on 2003/10/10 19:13:53 Add real mac_test module instead of the dummy placeholder. Affected files ... .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/mac_test/mac_test.c#1 add .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/security/mac_test/test.c#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Fri Oct 10 19:15:15 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 819BF16A4C0; Fri, 10 Oct 2003 19:15:15 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5CBF016A4B3 for ; Fri, 10 Oct 2003 19:15:15 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC12743FBD for ; Fri, 10 Oct 2003 19:15:14 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9B2FEXJ050111 for ; Fri, 10 Oct 2003 19:15:14 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9B2FERe050108 for perforce@freebsd.org; Fri, 10 Oct 2003 19:15:14 -0700 (PDT) (envelope-from cvance@nailabs.com) Date: Fri, 10 Oct 2003 19:15:14 -0700 (PDT) Message-Id: <200310110215.h9B2FERe050108@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@nailabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 39491 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2003 02:15:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=39491 Change 39491 by cvance@cvance_osx_laptop on 2003/10/10 19:14:46 Add security directory to the component list Affected files ... .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/makedefs/MakeInc.def#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/makedefs/MakeInc.def#2 (text+ko) ==== @@ -28,7 +28,7 @@ # Component List # ifndef COMPONENT_LIST -export COMPONENT_LIST = osfmk bsd iokit pexpert libkern libsa +export COMPONENT_LIST = osfmk bsd iokit pexpert libkern libsa security export COMPONENT_LIST_UC := $(shell echo -n $(COMPONENT_LIST) | $(TR) a-z A-Z) endif ifndef COMPONENT From owner-p4-projects@FreeBSD.ORG Fri Oct 10 19:16:17 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8A06216A4C0; Fri, 10 Oct 2003 19:16:17 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6404E16A4B3 for ; Fri, 10 Oct 2003 19:16:17 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCBA743FBD for ; Fri, 10 Oct 2003 19:16:16 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9B2GGXJ050235 for ; Fri, 10 Oct 2003 19:16:16 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9B2GGFi050232 for perforce@freebsd.org; Fri, 10 Oct 2003 19:16:16 -0700 (PDT) (envelope-from cvance@nailabs.com) Date: Fri, 10 Oct 2003 19:16:16 -0700 (PDT) Message-Id: <200310110216.h9B2GGFi050232@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@nailabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 39492 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2003 02:16:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=39492 Change 39492 by cvance@cvance_osx_laptop on 2003/10/10 19:15:30 Missed another Makefile, add security to the list of build components Affected files ... .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/Makefile#3 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/Makefile#3 (text+ko) ==== @@ -52,7 +52,8 @@ iokit \ osfmk \ bsd \ - config + config \ + security INSTALL_FILE_LIST= \ mach_kernel From owner-p4-projects@FreeBSD.ORG Fri Oct 10 19:19:22 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5C99616A4C0; Fri, 10 Oct 2003 19:19:22 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2196616A4B3 for ; Fri, 10 Oct 2003 19:19:22 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FAB443F85 for ; Fri, 10 Oct 2003 19:19:21 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9B2JLXJ050292 for ; Fri, 10 Oct 2003 19:19:21 -0700 (PDT) (envelope-from cvance@nailabs.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9B2JKGR050289 for perforce@freebsd.org; Fri, 10 Oct 2003 19:19:20 -0700 (PDT) (envelope-from cvance@nailabs.com) Date: Fri, 10 Oct 2003 19:19:20 -0700 (PDT) Message-Id: <200310110219.h9B2JKGR050289@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cvance@nailabs.com using -f From: Chris Vance To: Perforce Change Reviews Subject: PERFORCE change 39493 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2003 02:19:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=39493 Change 39493 by cvance@cvance_osx_laptop on 2003/10/10 19:18:22 Update MAC framework: - Add "module" registration - Add some additional process hooks - Add some vnode hooks This is a work in progress, so the framework is unstable (at best) and major pieces are ifdef'd out (including the MAC_CHECK macro) Affected files ... .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/bsd_init.c#4 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/kern_exit.c#3 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/kern_fork.c#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/kern_mac.c#18 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/sys/namei.h#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/vfs/vfs_lookup.c#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/vfs/vfs_subr.c#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/vfs/vfs_syscalls.c#2 edit .. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/vfs/vfs_vnops.c#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/bsd_init.c#4 (text+ko) ==== @@ -351,7 +351,7 @@ p->p_ucred->cr_ngroups = 1; /* group 0 */ #ifdef MAC -/* mac_create_proc0(kernproc->p_ucred); */ + mac_create_proc0(p->p_ucred); #endif /* Create the file descriptor table. */ @@ -575,6 +575,9 @@ init_task_failure_data[0] = 0; shared_region_mapping_ref(system_shared_region); vm_set_shared_region(get_threadtask(th_act), system_shared_region); +#ifdef MAC + mac_create_proc1(p->p_ucred); +#endif load_init_program(p); /* turn on app-profiling i.e. pre-heating */ app_profile = 1; ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/kern_exit.c#3 (text+ko) ==== @@ -660,6 +660,9 @@ if (tvp) vrele(tvp); +#ifdef MAC + mac_destroy_proc(p); +#endif /* * Finally finished with old proc entry. * Unlink it from its process group and free it. ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/kern_fork.c#2 (text+ko) ==== @@ -358,7 +358,6 @@ p2 = (struct proc *)forkproc(p1,lock); - th = procdup(p2, p1); /* child, parent */ LIST_INSERT_AFTER(p1, p2, p_pglist); @@ -395,6 +394,10 @@ MALLOC_ZONE(newproc->p_sigacts, struct sigacts *, sizeof *newproc->p_sigacts, M_SUBPROC, M_WAITOK); +#ifdef MAC + mac_init_proc(newproc); +#endif + /* * Find an unused process ID. We remember a range of unused IDs * ready to use (from nextpid+1 through pidchecked-1). ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/kern_mac.c#18 (text+ko) ==== @@ -93,9 +93,12 @@ #define PROC_LOCK_ASSERT(x, y) #define M_ASSERTPKTHDR(x) +#if 0 #define ASSERT_VOP_LOCKED(vp,msg) \ if (vp && !VOP_ISLOCKED(vp)) \ - Debugger("vnode lock violation.\n"); + printf("Error: vnode lock violation.\n"); +#endif +#define ASSERT_VOP_LOCKED(vp,msg) #define atomic_add_int(P, V) (*(u_int*)(P) += (V)) #define atomic_subtract_int(P, V) (*(u_int*)(P) -= (V)) @@ -367,7 +370,11 @@ * request. Note that it returns its value via 'error' in the scope * of the caller. */ -#define MAC_CHECK(check, args...) do { \ +#define MAC_CHECK(check, args...) do { \ + error = 0; \ +} while (0) + +#define oMAC_CHECK(check, args...) do { \ struct mac_policy_conf *mpc; \ int entrycount; \ \ @@ -506,6 +513,15 @@ } \ } while (0) + +static void +mac_register_module(struct mac_policy_conf *mpconf) +{ + + printf("MAC Framework registering policy: %s\n", mpconf->mpc_name); +} + + /* * Initialize the MAC subsystem, including appropriate SMP locks. */ @@ -549,6 +565,7 @@ sysctl_register_oid(&sysctl__security_mac_debug_counters_vnodes); sysctl_register_oid(&sysctl__security_mac_debug_counters_devfsdirents); #endif + printf("MAC Framework successfully initialized\n"); } /* @@ -559,6 +576,13 @@ void mac_late_init(void) { + extern struct mac_policy_conf test_mac_policy_conf; + extern struct mac_policy_conf sebsd_mac_policy_conf; + + printf("MAC: init mac_test\n"); + mac_policy_register(&test_mac_policy_conf); + printf("MAC: init sebsd\n"); + mac_register_module(&sebsd_mac_policy_conf); mac_late = 1; } @@ -1384,12 +1408,17 @@ mac_create_proc0(struct ucred *cred) { -/* MAC_PERFORM(create_proc0, cred); */ + MAC_PERFORM(create_proc0, cred); } /* * Initialize MAC label for the first userland process, from which other * userland processes and threads are spawned. + * + * On Darwin, proc0 forks and the child process becomes init, though + * indirectly. The kernel starts /sbin/mach_init, which subsequently + * forks and the *parent* execs /sbin/init. This leaves proc1 as + * /sbin/init and proc2 as /sbin/mach_init. */ void mac_create_proc1(struct ucred *cred) @@ -1772,12 +1801,17 @@ struct componentname *cnp) { int error; + static int count = 0; + if (++count < 100) + printf("MAC:mac_check_vnode_lookup\n"); + ASSERT_VOP_LOCKED(dvp, "mac_check_vnode_lookup"); if (!mac_enforce_fs) return (0); + MAC_CHECK(check_vnode_lookup, cred, dvp, &dvp->v_label, cnp); return (error); } ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/sys/namei.h#2 (text+ko) ==== @@ -166,6 +166,7 @@ #define ISWHITEOUT 0x020000 /* found whiteout */ #define DOWHITEOUT 0x040000 /* do whiteouts */ #define WILLBEDIR 0x080000 /* new files will be dirs; allow trailing / */ +#define NOMACCHECK 0x100000 /* do not perform MAC checks */ #define NODELETEBUSY 0x800000 /* donot delete busy files (Carbon semantic) */ #define PARAMASK 0x0fff00 /* mask of parameter descriptors */ /* ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/vfs/vfs_lookup.c#2 (text+ko) ==== @@ -199,6 +199,18 @@ error = ELOOP; break; } +#ifdef MAC + if ((cnp->cn_flags & NOMACCHECK) == 0) { + if (p) { + error = mac_check_vnode_readlink(p->p_ucred, + ndp->ni_vp); + if (error) + break; + } else { + printf("mac_check_vnode_readlink: NULL process!\n"); + } + } +#endif if (ndp->ni_pathlen > 1) { MALLOC_ZONE(cp, char *, MAXPATHLEN, M_NAMEI, M_WAITOK); } else { @@ -443,6 +455,19 @@ * We now have a segment name to search for, and a directory to search. */ unionlookup: +#ifdef MAC + if ((cnp->cn_flags & NOMACCHECK) == 0) { + if (p) { + error = mac_check_vnode_lookup(p->p_ucred, dp, cnp); + if (error) { + printf("MAC_check_vnode_lookup: failed with error %d!\n", error); +/* goto bad; */ + } + } else { + printf("MAC_check_vnode_lookup: NULL process!\n"); + } + } +#endif ndp->ni_dvp = dp; ndp->ni_vp = NULL; if (error = VOP_LOOKUP(dp, &ndp->ni_vp, cnp)) { ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/vfs/vfs_subr.c#2 (text+ko) ==== @@ -588,6 +588,9 @@ else vp->v_ubcinfo = 0; +#ifdef MAC + mac_destroy_vnode(vp); +#endif vp->v_lastr = -1; vp->v_ralen = 0; vp->v_maxra = 0; @@ -602,6 +605,17 @@ vp->v_type = VNON; vp->v_tag = tag; vp->v_op = vops; +#ifdef MAC + mac_init_vnode(vp); + /* + * NULL mp indicates that this vnode is being used for the + * mount device for the root file system. + */ + if (mp != NULL && (mp->mnt_flag & MNT_MULTILABEL) == 0) + mac_associate_vnode_singlelabel(mp, vp); + else if (mp == NULL) + printf("NULL mp in getnewvnode()\n"); +#endif insmntque(vp, mp); *vpp = vp; vp->v_usecount = 1; ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/vfs/vfs_syscalls.c#2 (text+ko) ==== @@ -867,6 +867,10 @@ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); if (vp->v_type != VDIR) error = ENOTDIR; +#ifdef MAC + else if ((error = mac_check_vnode_chdir(p->p_ucred, vp)) != 0) { + } +#endif else error = VOP_ACCESS(vp, VEXEC, p->p_ucred, p); while (!error && (mp = vp->v_mountedhere) != NULL) { @@ -944,7 +948,10 @@ uap->path, p); if (error = change_dir(&nd, p)) return (error); - +#ifdef MAC + if (error = mac_check_vnode_chroot(p->p_ucred, nd.ni_vp)) + return error; +#endif if(p->p_flag & P_NOSHLIB) { shared_regions_active = FALSE; } else { @@ -1248,6 +1255,11 @@ VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE); VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE); +#ifdef MAC + error = mac_check_vnode_link(p->p_ucred, + nd.ni_dvp, vp, &nd.ni_cnd); + if (error == 0) +#endif error = VOP_LINK(vp, nd.ni_dvp, &nd.ni_cnd); } else { VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd); @@ -1551,6 +1563,9 @@ if ((flags & VWRITE) == 0 || (error = vn_writechk(vp)) == 0) error = VOP_ACCESS(vp, flags, cred, p); } +#ifdef MAC + error = mac_check_vnode_access(cred, vp, flags); +#endif vput(vp); out1: cred->cr_uid = t_uid; @@ -1826,6 +1841,13 @@ if (error = namei(&nd)) return (error); vp = nd.ni_vp; +#ifdef MAC + error = mac_check_vnode_readlink(p->p_ucred, vp); + if (error) { + vput(vp); + return (error); + } +#endif if (vp->v_type != VLNK) error = EINVAL; else { @@ -1872,6 +1894,10 @@ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); VATTR_NULL(&vattr); vattr.va_flags = uap->flags; +#ifdef MAC + error = mac_check_vnode_setflags(p->p_ucred, vp, vattr.va_flags); + if (error == 0) +#endif error = VOP_SETATTR(vp, &vattr, p->p_ucred, p); vput(vp); return (error); @@ -1903,6 +1929,10 @@ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); VATTR_NULL(&vattr); vattr.va_flags = uap->flags; +#ifdef MAC + error = mac_check_vnode_setflags(p->p_ucred, vp, vattr.va_flags); + if (error == 0) +#endif error = VOP_SETATTR(vp, &vattr, p->p_ucred, p); VOP_UNLOCK(vp, 0, p); return (error); @@ -2011,6 +2041,11 @@ VATTR_NULL(&vattr); vattr.va_uid = uap->uid; vattr.va_gid = uap->gid; +#ifdef MAC + error = mac_check_vnode_setowner(p->p_ucred, vp, vattr.va_uid, + vattr.va_gid); + if (error == 0) +#endif error = VOP_SETATTR(vp, &vattr, p->p_ucred, p); vput(vp); return (error); @@ -2044,6 +2079,11 @@ VATTR_NULL(&vattr); vattr.va_uid = uap->uid; vattr.va_gid = uap->gid; +#ifdef MAC + error = mac_check_vnode_setowner(p->p_ucred, vp, vattr.va_uid, + vattr.va_gid); + if (error == 0) +#endif error = VOP_SETATTR(vp, &vattr, p->p_ucred, p); VOP_UNLOCK(vp, 0, p); return (error); @@ -2089,6 +2129,11 @@ vattr.va_mtime = ts[1]; if (nullflag) vattr.va_vaflags |= VA_UTIMES_NULL; +#ifdef MAC + error = mac_check_vnode_setutimes(p->p_ucred, vp, vattr.va_atime, + vattr.va_mtime); + if (error == 0) +#endif error = VOP_SETATTR(vp, &vattr, p->p_ucred, p); VOP_UNLOCK(vp, 0, p); out: @@ -2751,6 +2796,13 @@ auio.uio_resid = uap->count; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); loff = auio.uio_offset = fp->f_offset; +#ifdef MAC + error = mac_check_vnode_readdir(p->p_ucred, vp); + if (error) { + VOP_UNLOCK(vp, 0, p); + return (error); + } +#endif # if (BYTE_ORDER != LITTLE_ENDIAN) if (vp->v_mount->mnt_maxsymlinklen <= 0) { error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, @@ -2908,6 +2960,10 @@ auio.uio_resid = uap->count; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); loff = auio.uio_offset = fp->f_offset; +#ifdef MAC + error = mac_check_vnode_readdir(p->p_ucred, vp); + if (error == 0) +#endif error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, (int *)0, (u_long *)0); fp->f_offset = auio.uio_offset; @@ -3019,6 +3075,11 @@ if (error = namei(&nd)) return (error); vp = nd.ni_vp; +#ifdef MAC + error = mac_check_vnode_revoke(p->p_ucred, vp); + if (error) + goto out; +#endif if (error = VOP_GETATTR(vp, &vattr, p->p_ucred, p)) goto out; if (p->p_ucred->cr_uid != vattr.va_uid && @@ -3387,6 +3448,11 @@ auio.uio_resid = uap->buffersize; loff = auio.uio_offset = fp->f_offset; +#ifdef MAC + error = mac_check_vnode_readdir(p->p_ucred, vp); + if (error) + return (error); +#endif vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); error = VOP_READDIRATTR (vp, &attributelist, &auio, actualcount, uap->options, &newstate, &eofflag, ==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/vfs/vfs_vnops.c#2 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Sat Oct 11 22:13:52 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6532B16A4C1; Sat, 11 Oct 2003 22:13:52 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B82916A4BF for ; Sat, 11 Oct 2003 22:13:52 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9025043FBD for ; Sat, 11 Oct 2003 22:13:51 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9C5DpXJ079110 for ; Sat, 11 Oct 2003 22:13:51 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9C5Dpgk079107 for perforce@freebsd.org; Sat, 11 Oct 2003 22:13:51 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Sat, 11 Oct 2003 22:13:51 -0700 (PDT) Message-Id: <200310120513.h9C5Dpgk079107@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39546 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2003 05:13:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=39546 Change 39546 by sam@sam_ebb on 2003/10/11 22:13:16 o fix bssid printed in debug msg o move comment to be consistent with nearby code Affected files ... .. //depot/projects/netperf/sys/net80211/ieee80211_input.c#8 edit Differences ... ==== //depot/projects/netperf/sys/net80211/ieee80211_input.c#8 (text+ko) ==== @@ -133,10 +133,10 @@ switch (ic->ic_opmode) { case IEEE80211_M_STA: if (!IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_bssid)) { + /* not interested in */ IEEE80211_DPRINTF2(("%s: discard frame from " "bss %s\n", __func__, ether_sprintf(wh->i_addr2))); - /* not interested in */ ic->ic_stats.is_rx_wrongbss++; goto out; } @@ -151,8 +151,9 @@ if (!IEEE80211_ADDR_EQ(bssid, ic->ic_bss->ni_bssid) && !IEEE80211_ADDR_EQ(bssid, ifp->if_broadcastaddr)) { /* not interested in */ - IEEE80211_DPRINTF2(("%s: other bss %s\n", - __func__, ether_sprintf(wh->i_addr3))); + IEEE80211_DPRINTF2(("%s: discard frame from " + "bss %s\n", __func__, + ether_sprintf(bssid))); ic->ic_stats.is_rx_wrongbss++; goto out; } From owner-p4-projects@FreeBSD.ORG Sat Oct 11 22:14:54 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3546A16A4C0; Sat, 11 Oct 2003 22:14:54 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1123D16A4B3 for ; Sat, 11 Oct 2003 22:14:54 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A79E43F93 for ; Sat, 11 Oct 2003 22:14:53 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9C5ErXJ079137 for ; Sat, 11 Oct 2003 22:14:53 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9C5Ermr079134 for perforce@freebsd.org; Sat, 11 Oct 2003 22:14:53 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Sat, 11 Oct 2003 22:14:53 -0700 (PDT) Message-Id: <200310120514.h9C5Ermr079134@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39547 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2003 05:14:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=39547 Change 39547 by sam@sam_ebb on 2003/10/11 22:14:23 change ath_rate_ctl_reset to handle transition from station mode to adhoc mode; was not resetting the initial xmit rate causing outbound frames to be dicarded Affected files ... .. //depot/projects/netperf/sys/dev/ath/if_ath.c#15 edit Differences ... ==== //depot/projects/netperf/sys/dev/ath/if_ath.c#15 (text+ko) ==== @@ -2565,20 +2565,13 @@ struct ieee80211_node *ni; struct ath_node *an; - an = (struct ath_node *) ic->ic_bss; - an->an_tx_ok = an->an_tx_err = an->an_tx_retr = an->an_tx_upper = 0; - if (ic->ic_opmode == IEEE80211_M_STA) { - ni = ic->ic_bss; - if (state == IEEE80211_S_RUN) { - /* start with highest negotiated rate */ - KASSERT(ni->ni_rates.rs_nrates > 0, - ("transition to RUN state w/ no rates!")); - ni->ni_txrate = ni->ni_rates.rs_nrates - 1; - } else { - /* use lowest rate */ - ni->ni_txrate = 0; - } - } else { + if (ic->ic_opmode != IEEE80211_M_STA) { + /* + * When operating as a station the node table holds + * the AP's that were discovered during scanning. + * For any other operating mode we want to reset the + * tx rate state of each node. + */ TAILQ_FOREACH(ni, &ic->ic_node, ni_list) { ni->ni_txrate = 0; /* use lowest rate */ an = (struct ath_node *) ni; @@ -2586,6 +2579,22 @@ an->an_tx_upper = 0; } } + /* + * Reset local xmit state; this is really only meaningful + * when operating in station or adhoc mode. + */ + ni = ic->ic_bss; + an = (struct ath_node *) ni; + an->an_tx_ok = an->an_tx_err = an->an_tx_retr = an->an_tx_upper = 0; + if (state == IEEE80211_S_RUN) { + /* start with highest negotiated rate */ + KASSERT(ni->ni_rates.rs_nrates > 0, + ("transition to RUN state w/ no rates!")); + ni->ni_txrate = ni->ni_rates.rs_nrates - 1; + } else { + /* use lowest rate */ + ni->ni_txrate = 0; + } } /* From owner-p4-projects@FreeBSD.ORG Sat Oct 11 23:08:01 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D5E9816A4C0; Sat, 11 Oct 2003 23:08:00 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD02A16A4B3 for ; Sat, 11 Oct 2003 23:08:00 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF36243FD7 for ; Sat, 11 Oct 2003 23:07:58 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9C67wXJ082048 for ; Sat, 11 Oct 2003 23:07:58 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9C67wH6082045 for perforce@freebsd.org; Sat, 11 Oct 2003 23:07:58 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Sat, 11 Oct 2003 23:07:58 -0700 (PDT) Message-Id: <200310120607.h9C67wH6082045@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39549 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Oct 2003 06:08:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=39549 Change 39549 by sam@sam_ebb on 2003/10/11 23:07:06 o don't grab the mutex at the top of ath_detach; it does nothing useful o deal with entry to ath_ioctl during detach to disable promiscuous mode as a result of calling bpfdetach2: cannot call ath_init when the device is marked invalid as the code isn't prepared to deal with it (in particular by that time the hal reference may have been yanked) Affected files ... .. //depot/projects/netperf/sys/dev/ath/if_ath.c#16 edit Differences ... ==== //depot/projects/netperf/sys/dev/ath/if_ath.c#16 (text+ko) ==== @@ -330,7 +330,6 @@ DPRINTF(("ath_detach: if_flags %x\n", ifp->if_flags)); - mtx_lock(&sc->sc_mtx); ath_stop(ifp); bpfdetach(ifp); ath_desc_free(sc); @@ -851,8 +850,19 @@ * only reflect promisc mode settings. */ ath_mode_init(sc); - } else - ath_init(ifp); /* XXX lose error */ + } else { + /* + * Beware of being called during detach to + * reset promiscuous mode. In that case we + * will still be marked UP but not RUNNING. + * However trying to re-init the interface + * is the wrong thing to do as we've already + * torn down much of our state. There's + * probably a better way to deal with this. + */ + if (!sc->sc_invalid) + ath_init(ifp); /* XXX lose error */ + } } else ath_stop(ifp); break;